query
stringlengths
74
6.1k
positive
listlengths
1
1
negative
listlengths
9
9
Map<String, String> packageNameMap() { if (packageNames == null) { return emptyMap(); } Map<String, String> names = new LinkedHashMap<String, String>(); for (PackageName name : packageNames) { names.put(name.getUri(), name.getPackage()); } return names; }
[ "Returns a map of URIs to package name, as specified by the packageNames\nparameter." ]
[ "Returns a row matrix which contains all the elements in A which are flagged as true in 'marked'\n\n@param A Input matrix\n@param marked Input matrix marking elements in A\n@param output Storage for output row vector. Can be null. Will be reshaped.\n@return Row vector with marked elements", "Returns the text value of all of the elements in the collection.\n\n@return the text value of all the elements in the collection or null", "Read a four byte integer.\n\n@param data byte array\n@param offset offset into array\n@return integer value", "Computes either the vector p-norm or the induced matrix p-norm depending on A\nbeing a vector or a matrix respectively.\n\n@param A Vector or matrix whose norm is to be computed.\n@param p The p value of the p-norm.\n@return The computed norm.", "Parses a raw WBS value from the database and breaks it into\ncomponent parts ready for formatting.\n\n@param value raw WBS value", "Returns a the list of available version of an artifact\n\n@param gavc String\n@return List<String>", "Gets the explorer file entry options.\n\n@return the explorer file entry options", "use parseJsonResponse instead", "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" ]
private void handleHidden(FormInput input) { String text = input.getInputValues().iterator().next().getValue(); if (null == text || text.length() == 0) { return; } WebElement inputElement = browser.getWebElement(input.getIdentification()); JavascriptExecutor js = (JavascriptExecutor) browser.getWebDriver(); js.executeScript("arguments[0].setAttribute(arguments[1], arguments[2]);", inputElement, "value", text); }
[ "Enter information into the hidden input field.\n\n@param input The input to enter into the hidden field." ]
[ "Add a post-effect to this camera's render chain.\n\nPost-effects are GL shaders, applied to the texture (hardware bitmap)\ncontaining the rendered scene graph. Each post-effect combines a shader\nselector with a set of parameters: This lets you pass different\nparameters to the shaders for each eye.\n\n@param postEffectData\nPost-effect to append to this camera's render chain", "Sets the values of this vector to those of v1.\n\n@param v1\nvector whose values are copied", "Recursively construct a LblTree from DOM tree\n\n@param walker tree walker for DOM tree traversal\n@return tree represented by DOM tree", "Write a Byte Order Mark at the beginning of the file\n\n@param stream the FileOutputStream to write the BOM to\n@param bigEndian true if UTF 16 Big Endian or false if Low Endian\n@throws IOException if an IOException occurs.\n@since 1.0", "set custom request for profile's default client\n\n@param profileName profileName to modify\n@param pathName friendly name of path\n@param customData custom request data\n@return true if success, false otherwise", "Set default values for annotations.\nInitial annotation take precedence over the default annotation when both annotation types are present\n\n@param defaultAnnotations default value for annotations", "Adds all items from the iterable to the Collection.\n\n@param self the collection\n@param items the items to add\n@return true if the collection changed", "Creates a new Collaboration Whitelist for a domain.\n@param api the API connection to be used by the resource.\n@param domain the domain to be added to a collaboration whitelist for a Box Enterprise.\n@param direction an enum representing the direction of the collaboration whitelist. Can be set to\ninbound, outbound, or both.\n@return information about the collaboration whitelist created.", "Deletes a story. A user can only delete stories they have created. Returns an empty data record.\n\n@param story Globally unique identifier for the story.\n@return Request object" ]
public static String checkRequiredProperties(Properties props, String ... requiredProps) { for (String required : requiredProps) { if (props.getProperty(required) == null) { return required; } } return null; }
[ "If any of the given list of properties are not found, returns the\nname of that property. Otherwise, returns null." ]
[ "Register custom filter types especially for serializer of specification json file", "Set the host running the Odo instance to configure\n\n@param hostName name of host", "Use this API to add sslaction resources.", "Sets up Log4J to write log messages to the console. Low-priority messages\nare logged to stdout while high-priority messages go to stderr.", "Returns the squared of the Euclidean distance between this vector and\nvector v.\n\n@return squared distance between this vector and v", "Use this API to fetch sslcertkey resource of given name .", "Use this API to update snmpoption.", "Get a list of people in a given photo.\n\n@param photoId\n@throws FlickrException", "Given a date represented by a Date instance, set the time\ncomponent of the date based on the hours and minutes of the\ntime supplied by the Date instance.\n\n@param date Date instance representing the date\n@param canonicalTime Date instance representing the time of day\n@return new Date instance with the required time set" ]
@Inline(value = "$1.remove($2)", statementExpression = true) public static <K, V> V operator_remove(Map<K, V> map, K key) { return map.remove(key); }
[ "Remove a key from the given map.\n\n@param <K> type of the map keys.\n@param <V> type of the map values.\n@param map the map to update.\n@param key the key to remove.\n@return the removed value, or <code>null</code> if the key was not\npresent in the map.\n@since 2.15" ]
[ "Calculate start dates for a monthly recurrence.\n\n@param calendar current date\n@param frequency frequency\n@param dates array of start dates", "Calculates a checksum for the specified buffer.\n@param buffer the buffer to calculate.\n@return the checksum value.", "Creates a ClassNode containing the wrapper of a ClassNode\nof primitive type. Any ClassNode representing a primitive\ntype should be created using the predefined types used in\nclass. The method will check the parameter for known\nreferences of ClassNode representing a primitive type. If\nReference is found, then a ClassNode will be contained that\nrepresents the wrapper class. For example for boolean, the\nwrapper class is java.lang.Boolean.\n\nIf the parameter is no primitive type, the redirected\nClassNode will be returned\n\n@see #make(Class)\n@see #make(String)\n@param cn the ClassNode containing a possible primitive type", "Sets all Fluo properties to their default in the given configuration. NOTE - some properties do\nnot have defaults and will not be set.", "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", "Add an exception to a calendar.\n\n@param parentNode parent node\n@param exception calendar exceptions", "Optimized version of the Wagner & Fischer algorithm that only\nkeeps a single column in the matrix in memory at a time. It\nimplements the simple cutoff, but otherwise computes the entire\nmatrix. It is roughly twice as fast as the original function.", "Use this API to update clusternodegroup.", "Determine the length of a nul terminated UTF16LE string in bytes.\n\n@param data string data\n@param offset offset into string data\n@return length in bytes" ]
protected boolean closeAtomically() { if (isClosed.compareAndSet(false, true)) { Closeable.closeQuietly(networkStatsListener); return true; } else { //was already closed. return false; } }
[ "Close the connection atomically.\n\n@return true if state changed to closed; false if nothing changed." ]
[ "Returns the association row with the given key.\n\n@param key the key of the row to return.\n@return the association row with the given key or {@code null} if no row with that key is contained in this\nassociation", "Retrieves state and metrics information for individual node.\n\n@param name node name\n@return node information", "Prints text to output stream, replacing parameter start and end\nplaceholders\n\n@param text the String to print", "Set the color resources used in the progress animation from color resources.\nThe first color will also be the color of the bar that grows in response\nto a user swipe gesture.\n\n@param colorResIds", "Checks whether the specified event name is restricted. If it is,\nthen create a pending error, and abort.\n\n@param name The event name\n@return Boolean indication whether the event name is restricted", "Creates a scenario with 3 different steps classes.\n\nTo share state between the different steps instances use the\n{@link com.tngtech.jgiven.annotation.ScenarioState} annotation\n\n@param givenClass the Given steps class\n@param whenClass the When steps class\n@param thenClass the Then steps class\n@return the new scenario", "Add a variable to the scripting context.\n\n@param varName The variable name.\n@param value The variable value.", "Expands the directories from the given list and and returns a list of subfiles.\nFiles from the original list are kept as is.", "Process the next event in a given stream.\n@return the fully processed event\n@throws IOException if a stream is in the wrong state, IO errors can be thrown" ]
protected TypeReference<?> getBeanPropertyType(Class<?> clazz, String propertyName, TypeReference<?> originalType) { TypeReference<?> propertyDestinationType = null; if (beanDestinationPropertyTypeProvider != null) { propertyDestinationType = beanDestinationPropertyTypeProvider .getPropertyType(clazz, propertyName, originalType); } if (propertyDestinationType == null) { propertyDestinationType = originalType; } return propertyDestinationType; }
[ "get the bean property type\n\n@param clazz\n@param propertyName\n@param originalType\n@return" ]
[ "Returns the complete record for a single section.\n\n@param section The section to get.\n@return Request object", "Get unique values form the array.\n\n@param values Array of values.\n@return Unique values.", "Goes through the buckets from ix and out, checking for each\ncandidate if it's in one of the buckets, and if so, increasing\nits score accordingly. No new candidates are added.", "Tries to close off all the unused assigned connections back to the pool. Assumes that\nthe strategy mode has already been flipped prior to calling this routine.\nCalled whenever our no of connection requests > no of threads.", "2-D Integer array to float array.\n\n@param array Integer array.\n@return Float array.", "Writes references that have been added recently. Auxiliary triples that\nare generated for serializing snaks in references will be written right\nafterwards. This will also trigger any other auxiliary triples to be\nwritten that the snak converter object may have buffered.\n\n@throws RDFHandlerException\nif there was a problem writing the restrictions", "Returns the class of datatype URI that best characterizes the range of\nthe given property based on its datatype.\n\n@param propertyIdValue\nthe property for which to get a range\n@return the range URI or null if the datatype could not be identified.", "Set a range of the colormap to a single color.\n@param firstIndex the position of the first color\n@param lastIndex the position of the second color\n@param color the color", "Use this API to convert sslpkcs12." ]
private void logShort(CharSequence message, boolean trim) throws IOException { int length = message.length(); if (trim) { while (length > 0 && Character.isWhitespace(message.charAt(length - 1))) { length--; } } char [] chars = new char [length + 1]; for (int i = 0; i < length; i++) { chars[i] = message.charAt(i); } chars[length] = '\n'; output.write(chars); }
[ "Log a message line to the output." ]
[ "Reads characters until the 'end' character is encountered.\n\n@param out\nThe StringBuilder to write to.\n@param in\nThe Input String.\n@param start\nStarting position.\n@param end\nEnd characters.\n@return The new position or -1 if no 'end' char was found.", "Utility method to convert a String to an Integer, and\nhandles null values.\n\n@param value string representation of an integer\n@return int value", "Returns the compact records for all sections in the specified project.\n\n@param project The project to get sections from.\n@return Request object", "Enable or disable this component.\n@param flag true to enable, false to disable.\n@see #enable()\n@see #disable()\n@see #isEnabled()", "Sets the specified double 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", "Handles Multi Channel Encapsulation message. Decapsulates\nan Application Command message and handles it using the right\nendpoint.\n@param serialMessage the serial message to process.\n@param offset the offset at which to start procesing.", "Deletes this collaboration.", "Use this API to delete nsip6 resources.", "Computes the decomposition of the provided matrix. If no errors are detected then true is returned,\nfalse otherwise.\n@param A The matrix that is being decomposed. Not modified.\n@return If it detects any errors or not." ]
public T modifyModule(final String moduleName, final String slot, final byte[] existingHash, final byte[] newHash) { final ContentItem item = createModuleItem(moduleName, slot, newHash); addContentModification(createContentModification(item, ModificationType.MODIFY, existingHash)); return returnThis(); }
[ "Modify a module.\n\n@param moduleName the module name\n@param slot the module slot\n@param existingHash the existing hash\n@param newHash the new hash of the modified content\n@return the builder" ]
[ "Updates the properties of a tag. Only the fields provided in the `data`\nblock will be updated; any unspecified fields will remain unchanged.\n\nWhen using this method, it is best to specify only those fields you wish\nto change, or else you may overwrite changes made by another user since\nyou last retrieved the task.\n\nReturns the complete updated tag record.\n\n@param tag The tag to update.\n@return Request object", "Use this API to fetch all the cacheobject resources that are configured on netscaler.", "A final cluster ought to be a super set of current cluster. I.e.,\nexisting node IDs ought to map to same server, but partition layout can\nhave changed and there may exist new nodes.\n\n@param currentCluster\n@param finalCluster", "Collect the total times measured by all known named timers of the given\nname. This is useful to add up times that were collected across separate\nthreads.\n\n@param timerName\n@return timer", "iteration not synchronized", "Returns the list of nodes which match the expression xpathExpr in the String domStr.\n\n@return the list of nodes which match the query\n@throws XPathExpressionException\n@throws IOException", "Get the Roman Numeral of the current value\n@return", "Saves the current translations from the container to the respective localization.", "Accessor method used to retrieve a String object representing the\ncontents of an individual field. If the field does not exist in the\nrecord, null is returned.\n\n@param field the index number of the field to be retrieved\n@return the value of the required field" ]
public static String getPropertyUri(PropertyIdValue propertyIdValue, PropertyContext propertyContext) { switch (propertyContext) { case DIRECT: return PREFIX_PROPERTY_DIRECT + propertyIdValue.getId(); case STATEMENT: return PREFIX_PROPERTY + propertyIdValue.getId(); case VALUE_SIMPLE: return PREFIX_PROPERTY_STATEMENT + propertyIdValue.getId(); case VALUE: return PREFIX_PROPERTY_STATEMENT_VALUE + propertyIdValue.getId(); case QUALIFIER: return PREFIX_PROPERTY_QUALIFIER_VALUE + propertyIdValue.getId(); case QUALIFIER_SIMPLE: return PREFIX_PROPERTY_QUALIFIER + propertyIdValue.getId(); case REFERENCE: return PREFIX_PROPERTY_REFERENCE_VALUE + propertyIdValue.getId(); case REFERENCE_SIMPLE: return PREFIX_PROPERTY_REFERENCE + propertyIdValue.getId(); case NO_VALUE: return PREFIX_WIKIDATA_NO_VALUE + propertyIdValue.getId(); case NO_QUALIFIER_VALUE: return PREFIX_WIKIDATA_NO_QUALIFIER_VALUE + propertyIdValue.getId(); default: return null; } }
[ "Get the URI for the given property in the given context.\n\n@param propertyIdValue\nthe property id for which to create a URI\n@param propertyContext\nthe context for which the URI will be needed\n@return the URI" ]
[ "Determines the feature state\n\n@param context the template context\n@param tag the tag\n@param attributeName the attribute name\n@param attributeValue the attribute value\n@param defaultState the default state if the expression evaluates to null\n@return the feature state", "Gets a design document from the database.\n\n@param id the design document id (optionally prefixed with \"_design/\")\n@return {@link DesignDocument}", "Split input text into sentences.\n\n@param text Input text.\n@return List of Sentence objects.", "Determines if a point is inside a box.", "Check if new license pattern is valid and doesn't match any existing one\n@param newComer License being added or edited\n@throws WebApplicationException if conflicts involving the newComer are detected", "Reports that a node is faulted.\n\n@param faulted the node faulted\n@param throwable the reason for fault", "Get's the user's current upload limits, User object only contains user_id\n\n@return Media Limits", "Creates a new ongoing Legal Hold Policy.\n@param api the API connection to be used by the resource.\n@param name the name of Legal Hold Policy.\n@param description the description of Legal Hold Policy.\n@return information about the Legal Hold Policy created.", "Retrieve the calendar used internally for timephased baseline calculation.\n\n@return baseline calendar" ]
public static void validateRollbackState(final String patchID, final InstalledIdentity identity) throws PatchingException { final Set<String> validHistory = processRollbackState(patchID, identity); if (patchID != null && !validHistory.contains(patchID)) { throw PatchLogger.ROOT_LOGGER.patchNotFoundInHistory(patchID); } }
[ "Validate the consistency of patches to the point we rollback.\n\n@param patchID the patch id which gets rolled back\n@param identity the installed identity\n@throws PatchingException" ]
[ "Create and return a new Violation for this rule and the specified import\n@param sourceCode - the SourceCode\n@param importNode - the ImportNode for the import triggering the violation\n@return a new Violation object", "Checks each available roll strategy in turn, starting at the per-minute\nstrategy, next per-hour, and so on for increasing units of time until a\nmatch is found. If no match is found, the error strategy is returned.\n\n@param properties\n@return The appropriate roll strategy.", "Sets the origin and direction of the pick ray.\n\n@param ox X coordinate of origin.\n@param oy Y coordinate of origin.\n@param oz Z coordinate of origin.\n@param dx X coordinate of ray direction.\n@param dy Y coordinate of ray direction.\n@param dz Z coordinate of ray direction.\n\nThe coordinate system of the ray depends on the whether the\npicker is attached to a scene object or not. When attached\nto a scene object, the ray is in the coordinate system of\nthat object where (0, 0, 0) is the center of the scene object\nand (0, 0, 1) is it's positive Z axis. If not attached to an\nobject, the ray is in the coordinate system of the scene's\nmain camera with (0, 0, 0) at the viewer and (0, 0, -1)\nwhere the viewer is looking.\n@see #doPick()\n@see #getPickRay()\n@see #getWorldPickRay(Vector3f, Vector3f)", "Updates the database. Never call this during normal operations, upgrade is a user-controlled operation.", "Determines whether the boolean value of the given string value.\n\n@param value The value\n@param defaultValue The boolean value to use if the string value is neither 'true' nor 'false'\n@return The boolean value of the string", "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", "Send a beat announcement to all registered master listeners.\n\n@param beat the beat sent by the tempo master", "Checks if the duration option is valid.\n\nNOTE: This does NOT check, if too many events are specified.\n\n@return a flag, indicating if the duration option is valid.", "Assign based on execution time history. The algorithm is a greedy heuristic\nassigning the longest remaining test to the slave with the\nshortest-completion time so far. This is not optimal but fast and provides\na decent average assignment." ]
public static void keyPresent(final String key, final Map<String, ?> map) { if (!map.containsKey(key)) { throw new IllegalStateException( String.format("expected %s to be present", key)); } }
[ "Throw IllegalStateException if key is not present in map.\n@param key the key to expect.\n@param map the map to search.\n@throws IllegalArgumentException if key is not in map." ]
[ "Truncated power function.\n\n@param value Value.\n@param degree Degree.\n@return Result.", "Use this API to fetch ipset resource of given name .", "request token from GCM", "Translate this rectangle over the specified following distances.\n\n@param rect rectangle to move\n@param dx delta x\n@param dy delta y", "Exchanges the final messages which politely report our intention to disconnect from the dbserver.", "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", "Use this API to fetch all the systemcore resources that are configured on netscaler.\nThis uses systemcore_args which is a way to provide additional arguments while fetching the resources.", "Returns the number of consecutive trailing one or zero bits.\nIf network is true, returns the number of consecutive trailing zero bits.\nOtherwise, returns the number of consecutive trailing one bits.\n\n@param network\n@return", "Reads the XER file table and row structure ready for processing.\n\n@param is input stream\n@throws MPXJException" ]
public static AnalysisResult fakeSuccess() { return new AnalysisResult(null, new Extensions(Collections.emptyMap(), Collections.emptyMap(), Collections.emptyMap(), Collections.emptyMap())); }
[ "A factory method for users that need to report success without actually running any analysis. The returned\nresult will be successful, but will not contain the actual configurations of extensions.\n\n@return a \"fake\" successful analysis result" ]
[ "Use this API to add systemuser.", "Reorder the objects in the table to resolve referential integrity dependencies.", "Sets the body of this request to a given JSON string.\n@param body the JSON string to use as the body.", "Use this API to update ntpserver.", "Creates and returns a GVRSceneObject with the specified mesh attributes.\n\n@param vertices the vertex positions of that make up the mesh. (x1, y1, z1, x2, y2, z2, ...)\n@param velocities the velocity attributes for each vertex. (vx1, vy1, vz1, vx2, vy2, vz2...)\n@param particleTimeStamps the spawning times of each vertex. (t1, 0, t2, 0, t3, 0 ..)\n\n@return The GVRSceneObject with this mesh.", "Create the voldemort key and value from the input Avro record by\nextracting the key and value and map it out for each of the responsible\nvoldemort nodes\n\n\nThe output value is the node_id & partition_id of the responsible node\nfollowed by serialized value", "Executes the sequence of operations", "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", "Parse the URI and get all the parameters in map form. Query name -&gt; List of Query values.\n\n@param rawQuery query portion of the uri to analyze." ]
public static String md5(byte[] source) { try { MessageDigest md = MessageDigest.getInstance("MD5"); md.update(source); byte tmp[] = md.digest(); char str[] = new char[32]; int k = 0; for (byte b : tmp) { str[k++] = hexDigits[b >>> 4 & 0xf]; str[k++] = hexDigits[b & 0xf]; } return new String(str); } catch (Exception e) { throw new IllegalArgumentException(e); } }
[ "digest message with MD5\n\n@param source message\n@return 32 bit MD5 value (lower case)" ]
[ "Tells you if the expression is a null safe dereference.\n@param expression\nexpression\n@return\ntrue if is null safe dereference.", "Handles an initial response from a PUT or PATCH operation response by polling\nthe status of the operation until the long running operation terminates.\n\n@param observable the initial observable from the PUT or PATCH operation.\n@param <T> the return type of the caller\n@param resourceType the java.lang.reflect.Type of the resource.\n@return the terminal response for the operation.\n@throws CloudException REST exception\n@throws InterruptedException interrupted exception\n@throws IOException thrown by deserialization", "Define the set of extensions.\n\n@param extensions\n@return self", "Gets any previous versions of this file. Note that only users with premium accounts will be able to retrieve\nprevious versions of their files.\n\n@return a list of previous file versions.", "Remove all existing subscriptions", "Adds a materialization listener.\n\n@param listener\nThe listener to add", "Removes a design document using DesignDocument object from the database.\n\n@param designDocument the design document object to be removed\n@return {@link DesignDocument}", "Generates the Base64 encoded SHA-1 hash for content available in the stream.\nIt can be used to calculate the hash of a file.\n@param stream the input stream of the file or data.\n@return the Base64 encoded hash string.", "Used to finish up pushing the bulge off the matrix." ]
public static vpnvserver_responderpolicy_binding[] get(nitro_service service, String name) throws Exception{ vpnvserver_responderpolicy_binding obj = new vpnvserver_responderpolicy_binding(); obj.set_name(name); vpnvserver_responderpolicy_binding response[] = (vpnvserver_responderpolicy_binding[]) obj.get_resources(service); return response; }
[ "Use this API to fetch vpnvserver_responderpolicy_binding resources of given name ." ]
[ "Get all categories\nGet all tags marked as categories\n@return ApiResponse&lt;TagsEnvelope&gt;\n@throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body", "Provisions a new user in an enterprise with additional user information.\n@param api the API connection to be used by the created user.\n@param login the email address the user will use to login.\n@param name the name of the user.\n@param params additional user information.\n@return the created user's info.", "Returns an entry with the given proposal and prefix, or null if the proposal is not valid.\nIf it is valid, the initializer function is applied to it.", "Get a property as an long or default value.\n\n@param key the property name\n@param defaultValue the default value", "If the given result is not cudnnStatus.CUDNN_STATUS_SUCCESS\nand exceptions have been enabled, this method will throw a\nCudaException with an error message that corresponds to the\ngiven result code. Otherwise, the given result is simply\nreturned.\n\n@param result The result to check\n@return The result that was given as the parameter\n@throws CudaException If exceptions have been enabled and\nthe given result code is not cudnnStatus.CUDNN_STATUS_SUCCESS", "Before closing the PersistenceBroker ensure that the session\ncache is cleared", "Will create a JNDI Context and register it as the initial context factory builder\n\n@return the context\n@throws NamingException\non any issue during initial context factory builder registration", "Use this API to delete gslbservice of given name.", "Retrieve the FeatureSource object from the data store.\n\n@return An OpenGIS FeatureSource object;\n@throws LayerException\noops" ]
private static Map<String, Integer> findClasses(Path path) { List<String> paths = findPaths(path, true); Map<String, Integer> results = new HashMap<>(); for (String subPath : paths) { if (subPath.endsWith(".java") || subPath.endsWith(".class")) { String qualifiedName = PathUtil.classFilePathToClassname(subPath); addClassToMap(results, qualifiedName); } } return results; }
[ "Recursively scan the provided path and return a list of all Java packages contained therein." ]
[ "Gets the boxed type of a class\n\n@param type The type\n@return The boxed type", "Determine if a CharSequence can be parsed as an Integer.\n\n@param self a CharSequence\n@return true if the CharSequence can be parsed\n@see #isInteger(String)\n@since 1.8.2", "Determine if the start of the buffer matches a fingerprint byte array.\n\n@param buffer bytes from file\n@param fingerprint fingerprint bytes\n@return true if the file matches the fingerprint", "Gets a SerialMessage with the BASIC SET command\n@param the level to set.\n@return the serial message", "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", "set the textColor of the ColorHolder to a view\n\n@param view", "Replaces sequences of whitespaces with tabs within a line.\n\n@param self A line to unexpand\n@param tabStop The number of spaces a tab represents\n@return an unexpanded String\n@since 1.8.2", "Assigns a list of nodes in the cluster represented by this failure\ndetector configuration.\n\n@param nodes Collection of Node instances, usually determined from the\nCluster; must be non-null", "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" ]
private static double threePointsAngle(Point vertex, Point A, Point B) { double b = pointsDistance(vertex, A); double c = pointsDistance(A, B); double a = pointsDistance(B, vertex); return Math.toDegrees(Math.acos((a * a + b * b - c * c) / (2 * a * b))); }
[ "calculate the point a's angle of rectangle consist of point a,point b, point c;\n\n@param vertex\n@param A\n@param B\n@return" ]
[ "Applies the kubernetes json url to the configuration.\n\n@param map\nThe arquillian configuration.", "Writes the content of an input stream to an output stream\n\n@throws IOException", "Constraint that ensures that the proxy-prefetching-limit has a valid value.\n\n@param def The descriptor (class, reference, collection)\n@param checkLevel The current check level (this constraint is checked in basic and strict)", "returns a comparator that allows to sort a Vector of FieldMappingDecriptors\naccording to their m_Order entries.", "Returns the value of the identified field as a Boolean.\n@param fieldName the name of the field\n@return the value of the field as a Boolean", "Returns whether this address section represents a subnet block of addresses associated its prefix length.\n\nReturns false if it has no prefix length, if it is a single address with a prefix length (ie not a subnet), or if it is a range of addresses that does not include\nthe entire subnet block for its prefix length.\n\nIf {@link AddressNetwork#getPrefixConfiguration} is set to consider all prefixes as subnets, this returns true for any grouping with prefix length.\n\n@return", "Access all of the elements of the collection that evaluate to true for the\nprovided query predicate.\n@param\tpredicate\tAn OQL boolean query predicate.\n@return\tAn iterator used to iterate over the elements that evaluated true for the predicate.\n@exception\torg.odmg.QueryInvalidException\tThe query predicate is invalid.", "Parse representations from a file object response.\n@param jsonObject representations json object in get response for /files/file-id?fields=representations\n@return list of representations", "Creates a map of identifiers or page titles to documents retrieved via\nthe APIs.\n\n@param numOfEntities\nnumber of entities that should be retrieved\n@param properties\nWbGetEntitiesProperties object that includes all relevant\nparameters for the wbgetentities action\n@return map of document identifiers or titles to documents retrieved via\nthe API URL\n@throws MediaWikiApiErrorException\n@throws IOException" ]
public static base_responses add(nitro_service client, gslbsite resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { gslbsite addresources[] = new gslbsite[resources.length]; for (int i=0;i<resources.length;i++){ addresources[i] = new gslbsite(); addresources[i].sitename = resources[i].sitename; addresources[i].sitetype = resources[i].sitetype; addresources[i].siteipaddress = resources[i].siteipaddress; addresources[i].publicip = resources[i].publicip; addresources[i].metricexchange = resources[i].metricexchange; addresources[i].nwmetricexchange = resources[i].nwmetricexchange; addresources[i].sessionexchange = resources[i].sessionexchange; addresources[i].triggermonitor = resources[i].triggermonitor; addresources[i].parentsite = resources[i].parentsite; } result = add_bulk_request(client, addresources); } return result; }
[ "Use this API to add gslbsite resources." ]
[ "Verify JUnit presence and version.", "Parses the query facet configurations.\n@param rangeFacetObject The JSON sub-node with the query facet configurations.\n@return The query facet configurations.", "Fixed length fancy formatting for doubles. If possible decimal notation is used. If all the significant digits\ncan't be shown then it will switch to exponential notation. If not all the space is needed then it will\nbe filled in to ensure it has the specified length.\n\n@param value value being formatted\n@param format default format before exponential\n@param length Maximum number of characters it can take.\n@param significant Number of significant decimal digits to show at a minimum.\n@return formatted string", "Add the elements that all values objects require from the provided values object.\n\n@param sourceValues the values object containing the required elements", "Sets the submatrix of W up give Y is already configured and if it is being cached or not.", "Creates a new connection from the data source that the connection descriptor\nrepresents. If the connection descriptor does not directly contain the data source\nthen a JNDI lookup is performed to retrieve the data source.\n\n@param jcd The connection descriptor\n@return A connection instance\n@throws LookupException if we can't get a connection from the datasource either due to a\nnaming exception, a failed sanity check, or a SQLException.", "Extract a slice [from, to) of this buffer. This methods creates a copy of the specified region.\n@param from\n@param to\n@return", "Returns a specific profile\n\n@param profileId ID of profile\n@return Selected profile if found, null if not found\n@throws Exception exception", "Handles the change of a value in the current translation.\n@param propertyId the property id of the column where the value has changed." ]
protected Path normalizePath(final Path parent, final String path) { return parent.resolve(path).toAbsolutePath().normalize(); }
[ "Resolves the path relative to the parent and normalizes it.\n\n@param parent the parent path\n@param path the path\n\n@return the normalized path" ]
[ "Main method of RendererAdapter. 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 ListView.\n\nIf rRendererBuilder returns a null Renderer this method will throw a\nNullRendererBuiltException.\n\n@param position to render.\n@param convertView to use to recycle.\n@param parent used to inflate views.\n@return view rendered.", "Executes a method on the server asynchronously", "gets the count of addresses that this address division grouping may represent\n\nIf this address division grouping is not a subnet block of multiple addresses or has no range of values, then there is only one such address.\n\n@return", "Stop offering shared dbserver sessions.", "Sets the specified integer 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", "The way calendars are stored in an MSPDI file means that there\ncan be forward references between the base calendar unique ID for a\nderived calendar, and the base calendar itself. To get around this,\nwe initially populate the base calendar name attribute with the\nbase calendar unique ID, and now in this method we can convert those\nID values into the correct names.\n\n@param baseCalendars list of calendars and base calendar IDs\n@param map map of calendar ID values and calendar objects", "Matches an array value if it contains all the elements of the argument array\n@param rhs The arguments\n@return PredicateExpression: $all rhs", "Checks whether table name and key column names of the given joinable and inverse collection persister match.", "Called when a ParentViewHolder has triggered an expansion for it's parent\n\n@param flatParentPosition the position of the parent that is calling to be expanded" ]
public static base_responses restore(nitro_service client, appfwprofile resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { appfwprofile restoreresources[] = new appfwprofile[resources.length]; for (int i=0;i<resources.length;i++){ restoreresources[i] = new appfwprofile(); restoreresources[i].archivename = resources[i].archivename; } result = perform_operation_bulk_request(client, restoreresources,"restore"); } return result; }
[ "Use this API to restore appfwprofile resources." ]
[ "Retrieves and validates the content type from the REST requests\n\n@return true if has content type.", "Checks to see if a subsystem resource has already been registered for the deployment.\n\n@param subsystemName the name of the subsystem\n\n@return {@code true} if the subsystem exists on the deployment otherwise {@code false}", "returns the abstract method from a SAM type, if it is a SAM type.\n@param c the SAM class\n@return null if nothing was found, the method otherwise", "Filters a dot at the end of the passed package name if present.\n\n@param pkgName\na package name\n@return a filtered package name", "This method permanently removes a webhook. Note that it may be possible\nto receive a request that was already in flight after deleting the\nwebhook, but no further requests will be issued.\n\n@param webhook The webhook to delete.\n@return Request object", "Generate a groupId tree regarding the filters\n\n@param moduleId\n@return TreeNode", "Reset autoCommit state.", "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.", "This function computes which reduce task to shuffle a record to." ]
public static Operation createDeployOperation(final Set<DeploymentDescription> deployments) { Assertions.requiresNotNullOrNotEmptyParameter("deployments", deployments); final CompositeOperationBuilder builder = CompositeOperationBuilder.create(true); for (DeploymentDescription deployment : deployments) { addDeployOperationStep(builder, deployment); } return builder.build(); }
[ "Creates an option to deploy existing content to the runtime for each deployment\n\n@param deployments a set of deployments to deploy\n\n@return the deploy operation" ]
[ "Adds an item to the list box, specifying an initial value for the item.\n\n@param value the item's value, to be submitted if it is part of a\n{@link FormPanel}; cannot be <code>null</code>\n@param text the text of the item to be added\n@param reload perform a 'material select' reload to update the DOM.", "Get the script for a given ID\n\n@param id ID of script\n@return Script if found, otherwise null", "Returns the editable columns for the provided edit mode.\n@param mode the edit mode.\n@return the editable columns for the provided edit mode.", "Read an optional Date value form a JSON value.\n@param val the JSON value that should represent the Date as long value in a string.\n@return the Date from the JSON or null if reading the date fails.", "Inserts a new instance but references via the outIdentifier, which is returned as part of the ExecutionResults\nThe outIdentifier can be null.\nThe entryPoint, which can also be null, specifies the entrypoint the object is inserted into.\n\n@param object\n@param outIdentifier\n@param entryPoint\n@return", "Use this API to fetch responderhtmlpage resource of given name .", "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", "Puts as many of the given bytes as possible into this buffer.\n\n@return number of bytes actually put into this buffer (0 if the buffer is full)", "Appends the key and value to the address and sets the address on the operation.\n\n@param operation the operation to set the address on\n@param base the base address\n@param key the key for the new address\n@param value the value for the new address" ]
public static ConstraintField getInstance(int value) { ConstraintField result = null; if (value >= 0 && value < FIELD_ARRAY.length) { result = FIELD_ARRAY[value]; } return (result); }
[ "Retrieve an instance of the ConstraintField class based on the data read from an\nMS Project file.\n\n@param value value from an MS Project file\n@return ConstraintField instance" ]
[ "Return an input stream to read the data from the named table.\n\n@param name table name\n@return InputStream instance\n@throws IOException", "Notifies that multiple header items are inserted.\n\n@param positionStart the position.\n@param itemCount the item count.", "Returns a prefix length for which the range of this segment grouping matches the the block of addresses for that prefix.\n\nIf no such prefix exists, returns null\n\nIf this segment grouping represents a single value, returns the bit length\n\n@return the prefix length or null", "Scan all the class path and look for all classes that have the Format\nAnnotations.", "Update the value of an embedded node property.\n\n@param executionEngine the {@link GraphDatabaseService} used to run the query\n@param keyValues the columns representing the identifier in the entity owning the embedded\n@param embeddedColumn the column on the embedded node (dot-separated properties)\n@param value the new value for the property", "Write a project file in SDEF format to an output stream.\n\n@param projectFile ProjectFile instance\n@param out output stream", "Has to be called when the scenario is finished in order to execute after methods.", "returns position of xpath element which match the expression xpath in the String dom.\n\n@param dom the Document to search in\n@param xpath the xpath query\n@return position of xpath element, if fails returns -1", "Enable a custom response\n\n@param custom custom response\n@param path_id path ID of the response\n@param client_uuid client UUID\n@throws Exception exception" ]
@Override public <E> DynamicType.Builder<E> processMethod(final DynamicType.Builder<E> builder, final Method method, final Annotation annotation) { String methodName = method.getName(); if (ReflectionUtility.isGetMethod(method)) return createInterceptor(builder, method); else if (ReflectionUtility.isSetMethod(method)) return createInterceptor(builder, method); else if (methodName.startsWith("addAll")) return createInterceptor(builder, method); else if (methodName.startsWith("add")) return createInterceptor(builder, method); else throw new WindupException("Only get*, set*, add*, and addAll* method names are supported for @" + SetInProperties.class.getSimpleName() + ", found at: " + method.getName()); }
[ "The handling method." ]
[ "Makes this pose the inverse of the input pose.\n@param src pose to invert.", "Adds the specified class to the internal class graph along with its\nrelations and dependencies, eventually inferring them, according to the\nOptions specified for this matcher\n@param cd", "Create and serialize a WorkerStatus.\n\n@param queue the queue the Job came from\n@param job the Job currently being processed\n@return the JSON representation of a new WorkerStatus\n@throws IOException if there was an error serializing the WorkerStatus", "public because it's used by other packages that use Duke", "Create a WebMBeanAdaptor for a specified MBean name.\n@param mBeanName the MBean name (can be URL-encoded).\n@param encoding the string encoding to be used (i.e. UTF-8)\n@return the created WebMBeanAdaptor.\n@throws JMException Java Management Exception\n@throws UnsupportedEncodingException if the encoding is not supported.", "Validates the inputed color value.\n@param colorvalue the value of the color\n@return true if the inputed color value is valid", "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 precedence of the specified operator. Non-operator's will\nreceive -1 or a GroovyBugError, depending on your preference.", "Obtains a local date in Symmetry010 calendar system from the\nproleptic-year, month-of-year and day-of-month fields.\n\n@param prolepticYear the proleptic-year\n@param month the month-of-year\n@param dayOfMonth the day-of-month\n@return the Symmetry010 local date, not null\n@throws DateTimeException if unable to create the date" ]
protected static String jacksonObjectToString(Object object) { try { return mapper.writeValueAsString(object); } catch (JsonProcessingException e) { logger.error("Failed to serialize JSON data: " + e.toString()); return null; } }
[ "Serializes the given object in JSON and returns the resulting string. In\ncase of errors, null is returned. In particular, this happens if the\nobject is not based on a Jackson-annotated class. An error is logged in\nthis case.\n\n@param object\nobject to serialize\n@return JSON serialization or null" ]
[ "Concatenates the trajectory a and b\n@param a The end of this trajectory will be connected to the start of trajectory b\n@param b The start of this trajectory will be connected to the end of trajectory a\n@return Concatenated trajectory", "Utility method to remove ampersands embedded in names.\n\n@param name name text\n@return name text without embedded ampersands", "Returns new boolean matrix with true or false values selected with equal probability.\n\n@param numRow Number of rows in the new matrix.\n@param numCol Number of columns in the new matrix.\n@param rand Random number generator used to fill the matrix.\n@return The randomly generated matrix.", "Read custom fields for a GanttProject resource.\n\n@param gpResource GanttProject resource\n@param mpxjResource MPXJ Resource instance", "Re-Tag the websocket connection hold by this context with label specified.\nThis method will remove all previous tags on the websocket connection and then\ntag it with the new label.\n@param label the label.\n@return this websocket conext.", "a small static helper to set the color to a GradientDrawable null save\n\n@param colorHolder\n@param ctx\n@param gradientDrawable", "Adds new holes to the polygon.\n\n@param holes holes, must be contained in the exterior ring and must not overlap or\nintersect another hole\n@return this for chaining", "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.", "Add a misc file.\n\n@param name the file name\n@param path the relative path\n@param newHash the new hash of the added content\n@param isDirectory whether the file is a directory or not\n@return the builder" ]
public static AliasOperationTransformer replaceLastElement(final PathElement element) { return create(new AddressTransformer() { @Override public PathAddress transformAddress(final PathAddress original) { final PathAddress address = original.subAddress(0, original.size() -1); return address.append(element); } }); }
[ "Replace the last element of an address with a static path element.\n\n@param element the path element\n@return the operation address transformer" ]
[ "This method is used to associate a child task with the current\ntask instance. It has package access, and has been designed to\nallow the hierarchical outline structure of tasks in an MPX\nfile to be constructed as the file is read in.\n\n@param child Child task.\n@param childOutlineLevel Outline level of the child task.", "Read an optional boolean value form a JSON Object.\n@param json the JSON object to read from.\n@param key the key for the boolean value in the provided JSON object.\n@return the boolean or null if reading the boolean fails.", "Create a transformation which takes the alignment settings into account.", "set custom response for the default profile's default client\n\n@param pathName friendly name of path\n@param customData custom response/request data\n@return true if success, false otherwise", "An invalid reference or references. The verification of the digest of a\nreference failed. This can be caused by a change to the referenced data\nsince the signature was generated.\n\n@param aInvalidReferences\nThe indices to the invalid references.\n@return Result object", "Gets the listener classes to which dispatching should be prevented while\nthis event is being dispatched.\n\n@return The listener classes marked to prevent.\n@see #preventCascade(Class)", "Get the context for the specified photo.\n\nThis method does not require authentication.\n\n@param photoId\nThe photo ID\n@return The PhotoContext\n@throws FlickrException", "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}", "Use this API to fetch responderpolicylabel_responderpolicy_binding resources of given name ." ]
public String build() { if (!root.containsKey("mdm")) { insertCustomAlert(); root.put("aps", aps); } try { return mapper.writeValueAsString(root); } catch (final Exception e) { throw new RuntimeException(e); } }
[ "Returns the JSON String representation of the payload\naccording to Apple APNS specification\n\n@return the String representation as expected by Apple" ]
[ "Sets a new config and clears the previous cache", "Creates a converter function that converts value into primitive type.\n\n@return A converter function or {@code null} if the given type is not primitive type or boxed type", "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", "Finish the oauth flow after the user was redirected back.\n\n@param code\nCode returned by the Eve Online SSO\n@param state\nThis should be some secret to prevent XRSF see\ngetAuthorizationUri\n@throws net.troja.eve.esi.ApiException", "Setter for blob handle value.\n\n@param txn enclosing transaction\n@param localId entity local id.\n@param blobId blob id\n@param value property value.", "Invokes a closure passing it a new Sql instance created from the given JDBC connection URL.\nThe created connection will be closed if required.\n\n@param url a database url of the form\n<code>jdbc:<em>subprotocol</em>:<em>subname</em></code>\n@param c the Closure to call\n@see #newInstance(String)\n@throws SQLException if a database access error occurs", "Remove all unnecessary comments from a lexer or parser file", "Get the VCS revision from the Jenkins build environment. The search will one of \"SVN_REVISION\", \"GIT_COMMIT\",\n\"P4_CHANGELIST\" in the environment.\n\n@param env Th Jenkins build environment.\n@return The vcs revision for supported VCS", "Converts the search results from CmsSearchResource to CmsSearchResourceBean.\n@param searchResults The collection of search results to transform." ]
public Results analyze(RuleSet ruleSet) { long startTime = System.currentTimeMillis(); DirectoryResults reportResults = new DirectoryResults(); int numThreads = Runtime.getRuntime().availableProcessors() - 1; numThreads = numThreads > 0 ? numThreads : 1; ExecutorService pool = Executors.newFixedThreadPool(numThreads); for (FileSet fileSet : fileSets) { processFileSet(fileSet, ruleSet, pool); } pool.shutdown(); try { boolean completed = pool.awaitTermination(POOL_TIMEOUT_SECONDS, TimeUnit.SECONDS); if (!completed) { throw new IllegalStateException("Thread Pool terminated before comp<FileResults>letion"); } } catch (InterruptedException e) { throw new IllegalStateException("Thread Pool interrupted before completion"); } addDirectoryResults(reportResults); LOG.info("Analysis time=" + (System.currentTimeMillis() - startTime) + "ms"); return reportResults; }
[ "Analyze all source code using the specified RuleSet and return the report results.\n\n@param ruleSet - the RuleSet to apply to each source component; must not be null.\n@return the results from applying the RuleSet to all of the source" ]
[ "Returns the value of a property of the current object on the specified level.\n\n@param attributes The attributes of the tag\n@return The property value\n@exception XDocletException If an error occurs\[email protected] type=\"content\"\[email protected] name=\"level\" optional=\"false\" description=\"The level for the current object\"\nvalues=\"class,field,reference,collection\"\[email protected] name=\"name\" optional=\"false\" description=\"The name of the property\"\[email protected] name=\"default\" optional=\"true\" description=\"A default value to use if the property\nis not defined\"", "Use this API to fetch all the cachecontentgroup resources that are configured on netscaler.", "Requests the beat grid for a specific track ID, given a connection to a player that has already been set up.\n\n@param rekordboxId the track of interest\n@param slot identifies the media slot we are querying\n@param client the dbserver client that is communicating with the appropriate player\n\n@return the retrieved beat grid, or {@code null} if there was none available\n\n@throws IOException if there is a communication problem", "Obtain parameters from query\n\n@param query query to scan\n@return Map of parameters", "Copy the settings from another calendar to this calendar.\n\n@param cal calendar data source", "Update the context session to mark a user logged in\n\n@param userIdentifier\nthe user identifier, could be either userId or username", "Retrieves the time at which work finishes on the given date, or returns\nnull if this is a non-working day.\n\n@param date Date instance\n@return finish time, or null for non-working day", "Extract a duration amount from the assignment, converting a percentage\ninto an actual duration.\n\n@param task parent task\n@param work duration from assignment\n@return Duration instance", "Sets the left padding character for all cells in the row.\n@param paddingLeftChar new padding character, ignored if null\n@return this to allow chaining" ]
static boolean matchPath(String[] tokenizedPattern, String[] strDirs, boolean isCaseSensitive) { int patIdxStart = 0; int patIdxEnd = tokenizedPattern.length - 1; int strIdxStart = 0; int strIdxEnd = strDirs.length - 1; // up to first '**' while (patIdxStart <= patIdxEnd && strIdxStart <= strIdxEnd) { String patDir = tokenizedPattern[patIdxStart]; if (patDir.equals(DEEP_TREE_MATCH)) { break; } if (!match(patDir, strDirs[strIdxStart], isCaseSensitive)) { return false; } patIdxStart++; strIdxStart++; } if (strIdxStart > strIdxEnd) { // String is exhausted for (int i = patIdxStart; i <= patIdxEnd; i++) { if (!tokenizedPattern[i].equals(DEEP_TREE_MATCH)) { return false; } } return true; } else { if (patIdxStart > patIdxEnd) { // String not exhausted, but pattern is. Failure. return false; } } // up to last '**' while (patIdxStart <= patIdxEnd && strIdxStart <= strIdxEnd) { String patDir = tokenizedPattern[patIdxEnd]; if (patDir.equals(DEEP_TREE_MATCH)) { break; } if (!match(patDir, strDirs[strIdxEnd], isCaseSensitive)) { return false; } patIdxEnd--; strIdxEnd--; } if (strIdxStart > strIdxEnd) { // String is exhausted for (int i = patIdxStart; i <= patIdxEnd; i++) { if (!tokenizedPattern[i].equals(DEEP_TREE_MATCH)) { return false; } } return true; } while (patIdxStart != patIdxEnd && strIdxStart <= strIdxEnd) { int patIdxTmp = -1; for (int i = patIdxStart + 1; i <= patIdxEnd; i++) { if (tokenizedPattern[i].equals(DEEP_TREE_MATCH)) { patIdxTmp = i; break; } } if (patIdxTmp == patIdxStart + 1) { // '**/**' situation, so skip one patIdxStart++; continue; } // Find the pattern between padIdxStart & padIdxTmp in str between // strIdxStart & strIdxEnd int patLength = (patIdxTmp - patIdxStart - 1); int strLength = (strIdxEnd - strIdxStart + 1); int foundIdx = -1; strLoop: for (int i = 0; i <= strLength - patLength; i++) { for (int j = 0; j < patLength; j++) { String subPat = tokenizedPattern[patIdxStart + j + 1]; String subStr = strDirs[strIdxStart + i + j]; if (!match(subPat, subStr, isCaseSensitive)) { continue strLoop; } } foundIdx = strIdxStart + i; break; } if (foundIdx == -1) { return false; } patIdxStart = patIdxTmp; strIdxStart = foundIdx + patLength; } for (int i = patIdxStart; i <= patIdxEnd; i++) { if (!tokenizedPattern[i].equals(DEEP_TREE_MATCH)) { return false; } } return true; }
[ "Core implementation of matchPath. It is isolated so that it can be called\nfrom TokenizedPattern." ]
[ "Creates a simple, annotation defined Enterprise Web Bean using the annotations specified on type\n\n@param <T> The type\n@param beanManager the current manager\n@param type the AnnotatedType to use\n@return An Enterprise Web Bean", "Here the lambda in the implicit step is determined dynamically. At first\nit selects zeros to quickly reveal singular values that are zero or close to zero.\nThen it computes it using a Wilkinson shift.", "Store the deployment contents and attach a \"transformed\" slave operation to the operation context.\n\n@param context the operation context\n@param operation the original operation\n@param contentRepository the content repository\n@return the hash of the uploaded deployment content\n@throws IOException\n@throws OperationFailedException", "Parse a currency symbol position from a string representation.\n\n@param value String representation\n@return CurrencySymbolPosition instance", "Add a content modification.\n\n@param modification the content modification", "End a \"track;\" that is, return to logging at one level shallower.\n@param title A title that should match the beginning of this track.", "Make a WMS getLayer request and return the image read from the server.\n\n@param wmsLayerParam the wms request parameters\n@param commonURI the uri to use for the requests (excepting parameters of course.)\n@param imageSize the size of the image to request\n@param dpi the dpi of the image to request\n@param angle the angle of the image to request\n@param bounds the area and projection of the request on the world.", "Use this API to add snmpmanager resources.", "Creates the server setup, depending on the protocol flags.\n\n@return the configured server setups." ]
public Tuple get(RowKey key) { AssociationOperation result = currentState.get( key ); if ( result == null ) { return cleared ? null : snapshot.get( key ); } else if ( result.getType() == REMOVE ) { return null; } return result.getValue(); }
[ "Returns the association row with the given key.\n\n@param key the key of the row to return.\n@return the association row with the given key or {@code null} if no row with that key is contained in this\nassociation" ]
[ "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.", "Always returns the original proxy object that was serialized.\n\n@return the proxy object\n@throws java.io.ObjectStreamException", "A package of the specified class will be scanned and found classes will be added to the set of bean classes for the synthetic bean archive.\n\n@param scanRecursively\n@param packageClass\n@return self", "Returns the context menu for the table item.\n@param itemId the table item.\n@return the context menu for the given item.", "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", "Sets an Integer attribute.\n\n@param key the key, non null.\n@param value the value\n@return the Builder, for chaining.", "Receive a notification that the channel was closed.\n\nThis is used for the {@link ManagementClientChannelStrategy.Establishing} since it might use multiple channels.\n\n@param closed the closed resource\n@param e the exception which occurred during close, if any", "Get global hotkey provider for current platform\n\n@param useSwingEventQueue whether the provider should be using Swing Event queue or a regular thread\n@return new instance of Provider, or null if platform is not supported\n@see X11Provider\n@see WindowsProvider\n@see CarbonProvider", "Creates a color item that represents a color field found for a track based on a dbserver message.\n\n@param menuItem the rendered menu item containing the color metadata field\n\n@return the color metadata field" ]
public void reset() { CrawlSession session = context.getSession(); if (crawlpath != null) { session.addCrawlPath(crawlpath); } List<StateVertex> onURLSetTemp = new ArrayList<>(); if (stateMachine != null) onURLSetTemp = stateMachine.getOnURLSet(); stateMachine = new StateMachine(graphProvider.get(), crawlRules.getInvariants(), plugins, stateComparator, onURLSetTemp); context.setStateMachine(stateMachine); crawlpath = new CrawlPath(); context.setCrawlPath(crawlpath); browser.handlePopups(); browser.goToUrl(url); // Checks the landing page for URL and sets the current page accordingly checkOnURLState(); plugins.runOnUrlLoadPlugins(context); crawlDepth.set(0); }
[ "Reset the crawler to its initial state." ]
[ "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", "Polls the next ParsedWord from the stack.\n\n@return next ParsedWord", "Use this API to fetch clusterinstance resources of given names .", "Read the projects from a ConceptDraw PROJECT file as top level tasks.\n\n@param cdp ConceptDraw PROJECT file", "This method writes project extended attribute data into an MSPDI file.\n\n@param project Root node of the MSPDI file", "Command to select a document from the POIFS for viewing.\n\n@param entry document to view", "Use this API to add ntpserver resources.", "Finds any clients which are not currently in use, and which have been idle for longer than the\nidle timeout, and closes them.", "Processes graphical indicator definitions for each column." ]
public static void checkEigenvalues() { DoubleMatrix A = new DoubleMatrix(new double[][]{ {3.0, 2.0, 0.0}, {2.0, 3.0, 2.0}, {0.0, 2.0, 3.0} }); DoubleMatrix E = new DoubleMatrix(3, 1); NativeBlas.dsyev('N', 'U', 3, A.data, 0, 3, E.data, 0); check("checking existence of dsyev...", true); }
[ "Compute eigenvalues. This is a routine not in ATLAS, but in the original\nLAPACK." ]
[ "Returns iterable with all non-deleted file version legal holds for this legal hold policy.\n@param limit the limit of entries per response. The default value is 100.\n@param fields the fields to retrieve.\n@return an iterable containing file version legal holds info.", "Gets information about all of the group memberships for this group.\nDoes not support paging.\n@return a collection of information about the group memberships for this group.", "Extracts assignment baseline data.\n\n@param assignment xml assignment\n@param mpx mpxj assignment", "Construct an InterestRateSwapProductDescriptor from a node in a FpML file.\n\n@param trade The node containing the swap.\n@return Descriptor of the swap.", "Use this API to fetch cacheselector resource of given name .", "Adds this vector to v1 and places the result in this vector.\n\n@param v1\nright-hand vector", "Return true if the AST expression has not already been visited. If it is\nthe first visit, register the expression so that the next visit will return false.\n\n@param expression - the AST expression to check\n@return true if the AST expression has NOT already been visited", "Convert an integer to a RelationType instance.\n\n@param type integer value\n@return RelationType instance", "Get the inactive overlay directories.\n\n@return the inactive overlay directories" ]
public static boolean isStandaloneRunning(final ModelControllerClient client) { try { final ModelNode response = client.execute(Operations.createReadAttributeOperation(EMPTY_ADDRESS, "server-state")); if (Operations.isSuccessfulOutcome(response)) { final String state = Operations.readResult(response).asString(); return !CONTROLLER_PROCESS_STATE_STARTING.equals(state) && !CONTROLLER_PROCESS_STATE_STOPPING.equals(state); } } catch (RuntimeException | IOException e) { LOGGER.trace("Interrupted determining if standalone is running", e); } return false; }
[ "Checks to see if a standalone server is running.\n\n@param client the client used to communicate with the server\n\n@return {@code true} if the server is running, otherwise {@code false}" ]
[ "If there is an unprocessed change event for a particular document ID, fetch it from the\nappropriate namespace change stream listener, and remove it. By reading the event here, we are\nassuming it will be processed by the consumer.\n\n@return the latest unprocessed change event for the given document ID and namespace, or null\nif none exists.", "Turn map into string\n\n@param propMap Map to be converted\n@return", "This method prints plan information of an agent through its external\naccess. It can be used to check the correct behaviour of the agent.\n\n@param agent_name\nThe name of the agent\n@param connector\nThe connector to get the external access\n@return plans the IPlan[] with all the information, so the tester can\nlook for information", "Find all the node representing the entity.\n\n@param executionEngine the {@link GraphDatabaseService} used to run the query\n@return an iterator over the nodes representing an entity", "Not used.", "The transaction will be executed with caching enabled. However, all newly cached values will be discarded as soon\nas the transaction is over.\n@since 2.1", "Resolve an operation transformer entry.\n\n@param address the address\n@param operationName the operation name\n@param placeholderResolver a placeholder resolver used to resolve children of a placeholder registration\n@return the transformer entry", "Places a connection back in the originating partition.\n@param connectionHandle to place back\n@throws SQLException on error", "Return the list of module ancestors\n\n@param moduleName\n@param moduleVersion\n@return List<Dependency>\n@throws GrapesCommunicationException" ]
public static final String printExtendedAttributeCurrency(Number value) { return (value == null ? null : NUMBER_FORMAT.get().format(value.doubleValue() * 100)); }
[ "Print an extended attribute currency value.\n\n@param value currency value\n@return string representation" ]
[ "Checks to see if matrix 'a' is the same as this matrix within the specified\ntolerance.\n\n@param a The matrix it is being compared against.\n@param tol How similar they must be to be equals.\n@return If they are equal within tolerance of each other.", "Create a Collection Proxy for a given query.\n\n@param brokerKey The key of the persistence broker\n@param query The query\n@param collectionClass The class to build the proxy for\n@return The collection proxy", "lookup current maximum value for a single field in\ntable the given class descriptor was associated.", "Resolves a conflict between a synchronized document's local and remote state. The resolution\nwill result in either the document being desynchronized or being replaced with some resolved\nstate based on the conflict resolver specified for the document. Uses the last uncommitted\nlocal event as the local state.\n\n@param nsConfig the namespace synchronization config of the namespace where the document\nlives.\n@param docConfig the configuration of the document that describes the resolver and current\nstate.\n@param remoteEvent the remote change event that is conflicting.", "Initialize the service with a context\n@param context the servlet context to initialize the profile.", "handle white spaces.", "Generate heroku-like random names\n\n@return String", "This method writes resource data to a PM XML file.", "Reorder the objects in the table to resolve referential integrity dependencies." ]
public static void read(InputStream stream, byte[] buffer) throws IOException { int read = 0; while(read < buffer.length) { int newlyRead = stream.read(buffer, read, buffer.length - read); if(newlyRead == -1) throw new EOFException("Attempt to read " + buffer.length + " bytes failed due to EOF."); read += newlyRead; } }
[ "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" ]
[ "Returns an Organization\n\n@param organizationId String\n@return DbOrganization", "Convert event type.\n\n@param eventType the event type\n@return the event enum type", "Build data model for serialization.", "Adds a variable to the end of the token list\n@param variable Variable which is to be added\n@return The new Token created around variable", "Stops the compressor.", "Sets axis dimension\n@param val dimension\n@param axis Axis. It might be either {@link Layout.Axis#X X} or\n{@link Layout.Axis#Y Y} or {@link Layout.Axis#Z Z}", "Retrieves a byte value from the property data.\n\n@param type Type identifier\n@return byte value", "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", "Emits a change event for the given document id.\n\n@param nsConfig the configuration for the namespace to which the\ndocument referred to by the change event belongs.\n@param event the change event." ]
public Set<? extends AbstractBean<?, ?>> resolveSpecializedBeans(Bean<?> specializingBean) { if (specializingBean instanceof AbstractClassBean<?>) { AbstractClassBean<?> abstractClassBean = (AbstractClassBean<?>) specializingBean; if (abstractClassBean.isSpecializing()) { return specializedBeans.getValue(specializingBean); } } if (specializingBean instanceof ProducerMethod<?, ?>) { ProducerMethod<?, ?> producerMethod = (ProducerMethod<?, ?>) specializingBean; if (producerMethod.isSpecializing()) { return specializedBeans.getValue(specializingBean); } } return Collections.emptySet(); }
[ "Returns a set of beans specialized by this bean. An empty set is returned if this bean does not specialize another beans." ]
[ "Layout which gets displayed if table is empty.\n\n@see org.opencms.ui.apps.user.I_CmsFilterableTable#getEmptyLayout()", "Get the column name from the indirection table.\n@param mnAlias\n@param path", "Pushes the Notification Viewed event to CleverTap.\n\n@param extras The {@link Bundle} object that contains the\nnotification details", "Returns an iban with replaced check digit.\n\n@param iban The iban\n@return The iban without the check digit", "Update the plane based on arcore best knowledge of the world\n\n@param scale", "Transforms the configuration.\n\n@throws Exception if something goes wrong", "Calculate start dates for a daily recurrence.\n\n@param calendar current date\n@param frequency frequency\n@param dates array of start dates", "Use this API to fetch the statistics of all protocolip_stats resources that are configured on netscaler.", "Start the socket server and waiting for finished\n\n@throws InterruptedException thread interrupted" ]
public T[] toArray(T[] tArray) { List<T> array = new ArrayList<T>(100); for (Iterator<T> it = iterator(); it.hasNext();) { T val = it.next(); if (val != null) array.add(val); } return array.toArray(tArray); }
[ "Returns an array of non null elements from the source array.\n\n@param tArray the source array\n@return the array" ]
[ "Saves changes in properties file. It reads the property file into memory, modifies it and saves it back to the file.\n\n@throws IOException", "Add the declarationSRef to the DeclarationsManager.\nCalculate the matching of the Declaration with the DeclarationFilter of the\nLinker.\n\n@param declarationSRef the ServiceReference<D> of the Declaration", "Opens a new FileOutputStream for a file of the given name in the given\nresult directory. Any file of this name that exists already will be\nreplaced. The caller is responsible for eventually closing the stream.\n\n@param resultDirectory\nthe path to the result directory\n@param filename\nthe name of the file to write to\n@return FileOutputStream for the file\n@throws IOException\nif the file or example output directory could not be created", "invoked from the jelly file\n\n@throws Exception Any exception", "Register a new TypeConverter for parsing and serialization.\n\n@param cls The class for which the TypeConverter should be used.\n@param converter The TypeConverter", "Use this API to fetch all the clusterinstance resources that are configured on netscaler.", "Add the extra parameters which are passed as report parameters. The type of the parameter is \"guessed\" from the\nfirst letter of the parameter name.\n\n@param model view model\n@param request servlet request", "This is the main entry point used to convert the internal representation\nof timephased baseline cost into an external form which can\nbe displayed to the user.\n\n@param file parent project file\n@param cost timephased resource assignment data\n@param rangeUnits timescale units\n@param dateList timescale date ranges\n@return list of durations, one per timescale date range", "add a join between two aliases\n\nTODO BRJ : This needs refactoring, it looks kind of weird\n\nno extents\nA1 -> A2\n\nextents on the right\nA1 -> A2\nA1 -> A2E0\n\nextents on the left : copy alias on right, extents point to copies\nA1 -> A2\nA1E0 -> A2C0\n\nextents on the left and right\nA1 -> A2\nA1 -> A2E0\nA1E0 -> A2C0\nA1E0 -> A2E0C0\n\n@param left\n@param leftKeys\n@param right\n@param rightKeys\n@param outer\n@param name" ]
public PlacesList<Place> placesForUser(int placeType, String woeId, String placeId, String threshold, Date minUploadDate, Date maxUploadDate, Date minTakenDate, Date maxTakenDate) throws FlickrException { Map<String, Object> parameters = new HashMap<String, Object>(); PlacesList<Place> placesList = new PlacesList<Place>(); parameters.put("method", METHOD_PLACES_FOR_USER); parameters.put("place_type", intPlaceTypeToString(placeType)); if (placeId != null) { parameters.put("place_id", placeId); } if (woeId != null) { parameters.put("woe_id", woeId); } if (threshold != null) { parameters.put("threshold", threshold); } if (minUploadDate != null) { parameters.put("min_upload_date", Long.toString(minUploadDate.getTime() / 1000L)); } if (maxUploadDate != null) { parameters.put("max_upload_date", Long.toString(maxUploadDate.getTime() / 1000L)); } if (minTakenDate != null) { parameters.put("min_taken_date", ((DateFormat) SearchParameters.MYSQL_DATE_FORMATS.get()).format(minTakenDate)); } if (maxTakenDate != null) { parameters.put("max_taken_date", ((DateFormat) SearchParameters.MYSQL_DATE_FORMATS.get()).format(maxTakenDate)); } Response response = transportAPI.get(transportAPI.getPath(), parameters, apiKey, sharedSecret); if (response.isError()) { throw new FlickrException(response.getErrorCode(), response.getErrorMessage()); } Element placesElement = response.getPayload(); NodeList placesNodes = placesElement.getElementsByTagName("place"); placesList.setPage("1"); placesList.setPages("1"); placesList.setPerPage("" + placesNodes.getLength()); placesList.setTotal("" + placesNodes.getLength()); for (int i = 0; i < placesNodes.getLength(); i++) { Element placeElement = (Element) placesNodes.item(i); placesList.add(parsePlace(placeElement)); } return placesList; }
[ "Return a list of the top 100 unique places clustered by a given placetype for a user.\n\n@param placeType\nUse Type-constants at {@link Place}\n@param woeId\nA Where On Earth (WOE) ID. Optional, can be null.\n@param placeId\nA Flickr Places ID. Optional, can be null.\n@param threshold\nThe minimum number of photos that a place type must have to be included. If the number of photos is lowered then the parent place type for\nthat place will be used. Optional, can be null.\n@param minUploadDate\nOptional, can be null.\n@param maxUploadDate\nOptional, can be null.\n@param minTakenDate\nOptional, can be null.\n@param maxTakenDate\nOptional, can be null.\n@return A PlacesList\n@throws FlickrException" ]
[ "Parse a macro defintion.\n\n\"macro NAME( var0 , var1 ) = 5+var0+var1'", "Retrieve a child that matches the given absolute path, starting from the current node.\n\n@param nodePath The path from the object root to the requested child node.\n@return The requested child node or <code>null</code>.", "Delegates file rolling to composed objects.\n\n@see FileRollable#roll(org.apache.log4j.spi.LoggingEvent)", "Removing surrounding space in image. Get trim color from specified pixel.\n@param value orientation from where to get the pixel color.\n@param colorTolerance 0 - 442. This is the euclidian distance\nbetween the colors of the reference pixel and the surrounding pixels is used.\nIf the distance is within the tolerance they'll get trimmed.", "Creates builder for passed path element\n\n@param elementName name of xml element that is used as decorator\n@return PersistentResourceXMLBuilder\n@deprecated decorator element support is currently considered as preview\n@since 4.0", "Computes execution time\n@param extra", "Adds OPT_F | OPT_FILE option to OptionParser, with one argument.\n\n@param parser OptionParser to be modified\n@param required Tells if this option is required or optional", "Populates a ProjectCalendarWeek instance from Asta work pattern data.\n\n@param week target ProjectCalendarWeek instance\n@param workPatternID target work pattern ID\n@param workPatternMap work pattern data\n@param timeEntryMap time entry map\n@param exceptionTypeMap exception type map", "Use this API to fetch dospolicy resource of given name ." ]
@Override public InstalledIdentity getInstalledIdentity(String productName, String productVersion) throws PatchingException { final String defaultIdentityName = defaultIdentity.getIdentity().getName(); if(productName == null) { productName = defaultIdentityName; } final File productConf = new File(installedImage.getInstallationMetadata(), productName + Constants.DOT_CONF); final String recordedProductVersion; if(!productConf.exists()) { recordedProductVersion = null; } else { final Properties props = loadProductConf(productConf); recordedProductVersion = props.getProperty(Constants.CURRENT_VERSION); } if(defaultIdentityName.equals(productName)) { if(recordedProductVersion != null && !recordedProductVersion.equals(defaultIdentity.getIdentity().getVersion())) { // this means the patching history indicates that the current version is different from the one specified in the server's version module, // which could happen in case: // - the last applied CP didn't include the new version module or // - the version module version included in the last CP didn't match the version specified in the CP's metadata, or // - the version module was updated from a one-off, or // - the patching history was edited somehow // In any case, here I decided to rely on the patching history. defaultIdentity = loadIdentity(productName, recordedProductVersion); } if(productVersion != null && !defaultIdentity.getIdentity().getVersion().equals(productVersion)) { throw new PatchingException(PatchLogger.ROOT_LOGGER.productVersionDidNotMatchInstalled( productName, productVersion, defaultIdentity.getIdentity().getVersion())); } return defaultIdentity; } if(recordedProductVersion != null && !Constants.UNKNOWN.equals(recordedProductVersion)) { if(productVersion != null) { if (!productVersion.equals(recordedProductVersion)) { throw new PatchingException(PatchLogger.ROOT_LOGGER.productVersionDidNotMatchInstalled(productName, productVersion, recordedProductVersion)); } } else { productVersion = recordedProductVersion; } } return loadIdentity(productName, productVersion); }
[ "This method returns the installed identity with the requested name and version.\nIf the product name is null, the default identity will be returned.\n\nIf the product name was recognized and the requested version was not null,\nthe version comparison will take place. If the version of the currently installed product\ndoesn't match the requested one, the exception will be thrown.\nIf the requested version is null, the currently installed identity with the requested name\nwill be returned.\n\nIf the product name was not recognized among the registered ones, a new installed identity\nwith the requested name will be created and returned. (This is because the patching system\nis not aware of how many and what the patching streams there are expected).\n\n@param productName\n@param productVersion\n@return\n@throws PatchingException" ]
[ "Set the host.\n\n@param host the host", "Stores an new entry in the cache.", "Populates currency settings.\n\n@param record MPX record\n@param properties project properties", "Use this API to delete appfwlearningdata.", "Delete the given file in a separate thread\n\n@param file The file to delete", "Use this API to fetch cachepolicylabel resource of given name .", "Meant to execute assertions in tests only\n@return a read-only view of the map containing the relations between entities", "Read the set of property files. Keys and Values are automatically validated and converted.\n\n@param resourceLoader\n@return all the properties from the weld.properties file", "Computes annualized seasonal adjustments from given monthly realized CPI values.\n\n@param realizedCPIValues An array of consecutive monthly CPI values (minimum size is 12*numberOfYearsToAverage))\n@param lastMonth The index of the last month in the sequence of realizedCPIValues (corresponding to the enums in <code>{@link java.time.Month}</code>).\n@param numberOfYearsToAverage The number of years to go back in the array of realizedCPIValues.\n@return Array of annualized seasonal adjustments, where [0] corresponds to the adjustment for from December to January." ]
boolean lockShared(final Integer permit, final long timeout, final TimeUnit unit) { boolean result = false; try { result = lockSharedInterruptibly(permit, timeout, unit); } catch (InterruptedException e) { Thread.currentThread().interrupt(); } return result; }
[ "Attempts shared acquisition with a max wait time.\n@param permit - the permit Integer for this operation. May not be {@code null}.\n@param timeout - the time value to wait for acquiring the lock\n@param unit - See {@code TimeUnit} for valid values\n@return {@code boolean} true on success." ]
[ "Calculates the bounds of the non-transparent parts of the given image.\n@param p the image\n@return the bounds of the non-transparent area", "Gets an iterator to the EJB descriptors for an EJB implementation class\n\n@param beanClass The EJB class\n@return An iterator", "Use this API to fetch appflowpolicy_binding resource of given name .", "Cosine interpolation.\n\n@param x1 X1 Value.\n@param x2 X2 Value.\n@param a Value.\n@return Value.", "Print the common class node's properties", "Release transaction that was acquired in a thread with specified permits.", "Helper method called recursively to list child tasks.\n\n@param task task whose children are to be displayed\n@param indent whitespace used to indent hierarchy levels", "Get an extent aware RsIterator based on the Query\n\n@param query\n@param cld\n@param factory the Factory for the RsIterator\n@return OJBIterator", "Use this API to fetch appfwprofile_xmlvalidationurl_binding resources of given name ." ]
public static base_responses add(nitro_service client, vpath resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { vpath addresources[] = new vpath[resources.length]; for (int i=0;i<resources.length;i++){ addresources[i] = new vpath(); addresources[i].name = resources[i].name; addresources[i].destip = resources[i].destip; addresources[i].encapmode = resources[i].encapmode; } result = add_bulk_request(client, addresources); } return result; }
[ "Use this API to add vpath resources." ]
[ "Converts a sequence of Java characters to a sequence of unicode code points.\n\n@return the number of code points written to the destination buffer", "Start the chain of execution running.\n\n@throws IllegalStateException\nif the chain of execution has already been started.", "Inserts a Serializable value into the mapping of the underlying Bundle, replacing any existing\nvalue for the given key. Either key or value may be null.\n\n@param key a String, or null\n@param value a Serializable object, or null\n@return this bundler instance to chain method calls", "Core implementation of matchPath. It is isolated so that it can be called\nfrom TokenizedPattern.", "Gets whether this registration has an alternative wildcard registration", "Create a patch element for the rollback patch.\n\n@param entry the entry\n@return the new patch element", "Gets a list of any comments on this file.\n\n@return a list of comments on this file.", "Validate an injection point\n\n@param ij the injection point to validate\n@param beanManager the bean manager", "Shrinks the alert message body so that the resulting payload\nmessage fits within the passed expected payload length.\n\nThis method performs best-effort approach, and its behavior\nis unspecified when handling alerts where the payload\nwithout body is already longer than the permitted size, or\nif the break occurs within word.\n\n@param payloadLength the expected max size of the payload\n@param postfix for the truncated body, e.g. \"...\"\n@return this" ]
public static final void setSize(UIObject o, Rect size) { o.setPixelSize(size.w, size.h); }
[ "Sets the size of a UIObject" ]
[ "Adds OPT_X | OPT_HEX option to OptionParser, with multiple arguments.\n\n@param parser OptionParser to be modified\n@param required Tells if this option is required or optional", "Determines the mutator method name based on a field name.\n\n@param fieldName\na field name\n@return the resulting method name", "Adds format information to eval.", "Prioritises the list of step candidates that match a given step.\n\n@param stepAsText\nthe textual step to match\n@param candidates\nthe List of StepCandidate\n@return The prioritised list according to the\n{@link PrioritisingStrategy}.", "Remove the given pair into the map.\n\n<p>\nIf the given key is inside the map, but is not mapped to the given value, the\nmap will not be changed.\n</p>\n\n@param <K> type of the map keys.\n@param <V> type of the map values.\n@param map the map to update.\n@param entry the entry (key, value) to remove from the map.\n@return {@code true} if the pair was removed.\n@since 2.15", "Obtains a local date in Coptic calendar system from the\nproleptic-year, month-of-year and day-of-month fields.\n\n@param prolepticYear the proleptic-year\n@param month the month-of-year\n@param dayOfMonth the day-of-month\n@return the Coptic local date, not null\n@throws DateTimeException if unable to create the date", "Check if zone count policy is satisfied\n\n@return whether zone is satisfied", "Resets the generator state.", "This method writes a resource's availability table.\n\n@param xml MSPDI resource\n@param mpx MPXJ resource" ]
public void addRequiredBundles(String... requiredBundles) { String oldBundles = mainAttributes.get(REQUIRE_BUNDLE); if (oldBundles == null) oldBundles = ""; BundleList oldResultList = BundleList.fromInput(oldBundles, newline); BundleList resultList = BundleList.fromInput(oldBundles, newline); for (String bundle : requiredBundles) { Bundle newBundle = Bundle.fromInput(bundle); if (name != null && name.equals(newBundle.getName())) continue; resultList.mergeInto(newBundle); } String result = resultList.toString(); boolean changed = !oldResultList.toString().equals(result); modified |= changed; if (changed) mainAttributes.put(REQUIRE_BUNDLE, result); }
[ "Add the list with given bundles to the \"Require-Bundle\" main attribute.\n\n@param requiredBundles The list of all bundles to add." ]
[ "Make a timestamp value given a date.", "Send a track metadata update announcement to all registered listeners.", "Process the layers.conf file.\n\n@param repoRoot the root\n@return the layers conf\n@throws java.io.IOException", "Method used to create missing timephased data.\n\n@param file project file\n@param assignment resource assignment\n@param timephasedPlanned planned timephased data\n@param timephasedComplete complete timephased data", "Sets the given value on an the receivers's accessible field with the given name.\n\n@param receiver the receiver, never <code>null</code>\n@param fieldName the field's name, never <code>null</code>\n@param value the value to set\n\n@throws NoSuchFieldException see {@link Class#getField(String)}\n@throws SecurityException see {@link Class#getField(String)}\n@throws IllegalAccessException see {@link Field#set(Object, Object)}\n@throws IllegalArgumentException see {@link Field#set(Object, Object)}", "Validate that the Unique IDs for the entities in this container are valid for MS Project.\nIf they are not valid, i.e one or more of them are too large, renumber them.", "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", "Returns a string that represents a valid Solr query range.\n\n@param from Lower bound of the query range.\n@param to Upper bound of the query range.\n@return String that represents a Solr query range.", "Deletes a template.\n\n@param id id of the template to delete.\n@return {@link Response}\n\n@throws RequestException if request to transloadit server fails.\n@throws LocalOperationException if something goes wrong while running non-http operations." ]
private double goldenMean(double a, double b) { if (geometric) { return a * Math.pow(b / a, GOLDEN_SECTION); } else { return a + (b - a) * GOLDEN_SECTION; } }
[ "The point that is the GOLDEN_SECTION along the way from a to b.\na may be less or greater than b, you find the point 60-odd percent\nof the way from a to b.\n\n@param a Interval minimum\n@param b Interval maximum\n@return The GOLDEN_SECTION along the way from a to b." ]
[ "Executes the API action \"wbsearchentity\" for the given parameters.\nSearches for entities using labels and aliases. Returns a label and\ndescription for the entity in the user language if possible. Returns\ndetails of the matched term. The matched term text is also present in the\naliases key if different from the display label.\n\n<p>\nSee the <a href=\n\"https://www.wikidata.org/w/api.php?action=help&modules=wbsearchentity\"\n>online API documentation</a> for further information.\n<p>\n\n@param search\n(required) search for this text\n@param language\n(required) search in this language\n@param strictLanguage\n(optional) whether to disable language fallback\n@param type\n(optional) search for this type of entity\nOne of the following values: item, property\nDefault: item\n@param limit\n(optional) maximal number of results\nno more than 50 (500 for bots) allowed\nDefault: 7\n@param offset\n(optional) offset where to continue a search\nDefault: 0\nthis parameter is called \"continue\" in the API (which is a Java keyword)\n\n@return list of matching entities retrieved via the API URL\n@throws MediaWikiApiErrorException\nif the API returns an error\n@throws IllegalArgumentException\nif the given combination of parameters does not make sense", "Use this API to fetch a vpnglobal_binding resource .", "Determines if the queue identified by the given key is a delayed queue.\n\n@param jedis\nconnection to Redis\n@param key\nthe key that identifies a queue\n@return true if the key identifies a delayed queue, false otherwise", "Gets all checked widgets in the group\n@return list of checked widgets", "Bessel function of order n.\n\n@param n Order.\n@param x Value.\n@return J value.", "Checks the widget by index\n@param checkableIndex The index is in the range from 0 to size -1, where size is the number of\nCheckable widgets in the group. It does not take into account any\nnon-Checkable widgets added to the group widget.\n@return {@code True} if {@code checkableWidget} is a child of this {@code CheckableGroup} and\nwas not already checked; {@code false} otherwise.", "Add a single header key-value pair. If one with the name already exists,\nboth stay in the header map.\n\n@param name the name of the header.\n@param value the value of the header.\n@return the interceptor instance itself.", "Helper to format term updates as expected by the Wikibase API\n@param updates\nplanned updates for the type of term\n@return map ready to be serialized as JSON by Jackson", "Gets the site label for the entry.\n\n@param cms the current CMS context\n@param entry the entry\n@return the site label for the entry" ]
private void writeResourceExtendedAttributes(Project.Resources.Resource xml, Resource mpx) { Project.Resources.Resource.ExtendedAttribute attrib; List<Project.Resources.Resource.ExtendedAttribute> extendedAttributes = xml.getExtendedAttribute(); for (ResourceField mpxFieldID : getAllResourceExtendedAttributes()) { Object value = mpx.getCachedValue(mpxFieldID); if (FieldTypeHelper.valueIsNotDefault(mpxFieldID, value)) { m_extendedAttributesInUse.add(mpxFieldID); Integer xmlFieldID = Integer.valueOf(MPPResourceField.getID(mpxFieldID) | MPPResourceField.RESOURCE_FIELD_BASE); attrib = m_factory.createProjectResourcesResourceExtendedAttribute(); extendedAttributes.add(attrib); attrib.setFieldID(xmlFieldID.toString()); attrib.setValue(DatatypeConverter.printExtendedAttribute(this, value, mpxFieldID.getDataType())); attrib.setDurationFormat(printExtendedAttributeDurationFormat(value)); } } }
[ "This method writes extended attribute data for a resource.\n\n@param xml MSPDI resource\n@param mpx MPXJ resource" ]
[ "Lists the buildpacks installed on an app\n\n@param appName See {@link #listApps} for a list of apps that can be used.", "Read the name of a table and prepare to populate it with column data.\n\n@param startIndex start of the block\n@param blockLength length of the block", "Creates an attachment from a given array of bytes.\nThe bytes will be Base64 encoded.\n@throws java.lang.IllegalArgumentException if mediaType is not binary", "Changes the index buffer associated with this mesh.\n@param ibuf new index buffer to use\n@see #setIndices(int[])\n@see #getIndexBuffer()\n@see #getIntIndices()", "Displays a sample model for the report request.\n@return A string describing the structure of a certain report execution", "Use this API to delete cacheselector of given name.", "Parse work units.\n\n@param value work units value\n@return TimeUnit instance", "Performs a partial BFS on model until the search frontier reaches the desired bootstrap size\n\n@param min the desired bootstrap size\n@return a list of found PossibleState\n@throws ModelException if the desired bootstrap can not be reached", "Add a user by ID to the list of people to notify when the retention period is ending.\n@param userID The ID of the user to add to the list." ]
static void apply(final String patchId, final Collection<ContentModification> modifications, final PatchEntry patchEntry, final ContentItemFilter filter) { for (final ContentModification modification : modifications) { final ContentItem item = modification.getItem(); // Check if we accept the item if (!filter.accepts(item)) { continue; } final Location location = new Location(item); final ContentEntry contentEntry = new ContentEntry(patchId, modification); ContentTaskDefinition definition = patchEntry.get(location); if (definition == null) { definition = new ContentTaskDefinition(location, contentEntry, false); patchEntry.put(location, definition); } else { definition.setTarget(contentEntry); } } }
[ "Apply modifications to a content task definition.\n\n@param patchId the patch id\n@param modifications the modifications\n@param definitions the task definitions\n@param filter the content item filter" ]
[ "Performs a variety of tests to see if the provided matrix is a valid\ncovariance matrix.\n\n@return 0 = is valid 1 = failed positive diagonal, 2 = failed on symmetry, 2 = failed on positive definite", "Finds the maximum abs in each column of A and stores it into values\n@param A (Input) Matrix\n@param values (Output) storage for column max abs", "Set the diffuse light intensity.\n\nThis designates the color of the diffuse reflection.\nIt is multiplied by the material diffuse color to derive\nthe hue of the diffuse reflection for that material.\nThe built-in phong shader {@link GVRPhongShader} uses a {@code vec4} uniform named\n{@code diffuse_intensity} to control the intensity of diffuse light reflected.\n\n@param r red component (0 to 1)\n@param g green component (0 to 1)\n@param b blue component (0 to 1)\n@param a alpha component (0 to 1)", "Compares the StoreVersionManager's internal state with the content on the file-system\nof the rootDir provided at construction time.\n\nTODO: If the StoreVersionManager supports non-RO stores in the future,\nwe should move some of the ReadOnlyUtils functions below to another Utils class.", "Set the String-representation of size.\n\nLike: Square, Thumbnail, Small, Medium, Large, Original.\n\n@param label", "Creates a remove operation.\n\n@param address the address for the operation\n@param recursive {@code true} if the remove should be recursive, otherwise {@code false}\n\n@return the operation", "Returns the Class object of the class specified in the OJB.properties\nfile for the \"PersistentFieldClass\" property.\n\n@return Class The Class object of the \"PersistentFieldClass\" class\nspecified in the OJB.properties file.", "A specific, existing project can be updated by making a PUT request on the\nURL for that project. Only the fields provided in the `data` block will be\nupdated; any unspecified fields will remain unchanged.\n\nWhen using this method, it is best to specify only those fields you wish\nto change, or else you may overwrite changes made by another user since\nyou last retrieved the task.\n\nReturns the complete updated project record.\n\n@param project The project to update.\n@return Request object", "Allocates a database connection.\n\n@throws SQLException" ]
@Override @SuppressWarnings("unchecked") public ChronoLocalDateTime<BritishCutoverDate> localDateTime(TemporalAccessor temporal) { return (ChronoLocalDateTime<BritishCutoverDate>) super.localDateTime(temporal); }
[ "Obtains a British Cutover local date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the British Cutover local date-time, not null\n@throws DateTimeException if unable to create the date-time" ]
[ "Called on mouse down in the caption area, begins the dragging loop by\nturning on event capture.\n\n@see DOM#setCapture\n@see #continueDragging\n@param event the mouse down event that triggered dragging", "Add precedence -10 because we need that ContainerRegistry is available in the Arquillian scope.", "Verify store definitions are congruent with cluster definition.\n\n@param cluster\n@param storeDefs", "A method for determining from and to information when using this IntRange to index an aggregate object of the specified size.\nNormally only used internally within Groovy but useful if adding range indexing support for your own aggregates.\n\n@param size the size of the aggregate being indexed\n@return the calculated range information (with 1 added to the to value, ready for providing to subList", "Add another store destination to an existing streaming session\n\n\n@param store the name of the store to stream to", "Similar to masking, checks that the range resulting from the bitwise or is contiguous.\n\n@param maskValue\n@param segmentPrefixLength\n@return\n@throws PrefixLenException", "Sets the alias. Empty String is regarded as null.\n@param alias The alias to set", "Adds a row to the internal storage, indexed by primary key.\n\n@param uniqueID unique ID of the row\n@param map row data as a simpe map", "Returns an iterator of all direct and indirect extents of this class.\n\n@return The extents iterator" ]
public List<Dependency> getModuleAncestors(final String moduleName, final String moduleVersion) throws GrapesCommunicationException { final Client client = getClient(); final WebResource resource = client.resource(serverURL).path(RequestUtils.getArtifactAncestors(moduleName, moduleVersion)); final ClientResponse response = resource.queryParam(ServerAPI.SCOPE_COMPILE_PARAM, "true") .queryParam(ServerAPI.SCOPE_PROVIDED_PARAM, "true") .queryParam(ServerAPI.SCOPE_RUNTIME_PARAM, "true") .queryParam(ServerAPI.SCOPE_TEST_PARAM, "true") .accept(MediaType.APPLICATION_JSON).get(ClientResponse.class); client.destroy(); if(ClientResponse.Status.OK.getStatusCode() != response.getStatus()){ final String message = String.format(FAILED_TO_GET_MODULE, "get module ancestors", moduleName, moduleVersion); if(LOG.isErrorEnabled()) { LOG.error(String.format(HTTP_STATUS_TEMPLATE_MSG, message, response.getStatus())); } throw new GrapesCommunicationException(message, response.getStatus()); } return response.getEntity(new GenericType<List<Dependency>>(){}); }
[ "Return the list of module ancestors\n\n@param moduleName\n@param moduleVersion\n@return List<Dependency>\n@throws GrapesCommunicationException" ]
[ "Use this API to fetch bridgegroup_vlan_binding resources of given name .", "Convert a Planner date-time value into a Java date.\n\n20070222T080000Z\n\n@param value Planner date-time\n@return Java Date instance", "Returns all known Java installations\n\n@return a map from the version strings to their respective paths of the Java installations.", "Given counters of true positives, false positives, and false\nnegatives, prints out precision, recall, and f1 for each key.", "Builder method for specifying the stack an app should be created on.\n@param stack Stack to create the app on.\n@return A copy of the {@link App}", "Helper. Current transaction is committed in some cases.", "Use this API to clear nssimpleacl.", "Gets the explorer file entry options.\n\n@return the explorer file entry options", "Ask the specified player for the specified waveform detail from the specified media slot, first checking if we\nhave a cached copy.\n\n@param dataReference uniquely identifies the desired waveform detail\n\n@return the waveform detail, if it was found, or {@code null}\n\n@throws IllegalStateException if the WaveformFinder is not running" ]
public void releaseDbResources() { Iterator it = m_rsIterators.iterator(); while (it.hasNext()) { ((OJBIterator) it.next()).releaseDbResources(); } }
[ "delegate to each contained OJBIterator and release\nits resources." ]
[ "return a HashMap with all properties, name as key, value as value\n@return the properties", "Removes double-quotes from around a string\n@param str\n@return", "Checks if the child is currently in ViewPort\n@param dataIndex child index\n@return true if the child is in viewport, false - otherwise", "Disallow the job type from being executed.\n@param jobType the job type to disallow", "This method is used by JNI, do not call or modify.\n\n@param type the type\n@param number the number", "Main method, handles all the setup tasks for DataGenerator a user would normally do themselves\n\n@param args command line arguments", "Position the child inside the layout based on the offset and axis-s factors\n@param dataIndex data index", "Update the background color of the mBgCircle image view.", "Retrieve the currently cached value for the given document." ]
public String objectToString(T object) { StringBuilder sb = new StringBuilder(64); sb.append(object.getClass().getSimpleName()); for (FieldType fieldType : fieldTypes) { sb.append(' ').append(fieldType.getColumnName()).append('='); try { sb.append(fieldType.extractJavaFieldValue(object)); } catch (Exception e) { throw new IllegalStateException("Could not generate toString of field " + fieldType, e); } } return sb.toString(); }
[ "Return a string representation of the object." ]
[ "Indicates that all of the packages within an archive are \"known\" by the package mapper. Generally\nthis indicates that the archive does not contain customer code.", "Use this API to fetch vpnclientlessaccesspolicy resource of given name .", "Get a store definition from the given list of store definitions\n\n@param list A list of store definitions\n@param name The name of the store\n@return The store definition", "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", "Signal that this thread will not log any more messages in the multithreaded\nenvironment", "Convert an array of bytes into an array of ints. 4 bytes from the\ninput data map to a single int in the output data.\n@param bytes The data to read from.\n@return An array of 32-bit integers constructed from the data.\n@since 1.1", "Function to add a new Store to the Metadata store. This involves\n\n1. Create a new entry in the ConfigurationStorageEngine for STORES.\n\n2. Update the metadata cache.\n\n3. Re-create the 'stores.xml' key\n\n@param storeDef defines the new store to be created", "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", "Execute our refresh query statement and then update all of the fields in data with the fields from the result.\n\n@return 1 if we found the object in the table by id or 0 if not." ]
public static String decodeUrl(String stringToDecode) { try { return URLDecoder.decode(stringToDecode, "UTF-8"); } catch (UnsupportedEncodingException e1) { throw new RuntimeException(e1); } }
[ "URL-Decodes a given string using UTF-8. No UnsupportedEncodingException to handle as it is dealt with in this\nmethod." ]
[ "Build query string.\n@return Query string or null if query string contains no parameters at all.", "Process a module or bundle root.\n\n@param root the root\n@param layers the processed layers\n@param setter the bundle or module path setter\n@throws IOException", "Add BoxMetaDataFilter to the JsonArray boxMetadataFilterRequestArray.\n@param @param bmf accepts a filter that has templateKey, scope, and filters populated.\n@return JsonArray that is formated Json request", "Saves the favorites.\n\n@param favorites the list of favorites to save\n@throws CmsException if something goes wrong", "Validates operations against their description providers\n\n@param operations The operations to validate\n@throws IllegalArgumentException if any operation is not valid", "return a generic Statement for the given ClassDescriptor", "add a Component to this Worker. After the call dragging is enabled for this\nComponent.\n@param c the Component to register", "Returns the name of the bone.\n\n@return the name", "Tells you if the expression is a predefined constant like TRUE or FALSE.\n@param expression\nany expression\n@return\nas described" ]
public void setModelByInputFileStream(InputStream inputFileStream) { try { this.model = SCXMLParser.parse(new InputSource(inputFileStream), null, customActionsFromTagExtensions()); this.setStateMachine(this.model); } catch (IOException | SAXException | ModelException e) { e.printStackTrace(); } }
[ "Sets the SCXML model with an InputStream\n\n@param inputFileStream the model input stream" ]
[ "Adds all direct subtypes to the given list.\n\n@param type The type for which to determine the direct subtypes\n@param subTypes The list to receive the subtypes", "Write to a context. Uses NullWritable for key so that only value of output string is ultimately written\n\n@param cr the DataPipe to write to", "This method is called to format a constraint type.\n\n@param type constraint type\n@return formatted constraint type", "Add a console pipeline to the Redwood handler tree,\nprinting to stderr.\nCalling this multiple times will result in messages being printed\nmultiple times.\n@return this", "Closes a Closeable and swallows any exceptions that might occur in the\nprocess.\n\n@param closeable", "Performs an efficient update of each columns' norm", "This function returns the first external IP address encountered\n\n@return IP address or null\n@throws Exception", "very big duct tape", "Creates the DAO if we have config information cached and caches the DAO." ]
protected VelocityContext createContext() { VelocityContext context = new VelocityContext(); context.put(META_KEY, META); context.put(UTILS_KEY, UTILS); context.put(MESSAGES_KEY, MESSAGES); return context; }
[ "Helper method that creates a Velocity context and initialises it\nwith a reference to the ReportNG utils, report metadata and localised messages.\n@return An initialised Velocity context." ]
[ "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", "Use this API to fetch statistics of streamidentifier_stats resource of given name .", "Fetch all relevant attributes from the backing store and copy instances which are not present in the local bean store.", "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> }", "Adds a corporate groupId to an organization\n\n@param organizationId String\n@param corporateGroupId String", "Use this API to disable clusterinstance resources of given names.", "Send a kill signal to all running instances and return as soon as the signal is sent.", "Configures the log context for the server and returns the configured log context.\n\n@param logDir the logging directory, from jboss.server|domain.log.dir standalone default {@code $JBOSS_HOME/standalone/log}\n@param configDir the configuration directory from jboss.server|domain.config.dir, standalone default {@code $JBOSS_HOME/standalone/configuration}\n@param defaultLogFileName the name of the log file to pass to {@code org.jboss.boot.log.file}\n@param ctx the command context used to report errors to\n\n@return the configured log context", "Verify JUnit presence and version." ]
public static double elementMax( DMatrixSparseCSC A ) { if( A.nz_length == 0) return 0; // if every element is assigned a value then the first element can be a max. // Otherwise zero needs to be considered double max = A.isFull() ? A.nz_values[0] : 0; for(int i = 0; i < A.nz_length; i++ ) { double val = A.nz_values[i]; if( val > max ) { max = val; } } return max; }
[ "Returns the value of the element with the largest value\n@param A (Input) Matrix. Not modified.\n@return scalar" ]
[ "Use this API to fetch vpnclientlessaccesspolicy resource of given name .", "Use this API to count nstrafficdomain_bridgegroup_binding resources configued on NetScaler.", "Returns the entry associated with the given key.\n\n@param key the key of the entry to look up\n@return the entry associated with that key, or null\nif the key is not in this map", "We have obtained album art for a device, so store it and alert any listeners.\n\n@param update the update which caused us to retrieve this art\n@param art the album art which we retrieved", "Write a boolean field to the JSON file.\n\n@param fieldName field name\n@param value field value", "Take a string and make it an iterable ContentStream", "Construct new path by replacing file directory part. No\nfiles are actually modified.\n@param file path to move\n@param target new path directory", "Send message to all connections connected to the same URL of this context\n\n@param message the message to be sent\n@param excludeSelf whether the connection of this context should be sent to\n@return this context", "Calculate the duration percent complete.\n\n@param row task data\n@return percent complete" ]
public String getRepoKey() { String repoKey; if (isDynamicMode()) { repoKey = keyFromText; } else { repoKey = keyFromSelect; } return repoKey; }
[ "Used to get the current repository key\n@return keyFromText or keyFromSelect reflected by the dynamicMode flag" ]
[ "Fills the Boyer Moore \"bad character array\" for the given pattern", "Compiles the allowable actions for a file or folder.\n\n@param cms the current CMS context\n@param file the resource for which we want the allowable actions\n\n@return the allowable actions for the given resource", "Obtain the name of the caller, most likely a user but could also be a remote process.\n\n@return The name of the caller.", "Use this API to fetch all the sslparameter resources that are configured on netscaler.", "Closes the output. Should be called after the JSON serialization was\nfinished.\n\n@throws IOException\nif there was a problem closing the output", "Get list of asynchronous operations on this node. By default, only the\npending operations are returned.\n\n@param showCompleted Show completed operations\n@return A list of operation ids.", "Use this API to add snmpmanager resources.", "todo move to commonops", "Post boolean flag \"DO_NOT_USE\" to an artifact\n\n@param gavc\n@param doNotUse\n@param user\n@param password\n@throws GrapesCommunicationException" ]
public List<String> deviceTypes() { Integer count = json().size(DEVICE_FAMILIES); List<String> deviceTypes = new ArrayList<String>(count); for(int i = 0 ; i < count ; i++) { String familyNumber = json().stringValue(DEVICE_FAMILIES, i); if(familyNumber.equals("1")) deviceTypes.add("iPhone"); if(familyNumber.equals("2")) deviceTypes.add("iPad"); } return deviceTypes; }
[ "The list of device types on which this application can run." ]
[ "get TypeSignature given the signature\n\n@param typeSignature\n@param useInternalFormFullyQualifiedName\nif true, fqn in parameterizedTypeSignature must be in the form\n'java/lang/Thread'. If false fqn must be of the form\n'java.lang.Thread'\n@return", "Resolves current full path with .yml and .yaml extensions\n\n@param fullpath\nwithout extension.\n\n@return Path of existing definition or null", "Used to NOT the argument clause specified.", "Launches the client with the specified parameters.\n\n@param args\ncommand line parameters\n@throws ParseException\n@throws IOException", "Parse a list of Photos from given Element.\n\n@param photosElement\n@return PhotoList", "Determine the enum value corresponding to the track source slot found in the packet.\n\n@return the proper value", "Use this API to delete locationfile.", "Use this API to fetch cachecontentgroup resource of given name .", "Use this API to unset the properties of csparameter resource.\nProperties that need to be unset are specified in args array." ]
public void forAllExtents(String template, Properties attributes) throws XDocletException { for (Iterator it = _curClassDef.getExtentClasses(); it.hasNext(); ) { _curExtent = (ClassDescriptorDef)it.next(); generate(template); } _curExtent = null; }
[ "Processes the template for all extents of the current class.\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\"" ]
[ "Gets an exception reporting an unexpected XML element.\n\n@param reader a reference to the stream reader.\n@return the constructed {@link javax.xml.stream.XMLStreamException}.", "Checks constraints on this model.\n\n@param checkLevel The amount of checks to perform\n@throws ConstraintException If a constraint has been violated", "Read an int from an input stream.\n\n@param is input stream\n@return int value", "Add UDFType objects to a PM XML file.\n\n@author kmahan\n@date 2014-09-24\n@author lsong\n@date 2015-7-24", "Returns a presentable version of the given PTB-tokenized text.\nPTB tokenization splits up punctuation and does various other things\nthat makes simply joining the tokens with spaces look bad. So join\nthe tokens with space and run it through this method to produce nice\nlooking text. It's not perfect, but it works pretty well.\n\n@param ptbText A String in PTB3-escaped form\n@return An approximation to the original String", "Finish a state transition from a notification.\n\n@param current\n@param next", "Extract child task data.\n\n@param task MPXJ task\n@param row Synchro task data", "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", "Click no children of the specified parent element.\n\n@param tagName The tag name of which no children should be clicked.\n@return The builder to append more options." ]
private void handleUpdate(final CdjStatus update) { // First see if any metadata caches need evicting or mount sets need updating. if (update.isLocalUsbEmpty()) { final SlotReference slot = SlotReference.getSlotReference(update.getDeviceNumber(), CdjStatus.TrackSourceSlot.USB_SLOT); detachMetadataCache(slot); flushHotCacheSlot(slot); removeMount(slot); } else if (update.isLocalUsbLoaded()) { recordMount(SlotReference.getSlotReference(update.getDeviceNumber(), CdjStatus.TrackSourceSlot.USB_SLOT)); } if (update.isLocalSdEmpty()) { final SlotReference slot = SlotReference.getSlotReference(update.getDeviceNumber(), CdjStatus.TrackSourceSlot.SD_SLOT); detachMetadataCache(slot); flushHotCacheSlot(slot); removeMount(slot); } else if (update.isLocalSdLoaded()){ recordMount(SlotReference.getSlotReference(update.getDeviceNumber(), CdjStatus.TrackSourceSlot.SD_SLOT)); } if (update.isDiscSlotEmpty()) { removeMount(SlotReference.getSlotReference(update.getDeviceNumber(), CdjStatus.TrackSourceSlot.CD_SLOT)); } else { recordMount(SlotReference.getSlotReference(update.getDeviceNumber(), CdjStatus.TrackSourceSlot.CD_SLOT)); } // Now see if a track has changed that needs new metadata. if (update.getTrackType() == CdjStatus.TrackType.UNKNOWN || update.getTrackType() == CdjStatus.TrackType.NO_TRACK || update.getTrackSourceSlot() == CdjStatus.TrackSourceSlot.NO_TRACK || update.getTrackSourceSlot() == CdjStatus.TrackSourceSlot.UNKNOWN || update.getRekordboxId() == 0) { // We no longer have metadata for this device. clearDeck(update); } else { // We can offer metadata for this device; check if we already looked up this track. final TrackMetadata lastMetadata = hotCache.get(DeckReference.getDeckReference(update.getDeviceNumber(), 0)); final DataReference trackReference = new DataReference(update.getTrackSourcePlayer(), update.getTrackSourceSlot(), update.getRekordboxId()); if (lastMetadata == null || !lastMetadata.trackReference.equals(trackReference)) { // We have something new! // First see if we can find the new track in the hot cache as a hot cue for (TrackMetadata cached : hotCache.values()) { if (cached.trackReference.equals(trackReference)) { // Found a hot cue hit, use it. updateMetadata(update, cached); return; } } // Not in the hot cache so try actually retrieving it. if (activeRequests.add(update.getTrackSourcePlayer())) { // We had to make sure we were not already asking for this track. clearDeck(update); // We won't know what it is until our request completes. new Thread(new Runnable() { @Override public void run() { try { TrackMetadata data = requestMetadataInternal(trackReference, update.getTrackType(), true); if (data != null) { updateMetadata(update, data); } } catch (Exception e) { logger.warn("Problem requesting track metadata from update" + update, e); } finally { activeRequests.remove(update.getTrackSourcePlayer()); } } }, "MetadataFinder metadata request").start(); } } } }
[ "Process an update packet from one of the CDJs. See if it has a valid track loaded; if not, clear any\nmetadata we had stored for that player. If so, see if it is the same track we already know about; if not,\nrequest the metadata associated with that track.\n\nAlso clears out any metadata caches that were attached for slots that no longer have media mounted in them,\nand updates the sets of which players have media mounted in which slots.\n\nIf any of these reflect a change in state, any registered listeners will be informed.\n\n@param update an update packet we received from a CDJ" ]
[ "Physically close off the internal connection.\n@param conn", "Finish the oauth flow after the user was redirected back.\n\n@param code\nCode returned by the Eve Online SSO\n@param state\nThis should be some secret to prevent XRSF see\ngetAuthorizationUri\n@throws net.troja.eve.esi.ApiException", "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.", "Retrieves the timephased breakdown of the planned overtime work for this\nresource assignment.\n\n@return timephased planned work", "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.", "todo move to commonops", "Enables a dark shadow for this CircularImageView.\nIf the radius is set to 0, the shadow is removed.\n@param radius Radius for the shadow to extend to.\n@param dx Horizontal shadow offset.\n@param dy Vertical shadow offset.\n@param color The color of the shadow to apply.", "Returns whether this represents a valid host name or address format.\n@return", "Gets the txinfo cache weight\n\n@param conf The FluoConfiguration\n@return The size of the cache value from the property value {@value #TX_INFO_CACHE_WEIGHT} if\nit is set, else the value of the default value {@value #TX_INFO_CACHE_WEIGHT_DEFAULT}" ]
public static base_responses add(nitro_service client, nspbr6 resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { nspbr6 addresources[] = new nspbr6[resources.length]; for (int i=0;i<resources.length;i++){ addresources[i] = new nspbr6(); addresources[i].name = resources[i].name; addresources[i].td = resources[i].td; addresources[i].action = resources[i].action; addresources[i].srcipv6 = resources[i].srcipv6; addresources[i].srcipop = resources[i].srcipop; addresources[i].srcipv6val = resources[i].srcipv6val; addresources[i].srcport = resources[i].srcport; addresources[i].srcportop = resources[i].srcportop; addresources[i].srcportval = resources[i].srcportval; addresources[i].destipv6 = resources[i].destipv6; addresources[i].destipop = resources[i].destipop; addresources[i].destipv6val = resources[i].destipv6val; addresources[i].destport = resources[i].destport; addresources[i].destportop = resources[i].destportop; addresources[i].destportval = resources[i].destportval; addresources[i].srcmac = resources[i].srcmac; addresources[i].protocol = resources[i].protocol; addresources[i].protocolnumber = resources[i].protocolnumber; addresources[i].vlan = resources[i].vlan; addresources[i].Interface = resources[i].Interface; addresources[i].priority = resources[i].priority; addresources[i].state = resources[i].state; addresources[i].msr = resources[i].msr; addresources[i].monitor = resources[i].monitor; addresources[i].nexthop = resources[i].nexthop; addresources[i].nexthopval = resources[i].nexthopval; addresources[i].nexthopvlan = resources[i].nexthopvlan; } result = add_bulk_request(client, addresources); } return result; }
[ "Use this API to add nspbr6 resources." ]
[ "Performs an inline lower Cholesky decomposition on an inner row-major matrix. Only\nthe lower triangular portion of the matrix is read or written to.\n\n@param T Array containing an inner row-major matrix. Modified.\n@param indexT First index of the inner row-major matrix.\n@param n Number of rows and columns of the matrix.\n@return If the decomposition succeeded.", "Put a new value in map.\n\n@param key id of the value for looking up.\n@param value the value.", "Builds the mapping table.", "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.", "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).", "Returns the count of total number of unread inbox messages for the user\n@return int - count of all unread messages", "This is the code that needs to be executed before either eye is drawn.\n\n@return Current time, from {@link GVRTime#getCurrentTime()}", "Converts a tab delimited string into an object with given fields\nRequires the object has setXxx functions for the specified fields\n\n@param objClass Class of object to be created\n@param str string to convert\n@param delimiterRegex delimiter regular expression\n@param fieldNames fieldnames\n@param <T> type to return\n@return Object created from string", "bootstrap method for method calls with \"this\" as receiver\n@deprecated since Groovy 2.1.0" ]
public X509Certificate getMappedCertificateForHostname(String hostname) throws CertificateParsingException, InvalidKeyException, CertificateExpiredException, CertificateNotYetValidException, SignatureException, CertificateException, NoSuchAlgorithmException, NoSuchProviderException, KeyStoreException, UnrecoverableKeyException { String subject = getSubjectForHostname(hostname); String thumbprint = _subjectMap.get(subject); if(thumbprint == null) { KeyPair kp = getRSAKeyPair(); X509Certificate newCert = CertificateCreator.generateStdSSLServerCertificate(kp.getPublic(), getSigningCert(), getSigningPrivateKey(), subject); addCertAndPrivateKey(hostname, newCert, kp.getPrivate()); thumbprint = ThumbprintUtil.getThumbprint(newCert); _subjectMap.put(subject, thumbprint); if(persistImmediately) { persist(); } return newCert; } return getCertificateByAlias(thumbprint); }
[ "This method returns the mapped certificate for a hostname, or generates a \"standard\"\nSSL server certificate issued by the CA to the supplied subject if no mapping has been\ncreated. This is not a true duplication, just a shortcut method\nthat is adequate for web browsers.\n\n@param hostname\n@return\n@throws CertificateParsingException\n@throws InvalidKeyException\n@throws CertificateExpiredException\n@throws CertificateNotYetValidException\n@throws SignatureException\n@throws CertificateException\n@throws NoSuchAlgorithmException\n@throws NoSuchProviderException\n@throws KeyStoreException\n@throws UnrecoverableKeyException" ]
[ "Gets the path used for the results of XSLT Transforms.", "Finish configuration.", "Retrieves the pro-rata work carried out on a given day.\n\n@param calendar current calendar\n@param assignment current assignment.\n@return assignment work duration", "Get an InputStream for the original image. Callers must close the stream upon completion.\n\n@deprecated\n@see PhotosInterface#getImageAsStream(Photo, int)\n@return The InputStream\n@throws IOException", "Use this API to unset the properties of gslbsite resource.\nProperties that need to be unset are specified in args array.", "Get the ActivityInterface.\n\n@return The ActivityInterface", "Obtains a Coptic zoned date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the Coptic zoned date-time, not null\n@throws DateTimeException if unable to create the date-time", "Construct a new simple attachment key.\n\n@param valueClass the value class\n@param <T> the attachment type\n@return the new instance", "Use this API to Import appfwsignatures." ]
private FieldDescriptor[] getExtentFieldDescriptors(TableAlias extAlias, FieldDescriptor[] fds) { FieldDescriptor[] result = new FieldDescriptor[fds.length]; for (int i = 0; i < fds.length; i++) { result[i] = extAlias.cld.getFieldDescriptorByName(fds[i].getAttributeName()); } return result; }
[ "Get the FieldDescriptors of the extent based on the FieldDescriptors of the parent." ]
[ "Set the state of an individual day in a weekly recurrence.\n\n@param day Day instance\n@param value true if this day is included in the recurrence", "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.", "Read the domain controller data from an S3 file.\n\n@param directoryName the name of the directory in the bucket that contains the S3 file\n@return the domain controller data", "Add a simple property to the map file.\n\n@param writer xml stream writer\n@param name property name\n@param propertyType property type\n@param readMethod read method name\n@param writeMethod write method name\n@throws XMLStreamException", "Write a project file in SDEF format to an output stream.\n\n@param projectFile ProjectFile instance\n@param out output stream", "Helper method to check that we got the right size packet.\n\n@param packet a packet that has been received\n@param expectedLength the number of bytes we expect it to contain\n@param name the description of the packet in case we need to report issues with the length\n\n@return {@code true} if enough bytes were received to process the packet", "Returns an array of all declared fields in the given class and all\nsuper-classes.", "Reads any exceptions present in the file. This is only used in MSPDI\nfile versions saved by Project 2007 and later.\n\n@param calendar XML calendar\n@param bc MPXJ calendar", "Obtain the profile identifier.\n\n@param profileIdentifier Can be profile ID, or friendly name\n@return\n@throws Exception" ]
private void getMultipleValues(Method method, Object object, Map<String, String> map) { try { int index = 1; while (true) { Object value = filterValue(method.invoke(object, Integer.valueOf(index))); if (value != null) { map.put(getPropertyName(method, index), String.valueOf(value)); } ++index; } } catch (Exception ex) { // Reached the end of the valid indexes } }
[ "Retrieve multiple properties.\n\n@param method method definition\n@param object target object\n@param map parameter values" ]
[ "Determine the relevant pieces of configuration which need to be included when processing the domain model.\n\n@param root the resource root\n@param requiredConfigurationHolder the resolution context\n@param serverConfig the server config\n@param extensionRegistry the extension registry", "Convert gallery name to not found error key.\n@param gallery gallery name for example \"downloadgallery\"\n@return key as string \"ERR_REASON_NO_DOWNLOADGALLERY_0\"", "Resolve the given string using any plugin and the DMR resolve method", "Checks if class is on class path\n@param className of the class to check.\n@return true if class in on class path, false otherwise.", "Checks the given class descriptor for correct object cache setting.\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", "Returns the temporary directory used by java.\n\n@return The temporary directory\n@throws IOException If an io error occurred", "set the textColor of the ColorHolder to a view\n\n@param view", "For creating regular columns\n@return", "Merge another AbstractTransition's states into this object, such that the other AbstractTransition\ncan be discarded.\n\n@param another\n@return true if the merge is successful." ]
public static void registerOgmExternalizers(SerializationConfigurationBuilder cfg) { for ( AdvancedExternalizer<?> advancedExternalizer : ogmExternalizers.values() ) { cfg.addAdvancedExternalizer( advancedExternalizer ); } }
[ "Registers all custom Externalizer implementations that Hibernate OGM needs into an Infinispan CacheManager\nconfiguration.\n\n@see ExternalizerIds\n@param cfg the Serialization section of a GlobalConfiguration builder" ]
[ "Notifies that multiple content items are changed.\n\n@param positionStart the position.\n@param itemCount the item count.", "Create the voldemort key and value from the input Avro record by\nextracting the key and value and map it out for each of the responsible\nvoldemort nodes\n\n\nThe output value is the node_id & partition_id of the responsible node\nfollowed by serialized value", "Sets the quaternion of the keyframe.", "Get a property as a object or throw exception.\n\n@param key the property name", "Create and serialize a WorkerStatus.\n\n@param queue the queue the Job came from\n@param job the Job currently being processed\n@return the JSON representation of a new WorkerStatus\n@throws IOException if there was an error serializing the WorkerStatus", "Specifies an input field to assign a value to. Crawljax first tries to match the found HTML\ninput element's id and then the name attribute.\n\n@param type\nthe type of input field\n@param identification\nthe locator of the input field\n@return an InputField", "Return the NTSC gray level of an RGB value.\n@param rgb1 the input pixel\n@return the gray level (0-255)", "Create a mapping from entity names to entity ID values.", "Reads a string of single byte characters from the input array.\nThis method assumes that the string finishes either at the\nend of the array, or when char zero is encountered.\nReading begins at the supplied offset into the array.\n\n@param data byte array of data\n@param offset offset into the array\n@return string value" ]
public void setSelectionType(MaterialDatePickerType selectionType) { this.selectionType = selectionType; switch (selectionType) { case MONTH_DAY: options.selectMonths = true; break; case YEAR_MONTH_DAY: options.selectYears = yearsToDisplay; options.selectMonths = true; break; case YEAR: options.selectYears = yearsToDisplay; options.selectMonths = false; break; } }
[ "Set the pickers selection type." ]
[ "Search for the first entry in the first database. Use this method for databases configured with no duplicates.\n\n@param txn enclosing transaction\n@param first first key.\n@return null if no entry found, otherwise the value.", "Returns the vertex with given ID framed into given interface.", "Use this API to fetch authenticationvserver_authenticationtacacspolicy_binding resources of given name .", "Use this API to fetch a systemglobal_authenticationldappolicy_binding resources.", "Utility function to zip the content of an entire folder, but not the folder itself.\n@param folder\n@param fileName optional\n@return success or not", "Common method for creating styles.\n\n@param template the template that the map is part of\n@param styleRef the style ref identifying the style\n@param <T> the source type", "Check if the property is part of the identifier of the entity.\n\n@param persister the {@link OgmEntityPersister} of the entity with the property\n@param namesWithoutAlias the path to the property with all the aliases resolved\n@return {@code true} if the property is part of the id, {@code false} otherwise.", "Merges the immutable container types of this Configuration with the given\nConfiguration.\n\nThe resultant immutable container types results will be the union of the two sets of\nimmutable container types. Where the type is found in both\nConfigurations, the result from otherConfiguration will replace the\nexisting result in this Configuration. This replacement behaviour will\noccur for subsequent calls to\n{@link #mergeImmutableContainerTypesFrom(Configuration)} .\n\n@param otherConfiguration - Configuration to merge immutable container types with.", "Get the bytes which represent the payload of this field, without the leading type tag and length header, as\na newly-allocated byte array.\n\n@return a new byte array containing a copy of the bytes this field contains" ]
public static Date min(Date d1, Date d2) { Date result; if (d1 == null) { result = d2; } else if (d2 == null) { result = d1; } else { result = (d1.compareTo(d2) < 0) ? d1 : d2; } return result; }
[ "Returns the earlier of two dates, handling null values. A non-null Date\nis always considered to be earlier than a null Date.\n\n@param d1 Date instance\n@param d2 Date instance\n@return Date earliest date" ]
[ "Factory method to do the setup and transformation of inputs\n\n@param matrix a {@link TestMatrixArtifact} loaded by ProctorLoader\n@param loadResult a {@link ProctorLoadResult} which contains result of validation of test definition\n@param functionMapper a given el {@link FunctionMapper}\n@return constructed Proctor object", "Returns all the pixels for the image\n\n@return an array of pixels for this image", "Use this API to fetch all the responderparam resources that are configured on netscaler.", "Subtract a complex number.\n\n@param z1 Complex Number.\n@param scalar Scalar value.\n@return Returns new ComplexNumber instance containing the subtract of specified complex number with a scalar value.", "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.", "Given a RendererViewHolder passed as argument and a position renders the view using the\nRenderer previously stored into the RendererViewHolder.\n\n@param viewHolder with a Renderer class inside.\n@param position to render.", "Returns true if required properties for MiniFluo are set", "Runs the example program.\n\n@param args\n@throws IOException\nif there was a problem in writing the output file", "Given a rebalance-task info, convert it into the protobuf equivalent\n\n@param stealInfo Rebalance task info\n@return Protobuf equivalent of the same" ]
public Class getRealClass(Object objectOrProxy) { IndirectionHandler handler; if(isNormalOjbProxy(objectOrProxy)) { String msg; try { handler = getIndirectionHandler(objectOrProxy); /* arminw: think we should return the real class */ // return handler.getIdentity().getObjectsTopLevelClass(); return handler.getIdentity().getObjectsRealClass(); } catch(ClassCastException e) { // shouldn't happen but still ... msg = "The InvocationHandler for the provided Proxy was not an instance of " + IndirectionHandler.class.getName(); log.error(msg); throw new PersistenceBrokerException(msg, e); } catch(IllegalArgumentException e) { msg = "Could not retrieve real object for given Proxy: " + objectOrProxy; log.error(msg); throw new PersistenceBrokerException(msg, e); } } else if(isVirtualOjbProxy(objectOrProxy)) { handler = VirtualProxy.getIndirectionHandler((VirtualProxy) objectOrProxy); /* arminw: think we should return the real class */ // return handler.getIdentity().getObjectsTopLevelClass(); return handler.getIdentity().getObjectsRealClass(); } else { return objectOrProxy.getClass(); } }
[ "Get the real Class\n\n@param objectOrProxy\n@return Class" ]
[ "Returns a flag, indicating if search should be performed using a wildcard if the empty query is given.\n@return A flag, indicating if search should be performed using a wildcard if the empty query is given.", "Write an error response.\n\n@param channel the channel\n@param header the request\n@param error the error\n@throws IOException", "Perform the entire sort operation", "Remove all unnecessary comments from a lexer or parser file", "Use this API to add authenticationradiusaction.", "Package-protected method used to initiate operation execution.\n@return the result action", "Converts an integer into a time format.\n\n@param format integer format value\n@return TimeUnit instance", "Processes a row of the sites table and stores the site information found\ntherein.\n\n@param siteRow\nstring serialisation of a sites table row as found in the SQL\ndump", "Use this API to fetch filtered set of authenticationradiusaction resources.\nset the filter parameter values in filtervalue object." ]
private static boolean isAssignableFrom(Type from, GenericArrayType to) { Type toGenericComponentType = to.getGenericComponentType(); if (toGenericComponentType instanceof ParameterizedType) { Type t = from; if (from instanceof GenericArrayType) { t = ((GenericArrayType) from).getGenericComponentType(); } else if (from instanceof Class) { Class<?> classType = (Class<?>) from; while (classType.isArray()) { classType = classType.getComponentType(); } t = classType; } return isAssignableFrom(t, (ParameterizedType) toGenericComponentType, new HashMap<String, Type>()); } // No generic defined on "to"; therefore, return true and let other // checks determine assignability return true; }
[ "Private helper function that performs some assignability checks for the\nprovided GenericArrayType." ]
[ "Checks that the modified features exist.\n\n@param classDef The class 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", "This method writes data for an individual calendar to a PM XML file.\n\n@param mpxj ProjectCalander instance", "Adds OPT_N | OPT_NODE option to OptionParser, with multiple arguments.\n\n@param parser OptionParser to be modified\n@param required Tells if this option is required or optional", "Returns the classDescriptor.\n\n@return ClassDescriptor", "Populates a resource availability table.\n\n@param table resource availability table\n@param data file data", "Get the TagsInterface for working with Flickr Tags.\n\n@return The TagsInterface", "Drives the unit test.", "Method indicating whether a day is a working or non-working day.\n\n@param day required day\n@return true if this is a working day", "Retrieve a UUID from an input stream.\n\n@param is input stream\n@return UUID instance" ]
public CmsMessageContainer validateWithMessage() { if (m_parsingFailed) { return Messages.get().container(Messages.ERR_SERIALDATE_INVALID_VALUE_0); } if (!isStartSet()) { return Messages.get().container(Messages.ERR_SERIALDATE_START_MISSING_0); } if (!isEndValid()) { return Messages.get().container(Messages.ERR_SERIALDATE_END_BEFORE_START_0); } String key = validatePattern(); if (null != key) { return Messages.get().container(key); } key = validateDuration(); if (null != key) { return Messages.get().container(key); } if (hasTooManyEvents()) { return Messages.get().container( Messages.ERR_SERIALDATE_TOO_MANY_EVENTS_1, Integer.valueOf(CmsSerialDateUtil.getMaxEvents())); } return null; }
[ "Validates the wrapped value and returns a localized error message in case of invalid values.\n@return <code>null</code> if the value is valid, a suitable localized error message otherwise." ]
[ "Performs a null edit on an item. This has some effects on Wikibase,\nsuch as refreshing the labels of the referred items in the UI.\n\n@param itemId\nthe document to perform a null edit on\n@throws MediaWikiApiErrorException\nif the API returns errors\n@throws IOException\nif there are any IO errors, such as missing network connection", "Writes assignment data to a PM XML file.", "Iterate and insert each of the elements of the Collection.\n\n@param objects\nThe objects to insert\n@param outIdentifier\nIdentifier to lookup the returned objects\n@param returnObject\nboolean to specify whether the inserted Collection is part of the ExecutionResults\n@param entryPoint\nOptional EntryPoint for the insertions\n@return", "Used to finish up pushing the bulge off the matrix.", "This method takes a calendar of MPXJ library type, then returns a String of the\ngeneral working days USACE format. For example, the regular 5-day work week is\nNYYYYYN\n\nIf you get Fridays off work, then the String becomes NYYYYNN\n\n@param input ProjectCalendar instance\n@return work days string", "Links the given widget to InstantSearch according to the interfaces it implements.\n\n@param widget a widget implementing ({@link AlgoliaResultsListener} || {@link AlgoliaErrorListener} || {@link AlgoliaSearcherListener}).", "Use this API to fetch filtered set of appfwlearningsettings resources.\nset the filter parameter values in filtervalue object.", "Shows the Loader component", "Builds the HTML code for a select widget given a bean containing the select options\n\n@param htmlAttributes html attributes for the select widget\n@param options the bean containing the select options\n\n@return the HTML for the select box" ]
private boolean processRecord(List<String> record) throws MPXJException { boolean done = false; XerRecordType type = RECORD_TYPE_MAP.get(record.get(0)); if (type == null) { throw new MPXJException(MPXJException.INVALID_FORMAT); } switch (type) { case HEADER: { processHeader(record); break; } case TABLE: { m_currentTableName = record.get(1).toLowerCase(); m_skipTable = !REQUIRED_TABLES.contains(m_currentTableName); if (m_skipTable) { m_currentTable = null; } else { m_currentTable = new LinkedList<Row>(); m_tables.put(m_currentTableName, m_currentTable); } break; } case FIELDS: { if (m_skipTable) { m_currentFieldNames = null; } else { m_currentFieldNames = record.toArray(new String[record.size()]); for (int loop = 0; loop < m_currentFieldNames.length; loop++) { m_currentFieldNames[loop] = m_currentFieldNames[loop].toLowerCase(); } } break; } case DATA: { if (!m_skipTable) { Map<String, Object> map = new HashMap<String, Object>(); for (int loop = 1; loop < record.size(); loop++) { String fieldName = m_currentFieldNames[loop]; String fieldValue = record.get(loop); XerFieldType fieldType = FIELD_TYPE_MAP.get(fieldName); if (fieldType == null) { fieldType = XerFieldType.STRING; } Object objectValue; if (fieldValue.length() == 0) { objectValue = null; } else { switch (fieldType) { case DATE: { try { objectValue = m_df.parseObject(fieldValue); } catch (ParseException ex) { objectValue = fieldValue; } break; } case CURRENCY: case DOUBLE: case DURATION: { try { objectValue = Double.valueOf(m_numberFormat.parse(fieldValue.trim()).doubleValue()); } catch (ParseException ex) { objectValue = fieldValue; } break; } case INTEGER: { objectValue = Integer.valueOf(fieldValue.trim()); break; } default: { objectValue = fieldValue; break; } } } map.put(fieldName, objectValue); } Row currentRow = new MapRow(map); m_currentTable.add(currentRow); // // Special case - we need to know the default currency format // ahead of time, so process each row as we get it so that // we can correctly parse currency values in later tables. // if (m_currentTableName.equals("currtype")) { processCurrency(currentRow); } } break; } case END: { done = true; break; } default: { break; } } return done; }
[ "Handles a complete record at a time, stores it in a form ready for\nfurther processing.\n\n@param record record to be processed\n@return flag indicating if this is the last record in the file to be processed\n@throws MPXJException" ]
[ "Checks to see if another AbstractTransition's states is isCompatible for merging.\n\n@param another\n@return", "This adds database table configurations to the internal cache which can be used to speed up DAO construction.\nThis is especially true of Android and other mobile platforms.", "Use this API to fetch all the gslbsite resources that are configured on netscaler.", "Log a free-form warning\n@param message the warning message. Cannot be {@code null}", "Post an artifact to the Grapes server\n\n@param artifact The artifact to post\n@param user The user posting the information\n@param password The user password\n@throws GrapesCommunicationException\n@throws javax.naming.AuthenticationException", "Gets a SerialMessage with the BASIC GET command\n@return the serial message", "Appends the String representation of the given operand to this CharSequence.\n\n@param left a CharSequence\n@param value any Object\n@return the original toString() of the CharSequence with the object appended\n@since 1.8.2", "Sets the values of this input field. Only Applicable check-boxes and a radio buttons.\n\n@param values Values to set.", "Convenience method to convert a CSV string list to a set. Note that this\nwill suppress duplicates.\n\n@param str the input String\n@return a Set of String entries in the list" ]
public long removeRangeByLex(final LexRange lexRange) { return doWithJedis(new JedisCallable<Long>() { @Override public Long call(Jedis jedis) { return jedis.zremrangeByLex(getKey(), lexRange.from(), lexRange.to()); } }); }
[ "When all the elements in a sorted set are inserted with the same score, in order to force lexicographical\nordering, this command removes all elements in the sorted set between the lexicographical range specified.\n@param lexRange\n@return the number of elements removed." ]
[ "Puts the cached security context in the thread local.\n\n@param context the cache context", "Use this API to add authenticationradiusaction resources.", "Binds a script bundle to scene graph rooted at a scene object.\n@param scriptBundle\nThe {@code GVRScriptBundle} object containing script binding information.\n@param rootSceneObject\nThe root of the scene object tree to which the scripts are bound.\n@throws IOException if script bundle file cannot be read.\n@throws GVRScriptException if a script processing error occurs.", "Reads characters until any 'end' character is encountered, ignoring\nescape sequences.\n\n@param out\nThe StringBuilder to write to.\n@param in\nThe Input String.\n@param start\nStarting position.\n@param end\nEnd characters.\n@return The new position or -1 if no 'end' char was found.", "Are these two numbers effectively equal?\n\nThe same logic is applied for each of the 3 vector dimensions: see {@link #equal}\n@param v1\n@param v2", "Starting with the given column index, will return the first column index\nwhich contains a colour that does not match the given color.", "Queries database meta data to check for the existence of\nspecific tables.", "Performs the transformation.\n\n@return True if the file was modified.", "Closing will only skip to the end of this fixed length input stream and\nnot call the parent's close method.\n@throws IOException if an I/O error occurs while closing stream" ]
private InputStream prepareInputStream(InputStream stream) throws IOException { InputStream result; BufferedInputStream bis = new BufferedInputStream(stream); readHeaderProperties(bis); if (isCompressed()) { result = new InflaterInputStream(bis); } else { result = bis; } return result; }
[ "If the file is compressed, handle this so that the stream is ready to read.\n\n@param stream input stream\n@return uncompressed input stream" ]
[ "Processes the template for all class definitions.\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\"", "Set the values using the specified Properties object\n\n@param properties Properties object containing specific property values\nfor the Coordinator config", "Builds the task hierarchy.\n\nNote that there are two distinct levels of organisation going on here. The first is the\nAsta \"summary\" organisation, where the user organises bars into summary groups. We are using this\nto create our hierarchy of tasks.\n\nThe second level displayed within a summary group (or at the project level if the user has not\ncreated summary groups) is the WBS. At the moment we are not including the WBS in the hierarchy.\n\n@param bars bar data\n@param expandedTasks expanded task data\n@param tasks task data\n@param milestones milestone data\n@return list containing the top level tasks", "This method merges together assignment data for the same cost.\n\n@param list assignment data", "Click handler for bottom drawer items.", "Check the version of a command class by sending a VERSION_COMMAND_CLASS_GET message to the node.\n@param commandClass the command class to check the version for.", "resumed a given deployment\n\n@param deployment The deployment to resume", "Use this API to fetch all the auditmessages resources that are configured on netscaler.\nThis uses auditmessages_args which is a way to provide additional arguments while fetching the resources.", "Configure high fps settings in the camera for VR mode\n\n@param fpsMode integer indicating the desired fps: 0 means 30 fps, 1 means 60\nfps, and 2 means 120 fps. Any other value is invalid.\n@return A boolean indicating the status of the method call. It may be false due\nto multiple reasons including: 1) supplying invalid fpsMode as the input\nparameter, 2) VR mode not supported." ]
public List<Message> requestTrackMenuFrom(final SlotReference slotReference, final int sortOrder) throws Exception { ConnectionManager.ClientTask<List<Message>> task = new ConnectionManager.ClientTask<List<Message>>() { @Override public List<Message> useClient(Client client) throws Exception { return MetadataFinder.getInstance().getFullTrackList(slotReference.slot, client, sortOrder); } }; return ConnectionManager.getInstance().invokeWithClientSession(slotReference.player, task, "requesting track menu"); }
[ "Ask the specified player for a Track menu.\n\n@param slotReference the player and slot for which the menu is desired\n@param sortOrder the order in which responses should be sorted, 0 for default, see Section 6.11.1 of the\n<a href=\"https://github.com/Deep-Symmetry/dysentery/blob/master/doc/Analysis.pdf\">Packet Analysis\ndocument</a> for details\n\n@return the entries in the track menu\n\n@throws Exception if there is a problem obtaining the menu" ]
[ "Put object to session cache.\n\n@param oid The {@link org.apache.ojb.broker.Identity} of the object to cache\n@param entry The {@link org.apache.ojb.broker.cache.ObjectCacheTwoLevelImpl.CacheEntry} of the object\n@param onlyIfNew Flag, if set <em>true</em> only new objects (not already in session cache) be cached.", "By default uses InputStream as the type of the image\n@param title\n@param property\n@param width\n@param fixedWidth\n@param imageScaleMode\n@param style\n@return\n@throws ColumnBuilderException\n@throws ClassNotFoundException", "The smallest granularity of rebalancing where-in we move partitions for a\nsub-set of stores. Finally at the end of the movement, the node is\nremoved out of rebalance state\n\n<br>\n\nAlso any errors + rollback procedures are performed at this level itself.\n\n<pre>\n| Case | hasRO | hasRW | finishedRO | Action |\n| 0 | t | t | t | rollback cluster change + swap |\n| 1 | t | t | f | nothing to do since \"rebalance state change\" should have removed everything |\n| 2 | t | f | t | won't be triggered since hasRW is false |\n| 3 | t | f | f | nothing to do since \"rebalance state change\" should have removed everything |\n| 4 | f | t | t | rollback cluster change |\n| 5 | f | t | f | won't be triggered |\n| 6 | f | f | t | won't be triggered |\n| 7 | f | f | f | won't be triggered |\n</pre>\n\n@param batchId Rebalance batch id\n@param batchRollbackCluster Cluster to rollback to if we have a problem\n@param rebalanceTaskPlanList The list of rebalance partition plans\n@param hasReadOnlyStores Are we rebalancing any read-only stores?\n@param hasReadWriteStores Are we rebalancing any read-write stores?\n@param finishedReadOnlyStores Have we finished rebalancing of read-only\nstores?", "Determine if a job name and job type are valid.\n@param jobName the name of the job\n@param jobType the class of the job\n@throws IllegalArgumentException if the name or type are invalid", "Add the buildInfo to step variables if missing and set its cps script.\n\n@param cpsScript the cps script\n@param stepVariables step variables map\n@return the build info", "Use this API to count bridgegroup_vlan_binding resources configued on NetScaler.", "Extract schema of the key field", "Registers a handler and returns the callback key to be passed to\nJavascript.\n\n@param handler Handler to be registered.\n@return A String random UUID that can be used as the callback key.", "Find and return the appropriate setter method for field.\n\n@return Set method or null (or throws IllegalArgumentException) if none found." ]
public static base_response unset(nitro_service client, clusterinstance resource, String[] args) throws Exception{ clusterinstance unsetresource = new clusterinstance(); unsetresource.clid = resource.clid; return unsetresource.unset_resource(client,args); }
[ "Use this API to unset the properties of clusterinstance resource.\nProperties that need to be unset are specified in args array." ]
[ "Registers all custom Externalizer implementations that Hibernate OGM needs into an Infinispan CacheManager\nconfiguration.\n\n@see ExternalizerIds\n@param cfg the Serialization section of a GlobalConfiguration builder", "Parses an item IRI\n\n@param iri\nthe item IRI like http://www.wikidata.org/entity/Q42\n@throws IllegalArgumentException\nif the IRI is invalid or does not ends with an item id", "Extract child task data.\n\n@param task MPXJ task\n@param row Synchro task data", "Put a new resource description into the index, or remove one if the delta has no new description. A delta for a\nparticular URI may be registered more than once; overwriting any earlier registration.\n\n@param delta\nThe resource change.\n@since 2.9", "Used by the slave host when creating the host info dmr sent across to the DC during the registration process\n\n@param ignoreUnaffectedServerGroups whether the slave host is set up to ignore config for server groups it does not have servers for\n@param hostModel the resource containing the host model\n@param model the dmr sent across to theDC\n@return the modified dmr", "Returns a list of all parts that have been uploaded to an upload session.\n@param offset paging marker for the list of parts.\n@param limit maximum number of parts to return.\n@return the list of parts.", "Get a list of all active server mappings defined for current profile\n\n@return Collection of ServerRedirects", "Adds a new Pie Slice to the PieChart. After inserting and calculation of the highlighting color\na complete recalculation is initiated.\n\n@param _Slice The newly added PieSlice.", "Process task dependencies." ]
public double get( int index ) { MatrixType type = mat.getType(); if( type.isReal()) { if (type.getBits() == 64) { return ((DMatrixRMaj) mat).data[index]; } else { return ((FMatrixRMaj) mat).data[index]; } } else { throw new IllegalArgumentException("Complex matrix. Call get(int,Complex64F) instead"); } }
[ "Returns the value of the matrix at the specified index of the 1D row major array.\n\n@see DMatrixRMaj#get(int)\n\n@param index The element's index whose value is to be returned\n@return The value of the specified element." ]
[ "Notifies that multiple content items are changed.\n\n@param positionStart the position.\n@param itemCount the item count.", "Creates a sort configuration iff at least one of the parameters is not null and the options list is not empty.\n@param sortParam The request parameter used to send the currently chosen search option.\n@param options The available sort options.\n@param defaultOption The default sort option.\n@return the sort configuration or null, depending on the arguments.", "Determines the feature state\n\n@param context the template context\n@param tag the tag\n@param attributeName the attribute name\n@param attributeValue the attribute value\n@param defaultState the default state if the expression evaluates to null\n@return the feature state", "Calls the httpHandler method.", "return the ctc costs and gradients, given the probabilities and labels", "Appends the given string encoding special HTML characters.\n\n@param out\nThe StringBuilder to write to.\n@param in\nInput String.\n@param start\nInput String starting position.\n@param end\nInput String end position.", "Checks length and compare order of field names with declared PK fields in metadata.", "Create and add model controller handler to an existing management channel handler.\n\n@param handler the channel handler\n@return the created client", "Removes a child task.\n\n@param child child task instance" ]
private void verifyApplicationName(String name) { if (name == null) { throw new IllegalArgumentException("Application name cannot be null"); } if (name.isEmpty()) { throw new IllegalArgumentException("Application name length must be > 0"); } String reason = null; char[] chars = name.toCharArray(); char c; for (int i = 0; i < chars.length; i++) { c = chars[i]; if (c == 0) { reason = "null character not allowed @" + i; break; } else if (c == '/' || c == '.' || c == ':') { reason = "invalid character '" + c + "'"; break; } else if (c > '\u0000' && c <= '\u001f' || c >= '\u007f' && c <= '\u009F' || c >= '\ud800' && c <= '\uf8ff' || c >= '\ufff0' && c <= '\uffff') { reason = "invalid character @" + i; break; } } if (reason != null) { throw new IllegalArgumentException( "Invalid application name \"" + name + "\" caused by " + reason); } }
[ "Verifies application name. Avoids characters that Zookeeper does not like in nodes & Hadoop\ndoes not like in HDFS paths.\n\n@param name Application name\n@throws IllegalArgumentException If name contains illegal characters" ]
[ "Gets the Chi Square distance between two normalized histograms.\n\n@param histogram1 Histogram.\n@param histogram2 Histogram.\n@return The Chi Square distance between x and y.", "Assigns retention policy with givenID to the folder.\n@param api the API connection to be used by the created assignment.\n@param policyID id of the assigned retention policy.\n@param folderID id of the folder to assign policy to.\n@return info about created assignment.", "Determines the number of elements that the query would return. Override this\nmethod if the size shall be determined in a specific way.\n\n@return The number of elements", "Get the raw data bytes of the device update packet.\n\n@return the data sent by the device to update its status", "Sets the ojbQuery, needed only as long we\ndon't support the soda constraint stuff.\n@param ojbQuery The ojbQuery to set", "Configures a worker pool for the converter.\n\n@param corePoolSize The core pool size of the worker pool.\n@param maximumPoolSize The maximum pool size of the worker pool.\n@param keepAliveTime The keep alive time of the worker pool.\n@param unit The time unit of the specified keep alive time.\n@return This builder instance.", "This method maps the encoded height of a Gantt bar to\nthe height in pixels.\n\n@param height encoded height\n@return height in pixels", "Gets information about this collaboration.\n\n@return info about this collaboration.", "Gets an exception reporting an unexpected XML element.\n\n@param reader a reference to the stream reader.\n@return the constructed {@link javax.xml.stream.XMLStreamException}." ]
public void setLocale(Locale locale) { List<SimpleDateFormat> formats = new ArrayList<SimpleDateFormat>(); for (SimpleDateFormat format : m_formats) { formats.add(new SimpleDateFormat(format.toPattern(), locale)); } m_formats = formats.toArray(new SimpleDateFormat[formats.size()]); }
[ "This method is called when the locale of the parent file is updated.\nIt resets the locale specific date attributes to the default values\nfor the new locale.\n\n@param locale new locale" ]
[ "If there is a SubReport on a Group, we do the layout here\n@param columnsGroup\n@param jgroup", "Creates a new status update on the project.\n\nReturns the full record of the newly created project status update.\n\n@param project The project on which to create a status update.\n@return Request object", "We have identified that we have a zip file. Extract the contents into\na temporary directory and process.\n\n@param stream schedule data\n@return ProjectFile instance", "Check, if the resource should be exported with minimal meta-data.\nThis holds for resources that are not part of the export, but must be\nexported as super-folders.\n\n@param path export-site relative path of the resource to check.\n\n@return flag, indicating if the resource should be exported with minimal meta data.", "Iterate RMI Targets Map and remove entries loaded by protected ClassLoader", "Pull docker image using the docker java client.\n\n@param imageTag\n@param username\n@param password\n@param host", "Called when the end type is changed.", "Read task data from a PEP file.", "Pauses the file upload. This is a blocking function that would try to wait till the assembly file uploads\nhave actually been paused if possible.\n\n@throws LocalOperationException if the method is called while no upload is going on." ]
public void addFkToThisClass(String column) { if (fksToThisClass == null) { fksToThisClass = new Vector(); } fksToThisClass.add(column); fksToThisClassAry = null; }
[ "add a FK column pointing to This Class" ]
[ "Set up server for report directory.", "Generate a unique ID across the cluster\n@return generated ID", "This method extracts project properties from a Phoenix file.\n\n@param phoenixSettings Phoenix settings\n@param storepoint Current storepoint", "Methods returns InetAddress for localhost\n\n@return InetAddress of the localhost\n@throws UnknownHostException if localhost could not be resolved", "Creates a single property declaration.\n@param property Property name.\n@param term Property value.\n@return The resulting declaration.", "Sets the access token to use when authenticating a client.", "Handles incoming Serial Messages. Serial messages can either be messages\nthat are a response to our own requests, or the stick asking us information.\n@param incomingMessage the incoming message to process.", "Find any standard methods the user has 'underridden' in their type.", "Create a MfClientHttpRequestFactory for adding the specified headers.\n\n@param requestFactory the basic request factory. It should be unmodified and just wrapped with\na proxy class.\n@param matchers The matchers.\n@param headers The headers.\n@return" ]
public final static void codeEncode(final StringBuilder out, final String value, final int offset) { for (int i = offset; i < value.length(); i++) { final char c = value.charAt(i); switch (c) { case '&': out.append("&amp;"); break; case '<': out.append("&lt;"); break; case '>': out.append("&gt;"); break; default: out.append(c); } } }
[ "Appends the given string to the given StringBuilder, replacing '&amp;',\n'&lt;' and '&gt;' by their respective HTML entities.\n\n@param out\nThe StringBuilder to append to.\n@param value\nThe string to append.\n@param offset\nThe character offset into value from where to start" ]
[ "Use this API to update vpnclientlessaccesspolicy.", "Use this API to fetch sslcertkey resource of given name .", "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.", "Returns a list of your geo-tagged photos.\n\nThis method requires authentication with 'read' permission.\n\n@param minUploadDate\nMinimum upload date. Photos with an upload date greater than or equal to this value will be returned. Set to null to not specify a date.\n@param maxUploadDate\nMaximum upload date. Photos with an upload date less than or equal to this value will be returned. Set to null to not specify a date.\n@param minTakenDate\nMinimum taken date. Photos with an taken date greater than or equal to this value will be returned. Set to null to not specify a date.\n@param maxTakenDate\nMaximum taken date. Photos with an taken date less than or equal to this value will be returned. Set to null to not specify a date.\n@param privacyFilter\nReturn photos only matching a certain privacy level. Valid values are:\n<ul>\n<li>1 public photos</li>\n<li>2 private photos visible to friends</li>\n<li>3 private photos visible to family</li>\n<li>4 private photos visible to friends & family</li>\n<li>5 completely private photos</li>\n</ul>\nSet to 0 to not specify a privacy Filter.\n\n@see com.flickr4java.flickr.photos.Extras\n@param sort\nThe order in which to sort returned photos. Deafults to date-posted-desc. The possible values are: date-posted-asc, date-posted-desc,\ndate-taken-asc, date-taken-desc, interestingness-desc, and interestingness-asc.\n@param extras\nA set of Strings controlling the extra information to fetch for each returned record. Currently supported fields are: license, date_upload,\ndate_taken, owner_name, icon_server, original_format, last_update, geo. Set to null or an empty set to not specify any extras.\n@param perPage\nNumber of photos to return per page. If this argument is 0, it defaults to 100. The maximum allowed value is 500.\n@param page\nThe page of results to return. If this argument is 0, it defaults to 1.\n@return photos\n@throws FlickrException", "Increases the internal array's length by the specified amount. Previous values are preserved.\nThe length value is not modified since this does not change the 'meaning' of the array, just\nincreases the amount of data which can be stored in it.\n\nthis.data = new data_type[ data.length + amount ]\n\n\n@param amount Number of elements added to the internal array's length", "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.", "Generates a full list of all parents and their children, in order.\n\n@param parentList A list of the parents from\nthe {@link ExpandableRecyclerAdapter}\n@return A list of all parents and their children, expanded", "This method extracts data for a single calendar from a Phoenix file.\n\n@param calendar calendar data", "Writes the results of the processing to a CSV file." ]
public static DeploymentUnit getTopDeploymentUnit(DeploymentUnit unit) { Assert.checkNotNullParam("unit", unit); DeploymentUnit parent = unit.getParent(); while (parent != null) { unit = parent; parent = unit.getParent(); } return unit; }
[ "Get top deployment unit.\n\n@param unit the current deployment unit\n@return top deployment unit" ]
[ "Notifies that a content item is changed.\n\n@param position the position.", "Tests an observer method to see if it is transactional.\n\n@param observer The observer method\n@return true if the observer method is annotated as transactional", "Get a property as a float or throw an exception.\n\n@param key the property name", "Add a greeting to the specified guestbook.", "Get the sub registry for the hosts.\n\n@param range the version range\n@return the sub registry", "Pad or trim so as to produce a string of exactly a certain length.\n\n@param str The String to be padded or truncated\n@param num The desired length", "Obtains a Ethiopic zoned date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the Ethiopic zoned date-time, not null\n@throws DateTimeException if unable to create the date-time", "Get the bean if it exists in the contexts.\n\n@return An instance of the bean\n@throws ContextNotActiveException if the context is not active\n@see javax.enterprise.context.spi.Context#get(BaseBean, boolean)", "Use this API to unset the properties of systemuser resources.\nProperties that need to be unset are specified in args array." ]
public void setRightValue(int index, Object value) { m_definedRightValues[index] = value; if (value instanceof FieldType) { m_symbolicValues = true; } else { if (value instanceof Duration) { if (((Duration) value).getUnits() != TimeUnit.HOURS) { value = ((Duration) value).convertUnits(TimeUnit.HOURS, m_properties); } } } m_workingRightValues[index] = value; }
[ "Add the value to list of values to be used as part of the\nevaluation of this indicator.\n\n@param index position in the list\n@param value evaluation value" ]
[ "Downloads a part of this file's contents, starting at rangeStart and stopping at rangeEnd, while reporting the\nprogress to a ProgressListener.\n\n@param output the stream to where the file will be written.\n@param rangeStart the byte offset at which to start the download.\n@param rangeEnd the byte offset at which to stop the download.\n@param listener a listener for monitoring the download's progress.", "Get a collection of public groups for the user.\n\nThe groups will contain only the members nsid, name, admin and eighteenplus. If you want the whole group-information, you have to call\n{@link com.flickr4java.flickr.groups.GroupsInterface#getInfo(String)}.\n\nThis method does not require authentication.\n\n@param userId\nThe user ID\n@return The public groups\n@throws FlickrException", "Support the subscript operator for String.\n\n@param text a String\n@param index the index of the Character to get\n@return the Character at the given index\n@since 1.0", "Set a proxy with authentication for REST-requests.\n\n@param proxyHost\n@param proxyPort\n@param username\n@param password", "Validates operations against their description providers\n\n@param operations The operations to validate\n@throws IllegalArgumentException if any operation is not valid", "On complete.\nSave response headers when needed.\n\n@param response\nthe response\n@return the response on single request", "Delete all backups asynchronously", "Checks if the specified longitude is correct.\n\n@param name the name of the longitude field\n@param longitude the value of the longitude field\n@return the longitude", "Update the background color of the mBgCircle image view." ]
protected GVRPickedObject findCollider(GVRPickedObject[] pickList, GVRCollider findme) { if (pickList == null) { return null; } for (GVRPickedObject hit : pickList) { if ((hit != null) && (hit.hitCollider == findme)) { return hit; } } return null; }
[ "Find the collision against a specific collider in a list of collisions.\n@param pickList collision list\n@param findme collider to find\n@return collision with the specified collider, null if not found" ]
[ "return a prepared Insert Statement fitting for the given ClassDescriptor", "Print a work contour.\n\n@param value WorkContour instance\n@return work contour value", "Add a IN clause so the column must be equal-to one of the objects passed in.", "The conditional expectation is calculated using a Monte-Carlo regression technique.\n\n@param exerciseTime The exercise time\n@param model The valuation model\n@return The condition expectation estimator\n@throws CalculationException Thrown if underlying model failed to calculate stochastic process.", "Check if new license pattern is valid and doesn't match any existing one\n@param newComer License being added or edited\n@throws WebApplicationException if conflicts involving the newComer are detected", "Check the version to assure it is allowed.\n\n@param pluginName plugin name which needs the dependency\n@param dependency dependency which needs to be verified\n@param requestedVersion requested/minimum version\n@param availableVersion available version\n@return version check problem or empty string when all is fine", "Moves to the next step.", "Add the elements that all values objects require from the provided values object.\n\n@param sourceValues the values object containing the required elements", "Add a IN clause so the column must be equal-to one of the objects from the list passed in." ]
public static String formatDateRange(Context context, ReadablePartial start, ReadablePartial end, int flags) { return formatDateRange(context, toMillis(start), toMillis(end), flags); }
[ "Formats a date or a time range according to the local conventions.\n\nYou should ensure that start/end are in the same timezone; formatDateRange()\ndoesn't handle start/end in different timezones well.\n\nSee {@link android.text.format.DateUtils#formatDateRange} for full docs.\n\n@param context the context is required only if the time is shown\n@param start the start time\n@param end the end time\n@param flags a bit mask of options\n@return a string containing the formatted date/time range" ]
[ "Copied from original SeleniumProxyHandler\nChanged SslRelay to SslListener and getSslRelayOrCreateNew to getSslRelayOrCreateNewOdo\nNo other changes to the function\n\n@param pathInContext\n@param pathParams\n@param request\n@param response\n@throws HttpException\n@throws IOException", "Get the URL for the user's profile.\n\n@param userId\nThe user ID\n@return The URL\n@throws FlickrException", "Finds the first Field with given field name in the Class and in its super classes.\n\n@param type The Class type\n@param fieldName The field name to get\n@return an {@code Optional}. Use isPresent() to find out if the field name was found.", "Generates the specified number of random resource names with the same prefix.\n@param prefix the prefix to be used if possible\n@param maxLen the maximum length for the random generated name\n@param count the number of names to generate\n@return random names", "Embeds the given SVG element into a new SVG element scaling the graphic to the given dimension and\napplying the given rotation.", "This method is called to format a time value.\n\n@param value time value\n@return formatted time value", "Publish the changes to main registry", "Write entries into the storage.\nOverriding methods should first delegate to super before adding their own entries.", "caching is not supported for this method" ]
private FieldDescriptorDef cloneField(FieldDescriptorDef fieldDef, String prefix) { FieldDescriptorDef copyFieldDef = new FieldDescriptorDef(fieldDef, prefix); copyFieldDef.setOwner(this); // we remove properties that are only relevant to the class the features are declared in copyFieldDef.setProperty(PropertyHelper.OJB_PROPERTY_IGNORE, null); Properties mod = getModification(copyFieldDef.getName()); if (mod != null) { if (!PropertyHelper.toBoolean(mod.getProperty(PropertyHelper.OJB_PROPERTY_IGNORE), false) && hasFeature(copyFieldDef.getName())) { LogHelper.warn(true, ClassDescriptorDef.class, "process", "Class "+getName()+" has a feature that has the same name as its included field "+ copyFieldDef.getName()+" from class "+fieldDef.getOwner().getName()); } copyFieldDef.applyModifications(mod); } return copyFieldDef; }
[ "Clones the given field.\n\n@param fieldDef The field descriptor\n@param prefix A prefix for the name\n@return The cloned field" ]
[ "Returns the last node that appears to be part of the prefix. This will be used to determine the current model\nobject that'll be the most special context instance in the proposal provider.", "Detokenize the input list of words.\n\n@param tokens List of words.\n@return Detokenized string.", "Creates a new undeploy description.\n\n@param deploymentDescription the deployment description to copy\n\n@return the description", "Returns a usage String based on the defined command and options.\nUseful when printing \"help\" info etc.", "Performs the conversion from standard XPath to xpath with parameterization support.", "Process calendar hours and exception data from the database.\n\n@param calendars all calendars for the project", "Returns the root path for this source file, based upon the package name.\n\nFor example, if path is \"/project/src/main/java/org/example/Foo.java\" and the package is \"org.example\", then this\nshould return \"/project/src/main/java\".\n\nReturns null if the folder structure does not match the package name.", "Create an object of the given type using a constructor that matches the\nsupplied arguments and invoke the setters with the supplied variables.\n\n@param <T> the object type\n@param clazz\nthe type to create\n@param args\nthe arguments to the constructor\n@param vars\nthe named arguments for setters\n@return a new object of the given type, initialized with the given\narguments\n@throws NoSuchConstructorException\nif there is not a constructor that matches the given\narguments\n@throws AmbiguousConstructorException\nif there is more than one constructor that matches the given\narguments\n@throws ReflectiveOperationException\nif any of the reflective operations throw an exception", "Returns the full record for a single story.\n\n@param story Globally unique identifier for the story.\n@return Request object" ]
protected String buildErrorSetMsg(Object obj, Object value, Field aField) { String eol = SystemUtils.LINE_SEPARATOR; StringBuffer buf = new StringBuffer(); buf .append(eol + "[try to set 'object value' in 'target object'") .append(eol + "target obj class: " + (obj != null ? obj.getClass().getName() : null)) .append(eol + "target field name: " + (aField != null ? aField.getName() : null)) .append(eol + "target field type: " + (aField != null ? aField.getType() : null)) .append(eol + "target field declared in: " + (aField != null ? aField.getDeclaringClass().getName() : null)) .append(eol + "object value class: " + (value != null ? value.getClass().getName() : null)) .append(eol + "object value: " + (value != null ? value : null)) .append(eol + "]"); return buf.toString(); }
[ "Build a String representation of given arguments." ]
[ "Adds a new task to this file. The task can have an optional message to include, and a due date.\n\n@param action the action the task assignee will be prompted to do.\n@param message an optional message to include with the task.\n@param dueAt the day at which this task is due.\n@return information about the newly added task.", "Only call with monitor for 'this' held", "Removes bean from scope.\n\n@param name bean name\n@return previous value", "Increases the internal array's length by the specified amount. Previous values are preserved.\nThe length value is not modified since this does not change the 'meaning' of the array, just\nincreases the amount of data which can be stored in it.\n\nthis.data = new data_type[ data.length + amount ]\n\n\n@param amount Number of elements added to the internal array's length", "Sets the provided metadata on the folder, overwriting any existing metadata keys already present.\n\n@param templateName the name of the metadata template.\n@param scope the scope of the template (usually \"global\" or \"enterprise\").\n@param metadata the new metadata values.\n@return the metadata returned from the server.", "Sets the ojbQuery, needed only as long we\ndon't support the soda constraint stuff.\n@param ojbQuery The ojbQuery to set", "Checks if the given AnnotatedType is sensible, otherwise provides warnings.", "Decode long from byte array at offset\n\n@param ba byte array\n@param offset Offset\n@return long value", "Checks if a parameter exists. If it exists, it is left untouched. If it doesn't, it is created. Only works for parameters which key\nis unique. Must be called from within an open transaction." ]
@Override public Symmetry010Date dateYearDay(Era era, int yearOfEra, int dayOfYear) { return dateYearDay(prolepticYear(era, yearOfEra), dayOfYear); }
[ "Obtains a local date in Symmetry010 calendar system from the\nera, year-of-era and day-of-year fields.\n\n@param era the Symmetry010 era, not null\n@param yearOfEra the year-of-era\n@param dayOfYear the day-of-year\n@return the Symmetry010 local date, not null\n@throws DateTimeException if unable to create the date\n@throws ClassCastException if the {@code era} is not a {@code IsoEra}" ]
[ "copy all fields from the \"from\" object to the \"to\" object.\n\n@param from source object\n@param to from's clone\n@param fields fields to be populated\n@param accessible 'true' if all 'fields' have been made accessible during\ntraversal", "Parse a string representation of an Integer value.\n\n@param value string representation\n@return Integer value", "Calculate the child size along the axis\n@param dataIndex data index\n@param axis {@link Axis}\n@return child size", "Get the short exception message using the requested locale. This does not include the cause exception message.\n\n@param locale locale for message\n@return (short) exception message", "This method is called to alert project listeners to the fact that\na resource has been read from a project file.\n\n@param resource resource instance", "Given the histogram of columns compute the col_idx for the matrix. nz_length is automatically set and\nnz_values will grow if needed.\n@param histogram histogram of column values in the sparse matrix. modified, see above.", "Read the values from the output object and write them to the values object.\n\n@param output the output object from a processor\n@param processor the processor the output if from\n@param values the object for sharing values between processors", "Exit the Application", "One of the two main methods in this class. Creates a RendererViewHolder instance with a\nRenderer inside ready to be used. The RendererBuilder to create a RendererViewHolder using the\ninformation given as parameter.\n\n@param viewGroup used to create the ViewHolder.\n@param viewType associated to the renderer.\n@return ViewHolder extension with the Renderer it has to use inside." ]
protected Path createTempDirectory(String prefix) { try { return Files.createTempDirectory(tempDirectory, prefix); } catch (IOException e) { throw new AllureCommandException(e); } }
[ "Creates an temporary directory. The created directory will be deleted when\ncommand will ended." ]
[ "Assigns retention policy with givenID to folder or enterprise.\n@param api the API connection to be used by the created assignment.\n@param policyID id of the assigned retention policy.\n@param assignTo object representing folder or enterprise to assign policy to.\n@return info about created assignment.", "try to find the first none null table name for the given class-descriptor.\nIf cld has extent classes, all of these cld's searched for the first none null\ntable name.", "URL-Decodes a given string using ISO-8859-1. No UnsupportedEncodingException to handle as it is dealt with in\nthis method.", "Utils for making collections out of arrays of primitive types.", "Sets a parameter for the creator.", "Logs all properties", "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", "This handler will be triggered when search is finish", "Use this API to add sslocspresponder." ]
public static String getSerializedVectorClock(VectorClock vc) { VectorClockWrapper vcWrapper = new VectorClockWrapper(vc); String serializedVC = ""; try { serializedVC = mapper.writeValueAsString(vcWrapper); } catch(Exception e) { e.printStackTrace(); } return serializedVC; }
[ "Function to serialize the given Vector clock into a string. If something\ngoes wrong, it returns an empty string.\n\n@param vc The Vector clock to serialize\n@return The string (JSON) version of the specified Vector clock" ]
[ "Print rate.\n\n@param rate Rate instance\n@return rate value", "Register the given callback as to be executed after request completion.\n\n@param name The name of the bean.\n@param callback The callback of the bean to be executed for destruction.", "Clean obsolete contents from the content repository. It will first mark contents as obsolete then after some time\nif these contents are still obsolete they will be removed.\n\n@return a map containing the list of marked contents and the list of deleted contents.", "This method takes the textual version of a constraint name\nand returns an appropriate class instance. Note that unrecognised\nvalues are treated as \"As Soon As Possible\" constraints.\n\n@param locale target locale\n@param type text version of the constraint type\n@return ConstraintType instance", "This method determines whether the given date falls in the range of\ndates covered by this exception. Note that this method assumes that both\nthe start and end date of this exception have been set.\n\n@param date Date to be tested\n@return Boolean value", "Parses the given XML doc to extract the properties and return them into a java.util.Properties.\n@param doc to parse\n@param sectionName which section to extract\n@return Properties map", "Get the element at the index as a json array.\n\n@param i the index of the element to access", "Retrieve a flag value.\n\n@param index flag index (1-20)\n@return flag value", "Parses a string that contains multiple fat client configs in avro format\n\n@param configAvro Input string of avro format, that contains config for\nmultiple stores\n@return Map of store names to store config properties" ]
public static vpnglobal_appcontroller_binding[] get(nitro_service service) throws Exception{ vpnglobal_appcontroller_binding obj = new vpnglobal_appcontroller_binding(); vpnglobal_appcontroller_binding response[] = (vpnglobal_appcontroller_binding[]) obj.get_resources(service); return response; }
[ "Use this API to fetch a vpnglobal_appcontroller_binding resources." ]
[ "not start with another option name", "Adds a path to the request response table with the specified values\n\n@param profileId ID of profile\n@param clientUUID UUID of client\n@param pathId ID of path\n@throws Exception exception", "Animate de-selection of visible views and clear\nselected set.", "Send an error to the client with an exception.\n\n@param httpServletResponse the http response to send the error to\n@param e the error that occurred", "Chooses the ECI mode most suitable for the content of this symbol.", "This produces a canonical string.\n\nRFC 5952 describes canonical representations.\nhttp://en.wikipedia.org/wiki/IPv6_address#Recommended_representation_as_text\nhttp://tools.ietf.org/html/rfc5952", "Adds a file with the provided description.", "Convert a date to the String representation we use in the JSON.\n@param d the date to convert\n@return the String representation we use in the JSON.", "This method extracts candidate elements from the current DOM tree in the browser, based on\nthe crawl tags defined by the user.\n\n@param currentState the state in which this extract method is requested.\n@return a list of candidate elements that are not excluded.\n@throws CrawljaxException if the method fails." ]
public int addServerRedirectToProfile(String region, String srcUrl, String destUrl, String hostHeader, int profileId, int clientId) throws Exception { int serverId = -1; try { Client client = ClientService.getInstance().getClient(clientId); serverId = addServerRedirect(region, srcUrl, destUrl, hostHeader, profileId, client.getActiveServerGroup()); } catch (Exception e) { e.printStackTrace(); } return serverId; }
[ "Add server redirect to a profile, using current active ServerGroup\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@return ID of added ServerRedirect\n@throws Exception exception" ]
[ "The handling method.", "Hide multiple channels. All other channels will be unaffected.\n@param channels The channels to hide", "Returns the last node that appears to be part of the prefix. This will be used to determine the current model\nobject that'll be the most special context instance in the proposal provider.", "Read an optional Date value form a JSON value.\n@param val the JSON value that should represent the Date as long value in a string.\n@return the Date from the JSON or null if reading the date fails.", "Use this API to fetch service_dospolicy_binding resources of given name .", "the applications main loop.", "this remove the linebreak.\n\n@param input\nthe input\n@param patternStr\nthe pattern str\n@return the string", "Add a '&gt;=' clause so the column must be greater-than or equals-to the value.", "Propagate onTouchStart events to listeners\n@param hit collision object" ]
@Deprecated public ModelNode remove(ModelNode model) throws NoSuchElementException { final Iterator<PathElement> i = pathAddressList.iterator(); while (i.hasNext()) { final PathElement element = i.next(); if (i.hasNext()) { model = model.require(element.getKey()).require(element.getValue()); } else { final ModelNode parent = model.require(element.getKey()); model = parent.remove(element.getValue()).clone(); } } return model; }
[ "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." ]
[ "Retrieves the column title for the given locale.\n\n@param locale required locale for the default column title\n@return column title", "Converts this address to a prefix length\n\n@return the prefix of the indicated IP type represented by this address or null if this address is valid but cannot be represented by a network prefix length\n@throws AddressStringException if the address is invalid", "Log original response\n\n@param httpServletResponse\n@param history\n@throws URIException", "Set a range of the colormap to a single color.\n@param firstIndex the position of the first color\n@param lastIndex the position of the second color\n@param color the color", "Verify store definitions are congruent with cluster definition.\n\n@param cluster\n@param storeDefs", "Returns whether the division range includes the block of values for its prefix length", "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", "Use this API to fetch aaagroup_aaauser_binding resources of given name .", "Send the started notification" ]
public static base_response add(nitro_service client, nsip6 resource) throws Exception { nsip6 addresource = new nsip6(); addresource.ipv6address = resource.ipv6address; addresource.scope = resource.scope; addresource.type = resource.type; addresource.vlan = resource.vlan; addresource.nd = resource.nd; addresource.icmp = resource.icmp; addresource.vserver = resource.vserver; addresource.telnet = resource.telnet; addresource.ftp = resource.ftp; addresource.gui = resource.gui; addresource.ssh = resource.ssh; addresource.snmp = resource.snmp; addresource.mgmtaccess = resource.mgmtaccess; addresource.restrictaccess = resource.restrictaccess; addresource.dynamicrouting = resource.dynamicrouting; addresource.hostroute = resource.hostroute; addresource.ip6hostrtgw = resource.ip6hostrtgw; addresource.metric = resource.metric; addresource.vserverrhilevel = resource.vserverrhilevel; addresource.ospf6lsatype = resource.ospf6lsatype; addresource.ospfarea = resource.ospfarea; addresource.state = resource.state; addresource.map = resource.map; addresource.ownernode = resource.ownernode; addresource.td = resource.td; return addresource.add_resource(client); }
[ "Use this API to add nsip6." ]
[ "Tests whether the given string is the name of a java.lang type.", "Returns a description String based on the defined command and options.\nUseful when printing \"help\" info etc.", "Convert event type.\n\n@param eventType the event type\n@return the event enum type", "Shows error dialog, manually supplying details instead of getting them from an exception stack trace.\n\n@param message the error message\n@param details the details", "Returns all headers with the headers from the Payload\n\n@return All the headers", "Search down all extent classes and return max of all found\nPK values.", "Returns an ArrayList of String URLs of the Carousel Images\n@return ArrayList of Strings", "Refresh's this connection's access token using Box Developer Edition.\n@throws IllegalStateException if this connection's access token cannot be refreshed.", "Remove any mapping for this key, and return any previously\nmapped value.\n\n@param key the key whose mapping is to be removed\n@return the value removed, or null" ]
public static nsacl6_stats get(nitro_service service, String acl6name) throws Exception{ nsacl6_stats obj = new nsacl6_stats(); obj.set_acl6name(acl6name); nsacl6_stats response = (nsacl6_stats) obj.stat_resource(service); return response; }
[ "Use this API to fetch statistics of nsacl6_stats resource of given name ." ]
[ "Returns the master mode's editor state for editing a bundle with descriptor.\n@return the master mode's editor state for editing a bundle with descriptor.", "Return the list of corporate GroupId prefix configured for an organization.\n\n@param organizationId String Organization name\n@return Response A list of corporate groupId prefix in HTML or JSON", "Create a HashSet with the given initial values.\n\n@param values The values\n@param <T> The type.", "Handles newlines by removing them and add new rows instead", "Removes all of the markers from the map.", "Create the voldemort key and value from the input Avro record by\nextracting the key and value and map it out for each of the responsible\nvoldemort nodes\n\n\nThe output value is the node_id & partition_id of the responsible node\nfollowed by serialized value", "Invalidating just the GVRView associated with the GVRViewSceneObject\nincorrectly set the clip rectangle to just that view. To fix this,\nwe have to create a full screen android View and invalidate this\nto restore the clip rectangle.\n@return full screen View object", "Returns the path to java executable.", "The way calendars are stored in an MPP14 file means that there\ncan be forward references between the base calendar unique ID for a\nderived calendar, and the base calendar itself. To get around this,\nwe initially populate the base calendar name attribute with the\nbase calendar unique ID, and now in this method we can convert those\nID values into the correct names.\n\n@param baseCalendars list of calendars and base calendar IDs\n@param map map of calendar ID values and calendar objects" ]
public ILog getLog(String topic, int partition) { TopicNameValidator.validate(topic); Pool<Integer, Log> p = getLogPool(topic, partition); return p == null ? null : p.get(partition); }
[ "Get the log if exists or return null\n\n@param topic topic name\n@param partition partition index\n@return a log for the topic or null if not exist" ]
[ "Returns the index of the first invalid character of the zone, or -1 if the zone is valid\n\n@param sequence\n@return", "Method to create a new proxy that wraps the bean instance.\n\n@param beanInstance the bean instance\n@return a new proxy object", "Create a new Time, with no date component.", "Fires given event for non-web modules. Used for @BeforeDestroyed and @Destroyed events.", "return a HashMap with all properties, name as key, value as value\n@return the properties", "Locates a task within a child task container which matches the supplied UUID.\n\n@param parent child task container\n@param uuid required UUID\n@return Task instance or null if the task is not found", "Remove a part of a CharSequence by replacing the first occurrence\nof target within self with '' and returns the result.\n\n@param self a CharSequence\n@param target an object representing the part to remove\n@return a String containing the original minus the part to be removed\n@see #minus(String, Object)\n@since 1.8.2", "Fixed length fancy formatting for doubles. If possible decimal notation is used. If all the significant digits\ncan't be shown then it will switch to exponential notation. If not all the space is needed then it will\nbe filled in to ensure it has the specified length.\n\n@param value value being formatted\n@param format default format before exponential\n@param length Maximum number of characters it can take.\n@param significant Number of significant decimal digits to show at a minimum.\n@return formatted string", "Push docker image using the docker java client.\n\n@param imageTag\n@param username\n@param password\n@param host" ]
public static base_response delete(nitro_service client, String servicename) throws Exception { gslbservice deleteresource = new gslbservice(); deleteresource.servicename = servicename; return deleteresource.delete_resource(client); }
[ "Use this API to delete gslbservice of given name." ]
[ "Transforms each character from this reader by passing it to the given\nclosure. The Closure should return each transformed character, which\nwill be passed to the Writer. The reader and writer will be both be\nclosed before this method returns.\n\n@param self a Reader object\n@param writer a Writer to receive the transformed characters\n@param closure a closure that performs the required transformation\n@throws IOException if an IOException occurs.\n@since 1.5.0", "Return the list of galleries created by a user. Sorted from newest to oldest.\n\n@param userId\nThe user you want to check for\n@param perPage\nNumber of galleries per page\n@param page\nThe page number\n@return gallery\n@throws FlickrException\n\n@see <a hrerf=\"http://www.flickr.com/services/api/flickr.galleries.getList.html\">flickr.galleries.getList</a>", "Return the hostname of this address such as \"MYCOMPUTER\".", "returns a collection of Reader LockEntries for object obj.\nIf no LockEntries could be found an empty Vector is returned.", "Delete any log segments matching the given predicate function\n\n@throws IOException", "Get bean for given name in the \"thread\" scope.\n\n@param name name of bean\n@param factory factory for new instances\n@return bean for this scope", "Return the value of field in the data argument if it is not the default value for the class. If it is the default\nthen null is returned.", "Put a new resource description into the index, or remove one if the delta has no new description. A delta for a\nparticular URI may be registered more than once; overwriting any earlier registration.\n\n@param delta\nThe resource change.\n@since 2.9", "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 static base_responses add(nitro_service client, dnstxtrec resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { dnstxtrec addresources[] = new dnstxtrec[resources.length]; for (int i=0;i<resources.length;i++){ addresources[i] = new dnstxtrec(); addresources[i].domain = resources[i].domain; addresources[i].String = resources[i].String; addresources[i].ttl = resources[i].ttl; } result = add_bulk_request(client, addresources); } return result; }
[ "Use this API to add dnstxtrec resources." ]
[ "Apply aliases to task and resource fields.\n\n@param aliases map of aliases", "Enable the use of the given controller type by\nadding it to the cursor controller types list.\n@param controllerType GVRControllerType to add to the list", "Detect and apply waves, now or when the widget is attached.\n\n@param widget target widget to ensure is attached first", "Returns a usage String based on the defined command and options.\nUseful when printing \"help\" info etc.", "this method will be invoked after methodToBeInvoked is invoked", "try to delegate the master to handle the response\n\n@param response\n@return true if the master accepted the response; false if the master\ndidn't accept", "Builds IMAP envelope String from pre-parsed data.", "Returns all the persistent id generators which potentially require the creation of an object in the schema.", "Tries to load the custom error page at the given rootPath.\n@param cms {@link CmsObject} used for reading the resource (site root and uri get adjusted!)\n@param req the current request\n@param res the current response\n@param rootPath the VFS root path to the error page resource\n@return a flag, indicating if the error page could be loaded" ]
public static Set<Annotation> filterInterceptorBindings(BeanManagerImpl beanManager, Collection<Annotation> annotations) { Set<Annotation> interceptorBindings = new InterceptorBindingSet(beanManager); for (Annotation annotation : annotations) { if (beanManager.isInterceptorBinding(annotation.annotationType())) { interceptorBindings.add(annotation); } } return interceptorBindings; }
[ "Extracts a set of interceptor bindings from a collection of annotations.\n@param beanManager\n@param annotations\n@return" ]
[ "Initialize the class if this is being called with Spring.", "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.", "Generates a download id for the request and adds the download request to the download request queue for the dispatchers pool to act on immediately.\n\n@param request\n@return downloadId", "Returns the count of all inbox messages for the user\n@return int - count of all inbox messages", "The test that checks if clipping is needed.\n\n@param f\nfeature to test\n@param scale\nscale\n@return true if clipping is needed", "Creates a descriptor for the currently edited message bundle.\n@return <code>true</code> if the descriptor could be created, <code>false</code> otherwise.", "Checks whether the property of the given name is allowed for the model element.\n\n@param defClass The class of the model element\n@param propertyName The name of the property\n@return <code>true</code> if the property is allowed for this type of model elements", "Set the duration option.\n@param value the duration option to set ({@link EndType} as string).", "symbol for filling padding position in output" ]
public void drawText(String text, Font font, Rectangle box, Color fontColor) { template.saveState(); // get the font DefaultFontMapper mapper = new DefaultFontMapper(); BaseFont bf = mapper.awtToPdf(font); template.setFontAndSize(bf, font.getSize()); // calculate descent float descent = 0; if (text != null) { descent = bf.getDescentPoint(text, font.getSize()); } // calculate the fitting size Rectangle fit = getTextSize(text, font); // draw text if necessary template.setColorFill(fontColor); template.beginText(); template.showTextAligned(PdfContentByte.ALIGN_LEFT, text, origX + box.getLeft() + 0.5f * (box.getWidth() - fit.getWidth()), origY + box.getBottom() + 0.5f * (box.getHeight() - fit.getHeight()) - descent, 0); template.endText(); template.restoreState(); }
[ "Draw text in the center of the specified box.\n\n@param text text\n@param font font\n@param box box to put text int\n@param fontColor colour" ]
[ "This method is currently in use only by the SvnCoordinator", "Over simplistic helper to compare two strings to check radio buttons.\n\n@param value1 the first value\n@param value2 the second value\n@return \"checked\" if both values are equal, the empty String \"\" otherwise", "Use this API to fetch a dnsglobal_binding resource .", "Determines whether the given type is an array type.\n\n@param type the given type\n@return true if the given type is a subclass of java.lang.Class or implements GenericArrayType", "Wrap Statement with a proxy.\n@param target statement handle\n@param connectionHandle originating bonecp connection\n@return Proxy to a statement.", "Retrieves state and metrics information for all channels across the cluster.\n\n@return list of channels across the cluster", "Tests whether the two field descriptors are equal, i.e. have same name, same column\nand same jdbc-type.\n\n@param first The first field\n@param second The second field\n@return <code>true</code> if they are equal", "Validate the header signature.\n\n@param input The input to read the signature from\n@throws IOException If any read problems occur", "Inserts the LokenList immediately following the 'before' token" ]
public static final long getLong(InputStream is) throws IOException { byte[] data = new byte[8]; is.read(data); return getLong(data, 0); }
[ "Read a long int from an input stream.\n\n@param is input stream\n@return long value" ]
[ "Initialize the pattern choice button group.", "Store an Object.\n@see org.apache.ojb.broker.PersistenceBroker#store(Object)", "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.", "Adds new connections to the partition.\n@param connectionsToCreate number of connections to create\n@throws InterruptedException", "Send an error to the client with an exception.\n\n@param httpServletResponse the http response to send the error to\n@param e the error that occurred", "The parameter 'project' is not used at the moment, but will be used once schema and plugin support lands.", "Adds BETWEEN criteria,\ncustomer_id between 1 and 10\n\n@param attribute The field name to be used\n@param value1 The lower boundary\n@param value2 The upper boundary", "Accessor method used to retrieve a char representing the\ncontents of an individual field. If the field does not exist in the\nrecord, the default character is returned.\n\n@param field the index number of the field to be retrieved\n@return the value of the required field", "Adds a directory to the collection of module paths.\n\n@param moduleDir the module directory to add\n\n@throws java.lang.IllegalArgumentException if the path is {@code null}" ]
private void writeInterfaceCriteria(final XMLExtendedStreamWriter writer, final ModelNode subModel, final boolean nested) throws XMLStreamException { for (final Property property : subModel.asPropertyList()) { if (property.getValue().isDefined()) { writeInterfaceCriteria(writer, property, nested); } } }
[ "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" ]
[ "Mojos perform different dependency resolution, so we add dependencies for each mojo.", "Counts the number of elements in A which are true\n@param A input matrix\n@return number of true elements", "Returns the accrued interest of the bond for a given date.\n\n@param date The date of interest.\n@param model The model under which the product is valued.\n@return The accrued interest.", "Stores the gathered usage statistics about term uses by language to a CSV\nfile.\n\n@param usageStatistics\nthe statistics to store\n@param fileName\nthe name of the file to use", "Write a resource.\n\n@param record resource instance\n@throws IOException", "Start ssh session and obtain session.\n\n@return the session", "Returns the Java command to use.\n\n@param javaHome the Java Home, if {@code null} an attempt to determine the command will be done\n\n@return the Java executable command", "Writes the message to the specified channel, for example when creating metadata cache files.\n\n@param channel the channel to which it should be written\n\n@throws IOException if there is a problem writing to the channel", "Permanently close the ClientRequestExecutor pool. Resources subsequently\nchecked in will be destroyed." ]
public void run(Configuration configuration, InjectableStepsFactory stepsFactory, Story story, MetaFilter filter, State beforeStories) throws Throwable { RunContext context = new RunContext(configuration, stepsFactory, story.getPath(), filter); if (beforeStories != null) { context.stateIs(beforeStories); } Map<String, String> storyParameters = new HashMap<>(); run(context, story, storyParameters); }
[ "Runs a Story with the given steps factory, applying the given meta\nfilter, and staring from given state.\n\n@param configuration the Configuration used to run story\n@param stepsFactory the InjectableStepsFactory used to created the\ncandidate steps methods\n@param story the Story to run\n@param filter the Filter to apply to the story Meta\n@param beforeStories the State before running any of the stories, if not\n<code>null</code>\n\n@throws Throwable if failures occurred and FailureStrategy dictates it to\nbe re-thrown." ]
[ "Helper method that encapsulates the minimum logic for publishing a job to\na channel.\n\n@param jedis\nthe connection to Redis\n@param namespace\nthe Resque namespace\n@param channel\nthe channel name\n@param jobJson\nthe job serialized as JSON", "Returns the given text with the first letter in upper case.\n\n<h2>Examples:</h2>\n<pre>\ncapitalize(\"hi\") == \"Hi\"\ncapitalize(\"Hi\") == \"Hi\"\ncapitalize(\"hi there\") == \"hi there\"\ncapitalize(\"\") == \"\"\ncapitalize(null) == null\n</pre>\n@param text the text to capitalize\n@return text with the first letter in upper case", "Escape text to ensure valid JSON.\n\n@param value value\n@return escaped value", "Registers the transformers for JBoss EAP 7.0.0.\n\n@param subsystemRegistration contains data about the subsystem registration", "Copies information between specified streams and then closes\nboth of the streams.\n@throws java.io.IOException", "Add tables to the tree.\n\n@param parentNode parent tree node\n@param file tables container", "Returns the value of an optional property, if the property is\nset. If it is not set defval is returned.", "Attempts to checkout a resource so that one queued request can be\nserviced.\n\n@param key The key for which to process the requestQueue\n@return true iff an item was processed from the Queue.", "Add a task to the project.\n\n@return new task instance" ]
@Override @SuppressWarnings("unchecked") public ChronoLocalDateTime<CopticDate> localDateTime(TemporalAccessor temporal) { return (ChronoLocalDateTime<CopticDate>) super.localDateTime(temporal); }
[ "Obtains a Coptic local date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the Coptic local date-time, not null\n@throws DateTimeException if unable to create the date-time" ]
[ "Set an enterprise number value.\n\n@param index number index (1-40)\n@param value number value", "invoked from the jelly file\n\n@throws Exception Any exception", "Overridden to do only the clean-part of the linking but not\nthe actual linking. This is deferred until someone wants to access\nthe content of the resource.", "Gets the positions.\n\n@return the positions", "Logs a message for a case where the value of a property does not fit to\nits declared datatype.\n\n@param propertyIdValue\nthe property that was used\n@param datatype\nthe declared type of the property\n@param valueType\na string to denote the type of value", "Creates the server setup, depending on the protocol flags.\n\n@return the configured server setups.", "Stops the HTTP service gracefully and release all resources.\n\n@param quietPeriod the quiet period as described in the documentation of {@link EventExecutorGroup}\n@param timeout the maximum amount of time to wait until the executor is\n{@linkplain EventExecutorGroup#shutdown()}\nregardless if a task was submitted during the quiet period\n@param unit the unit of {@code quietPeriod} and {@code timeout}\n@throws Exception if there is exception raised during shutdown.", "Read data for a single table and store it.\n\n@param is input stream\n@param table table header", "Given a DocumentVersionInfo, returns a BSON document representing the next version. This means\nand incremented version count for a non-empty version, or a fresh version document for an\nempty version.\n@return a BsonDocument representing a synchronization version" ]
@PostConstruct protected void postConstruct() throws GeomajasException { if (null != crsDefinitions) { for (CrsInfo crsInfo : crsDefinitions.values()) { try { CoordinateReferenceSystem crs = CRS.parseWKT(crsInfo.getCrsWkt()); String code = crsInfo.getKey(); crsCache.put(code, CrsFactory.getCrs(code, crs)); } catch (FactoryException e) { throw new GeomajasException(e, ExceptionCode.CRS_DECODE_FAILURE_FOR_MAP, crsInfo.getKey()); } } } if (null != crsTransformDefinitions) { for (CrsTransformInfo crsTransformInfo : crsTransformDefinitions.values()) { String key = getTransformKey(crsTransformInfo); transformCache.put(key, getCrsTransform(key, crsTransformInfo)); } } GeometryFactory factory = new GeometryFactory(); EMPTY_GEOMETRIES.put(Point.class, factory.createPoint((Coordinate) null)); EMPTY_GEOMETRIES.put(LineString.class, factory.createLineString((Coordinate[]) null)); EMPTY_GEOMETRIES.put(Polygon.class, factory.createPolygon(null, null)); EMPTY_GEOMETRIES.put(MultiPoint.class, factory.createMultiPoint((Coordinate[]) null)); EMPTY_GEOMETRIES.put(MultiLineString.class, factory.createMultiLineString((LineString[]) null)); // cast needed! EMPTY_GEOMETRIES.put(MultiPolygon.class, factory.createMultiPolygon((Polygon[]) null)); // cast needed! EMPTY_GEOMETRIES.put(Geometry.class, factory.createGeometryCollection(null)); }
[ "Finish service initialization.\n\n@throws GeomajasException oops" ]
[ "Returns the description of the running container.\n\n@param client the client used to query the server\n\n@return the description of the running container\n\n@throws IOException if an error occurs communicating with the server\n@throws OperationExecutionException if the operation used to query the container fails", "Creates an temporary directory. The created directory will be deleted when\ncommand will ended.", "Checks the preconditions for creating a new HashMapper processor.\n\n@param mapping\nthe Map\n@throws NullPointerException\nif mapping is null\n@throws IllegalArgumentException\nif mapping is empty", "Stops download dispatchers.", "Use this API to fetch statistics of nspbr6_stats resource of given name .", "Creates a code location URL from a class\n\n@param codeLocationClass the class\n@return A URL created from Class\n@throws InvalidCodeLocation if URL creation fails", "Parse a boolean.\n\n@param value boolean\n@return Boolean value", "Obtains a Symmetry454 local date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the Symmetry454 local date-time, not null\n@throws DateTimeException if unable to create the date-time", "Reads Logical Screen Descriptor." ]