query
stringlengths
74
6.1k
positive
sequencelengths
1
1
negative
sequencelengths
9
9
public long queryForLong(DatabaseConnection databaseConnection, PreparedStmt<T> preparedStmt) throws SQLException { CompiledStatement compiledStatement = preparedStmt.compile(databaseConnection, StatementType.SELECT_LONG); DatabaseResults results = null; try { results = compiledStatement.runQuery(null); if (results.first()) { return results.getLong(0); } else { throw new SQLException("No result found in queryForLong: " + preparedStmt.getStatement()); } } finally { IOUtils.closeThrowSqlException(results, "results"); IOUtils.closeThrowSqlException(compiledStatement, "compiled statement"); } }
[ "Return a long value from a prepared query." ]
[ "Reads and consumes a number of characters from the underlying reader,\nfilling the byte array provided.\n\n@param holder A byte array which will be filled with bytes read from the underlying reader.\n@throws ProtocolException If a char can't be read into each array element.", "Sets padding between the pages\n@param padding\n@param axis", "Handles a failed SendData request. This can either be because of the stick actively reporting it\nor because of a time-out of the transaction in the send thread.\n@param originalMessage the original message that was sent", "Configures a RequestBuilder to send an RPC request.\n\n@param <T> return type for the AsyncCallback\n@param responseReader instance used to read the return value of the\ninvocation\n@param requestData payload that encodes the addressing and arguments of the\nRPC call\n@param callback callback handler\n\n@return a RequestBuilder object that is ready to have its\n{@link RequestBuilder#send()} method invoked.", "Returns true if all pixels in the array have the same color", "Send message to socket's output stream.\n\n@param messageToSend message to send.\n\n@return {@code true} if message was sent successfully, {@code false} otherwise.", "We want to get the best result possible as this value\nis used to determine what work needs to be recovered.\n\n@return", "Send a track metadata update announcement to all registered listeners.", "Aggregate results to see the status code distribution with target hosts.\n\n@return the aggregateResultMap" ]
public void writeNameValuePair(String name, int value) throws IOException { internalWriteNameValuePair(name, Integer.toString(value)); }
[ "Write an int attribute.\n\n@param name attribute name\n@param value attribute value" ]
[ "Converters the diffusion coefficient to hydrodynamic diameter and vice versa\n@param value Diffusion coefficient in [m^2 s^-1] or hydrodynamic diameter in [m]\n@param temperatur Temperatur in [Kelvin]\n@param viscosity Viscosity in [kg m^-1 s^-1]\n@return Hydrodynmaic diameter [m] / diffusion coefficient [m^2 s^-1]", "Download a specified URL to a file\n\n@param stringUrl URL to use\n@param parameters HTTP Headers\n@param fileToSave File to save content\n@throws IOException I/O error happened", "Creates an element that represents an image drawn at the specified coordinates in the page.\n@param x the X coordinate of the image\n@param y the Y coordinate of the image\n@param width the width coordinate of the image\n@param height the height coordinate of the image\n@param type the image type: <code>\"png\"</code> or <code>\"jpeg\"</code>\n@param resource the image data depending on the specified type\n@return", "Checks, if all values necessary for a specific pattern are valid.\n@return a flag, indicating if all values required for the pattern are valid.", "Test to determine if this is a split task.\n\n@param calendar current calendar\n@param list timephased resource assignment list\n@return boolean flag", "add a foreign key field", "Use this API to fetch vrid6 resource of given name .", "Use this API to update nsspparams.", "Create a BoxStoragePolicyAssignment for a BoxStoragePolicy.\n@param api the API connection to be used by the resource.\n@param policyID the policy ID of the BoxStoragePolicy.\n@param userID the user ID of the to assign the BoxStoragePolicy to.\n@return the information about the BoxStoragePolicyAssignment created." ]
static List<List<String>> handleNewLines( List<List<String>> tableModel ) { List<List<String>> result = Lists.newArrayListWithExpectedSize( tableModel.size() ); for( List<String> row : tableModel ) { if( hasNewline( row ) ) { result.addAll( splitRow( row ) ); } else { result.add( row ); } } return result; }
[ "Handles newlines by removing them and add new rows instead" ]
[ "Store the char in the internal buffer", "Replaces an existing metadata value.\n@param path the path that designates the key. Must be prefixed with a \"/\".\n@param value the value.\n@return this metadata object.", "refresh all deliveries dependencies for a particular product", "Abort an upload session, discarding any chunks that were uploaded to it.", "Get the last non-white Y point\n@param img Image in memory\n@return The trimmed height", "Makes it possible to uniquify a collection of objects which are normally\nnon-hashable. Alternatively, it lets you define an alternate hash function\nfor them for limited-use hashing.", "Initialize the local plugins registry\n@param context the servlet context necessary to grab\nthe files inside the servlet.\n@return the set of local plugins organized by name", "Sets the specified long attribute to the specified value.\n\n@param name name of the attribute\n@param value value of the attribute\n@since 1.9.0", "Gets information about a trashed file that's limited to a list of specified fields.\n@param fileID the ID of the trashed file.\n@param fields the fields to retrieve.\n@return info about the trashed file containing only the specified fields." ]
private void addBlock(List<GenericCriteria> list, byte[] block, TestOperator operator) { GenericCriteria result = new GenericCriteria(m_properties); result.setOperator(operator); list.add(result); processBlock(result.getCriteriaList(), getChildBlock(block)); processBlock(list, getListNextBlock(block)); }
[ "Adds a logical operator block.\n\n@param list parent criteria list\n@param block current block\n@param operator logical operator represented by this block" ]
[ "Reads numBytes bytes, and returns the corresponding string", "Handles the response of the Request node request.\n@param incomingMessage the response message to process.", "Get the spin scripting environment\n\n@param language the language name\n@return the environment script as string or null if the language is\nnot in the set of languages supported by spin.", "Parses command-line and gets read-only metadata.\n\n@param args Command-line input\n@param printHelp Tells whether to print help only or execute command\nactually\n@throws IOException", "this method is not intended to be called by clients\n@since 2.12", "Initialize the class if this is being called with Spring.", "Send Identify Node message to the controller.\n@param nodeId the nodeId of the node to identify\n@throws SerialInterfaceException when timing out or getting an invalid response.", "Whether the address has the well-known prefix for IPv4 translatable addresses as in rfc 6052 and 6144\n@return", "Finds all the resource names contained in this file system folder.\n\n@param classPathRootOnDisk The location of the classpath root on disk, with a trailing slash.\n@param scanRootLocation The root location of the scan on the classpath, without leading or trailing slashes.\n@param folder The folder to look for resources under on disk.\n@return The resource names;" ]
protected List<String> parseWords(String line) { List<String> words = new ArrayList<String>(); boolean insideWord = !isSpace(line.charAt(0)); int last = 0; for( int i = 0; i < line.length(); i++) { char c = line.charAt(i); if( insideWord ) { // see if its at the end of a word if( isSpace(c)) { words.add( line.substring(last,i) ); insideWord = false; } } else { if( !isSpace(c)) { last = i; insideWord = true; } } } // if the line ended add the final word if( insideWord ) { words.add( line.substring(last)); } return words; }
[ "Extracts the words from a string. Words are seperated by a space character.\n\n@param line The line that is being parsed.\n@return A list of words contained on the line." ]
[ "Generate a sql where-clause matching the contraints defined by the array of fields\n\n@param columns array containing all columns used in WHERE clause", "Apply the layout to the each page in the list\n@param itemLayout item layout in the page\n@return true if the new layout is applied successfully, otherwise - false", "Return all scripts of a given type\n\n@param type integer value of type\n@return Array of scripts of the given type", "Use this API to fetch wisite_farmname_binding resources of given name .", "Returns a Client object for a clientUUID and profileId\n\n@param clientUUID UUID or friendlyName of client\n@param profileId - can be null, safer if it is not null\n@return Client object or null\n@throws Exception exception", "Return the path to the parent directory. Should return the root if\nfrom is root.\n\n@param from either a file or directory\n@return the parent directory", "Checks the query-customizer setting of the given collection descriptor.\n\n@param collDef The collection descriptor\n@param checkLevel The current check level (this constraint is only checked in strict)\n@exception ConstraintException If the constraint has been violated", "Switches DB type.\n\n@param dbName the database type\n@param webapp the webapp name", "Adjusts beforeIndex to account for the possibility that the given widget is\nalready a child of this panel.\n\n@param child the widget that might be an existing child\n@param beforeIndex the index at which it will be added to this panel\n@return the modified index" ]
public static <T> List<T> asImmutable(List<? extends T> self) { return Collections.unmodifiableList(self); }
[ "A convenience method for creating an immutable list\n\n@param self a List\n@return an immutable List\n@see java.util.Collections#unmodifiableList(java.util.List)\n@since 1.0" ]
[ "Determines whether there is an element of the collection that evaluates to true\nfor the predicate.\n@param\tpredicate\tAn OQL boolean query predicate.\n@return\tTrue if there is an element of the collection that evaluates to true\nfor the predicate, otherwise false.\n@exception\torg.odmg.QueryInvalidException\tThe query predicate is invalid.", "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", "Send an album art update announcement to all registered listeners.", "Extracts the column from the matrix a.\n@param a Input matrix\n@param column Which column is to be extracted\n@param out output. Storage for the extracted column. If null then a new vector will be returned.\n@return The extracted column.", "disables the current active id, enables the new one selected\n\n@param profileId profile ID of the client\n@param clientUUID UUID of the client\n@param active true to make client active, false to make client inactive\n@throws Exception exception", "Extract the generic type from the given Class object.\n@param clazz the Class to check\n@param source the expected raw source type (can be {@code null})\n@param typeIndex the index of the actual type argument\n@param nestingLevel the nesting level of the target type\n@param currentLevel the current nested level\n@return the generic type as Class, or {@code null} if none", "Interim and final clusters ought to have same partition counts, same\nzones, and same node state. Partitions per node may of course differ.\n\n@param interimCluster\n@param finalCluster", "determinates if this triangle contains the point p.\n@param p the query point\n@return true iff p is not null and is inside this triangle (Note: on boundary is considered inside!!).", "Detaches or removes the value from this context.\n\n@param key the key to the attachment.\n@param <V> the value type of the attachment.\n\n@return the attachment if found otherwise {@code null}." ]
public MetaClassRegistryChangeEventListener[] getMetaClassRegistryChangeEventListeners() { synchronized (changeListenerList) { ArrayList<MetaClassRegistryChangeEventListener> ret = new ArrayList<MetaClassRegistryChangeEventListener>(changeListenerList.size()+nonRemoveableChangeListenerList.size()); ret.addAll(nonRemoveableChangeListenerList); ret.addAll(changeListenerList); return ret.toArray(new MetaClassRegistryChangeEventListener[ret.size()]); } }
[ "Gets an array of of all registered ConstantMetaClassListener instances." ]
[ "Adds a free connection.\n\n@param connectionHandle\n@throws SQLException on error", "Handle unbind service event.\n@param service Service instance\n@param props Service reference properties", "Use this API to fetch cachepolicylabel resource of given name .", "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", "This method extracts project properties from a GanttProject file.\n\n@param ganttProject GanttProject file", "Support the subscript operator for GString.\n\n@param text a GString\n@param index the index of the Character to get\n@return the Character at the given index\n@since 2.3.7", "Serialize a parameterized object to a JSON String.\n\n@param object The object to serialize.\n@param parameterizedType The ParameterizedType describing the object. Ex: LoganSquare.serialize(object, new ParameterizedType&lt;MyModel&lt;OtherModel&gt;&gt;() { });", "Close tracks when the JVM shuts down.\n@return this", "Add the option specifying if the categories should be displayed collapsed\nwhen the dialog opens.\n\n@see org.opencms.ui.actions.I_CmsADEAction#getParams()" ]
public static WebDriverBackedEmbeddedBrowser withRemoteDriver(String hubUrl, ImmutableSortedSet<String> filterAttributes, long crawlWaitEvent, long crawlWaitReload) { return WebDriverBackedEmbeddedBrowser.withDriver(buildRemoteWebDriver(hubUrl), filterAttributes, crawlWaitEvent, crawlWaitReload); }
[ "Create a RemoteWebDriver backed EmbeddedBrowser.\n\n@param hubUrl Url of the server.\n@param filterAttributes the attributes to be filtered from DOM.\n@param crawlWaitReload the period to wait after a reload.\n@param crawlWaitEvent the period to wait after an event is fired.\n@return The EmbeddedBrowser." ]
[ "Utility method to retrieve the next working date start time, given\na date and time as a starting point.\n\n@param date date and time start point\n@return date and time of next work start", "Extracts the zip file to the output folder\n\n@param zipFile ZIP File to extract\n@param outputFolder Output Folder\n@return A Collection with the extracted files\n@throws IOException I/O Error", "Prints text to output stream, replacing parameter start and end\nplaceholders\n\n@param text the String to print", "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", "Convert a string to a URL and fallback to classpath resource, if not convertible.\n\n@param s\nThe string to convert.\n\n@return The URL.", "Use this API to unset the properties of nslimitselector resources.\nProperties that need to be unset are specified in args array.", "Handles the response of the getVersion request.\n@param incomingMessage the response message to process.", "Use this API to fetch the statistics of all protocolip_stats resources that are configured on netscaler.", "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" ]
@Nullable public Boolean getBoolean(@Nonnull final String key) { return (Boolean) this.values.get(key); }
[ "Get a boolean value from the values or null.\n\n@param key the look up key of the value" ]
[ "Creates a map of metadata from json.\n@param jsonObject metadata json object for metadata field in get /files?fileds=,etadata.scope.template response\n@return Map of String as key a value another Map with a String key and Metadata value", "Use this API to change appfwsignatures.", "Read data for an individual task from the tables in a PEP file.\n\n@param parent parent task\n@param id task ID\n@return task instance", "Returns the \"short rate\" from timeIndex to timeIndex+1.\n\n@param timeIndex The time index (corresponding to {@link getTime()).\n@return The \"short rate\" from timeIndex to timeIndex+1.\n@throws CalculationException Thrown if simulation failed.", "Log original response\n\n@param httpServletResponse\n@param history\n@throws URIException", "Return the TransactionManager of the external app", "Retrieve the integer value used to represent a task field in an\nMPX file.\n\n@param value MPXJ task field value\n@return MPX field value", "Skips the given count of bytes, but at most the currently available count.\n\n@return number of bytes actually skipped from this buffer (0 if no bytes are available)", "Returns an MBeanServer with the specified name\n\n@param name\n@return" ]
private static String guessPackaging(ProjectModel projectModel) { String projectType = projectModel.getProjectType(); if (projectType != null) return projectType; LOG.warning("WINDUP-983 getProjectType() returned null for: " + projectModel.getRootFileModel().getPrettyPath()); String suffix = StringUtils.substringAfterLast(projectModel.getRootFileModel().getFileName(), "."); if ("jar war ear sar har ".contains(suffix+" ")){ projectModel.setProjectType(suffix); // FIXME: Remove when WINDUP-983 is fixed. return suffix; } // Should we try something more? Used APIs? What if it's a source? return "unknown"; }
[ "Tries to guess the packaging of the archive - whether it's an EAR, WAR, JAR.\nMaybe not needed as we can rely on the suffix?" ]
[ "Sets the distance from the origin to the far clipping plane for the\nwhole camera rig.\n\n@param far\nDistance to the far clipping plane.", "Get information about this database.\n\n@return DbInfo encapsulating the database info\n@see <a\nhref=\"https://console.bluemix.net/docs/services/Cloudant/api/database.html#getting-database-details\"\ntarget=\"_blank\">Databases - read</a>", "Set the TableAlias for ClassDescriptor", "Inserts a new instance but references via the outIdentifier, which is returned as part of the ExecutionResults\n\n@param object\n@param outIdentifier\n@return", "Checks if the name of the file follows the version-n format\n\n@param versionDir The directory\n@return Returns true if the name is correct, else false", "Process the scheduling project property from PROJPROP. This table only seems to exist\nin P6 databases, not XER files.\n\n@throws SQLException", "Add a property.", "Sets the HTML entity translator.\nIt will also remove any other translator set.\nNothing will happen if the argument is null.\n@param htmlElementTranslator translator", "Use this API to fetch responderpolicylabel_responderpolicy_binding resources of given name ." ]
public static double volatilityConversionLognormalATMtoNormalATM(double forward, double displacement, double maturity, double lognormalVolatiltiy) { double x = lognormalVolatiltiy * Math.sqrt(maturity / 8); double y = org.apache.commons.math3.special.Erf.erf(x); double normalVol = Math.sqrt(2*Math.PI / maturity) * (forward+displacement) * y; return normalVol; }
[ "Exact conversion of displaced lognormal ATM volatiltiy to normal ATM volatility.\n\n@param forward The forward\n@param displacement The displacement (considering a displaced lognormal model, otherwise 0.\n@param maturity The maturity\n@param lognormalVolatiltiy The (implied) lognormal volatility.\n@return The (implied) normal volatility.\n@see <a href=\"http://papers.ssrn.com/sol3/papers.cfm?abstract_id=2687742\">Dimitroff, Fries, Lichtner and Rodi: Lognormal vs Normal Volatilities and Sensitivities in Practice</a>" ]
[ "Writes and reads the XOP attachment using a CXF JAX-RS WebClient.\nNote that WebClient is created with the help of JAXRSClientFactoryBean.\nJAXRSClientFactoryBean can be used when neither of the WebClient factory\nmethods is appropriate. For example, in this case, an \"mtom-enabled\"\nproperty is set on the factory bean first.\n\n\n@throws Exception", "Mutate the gradient.\n@param amount the amount in the range zero to one", "Init the bundle type member variable.\n@return the bundle type of the opened resource.", "Executes a method on the server asynchronously", "Returns the property value read from the given JavaBean.\n\n@param bean the JavaBean to read the property from\n@param property the property to read\n\n@return the property value read from the given JavaBean", "Sets the path to the script file to load and loads the script.\n\n@param filePath path to script file\n@throws IOException if the script cannot be read.\n@throws GVRScriptException if a script processing error occurs.", "Use this API to delete nsip6.", "Check that the parameter array has at least as many elements as it\nshould.\n\n@param parameterName\nThe name of the user-supplied parameter that we are validating\nso that the user can easily find the error in their code.\n@param actualLength\nThe actual array length\n@param minimumLength\nThe minimum array length", "generates a Meta Object Protocol method, that is used to call a non public\nmethod, or to make a call to super.\n\n@param mopCalls list of methods a mop call method should be generated for\n@param useThis true if \"this\" should be used for the naming" ]
public void postBuildInfo(final String moduleName, final String moduleVersion, final Map<String, String> buildInfo, final String user, final String password) throws GrapesCommunicationException, AuthenticationException { final Client client = getClient(user, password); final WebResource resource = client.resource(serverURL).path(RequestUtils.getBuildInfoPath(moduleName, moduleVersion)); final ClientResponse response = resource.type(MediaType.APPLICATION_JSON).post(ClientResponse.class, buildInfo); client.destroy(); if(ClientResponse.Status.CREATED.getStatusCode() != response.getStatus()){ final String message = "Failed to POST buildInfo"; if(LOG.isErrorEnabled()) { LOG.error(String.format(HTTP_STATUS_TEMPLATE_MSG, message, response.getStatus())); } throw new GrapesCommunicationException(message, response.getStatus()); } }
[ "Post a build info to the server\n\n@param moduleName String\n@param moduleVersion String\n@param buildInfo Map<String,String>\n@param user String\n@param password String\n@throws GrapesCommunicationException\n@throws javax.naming.AuthenticationException" ]
[ "An extremely simple method for identifying multimedia. This\ncould be improved, but it's good enough for this example.\n\n@param file which could be an image or a video\n@return true if the file can be previewed, false otherwise", "Get the real Object\n\n@param objectOrProxy\n@return Object", "Sets the path to the script file to load and loads the script.\n\n@param filePath path to script file\n@throws IOException if the script cannot be read.\n@throws GVRScriptException if a script processing error occurs.", "Retrieves the real subject from the underlying RDBMS. Override this\nmethod if the object is to be materialized in a specific way.\n\n@return The real subject of the proxy", "Update the project properties from the project summary task.\n\n@param task project summary task", "Process StepFinishedEvent. Change last added to stepStorage step\nand add it as child of previous step.\n\n@param event to process", "Retrieve and validate the timeout value from the REST request.\n\"X_VOLD_REQUEST_TIMEOUT_MS\" is the timeout header.\n\n@return true if present, false if missing", "Checks if the given group of statements contains the given value as the\nvalue of a main snak of some statement.\n\n@param statementGroup\nthe statement group to scan\n@param value\nthe value to scan for\n@return true if value was found", "Use this API to fetch vpnvserver_vpnsessionpolicy_binding resources of given name ." ]
private void checkAnonymous(FieldDescriptorDef fieldDef, String checkLevel) throws ConstraintException { if (CHECKLEVEL_NONE.equals(checkLevel)) { return; } String access = fieldDef.getProperty(PropertyHelper.OJB_PROPERTY_ACCESS); if (!"anonymous".equals(access)) { throw new ConstraintException("The access property of the field "+fieldDef.getName()+" defined in class "+fieldDef.getOwner().getName()+" cannot be changed"); } if ((fieldDef.getName() == null) || (fieldDef.getName().length() == 0)) { throw new ConstraintException("An anonymous field defined in class "+fieldDef.getOwner().getName()+" has no name"); } }
[ "Checks anonymous fields.\n\n@param fieldDef The field descriptor\n@param checkLevel The current check level (this constraint is checked in basic and strict)\n@exception ConstraintException If the constraint has been violated" ]
[ "Convert raw data into Java types.\n\n@param type data type\n@param data raw data\n@return list of Java object", "Generate the init script from the Artifactory URL.\n\n@return The generated script.", "Perform a one-off scan during boot to establish deployment tasks to execute during boot", "Looks up the object from the cache\n\n@param oid The Identity to look up the object for\n@return The object if found, otherwise null", "This method retrieves the next token and returns a constant representing\nthe type of token found.\n\n@return token type value", "init database with demo data", "Update the Target Filter of the ExporterService.\nApply the induce modifications on the links of the ExporterService\n\n@param serviceReference", "Return all Clients for a profile\n\n@param profileId ID of profile clients belong to\n@return collection of the Clients found\n@throws Exception exception", "Get the collection of untagged photos.\n\nThis method requires authentication with 'read' permission.\n\n@param perPage\n@param page\n@return A Collection of Photos\n@throws FlickrException" ]
private int getTaskCode(String field) throws MPXJException { Integer result = m_taskNumbers.get(field.trim()); if (result == null) { throw new MPXJException(MPXJException.INVALID_TASK_FIELD_NAME + " " + field); } return (result.intValue()); }
[ "Returns code number of Task field supplied.\n\n@param field - name\n@return - code no" ]
[ "Translate a path that has previously been unescaped and unquoted.\nThat is called at command execution when the calue is retrieved prior to be\nused as ModelNode value.\n@param path The unquoted, unescaped path.\n@return A path with ~ and default dir expanded.", "Compares two sets of snaks, given by iterators. The method is optimised\nfor short lists of snaks, as they are typically found in claims and\nreferences.\n\n@param snaks1\n@param snaks2\n@return true if the lists are equal", "This is a temporary measure until we have a type-safe solution for\nretrieving serializers from a SerializerFactory. It avoids warnings all\nover the codebase while making it easy to verify who calls it.", "Another method to force an input string into a fixed width field\nand set it on the right with the left side filled with space ' ' characters.\n\n@param input input string\n@param width required width\n@return formatted string", "lookup a ClassDescriptor in the internal Hashtable\n@param strClassName a fully qualified class name as it is returned by Class.getName().", "Prints a suggestion to stderr for the argument based on the levenshtein distance metric\n\n@param arg the argument which could not be assigned to a flag\n@param co the {@link ConfigOption} List where every flag is stored", "This method tells you if a ClassNode implements or extends a certain class.\n@param node\nthe node\n@param target\nthe class\n@return\ntrue if the class node 'is a' target", "This method extracts project properties from a Phoenix file.\n\n@param phoenixSettings Phoenix settings\n@param storepoint Current storepoint", "Moves the drawer to the position passed.\n\n@param position The position the content is moved to.\n@param velocity Optional velocity if called by releasing a drag event.\n@param animate Whether the move is animated." ]
private void writeTask(Task task) throws IOException { writeFields(null, task, TaskField.values()); for (Task child : task.getChildTasks()) { writeTask(child); } }
[ "This method is called recursively to write a task and its child tasks\nto the JSON file.\n\n@param task task to write" ]
[ "This method extracts data for an exception day from an MSPDI file.\n\n@param calendar Calendar data\n@param day Day data", "Gives the \"roots\" of a list of folders, i.e. the list of folders which are not descendants of any other folders in the original list\n@param folders the original list of folders\n@return the root folders of the list", "Use this API to fetch vpnvserver_vpnsessionpolicy_binding resources of given name .", "Return true only if the node has any of the named annotations\n@param node - the AST Node to check\n@param names - the names of the annotations\n@return true only if the node has any of the named annotations", "Retrieves the baseline duration text value.\n\n@param baselineNumber baseline number\n@return baseline duration text value", "Create new logging action\nThis method check if there is an old instance for this thread-local\nIf not - Initialize new instance and set it as this thread-local's instance\n@param logger\n@param auditor\n@param instance\n@return whether new instance was set to thread-local", "Get DPI suggestions.\n\n@return DPI suggestions", "Validate arguments and state.", "Encodes the given URI path segment with the given encoding.\n@param segment the segment to be encoded\n@param encoding the character encoding to encode to\n@return the encoded segment\n@throws UnsupportedEncodingException when the given encoding parameter is not supported" ]
public void readTags(InputStream tagsXML) { SAXParserFactory factory = SAXParserFactory.newInstance(); try { SAXParser saxParser = factory.newSAXParser(); saxParser.parse(tagsXML, new TagsSaxHandler(this)); } catch (ParserConfigurationException | SAXException | IOException ex) { throw new RuntimeException("Failed parsing the tags definition: " + ex.getMessage(), ex); } }
[ "Read the tag structure from the provided stream." ]
[ "Creates an Odata filter string that can be used for filtering list results by tags.\n\n@param tagName the name of the tag. If not provided, all resources will be returned.\n@param tagValue the value of the tag. If not provided, only tag name will be filtered.\n@return the Odata filter to pass into list methods", "Marks the given list of statements for deletion. It is verified that the\ncurrent document actually contains the statements before doing so. This\ncheck is based on exact statement equality, including qualifier order and\nstatement id.\n\n@param currentDocument\nthe document with the current statements\n@param deleteStatements\nthe list of statements to be deleted", "Put a new value in map.\n\n@param key id of the value for looking up.\n@param value the value.", "Inserts the provided document. If the document is missing an identifier, the client should\ngenerate one.\n\n@param document the document to insert\n@return a task containing the result of the insert one operation", "Runs the given xpath and returns a boolean result.", "Creates needed textfields for general label in footer groups.\n@param djgroup\n@param jgroup", "Queues a job for execution in specified time.\n\n@param job the job.\n@param millis execute the job in this time.", "Gets the actual type arguments of a class\n\n@param clazz The class to examine\n@return The type arguments", "This method writes data for a single calendar to an MSPDI file.\n\n@param bc Base calendar data\n@return New MSPDI calendar instance" ]
protected void threadWatch(final ConnectionHandle c) { this.threadFinalizableRefs.put(c, new FinalizableWeakReference<Thread>(Thread.currentThread(), this.finalizableRefQueue) { public void finalizeReferent() { try { if (!CachedConnectionStrategy.this.pool.poolShuttingDown){ logger.debug("Monitored thread is dead, closing off allocated connection."); } c.internalClose(); } catch (SQLException e) { e.printStackTrace(); } CachedConnectionStrategy.this.threadFinalizableRefs.remove(c); } }); }
[ "Keep track of this handle tied to which thread so that if the thread is terminated\nwe can reclaim our connection handle. We also\n@param c connection handle to track." ]
[ "Add an individual class to the map file.\n\n@param loader jar file class loader\n@param jarEntry jar file entry\n@param writer XML stream writer\n@param mapClassMethods true if we want to produce .Net style class method names\n@throws ClassNotFoundException\n@throws XMLStreamException\n@throws IntrospectionException", "Return a list of unique namespace and predicate pairs, optionally limited by predicate or namespace, in alphabetical order.\n\nThis method does not require authentication.\n\n@param namespace\noptional, can be null\n@param predicate\noptional, can be null\n@param perPage\nThe number of photos to show per page\n@param page\nThe page offset\n@return NamespacesList containing Pair-objects\n@throws FlickrException", "Read a single outline code field extended attribute.\n\n@param entityID parent entity\n@param row field data", "Set the color for each total for the column\n@param column the number of the column (starting from 1)\n@param color", "Merges a specialized archetype with its parent. Merge will be done in-place on the specialized parameter.\n\n@param flatParent Flat parent archetype\n@param specialized Specialized archetype", "Adds, eventually merging, a direction for the specified relation type\n@param relationType\n@param direction", "Get the sub registry for the hosts.\n\n@param range the version range\n@return the sub registry", "Checks if the link target is a secure link.<p\n\n@param cms the current CMS context\n@param vfsName the path of the link target\n@param targetSite the target site containing the detail page\n@param secureRequest true if the currently running request is secure\n\n@return true if the link should be a secure link", "Take a stab at fixing validation problems ?\n\n@param object" ]
public MediaType copyQualityValue(MediaType mediaType) { if (!mediaType.parameters.containsKey(PARAM_QUALITY_FACTOR)) { return this; } Map<String, String> params = new LinkedHashMap<String, String>(this.parameters); params.put(PARAM_QUALITY_FACTOR, mediaType.parameters.get(PARAM_QUALITY_FACTOR)); return new MediaType(this, params); }
[ "Return a replica of this instance with the quality value of the given MediaType.\n@return the same instance if the given MediaType doesn't have a quality value, or a new one otherwise" ]
[ "Non-supported in JadeAgentIntrospector", "Record the checkout wait time in us\n\n@param dest Destination of the socket to checkout. Will actually record\nif null. Otherwise will call this on self and corresponding child\nwith this param null.\n@param checkoutTimeUs The number of us to wait before getting a socket", "find all accessibility object and set active true for enable talk back.", "Returns the bundle jar classpath element.", "Moves a calendar to the nth named day of the month.\n\n@param calendar current date\n@param dayNumber nth day", "Allows to access the identifiers of the current defined roundings.\n\n@param providers the providers and ordering to be used. By default providers and ordering as defined in\n#getDefaultProviders is used, not null.\n@return the set of custom rounding ids, never {@code null}.", "Counts a single pair of coordinates in all datasets.\n\n@param xCoord\n@param yCoord\n@param itemDocument", "Gets the value for the key.\n\n@param key the key to check for the value\n\n@return the value or an empty collection if no values were set", "Adds an option to the JVM arguments to enable JMX connection\n\n@param jvmArgs the JVM args\n@return a new list of JVM args" ]
public ParallelTaskBuilder prepareHttpDelete(String url) { reinitIfClosed(); ParallelTaskBuilder cb = new ParallelTaskBuilder(); cb.getHttpMeta().setHttpMethod(HttpMethod.DELETE); cb.getHttpMeta().setRequestUrlPostfix(url); return cb; }
[ "Prepare a parallel HTTP DELETE Task.\n\n@param url\nthe UrlPostfix: e.g. in http://localhost:8080/index.html.,the url is \"/index.html\"\n@return the parallel task builder" ]
[ "Sets the yearly absolute date.\n\n@param date yearly absolute date", "Prints a debug log message that details the time taken for the Http\nrequest to be parsed by the coordinator\n\n@param operationType\n@param receivedTimeInMs", "Specifies the container object class to be instantiated\n\n@param containerObjectClass\ncontainer object class to be instantiated\n\n@return the current builder instance", "Return the project name or the default project name.", "Rethrows OperationCanceledErrors and wraps platform specific OperationCanceledExceptions. Does nothing for any other type of Throwable.", "Get the bone index for the given scene object.\n\n@param bone GVRSceneObject bone to search for\n@return bone index or -1 for root bone.\n@see #getParentBoneIndex", "Build the query to perform a batched read get orderBy settings from CollectionDescriptor\n\n@param ids Collection containing all identities of objects of the ONE side", "This method extracts data for an exception day from an MSPDI file.\n\n@param calendar Calendar data\n@param day Day data", "Gets all tags that are \"prime\" tags." ]
public Organization getModuleOrganization(final String moduleName, final String moduleVersion) throws GrapesCommunicationException { final Client client = getClient(); final WebResource resource = client.resource(serverURL).path(RequestUtils.getModuleOrganizationPath(moduleName, moduleVersion)); final ClientResponse response = resource .accept(MediaType.APPLICATION_JSON).get(ClientResponse.class); client.destroy(); if(ClientResponse.Status.OK.getStatusCode() != response.getStatus()){ final String message = "Failed to get module's organization"; if(LOG.isErrorEnabled()) { LOG.error(String.format(HTTP_STATUS_TEMPLATE_MSG, message, response.getStatus())); } throw new GrapesCommunicationException(message, response.getStatus()); } return response.getEntity(Organization.class); }
[ "Returns the organization of a given module\n\n@return Organization" ]
[ "Returns the ARGB components for all pixels in this image\n\n@return an array containing an array for each ARGB components in that order.", "Set the groups assigned to a path\n\n@param groups group IDs to set\n@param pathId ID of path", "This method is called to format a constraint type.\n\n@param type constraint type\n@return formatted constraint type", "Populate the UDF values for this entity.\n\n@param tableName parent table name\n@param type entity type\n@param container entity\n@param uniqueID entity Unique ID", "Checks the foreignkeys of all collections in the model.\n\n@param modelDef The model\n@param checkLevel The current check level (this constraint is checked in basic and strict)\n@exception ConstraintException If the value for foreignkey is invalid", "Derives the OJB platform to use for a database that is connected via a url using the specified\nsubprotocol, and where the specified jdbc driver is used.\n\n@param jdbcSubProtocol The JDBC subprotocol used to connect to the database\n@param jdbcDriver The JDBC driver used to connect to the database\n@return The platform identifier or <code>null</code> if no platform could be found", "Use this API to update ntpserver.", "Stores the gathered usage statistics about property uses to a CSV file.\n\n@param usageStatistics\nthe statistics to store\n@param fileName\nthe name of the file to use", "Given a resource field name, this method returns the resource field number.\n\n@param field resource field name\n@return resource field number" ]
public void addFilter(Filter filter) { if (filter.isTaskFilter()) { m_taskFilters.add(filter); } if (filter.isResourceFilter()) { m_resourceFilters.add(filter); } m_filtersByName.put(filter.getName(), filter); m_filtersByID.put(filter.getID(), filter); }
[ "Adds a filter definition to this project file.\n\n@param filter filter definition" ]
[ "Creates a random symmetric matrix whose values are selected from an uniform distribution\nfrom min to max, inclusive.\n\n@param length Width and height of the matrix.\n@param min Minimum value an element can have.\n@param max Maximum value an element can have.\n@param rand Random number generator.\n@return A symmetric matrix.", "Added in Gerrit 2.11.", "Use this API to update inat resources.", "Closes the output. Should be called after the JSON serialization was\nfinished.\n\n@throws IOException\nif there was a problem closing the output", "Send ourselves \"updates\" about any tracks that were loaded before we started, or before we were requesting\ndetails, since we missed them.", "Compute the proportional padding for all items in the cache\n@param cache Cache data set\n@return the uniform padding amount", "Get the literal value for an expression.\n\n@param expression expression\n@return literal value", "Extract a Class from the given Type.", "The transaction will be executed. While it is running, any semantic state change\nin the given resource will be ignored and the cache will not be cleared." ]
private void populateDefaultData(FieldItem[] defaultData) { for (FieldItem item : defaultData) { m_map.put(item.getType(), item); } }
[ "This method takes an array of data and uses this to populate the\nfield map.\n\n@param defaultData field map default data" ]
[ "Skips variable length blocks up to and including next zero length block.", "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>.", "Returns the List value of the field.\n\n@return the List value of the field. It returns a reference of the value if the type is <code>LIST</code>, if\nthe type is <code>LIST_MAP</code> it returns a copy of the value.\n@throws IllegalArgumentException if the value cannot be converted to List.", "width of input section", "Calculate the highlight color. Saturate at 0xff to make sure that high values\ndon't result in aliasing.\n\n@param _Slice The Slice which will be highlighted.", "To populate the dropdown list from the jelly", "Deletes a product from the database\n\n@param name String", "Gets the health memory.\n\n@return the health memory", "Returns true if this entity's primary key is not null, and for numeric\nfields, is non-zero." ]
private void stream(InputStream is, File destFile) throws IOException { try { startProgress(); OutputStream os = new FileOutputStream(destFile); boolean finished = false; try { byte[] buf = new byte[1024 * 10]; int read; while ((read = is.read(buf)) >= 0) { os.write(buf, 0, read); processedBytes += read; logProgress(); } os.flush(); finished = true; } finally { os.close(); if (!finished) { destFile.delete(); } } } finally { is.close(); completeProgress(); } }
[ "Copy bytes from an input stream to a file and log progress\n@param is the input stream to read\n@param destFile the file to write to\n@throws IOException if an I/O error occurs" ]
[ "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", "Visit an open package of the current module.\n\n@param packaze the qualified name of the opened package.\n@param access the access flag of the opened package,\nvalid values are among {@code ACC_SYNTHETIC} and\n{@code ACC_MANDATED}.\n@param modules the qualified names of the modules that can use deep\nreflection to the classes of the open package or\n<tt>null</tt>.", "Implements the AAD Algorithm\n@return HashMap where the key is the internal index of the random variable with respect to which the partial derivative was computed. This key then gives access to the actual derivative.", "Processes a procedure tag.\n\n@param template The template\n@param attributes The attributes of the tag\n@exception XDocletException If an error occurs\[email protected] type=\"content\"\[email protected] name=\"arguments\" optional=\"true\" description=\"The arguments of the procedure as a comma-separated\nlist of names of procedure attribute tags\"\[email protected] name=\"attributes\" optional=\"true\" description=\"Attributes of the procedure as name-value pairs 'name=value',\nseparated by commas\"\[email protected] name=\"documentation\" optional=\"true\" description=\"Documentation on the procedure\"\[email protected] name=\"include-all-fields\" optional=\"true\" description=\"For insert/update: whether all fields of the current\nclass shall be included (arguments is ignored then)\" values=\"true,false\"\[email protected] name=\"include-pk-only\" optional=\"true\" description=\"For delete: whether all primary key fields\nshall be included (arguments is ignored then)\" values=\"true,false\"\[email protected] name=\"name\" optional=\"false\" description=\"The name of the procedure\"\[email protected] name=\"return-field-ref\" optional=\"true\" description=\"Identifies the field that receives the return value\"\[email protected] name=\"type\" optional=\"false\" description=\"The type of the procedure\" values=\"delete,insert,update\"", "Use this API to update gslbservice.", "compute Sin using Taylor Series.\n\n@param x An angle, in radians.\n@param nTerms Number of terms.\n@return Result.", "Renames the current base log file to the roll file name.\n\n@param from\nThe current base log file.\n@param to\nThe backup file.", "Pushes a class type onto the stack from the string representation This can\nalso handle primitives\n\n@param b the bytecode\n@param classType the type descriptor for the class or primitive to push.\nThis will accept both the java.lang.Object form and the\nLjava/lang/Object; form", "get the result speech recognize and find match in strings file.\n\n@param speechResult" ]
private void deliverMasterChangedAnnouncement(final DeviceUpdate update) { for (final MasterListener listener : getMasterListeners()) { try { listener.masterChanged(update); } catch (Throwable t) { logger.warn("Problem delivering master changed announcement to listener", t); } } }
[ "Send a master changed announcement to all registered master listeners.\n\n@param update the message announcing the new tempo master" ]
[ "Use this API to rename a nsacl6 resource.", "Get a property as a object or throw exception.\n\n@param key the property name", "If the variable is a local temporary variable it will be resized so that the operation can complete. If not\ntemporary then it will not be reshaped\n@param mat Variable containing the matrix\n@param numRows Desired number of rows\n@param numCols Desired number of columns", "Associate the batched Children with their owner object.\nLoop over owners", "Compute 1-dimensional Perlin noise.\n@param x the x value\n@return noise value at x in the range -1..1", "Checks if data set is mandatory but missing or non repeatable but having\nmultiple values in this IIM instance.\n\n@param info\nIIM data set to check\n@return list of constraint violations, empty set if data set is valid", "Adds a member to this group with the specified role.\n@param user the member to be added to this group.\n@param role the role of the user in this group. Can be null to assign the default role.\n@return info about the new group membership.", "This is a convenience method used to add a default set of calendar\nhours to a calendar.\n\n@param day Day for which to add default hours for", "This method writes extended attribute data for an assignment.\n\n@param xml MSPDI assignment\n@param mpx MPXJ assignment" ]
public static authenticationradiuspolicy_vpnvserver_binding[] get(nitro_service service, String name) throws Exception{ authenticationradiuspolicy_vpnvserver_binding obj = new authenticationradiuspolicy_vpnvserver_binding(); obj.set_name(name); authenticationradiuspolicy_vpnvserver_binding response[] = (authenticationradiuspolicy_vpnvserver_binding[]) obj.get_resources(service); return response; }
[ "Use this API to fetch authenticationradiuspolicy_vpnvserver_binding resources of given name ." ]
[ "Accesses a property from the DB configuration for the selected DB.\n\n@param name the name of the property\n@return the value of the property", "Get the available sizes of a Photo.\n\nThe boolean toggle allows to (api-)sign the call.\n\nThis way the calling user can retrieve sizes for <b>his own</b> private photos.\n\n@param photoId\nThe photo ID\n@param sign\ntoggle to allow optionally signing the call (Authenticate)\n@return A collection of {@link Size}\n@throws FlickrException", "Creates the automaton map.\n\n@param prefix the prefix\n@param valueList the value list\n@param filter the filter\n@return the map", "Prepares a Jetty server for communicating with consumers.", "Reads the table data from an input stream and breaks\nit down into rows.\n\n@param is input stream", "Adds NOT BETWEEN criteria,\ncustomer_id not 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", "Retrieves state and metrics information for individual client connection.\n\n@param name connection name\n@return connection information", "Returns the default conversion for the given java type.\n\n@param javaType The qualified java type\n@return The default conversion or <code>null</code> if there is no default conversion for the type", "Use this API to add nslimitselector." ]
@SuppressWarnings({"UnusedDeclaration"}) protected void doApi(StaplerRequest req, StaplerResponse resp) throws IOException, ServletException { try { log.log(Level.INFO, "Initiating Artifactory Release Staging using API"); // Enforce release permissions project.checkPermission(ArtifactoryPlugin.RELEASE); // In case a staging user plugin is configured, the init() method invoke it: init(); // Read the values provided by the staging user plugin and assign them to data members in this class. // Those values can be overriden by URL arguments sent with the API: readStagingPluginValues(); // Read values from the request and override the staging plugin values: overrideStagingPluginParams(req); // Schedule the release build: Queue.WaitingItem item = Jenkins.getInstance().getQueue().schedule( project, 0, new Action[]{this, new CauseAction(new Cause.UserIdCause())} ); if (item == null) { log.log(Level.SEVERE, "Failed to schedule a release build following a Release API invocation"); resp.setStatus(StaplerResponse.SC_INTERNAL_SERVER_ERROR); } else { String url = req.getContextPath() + '/' + item.getUrl(); JSONObject json = new JSONObject(); json.element("queueItem", item.getId()); json.element("releaseVersion", getReleaseVersion()); json.element("nextVersion", getNextVersion()); json.element("releaseBranch", getReleaseBranch()); // Must use getOutputStream as sendRedirect uses getOutputStream (and closes it) resp.getOutputStream().print(json.toString()); resp.sendRedirect(201, url); } } catch (Exception e) { log.log(Level.SEVERE, "Artifactory Release Staging API invocation failed: " + e.getMessage(), e); resp.setStatus(StaplerResponse.SC_INTERNAL_SERVER_ERROR); ErrorResponse errorResponse = new ErrorResponse(StaplerResponse.SC_INTERNAL_SERVER_ERROR, e.getMessage()); ObjectMapper mapper = new ObjectMapper(); mapper.enable(SerializationFeature.INDENT_OUTPUT); resp.getWriter().write(mapper.writeValueAsString(errorResponse)); } }
[ "This method is used to initiate a release staging process using the Artifactory Release Staging API." ]
[ "Find the index of the specified name in field name array.", "Returns the z-coordinate of a vertex position.\n\n@param vertex the vertex index\n@return the z coordinate", "Use this API to add autoscaleaction.", "Try to reconnect to a started server.", "Given an array of variable names, returns a JsonObject\nof values.\n\n@param dataMap an map containing variable names and their corresponding values\nnames.\n@return a json object of values", "Make all elements of a String array lower case.\n@param strings string array, may contain null item but can't be null\n@return array containing all provided elements lower case", "Parses an adl source into a differential archetype.\n\n@param adl contents of an adl source file\n@return parsed archetype\n@throws org.openehr.adl.parser.AdlParserException if an error occurred while parsing", "makes a deep clone of the object, using reflection.\n@param toCopy the object you want to copy\n@return", "Commits the writes to the remote collection." ]
public static base_responses disable(nitro_service client, Long clid[]) throws Exception { base_responses result = null; if (clid != null && clid.length > 0) { clusterinstance disableresources[] = new clusterinstance[clid.length]; for (int i=0;i<clid.length;i++){ disableresources[i] = new clusterinstance(); disableresources[i].clid = clid[i]; } result = perform_operation_bulk_request(client, disableresources,"disable"); } return result; }
[ "Use this API to disable clusterinstance resources of given names." ]
[ "Use this API to enable the mode on Netscaler.\n@param mode mode to be enabled.\n@return status of the operation performed.\n@throws Exception Nitro exception.", "Returns the z-coordinate of a vertex normal.\n\n@param vertex the vertex index\n@return the z coordinate", "Stores the output from a Frontier into the queue, pausing and waiting if the given queue is too large\n\n@param resultsMap map of String and String representing the output of a Frontier's DFS", "Use this API to update vridparam.", "Look at the comments on cluster variable to see why this is problematic", "Removes the given object from the cache\n\n@param oid oid of the object to remove", "Use this API to fetch aaagroup_vpnsessionpolicy_binding resources of given name .", "Adapt a file path to the current file system.\n@param filePath The input file path string.\n@return File path compatible with the file system of this {@link GVRResourceVolume}.", "Determine the consistency level of a key\n\n@param versionNodeSetMap A map that maps version to set of PrefixNodes\n@param replicationFactor Total replication factor for the set of clusters\n@return ConsistencyLevel Enum" ]
public void loadModel(GVRAndroidResource avatarResource, String attachBone) { EnumSet<GVRImportSettings> settings = GVRImportSettings.getRecommendedSettingsWith(EnumSet.of(GVRImportSettings.OPTIMIZE_GRAPH, GVRImportSettings.NO_ANIMATION)); GVRContext ctx = mAvatarRoot.getGVRContext(); GVRResourceVolume volume = new GVRResourceVolume(ctx, avatarResource); GVRSceneObject modelRoot = new GVRSceneObject(ctx); GVRSceneObject boneObject; int boneIndex; if (mSkeleton == null) { throw new IllegalArgumentException("Cannot attach model to avatar - there is no skeleton"); } boneIndex = mSkeleton.getBoneIndex(attachBone); if (boneIndex < 0) { throw new IllegalArgumentException(attachBone + " is not a bone in the avatar skeleton"); } boneObject = mSkeleton.getBone(boneIndex); if (boneObject == null) { throw new IllegalArgumentException(attachBone + " does not have a bone object in the avatar skeleton"); } boneObject.addChildObject(modelRoot); ctx.getAssetLoader().loadModel(volume, modelRoot, settings, false, mLoadModelHandler); }
[ "Load a model to attach to the avatar\n@param avatarResource resource with avatar model\n@param attachBone name of bone to attach model to" ]
[ "Return a String with linefeeds and carriage returns normalized to linefeeds.\n\n@param self a CharSequence object\n@return the normalized toString() for the CharSequence\n@see #normalize(String)\n@since 1.8.2", "Just collapses digits to 9 characters.\nDoes lazy copying of String.\n\n@param s String to find word shape of\n@return The same string except digits are equivalence classed to 9.", "Writes OWL declarations for all basic vocabulary elements used in the\ndump.\n\n@throws RDFHandlerException", "Removes a child task.\n\n@param child child task instance", "Deletes the inbox message for given messageId\n@param messageId String messageId\n@return boolean value based on success of operation", "Use this API to unset the properties of nsrpcnode resource.\nProperties that need to be unset are specified in args array.", "Tell a device to turn sync on or off.\n\n@param deviceNumber the device whose sync state is to be set\n@param synced {@code} true if sync should be turned on, else it will be turned off\n\n@throws IOException if there is a problem sending the command to the device\n@throws IllegalStateException if the {@code VirtualCdj} is not active\n@throws IllegalArgumentException if {@code deviceNumber} is not found on the network", "Returns the given dialect, narrowed down to the given dialect facet in case it is implemented by the dialect.\n\n@param gridDialect the dialect of interest\n@param facetType the dialect facet type of interest\n@return the given dialect, narrowed down to the given dialect facet or {@code null} in case the given dialect\ndoes not implement the given facet", "Gets Widget bounds width\n@return width" ]
public String[] getItemsSelected() { List<String> selected = new LinkedList<>(); for (int i = getIndexOffset(); i < listBox.getItemCount(); i++) { if (listBox.isItemSelected(i)) { selected.add(listBox.getValue(i)); } } return selected.toArray(new String[selected.size()]); }
[ "Returns all selected values of the list box, or empty array if none.\n\n@return the selected values of the list box" ]
[ "return currently-loaded Proctor instance, throwing IllegalStateException if not loaded", "Returns all the retention policies with specified filters.\n@param name a name to filter the retention policies by. A trailing partial match search is performed.\nSet to null if no name filtering is required.\n@param type a policy type to filter the retention policies by. Set to null if no type filtering is required.\n@param userID a user id to filter the retention policies by. Set to null if no type filtering is required.\n@param limit the limit of items per single response. The default value is 100.\n@param api the API connection to be used by the resource.\n@param fields the fields to retrieve.\n@return an iterable with all the retention policies met search conditions.", "set the Modification state to a new value. Used during state transitions.\n@param newModificationState org.apache.ojb.server.states.ModificationState", "Propagates the names of all facets to each single facet.", "Create the CML Options.\n\n@return Options expected from command-line.", "Adds a tag to a task. Returns an empty data block.\n\n@param task The task to add a tag to.\n@return Request object", "Adds the given service provider factory to the set of\nproviders for the service.\n\n@param serviceName\nThe fully qualified name of the service interface.\n@param factory\nA factory for creating a specific type of service\nprovider. May be <tt>null</tt> in which case this\nmethod does nothing.\n@throws IllegalArgumentException if serviceName is <tt>null</tt>", "Calculate delta with another vector\n@param v another vector\n@return delta vector", "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." ]
private static Predicate join(final String joinWord, final List<Predicate> preds) { return new Predicate() { public void init(AbstractSqlCreator creator) { for (Predicate p : preds) { p.init(creator); } } public String toSql() { StringBuilder sb = new StringBuilder() .append("("); boolean first = true; for (Predicate p : preds) { if (!first) { sb.append(" ").append(joinWord).append(" "); } sb.append(p.toSql()); first = false; } return sb.append(")").toString(); } }; }
[ "Factory for 'and' and 'or' predicates." ]
[ "Add a calendar node.\n\n@param parentNode parent node\n@param calendar calendar", "Dump timephased work for an assignment.\n\n@param assignment resource assignment", "Creates PollingState from the json string.\n\n@param serializedPollingState polling state as json string\n@param <ResultT> the result that the poll operation produces\n@return the polling state", "Get FieldDescriptor from joined superclass.", "Iterates through the range of prefixes in this range instance using the given prefix length.\n\n@param prefixLength\n@return", "Add a dependency to the graph\n\n@param dependency\n@param graph\n@param depth\n@param parentId", "Get the related tags.\n\n<p>\nThis method does not require authentication.\n</p>\n\n@param tag\nThe source tag\n@return A RelatedTagsList object\n@throws FlickrException", "Stops all transitions.", "Writes OWL declarations for all basic vocabulary elements used in the\ndump.\n\n@throws RDFHandlerException" ]
public static java.sql.Date rollYears(java.util.Date startDate, int years) { return rollDate(startDate, Calendar.YEAR, years); }
[ "Roll the years forward or backward.\n\n@param startDate - The start date\n@param years - Negative to rollbackwards." ]
[ "Sets the request type for this ID. Defaults to GET\n\n@param pathId ID of path\n@param requestType type of request to service", "Retrieve the state object associated with the specified interceptor instance and property\nname on this request context.\n\n@param interceptor the interceptor instance\n@param stateName the name key that the state object was stored under\n@param stateType class of the type the stored state should be returned as\n@param <T> the type the stored state should be returned as\n@return the stored state object\n@see #setState(HttpConnectionInterceptor, String, Object)\n@since 2.6.0", "Get a collection of Photo objects for the specified Photoset.\n\nThis method does not require authentication.\n\n@see com.flickr4java.flickr.photos.Extras\n@see com.flickr4java.flickr.Flickr#PRIVACY_LEVEL_NO_FILTER\n@see com.flickr4java.flickr.Flickr#PRIVACY_LEVEL_PUBLIC\n@see com.flickr4java.flickr.Flickr#PRIVACY_LEVEL_FRIENDS\n@see com.flickr4java.flickr.Flickr#PRIVACY_LEVEL_FRIENDS_FAMILY\n@see com.flickr4java.flickr.Flickr#PRIVACY_LEVEL_FAMILY\n@see com.flickr4java.flickr.Flickr#PRIVACY_LEVEL_FRIENDS\n@param photosetId\nThe photoset ID\n@param extras\nSet of extra-fields\n@param privacy_filter\nfilter value for authenticated calls\n@param perPage\nThe number of photos per page\n@param page\nThe page offset\n@return PhotoList The Collection of Photo objects\n@throws FlickrException", "Reset a timer of the given string name for the given thread. If no such\ntimer exists yet, then it will be newly created.\n\n@param timerName\nthe name of the timer\n@param todoFlags\n@param threadId\nof the thread to track, or 0 if only system clock should be\ntracked", "Download a specified URL to a file\n\n@param stringUrl URL to use\n@param parameters HTTP Headers\n@param fileToSave File to save content\n@throws IOException I/O error happened", "Propagates node table of given DAG to all of it ancestors.", "Converts a boolean array containing the pixel data in BINARY mode to an\ninteger array with the pixel data in RGB mode.\n\n@param binaryArray pixel binary data\n@return pixel integer data in RGB mode.", "Clears all properties of specified entity.\n\n@param entity to clear.", "Remove any device announcements that are so old that the device seems to have gone away." ]
private TaskField getTaskField(int field) { TaskField result = MPPTaskField14.getInstance(field); if (result != null) { switch (result) { case START_TEXT: { result = TaskField.START; break; } case FINISH_TEXT: { result = TaskField.FINISH; break; } case DURATION_TEXT: { result = TaskField.DURATION; break; } default: { break; } } } return result; }
[ "Maps an integer field ID to a field type.\n\n@param field field ID\n@return field type" ]
[ "Update max min.\n\n@param n the n\n@param c the c", "Use this API to add cachepolicylabel.", "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", "Deletes this BoxStoragePolicyAssignment.", "Adds OPT_J | OPT_JSON 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", "Unregister all MBeans", "Forks off a runnable with the executor provided. Multiple calls are allowed, but the listeners must be\nthreadsafe.", "Groups all of the metadata cache files that are candidates for auto-attachment to player slots into lists\nthat are keyed by the playlist ID used to create the cache file. Files that cache all tracks have a playlist\nID of 0.\n\n@return a map from playlist ID to the caches holding tracks from that playlist", "Internal used method to retrieve object based on Identity.\n\n@param id\n@return\n@throws PersistenceBrokerException" ]
public PayloadBuilder category(final String category) { if (category != null) { aps.put("category", category); } else { aps.remove("category"); } return this; }
[ "Sets the category of the notification for iOS8 notification\nactions. See 13 minutes into \"What's new in iOS Notifications\"\n\nPassing {@code null} removes the category.\n\n@param category the name of the category supplied to the app\nwhen receiving the notification\n@return this" ]
[ "Filter events.\n\n@param events the events\n@return the list of filtered events", "Creates a random vector that is inside the specified span.\n\n@param span The span the random vector belongs in.\n@param rand RNG\n@return A random vector within the specified span.", "Bessel function of the first kind, of order 0.\n\n@param x Value.\n@return I0 value.", "Returns true if \"file\" is a subfile or subdirectory of \"dir\".\n\nFor example with the directory /path/to/a, the following return values would occur:\n\n/path/to/a/foo.txt - true /path/to/a/bar/zoo/boo/team.txt - true /path/to/b/foo.txt - false", "Closes the window containing the given component.\n\n@param component a component", "Copy one Gradient into another.\n@param g the Gradient to copy into", "1-D Forward Discrete Hartley Transform.\n\n@param data Data.", "Use this API to update clusterinstance.", "Runs the example program.\n\n@param args\n@throws IOException\nif there was a problem in writing the output file" ]
public AT_Context setFrameTopBottomMargin(int frameTop, int frameBottom){ if(frameTop>-1 && frameBottom>-1){ this.frameTopMargin = frameTop; this.frameBottomMargin = frameBottom; } return this; }
[ "Sets the top and bottom frame margin.\n@param frameTop margin\n@param frameBottom margin\n@return this to allow chaining" ]
[ "Set the HomeAsUpIndicator that is visible when user navigate to a fragment child\n@param indicator the resource drawable to use as indicator", "Returns the timestamp for the time at which the suite finished executing.\nThis is determined by finding the latest end time for each of the individual\ntests in the suite.\n@param suite The suite to find the end time of.\n@return The end time (as a number of milliseconds since 00:00 1st January 1970 UTC).", "Retrieve all addresses of a host by it's address. NetBIOS hosts can\nhave many names for a given IP address. The name and IP address make the\nNetBIOS address. This provides a way to retrieve the other names for a\nhost with the same IP address.\n\n@param addr the address to query\n@throws UnknownHostException if address cannot be resolved", "Read leaf tasks attached to the WBS.\n\n@param id initial WBS ID", "Mark the given TaskItem depends on this taskGroup.\n\n@param dependentTaskItem the task item that depends on this task group\n@return key to be used as parameter to taskResult(string) method to retrieve result of\ninvocation of given task item.", "Return the Payload attached to the current active bucket for |test|.\nAlways returns a payload so the client doesn't crash on a malformed\ntest definition.\n\n@param testName test name\n@return pay load attached to the current active bucket\n@deprecated Use {@link #getPayload(String, Bucket)} instead", "Register a new DropPasteWorkerInterface.\n@param worker The new worker", "This method is used to configure the format pattern.\n\n@param patterns new format patterns", "Use this API to update dospolicy resources." ]
public String getHeaderField(String fieldName) { // headers map is null for all regular response calls except when made as a batch request if (this.headers == null) { if (this.connection != null) { return this.connection.getHeaderField(fieldName); } else { return null; } } else { return this.headers.get(fieldName); } }
[ "Gets the value of the given header field.\n@param fieldName name of the header field.\n@return value of the header." ]
[ "returns an Array with an Objects NON-PK VALUES\n@throws PersistenceBrokerException if there is an erros accessing o field values", "Checks if the provided duration information is valid.\n@return <code>null</code> if the information is valid, the key of the suitable error message otherwise.", "backing bootstrap method with all parameters", "Returns an array of the enabled endpoints as Integer IDs\n\n@param pathId ID of path\n@param clientUUID UUID of client\n@param filters If supplied, only endpoints ending with values in filters are returned\n@return Collection of endpoints\n@throws Exception exception", "End building the script, adding a return value statement\n@param config the configuration for the script to build\n@param value the value to return\n@return the new {@link LuaScript} instance", "Extracts the column from a matrix.\n@param a Input matrix\n@param column Which column is to be extracted\n@param out output. Storage for the extracted column. If null then a new vector will be returned.\n@return The extracted column.", "Performs backward pass of Batch Normalization layer. Returns x gradient,\nbnScale gradient and bnBias gradient", "Finish initialization of state object.\n\n@param geoService geo service\n@param converterService converter service\n@throws GeomajasException oops", "Returns iterable with all assignments of this retention policy.\n@param limit the limit of entries per response. The default value is 100.\n@param fields the fields to retrieve.\n@return an iterable containing all assignments." ]
public static boolean checkAddProperty( CmsCmisTypeManager typeManager, Properties properties, String typeId, Set<String> filter, String id) { if ((properties == null) || (properties.getProperties() == null)) { throw new IllegalArgumentException("Properties must not be null!"); } if (id == null) { throw new IllegalArgumentException("Id must not be null!"); } TypeDefinition type = typeManager.getType(typeId); if (type == null) { throw new IllegalArgumentException("Unknown type: " + typeId); } if (!type.getPropertyDefinitions().containsKey(id)) { throw new IllegalArgumentException("Unknown property: " + id); } String queryName = type.getPropertyDefinitions().get(id).getQueryName(); if ((queryName != null) && (filter != null)) { if (!filter.contains(queryName)) { return false; } else { filter.remove(queryName); } } return true; }
[ "Checks whether a property can be added to a Properties.\n\n@param typeManager\n@param properties the properties object\n@param typeId the type id\n@param filter the property filter\n@param id the property id\n\n@return true if the property should be added" ]
[ "Get info for a given topic reply\n\n@param topicId\nUnique identifier of a topic for a given group {@link Topic}.\n@param replyId\nUnique identifier of a reply for a given topic {@link Reply}.\n@return A group topic\n@throws FlickrException\n@see <a href=\"http://www.flickr.com/services/api/flickr.groups.discuss.replies.getInfo.html\">API Documentation</a>", "Retrieve the next page and store the continuation token, the new data, and any IOException that may occur.\n\nNote that it is safe to pass null values to {@link CollectionRequest#query(String, Object)}. Method\n{@link com.asana.Client#request(com.asana.requests.Request)} will not include such options.", "Read assignment data.", "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.", "Start the host controller services.\n\n@throws Exception", "Log a message with a throwable at the provided level.", "Initialize elements from the duration panel.", "Extracts the java class name from the schema info\n\n@param schemaInfo the schema info, a string like: java=java.lang.String\n@return the name of the class extracted from the schema info", "Get a property as an int or default value.\n\n@param key the property name\n@param defaultValue the default value" ]
public static sslfipskey[] get(nitro_service service) throws Exception{ sslfipskey obj = new sslfipskey(); sslfipskey[] response = (sslfipskey[])obj.get_resources(service); return response; }
[ "Use this API to fetch all the sslfipskey resources that are configured on netscaler." ]
[ "Reload a managed server.\n\n@param permit the controller permit\n@return whether the state was changed successfully or not", "Use this API to unset the properties of gslbsite resource.\nProperties that need to be unset are specified in args array.", "Verify JUnit presence and version.", "Generate and return the list of statements to drop a database table.", "Set the week day.\n@param weekDayStr the week day to set.", "Performs an implicit double step using the values contained in the lower right hand side\nof the submatrix for the estimated eigenvector values.\n@param x1\n@param x2", "Retrieve the Activity ID value for this task.\n@param task Task instance\n@return Activity ID value", "Updates the terms and statements of the item document identified by the\ngiven item id. The updates are computed with respect to the current data\nfound online, making sure that no redundant deletions or duplicate insertions\nhappen. The references of duplicate statements will be merged. The labels\nand aliases in a given language are kept distinct.\n\n@param itemIdValue\nid of the document to be updated\n@param addLabels\nlabels to be set on the item. They will overwrite existing values\nin the same language.\n@param addDescriptions\ndescription to be set on the item. They will overwrite existing values\nin the same language.\n@param addAliases\naliases to be added. Existing aliases will be kept.\n@param deleteAliases\naliases to be deleted.\n@param addStatements\nthe list of statements to be added or updated; statements with\nempty statement id will be added; statements with non-empty\nstatement id will be updated (if such a statement exists)\n@param deleteStatements\nthe list of statements to be deleted; statements will only be\ndeleted if they are present in the current document (in\nexactly the same form, with the same id)\n@param summary\nshort edit summary\n@return the updated document\n@throws MediaWikiApiErrorException\nif the API returns errors\n@throws IOException\nif there are any IO errors, such as missing network connection", "Get CorrelationId from message.\n\n@param message the message\n@return correlationId or null if not set" ]
public static final CurrencySymbolPosition parseCurrencySymbolPosition(String value) { CurrencySymbolPosition result = CurrencySymbolPosition.BEFORE; switch (NumberHelper.getInt(value)) { case 0: { result = CurrencySymbolPosition.BEFORE; break; } case 1: { result = CurrencySymbolPosition.AFTER; break; } case 2: { result = CurrencySymbolPosition.BEFORE_WITH_SPACE; break; } case 3: { result = CurrencySymbolPosition.AFTER_WITH_SPACE; break; } } return (result); }
[ "Parse a currency symbol position value.\n\n@param value currency symbol position\n@return CurrencySymbolPosition instance" ]
[ "Find the number of Strings matched to the given Matcher.\n\n@param matcher a Matcher\n@return int the number of Strings matched to the given matcher.\n@since 1.0", "Uploads bytes to an open upload session.\n@param data data\n@param offset the byte position where the chunk begins in the file.\n@param partSize the part size returned as part of the upload session instance creation.\nOnly the last chunk can have a lesser value.\n@param totalSizeOfFile The total size of the file being uploaded.\n@return the part instance that contains the part id, offset and part size.", "this method is called from the event methods", "Counts one entity. Every once in a while, the current time is checked so\nas to print an intermediate report roughly every ten seconds.", "Flushes all changes to disk.", "Returns the associated SQL WHERE statement.", "Search down all extent classes and return max of all found\nPK values.", "Will start the HiveServer.\n\n@param testConfig Specific test case properties. Will be merged with the HiveConf of the context\n@param hiveVars HiveVars to pass on to the HiveServer for this session", "Creates a new Logger instance for the specified name." ]
private boolean activityIsMilestone(Activity activity) { String type = activity.getType(); return type != null && type.indexOf("Milestone") != -1; }
[ "Returns true if the activity is a milestone.\n\n@param activity Phoenix activity\n@return true if the activity is a milestone" ]
[ "called per frame of animation to update the camera position", "Create a rollback patch based on the recorded actions.\n\n@param patchId the new patch id, depending on release or one-off\n@param patchType the current patch identity\n@return the rollback patch", "return request is success by JsonRtn object\n\n@param jsonRtn\n@return", "Encodes the given URI port with the given encoding.\n@param port the port to be encoded\n@param encoding the character encoding to encode to\n@return the encoded port\n@throws UnsupportedEncodingException when the given encoding parameter is not supported", "Returns all the deployment runtime names associated with an overlay.\n\n@param context the current OperationContext.\n@param overlayAddress the address for the averlay.\n@return all the deployment runtime names associated with an overlay.", "Start the StatsD reporter, if configured.\n\n@throws URISyntaxException", "if you don't have an argument, choose the value that is going to be inserted into the map instead\n\n@param commandLineOption specification of the command line options\n@param value the value that is going to be inserted into the map instead of the argument", "Find all the values of the requested type.\n\n@param valueTypeToFind the type of the value to return.\n@param <T> the type of the value to find.\n@return the key, value pairs found.", "Checks the foreignkeys of all collections in the model.\n\n@param modelDef The model\n@param checkLevel The current check level (this constraint is checked in basic and strict)\n@exception ConstraintException If the value for foreignkey is invalid" ]
public static String getParentId(String digest, String host) throws IOException { DockerClient dockerClient = null; try { dockerClient = getDockerClient(host); return dockerClient.inspectImageCmd(digest).exec().getParent(); } finally { closeQuietly(dockerClient); } }
[ "Get parent digest of an image.\n\n@param digest\n@param host\n@return" ]
[ "Prepare a parallel HTTP POST Task.\n\n@param url\nthe UrlPostfix: e.g. in http://localhost:8080/index.html.,the url is \"/index.html\"\n@return the parallel task builder", "Provides a nicely formatted string of the method definition. For simplicity, generic types on some of the elements\nare not displayed.\n@return\nstring form of node with some generic elements suppressed", "Returns a new color with a new value of the specified HSL\ncomponent.", "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", "Carry out any post-processing required to tidy up\nthe data read from the database.", "Use this API to fetch dnssuffix resources of given names .", "Generate the next permutation and return a list containing\nthe elements in the appropriate order.\n@see #nextPermutationAsList(java.util.List)\n@see #nextPermutationAsArray()\n@return The next permutation as a list.", "Creates a new deployment for the path. If the path is a directory the content will be deployed exploded using\nthe file system location.\n\n@param content the path containing the content\n\n@return the deployment", "Bessel function of the second kind, of order n.\n\n@param n Order.\n@param x Value.\n@return Y value." ]
public List<PossibleState> bfs(int min) throws ModelException { List<PossibleState> bootStrap = new LinkedList<>(); TransitionTarget initial = model.getInitialTarget(); PossibleState initialState = new PossibleState(initial, fillInitialVariables()); bootStrap.add(initialState); while (bootStrap.size() < min) { PossibleState state = bootStrap.remove(0); TransitionTarget nextState = state.nextState; if (nextState.getId().equalsIgnoreCase("end")) { throw new ModelException("Could not achieve required bootstrap without reaching end state"); } //run every action in series List<Map<String, String>> product = new LinkedList<>(); product.add(new HashMap<>(state.variables)); OnEntry entry = nextState.getOnEntry(); List<Action> actions = entry.getActions(); for (Action action : actions) { for (CustomTagExtension tagExtension : tagExtensionList) { if (tagExtension.getTagActionClass().isInstance(action)) { product = tagExtension.pipelinePossibleStates(action, product); } } } //go through every transition and see which of the products are valid, adding them to the list List<Transition> transitions = nextState.getTransitionsList(); for (Transition transition : transitions) { String condition = transition.getCond(); TransitionTarget target = ((List<TransitionTarget>) transition.getTargets()).get(0); for (Map<String, String> p : product) { Boolean pass; if (condition == null) { pass = true; } else { //scrub the context clean so we may use it to evaluate transition conditional Context context = this.getRootContext(); context.reset(); //set up new context for (Map.Entry<String, String> e : p.entrySet()) { context.set(e.getKey(), e.getValue()); } //evaluate condition try { pass = (Boolean) this.getEvaluator().eval(context, condition); } catch (SCXMLExpressionException ex) { pass = false; } } //transition condition satisfied, add to bootstrap list if (pass) { PossibleState result = new PossibleState(target, p); bootStrap.add(result); } } } } return bootStrap; }
[ "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" ]
[ "Use this API to count linkset_interface_binding resources configued on NetScaler.", "Constructs the appropriate MenuDrawer based on the position.", "Set the channel. This will return whether the channel could be set successfully or not.\n\n@param newChannel the channel\n@return whether the operation succeeded or not", "Sets the top padding character for all cells in the row.\n@param paddingTopChar new padding character, ignored if null\n@return this to allow chaining", "Map from an activity code value UUID to the actual value itself, and its\nsequence number.\n\n@param storepoint storepoint containing current project data", "Adds a file to your assembly but automatically generates the field name of the file.\n\n@param file {@link File} the file to be uploaded.", "Returns the full record for a single story.\n\n@param story Globally unique identifier for the story.\n@return Request object", "Used to add exceptions to the calendar. The MPX standard defines\na limit of 250 exceptions per calendar.\n\n@param fromDate exception start date\n@param toDate exception end date\n@return ProjectCalendarException instance", "Call commit on the underlying connection." ]
public static void count() { long duration = SystemClock.uptimeMillis() - startTime; float avgFPS = sumFrames / (duration / 1000f); Log.v("FPSCounter", "total frames = %d, total elapsed time = %d ms, average fps = %f", sumFrames, duration, avgFPS); }
[ "Computes FPS average" ]
[ "Use this API to fetch appfwprofile_excluderescontenttype_binding resources of given name .", "Accessor method used to retrieve an Duration object representing the\ncontents of an individual field. If the field does not exist in the\nrecord, null is returned.\n\n@param field the index number of the field to be retrieved\n@return the value of the required field\n@throws MPXJException normally thrown when parsing fails", "Sends out the SQL as defined in the config upon first init of the connection.\n@param connection\n@param initSQL\n@throws SQLException", "todo move to commonops", "Writes the torque schemata to files in the given directory and returns\na comma-separated list of the filenames.\n\n@param dir The directory to write the files to\n@return The list of filenames\n@throws IOException If an error occurred", "Return the number of ignored or assumption-ignored tests.", "Change the value that is returned by this generator.\n@param value The new value to return.", "Calculate the arc length by angle and radius\n@param angle\n@return arc length", "Get the error message with the dependencies appended\n\n@param dependencies - the list with dependencies to be attached to the message\n@param message - the custom error message to be displayed to the user\n@return String" ]
public Map<DeckReference, TrackMetadata> getLoadedTracks() { ensureRunning(); // Make a copy so callers get an immutable snapshot of the current state. return Collections.unmodifiableMap(new HashMap<DeckReference, TrackMetadata>(hotCache)); }
[ "Get the metadata of all tracks currently loaded in any player, either on the play deck, or in a hot cue.\n\n@return the track information reported by all current players, including any tracks loaded in their hot cue slots\n\n@throws IllegalStateException if the MetadataFinder is not running" ]
[ "Return list of all files in the directory.\n\n@param directory target directory on file system\n@return list of files in the directory or empty list if directory is empty.", "Specifies the object id associated with a user assigned managed service identity\nresource that should be used to retrieve the access token.\n\n@param objectId Object ID of the identity to use when authenticating to Azure AD.\n@return MSICredentials", "Get replication document state for a given replication document ID.\n\n@param docId The replication document ID\n@return Replication document for {@code docId}", "Returns an empty Promotion details in Json\n\n@return String\n@throws IOException", "Reads a UUID from a JSON object.\n\nReturns null if the JSON value for the given key is not present or not a valid UUID\n\n@param obj the JSON object\n@param key the JSON key\n\n@return the UUID", "Signals that the processor to finish and waits until it finishes.", "End building the prepared script, adding a return value statement\n@param value the value to return\n@param config the configuration for the script to build\n@return the new {@link LuaPreparedScript} instance", "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", "Checks if the path leads to an embedded property or association.\n\n@param targetTypeName 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 an embedded, {@code false} otherwise." ]
public ParallelTaskBuilder preparePing() { reinitIfClosed(); ParallelTaskBuilder cb = new ParallelTaskBuilder(); cb.setProtocol(RequestProtocol.PING); return cb; }
[ "Prepare a parallel PING Task.\n\n@return the parallel task builder" ]
[ "Given a storedefinition, constructs the xml string to be sent out in\nresponse to a \"schemata\" fetch request\n\n@param storeDefinition\n@return serialized store definition", "Returns the constructor of the indirection handler class.\n\n@return The constructor for indirection handlers", "Set the values using the specified Properties object\n\n@param properties Properties object containing specific property values\nfor the Coordinator config", "Convert given value to given target\n\n@param fromValue\nthe value to convert\n@param toType\ntarget target\n@param <T>\ntarget of the result\n@return the value converted to given target\n@throws TypeCastException\nif conversion was not possible", "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", "RReturns the entity type of the id like \"item\" or \"property\"\n\n@param id\nthe identifier of the entity, such as \"Q42\"\n@throws IllegalArgumentException\nif the id is invalid", "Use this API to fetch all the ipv6 resources that are configured on netscaler.", "Operations to do after all subthreads finished their work on index\n\n@param backend", "Method used to read the sub project details from a byte array.\n\n@param data byte array\n@param uniqueIDOffset offset of unique ID\n@param filePathOffset offset of file path\n@param fileNameOffset offset of file name\n@param subprojectIndex index of the subproject, used to calculate unique id offset\n@return new SubProject instance" ]
protected final Event processEvent() throws IOException { while (true) { String line; try { line = readLine(); } catch (final EOFException ex) { if (doneOnce) { throw ex; } doneOnce = true; line = ""; } // If the line is empty (a blank line), Dispatch the event, as defined below. if (line.isEmpty()) { // If the data buffer is an empty string, set the data buffer and the event name buffer to // the empty string and abort these steps. if (dataBuffer.length() == 0) { eventName = ""; continue; } // If the event name buffer is not the empty string but is also not a valid NCName, // set the data buffer and the event name buffer to the empty string and abort these steps. // NOT IMPLEMENTED final Event.Builder eventBuilder = new Event.Builder(); eventBuilder.withEventName(eventName.isEmpty() ? Event.MESSAGE_EVENT : eventName); eventBuilder.withData(dataBuffer.toString()); // Set the data buffer and the event name buffer to the empty string. dataBuffer = new StringBuilder(); eventName = ""; return eventBuilder.build(); // If the line starts with a U+003A COLON character (':') } else if (line.startsWith(":")) { // ignore the line // If the line contains a U+003A COLON character (':') character } else if (line.contains(":")) { // Collect the characters on the line before the first U+003A COLON character (':'), // and let field be that string. final int colonIdx = line.indexOf(":"); final String field = line.substring(0, colonIdx); // Collect the characters on the line after the first U+003A COLON character (':'), // and let value be that string. // If value starts with a single U+0020 SPACE character, remove it from value. String value = line.substring(colonIdx + 1); value = value.startsWith(" ") ? value.substring(1) : value; processField(field, value); // Otherwise, the string is not empty but does not contain a U+003A COLON character (':') // character } else { processField(line, ""); } } }
[ "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" ]
[ "Register the given mbean with the platform mbean server\n\n@param mbean The mbean to register\n@param name The name to register under", "Set a custom response for this path\n\n@param pathName name of path\n@param customResponse value of custom response\n@return true if success, false otherwise\n@throws Exception exception", "Use this API to fetch filtered set of sslglobal_sslpolicy_binding resources.\nset the filter parameter values in filtervalue object.", "Places a connection back in the originating partition.\n@param connectionHandle to place back\n@throws SQLException on error", "Set the locking values\n@param cld\n@param obj\n@param oldLockingValues", "a small static helper to set the text color to a textView null save\n\n@param colorHolder\n@param textView\n@param colorDefault", "Generates JUnit 4 RunListener instances for any user defined RunListeners", "Get the time zone for a specific stock or index.\nFor stocks, the exchange suffix is extracted from the stock symbol to retrieve the time zone.\n\n@param symbol stock symbol in YahooFinance\n@return time zone of the exchange on which this stock is traded", "Prints out the interceptor chain in a format that is easy to read. It\nalso filters out instances of the DemoInterceptor so you can see what the\nchain would look like in a normal invokation.\n\n@param chain" ]
public static void sqrt(Complex_F64 input, Complex_F64 root) { double r = input.getMagnitude(); double a = input.real; root.real = Math.sqrt((r+a)/2.0); root.imaginary = Math.sqrt((r-a)/2.0); if( input.imaginary < 0 ) root.imaginary = -root.imaginary; }
[ "Computes the square root of the complex number.\n\n@param input Input complex number.\n@param root Output. The square root of the input" ]
[ "Register this broker in ZK for the first time.", "Flips the output buffer, and lets the Selector know we're ready to write.\n\n@param selectionKey", "Returns the decoded string, in case it contains non us-ascii characters.\nReturns the same string if it doesn't or the passed value in case\nof an UnsupportedEncodingException.\n\n@param str string to be decoded\n@return the decoded string, in case it contains non us-ascii characters;\nor the same string if it doesn't or the passed value in case\nof an UnsupportedEncodingException.", "Use this API to expire cacheobject.", "Logs to Info if the debug level is greater than or equal to 1.", "Type variables are not supported.\n\n@param value\n@return the type", "Return a new instance of the BufferedImage\n\n@return BufferedImage", "Gets information about the device pin.\n@param fields the fields to retrieve.\n@return info about the device pin.", "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" ]
public boolean ignoreOperation(final Resource domainResource, final Collection<ServerConfigInfo> serverConfigs, final PathAddress pathAddress) { if (pathAddress.size() == 0) { return false; } boolean ignore = ignoreResourceInternal(domainResource, serverConfigs, pathAddress); return ignore; }
[ "For the DC to check whether an operation should be ignored on the slave, if the slave is set up to ignore config not relevant to it\n\n@param domainResource the domain root resource\n@param serverConfigs the server configs the slave is known to have\n@param pathAddress the address of the operation to check if should be ignored or not" ]
[ "Emit an enum event with parameters supplied.\n\nThis will invoke all {@link SimpleEventListener} bound to the specific\nenum value and all {@link SimpleEventListener} bound to the enum class\ngiven the listeners has the matching argument list.\n\nFor example, given the following enum definition:\n\n```java\npublic enum UserActivity {LOGIN, LOGOUT}\n```\n\nWe have the following simple event listener methods:\n\n```java\n{@literal @}OnEvent\npublic void handleUserActivity(UserActivity, User user) {...}\n\n{@literal @}OnUserActivity(UserActivity.LOGIN)\npublic void logUserLogin(User user, long timestamp) {...}\n\n{@literal @}OnUserActivity(UserActivity.LOGOUT)\npublic void logUserLogout(User user) {...}\n```\n\nThe following code will invoke `logUserLogin` method:\n\n```java\nUser user = ...;\neventBus.emit(UserActivity.LOGIN, user, System.currentTimeMills());\n```\n\nThe `handleUserActivity` is not invoked because\n\n* The method parameter `(UserActivity, User, long)` does not match the declared argument list `(UserActivity, User)`\n\nWhile the following code will invoke both `handleUserActivity` and `logUserLogout` methods:\n\n```java\nUser user = ...;\neventBus.emit(UserActivity.LOGOUT, user);\n```\n\nThe `logUserLogin` method will not be invoked because\n\n1. the method is bound to `UserActivity.LOGIN` enum value specifically, while `LOGOUT` is triggered\n2. the method has a `long timestamp` in the argument list and it is not passed to `eventBus.emit`\n\n@param event\nthe target event\n@param args\nthe arguments passed in\n@see SimpleEventListener", "Returns a new created connection\n\n@param jcd the connection descriptor\n@return an instance of Connection from the drivermanager", "Fires the event and waits for a specified time.\n\n@param webElement the element to fire event on.\n@param eventable The HTML event type (onclick, onmouseover, ...).\n@return true if firing event is successful.\n@throws InterruptedException when interrupted during the wait.", "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", "Stores the output from a Frontier into the queue, pausing and waiting if the given queue is too large\n\n@param resultsMap map of String and String representing the output of a Frontier's DFS", "Creates a simple, annotation defined Web Bean\n\n@param <T> The type\n@param clazz The class\n@param beanManager the current manager\n@return A Web Bean", "Set the dates for the specified photo.\n\nThis method requires authentication with 'write' permission.\n\n@param photoId\nThe photo ID\n@param datePosted\nThe date the photo was posted or null\n@param dateTaken\nThe date the photo was taken or null\n@param dateTakenGranularity\nThe granularity of the taken date or null\n@throws FlickrException", "initializer to setup JSAdapter prototype in the given scope", "Get the pickers date." ]
protected static FlushableDataOutput writeHeader(final ManagementProtocolHeader header, final OutputStream os) throws IOException { final FlushableDataOutput output = FlushableDataOutputImpl.create(os); header.write(output); return output; }
[ "Write the management protocol header.\n\n@param header the mgmt protocol header\n@param os the output stream\n@throws IOException" ]
[ "It will look for all the deployments under the deploymentsRootAddress with a runtimeName in the specified list of\nruntime names and then transform the operation so that every server having those deployments will redeploy the\naffected deployments.\n\n@see #transformOperation\n@param removeOperation\n@param context\n@param deploymentsRootAddress\n@param runtimeNames\n@throws OperationFailedException", "Constructs the appropriate MenuDrawer based on the position.", "Send a get module request\n\n@param name\n@param version\n@return the targeted module\n@throws GrapesCommunicationException", "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", "Creates a window visually showing the matrix's state. Block means an element is zero.\nRed positive and blue negative. More intense the color larger the element's absolute value\nis.\n\n@param A A matrix.\n@param title Name of the window.", "Read hints from a file.", "Fetches the contents of a file representation with asset path and writes them to the provided output stream.\n@see <a href=https://developer.box.com/reference#section-x-rep-hints-header>X-Rep-Hints Header</a>\n@param representationHint the X-Rep-Hints query for the representation to fetch.\n@param assetPath the path of the asset for representations containing multiple files.\n@param output the output stream to write the contents to.", "Write the work weeks associated with this calendar.\n\n@param xmlCalendar XML calendar instance\n@param mpxjCalendar MPXJ calendar instance", "private int numCalls = 0;" ]
public static authenticationlocalpolicy_authenticationvserver_binding[] get(nitro_service service, String name) throws Exception{ authenticationlocalpolicy_authenticationvserver_binding obj = new authenticationlocalpolicy_authenticationvserver_binding(); obj.set_name(name); authenticationlocalpolicy_authenticationvserver_binding response[] = (authenticationlocalpolicy_authenticationvserver_binding[]) obj.get_resources(service); return response; }
[ "Use this API to fetch authenticationlocalpolicy_authenticationvserver_binding resources of given name ." ]
[ "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", "Checks the given field descriptor.\n\n@param fieldDef The field descriptor\n@param checkLevel The amount of checks to perform\n@exception ConstraintException If a constraint has been violated", "Store the data of a print job in the registry.\n\n@param printJobStatus the print job status", "Emit a event object with parameters and force all listeners to be called synchronously.\n\n@param event\nthe target event\n@param args\nthe arguments passed in\n@see #emit(EventObject, Object...)", "Sums up the square of each element in the matrix. This is equivalent to the\nFrobenius norm squared.\n\n@param m Matrix.\n@return Sum of elements squared.", "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", "Handles the response of the SerialAPIGetCapabilities request.\n@param incomingMessage the response message to process.", "persist decorator and than continue to children without touching the model", "Recursively descend through the hierarchy creating tasks.\n\n@param parent parent task\n@param parentName parent name\n@param rows rows to add as tasks to this parent" ]
public static final Date getTime(InputStream is) throws IOException { int timeValue = getInt(is); timeValue -= 86400; timeValue /= 60; return DateHelper.getTimeFromMinutesPastMidnight(Integer.valueOf(timeValue)); }
[ "Read a Synchro time from an input stream.\n\n@param is input stream\n@return Date instance" ]
[ "Use this API to add dbdbprofile.", "This method uses the configured git credentials and repo, to test its validity.\nIn addition, in case the user requested creation of a new tag, it checks that\nanother tag with the same name doesn't exist", "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.", "Use this API to disable nsfeature.", "Assign FK value of main object with PK values of the reference object.\n\n@param obj real object with reference (proxy) object (or real object with set FK values on insert)\n@param cld {@link ClassDescriptor} of the real object\n@param rds An {@link ObjectReferenceDescriptor} of real object.\n@param insert Show if \"linking\" is done while insert or update.", "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.", "Verifies that the TestMatrix is correct and sane without using a specification.\nThe Proctor API doesn't use a test specification so that it can serve all tests in the matrix\nwithout restriction.\nDoes a limited set of sanity checks that are applicable when there is no specification,\nand thus no required tests or provided context.\n\n@param testMatrix the {@link TestMatrixArtifact} to be verified.\n@param matrixSource a {@link String} of the source of proctor artifact. For example a path of proctor artifact file.\n@return a {@link ProctorLoadResult} to describe the result of verification. It contains errors of verification and a list of missing test.", "Use this API to unset the properties of tmsessionparameter resource.\nProperties that need to be unset are specified in args array.", "Return the parent outline number, or an empty string if\nwe have a root task.\n\n@param outlineNumber child outline number\n@return parent outline number" ]
public int[] sampleBatchWithoutReplacement() { int[] batch = new int[batchSize]; for (int i=0; i<batch.length; i++) { if (cur == indices.length) { cur = 0; } if (cur == 0) { IntArrays.shuffle(indices); } batch[i] = indices[cur++]; } return batch; }
[ "Samples a batch of indices in the range [0, numExamples) without replacement." ]
[ "Determine the color to use to draw a cue list entry. Hot cues are green, ordinary memory points are red,\nand loops are orange.\n\n@param entry the entry being drawn\n\n@return the color with which it should be represented.", "Set the view frustum to pick against from the field of view, aspect\nratio and near, far clip planes. The viewpoint of the frustum\nis the center of the scene object the picker is attached to.\nThe view direction is the forward direction of that scene object.\nThe frustum will pick what a camera attached to the scene object\nwith that view frustum would see. If the frustum is not attached\nto a scene object, it defaults to the view frustum of the main camera of the scene.\n\n@param fovy vertical field of view in degrees\n@param aspect aspect ratio (width / height)", "Retrieve a finish date time in the form required by Phoenix.\n\n@param value Date instance\n@return formatted date time", "get the default profile\n\n@return representation of default profile\n@throws Exception exception", "Use this API to fetch sslcipher resource of given name .", "Returns an instance of the CleverTap SDK.\n\n@param context The Android context\n@return The {@link CleverTapAPI} object\n@deprecated use {@link CleverTapAPI#getDefaultInstance(Context context)}", "Filter for public tweets on these languages.\n\n@param languages\nValid BCP 47 (http://tools.ietf.org/html/bcp47) language identifiers,\nand may represent any of the languages listed on Twitter's advanced search page\n(https://twitter.com/search-advanced), or \"und\" if no language could be detected.\nThese strings should NOT be url-encoded.\n@return this", "Build the tree of joins for the given criteria", "Returns true if required properties for FluoClient are set" ]
public static LinearSolverDense<DMatrixRMaj> symmPosDef(int matrixWidth ) { if(matrixWidth < EjmlParameters.SWITCH_BLOCK64_CHOLESKY ) { CholeskyDecompositionCommon_DDRM decomp = new CholeskyDecompositionInner_DDRM(true); return new LinearSolverChol_DDRM(decomp); } else { if( EjmlParameters.MEMORY == EjmlParameters.MemoryUsage.FASTER ) return new LinearSolverChol_DDRB(); else { CholeskyDecompositionCommon_DDRM decomp = new CholeskyDecompositionInner_DDRM(true); return new LinearSolverChol_DDRM(decomp); } } }
[ "Creates a solver for symmetric positive definite matrices.\n\n@return A new solver for symmetric positive definite matrices." ]
[ "If you want to stop recorded events from being sent to the server, use this method to set the SDK instance to offline.\nOnce offline, events will be recorded and queued locally but will not be sent to the server until offline is disabled.\nCalling this method again with offline set to false will allow events to be sent to server and the SDK instance will immediately attempt to send events that have been queued while offline.\n\n@param value boolean, true sets the sdk offline, false sets the sdk back online", "Convert a geometry class to a layer type.\n\n@param geometryClass\nJTS geometry class\n@return Geomajas layer type", "This method skips the end-of-line markers in the RTF document.\nIt also indicates if the end of the embedded object has been reached.\n\n@param text RTF document test\n@param offset offset into the RTF document\n@return new offset", "Retrieve configuration details for a given custom field.\n\n@param field required custom field\n@return configuration detail", "Deletes all outgoing links of specified entity.\n\n@param entity the entity.", "Get a reader implementation class to perform API calls with while specifying\nan explicit page size for paginated API calls. This gets translated to a per_page=\nparameter on API requests. Note that Canvas does not guarantee it will honor this page size request.\nThere is an explicit maximum page size on the server side which could change. The default page size\nis 10 which can be limiting when, for example, trying to get all users in a 800 person course.\n@param type Interface type you wish to get an implementation for\n@param oauthToken An OAuth token to use for authentication when making API calls\n@param paginationPageSize Requested pagination page size\n@param <T> The reader type to request an instance of\n@return An instance of the requested reader class", "Adds an HTTP header to this request.\n@param key the header key.\n@param value the header value.", "Gets a list of registered docker images from the images cache, if it has been\nregistered to the cache for a specific build-info ID and if a docker manifest has been captured for it\nby the build-info proxy.\nAdditionally, the methods also removes the returned images from the cache.\n@param buildInfoId\n@return", "Attempts to insert a colon so that a value without a colon can\nbe parsed." ]
private static boolean scanForEndSig(File file, FileChannel channel) throws IOException, NonScannableZipException { // TODO Consider just reading in MAX_REVERSE_SCAN bytes -- increased peak memory cost but less complex ByteBuffer bb = getByteBuffer(CHUNK_SIZE); long start = channel.size(); long end = Math.max(0, start - MAX_REVERSE_SCAN); long channelPos = Math.max(0, start - CHUNK_SIZE); long lastChannelPos = channelPos; boolean firstRead = true; while (lastChannelPos >= end) { read(bb, channel, channelPos); int actualRead = bb.limit(); if (firstRead) { long expectedRead = Math.min(CHUNK_SIZE, start); if (actualRead > expectedRead) { // File is still growing return false; } firstRead = false; } int bufferPos = actualRead -1; while (bufferPos >= SIG_PATTERN_LENGTH) { // Following is based on the Boyer Moore algorithm but simplified to reflect // a) the pattern is static // b) the pattern has no repeating bytes int patternPos; for (patternPos = SIG_PATTERN_LENGTH - 1; patternPos >= 0 && ENDSIG_PATTERN[patternPos] == bb.get(bufferPos - patternPos); --patternPos) { // empty loop while bytes match } // Switch gives same results as checking the "good suffix array" in the Boyer Moore algorithm switch (patternPos) { case -1: { // Pattern matched. Confirm is this is the start of a valid end of central dir record long startEndRecord = channelPos + bufferPos - SIG_PATTERN_LENGTH + 1; if (validateEndRecord(file, channel, startEndRecord)) { return true; } // wasn't a valid end record; continue scan bufferPos -= 4; break; } case 3: { // No bytes matched; the common case. // With our pattern, this is the only case where the Boyer Moore algorithm's "bad char array" may // produce a shift greater than the "good suffix array" (which would shift 1 byte) int idx = bb.get(bufferPos - patternPos) - Byte.MIN_VALUE; bufferPos -= END_BAD_BYTE_SKIP[idx]; break; } default: // 1 or more bytes matched bufferPos -= 4; } } // Move back a full chunk. If we didn't read a full chunk, that's ok, // it means we read all data and the outer while loop will terminate if (channelPos <= bufferPos) { break; } lastChannelPos = channelPos; channelPos -= Math.min(channelPos - bufferPos, CHUNK_SIZE - bufferPos); } return false; }
[ "Boyer Moore scan that proceeds backwards from the end of the file looking for ENDSIG\n@throws NonScannableZipException" ]
[ "Returns all selected values of the list box, or empty array if none.\n\n@return the selected values of the list box", "Sets the monitoring service.\n\n@param monitoringService the new monitoring service", "Extent aware Delete by Query\n@param query\n@param cld\n@throws PersistenceBrokerException", "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.", "Use this API to fetch all the nsrollbackcmd resources that are configured on netscaler.", "Validates the data for correct annotation", "This method writes task data to a JSON file.\nNote that we write the task hierarchy in order to make rebuilding the hierarchy easier.", "Merges information from the resource root into this resource root\n\n@param additionalResourceRoot The root to merge", "Get the list of build numbers that are to be kept forever." ]
@Override public synchronized void resume() { this.paused = false; ServerActivityCallback listener = listenerUpdater.get(this); if (listener != null) { listenerUpdater.compareAndSet(this, listener, null); } while (!taskQueue.isEmpty() && (activeRequestCount < maxRequestCount || maxRequestCount < 0)) { runQueuedTask(false); } }
[ "Unpause the server, allowing it to resume normal operations" ]
[ "Generate a module graph regarding the filters\n\n@param moduleId String\n@return AbstractGraph", "Get the active overrides with parameters and the active server group for a client\n\n@param profileID Id of profile to get configuration for\n@param clientUUID Client Id to export configuration\n@return SingleProfileBackup containing active overrides and active server group\n@throws Exception exception", "Returns a SimpleConfiguration clientConfig with properties set from this configuration\n\n@return SimpleConfiguration", "Set the association in the entry state.\n\n@param collectionRole the role of the association\n@param association the association", "Add an extension to the set of extensions.\n\n@param extension an extension", "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.", "Get the last non-white Y point\n@param img Image in memory\n@return The trimmed height", "Recursively construct a LblTree from DOM tree\n\n@param walker tree walker for DOM tree traversal\n@return tree represented by DOM tree", "Returns a persistence strategy based on the passed configuration.\n\n@param cacheMapping the selected {@link org.hibernate.ogm.datastore.keyvalue.options.CacheMappingType}\n@param externalCacheManager the infinispan cache manager\n@param configurationUrl the location of the configuration file\n@param jtaPlatform the {@link JtaPlatform}\n@param entityTypes the meta-data of the entities\n@param associationTypes the meta-data of the associations\n@param idSourceTypes the meta-data of the id generators\n@return the persistence strategy" ]
public boolean isWorkingDate(Date date) { Calendar cal = DateHelper.popCalendar(date); Day day = Day.getInstance(cal.get(Calendar.DAY_OF_WEEK)); DateHelper.pushCalendar(cal); return isWorkingDate(date, day); }
[ "This method allows the caller to determine if a given date is a\nworking day. This method takes account of calendar exceptions.\n\n@param date Date to be tested\n@return boolean value" ]
[ "Only converts the B matrix and passes that onto solve. Te result is then copied into\nthe input 'X' matrix.\n\n@param B A matrix &real; <sup>m &times; p</sup>. Not modified.\n@param X A matrix &real; <sup>n &times; p</sup>, where the solution is written to. Modified.", "For recovery from the latest consistent snapshot, we should clean up the\nold files from the previous backup set, else we will fill the disk with\nuseless log files\n\n@param backupDir", "Add a collaborator to an app.\n@param appName App name. See {@link #listApps} for a list of apps that can be used.\n@param collaborator Username of the collaborator to add. This is usually in the form of \"[email protected]\".", "Parse JSON parameters from this request.\n\n@param jsonRequest The request in the JSON format.\n@return CmsSpellcheckingRequest object that contains parsed parameters or null, if JSON input is not well\ndefined.", "Create an embedded host controller.\n\n@param jbossHomePath the location of the root of the host controller installation. Cannot be {@code null} or empty.\n@param modulePath the location of the root of the module repository. May be {@code null} if the standard\nlocation under {@code jbossHomePath} should be used\n@param systemPackages names of any packages that must be treated as system packages, with the same classes\nvisible to the caller's classloader visible to host-controller-side classes loaded from\nthe server's modular classloader\n@param cmdargs any additional arguments to pass to the embedded host controller (e.g. -b=192.168.100.10)\n@return the server. Will not be {@code null}", "Add a note to a photo. The Note object bounds and text must be specified.\n\n@param photoId\nThe photo ID\n@param note\nThe Note object\n@return The updated Note object", "Creates the code mappings.\n\n@param mtasTokenIdFactory\nthe mtas token id factory\n@param level\nthe level\n@param stringValue\nthe string value\n@param offsetStart\nthe offset start\n@param offsetEnd\nthe offset end\n@param realOffsetStart\nthe real offset start\n@param realOffsetEnd\nthe real offset end\n@param codePositions\nthe code positions\n@throws IOException\nSignals that an I/O exception has occurred.", "Create the time entry map.\n\n@param rows work pattern rows\n@return time entry map", "Print out the configuration that the client needs to make a request.\n\n@param json the output writer.\n@throws JSONException" ]
private int getMaxHeight() { int result = 0; for (int i = 0; i < segmentCount; i++) { result = Math.max(result, segmentHeight(i, false)); } return result; }
[ "Scan the segments to find the largest height value present.\n\n@return the largest waveform height anywhere in the preview." ]
[ "This is a temporary measure until we have a type-safe solution for\nretrieving serializers from a SerializerFactory. It avoids warnings all\nover the codebase while making it easy to verify who calls it.", "Returns the value of the identified field as a Float.\n@param fieldName the name of the field\n@return the value of the field as a Float\n@throws FqlException if the field cannot be expressed as an Float", "Use this API to unset the properties of lbsipparameters resource.\nProperties that need to be unset are specified in args array.", "Collection of JRVariable\n\n@param variables\n@return", "Performs a transpose across block sub-matrices. Reduces\nthe number of cache misses on larger matrices.\n\n*NOTE* If this is beneficial is highly dependent on the computer it is run on. e.g:\n- Q6600 Almost twice as fast as standard.\n- Pentium-M Same speed and some times a bit slower than standard.\n\n@param A Original matrix. Not modified.\n@param A_tran Transposed matrix. Modified.\n@param blockLength Length of a block.", "Build call for postUiAutopilotWaypoint\n\n@param addToBeginning\nWhether this solar system should be added to the beginning of\nall waypoints (required)\n@param clearOtherWaypoints\nWhether clean other waypoints beforing adding this one\n(required)\n@param destinationId\nThe destination to travel to, can be solar system, station or\nstructure&#39;s id (required)\n@param datasource\nThe server name you would like data from (optional, default to\ntranquility)\n@param token\nAccess token to use if unable to set a header (optional)\n@param callback\nCallback for upload/download progress\n@return Call to execute\n@throws ApiException\nIf fail to serialize the request body object", "Adds a redeploy step to the composite operation.\n\n@param builder the builder to add the step to\n@param deployment the deployment being redeployed", "Switches from a sparse to dense matrix", "Creates a field map for assignments.\n\n@param props props data" ]
private String registerEventHandler(GFXEventHandler h) { //checkInitialized(); if (!registeredOnJS) { JSObject doc = (JSObject) runtime.execute("document"); doc.setMember("jsHandlers", jsHandlers); registeredOnJS = true; } return jsHandlers.registerHandler(h); }
[ "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." ]
[ "Provides a type-specific Meta class for the given TinyType.\n\n@param <T> the TinyType class type\n@param candidate the TinyType class to obtain a Meta for\n@return a Meta implementation suitable for the candidate\n@throws IllegalArgumentException for null or a non-TinyType", "Updates the information about this collaboration with any info fields that have been modified locally.\n\n@param info the updated info.", "Use this API to update rsskeytype.", "Assigns this retention policy to folder.\n@param folder the folder to assign policy to.\n@return info about created assignment.", "Creates PollingState from the json string.\n\n@param serializedPollingState polling state as json string\n@param <ResultT> the result that the poll operation produces\n@return the polling state", "2-D Perlin noise function.\n\n@param x X Value.\n@param y Y Value.\n@return Returns function's value at point xy.", "Use this API to unset the properties of nsip6 resource.\nProperties that need to be unset are specified in args array.", "Loads the script from a text string.\n@param scriptText text string containing script to execute.\n@param language language (\"js\" or \"lua\")", "Performs a similar transform on A-pI" ]
public static gslbdomain_stats[] get(nitro_service service) throws Exception{ gslbdomain_stats obj = new gslbdomain_stats(); gslbdomain_stats[] response = (gslbdomain_stats[])obj.stat_resources(service); return response; }
[ "Use this API to fetch the statistics of all gslbdomain_stats resources that are configured on netscaler." ]
[ "Get the parameters of determining this parametric\ncovariance model. The parameters are usually free parameters\nwhich may be used in calibration.\n\n@return Parameter vector.", "Use this API to fetch all the systemcollectionparam resources that are configured on netscaler.", "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.", "Print priority.\n\n@param priority Priority instance\n@return priority value", "Set the refresh frequency of this scene object.\nUse NONE for improved performance when the text is set initially and never\nchanged.\n\n@param frequency\nThe refresh frequency of this TextViewSceneObject.", "Prepare a parallel HTTP POST Task.\n\n@param url\nthe UrlPostfix: e.g. in http://localhost:8080/index.html.,the url is \"/index.html\"\n@return the parallel task builder", "Prepare a parallel HTTP OPTION Task.\n\n@param url\nthe UrlPostfix: e.g. in http://localhost:8080/index.html.,the url is \"/index.html\"\n@return the parallel task builder", "All address strings are comparable. If two address strings are invalid, their strings are compared.\nOtherwise, address strings are compared according to which type or version of string, and then within each type or version\nthey are compared using the comparison rules for addresses.\n\n@param other\n@return", "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" ]
public static String findReplacement(final String variableName, final Date date) { if (variableName.equalsIgnoreCase("date")) { return cleanUpName(DateFormat.getDateInstance().format(date)); } else if (variableName.equalsIgnoreCase("datetime")) { return cleanUpName(DateFormat.getDateTimeInstance().format(date)); } else if (variableName.equalsIgnoreCase("time")) { return cleanUpName(DateFormat.getTimeInstance().format(date)); } else { try { return new SimpleDateFormat(variableName).format(date); } catch (Exception e) { LOGGER.error("Unable to format timestamp according to pattern: {}", variableName, e); return "${" + variableName + "}"; } } }
[ "Update a variable name with a date if the variable is detected as being a date.\n\n@param variableName the variable name.\n@param date the date to replace the value with if the variable is a date variable." ]
[ "Assign target number of partitions per node to specific node IDs. Then,\nseparates Nodes into donorNodes and stealerNodes based on whether the\nnode needs to donate or steal primary partitions.\n\n@param nextCandidateCluster\n@param numPartitionsPerNodePerZone\n@return a Pair. First element is donorNodes, second element is\nstealerNodes. Each element in the pair is a HashMap of Node to\nInteger where the integer value is the number of partitions to\nstore.", "Initialize dates panel elements.", "Ignore some element from the AST\n\n@param element\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", "Returns an unmodifiable set containing the given elements.\n\n@param ts the elements from which to create a set\n@param <T> the type of the element in the set\n@return an unmodifiable set containing the given elements or {@code null} in case the given element array is\n{@code null}.", "Returns an English label for a given datatype.\n\n@param datatype\nthe datatype to label\n@return the label", "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", "Filters a list of rows from the named table. If a column name and a value\nare supplied, then use this to filter the rows. If no column name is\nsupplied, then return all rows.\n\n@param tableName table name\n@param columnName filter column name\n@param id filter column value\n@return filtered list of rows", "Retrieves the project finish date. If an explicit finish date has not been\nset, this method calculates the finish date by looking for\nthe latest task finish date.\n\n@return Finish Date" ]
public void deleteModule(final String moduleId) { final DbModule module = getModule(moduleId); repositoryHandler.deleteModule(module.getId()); for (final String gavc : DataUtils.getAllArtifacts(module)) { repositoryHandler.deleteArtifact(gavc); } }
[ "Delete a module\n\n@param moduleId String" ]
[ "Remove script for a given ID\n\n@param id ID of script\n@throws Exception exception", "Closes the server socket.", "Initialize the domain registry.\n\n@param registry the domain registry", "Ensures that the element is child element of the parent element.\n\n@param parentElement the parent xml dom element\n@param childElement the child element\n@throws SpinXmlElementException if the element is not child of the parent element", "Returns the list of Solr fields a search result must have to initialize the gallery search result correctly.\n@return the list of Solr fields.", "Creates a ServiceCall from a paging operation.\n\n@param first the observable to the first page\n@param next the observable to poll subsequent pages\n@param callback the client-side callback\n@param <E> the element type\n@return the future based ServiceCall", "Append the html-code to finish a html mail message to the given buffer.\n\n@param buffer The StringBuffer to add the html code to.", "Returns a list of the compact representation of all of the custom fields in a workspace.\n\n@param workspace The workspace or organization to find custom field definitions in.\n@return Request object", "Read arguments from a file. Newline delimited, UTF-8 encoded. No fanciness to\navoid dependencies." ]
void onDrawEye(int eye, int swapChainIndex, boolean use_multiview) { mCurrentEye = eye; if (!(mSensoredScene == null || !mMainScene.equals(mSensoredScene))) { GVRCameraRig mainCameraRig = mMainScene.getMainCameraRig(); if (use_multiview) { if (DEBUG_STATS) { mTracerDrawEyes1.enter(); // this eye is drawn first mTracerDrawEyes2.enter(); } GVRRenderTarget renderTarget = mRenderBundle.getRenderTarget(EYE.MULTIVIEW, swapChainIndex); GVRCamera camera = mMainScene.getMainCameraRig().getCenterCamera(); GVRCamera left_camera = mMainScene.getMainCameraRig().getLeftCamera(); renderTarget.cullFromCamera(mMainScene, camera,mRenderBundle.getShaderManager()); captureCenterEye(renderTarget, true); capture3DScreenShot(renderTarget, true); renderTarget.render(mMainScene, left_camera, mRenderBundle.getShaderManager(),mRenderBundle.getPostEffectRenderTextureA(), mRenderBundle.getPostEffectRenderTextureB()); captureRightEye(renderTarget, true); captureLeftEye(renderTarget, true); captureFinish(); if (DEBUG_STATS) { mTracerDrawEyes1.leave(); mTracerDrawEyes2.leave(); } } else { if (eye == 1) { if (DEBUG_STATS) { mTracerDrawEyes1.enter(); } GVRCamera rightCamera = mainCameraRig.getRightCamera(); GVRRenderTarget renderTarget = mRenderBundle.getRenderTarget(EYE.RIGHT, swapChainIndex); renderTarget.render(mMainScene, rightCamera, mRenderBundle.getShaderManager(), mRenderBundle.getPostEffectRenderTextureA(), mRenderBundle.getPostEffectRenderTextureB()); captureRightEye(renderTarget, false); captureFinish(); if (DEBUG_STATS) { mTracerDrawEyes1.leave(); mTracerDrawEyes.leave(); } } else { if (DEBUG_STATS) { mTracerDrawEyes1.leave(); mTracerDrawEyes.leave(); } GVRRenderTarget renderTarget = mRenderBundle.getRenderTarget(EYE.LEFT, swapChainIndex); GVRCamera leftCamera = mainCameraRig.getLeftCamera(); capture3DScreenShot(renderTarget, false); renderTarget.cullFromCamera(mMainScene, mainCameraRig.getCenterCamera(), mRenderBundle.getShaderManager()); captureCenterEye(renderTarget, false); renderTarget.render(mMainScene, leftCamera, mRenderBundle.getShaderManager(), mRenderBundle.getPostEffectRenderTextureA(), mRenderBundle.getPostEffectRenderTextureB()); captureLeftEye(renderTarget, false); if (DEBUG_STATS) { mTracerDrawEyes2.leave(); } } } } }
[ "Called from the native side\n@param eye" ]
[ "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", "Toggle between single events and series.\n@param isSeries flag, indicating if we want a series of events.", "Adds listeners and reads from a stream.\n\n@param reader reader for file type\n@param stream schedule data\n@return ProjectFile instance", "Is the transport secured by a policy", "Returns the text for the JSONObject of Link provided\nThe JSONObject of Link provided should be of the type \"copy\"\n@param jsonObject of Link\n@return String", "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.", "Define the set of extensions.\n\n@param extensions\n@return self", "Enables support for large-payload messages.\n\n@param s3\nAmazon S3 client which is going to be used for storing\nlarge-payload messages.\n@param s3BucketName\nName of the bucket which is going to be used for storing\nlarge-payload messages. The bucket must be already created and\nconfigured in s3.", "Propagate onTouchStart events to listeners\n@param hit collision object" ]
public float getPositionY(int vertex) { if (!hasPositions()) { throw new IllegalStateException("mesh has no positions"); } checkVertexIndexBounds(vertex); return m_vertices.getFloat((vertex * 3 + 1) * SIZEOF_FLOAT); }
[ "Returns the y-coordinate of a vertex position.\n\n@param vertex the vertex index\n@return the y coordinate" ]
[ "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", "Delete any log segments matching the given predicate function\n\n@throws IOException", "Prepare the document before rendering.\n\n@param outputStream output stream to render to, null if only for layout\n@param format format\n@throws DocumentException oops\n@throws IOException oops\n@throws PrintingException oops", "Returns true if the string is a valid Java full qualified class name.\n\n@param str the string to be examined\n@return true if str is a valid Java Fqcn", "defines the KEY in the parent report parameters map where to get the subreport parameters map.\n@param path where to get the parameter map for the subrerpot.\n@return", "Returns a correlation matrix which has rank &lt; n and for which the first n factors agree with the factors of correlationMatrix.\n\n@param correlationMatrix The given correlation matrix.\n@param numberOfFactors The requested number of factors (Eigenvectors).\n@return Factor reduced correlation matrix.", "Returns all base types.\n\n@return An iterator of the base types", "Obtains a Accounting zoned date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the Accounting zoned date-time, not null\n@throws DateTimeException if unable to create the date-time", "Parse a currency symbol position value.\n\n@param value currency symbol position\n@return CurrencySymbolPosition instance" ]
public static boolean setCustomResponseForDefaultProfile(String pathName, String customData) { try { return setCustomForDefaultProfile(pathName, true, customData); } catch (Exception e) { e.printStackTrace(); } return false; }
[ "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" ]
[ "Returns the value of this product under the given model.\n\n@param evaluationTime Evaluation time.\n@param model The model.\n@return Value of this product und the given model.", "Prints the error message as log message.\n\n@param level the log level", "Determine the raw type for the given generic parameter type.\n@param genericType the generic type to resolve\n@param typeVariableMap the TypeVariable Map to resolved against\n@return the resolved raw type", "Parse the given projection.\n\n@param projection The projection string.\n@param longitudeFirst longitudeFirst", "Determines whether the specified permission is permitted.\n\n@param permission\n@return <tt>false<tt> if the specified permission is not permitted, based on the current security policy; <tt>true<tt> otherwise", "Called when the scene object gets a new parent.\n\n@param parent New parent of this scene object.", "Checks the given reference descriptor.\n\n@param refDef The reference descriptor\n@param checkLevel The amount of checks to perform\n@exception ConstraintException If a constraint has been violated", "if |a11-a22| >> |a12+a21| there might be a better way. see pg371", "Find container env.\n\n@param ctx the container context\n@param dump the exception dump\n@return valid container or null" ]
public ParallelTaskBuilder prepareHttpOptions(String url) { reinitIfClosed(); ParallelTaskBuilder cb = new ParallelTaskBuilder(); cb.getHttpMeta().setHttpMethod(HttpMethod.OPTIONS); cb.getHttpMeta().setRequestUrlPostfix(url); return cb; }
[ "Prepare a parallel HTTP OPTION Task.\n\n@param url\nthe UrlPostfix: e.g. in http://localhost:8080/index.html.,the url is \"/index.html\"\n@return the parallel task builder" ]
[ "generate a select-Statement according to query\n\n@param query the Query\n@param cld the ClassDescriptor", "Test to determine if this is a split task.\n\n@param calendar current calendar\n@param list timephased resource assignment list\n@return boolean flag", "Add utility routes the router\n\n@param router", "Is the user password reset?\n\n@param user User to check\n@return boolean", "Returns a set of beans specialized by this bean. An empty set is returned if this bean does not specialize another beans.", "Gets a property from system, environment or an external map.\nThe lookup order is system > env > map > defaultValue.\n\n@param name\nThe name of the property.\n@param map\nThe external map.\n@param defaultValue\nThe value that should be used if property is not found.", "Adds the position range.\n\n@param start the start\n@param end the end", "Loads a PDF document and creates a DOM tree from it.\n@param doc the source document\n@return a DOM Document representing the DOM tree\n@throws IOException", "Sets the right padding character for all cells in the table.\n@param paddingRightChar new padding character, ignored if null\n@return this to allow chaining" ]
@SafeVarargs public static void registerFilterTypes(final Class<? extends DynamicFilter>... types) { FILTER_TYPES.addAll(Arrays.asList(types)); }
[ "Register custom filter types especially for serializer of specification json file" ]
[ "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", "To get all the textual content in the dom\n\n@param document\n@param individualTokens : default True : when set to true, each text node from dom is used to build the\ntext content : when set to false, the text content of whole is obtained at once.\n@return", "Add the list with given bundles to the \"Require-Bundle\" main attribute.\n\n@param requiredBundles The list of all bundles to add.", "Register the given Converter objects with the given target ConverterRegistry.\n@param converters the converter objects: implementing {@link Converter},\n{@link ConverterFactory}, or {@link GenericConverter}\n@param registry the target registry", "Clear the mask for a new selection", "Returns the list of the configured sort options, or the empty list if no sort options are configured.\n@return The list of the configured sort options, or the empty list if no sort options are configured.", "Use this API to add autoscaleaction resources.", "Convert given value to given target\n\n@param fromValue\nthe value to convert\n@param toType\ntarget target\n@param <T>\ntarget of the result\n@return the value converted to given target\n@throws TypeCastException\nif conversion was not possible", "Specify the class represented by this `ClassNode` implements\nan interface specified by the given name\n\n@param name the name of the interface class\n@return this `ClassNode` instance" ]
public void updateAnimation() { Date time = new Date(); long currentTime = time.getTime() - this.beginAnimation; if (currentTime > animationTime) { this.currentQuaternion.set(endQuaternion); for (int i = 0; i < 3; i++) { this.currentPos[i] = this.endPos[i]; } this.animate = false; } else { float t = (float) currentTime / animationTime; this.currentQuaternion = this.beginQuaternion.slerp(this.endQuaternion, t); for (int i = 0; i < 3; i++) { this.currentPos[i] = this.beginPos[i] + totalTranslation[i] * t; } } }
[ "called per frame of animation to update the camera position" ]
[ "Parse the JSON string and return the object. The string is expected to be the JSON print data from the\nclient.\n\n@param spec the JSON formatted string.\n@return The encapsulated JSON object", "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.", "Calculate the file to compile a jasper report template to.\n\n@param configuration the configuration for the current app.\n@param jasperFileXml the jasper report template in xml format.\n@param extension the extension of the compiled report template.\n@param logger the logger to log errors to if an occur.", "Returns the meta-data for the inverse side of the association represented by the given property on the given\npersister in case it represents the main side of a bi-directional one-to-many or many-to-many association.\n\n@param mainSidePersister persister of the entity hosting the property of interest\n@param propertyIndex index of the property of interest\n@return the meta-data of the inverse side of the specified association or {@code null} if no such meta-data\nexists", "Perform a security check against OpenCms.\n\n@param cms The OpenCms object.\n\n@throws CmsPermissionViolationException in case of the anonymous guest user", "Clones the given reference.\n\n@param refDef The reference descriptor\n@param prefix A prefix for the name\n@return The cloned reference", "Create a document that parses the tile's labelFragment, using GraphicsWriter classes.\n\n@param writer\nwriter\n@param labelStyleInfo\nlabel style info\n@return graphics document\n@throws RenderException\ncannot render", "Checks if the required option exists.\n\n@param options OptionSet to checked\n@param opt Required option to check\n@throws VoldemortException", "Add a Opacity bar to the color wheel.\n\n@param bar The instance of the Opacity bar." ]
@Override public void removeStorageEngine(StorageEngine<ByteArray, byte[], byte[]> engine) { String storeName = engine.getName(); BdbStorageEngine bdbEngine = (BdbStorageEngine) engine; synchronized(lock) { // Only cleanup the environment if it is per store. We cannot // cleanup a shared 'Environment' object if(useOneEnvPerStore) { Environment environment = this.environments.get(storeName); if(environment == null) { // Nothing to clean up. return; } // Remove from the set of unreserved stores if needed. if(this.unreservedStores.remove(environment)) { logger.info("Removed environment for store name: " + storeName + " from unreserved stores"); } else { logger.info("No environment found in unreserved stores for store name: " + storeName); } // Try to delete the BDB directory associated File bdbDir = environment.getHome(); if(bdbDir.exists() && bdbDir.isDirectory()) { String bdbDirPath = bdbDir.getPath(); try { FileUtils.deleteDirectory(bdbDir); logger.info("Successfully deleted BDB directory : " + bdbDirPath + " for store name: " + storeName); } catch(IOException e) { logger.error("Unable to delete BDB directory: " + bdbDirPath + " for store name: " + storeName); } } // Remove the reference to BdbEnvironmentStats, which holds a // reference to the Environment BdbEnvironmentStats bdbEnvStats = bdbEngine.getBdbEnvironmentStats(); this.aggBdbStats.unTrackEnvironment(bdbEnvStats); // Unregister the JMX bean for Environment if(voldemortConfig.isJmxEnabled()) { ObjectName name = JmxUtils.createObjectName(JmxUtils.getPackageName(bdbEnvStats.getClass()), storeName); // Un-register the environment stats mbean JmxUtils.unregisterMbean(name); } // Cleanup the environment environment.close(); this.environments.remove(storeName); logger.info("Successfully closed the environment for store name : " + storeName); } } }
[ "Clean up the environment object for the given storage engine" ]
[ "Gets the value for the key.\n\n@param key the key to check for the value\n\n@return the value or an empty collection if no values were set", "Abort and close the transaction.\nCalling abort abandons all persistent object modifications and releases the\nassociated locks.\nIf transaction is not in progress a TransactionNotInProgressException is thrown", "Use this API to add authenticationradiusaction.", "Returns the default privacy level preference for the user.\n\n@see com.flickr4java.flickr.Flickr#PRIVACY_LEVEL_NO_FILTER\n@see com.flickr4java.flickr.Flickr#PRIVACY_LEVEL_PUBLIC\n@see com.flickr4java.flickr.Flickr#PRIVACY_LEVEL_FRIENDS\n@see com.flickr4java.flickr.Flickr#PRIVACY_LEVEL_FRIENDS_FAMILY\n@see com.flickr4java.flickr.Flickr#PRIVACY_LEVEL_FAMILY\n@see com.flickr4java.flickr.Flickr#PRIVACY_LEVEL_FRIENDS\n@throws FlickrException\n@return privacyLevel", "Performs a Versioned put operation with the specified composite request\nobject\n\n@param requestWrapper Composite request object containing the key and the\nversioned object\n@return Version of the value for the successful put\n@throws ObsoleteVersionException", "A convenience method for creating an immutable map.\n\n@param self a Map\n@return an immutable Map\n@see java.util.Collections#unmodifiableMap(java.util.Map)\n@since 1.0", "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", "Create a document that parses the tile's featureFragment, using GraphicsWriter classes.\n\n@param writer\nwriter\n@return document\n@throws RenderException\noops", "Obtain matching paths for a request\n\n@param overrideType type of override\n@param client Client\n@param profile Profile\n@param uri URI\n@param requestType type of request\n@param pathTest If true this will also match disabled paths\n@return Collection of matching endpoints\n@throws Exception exception" ]
@Pure public static <K, V> Map<K, V> operator_minus(Map<K, V> left, final Pair<? extends K, ? extends V> right) { return Maps.filterEntries(left, new Predicate<Entry<K, V>>() { @Override public boolean apply(Entry<K, V> input) { return !Objects.equal(input.getKey(), right.getKey()) || !Objects.equal(input.getValue(), right.getValue()); } }); }
[ "Remove the given pair from a given map for obtaining a new 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<p>\nThe replied map is a view on the given map. It means that any change\nin the original map is reflected to the result of this operation.\n</p>\n\n@param <K> type of the map keys.\n@param <V> type of the map values.\n@param left the map to consider.\n@param right the entry (key, value) to remove from the map.\n@return an immutable map with the content of the map and with the given entry.\n@throws IllegalArgumentException - when the right operand key exists in the left operand.\n@since 2.15" ]
[ "FastJSON does not provide the API so we have to create our own", "When an alias for a field is added, index it here to allow lookup by alias and type.\n\n@param type field type\n@param alias field alias", "Get the cached entry or null if no valid cached entry is found.", "Return true if c has a @hidden tag associated with it", "Static main.\n\n@param args\nProgram arguments.\n@throws IOException\nIf an IO error occurred.", "Whether the address is IPv4-mapped\n\n::ffff:x:x/96 indicates IPv6 address mapped to IPv4", "Update server mapping's host header\n\n@param serverMappingId ID of server mapping\n@param hostHeader value of host header\n@return updated ServerRedirect", "Returns the compact records for all teams in the organization visible to\nthe authorized user.\n\n@param organization Globally unique identifier for the workspace or organization.\n@return Request object", "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" ]
public PhotoList<Photo> getWithGeoData(Date minUploadDate, Date maxUploadDate, Date minTakenDate, Date maxTakenDate, int privacyFilter, String sort, Set<String> extras, int perPage, int page) throws FlickrException { Map<String, Object> parameters = new HashMap<String, Object>(); parameters.put("method", METHOD_GET_WITH_GEO_DATA); 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", Long.toString(minTakenDate.getTime() / 1000L)); } if (maxTakenDate != null) { parameters.put("max_taken_date", Long.toString(maxTakenDate.getTime() / 1000L)); } if (privacyFilter > 0) { parameters.put("privacy_filter", Integer.toString(privacyFilter)); } if (sort != null) { parameters.put("sort", sort); } if (extras != null && !extras.isEmpty()) { parameters.put("extras", StringUtilities.join(extras, ",")); } if (perPage > 0) { parameters.put("per_page", Integer.toString(perPage)); } if (page > 0) { parameters.put("page", Integer.toString(page)); } Response response = transport.get(transport.getPath(), parameters, apiKey, sharedSecret); if (response.isError()) { throw new FlickrException(response.getErrorCode(), response.getErrorMessage()); } Element photosElement = response.getPayload(); PhotoList<Photo> photos = PhotoUtils.createPhotoList(photosElement); return photos; }
[ "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" ]
[ "Determine which type of percent complete is used on on this task,\nand calculate the required value.\n\n@param row task data\n@return percent complete value", "Add a comment to a photoset. This method requires authentication with 'write' permission.\n\n@param photosetId\nThe id of the photoset to add a comment to.\n@param commentText\nText of the comment\n@return the comment id\n@throws FlickrException", "Returns an array of non null elements from the source array.\n\n@param tArray the source array\n@return the array", "Call the onQueryExecuteTimeLimitExceeded hook if necessary\n@param sql sql statement that took too long\n@param queryStartTime time when query was started.", "This method reads a two byte integer from the input stream.\n\n@param is the input stream\n@return integer value\n@throws IOException on file read error or EOF", "Count the total number of queued resource requests for all queues. The\nresult is \"approximate\" in the face of concurrency since individual\nqueues can change size during the aggregate count.\n\n@return The (approximate) aggregate count of queued resource requests.", "Updates the date and time formats.\n\n@param properties project properties", "Tries to load a site specific error page. If\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 errorCode the error code to display\n@return a flag, indicating if the custom error page could be loaded.", "This is a convenience method to add a default derived\ncalendar to the project.\n\n@return new ProjectCalendar instance" ]
public void seekToSeason(String seasonString, String direction, String seekAmount) { Season season = Season.valueOf(seasonString); assert(season!= null); seekToIcsEvent(SEASON_ICS_FILE, season.getSummary(), direction, seekAmount); }
[ "Seeks forward or backwards to a particular season based on the current date\n\n@param seasonString The season to seek to\n@param direction The direction to seek\n@param seekAmount The number of years to seek" ]
[ "Notify the widget that refresh state has changed. Do not call this when\nrefresh is triggered by a swipe gesture.\n\n@param refreshing Whether or not the view should show refresh progress.", "Adds the dependencies typical for particular deployment types.\nThis is not accurate and doesn't cover the real needs of the project.\nBasically it's just to have \"something\" for the initial implementation.", "Use this API to fetch responderpolicylabel_responderpolicy_binding resources of given name .", "Add a dependency to the graph\n\n@param dependency\n@param graph\n@param depth\n@param parentId", "Calculates the Black-Scholes option value of an atm call option.\n\n@param volatility The Black-Scholes volatility.\n@param optionMaturity The option maturity T.\n@param forward The forward, i.e., the expectation of the index under the measure associated with payoff unit.\n@param payoffUnit The payoff unit, i.e., the discount factor or the anuity associated with the payoff.\n@return Returns the value of a European at-the-money call option under the Black-Scholes model", "This method maps the resource unique identifiers to their index number\nwithin the FixedData block.\n\n@param fieldMap field map\n@param rscFixedMeta resource fixed meta data\n@param rscFixedData resource fixed data\n@return map of resource IDs to resource data", "Asta Powerproject assigns an explicit calendar for each task. This method\nis used to find the most common calendar and use this as the default project\ncalendar. This allows the explicitly assigned task calendars to be removed.", "Returns a client object for a clientId\n\n@param clientId ID of client to return\n@return Client or null\n@throws Exception exception", "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." ]
public static CmsSearchConfigurationSorting create( final String sortParam, final List<I_CmsSearchConfigurationSortOption> options, final I_CmsSearchConfigurationSortOption defaultOption) { return (null != sortParam) || ((null != options) && !options.isEmpty()) || (null != defaultOption) ? new CmsSearchConfigurationSorting(sortParam, options, defaultOption) : null; }
[ "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." ]
[ "callers of doLogin should be serialized before calling in.", "Generate a schedule descriptor for the given start and end date.\n\n@param startDate The start date.\n@param endDate The end date.\n@return The schedule descriptor", "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", "Get's the user's current upload limits, User object only contains user_id\n\n@return Media Limits", "Operators which affect the variables to its left and right", "Gets a SerialMessage with the BASIC SET command\n@param the level to set.\n@return the serial message", "Initializes data structures", "Gets a design document from the database.\n\n@param id the design document id (optionally prefixed with \"_design/\")\n@return {@link DesignDocument}", "Returns a byte array containing a copy of the bytes" ]
private String getCachedETag(HttpHost host, String file) { Map<String, Object> cachedETags = readCachedETags(); @SuppressWarnings("unchecked") Map<String, Object> hostMap = (Map<String, Object>)cachedETags.get(host.toURI()); if (hostMap == null) { return null; } @SuppressWarnings("unchecked") Map<String, String> etagMap = (Map<String, String>)hostMap.get(file); if (etagMap == null) { return null; } return etagMap.get("ETag"); }
[ "Get the cached ETag for the given host and file\n@param host the host\n@param file the file\n@return the cached ETag or null if there is no ETag in the cache" ]
[ "Sum of the elements.\n\n@param data Data.\n@return Sum(data).", "adds the qualified names to the require-bundle attribute, if not already\npresent.\n\n@param bundles - passing parameterized bundled (e.g. versions, etc.) is\nnot supported", "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", "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", "Creates the publish button.\n\n@param updateListener the update listener\n@return the publish button", "Append the text at the end of the File.\n\n@param file a File\n@param text the text to append at the end of the File\n@throws IOException if an IOException occurs.\n@since 1.0", "Retrieve a duration in the form required by Phoenix.\n\n@param duration Duration instance\n@return formatted duration", "Look up all recorded playback state information.\n\n@return the playback state recorded for any player\n@since 0.5.0", "Checks if the path leads to an embedded property or association.\n\n@param targetTypeName 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 an embedded, {@code false} otherwise." ]
public void clearResponseSettings(int pathId, String clientUUID) throws Exception { logger.info("clearing response settings"); this.setResponseEnabled(pathId, false, clientUUID); OverrideService.getInstance().disableAllOverrides(pathId, clientUUID, Constants.OVERRIDE_TYPE_RESPONSE); EditService.getInstance().updateRepeatNumber(Constants.OVERRIDE_TYPE_RESPONSE, pathId, clientUUID); }
[ "Clear all overrides, reset repeat counts for a response path\n\n@param pathId ID of path\n@param clientUUID UUID of client\n@throws Exception exception" ]
[ "A specific, existing tag can be deleted by making a DELETE request\non the URL for that tag.\n\nReturns an empty data record.\n\n@param tag The tag to delete.\n@return Request object", "Records the result of updating a server.\n\n@param server the id of the server. Cannot be <code>null</code>\n@param response the result of the updates", "Add an element assigned with its score\n@param member the member to add\n@param score the score to assign\n@return <code>true</code> if the set has been changed", "For each node in specified zones, tries swapping some minimum number of\nrandom partitions per node with some minimum number of random partitions\nfrom other specified nodes. Chooses the best swap in each iteration.\nLarge values of the greedSwapMaxPartitions... arguments make this method\nequivalent to comparing every possible swap. This may get very expensive.\n\nSo if a node had partitions P1, P2, P3 and P4 and the other partitions\nset was Q1, Q2, Q3, Q4, Q5 The combinations that will be tried for\nswapping will be the cartesian product of the two sets. That is, {P1,\nQ1}, {P2, Q2}...{P2,Q1}, {P2,Q2}, in total 20 such swap pairs will be\ngenerated. The best among these swap pairs will be chosen.\n\n@param nextCandidateCluster\n@param nodeIds Node IDs within which to shuffle partitions\n@param greedySwapMaxPartitionsPerNode See RebalanceCLI.\n@param greedySwapMaxPartitionsPerZone See RebalanceCLI.\n@param storeDefs\n@return updated cluster", "Removes a metadata provider so it will no longer be consulted to provide metadata for tracks loaded from any\nmedia.\n\n@param provider the metadata provider to remove.", "Use this API to fetch all the transformpolicylabel resources that are configured on netscaler.", "Formats an IPTC string for this reference using information obtained from\nSubject Reference System.\n\n@param srs\nreference subject reference system\n@return IPTC formatted reference", "Sets either the upper or low triangle of a matrix to zero", "Links the two field names into a single left.right field name.\nIf the left field is empty, right is returned\n\n@param left one field name\n@param right the other field name\n\n@return left.right or right if left is an empty string" ]
public Double getAvgEventValue() { resetIfNeeded(); synchronized(this) { long eventsLastInterval = numEventsLastInterval - numEventsLastLastInterval; if(eventsLastInterval > 0) return ((totalEventValueLastInterval - totalEventValueLastLastInterval) * 1.0) / eventsLastInterval; else return 0.0; } }
[ "Returns the average event value in the current interval" ]
[ "Removes the specified entry point\n\n@param controlPoint The entry point", "Register a new DropPasteWorkerInterface.\n@param worker The new worker", "Perform a module dependency graph of the target and return the graph as a JSON\n\n@param moduleName\n@param moduleVersion\n@param uriInfo\n@return Response", "Add the given query parameters.\n@param params the params\n@return this UriComponentsBuilder", "Downloads a part of this file's contents, starting at rangeStart and stopping at rangeEnd.\n\n@param output the stream to where the file will be written.\n@param rangeStart the byte offset at which to start the download.\n@param rangeEnd the byte offset at which to stop the download.", "Creates a real valued diagonal matrix of the specified type", "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", "Returns the portion of the field name after the last dot, as field names\nmay actually be paths.", "Convert string to qname.\n\n@param str the string\n@return the qname" ]
@SuppressWarnings("unchecked") /* @Nullable */ public <T> T get(Object receiver, String fieldName) throws SecurityException, NoSuchFieldException, IllegalArgumentException, IllegalAccessException { Preconditions.checkNotNull(receiver,"receiver"); Preconditions.checkNotNull(fieldName,"fieldName"); Class<? extends Object> clazz = receiver.getClass(); Field f = getDeclaredField(clazz, fieldName); if (!f.isAccessible()) f.setAccessible(true); return (T) f.get(receiver); }
[ "Retrieves the value of the given accessible field of the given receiver.\n\n@param receiver the container of the field, not <code>null</code>\n@param fieldName the field's name, not <code>null</code>\n@return the value of the field\n\n@throws NoSuchFieldException see {@link Class#getField(String)}\n@throws SecurityException see {@link Class#getField(String)}\n@throws IllegalAccessException see {@link Field#get(Object)}\n@throws IllegalArgumentException see {@link Field#get(Object)}" ]
[ "Specify the address of the SOCKS proxy the connection should\nuse.\n\n<p>Read the <a href=\"http://java.sun.com/javase/6/docs/technotes/guides/net/proxies.html\">\nJava Networking and Proxies</a> guide to understand the\nproxies complexity.\n\n<p>Be aware that this method only handles SOCKS proxies, not\nHTTPS proxies. Use {@link #withProxy(Proxy)} instead.\n\n@param host the hostname of the SOCKS proxy\n@param port the port of the SOCKS proxy server\n@return this", "set the layout which will host the ScrimInsetsFrameLayout and its layoutParams\n\n@param container\n@param layoutParams\n@return", "Writes the given configuration to the given file.", "Provides a type-specific Meta class for the given TinyType.\n\n@param <T> the TinyType class type\n@param candidate the TinyType class to obtain a Meta for\n@return a Meta implementation suitable for the candidate\n@throws IllegalArgumentException for null or a non-TinyType", "Use this API to fetch all the cacheobject resources that are configured on netscaler.\nThis uses cacheobject_args which is a way to provide additional arguments while fetching the resources.", "Returns the value of the indicated property of the current object on the specified level.\n\n@param level The level\n@param name The name of the property\n@return The property value", "This method take a list of fileName of the type partitionId_Replica_Chunk\nand returns file names that match the regular expression\nmasterPartitionId_", "Parses operations where the input comes from variables to its left only. Hard coded to only look\nfor transpose for now\n\n@param tokens List of all the tokens\n@param sequence List of operation sequence", "Use this API to update cmpparameter." ]
public static boolean removeDefaultCustomResponse(String pathValue, String requestType) { try { JSONObject profile = getDefaultProfile(); String profileName = profile.getString("name"); PathValueClient client = new PathValueClient(profileName, false); return client.removeCustomResponse(pathValue, requestType); } catch (Exception e) { e.printStackTrace(); } return false; }
[ "Remove any overrides for an endpoint on the default profile, client\n\n@param pathValue path (endpoint) value\n@param requestType path request type. \"GET\", \"POST\", etc\n@return true if success, false otherwise" ]
[ "Returns the value of the identified field as a Long.\n@param fieldName the name of the field\n@return the value of the field as a Long\n@throws FqlException if the field cannot be expressed as an Long", "Adds a port that serves the HTTP requests. If unspecified, cleartext HTTP on port 36462 is used.\n\n@param localAddress the TCP/IP load address to bind\n@param protocol {@link SessionProtocol#HTTP} or {@link SessionProtocol#HTTPS}", "Returns an Object array of all FK field values of the specified object.\nIf the specified object is an unmaterialized Proxy, it will be materialized\nto read the FK values.\n\n@throws MetadataException if an error occours while accessing ForeingKey values on obj", "Print the given values after displaying the provided message.", "Removes a set of calendar hours from the day to which they\nare currently attached.\n\n@param hours calendar hours instance", "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", "Assemble the configuration section of the URL.", "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", "To use main report datasource. There should be nothing else in the detail band\n@param preSorted\n@return" ]
public boolean computeDirect( DMatrixRMaj A ) { initPower(A); boolean converged = false; for( int i = 0; i < maxIterations && !converged; i++ ) { // q0.print(); CommonOps_DDRM.mult(A,q0,q1); double s = NormOps_DDRM.normPInf(q1); CommonOps_DDRM.divide(q1,s,q2); converged = checkConverged(A); } return converged; }
[ "This method computes the eigen vector with the largest eigen value by using the\ndirect power method. This technique is the easiest to implement, but the slowest to converge.\nWorks only if all the eigenvalues are real.\n\n@param A The matrix. Not modified.\n@return If it converged or not." ]
[ "Find a given range object in a list of ranges by a value in that range. Does a binary\nsearch over the ranges but instead of checking for equality looks within the range.\nTakes the array size as an option in case the array grows while searching happens\n@param <T> Range type\n@param ranges data list\n@param value value in the list\n@param arraySize the max search index of the list\n@return search result of range\nTODO: This should move into SegmentList.scala", "Set the position of the pick ray.\nThis function is used internally to update the\npick ray with the new controller position.\n@param x the x value of the position.\n@param y the y value of the position.\n@param z the z value of the position.", "Ask the specified player for the specified waveform preview from the specified media slot, first checking if we\nhave a cached copy.\n\n@param dataReference uniquely identifies the desired waveform preview\n\n@return the preview, if it was found, or {@code null}\n\n@throws IllegalStateException if the WaveformFinder is not running", "Prints out the interceptor chain in a format that is easy to read. It\nalso filters out instances of the DemoInterceptor so you can see what the\nchain would look like in a normal invokation.\n\n@param chain", "Returns iterable with all folder assignments of this retention policy.\n@param limit the limit of entries per response. The default value is 100.\n@param fields the fields to retrieve.\n@return an iterable containing all folder assignments.", "a small static helper class to get the color from the colorHolder\n\n@param colorHolder\n@param ctx\n@return", "Creates the name of the .story file to be wrote with the testcase. The\nname of the scenario must be given with spaces.\n\n@param scenarioName\n- The scenario name, with spaces\n@return the .story file name.", "Construct a new simple attachment key.\n\n@param valueClass the value class\n@param <T> the attachment type\n@return the new instance", "Creates a simple deployment description.\n\n@param name the name for the deployment\n@param serverGroups the server groups\n\n@return the deployment description" ]
void resolveBootUpdates(final ModelController controller, final ActiveOperation.CompletedCallback<ModelNode> callback) throws Exception { connection.openConnection(controller, callback); // Keep a reference to the the controller this.controller = controller; }
[ "Resolve the boot updates and register at the local HC.\n\n@param controller the model controller\n@param callback the completed callback\n@throws Exception for any error" ]
[ "Iterates over the elements of an iterable collection of items, starting from\na specified startIndex, and returns the index values of the items that match\nthe condition specified in the closure.\n\n@param self the iteration object over which to iterate\n@param startIndex start matching from this index\n@param closure the filter to perform a match on the collection\n@return a list of numbers corresponding to the index values of all matched objects\n@since 1.5.2", "This method is called when the locale of the parent file is updated.\nIt resets the locale specific currency attributes to the default values\nfor the new locale.\n\n@param properties project properties\n@param locale new locale", "Create a new path\n\n@param pathName friendly name of path\n@param pathValue path value or regex\n@param requestType path request type. \"GET\", \"POST\", etc", "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.", "Remove all references to a groupId\n\n@param groupIdToRemove ID of group", "Read custom property definitions for resources.\n\n@param gpResources GanttProject resources", "Retrieve an instance of the TaskField class based on the data read from an\nMPX file.\n\n@param value value from an MS Project file\n@return TaskField instance", "Handle the given response, return the deserialized object when the response is successful.\n\n@param <T> Type\n@param response Response\n@param returnType Return type\n@throws ApiException If the response has a unsuccessful status code or\nfail to deserialize the response body\n@return Type", "Clears the dest ColumnBuffer and inserts all entries in dest where the timestamp passes the\ntimestampTest.\n\n@param dest Destination ColumnBuffer\n@param timestampTest Test to determine which timestamps get added to dest" ]
public void setNodeMetaData(Object key, Object value) { if (key==null) throw new GroovyBugError("Tried to set meta data with null key on "+this+"."); if (metaDataMap == null) { metaDataMap = new ListHashMap(); } Object old = metaDataMap.put(key,value); if (old!=null) throw new GroovyBugError("Tried to overwrite existing meta data "+this+"."); }
[ "Sets the node meta data.\n\n@param key - the meta data key\n@param value - the meta data value\n@throws GroovyBugError if key is null or there is already meta\ndata under that key" ]
[ "Check whether the URL start with one of the given prefixes.\n\n@param uri URI\n@param patterns possible prefixes\n@return true when URL starts with one of the prefixes", "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.", "Answer the orderBy of all Criteria and Sub Criteria\nthe elements are of class Criteria.FieldHelper\n@return List", "This method writes data for an individual calendar to a PM XML file.\n\n@param mpxj ProjectCalander instance", "add a converted object to the pool\n\n@param converter\nthe converter that made the conversion\n@param sourceObject\nthe source object that has been converted\n@param destinationType\nthe destination type\n@param convertedObject\nthe converted object", "Disconnects from the serial interface and stops\nsend and receive threads.", "Selects the specified value in the list.\n\n@param value the new value\n@param fireEvents if true, a ValueChangeEvent event will be fired\n@see #setAddMissingValue", "Send Identify Node message to the controller.\n@param nodeId the nodeId of the node to identify\n@throws SerialInterfaceException when timing out or getting an invalid response.", "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" ]
public static String makeHTMLTable(String[][] table, String[] rowLabels, String[] colLabels) { StringBuilder buff = new StringBuilder(); buff.append("<table class=\"auto\" border=\"1\" cellspacing=\"0\">\n"); // top row buff.append("<tr>\n"); buff.append("<td></td>\n"); // the top left cell for (int j = 0; j < table[0].length; j++) { // assume table is a rectangular matrix buff.append("<td class=\"label\">").append(colLabels[j]).append("</td>\n"); } buff.append("</tr>\n"); // all other rows for (int i = 0; i < table.length; i++) { // one row buff.append("<tr>\n"); buff.append("<td class=\"label\">").append(rowLabels[i]).append("</td>\n"); for (int j = 0; j < table[i].length; j++) { buff.append("<td class=\"data\">"); buff.append(((table[i][j] != null) ? table[i][j] : "")); buff.append("</td>\n"); } buff.append("</tr>\n"); } buff.append("</table>"); return buff.toString(); }
[ "Returns an HTML table containing the matrix of Strings passed in.\nThe first dimension of the matrix should represent the rows, and the\nsecond dimension the columns." ]
[ "Load model from file\n\n@param gvrContext Valid {@link GVRContext} instance\n@param modelFile Path to the model's file, relative to the {@code assets} directory\n@return root object The root {@link GVRSceneObject} of the model\n@throws IOException If reading the model file fails", "Record the checkout wait time in us\n\n@param dest Destination of the socket to checkout. Will actually record\nif null. Otherwise will call this on self and corresponding child\nwith this param null.\n@param checkoutTimeUs The number of us to wait before getting a socket", "Sets selected page implicitly\n@param page new selected page\n@return true if the page has been selected successfully", "You should use the server's time here. Otherwise you might get unexpected results.\n\nThe typical use case is:\n\n\n<pre>\nHTTPResponse response = ....\nHTTPRequest request = createRequest();\nrequest = request.conditionals(new Conditionals().ifModifiedSince(response.getLastModified());\n</pre>\n\n@param time the time to check.\n@return the conditionals with the If-Modified-Since date set.", "Associate the specified value with the specified key in this map.\nIf the map previously contained a mapping for this key, the old\nvalue is replaced and returned.\n\n@param key the key with which the value is to be associated\n@param value the value to be associated with this key\n@return the value previously mapped to the key, or null", "Parses the input stream to read the header\n\n@param input data input to read from\n@return the parsed protocol header\n@throws IOException", "Allocates a new next buffer and pending fetch.", "Use this API to fetch authenticationtacacspolicy_systemglobal_binding resources of given name .", "Removes all resources deployed using this class." ]
public List<T> parseList(JsonParser jsonParser) throws IOException { List<T> list = new ArrayList<>(); if (jsonParser.getCurrentToken() == JsonToken.START_ARRAY) { while (jsonParser.nextToken() != JsonToken.END_ARRAY) { list.add(parse(jsonParser)); } } return list; }
[ "Parse a list of objects from a JsonParser.\n\n@param jsonParser The JsonParser, preconfigured to be at the START_ARRAY token." ]
[ "Adjusts the site root and returns a cloned CmsObject, iff the module has set an import site that differs\nfrom the site root of the CmsObject provided as argument. Otherwise returns the provided CmsObject unchanged.\n@param cms The original CmsObject.\n@param module The module where the import site is read from.\n@return The original CmsObject, or, if necessary, a clone with adjusted site root\n@throws CmsException see {@link OpenCms#initCmsObject(CmsObject)}", "Register the given mbean with the server\n\n@param server The server to register with\n@param mbean The mbean to register\n@param name The name to register under", "Returns the value of the identified field as a Date.\nTime fields returned from an FQL query are expressed in terms of seconds since midnight, January 1, 1970 UTC.\n@param fieldName the name of the field\n@return the value of the field as a Date\n@throws FqlException if the field's value cannot be expressed as a long value from which a Date object can be constructed.", "Set a range of the colormap, interpolating between two colors.\n@param firstIndex the position of the first color\n@param lastIndex the position of the second color\n@param color1 the first color\n@param color2 the second color", "Sets the set of property filters based on the given string.\n\n@param filters\ncomma-separates list of property ids, or \"-\" to filter all\nstatements", "Use this API to fetch systemuser resource of given name .", "Return a string that ensures that no line is longer then 512 characters\nand lines are broken according to manifest specification.\n\n@param input The buffer containing the content that should be made safe\n@param newline The string to use to create newlines (usually \"\\n\" or\n\"\\r\\n\")\n@return The string with no longer lines then 512, ready to be read again\nby {@link MergeableManifest2}.", "Removes an existing metadata value.\n@param path the path that designates the key. Must be prefixed with a \"/\".\n@return this metadata object.", "Converts a vector from eigen space into sample space.\n\n@param eigenData Eigen space data.\n@return Sample space projection." ]
private String escapeString(String value) { m_buffer.setLength(0); m_buffer.append('"'); for (int index = 0; index < value.length(); index++) { char c = value.charAt(index); switch (c) { case '"': { m_buffer.append("\\\""); break; } case '\\': { m_buffer.append("\\\\"); break; } case '/': { m_buffer.append("\\/"); break; } case '\b': { m_buffer.append("\\b"); break; } case '\f': { m_buffer.append("\\f"); break; } case '\n': { m_buffer.append("\\n"); break; } case '\r': { m_buffer.append("\\r"); break; } case '\t': { m_buffer.append("\\t"); break; } default: { // Append if it's not a control character (0x00 to 0x1f) if (c > 0x1f) { m_buffer.append(c); } break; } } } m_buffer.append('"'); return m_buffer.toString(); }
[ "Escape text to ensure valid JSON.\n\n@param value value\n@return escaped value" ]
[ "Revert all the working copy changes.", "Returns a compact representation of all of the stories on the task.\n\n@param task The task containing the stories to get.\n@return Request object", "Use this API to fetch aaapreauthenticationpolicy_binding resource of given name .", "Performs DBSCAN cluster analysis.\n\n@param points the points to cluster\n@return the list of clusters\n@throws NullArgumentException if the data points are null", "Caches the results of radix to the given power.\n\n@param radix\n@param power\n@return", "Extract day type definitions.\n\n@param types Synchro day type rows\n@return Map of day types by UUID", "Use this API to update cmpparameter.", "Send a packet to the target player telling it to load the specified track from the specified source player.\n\n@param targetPlayer the device number of the player that you want to have load a track\n@param rekordboxId the identifier of a track within the source player's rekordbox database\n@param sourcePlayer the device number of the player from which the track should be loaded\n@param sourceSlot the media slot from which the track should be loaded\n@param sourceType the type of track to be loaded\n\n@throws IOException if there is a problem sending the command\n@throws IllegalStateException if the {@code VirtualCdj} is not active or the target device cannot be found", "Use this API to fetch all the authenticationradiusaction resources that are configured on netscaler." ]
public static lbvserver_rewritepolicy_binding[] get(nitro_service service, String name) throws Exception{ lbvserver_rewritepolicy_binding obj = new lbvserver_rewritepolicy_binding(); obj.set_name(name); lbvserver_rewritepolicy_binding response[] = (lbvserver_rewritepolicy_binding[]) obj.get_resources(service); return response; }
[ "Use this API to fetch lbvserver_rewritepolicy_binding resources of given name ." ]
[ "Returns the effective batch size. If the dialect is multiget capable and a batch size has been configured, use\nthat one, otherwise the default.", "Rewrites the file passed to 'this' constructor so that the actual line numbers match the recipe passed to 'this'\nconstructor.", "Use this API to fetch a vpnglobal_authenticationsamlpolicy_binding resources.", "Use this API to unset the properties of bridgetable resource.\nProperties that need to be unset are specified in args array.", "Counts one entity. Every once in a while, the current time is checked so\nas to print an intermediate report roughly every ten seconds.", "Creates a random symmetric matrix whose values are selected from an uniform distribution\nfrom min to max, inclusive.\n\n@param length Width and height of the matrix.\n@param min Minimum value an element can have.\n@param max Maximum value an element can have.\n@param rand Random number generator.\n@return A symmetric matrix.", "Opens the stream in a background thread.", "Reads an argument of type \"number\" from the request.", "Determines if the queue identified by the given key can be used as 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 already is a delayed queue or is not currently used, false otherwise" ]
public static boolean isFloat(CharSequence self) { try { Float.valueOf(self.toString().trim()); return true; } catch (NumberFormatException nfe) { return false; } }
[ "Determine if a CharSequence can be parsed as a Float.\n\n@param self a CharSequence\n@return true if the CharSequence can be parsed\n@see #isFloat(String)\n@since 1.8.2" ]
[ "Read an int from an input stream.\n\n@param is input stream\n@return int value", "Use this API to unset the properties of ipv6 resource.\nProperties that need to be unset are specified in args array.", "Checks if the specified bytecode version string represents a JDK 1.5+ compatible\nbytecode version.\n@param bytecodeVersion the bytecode version string (1.4, 1.5, 1.6, 1.7 or 1.8)\n@return true if the bytecode version is JDK 1.5+", "At the moment we only support the case where one entity type is returned", "Retrieve a field from a particular entity using its alias.\n\n@param typeClass the type of entity we are interested in\n@param alias the alias\n@return the field type referred to be the alias, or null if not found", "Adds the includes of the fileset to the handling.\n\n@param handling The handling\n@param fileSet The fileset", "Creates a list of placeholders for use in a PreparedStatement\n\n@param length number of placeholders\n@return String of placeholders, seperated by comma", "Returns the corporate dependencies of a module\n\n@param module Module\n@param corporateFilters List<String>\n@return List<Dependency>", "Handles newlines by removing them and add new rows instead" ]
public History getHistoryForID(int id) { History history = null; PreparedStatement query = null; ResultSet results = null; try (Connection sqlConnection = sqlService.getConnection()) { query = sqlConnection.prepareStatement("SELECT * FROM " + Constants.DB_TABLE_HISTORY + " WHERE " + Constants.GENERIC_ID + "=?"); query.setInt(1, id); logger.info("Query: {}", query.toString()); results = query.executeQuery(); if (results.next()) { history = historyFromSQLResult(results, true, ScriptService.getInstance().getScripts(Constants.SCRIPT_TYPE_HISTORY)); } query.close(); } catch (Exception e) { } finally { try { if (results != null) { results.close(); } } catch (Exception e) { } try { if (query != null) { query.close(); } } catch (Exception e) { } } return history; }
[ "Get history for a specific database ID\n\n@param id ID of history entry\n@return History entry" ]
[ "Exit reporting up to distributor, using information gained from status reports to the LineCountManager\n\n@return a boolean of whether this consumer should immediately exit", "Perform a one-off scan during boot to establish deployment tasks to execute during boot", "Return the inverse cumulative distribution function at x.\n\n@param x Argument\n@return Inverse cumulative distribution function at x.", "Constructs the convex hull of a set of points.\n\n@param points\ninput points\n@param nump\nnumber of input points\n@throws IllegalArgumentException\nthe number of input points is less than four or greater then\nthe length of <code>points</code>, or the points appear to be\ncoincident, colinear, or coplanar.", "Called to update the cached formats when something changes.", "Returns a new instance of the given class using the constructor with the specified parameter.\n\n@param target The class to instantiate\n@param type The types of the single parameter of the constructor\n@param arg The argument\n@return The instance", "Sets the RDF serialization tasks based on the given string value.\n\n@param tasks\na space-free, comma-separated list of task names", "Use this API to delete application.", "compares two java files" ]
public static vpnglobal_intranetip_binding[] get(nitro_service service) throws Exception{ vpnglobal_intranetip_binding obj = new vpnglobal_intranetip_binding(); vpnglobal_intranetip_binding response[] = (vpnglobal_intranetip_binding[]) obj.get_resources(service); return response; }
[ "Use this API to fetch a vpnglobal_intranetip_binding resources." ]
[ "Connect to the HC and retrieve the current model updates.\n\n@param controller the server controller\n@param callback the operation completed callback\n\n@throws IOException for any error", "Get DPI suggestions.\n\n@return DPI suggestions", "Update the currency format.\n\n@param properties project properties\n@param decimalSeparator decimal separator\n@param thousandsSeparator thousands separator", "Updates the model. Ensures that we reset the columns widths.\n\n@param model table model", "Add nodes to the workers list\n\n@param nodeIds list of node ids.", "Creates a block matrix the same size as A_inv, inverts the matrix and copies the results back\nonto A_inv.\n\n@param A_inv Where the inverted matrix saved. Modified.", "Create a ModelNode representing the CPU the instance is running on.\n\n@return a ModelNode representing the CPU the instance is running on.\n@throws OperationFailedException", "Given the current and final cluster dumps it into the output directory\n\n@param currentCluster Initial cluster metadata\n@param finalCluster Final cluster metadata\n@param outputDirName Output directory where to dump this file\n@throws IOException", "Returns requested content types or default content type if none found.\n\n@return Requested content types or default content type if none found." ]
protected Violation createViolation(SourceCode sourceCode, ASTNode node, String message) { String sourceLine = sourceCode.line(node.getLineNumber()-1); return createViolation(node.getLineNumber(), sourceLine, message); }
[ "Create a new Violation for the AST node.\n@param sourceCode - the SourceCode\n@param node - the Groovy AST Node\n@param message - the message for the violation; defaults to null" ]
[ "Reads a stringtemplate group from a stream.\n\nThis will always return a group (empty if necessary), even if reading it from the stream fails.\n\n@param stream the stream to read from\n@return the string template group", "Returns the x-coordinate of a vertex normal.\n\n@param vertex the vertex index\n@return the x coordinate", "Close the store.", "This method extracts project properties from a Phoenix file.\n\n@param phoenixSettings Phoenix settings\n@param storepoint Current storepoint", "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", "Open a new content stream.\n\n@param item the content item\n@return the content stream", "Retrieve row from a nested table.\n\n@param name column name\n@return nested table rows", "Method to be implemented by the RendererBuilder subtypes. In this method the library user will\ndefine the mapping between content and renderer class.\n\n@param content used to map object to Renderers.\n@return the class associated to the renderer.", "Get FieldDescriptor from joined superclass." ]
public static int getStatusBarHeight(Context context, boolean force) { int result = 0; int resourceId = context.getResources().getIdentifier("status_bar_height", "dimen", "android"); if (resourceId > 0) { result = context.getResources().getDimensionPixelSize(resourceId); } int dimenResult = context.getResources().getDimensionPixelSize(R.dimen.tool_bar_top_padding); //if our dimension is 0 return 0 because on those devices we don't need the height if (dimenResult == 0 && !force) { return 0; } else { //if our dimens is > 0 && the result == 0 use the dimenResult else the result; return result == 0 ? dimenResult : result; } }
[ "helper to calculate the statusBar height\n\n@param context\n@param force pass true to get the height even if the device has no translucent statusBar\n@return" ]
[ "May have to be changed to let multiple touch", "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", "Converts an object to an object, with squiggly filters applied.\n\n@param mapper the object mapper\n@param source the source to convert\n@return target instance\n@see SquigglyUtils#objectify(ObjectMapper, Object, Class)", "Generate the body of a toString method that uses plain concatenation.\n\n<p>Conventionally, we join properties with comma separators. If all of the properties are\nalways present, this can be done with a long block of unconditional code. We could use a\nStringBuilder for this, but in fact the Java compiler will do this for us under the hood\nif we use simple string concatenation, so we use the more readable approach.", "Propagates the names of all facets to each single facet.", "Returns an array of non-empty ids from the given list of ids or values.\n\n@param idsOrValues\nlist of ids and/or values\n@return array of non-empty ids", "Get the features collection from a GeoJson URL.\n\n@param template the template\n@param geoJsonUrl what to parse\n@return the feature collection", "Use this API to flush cachecontentgroup resources.", "retrieve a single reference- or collection attribute\nof a persistent instance.\n@param pInstance the persistent instance\n@param pAttributeName the name of the Attribute to load" ]
private String getNotes(Row row) { String notes = row.getString("NOTET"); if (notes != null) { if (notes.isEmpty()) { notes = null; } else { if (notes.indexOf(LINE_BREAK) != -1) { notes = notes.replace(LINE_BREAK, "\n"); } } } return notes; }
[ "Extract note text.\n\n@param row task data\n@return note text" ]
[ "Scan the segments to find the largest height value present.\n\n@return the largest waveform height anywhere in the preview.", "Sets the HTML entity translator for all cells in the row.\nIt will also remove any other translator set.\nNothing will happen if the argument is null.\n@param htmlElementTranslator translator\n@return this to allow chaining", "Stop an animation.", "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}.", "This produces a shorter string for the address that uses the canonical representation but not using leading zeroes.\n\nEach address has a unique compressed string.", "Get an interpolated value for a given argument x.\n\n@param x The abscissa at which the interpolation should be performed.\n@return The interpolated value (ordinate).", "end class CoNLLIterator", "Reload a managed server.\n\n@param permit the controller permit\n@return whether the state was changed successfully or not", "Utility method to clear cached calendar data." ]
private void init(boolean upgrade) { initAdapter(); initQueries(); if (upgrade) { dbUpgrade(); } // First contact with the DB is version checking (if no connection opened by pool). // If DB is in wrong version or not available, just wait for it to be ready. boolean versionValid = false; while (!versionValid) { try { checkSchemaVersion(); versionValid = true; } catch (Exception e) { String msg = e.getLocalizedMessage(); if (e.getCause() != null) { msg += " - " + e.getCause().getLocalizedMessage(); } jqmlogger.error("Database not ready: " + msg + ". Waiting for database..."); try { Thread.sleep(10000); } catch (Exception e2) { } } } }
[ "Main database initialization. To be called only when _ds is a valid DataSource." ]
[ "Put the given value to the appropriate id in the stack, using the version\nof the current list node identified by that id.\n\n@param id\n@param element element to set\n@return element that was replaced by the new element\n@throws ObsoleteVersionException when an update fails", "Returns the property value read from the given JavaBean.\n\n@param bean the JavaBean to read the property from\n@param property the property to read\n\n@return the property value read from the given JavaBean", "Links the two field names into a single left.right field name.\nIf the left field is empty, right is returned\n\n@param left one field name\n@param right the other field name\n\n@return left.right or right if left is an empty string", "Cuts the string at the end if it's longer than maxLength and appends the given end string to it. The length of\nthe resulting string is always less or equal to the given maxLength. It's valid to pass a null text; in this\ncase null is returned.", "Saves a matrix to disk using Java binary serialization.\n\n@param A The matrix being saved.\n@param fileName Name of the file its being saved at.\n@throws java.io.IOException", "Parses command-line and gets metadata.\n\n@param args Command-line input\n@param printHelp Tells whether to print help only or execute command\nactually\n@throws IOException", "Use this API to expire cacheobject.", "Calculates the legend bounds for a custom list of legends.", "Takes the specified object and converts the argument to a String.\n\n@param arg The object to convert\n@return A String representation of the argument." ]
private Calendar cleanHistCalendar(Calendar cal) { cal.set(Calendar.MILLISECOND, 0); cal.set(Calendar.SECOND, 0); cal.set(Calendar.MINUTE, 0); cal.set(Calendar.HOUR, 0); return cal; }
[ "Put everything smaller than days at 0\n@param cal calendar to be cleaned" ]
[ "Transforms the configuration.\n\n@throws Exception if something goes wrong", "Given a Task instance, this task determines if it should be written to the\nPM XML file as an activity or as a WBS item, and calls the appropriate\nmethod.\n\n@param task Task instance", "Update counters and call hooks.\n@param handle connection handle.", "Resolves the gav using the resolver. If the gav corresponds to the project artifact and is an unresolved version\nfor a RELEASE or LATEST, the gav is resolved such it a release not newer than the project version is found that\noptionally corresponds to the provided version regex, if provided.\n\n<p>If the gav exactly matches the current project, the file of the artifact is found on the filesystem in\ntarget directory and the resolver is ignored.\n\n@param project the project to restrict by, if applicable\n@param gav the gav to resolve\n@param versionRegex the optional regex the version must match to be considered.\n@param resolver the version resolver to use\n@return the resolved artifact matching the criteria.\n@throws VersionRangeResolutionException on error\n@throws ArtifactResolutionException on error", "Generate JSON format as result of the scan.\n\n@since 1.2", "Get a reader implementation class to perform API calls with while specifying\nan explicit page size for paginated API calls. This gets translated to a per_page=\nparameter on API requests. Note that Canvas does not guarantee it will honor this page size request.\nThere is an explicit maximum page size on the server side which could change. The default page size\nis 10 which can be limiting when, for example, trying to get all users in a 800 person course.\n@param type Interface type you wish to get an implementation for\n@param oauthToken An OAuth token to use for authentication when making API calls\n@param paginationPageSize Requested pagination page size\n@param <T> The reader type to request an instance of\n@return An instance of the requested reader class", "Ask the specified player for metadata about the track in the specified slot with the specified rekordbox ID,\nusing cached media instead if it is available, and possibly giving up if we are in passive mode.\n\n@param track uniquely identifies the track whose metadata is desired\n@param trackType identifies the type of track being requested, which affects the type of metadata request\nmessage that must be used\n@param failIfPassive will prevent the request from taking place if we are in passive mode, so that automatic\nmetadata updates will use available caches only\n\n@return the metadata found, if any", "Creates a new ServerDetails object for deployer, this will take URL and name from the oldDeployer ServerDetails", "main class entry point." ]
private DBHandling createDBHandling() throws BuildException { if ((_handling == null) || (_handling.length() == 0)) { throw new BuildException("No handling specified"); } try { String className = "org.apache.ojb.broker.platforms."+ Character.toTitleCase(_handling.charAt(0))+_handling.substring(1)+ "DBHandling"; Class handlingClass = ClassHelper.getClass(className); return (DBHandling)handlingClass.newInstance(); } catch (Exception ex) { throw new BuildException("Invalid handling '"+_handling+"' specified"); } }
[ "Creates a db handling object.\n\n@return The db handling object\n@throws BuildException If the handling is invalid" ]
[ "Given a filesystem and path to a node, gets all the files which belong to\na partition and replica type\n\nWorks only for {@link ReadOnlyStorageFormat.READONLY_V2}\n\n@param fs Underlying filesystem\n@param path The node directory path\n@param partitionId The partition id for which we get the files\n@param replicaType The replica type\n@return Returns list of files of this partition, replicaType\n@throws IOException", "Gets the host-ignore data for a slave host running the given version.\n\n@param major the kernel management API major version\n@param minor the kernel management API minor version\n@param micro the kernel management API micro version\n\n@return the host-ignore data, or {@code null} if there is no matching registration", "Get an extent aware Iterator based on the Query\n\n@param query\n@param cld the ClassDescriptor\n@return OJBIterator", "Declares a fresh Builder to copy default property values from.\n\n<p>Reuses an existing fresh Builder instance if one was already declared in this scope.\n\n@returns a variable holding a fresh Builder, if a no-args factory method is available to\ncreate one with", "Use this API to enable nsacl6 of given name.", "Handles Multi Instance Report message. Handles Report on\nthe number of instances for the command class.\n@param serialMessage the serial message to process.\n@param offset the offset at which to start procesing.", "Iterates over the elements of an iterable collection of items and returns\nthe index values of the items that match the condition specified in the closure.\n\n@param self the iteration object over which to iterate\n@param closure the filter to perform a match on the collection\n@return a list of numbers corresponding to the index values of all matched objects\n@since 1.5.2", "Flag that the processor has started execution.\n\n@param processorGraphNode the node that has started.", "Generates timephased costs from the assignment's cost value. Used for Cost type Resources.\n\n@return timephased cost" ]
private String escapeText(StringBuilder sb, String text) { int length = text.length(); char c; sb.setLength(0); for (int loop = 0; loop < length; loop++) { c = text.charAt(loop); switch (c) { case '<': { sb.append("&lt;"); break; } case '>': { sb.append("&gt;"); break; } case '&': { sb.append("&amp;"); break; } default: { if (validXMLCharacter(c)) { if (c > 127) { sb.append("&#" + (int) c + ";"); } else { sb.append(c); } } break; } } } return (sb.toString()); }
[ "Quick and dirty XML text escape.\n\n@param sb working string buffer\n@param text input text\n@return escaped text" ]
[ "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.", "exposed only for tests", "Adds OPT_J | OPT_JSON 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", "This method writes project property data to a JSON file.", "Extracts the java class name from the schema info\n\n@param schemaInfo the schema info, a string like: java=java.lang.String\n@return the name of the class extracted from the schema info", "This function uses a proxy which is capable of transforming typed invocations into proper HTTP calls\nwhich will be understood by RESTful services. This works for subresources as well. Interfaces and\nconcrete classes can be proxified, in the latter case a CGLIB runtime dependency is needed. CXF JAX-RS\nproxies can be configured the same way as HTTP-centric WebClients and response status and headers can\nalso be checked. HTTP response errors can be converted into typed exceptions.", "Calculates the bar width and bar margin based on the _DataSize and settings and starts the boundary\ncalculation in child classes.\n@param _DataSize Amount of data sets", "Use this API to fetch the statistics of all appfwprofile_stats resources that are configured on netscaler.", "Stops the background data synchronization thread and releases the local client." ]
public void pause(ServerActivityCallback requestCountListener) { if (paused) { throw ServerLogger.ROOT_LOGGER.serverAlreadyPaused(); } this.paused = true; listenerUpdater.set(this, requestCountListener); if (activeRequestCountUpdater.get(this) == 0) { if (listenerUpdater.compareAndSet(this, requestCountListener, null)) { requestCountListener.done(); } } }
[ "Pause the current entry point, and invoke the provided listener when all current requests have finished.\n\nIf individual control point tracking is not enabled then the listener will be invoked straight away\n\n@param requestCountListener The listener to invoke" ]
[ "Use this API to fetch all the inat resources that are configured on netscaler.", "Log a warning for the resource at the provided address and a single attribute. The detail message is a default\n'Attributes are not understood in the target model version and this resource will need to be ignored on the target host.'\n\n@param address where warning occurred\n@param attribute attribute we are warning about", "Triggers a replication request, blocks while the replication is in progress.\n@return ReplicationResult encapsulating the result", "Convenience method which allows all projects in the database to\nbe read in a single operation.\n\n@return list of ProjectFile instances\n@throws MPXJException", "Starts the HTTP service.\n\n@throws Exception if the service failed to started", "Creates a color item that represents a color field fond for a track.\n\n@param colorId the key of the color as found in the database\n@param label the corresponding color label as found in the database (or sent in the dbserver message)\n\n@return the color metadata field", "Closes off this connection\n@param connection to close", "Applies the kubernetes json url to the configuration.\n\n@param map\nThe arquillian configuration.", "Obtains a local date in Julian 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 Julian local date, not null\n@throws DateTimeException if unable to create the date" ]
public int numOccurrences(int year, int month, int day) { DateTimeFormatter parser = ISODateTimeFormat.date(); DateTime date = parser.parseDateTime(year + "-" + month + "-" + "01"); Calendar cal = Calendar.getInstance(); cal.setTime(date.toDate()); GregorianChronology calendar = GregorianChronology.getInstance(); DateTimeField field = calendar.dayOfMonth(); int days = 0; int count = 0; int num = field.getMaximumValue(new LocalDate(year, month, day, calendar)); while (days < num) { if (cal.get(Calendar.DAY_OF_WEEK) == day) { count++; } date = date.plusDays(1); cal.setTime(date.toDate()); days++; } return count; }
[ "Given a year, month, and day, find the number of occurrences of that day in the month\n\n@param year the year\n@param month the month\n@param day the day\n@return the number of occurrences of the day in the month" ]
[ "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", "Returns the input to parse including the whitespace left to the cursor position since\nit may be relevant to the list of proposals for whitespace sensitive languages.", "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.", "Helper to read an optional Boolean value.\n@param path The XML path of the element to read.\n@return The Boolean value stored in the XML, or <code>null</code> if the value could not be read.", "Loads configuration from InputStream. Later loads have lower priority.\n\n@param in InputStream to load from\n@since 1.2.0", "Creates a new Box Developer Edition connection with enterprise token leveraging an access token cache.\n@param enterpriseId the enterprise ID to use for requesting access token.\n@param clientId the client ID to use when exchanging the JWT assertion for an access token.\n@param clientSecret the client secret to use when exchanging the JWT assertion for an access token.\n@param encryptionPref the encryption preferences for signing the JWT.\n@param accessTokenCache the cache for storing access token information (to minimize fetching new tokens)\n@return a new instance of BoxAPIConnection.", "append human message to JsonRtn class\n\n@param jsonRtn\n@return", "Finish initialization of state object.\n\n@param geoService geo service\n@param converterService converter service\n@throws GeomajasException oops", "Use this API to update nsconfig." ]
public void sendJsonToUser(Object data, String username) { sendToUser(JSON.toJSONString(data), username); }
[ "Send JSON representation of given data object to all connections of a user\n@param data the data object\n@param username the username" ]
[ "Acquires a read lock on a specific key.\n@param key The key to lock\n@param timeout in milliseconds; -1 means wait indefinitely, 0 means no wait.", "Use this API to fetch a systemglobal_authenticationldappolicy_binding resources.", "Get the possible beans for the given element\n\n@param resolvable The resolving criteria\n@return An unmodifiable set of matching beans", "Calcs the bonding size of given mesh.\n\n@param mesh Mesh to calc its bouding size.\n@return The bounding size for x, y and z axis.", "Shortcut for mapping an arbitrary observable to void, using the IO scheduler.\n@param fromObservable the source observable\n@return a void-emitting observable", "May have to be changed to let multiple touch", "Use this API to fetch all the configstatus resources that are configured on netscaler.", "absolute for basicJDBCSupport\n@param row", "Get an extent aware Iterator based on the ReportQuery\n\n@param query\n@param cld\n@return OJBIterator" ]
public void bindBundleToSceneObject(GVRScriptBundle scriptBundle, GVRSceneObject rootSceneObject) throws IOException, GVRScriptException { bindHelper(scriptBundle, rootSceneObject, BIND_MASK_SCENE_OBJECTS); }
[ "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." ]
[ "Get random stub matching this user type\n@param userType User type\n@return Random stub", "Finds edges based to a specific object reference descriptor and\nadds them to the edge map.\n@param vertex the object envelope vertex holding the object reference\n@param rds the object reference descriptor", "Lookup an object via its name.\n@param name The name of an object.\n@return The object with that name.\n@exception ObjectNameNotFoundException There is no object with the specified name.\nObjectNameNotFoundException", "absolute for basicJDBCSupport\n@param row", "Obtain an OTMConnection for the given persistence broker key", "Returns the compact project membership records for the project.\n\n@param project The project for which to fetch memberships.\n@return Request object", "Create a FreeMarkerOperation with the provided furnace instance template path, and varNames.\n\nThe variables in varNames will be provided to the template, and a new ReportModel will be created with these variables attached.", "calculate distance of two points\n\n@param a\n@param b\n@return", "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" ]
private static String getUnexpectedTypeMessage(final Class<?> expectedType, final Object actualValue) { if( expectedType == null ) { throw new NullPointerException("expectedType should not be null"); } String expectedClassName = expectedType.getName(); String actualClassName = (actualValue != null) ? actualValue.getClass().getName() : "null"; return String.format("the input value should be of type %s but is %s", expectedClassName, actualClassName); }
[ "Assembles the exception message when the value received by a CellProcessor isn't of the correct type.\n\n@param expectedType\nthe expected type\n@param actualValue\nthe value received by the CellProcessor\n@return the message\n@throws NullPointerException\nif expectedType is null" ]
[ "The setter for setting configuration file. It will convert the value to a URI.\n\n@param configurationFiles the configuration file map.", "Populates the project header.\n\n@param record MPX record\n@param properties project properties\n@throws MPXJException", "Return list of all files in the directory.\n\n@param directory target directory on file system\n@return list of files in the directory or empty list if directory is empty.", "Search for groups. 18+ groups will only be returned for authenticated calls where the authenticated user is over 18. This method does not require\nauthentication.\n\n@param text\nThe text to search for.\n@param perPage\nNumber of groups 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 A GroupList Object. Only the fields <em>id</em>, <em>name</em> and <em>eighteenplus</em> in the Groups will be set.\n@throws FlickrException", "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", "Remove an active operation.\n\n@param id the operation id\n@return the removed active operation, {@code null} if there was no registered operation", "Set the draw mode for this mesh. Default is GL_TRIANGLES.\n\n@param drawMode", "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", "Check whether the media seems to have changed since a saved version of it was used. We ignore changes in\nfree space because those probably just reflect history entries being added.\n\n@param originalMedia the media details when information about it was saved\n\n@return true if there have been detectable significant changes to the media since it was saved\n\n@throws IllegalArgumentException if the {@link #hashKey()} values of the media detail objects differ" ]
protected synchronized int loadSize() throws PersistenceBrokerException { PersistenceBroker broker = getBroker(); try { return broker.getCount(getQuery()); } catch (Exception ex) { throw new PersistenceBrokerException(ex); } finally { releaseBroker(broker); } }
[ "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" ]
[ "This method retrieves a double of the specified type,\nbelonging to the item with the specified unique ID.\n\n@param id unique ID of entity to which this data belongs\n@param type data type identifier\n@return required double data", "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", "Visit the implicit first frame of this method.", "Gets the publisher of the specified type, if it is wrapped by the \"Flexible Publish\" publisher in a project.\nNull is returned if no such publisher is found.\n@param project The project\n@param type The type of the publisher", "Sets the options contained in the DJCrosstab to the JRDesignCrosstab.\nAlso fits the correct width", "Entry point for the example.\n\n@param args Command-line arguments for the example. To use samplemachine.xml from resources, send\nno arguments. To use other file, send a filename without xml extension).", "Creates SLD rules for each old style.", "This essentially ensures that we only store a single Vertex for each unique \"Set\" of tags.", "Transposes a block matrix.\n\n@param A Original matrix. Not modified.\n@param A_tran Transposed matrix. Modified." ]
public static boolean organizeAssociationMapByRowKey( org.hibernate.ogm.model.spi.Association association, AssociationKey key, AssociationContext associationContext) { if ( association.isEmpty() ) { return false; } if ( key.getMetadata().getRowKeyIndexColumnNames().length != 1 ) { return false; } Object valueOfFirstRow = association.get( association.getKeys().iterator().next() ) .get( key.getMetadata().getRowKeyIndexColumnNames()[0] ); if ( !( valueOfFirstRow instanceof String ) ) { return false; } // The list style may be explicitly enforced for compatibility reasons return getMapStorage( associationContext ) == MapStorageType.BY_KEY; }
[ "Whether the rows of the given association should be stored in a hash using the single row key column as key or\nnot." ]
[ "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 any app users that has an exact match with the externalAppUserId term.\n@param api the API connection to be used when retrieving the users.\n@param externalAppUserId the external app user id that has been set for app user\n@param fields the fields to retrieve. Leave this out for the standard fields.\n@return an iterable containing users matching the given email", "Curries a function that takes four arguments.\n\n@param function\nthe original function. May not be <code>null</code>.\n@param argument\nthe fixed first argument of {@code function}.\n@return a function that takes three arguments. Never <code>null</code>.", "Use this API to update autoscaleprofile.", "Get the default provider used.\n\n@return the default provider, never {@code null}.", "Scans given archive for files passing given filter, adds the results into given list.", "Obtain the path ID for a profile\n\n@param identifier Can be the path ID, or friendly name\n@param profileId\n@return\n@throws Exception", "Add the declarationBinderRef to the ImportersManager, create the corresponding.\nBinderDescriptor.\n\n@param declarationBinderRef the ServiceReference<DeclarationBinder> of the DeclarationBinder\n@throws InvalidFilterException", "Write project properties.\n\n@param record project properties\n@throws IOException" ]