query
stringlengths 74
6.1k
| positive
sequencelengths 1
1
| negative
sequencelengths 9
9
|
---|---|---|
public void setMeta(String photoId, String title, String description) throws FlickrException {
Map<String, Object> parameters = new HashMap<String, Object>();
parameters.put("method", METHOD_SET_META);
parameters.put("photo_id", photoId);
parameters.put("title", title);
parameters.put("description", description);
Response response = transport.post(transport.getPath(), parameters, apiKey, sharedSecret);
if (response.isError()) {
throw new FlickrException(response.getErrorCode(), response.getErrorMessage());
}
} | [
"Set the meta data for the photo.\n\nThis method requires authentication with 'write' permission.\n\n@param photoId\nThe photo ID\n@param title\nThe new title\n@param description\nThe new description\n@throws FlickrException"
] | [
"Utility method to clear cached calendar data.",
"Use this API to delete route6 of given name.",
"This filter adds a blur effect to the image using the specified radius and sigma.\n@param radius Radius used in the gaussian function to generate a matrix, maximum value is 150.\nThe bigger the radius more blurred will be the image.\n@param sigma Sigma used in the gaussian function.",
"1-D Gabor function.\n\n@param x Value.\n@param mean Mean.\n@param amplitude Amplitude.\n@param position Position.\n@param width Width.\n@param phase Phase.\n@param frequency Frequency.\n@return Gabor response.",
"Create a Vendor from a Callable",
"Find the scheme to use to connect to the service.\nUses java annotations first and if not found, uses kubernetes annotations on the service object.\n\n@param service\nThe target service.\n@param qualifiers\nThe set of qualifiers.\n\n@return Returns the resolved scheme of 'http' as a fallback.",
"Prep for a new connection\n@return if stats are enabled, return the nanoTime when this connection was requested.\n@throws SQLException",
"Makes http DELETE request\n@param url url to makes request to\n@param params data to add to params field\n@return {@link okhttp3.Response}\n@throws RequestException\n@throws LocalOperationException",
"Gets all data set values.\n\n@param dataSet\nIIM record and dataset code (See constants in {@link IIM})\n@return data set value\n@throws SerializationException\nif value can't be deserialized from binary representation"
] |
public long removeRangeByScore(final ScoreRange scoreRange) {
return doWithJedis(new JedisCallable<Long>() {
@Override
public Long call(Jedis jedis) {
return jedis.zremrangeByScore(getKey(), scoreRange.from(), scoreRange.to());
}
});
} | [
"Removes all elements in the sorted set with a score in the given range.\n@param scoreRange\n@return the number of elements removed."
] | [
"Append a SubQuery the SQL-Clause\n@param subQuery the subQuery value of SelectionCriteria",
"Resolve a resource transformer for a given address.\n\n@param address the address\n@param placeholderResolver a placeholder resolver used to resolve children of a placeholder registration\n@return the resource transformer",
"This creates a new audit log file with default permissions.\n\n@param file File to create",
"Use this API to fetch cachepolicylabel_policybinding_binding resources of given name .",
"Read arguments from a file. Newline delimited, UTF-8 encoded. No fanciness to\navoid dependencies.",
"Reads the configuration of a field facet.\n@param pathPrefix The XML Path that leads to the field facet configuration, or <code>null</code> if the XML was not correctly structured.\n@return The read configuration, or <code>null</code> if the XML was not correctly structured.",
"Adds a new role to the list of defined roles.\n\n@param roleName - The name of the role being added.",
"Creates the server setup, depending on the protocol flags.\n\n@return the configured server setups.",
"Creates a namespace if needed."
] |
private Statement createStatement(Connection con, boolean scrollable, int explicitFetchSizeHint)
throws java.sql.SQLException
{
Statement result;
try
{
// if necessary use JDBC1.0 methods
if (!FORCEJDBC1_0)
{
result =
con.createStatement(
scrollable
? ResultSet.TYPE_SCROLL_INSENSITIVE
: ResultSet.TYPE_FORWARD_ONLY,
ResultSet.CONCUR_READ_ONLY);
afterJdbc2CapableStatementCreate(result, explicitFetchSizeHint);
}
else
{
result = con.createStatement();
}
}
catch (AbstractMethodError err)
{
// if a JDBC1.0 driver is used, the signature
// createStatement(int, int) is not defined.
// we then call the JDBC1.0 variant createStatement()
log.warn("Used driver seems not JDBC 2.0 compatible, use the JDBC 1.0 mode", err);
result = con.createStatement();
FORCEJDBC1_0 = true;
}
catch (SQLException eSql)
{
// there are JDBC Driver that nominally implement JDBC 2.0, but
// throw DriverNotCapableExceptions. If we catch one of these
// we force usage of JDBC 1.0
if (eSql.getClass().getName()
.equals("interbase.interclient.DriverNotCapableException"))
{
log.warn("JDBC 2.0 problems with this interbase driver, we use the JDBC 1.0 mode");
FORCEJDBC1_0 = true;
result = con.createStatement();
}
else
{
throw eSql;
}
}
try
{
platform.afterStatementCreate(result);
}
catch (PlatformException e)
{
log.error("Platform dependend failure", e);
}
return result;
} | [
"Creates a statement with parameters that should work with most RDBMS."
] | [
"MOVED INSIDE ExpressionUtils\n\nprotected JRDesignExpression getExpressionForConditionalStyle(ConditionalStyle condition, String columExpression) {\nString fieldsMap = \"((\"+DJDefaultScriptlet.class.getName() + \")$P{REPORT_SCRIPTLET}).getCurrentFields()\";\nString parametersMap = \"((\"+DJDefaultScriptlet.class.getName() + \")$P{REPORT_SCRIPTLET}).getCurrentParams()\";\nString variablesMap = \"((\"+DJDefaultScriptlet.class.getName() + \")$P{REPORT_SCRIPTLET}).getCurrentVariables()\";\n\nString evalMethodParams = fieldsMap +\", \" + variablesMap + \", \" + parametersMap + \", \" + columExpression;\n\nString text = \"((\"+ConditionStyleExpression.class.getName()+\")$P{\" + JRParameter.REPORT_PARAMETERS_MAP + \"}.get(\\\"\"+condition.getName()+\"\\\")).\"+CustomExpression.EVAL_METHOD_NAME+\"(\"+evalMethodParams+\")\";\nJRDesignExpression expression = new JRDesignExpression();\nexpression.setValueClass(Boolean.class);\nexpression.setText(text);\nreturn expression;\n}",
"Reads a data block and adds it to the list of blocks.\n\n@param text RTF data\n@param offset current offset\n@param length next block length\n@param blocks list of blocks\n@return next offset",
"Shut down actor system force.",
"Process a relationship between two tasks.\n\n@param row relationship data",
"Scales a process type\n\n@param appName See {@link #listApps} for a list of apps that can be used.\n@param processType type of process to maintain\n@param quantity number of processes to maintain",
"Check if this applies to the provided authorization scope and return the credentials for that scope or\nnull if it doesn't apply to the scope.\n\n@param authscope the scope to test against.",
"Set a friendly name for a client\n\n@param profileId profileId of the client\n@param clientUUID UUID of the client\n@param friendlyName friendly name of the client\n@return return Client object or null\n@throws Exception exception",
"Get the domain controller data from the given byte buffer.\n\n@param buffer the byte buffer\n@return the domain controller data\n@throws Exception",
"Handle a whole day change event.\n@param event the change event."
] |
public void setAccordion(boolean accordion) {
getElement().setAttribute("data-collapsible", accordion ? CssName.ACCORDION : CssName.EXPANDABLE);
reload();
} | [
"Configure if you want this collapsible container to\naccordion its child elements or use expandable."
] | [
"Set an enterprise cost value.\n\n@param index cost index (1-30)\n@param value cost value",
"Builds a batch-fetch capable loader based on the given persister, lock-options, etc.\n\n@param persister The entity persister\n@param batchSize The maximum number of ids to batch-fetch at once\n@param lockOptions The lock options\n@param factory The SessionFactory\n@param influencers Any influencers that should affect the built query\n@param innerEntityLoaderBuilder Builder of the entity loader receiving the subset of batches\n\n@return The loader.",
"xml -> object\n\n@param message\n@param childClass\n@return",
"Mbeans for UPDATE_ENTRIES",
"Extracts the column of A and copies it into u while computing the magnitude of the\nlargest element and returning it.\n\n<pre>\nu[ (offsetU+row0+i)*2 ] = A.getReal(row0+i,col)\nu[ (offsetU+row0+i)*2 + 1] = A.getImag(row0+i,col)\n</pre>\n\n@param A Complex matrix\n@param row0 First row in A to be copied\n@param row1 Last row in A + 1 to be copied\n@param col Column in A\n@param u Output array storage\n@param offsetU first index in U\n@return magnitude of largest element",
"generate a message for loglevel FATAL\n\n@param pObject the message Object",
"Returns a product regarding its name\n\n@param name String\n@return DbProduct",
"Computes annualized seasonal adjustments from given monthly realized CPI values.\n\n@param realizedCPIValues An array of consecutive monthly CPI values (minimum size is 12*numberOfYearsToAverage))\n@param lastMonth The index of the last month in the sequence of realizedCPIValues (corresponding to the enums in <code>{@link java.time.Month}</code>).\n@param numberOfYearsToAverage The number of years to go back in the array of realizedCPIValues.\n@return Array of annualized seasonal adjustments, where [0] corresponds to the adjustment for from December to January.",
"Convolve with a 2D kernel.\n@param kernel the kernel\n@param inPixels the input pixels\n@param outPixels the output pixels\n@param width the width\n@param height the height\n@param alpha include alpha channel\n@param edgeAction what to do at the edges"
] |
public static rnatparam get(nitro_service service) throws Exception{
rnatparam obj = new rnatparam();
rnatparam[] response = (rnatparam[])obj.get_resources(service);
return response[0];
} | [
"Use this API to fetch all the rnatparam resources that are configured on netscaler."
] | [
"Computes the decomposition of the provided matrix. If no errors are detected then true is returned,\nfalse otherwise.\n@param A The matrix that is being decomposed. Not modified.\n@return If it detects any errors or not.",
"Returns the absolute directory on the Web site where dumpfiles of the\ngiven type can be found.\n\n@param dumpContentType\nthe type of dump\n@return relative web directory for the current dumpfiles\n@throws IllegalArgumentException\nif the given dump file type is not known",
"Assigns a retention policy to all items with a given metadata template, optionally matching on fields.\n@param api the API connection to be used by the created assignment.\n@param policyID id of the assigned retention policy.\n@param templateID the ID of the metadata template to assign the policy to.\n@param filter optional fields to match against in the metadata template.\n@return info about the created assignment.",
"Use this API to Import responderhtmlpage.",
"Parse a list of objects from a JsonParser.\n\n@param jsonParser The JsonParser, preconfigured to be at the START_ARRAY token.",
"Removes the specified list of users from following the project, this will not affect project membership status.\nReturns the updated project record.\n\n@param project The project to remove followers from.\n@return Request object",
"Adding environment and system variables to build info.\n\n@param builder",
"Appends the given string encoding special HTML characters.\n\n@param out\nThe StringBuilder to write to.\n@param in\nInput String.\n@param start\nInput String starting position.\n@param end\nInput String end position.",
"Add join info to the query. This can be called multiple times to join with more than one table."
] |
protected void populateTasksByStealer(List<StealerBasedRebalanceTask> sbTaskList) {
// Setup mapping of stealers to work for this run.
for(StealerBasedRebalanceTask task: sbTaskList) {
if(task.getStealInfos().size() != 1) {
throw new VoldemortException("StealerBasedRebalanceTasks should have a list of RebalancePartitionsInfo of length 1.");
}
RebalanceTaskInfo stealInfo = task.getStealInfos().get(0);
int stealerId = stealInfo.getStealerId();
if(!this.tasksByStealer.containsKey(stealerId)) {
this.tasksByStealer.put(stealerId, new ArrayList<StealerBasedRebalanceTask>());
}
this.tasksByStealer.get(stealerId).add(task);
}
if(tasksByStealer.isEmpty()) {
return;
}
// Shuffle order of each stealer's work list. This randomization
// helps to get rid of any "patterns" in how rebalancing tasks were
// added to the task list passed in.
for(List<StealerBasedRebalanceTask> taskList: tasksByStealer.values()) {
Collections.shuffle(taskList);
}
} | [
"Go over the task list and create a map of stealerId -> Tasks\n\n@param sbTaskList List of all stealer-based rebalancing tasks to be\nscheduled."
] | [
"Deletes a path from the filesystem\n\nIf the path is a directory its contents\nwill be recursively deleted before it itself\nis deleted.\n\nNote that removal of a directory is not an atomic-operation\nand so if an error occurs during removal, some of the directories\ndescendants may have already been removed\n\n@throws IOException if an error occurs whilst removing a file or directory",
"Returns server group by ID\n\n@param id ID of server group\n@return ServerGroup\n@throws Exception exception",
"Attempts to clear the global log context used for embedded servers.",
"Given a field node, checks if we are calling a private field from an inner class.",
"Returns an empty Search object in Json\n@return String\n@throws IOException",
"Performs a put operation with the specified composite request object\n\n@param requestWrapper A composite request object containing the key and\nvalue\n@return Version of the value for the successful put",
"Inserts a CharSequence array value into the mapping of the underlying Bundle, replacing any\nexisting value for the given key. Either key or value may be null.\n\n@param key a String, or null\n@param value a CharSequence array object, or null\n@return this bundler instance to chain method calls",
"Overridden to ensure that our timestamp handling is as expected",
"The entity instance is already in the session cache\n\nCopied from Loader#instanceAlreadyLoaded"
] |
@Override
protected void addLineContent(BufferedReader bufferedFileReader, List<String> content, String line) throws IOException {
// Is the line an empty comment "#" ?
if (line.startsWith(COMMENT_PREFIX) && line.length() == 1) {
String nextLine = bufferedFileReader.readLine();
if (nextLine != null) {
// Is the next line the realm name "#$REALM_NAME=" ?
if (nextLine.startsWith(COMMENT_PREFIX) && nextLine.contains(REALM_COMMENT_PREFIX)) {
// Realm name block detected!
// The next line must be and empty comment "#"
bufferedFileReader.readLine();
// Avoid adding the realm block
} else {
// It's a user comment...
content.add(line);
content.add(nextLine);
}
} else {
super.addLineContent(bufferedFileReader, content, line);
}
} else {
super.addLineContent(bufferedFileReader, content, line);
}
} | [
"Remove the realm name block.\n\n@see PropertiesFileLoader#addLineContent(java.io.BufferedReader, java.util.List, String)"
] | [
"Calculates the radius to a given boundedness value\n@param D Diffusion coefficient\n@param N Number of steps\n@param timelag Timelag\n@param B Boundedeness\n@return Confinement radius",
"Log a string.\n\n@param label label text\n@param data string data",
"read the file as a list of text lines",
"Creates a curator built using Fluo's zookeeper connection string. Root path will start at Fluo\nchroot.",
"Helper method to set a value in the internal header list.\n\n@param headers the headers to set the value in\n@param name the name to set\n@param value the value to set",
"Retrieves a specific range of child items in this folder.\n\n@param offset the index of the first child item to retrieve.\n@param limit the maximum number of children to retrieve after the offset.\n@param fields the fields to retrieve.\n@return a partial collection containing the specified range of child items.",
"Retrieves the class object for the class with the given name.\n\n@param name The class name\n@return The class object\n@throws ClassNotFoundException If the class is not on the classpath (the exception message contains the class name)",
"Searches for a sequence of integers\n\nexample:\n1 2 3 4 6 7 -3",
"Formats a double value.\n\n@param number numeric value\n@return Double instance"
] |
public static void registerTinyTypes(Class<?> head, Class<?>... tail) {
final Set<HeaderDelegateProvider> systemRegisteredHeaderProviders = stealAcquireRefToHeaderDelegateProviders();
register(head, systemRegisteredHeaderProviders);
for (Class<?> tt : tail) {
register(tt, systemRegisteredHeaderProviders);
}
} | [
"Registers Jersey HeaderDelegateProviders for the specified TinyTypes.\n\n@param head a TinyType\n@param tail other TinyTypes\n@throws IllegalArgumentException when a non-TinyType is given"
] | [
"Adds a set of tests based on pattern matching.",
"Use this API to fetch wisite_binding resource of given name .",
"Sets the current collection definition derived from the current member, and optionally some attributes.\n\n@param template The template\n@param attributes The attributes of the tag\n@exception XDocletException If an error occurs\[email protected] type=\"block\"\[email protected] name=\"attributes\" optional=\"true\" description=\"Attributes of the collection as name-value pairs 'name=value',\nseparated by commas\"\[email protected] name=\"auto-delete\" optional=\"true\" description=\"Whether to automatically delete the\ncollection on object deletion\"\[email protected] name=\"auto-retrieve\" optional=\"true\" description=\"Whether to automatically retrieve\nthe collection\"\[email protected] name=\"auto-update\" optional=\"true\" description=\"Whether to automatically update the\ncollection\"\[email protected] name=\"collection-class\" optional=\"true\" description=\"The type of the collection if not a\njava.util type or an array\"\[email protected] name=\"database-foreignkey\" optional=\"true\" description=\"Whether a database foreignkey shall be created\"\nvalues=\"true,false\"\[email protected] name=\"documentation\" optional=\"true\" description=\"Documentation on the collection\"\[email protected] name=\"element-class-ref\" optional=\"true\" description=\"The fully qualified name of\nthe element type\"\[email protected] name=\"foreignkey\" optional=\"true\" description=\"The name of the\nforeign keys (columns when an indirection table is given)\"\[email protected] name=\"foreignkey-documentation\" optional=\"true\" description=\"Documentation\non the foreign keys as a comma-separated list if using an indirection table\"\[email protected] name=\"indirection-table\" optional=\"true\" description=\"The name of the indirection\ntable for m:n associations\"\[email protected] name=\"indirection-table-documentation\" optional=\"true\" description=\"Documentation\non the indirection table\"\[email protected] name=\"indirection-table-primarykeys\" optional=\"true\" description=\"Whether the\nfields referencing the collection and element classes, should also be primarykeys\"\[email protected] name=\"otm-dependent\" optional=\"true\" description=\"Whether the collection is dependent on otm\"\[email protected] name=\"proxy\" optional=\"true\" description=\"Whether to use a proxy for the collection\"\[email protected] name=\"proxy-prefetching-limit\" optional=\"true\" description=\"Specifies the amount of objects to prefetch\"\[email protected] name=\"query-customizer\" optional=\"true\" description=\"The query customizer for this collection\"\[email protected] name=\"query-customizer-attributes\" optional=\"true\" description=\"Attributes for the query customizer\"\[email protected] name=\"refresh\" optional=\"true\" description=\"Whether to automatically refresh the\ncollection\"\[email protected] name=\"remote-foreignkey\" optional=\"true\" description=\"The name of the\nforeign key columns pointing to the elements if using an indirection table\"\[email protected] name=\"remote-foreignkey-documentation\" optional=\"true\" description=\"Documentation\non the remote foreign keys as a comma-separated list if using an indirection table\"",
"Await service container stability ignoring thread interruption.\n\n@param timeout maximum period to wait for service container stability\n@param timeUnit unit in which {@code timeout} is expressed\n\n@throws java.util.concurrent.TimeoutException if service container stability is not reached before the specified timeout",
"Returns an iterator equivalent to this iterator with all duplicated items removed\nby using the default comparator. The original iterator will become\nexhausted of elements after determining the unique values. A new iterator\nfor the unique values will be returned.\n\n@param self an Iterator\n@return the modified Iterator\n@since 1.5.5",
"Returns the getter method for field on an object.\n\n@param object\nthe object\n@param fieldName\nthe field name\n@return the getter associated with the field on the object\n@throws NullPointerException\nif object or fieldName is null\n@throws SuperCsvReflectionException\nif the getter doesn't exist or is not visible",
"Converts the search results from CmsSearchResource to CmsSearchResourceBean.\n@param searchResults The collection of search results to transform.",
"Analyzes a failure thrown connecting to the master for causes that indicate\nsome problem not likely to be resolved by immediately retrying. If found,\nthrows an exception highlighting the underlying cause. If the cause is not\none of the ones understood by this method, the method returns normally.\n\n@throws org.jboss.as.domain.controller.SlaveRegistrationException if the remote HC rejected the request\n@throws IllegalStateException for other failures understood by this method",
"Gets the automaton by id.\n\n@param id the id\n@return the automaton by id\n@throws IOException Signals that an I/O exception has occurred."
] |
public int compareTo(InternalFeature o) {
if (null == o) {
return -1; // avoid NPE, put null objects at the end
}
if (null != styleDefinition && null != o.getStyleInfo()) {
if (styleDefinition.getIndex() > o.getStyleInfo().getIndex()) {
return 1;
}
if (styleDefinition.getIndex() < o.getStyleInfo().getIndex()) {
return -1;
}
}
return 0;
} | [
"This function compares style ID's between features. Features are usually sorted by style."
] | [
"Set keyboard done listener to detect when the user click \"DONE\" on his keyboard\n\n@param listener IntlPhoneInputListener",
"Adds api doc roots from a link. The folder reffered by the link should contain a package-list\nfile that will be parsed in order to add api doc roots to this configuration\n@param packageListUrl",
"Iterates over the elements of an iterable collection of items, starting\nfrom a specified startIndex, and returns the index of the last item that\nmatches the 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 an integer that is the index of the last matched object or -1 if no match was found\n@since 1.5.2",
"Creates a new SimpleMatrix with the specified DMatrixRMaj used as its internal matrix. This means\nthat the reference is saved and calls made to the returned SimpleMatrix will modify the passed in DMatrixRMaj.\n\n@param internalMat The internal DMatrixRMaj of the returned SimpleMatrix. Will be modified.",
"Determine if a CharSequence can be parsed as a Long.\n\n@param self a CharSequence\n@return true if the CharSequence can be parsed\n@see #isLong(String)\n@since 1.8.2",
"Calls the provided closure for a \"page\" of rows from the table represented by this DataSet.\nA page is defined as starting at a 1-based offset, and containing a maximum number of rows.\n\n@param offset the 1-based offset for the first row to be processed\n@param maxRows the maximum number of rows to be processed\n@param closure called for each row with a GroovyResultSet\n@throws SQLException if a database access error occurs\n@see groovy.sql.Sql#eachRow(String, java.util.List, int, int, groovy.lang.Closure)",
"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).",
"Use this API to fetch aaapreauthenticationpolicy_binding resource of given name .",
"Invokes a closure passing it a new Sql instance created from the given JDBC connection URL.\nThe created connection will be closed if required.\n\n@param url a database url of the form\n<code>jdbc:<em>subprotocol</em>:<em>subname</em></code>\n@param c the Closure to call\n@see #newInstance(String)\n@throws SQLException if a database access error occurs"
] |
private static boolean matches(Type from, Type to, Map<String, Type> typeMap) {
if (to.equals(from))
return true;
if (from instanceof TypeVariable) {
return to.equals(typeMap.get(((TypeVariable<?>) from).getName()));
}
return false;
} | [
"Checks if two types are the same or are equivalent under a variable\nmapping given in the type map that was provided."
] | [
"Gets the current Stack. If the stack is not set, a new empty instance is created and set.\n@return",
"Stores a new certificate and its associated private key in the keystore.\n@param hostname\n@param cert\n@param privKey @throws KeyStoreException\n@throws CertificateException\n@throws NoSuchAlgorithmException",
"Invokes a function defined in the script.\n\n@param funcName\nThe function name.\n@param params\nThe parameter array.\n@return\nA boolean value representing whether the function is\nexecuted correctly. If the function cannot be found, or\nparameters don't match, {@code false} is returned.",
"Adds search fields from elements on a container page to a container page's document.\n@param document The document for the container page\n@param cms The current CmsObject\n@param resource The resource of the container page\n@param systemFields The list of field names for fields where mappings to should be discarded, since these fields are used system internally.\n@return the manipulated document",
"Authenticates the API connection by obtaining access and refresh tokens using the auth code that was obtained\nfrom the first half of OAuth.\n@param authCode the auth code obtained from the first half of the OAuth process.",
"Extract child task data.\n\n@param task MPXJ task\n@param row Synchro task data",
"Return the list of all the module submodules\n\n@param module\n@return List<DbModule>",
"makes object obj persistent to the Objectcache under the key oid.",
"SearchService is a service which shares the information about Persons with the PersonService.\nIt lets users search for individual people using simple or complex search expressions.\nThe interaction with this service also verifies that the JAX-RS server is capable of supporting multiple\nroot resource classes"
] |
private void setHex() {
String hRed = Integer.toHexString(getRed());
String hGreen = Integer.toHexString(getGreen());
String hBlue = Integer.toHexString(getBlue());
if (hRed.length() == 0) {
hRed = "00";
}
if (hRed.length() == 1) {
hRed = "0" + hRed;
}
if (hGreen.length() == 0) {
hGreen = "00";
}
if (hGreen.length() == 1) {
hGreen = "0" + hGreen;
}
if (hBlue.length() == 0) {
hBlue = "00";
}
if (hBlue.length() == 1) {
hBlue = "0" + hBlue;
}
m_hex = hRed + hGreen + hBlue;
} | [
"Converts from RGB to Hexadecimal notation."
] | [
"Retrieves the earliest start date for all assigned tasks.\n\n@return start date",
"Removes the specified objects.\n\n@param collection The collection to remove.",
"Returns the name of the class to be instantiated.\n@param rs the Resultset\n@return null if the column is not available",
"Called when the end type is changed.",
"Gets a SerialMessage with the MULTI CHANNEL CAPABILITY GET command.\nGets the capabilities for a specific endpoint.\n@param the number of the endpoint to get the\n@return the serial message.",
"Get a reader implementation class to perform API calls with.\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 <T> The reader type to request an instance of\n@return A reader implementation class",
"Removes metadata related to rebalancing.\n\n@param adminClient An instance of AdminClient points to given cluster\n@param nodeIds Node ids to clear metadata after rebalancing",
"Use this API to fetch all the ipv6 resources that are configured on netscaler.",
"Reads input data from a JSON file in the output directory."
] |
public void setDoubleAttribute(String name, Double value) {
ensureAttributes();
Attribute attribute = new DoubleAttribute(value);
attribute.setEditable(isEditable(name));
getAllAttributes().put(name, attribute);
} | [
"Sets the specified double attribute to the specified value.\n\n@param name name of the attribute\n@param value value of the attribute\n@since 1.9.0"
] | [
"Create the image elements for the banners tha goes into the\ntitle and header bands depending on the case",
"dispatch to gravity state",
"Create a ModelNode representing the JVM the instance is running on.\n\n@return a ModelNode representing the JVM the instance is running on.\n@throws OperationFailedException",
"Returns an array of the names of all atributes of this descriptor.\n\n@return The list of attribute names (will not be <code>null</code>)",
"Resize the key data area.\nThis function will truncate the keys if the\ninitial setting was too large.\n\n@oaran numKeys the desired number of keys",
"Calls the provided closure for a \"page\" of rows from the table represented by this DataSet.\nA page is defined as starting at a 1-based offset, and containing a maximum number of rows.\n\n@param offset the 1-based offset for the first row to be processed\n@param maxRows the maximum number of rows to be processed\n@param closure called for each row with a GroovyResultSet\n@throws SQLException if a database access error occurs\n@see groovy.sql.Sql#eachRow(String, java.util.List, int, int, groovy.lang.Closure)",
"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",
"Execute push docker image on agent\n\n@param launcher\n@param log\n@param imageTag\n@param username\n@param password\n@param host @return\n@throws IOException\n@throws InterruptedException",
"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."
] |
@JsonAnySetter
public void setUnknownField(final String name, final Object value) {
this.unknownFields.put(name, value);
} | [
"Set an unknown field.\n@param name the unknown property name\n@param value the unknown property value"
] | [
"Reset the combination generator.",
"Refresh children using read-resource operation.",
"Use this API to update ipv6.",
"Given a resource field name, this method returns the resource field number.\n\n@param field resource field name\n@return resource field number",
"If any of the given list of properties are not found, returns the\nname of that property. Otherwise, returns null.",
"Creates a new deployment for the URL. The target server will require access to the URL.\n\n@param url the URL representing the content\n\n@return the deployment",
"Return a list of Flickr supported blogging services.\n\nThis method does not require authentication.\n\n@return List of Services\n@throws FlickrException",
"The click handler for the add button.",
"Add a '>' clause so the column must be greater-than the value."
] |
public static <T extends WindupVertexFrame> T addTypeToModel(GraphContext graphContext, WindupVertexFrame frame, Class<T> type)
{
Vertex vertex = frame.getElement();
graphContext.getGraphTypeManager().addTypeToElement(type, vertex);
return graphContext.getFramed().frameElement(vertex, type);
} | [
"Adds the specified type to this frame, and returns a new object that implements this type."
] | [
"Returns an iterator that will only offer leaf trace regions. If the nested regions have gaps, these will be\nfilled with parent data. If this region is a leaf, a singleton iterator will be returned.\n\n@return an unmodifiable iterator for all leafs. Never <code>null</code>.",
"Convert a url to a file object. No checks are made to see if file exists but there are some hacks that\nare needed to convert uris to files across platforms.\n\n@param fileURI the uri to convert",
"Removes the specified type from the frame.",
"Use this API to delete locationfile.",
"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",
"append normal text\n\n@param text normal text\n@return SimplifySpanBuild",
"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",
"Stores template parameters for OpenShiftAssistantTemplate.\n\n@param name template parameter name\n@param value template parameter value",
"Returns the value of the sum of discounted cash flows of the bond where\nthe discounting is done with the given yield curve.\nThis method can be used for optimizer.\n\n@param evaluationTime The evaluation time as double. Cash flows prior and including this time are not considered.\n@param rate The yield which is used for discounted the coupon payments.\n@param model The model under which the product is valued.\n@return The value of the bond for the given yield."
] |
public SqlStatement getPreparedDeleteStatement(Query query, ClassDescriptor cld)
{
return new SqlDeleteByQuery(m_platform, cld, query, logger);
} | [
"generate a prepared DELETE-Statement according to query\n@param query the Query\n@param cld the ClassDescriptor"
] | [
"Throws an IllegalArgumentException when the given value is null.\n@param value the value to assert if not null\n@param name the name of the argument\n@param <T> The generic type of the value to assert if not null\n@return the value",
"Use this API to fetch all the nd6ravariables resources that are configured on netscaler.",
"Process field aliases.",
"Given OGC PropertyIsLike Filter information, construct an SQL-compatible 'like' pattern.\n\nSQL % --> match any number of characters _ --> match a single character\n\nNOTE; the SQL command is 'string LIKE pattern [ESCAPE escape-character]' We could re-define the escape character,\nbut I'm not doing to do that in this code since some databases will not handle this case.\n\nMethod: 1.\n\nExamples: ( escape ='!', multi='*', single='.' ) broadway* -> 'broadway%' broad_ay -> 'broad_ay' broadway ->\n'broadway'\n\nbroadway!* -> 'broadway*' (* has no significance and is escaped) can't -> 'can''t' ( ' escaped for SQL\ncompliance)\n\n\nNOTE: we also handle \"'\" characters as special because they are end-of-string characters. SQL will convert ' to\n'' (double single quote).\n\nNOTE: we don't handle \"'\" as a 'special' character because it would be too confusing to have a special char as\nanother special char. Using this will throw an error (IllegalArgumentException).\n\n@param escape escape character\n@param multi ?????\n@param single ?????\n@param pattern pattern to match\n@return SQL like sub-expression\n@throws IllegalArgumentException oops",
"Gets the listener classes to which dispatching should be prevented while\nthis event is being dispatched.\n\n@return The listener classes marked to prevent.\n@see #preventCascade(Class)",
"Multiple of gradient windwos per masc relation of x y\n\n@return int[]",
"The smallest granularity of rebalancing where-in we move partitions for a\nsub-set of stores. Finally at the end of the movement, the node is\nremoved out of rebalance state\n\n<br>\n\nAlso any errors + rollback procedures are performed at this level itself.\n\n<pre>\n| Case | hasRO | hasRW | finishedRO | Action |\n| 0 | t | t | t | rollback cluster change + swap |\n| 1 | t | t | f | nothing to do since \"rebalance state change\" should have removed everything |\n| 2 | t | f | t | won't be triggered since hasRW is false |\n| 3 | t | f | f | nothing to do since \"rebalance state change\" should have removed everything |\n| 4 | f | t | t | rollback cluster change |\n| 5 | f | t | f | won't be triggered |\n| 6 | f | f | t | won't be triggered |\n| 7 | f | f | f | won't be triggered |\n</pre>\n\n@param batchId Rebalance batch id\n@param batchRollbackCluster Cluster to rollback to if we have a problem\n@param rebalanceTaskPlanList The list of rebalance partition plans\n@param hasReadOnlyStores Are we rebalancing any read-only stores?\n@param hasReadWriteStores Are we rebalancing any read-write stores?\n@param finishedReadOnlyStores Have we finished rebalancing of read-only\nstores?",
"Builds sql clause to load data into a database.\n\n@param config Load configuration.\n@param prefix Prefix for temporary resources.\n@return the load DDL",
"Restores a BoxAPIConnection from a saved state.\n\n@see #save\n@param clientID the client ID to use with the connection.\n@param clientSecret the client secret to use with the connection.\n@param state the saved state that was created with {@link #save}.\n@return a restored API connection."
] |
public static String objectToColumnString(Object object, String delimiter, String[] fieldNames)
throws IllegalAccessException, NoSuchFieldException, NoSuchMethodException, InvocationTargetException
{
StringBuilder sb = new StringBuilder();
for (int i = 0; i < fieldNames.length; i++) {
if (sb.length() > 0) {
sb.append(delimiter);
}
try {
Field field = object.getClass().getDeclaredField(fieldNames[i]);
sb.append(field.get(object)) ;
} catch (IllegalAccessException ex) {
Method method = object.getClass().getDeclaredMethod("get" + StringUtils.capitalize(fieldNames[i]));
sb.append(method.invoke(object));
}
}
return sb.toString();
} | [
"Converts an object into a tab delimited string with given fields\nRequires the object has public access for the specified fields\n\n@param object Object to convert\n@param delimiter delimiter\n@param fieldNames fieldnames\n@return String representing object"
] | [
"Creates a sorted list that contains the items of the given iterable. The resulting list is sorted according to\nthe order induced by applying a key function to each element which yields a comparable criteria.\n\n@param iterable\nthe elements to be sorted. May not be <code>null</code>.\n@param key\nthe key function to-be-used. May not be <code>null</code>.\n@return a sorted list as a shallow copy of the given iterable.\n@see #sort(Iterable)\n@see #sort(Iterable, Comparator)\n@see ListExtensions#sortInplaceBy(List, org.eclipse.xtext.xbase.lib.Functions.Function1)",
"Queries the running container and attempts to lookup the information from the running container.\n\n@param client the client used to execute the management operation\n\n@return the container description\n\n@throws IOException if an error occurs while executing the management operation\n@throws OperationExecutionException if the operation used to query the container fails",
"Read flow id from message.\n\n@param message the message\n@return the FlowId as string",
"Validates the deployment.\n\n@param isDomain {@code true} if this is a domain server, otherwise {@code false}\n\n@throws MojoDeploymentException if the deployment is invalid",
"Clear any current allowed job types and use the given set.\n@param jobTypes the job types to allow",
"Add the steal information to the rebalancer state\n\n@param stealInfo The steal information to add",
"Start and configure GreenMail using given properties.\n\n@param properties the properties such as System.getProperties()",
"Use this API to fetch dnspolicy_dnspolicylabel_binding resources of given name .",
"Initialization necessary for editing a property bundle.\n\n@throws CmsLoaderException thrown if loading a bundle file fails.\n@throws CmsException thrown if loading a bundle file fails.\n@throws IOException thrown if loading a bundle file fails."
] |
private void clearBeatGrids(DeviceAnnouncement announcement) {
final int player = announcement.getNumber();
// Iterate over a copy to avoid concurrent modification issues
for (DeckReference deck : new HashSet<DeckReference>(hotCache.keySet())) {
if (deck.player == player) {
hotCache.remove(deck);
if (deck.hotCue == 0) {
deliverBeatGridUpdate(player, null); // Inform listeners the beat grid is gone.
}
}
}
} | [
"We have received notification that a device is no longer on the network, so clear out all its beat grids.\n\n@param announcement the packet which reported the device’s disappearance"
] | [
"Checks the preconditions for creating a new StrRegExReplace processor.\n\n@param regex\nthe supplied regular expression\n@param replacement\nthe supplied replacement text\n@throws IllegalArgumentException\nif regex is empty\n@throws NullPointerException\nif regex or replacement is null",
"Use this API to Force clustersync.",
"Sets the text alignment for all cells in the table.\n@param textAlignment new text alignment\n@throws NullPointerException if the argument was null\n@return this to allow chaining\n@throws {@link NullPointerException} if the argument was null",
"Add the set with given bundles to the \"Require-Bundle\" main attribute.\n\n@param requiredBundles The set with all bundles to add.",
"Use this API to fetch tmtrafficaction resource of given name .",
"Use this API to Import application.",
"Use this API to fetch cacheselector resource of given name .",
"Sets the model that the handling works on.\n\n@param databaseModel The database model\n@param objModel The object model",
"Returns the name of the current member which is the name in the case of a field, or the property name for an\naccessor method.\n\n@return The member name\n@exception XDocletException if an error occurs"
] |
public static Object executeXPath(Node document, String xpathExpression, Map<String, String> namespaceMapping, QName result)
throws XPathException, MarshallingException
{
NamespaceMapContext mapContext = new NamespaceMapContext(namespaceMapping);
try
{
XPathFactory xPathfactory = XPathFactory.newInstance();
XPath xpath = xPathfactory.newXPath();
xpath.setNamespaceContext(mapContext);
XPathExpression expr = xpath.compile(xpathExpression);
return executeXPath(document, expr, result);
}
catch (XPathExpressionException e)
{
throw new XPathException("Xpath(" + xpathExpression + ") cannot be compiled", e);
}
catch (Exception e)
{
throw new MarshallingException("Exception unmarshalling XML.", e);
}
} | [
"Executes the given xpath and returns the result with the type specified."
] | [
"Emit an event object with parameters.\n\nThis will invoke all {@link SimpleEventListener} bound to the event object\nclass given the listeners has the matching argument list.\n\nIf there is no parameter passed in, i.e. `args.length == 0`, then it will\nalso invoke all the {@link ActEventListener} bound to the event class.\n\nFor example, suppose we have the following Event defined:\n\n```java\npublic class UserActivityEvent extends ActEvent<User> {\npublic UserActivityEvent(User user) {super(user);}\n}\n```\n\nAnd we have the following event handler defined:\n\n```java\n{@literal @}OnEvent\npublic void logUserLogin(UserActivityEvent event, long timestamp) {...}\n\n{@literal @}OnEvent\npublic void checkDuplicateLoginAttempts(UserActivityEvent, Object... args) {...}\n\n{@literal @}OnEvent\npublic void foo(UserActivityEvent event) {...}\n```\n\nThe following code will invoke `logUserLogin` and `checkDuplicateLoginAttempts` methods:\n\n```java\nUser user = ...;\neventBus.emit(new UserActivityEvent(user), System.currentTimeMills());\n```\n\nThe `foo(UserActivityEvent)` will not invoked because:\n\n* The parameter list `(UserActivityEvent, long)` does not match the declared\nargument list `(UserActivityEvent)`. Here the `String` in the parameter\nlist is taken out because it is used to indicate the event, instead of being\npassing through to the event handler method.\n* The method `checkDuplicateLoginAttempts(UserActivityEvent, Object ...)` will\nbe invoked because it declares a varargs typed arguments, meaning it matches\nany parameters passed in.\n\n@param event\nthe target event\n@param args\nthe arguments passed in\n@see SimpleEventListener",
"Construct a Access Token from a Flickr Response.\n\n@param response",
"Gets the URL of the service with the given name that has been created during the current session.\n\n@param name to return its URL\n@return URL of the service.",
"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",
"Paint a check pattern, used for a background to indicate image transparency.\n@param c the component to draw into\n@param g the Graphics objects\n@param x the x position\n@param y the y position\n@param width the width\n@param height the height",
"Finds trajectory by ID\n@param t List of Trajectories\n@param id ID of the trajectorie\n@return Trajectory with ID=id",
"Use this API to export appfwlearningdata.",
"URLEncode a string\n@param s\n@return",
"Start the host controller services.\n\n@throws Exception"
] |
private void showSettingsMenu(final Cursor cursor) {
Log.d(TAG, "showSettingsMenu");
enableSettingsCursor(cursor);
context.runOnGlThread(new Runnable() {
@Override
public void run() {
new SettingsView(context, scene, CursorManager.this,
settingsCursor.getIoDevice().getCursorControllerId(), cursor, new
SettingsChangeListener() {
@Override
public void onBack(boolean cascading) {
disableSettingsCursor();
}
@Override
public int onDeviceChanged(IoDevice device) {
// we are changing the io device on the settings cursor
removeCursorFromScene(settingsCursor);
IoDevice clickedDevice = getAvailableIoDevice(device);
settingsCursor.setIoDevice(clickedDevice);
addCursorToScene(settingsCursor);
return device.getCursorControllerId();
}
});
}
});
} | [
"Presents the Cursor Settings to the User. Only works if scene is set."
] | [
"Mark root of this task task group depends on the given task group's root.\nThis ensure this task group's root get picked for execution only after the completion\nof all tasks in the given group.\n\n@param dependencyTaskGroup the task group that this task group depends on",
"Closes the transactor node by removing its node in Zookeeper",
"Read the top level tasks from GanttProject.\n\n@param gpProject GanttProject project",
"Get the named method from the class\n\n@param c The class to get the method from\n@param name The method name\n@param argTypes The argument types\n@return The method",
"Pads the given String to the left with the given character to ensure that\nit's at least totalChars long.",
"Is the transport secured by a policy",
"Receive an expected number of bytes from the player, logging a warning if we get a different number of them.\n\n@param is the input stream associated with the player metadata socket.\n@param size the number of bytes we expect to receive.\n@param description the type of response being processed, for use in the warning message.\n@return the bytes read.\n\n@throws IOException if there is a problem reading the response.",
"Fires the event.\n\n@param source the event source\n@param date the date\n@param isTyping true if event was caused by user pressing key that may have changed the value",
"Converts an object to an XML file.\n\n@param object The object to convert.\n@param fileName The filename where to save it to.\n@throws FileNotFoundException On error."
] |
protected static PreparedStatement memorize(final PreparedStatement target, final ConnectionHandle connectionHandle) {
return (PreparedStatement) Proxy.newProxyInstance(
PreparedStatementProxy.class.getClassLoader(),
new Class[] {PreparedStatementProxy.class},
new MemorizeTransactionProxy(target, connectionHandle));
} | [
"Wrap PreparedStatement with a proxy.\n@param target statement handle\n@param connectionHandle originating bonecp connection\n@return Proxy to a Preparedstatement."
] | [
"Get a sub-list of this list\n@param fromIndex index of the first element in the sub-list (inclusive)\n@param toIndex index of the last element in the sub-list (inclusive)\n@return the sub-list",
"Use this API to fetch clusternodegroup resource of given name .",
"Get the underlying channel. This may block until the channel is set.\n\n@return the channel\n@throws IOException for any error",
"This method extracts resource data from a GanttProject file.\n\n@param ganttProject parent node for resources",
"Creates a new fixed size ThreadPoolExecutor\n\n@param threads\nthe number of threads\n@param groupname\na label to identify the threadpool; useful for profiling.\n@param queueSize\nthe size of the queue to store Runnables when all threads are busy\n@return the new ExecutorService",
"Not used.",
"Capture stdout and route them through Redwood\n@return this",
"Stops the background stream thread.",
"Collapse repeated records, using exact string match on the record.\nThis is generally useful for making very verbose logs more readable.\n@return this"
] |
public int getIntegerBelief(String name){
Object belief = introspector.getBeliefBase(this).get(name);
int count = 0;
if (belief!=null) {
count = (Integer) belief;
}
return (Integer) count;
} | [
"Returns the integer value o the given belief"
] | [
"Get the authorization uri, where the user logs in.\n\n@param redirectUri\nUri the user is redirected to, after successful authorization.\nThis must be the same as specified at the Eve Online developer\npage.\n@param scopes\nScopes of the Eve Online SSO.\n@param state\nThis should be some secret to prevent XRSF, please read:\nhttp://www.thread-safe.com/2014/05/the-correct-use-of-state-\nparameter-in.html\n@return",
"Reads timephased assignment data.\n\n@param calendar current calendar\n@param assignment assignment data\n@param type flag indicating if this is planned or complete work\n@return list of timephased resource assignment instances",
"Returns the default hidden preference for the user.\n\n@return boolean hidden or not\n@throws FlickrException",
"The amount of time to keep an idle client thread alive\n\n@param threadIdleTime",
"Assigns the element in the Matrix to the specified value. Performs a bounds check to make sure\nthe requested element is part of the matrix.\n\n@param row The row of the element.\n@param col The column of the element.\n@param value The element's new value.",
"Add network interceptor to httpClient to track download progress for\nasync requests.",
"Load the InstalledIdentity configuration based on the module.path\n\n@param installedImage the installed image\n@param productConfig the product config\n@param moduleRoots the module roots\n@param bundleRoots the bundle roots\n@return the available layers\n@throws IOException",
"Gets a list of AssignmentRows based on the current Assignments\n@return",
"Converts a sequence of unicode code points to a sequence of Java characters.\n\n@return the number of chars written to the destination buffer"
] |
public static byte[] explodeContentAndTransformOperation(OperationContext context, ModelNode operation, ContentRepository contentRepository) throws OperationFailedException, ExplodedContentException {
final Resource deploymentResource = context.readResource(PathAddress.EMPTY_ADDRESS);
ModelNode contentItem = getContentItem(deploymentResource);
ModelNode explodedPath = DEPLOYMENT_CONTENT_PATH.resolveModelAttribute(context, operation);
byte[] oldHash = CONTENT_HASH.resolveModelAttribute(context, contentItem).asBytes();
final byte[] hash;
if (explodedPath.isDefined()) {
hash = contentRepository.explodeSubContent(oldHash, explodedPath.asString());
} else {
hash = contentRepository.explodeContent(oldHash);
}
// Clear the contents and update with the hash
final ModelNode slave = operation.clone();
ModelNode addedContent = new ModelNode().setEmptyObject();
addedContent.get(HASH).set(hash);
addedContent.get(TARGET_PATH.getName()).set("./");
slave.get(CONTENT).setEmptyList().add(addedContent);
// Add the domain op transformer
List<DomainOperationTransmuter> transformers = context.getAttachment(OperationAttachments.SLAVE_SERVER_OPERATION_TRANSMUTERS);
if (transformers == null) {
context.attach(OperationAttachments.SLAVE_SERVER_OPERATION_TRANSMUTERS, transformers = new ArrayList<>());
}
transformers.add(new CompositeOperationAwareTransmuter(slave));
return hash;
} | [
"Explode the deployment contents and attach a \"transformed\" slave operation to the operation context.\n\n@param context the operation context\n@param operation the original operation\n@param contentRepository the content repository\n@return the hash of the uploaded deployment content\n@throws IOException\n@throws OperationFailedException"
] | [
"get target hosts from line by line.\n\n@param sourcePath\nthe source path\n@param sourceType\nthe source type\n@return the list\n@throws TargetHostsLoadException\nthe target hosts load exception",
"Get the axis along the orientation\n@return",
"Create and return a SelectIterator for the class using the default mapped query for all statement.",
"Check if zone count policy is satisfied\n\n@return whether zone is satisfied",
"This method processes a single deferred relationship list.\n\n@param dr deferred relationship list data\n@throws MPXJException",
"Update the current position with specified length.\nThe input will append to the current position of the iterator.\n\n@param length update length",
"Count the number of non-zero elements in R",
"Add a plugin path\n\n@param model\n@param add\n@return\n@throws Exception",
"a helper method to enable the keyboardUtil for a specific activity\nor disable it. note this will cause some frame drops because of the\nlistener.\n\n@param activity\n@param enable"
] |
private void updateWorkTimeUnit(FastTrackColumn column)
{
if (m_workTimeUnit == null && isWorkColumn(column))
{
int value = ((DurationColumn) column).getTimeUnitValue();
if (value != 1)
{
m_workTimeUnit = FastTrackUtility.getTimeUnit(value);
}
}
} | [
"Update the default time unit for work based on data read from the file.\n\n@param column column data"
] | [
"Rename with retry.\n\n@param from\n@param to\n@return <tt>true</tt> if the file was successfully renamed.",
"calculate arc angle between point a and point b\n\n@param center\n@param a\n@param b\n@param area\n@param radius\n@return",
"set the Modification state to a new value. Used during state transitions.\n@param newModificationState org.apache.ojb.server.states.ModificationState",
"Gets string content from InputStream\n\n@param is InputStream to read\n@return InputStream content",
"Prints a few aspects of the TreebankLanguagePack, just for debugging.",
"This method recursively descends the directory structure, dumping\ndetails of any files it finds to the output file.\n\n@param pw Output PrintWriter\n@param dir DirectoryEntry to dump\n@param prefix prefix used to identify path to this object\n@param showData flag indicating if data is dumped, or just structure\n@param hex set to true if hex output is required\n@param indent indent used if displaying structure only\n@throws Exception Thrown on file read errors",
"Expand a macro.\n\nThis will look up the macro definition from {@link #macros} map.\nIf not found then return passed in `macro` itself, otherwise return\nthe macro definition found.\n\n**note** if macro definition is not found and the string\n{@link #isMacro(String) comply to macro name convention}, then a\nwarn level message will be logged.\n\n@param macro the macro name\n@return macro definition or macro itself if no definition found.",
"Run the configured crawl. This method blocks until the crawl is done.\n\n@return the CrawlSession once the crawl is done.",
"Get top deployment unit.\n\n@param unit the current deployment unit\n@return top deployment unit"
] |
protected <T, A> ActiveOperation<T, A> removeActiveOperation(Integer id) {
final ActiveOperation<T, A> removed = removeUnderLock(id);
if(removed != null) {
for(final Map.Entry<Integer, ActiveRequest<?, ?>> requestEntry : requests.entrySet()) {
final ActiveRequest<?, ?> request = requestEntry.getValue();
if(request.context == removed) {
requests.remove(requestEntry.getKey());
}
}
}
return removed;
} | [
"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"
] | [
"Add properties to 'properties' map on transaction start\n@param type - of transaction",
"Explode the deployment contents and attach a \"transformed\" slave operation to the operation context.\n\n@param context the operation context\n@param operation the original operation\n@param contentRepository the content repository\n@return the hash of the uploaded deployment content\n@throws IOException\n@throws OperationFailedException",
"Read holidays from the database and create calendar exceptions.",
"Initializes the queue that tracks the next set of nodes with no dependencies or\nwhose dependencies are resolved.",
"Does the headset the device is docked into have a dedicated home key\n@return",
"Switches DB type.\n\n@param dbName the database type\n@param webapp the webapp name",
"returns a Logger.\n\n@param loggerName the name of the Logger\n@return Logger the returned Logger",
"Validate an RIBean. This includes validating whether two beans specialize\nthe same bean\n\n@param bean the bean to validate\n@param beanManager the current manager\n@param specializedBeans the existing specialized beans",
"Extracts the rank of a matrix using a preexisting decomposition.\n\n@see #singularThreshold(SingularValueDecomposition_F64)\n\n@param svd A precomputed decomposition. Not modified.\n@param threshold Tolerance used to determine of a singular value is singular.\n@return The rank of the decomposed matrix."
] |
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."
] | [
"Inserts a single document locally and being to synchronize it based on its _id. Inserting\na document with the same _id twice will result in a duplicate key exception.\n\n@param namespace the namespace to put the document in.\n@param document the document to insert.",
"Sets the origin and direction of the pick ray.\n\n@param ox X coordinate of origin.\n@param oy Y coordinate of origin.\n@param oz Z coordinate of origin.\n@param dx X coordinate of ray direction.\n@param dy Y coordinate of ray direction.\n@param dz Z coordinate of ray direction.\n\nThe coordinate system of the ray depends on the whether the\npicker is attached to a scene object or not. When attached\nto a scene object, the ray is in the coordinate system of\nthat object where (0, 0, 0) is the center of the scene object\nand (0, 0, 1) is it's positive Z axis. If not attached to an\nobject, the ray is in the coordinate system of the scene's\nmain camera with (0, 0, 0) at the viewer and (0, 0, -1)\nwhere the viewer is looking.\n@see #doPick()\n@see #getPickRay()\n@see #getWorldPickRay(Vector3f, Vector3f)",
"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.",
"Helper function to return the minimum size of the index space to be passed to the reduction given the input and\noutput tensors",
"Concatenate all the arrays in the list into a vector.\n\n@param arrays List of arrays.\n@return Vector.",
"Extract resource group from a resource ID string.\n@param id the resource ID string\n@return the resource group name",
"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)}",
"Converts the bytes that make up an internet address into the corresponding integer value to make\nit easier to perform bit-masking operations on them.\n\n@param address an address whose integer equivalent is desired\n\n@return the integer corresponding to that address",
"A document that is paused no longer has remote updates applied to it.\nAny local updates to this document cause it to be resumed. An example of pausing a document\nis when a conflict is being resolved for that document and the handler throws an exception.\n\nThis method allows you to resume sync for a document.\n\n@param namespace namespace for the document\n@param documentId the id of the document to resume syncing\n@return true if successfully resumed, false if the document\ncould not be found or there was an error resuming"
] |
@RequestMapping(value="/soy/compileJs", method=GET)
public ResponseEntity<String> compile(@RequestParam(required = false, value="hash", defaultValue = "") final String hash,
@RequestParam(required = true, value = "file") final String[] templateFileNames,
@RequestParam(required = false, value = "locale") String locale,
@RequestParam(required = false, value = "disableProcessors", defaultValue = "false") String disableProcessors,
final HttpServletRequest request) throws IOException {
return compileJs(templateFileNames, hash, new Boolean(disableProcessors).booleanValue(), request, locale);
} | [
"An endpoint to compile an array of soy templates to JavaScript.\n\nThis endpoint is a preferred way of compiling soy templates to JavaScript but it requires a user to compose a url\non their own or using a helper class TemplateUrlComposer, which calculates checksum of a file and puts this in url\nso that whenever a file changes, after a deployment a JavaScript, url changes and a new hash is appended to url, which enforces\ngetting of new compiles JavaScript resource.\n\nInvocation of this url may throw two types of http exceptions:\n1. notFound - usually when a TemplateResolver cannot find a template with an associated name\n2. error - usually when there is a permission error and a user is not allowed to compile a template into a JavaScript\n\n@param hash - some unique number that should be used when we are caching this resource in a browser and we use http cache headers\n@param templateFileNames - an array of template names, e.g. client-words,server-time, which may or may not contain extension\ncurrently three modes are supported - soy extension, js extension and no extension, which is preferred\n@param disableProcessors - whether the controller should run registered outputProcessors after the compilation is complete.\n@param request - HttpServletRequest\n@param locale - locale\n@return response entity, which wraps a compiled soy to JavaScript files.\n@throws IOException - io error"
] | [
"Manual check because introducing a capability can't be done without a full refactoring.\nThis has to go as soon as the management interfaces are redesigned.\n@param context the OperationContext\n@param otherManagementEndpoint : the address to check that may provide an exposed jboss-remoting endpoint.\n@throws OperationFailedException in case we can't remove the management resource.",
"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",
"Use this API to delete ntpserver resources of given names.",
"Start the rendering of the scalebar.",
"Use this API to fetch appfwsignatures resource of given name .",
"Convert a Java String instance into the equivalent array of single or\ndouble bytes.\n\n@param value Java String instance representing text\n@param unicode true if double byte characters are required\n@return byte array representing the supplied text",
"Returns a String summarizing overall accuracy that will print nicely.",
"Helper method for getting the current parameter values from a list of annotated parameters.\n\n@param parameters The list of annotated parameter to look up\n@param manager The Bean manager\n@return The object array of looked up values",
"Recursively add files to a ZipOutputStream\n\n@param parent Parent file\n@param zout ZipOutputStream to append\n@param fileSource The file source\n@throws IOException I/O Error"
] |
public TopicList<Topic> getTopicsList(String groupId, int perPage, int page) throws FlickrException {
TopicList<Topic> topicList = new TopicList<Topic>();
Map<String, Object> parameters = new HashMap<String, Object>();
parameters.put("method", METHOD_TOPICS_GET_LIST);
parameters.put("group_id", groupId);
if (perPage > 0) {
parameters.put("per_page", "" + perPage);
}
if (page > 0) {
parameters.put("page", "" + page);
}
Response response = transportAPI.get(transportAPI.getPath(), parameters, apiKey, sharedSecret);
if (response.isError()) {
throw new FlickrException(response.getErrorCode(), response.getErrorMessage());
}
Element topicElements = response.getPayload();
topicList.setPage(topicElements.getAttribute("page"));
topicList.setPages(topicElements.getAttribute("pages"));
topicList.setPerPage(topicElements.getAttribute("perpage"));
topicList.setTotal(topicElements.getAttribute("total"));
topicList.setGroupId(topicElements.getAttribute("group_id"));
topicList.setIconServer(Integer.parseInt(topicElements.getAttribute("iconserver")));
topicList.setIconFarm(Integer.parseInt(topicElements.getAttribute("iconfarm")));
topicList.setName(topicElements.getAttribute("name"));
topicList.setMembers(Integer.parseInt(topicElements.getAttribute("members")));
topicList.setPrivacy(Integer.parseInt(topicElements.getAttribute("privacy")));
topicList.setLanguage(topicElements.getAttribute("lang"));
topicList.setIsPoolModerated("1".equals(topicElements.getAttribute("ispoolmoderated")));
NodeList topicNodes = topicElements.getElementsByTagName("topic");
for (int i = 0; i < topicNodes.getLength(); i++) {
Element element = (Element) topicNodes.item(i);
topicList.add(parseTopic(element));
}
return topicList;
} | [
"Get a list of topics from a group.\n\n@param groupId\nUnique identifier of a group returns a list of topics for a given group {@link Group}.\n@param perPage\nNumber of records per page.\n@param page\nResult-section.\n@return A group topic list\n@throws FlickrException\n@see <a href=\"http://www.flickr.com/services/api/flickr.groups.discuss.topics.getList.html\">API Documentation</a>"
] | [
"Update max min.\n\n@param n the n\n@param c the c",
"Update environment variables to an app.\n@param appName App name. See {@link #listApps} for a list of apps that can be used.\n@param config Key/Value pairs of environment variables.",
"Finds the first Field with given field name in the Class and in its super classes.\n\n@param type The Class type\n@param fieldName The field name to get\n@return an {@code Optional}. Use isPresent() to find out if the field name was found.",
"Starts closing the keyboard when the hits are scrolled.",
"Bounds are calculated locally, can use any filter, but slower than native.\n\n@param filter\nfilter which needs to be applied\n@return the bounds of the specified features\n@throws LayerException\noops",
"Downloads a part of this file's contents, starting at rangeStart and stopping at rangeEnd, while reporting the\nprogress to a ProgressListener.\n\n@param output the stream to where the file will be written.\n@param rangeStart the byte offset at which to start the download.\n@param rangeEnd the byte offset at which to stop the download.\n@param listener a listener for monitoring the download's progress.",
"Removes a corporate groupId from an Organisation\n\n@param organizationId String\n@param corporateGroupId String",
"Helper to format term updates as expected by the Wikibase API\n@param updates\nplanned updates for the type of term\n@return map ready to be serialized as JSON by Jackson",
"Closes off this connection pool."
] |
public static final Priority parsePriority(BigInteger priority)
{
return (priority == null ? null : Priority.getInstance(priority.intValue()));
} | [
"Parse priority.\n\n\n@param priority priority value\n@return Priority instance"
] | [
"Log original incoming request\n\n@param requestType\n@param request\n@param history",
"Returns the corresponding ModuleSpec service name for the given module.\n\n@param identifier The module identifier\n@return The service name of the ModuleSpec service",
"Returns a matrix full of ones",
"Removes a design document using DesignDocument object from the database.\n\n@param designDocument the design document object to be removed\n@return {@link DesignDocument}",
"Clear tmpData in subtree rooted in this node.",
"Prepare the baseURL to make a request.\n\n@param matrixId matrixId\n@param row row\n@param col cold\n@param layerParam layerParam",
"Parse an extended attribute currency value.\n\n@param value string representation\n@return currency value",
"Notifies that a footer item is changed.\n\n@param position the position.",
"Attempts to return the token from cache. If this is not possible because it is expired or was\nnever assigned, a new token is requested and parallel requests will block on retrieving a new\ntoken. As such no guarantee of maximum latency is provided.\n\nTo avoid blocking the token is refreshed before it's expiration, while parallel requests\ncontinue to use the old token."
] |
public String convertToReadableDate(Holiday holiday) {
DateTimeFormatter parser = ISODateTimeFormat.date();
if (holiday.isInDateForm()) {
String month = Integer.toString(holiday.getMonth()).length() < 2
? "0" + holiday.getMonth() : Integer.toString(holiday.getMonth());
String day = Integer.toString(holiday.getDayOfMonth()).length() < 2
? "0" + holiday.getDayOfMonth() : Integer.toString(holiday.getDayOfMonth());
return holiday.getYear() + "-" + month + "-" + day;
} else {
/*
* 5 denotes the final occurrence of the day in the month. Need to find actual
* number of occurrences
*/
if (holiday.getOccurrence() == 5) {
holiday.setOccurrence(numOccurrences(holiday.getYear(), holiday.getMonth(),
holiday.getDayOfWeek()));
}
DateTime date = parser.parseDateTime(holiday.getYear() + "-"
+ holiday.getMonth() + "-" + "01");
Calendar calendar = Calendar.getInstance();
calendar.setTime(date.toDate());
int count = 0;
while (count < holiday.getOccurrence()) {
if (calendar.get(Calendar.DAY_OF_WEEK) == holiday.getDayOfWeek()) {
count++;
if (count == holiday.getOccurrence()) {
break;
}
}
date = date.plusDays(1);
calendar.setTime(date.toDate());
}
return date.toString().substring(0, 10);
}
} | [
"Convert the holiday format from EquivalenceClassTransformer into a date format\n\n@param holiday the date\n@return a date String in the format yyyy-MM-dd"
] | [
"Creates a sorted list that contains the items of the given iterable. The resulting list is sorted according to\nthe order induced by the specified comparator.\n\n@param iterable\nthe items to be sorted. May not be <code>null</code>.\n@param comparator\nthe comparator to be used. May be <code>null</code> to indicate that the natural ordering of the\nelements should be used.\n@return a sorted list as a shallow copy of the given iterable.\n@see Collections#sort(List, Comparator)\n@see #sort(Iterable)\n@see #sortBy(Iterable, org.eclipse.xtext.xbase.lib.Functions.Function1)\n@see ListExtensions#sortInplace(List, Comparator)\n@since 2.7",
"this class loader interface can be used by other plugins to lookup\nresources from the bundles. A temporary class loader interface is set\nduring other configuration loading as well\n\n@return ClassLoaderInterface (BundleClassLoaderInterface)",
"Writes this JAR to an output stream, and closes the stream.",
"Use this API to fetch authenticationradiusaction resource of given name .",
"Use this API to fetch sslcertkey_sslvserver_binding resources of given name .",
"Adds the supplied marker to the map.\n\n@param marker",
"Internal utility to help JNI add hit objects to the pick list. Specifically for MeshColliders with picking\nfor UV, Barycentric, and normal coordinates enabled",
"Returns true if the specified name is NOT allowed. It isn't allowed if it matches a built in operator\nor if it contains a restricted character.",
"Obtains a Discordian local date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the Discordian local date-time, not null\n@throws DateTimeException if unable to create the date-time"
] |
private void addReverse(final File[] files) {
for (int i = files.length - 1; i >= 0; --i) {
stack.add(files[i]);
}
} | [
"Add the specified files in reverse order."
] | [
"Crop the image between two points.\n\n@param top Top bound.\n@param left Left bound.\n@param bottom Bottom bound.\n@param right Right bound.\n@throws IllegalArgumentException if {@code top} or {@code left} are less than zero or {@code\nbottom} or {@code right} are less than one or less than {@code top} or {@code left},\nrespectively.",
"Cache key calculation.\n@param sql\n@param resultSetType\n@param resultSetConcurrency\n@return cache key",
"Retrieves the members of the type and of its super types.\n\n@param memberNames Will receive the names of the members (for sorting)\n@param members Will receive the members\n@param type The type to process\n@param tagName An optional tag for filtering the types\n@param paramName The feature to be added to the MembersInclSupertypes attribute\n@param paramValue The feature to be added to the MembersInclSupertypes attribute\n@throws XDocletException If an error occurs",
"Use this API to flush nssimpleacl.",
"This main method provides an easy command line tool to compare two\nschemas.",
"Creates a map of identifiers or page titles to documents retrieved via\nthe API URL\n\n@param properties\nparameter setting for wbgetentities\n@return map of document identifiers or titles to documents retrieved via\nthe API URL\n@throws MediaWikiApiErrorException\nif the API returns an error\n@throws IOException\nif we encounter network issues or HTTP 500 errors from Wikibase",
"Use this API to fetch csvserver_cspolicy_binding resources of given name .",
"Read a task relationship.\n\n@param link ConceptDraw PROJECT task link",
"This method lists any notes attached to tasks.\n\n@param file MPX file"
] |
public boolean checkRead(TransactionImpl tx, Object obj)
{
if (hasReadLock(tx, obj))
{
return true;
}
LockEntry writer = getWriter(obj);
if (writer.isOwnedBy(tx))
{
return true;
}
return false;
} | [
"checks whether the specified Object obj is read-locked by Transaction tx.\n@param tx the transaction\n@param obj the Object to be checked\n@return true if lock exists, else false"
] | [
"Adds the word.\n\n@param w the w\n@throws ParseException the parse exception",
"This method returns the value of the product using a Black-Scholes model for the swap rate with the Hunt-Kennedy convexity adjustment.\nThe model is determined by a discount factor curve and a swap rate volatility.\n\n@param forwardCurve The forward curve from which the swap rate is calculated. The discount curve, associated with this forward curve is used for discounting this option.\n@param swaprateVolatility The volatility of the log-swaprate.\n@return Value of this product",
"Should be called after new data is inserted. Will be automatically called, when the view dimensions\nhas changed.\n\nCalculates the start- and end-angles for every PieSlice.",
"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.",
"Print time unit.\n\n@param value TimeUnit instance\n@return time unit value",
"Log a byte array as a hex dump.\n\n@param data byte array",
"Get the default provider used.\n\n@return the default provider, never {@code null}.",
"Starts data synchronization in a background thread.",
"Returns real unquoted value for a DisplayValue\n@param key\n@return"
] |
protected void setupPivotInfo() {
for( int col = 0; col < numCols; col++ ) {
pivots[col] = col;
double c[] = dataQR[col];
double norm = 0;
for( int row = 0; row < numRows; row++ ) {
double element = c[row];
norm += element*element;
}
normsCol[col] = norm;
}
} | [
"Sets the initial pivot ordering and compute the F-norm squared for each column"
] | [
"This must be called with the write lock held.\n@param requirement the requirement",
"Process a module or bundle root.\n\n@param root the root\n@param layers the processed layers\n@param setter the bundle or module path setter\n@throws IOException",
"Extracts the nullity of a matrix using a preexisting decomposition.\n\n@see #singularThreshold(SingularValueDecomposition_F64)\n\n@param svd A precomputed decomposition. Not modified.\n@param threshold Tolerance used to determine of a singular value is singular.\n@return The nullity of the decomposed matrix.",
"Determines the number bytes required to store a variable length\n\n@param i length of Bytes\n@return number of bytes needed",
"Get the title and read the Title property according the provided locale.\n@return The map from locales to the locale specific titles.",
"Concatenates of list of Bytes objects to create a byte array\n\n@param listOfBytes Bytes objects to concatenate\n@return Bytes",
"Log a byte array as a hex dump.\n\n@param data byte array",
"Shuts down a managed domain container. The servers are first stopped, then the host controller is shutdown.\n\n@param client the client used to communicate with the server\n@param timeout the graceful shutdown timeout, a value of {@code -1} will wait indefinitely and a value of\n{@code 0} will not attempt a graceful shutdown\n\n@throws IOException if an error occurs communicating with the server\n@throws OperationExecutionException if the operation used to shutdown the managed domain failed",
"called periodically to check that the heartbeat has been received\n\n@return {@code true} if we have received a heartbeat recently"
] |
public Response getBill(int month, int year)
throws RequestException, LocalOperationException {
Request request = new Request(this);
return new Response(request.get("/bill/" + year + String.format("-%02d", month)));
} | [
"Returns the bill for the month specified.\n\n@param month for which bill to retrieve.\n@param year for which bill to retrieve.\n@return {@link Response}\n\n@throws RequestException if request to transloadit server fails.\n@throws LocalOperationException if something goes wrong while running non-http operations."
] | [
"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.",
"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}.",
"Collapses all parents in a range of indices in the list of parents.\n\n@param startParentPosition The index at which to to start collapsing parents\n@param parentCount The number of parents to collapse",
"read message from file\n\n@param readOffset offset in this channel(file);not the message offset\n@param size max data size\n@return messages sharding data with file log\n@throws IOException reading file failed",
"returns a new segment masked by the given mask\n\nThis method applies the mask first to every address in the range, and it does not preserve any existing prefix.\nThe given prefix will be applied to the range of addresses after the mask.\nIf the combination of the two does not result in a contiguous range, then {@link IncompatibleAddressException} is thrown.",
"Get the PropertyDescriptor for aClass and aPropertyName",
"returns IsolationLevel literal as matching\nto the corresponding id\n@return the IsolationLevel literal",
"Utility function to validate if the given store name exists in the store\nname list managed by MetadataStore. This is used by the Admin service for\nvalidation before serving a get-metadata request.\n\n@param name Name of the store to validate\n@return True if the store name exists in the 'storeNames' list. False\notherwise.",
"The timeout which we block for when a resource is not available\n\n@param timeout The timeout\n@param unit The units of the timeout"
] |
public static void endTrack(final String title){
if(isClosed){ return; }
//--Make Task
final long timestamp = System.currentTimeMillis();
Runnable endTrack = new Runnable(){
public void run(){
assert !isThreaded || control.isHeldByCurrentThread();
//(check name match)
String expected = titleStack.pop();
if(!expected.equalsIgnoreCase(title)){
throw new IllegalArgumentException("Track names do not match: expected: " + expected + " found: " + title);
}
//(decrement depth)
depth -= 1;
//(send signal)
handlers.process(null, MessageType.END_TRACK, depth, timestamp);
assert !isThreaded || control.isHeldByCurrentThread();
}
};
//--Run Task
if(isThreaded){
//(case: multithreaded)
long threadId = Thread.currentThread().getId();
attemptThreadControl( threadId, endTrack );
} else {
//(case: no threading)
endTrack.run();
}
} | [
"End a \"track;\" that is, return to logging at one level shallower.\n@param title A title that should match the beginning of this track."
] | [
"Joins the given iterable objects using the given separator into a single string.\n\n@return the joined string or an empty string if iterable is null",
"Gets the sub-entries of the navigation entry.\n\n@return the sub-entries",
"Append the text at the end of the File, using a specified encoding.\n\n@param file a File\n@param text the text to append at the end of the File\n@param charset the charset used\n@throws IOException if an IOException occurs.\n@since 1.0",
"capture center eye",
"Inserts the specified array into the specified original array at the specified index.\n\n@param original the original array into which we want to insert another array\n@param index the index at which we want to insert the array\n@param inserted the array that we want to insert\n@return the combined array",
"Calculate the child size along the axis and measure the offset inside the\nlayout container\n@param dataIndex of child in Container\n@return true item fits the container, false - otherwise",
"Handle bind service event.\n@param service Service instance\n@param props Service reference properties",
"Specifies the base URI of this conversion server.\n\n@param baseUri The URI under which this remote conversion server is reachable.\n@return This builder instance.",
"Split string content into list\n@param content String content\n@return list"
] |
protected I_CmsSearchDocument createDefaultIndexDocument() {
try {
return m_index.getFieldConfiguration().createDocument(m_cms, m_res, m_index, null);
} catch (CmsException e) {
LOG.error(
"Default document for "
+ m_res.getRootPath()
+ " and index "
+ m_index.getName()
+ " could not be created.",
e);
return null;
}
} | [
"Creates a document for the resource without extracting the content. The aim is to get a content indexed,\neven if extraction runs into a timeout.\n\n@return the document for the resource generated if the content is discarded,\ni.e., only meta information are indexed."
] | [
"Removes a value from the list.\n\n@param list the list\n@param value value to remove",
"Check if all cluster objects in the list are congruent.\n\n@param clusterUrls of cluster objects\n@return",
"Scales the brightness of a pixel.",
"Create a JsonParser for a given json node.\n@param jsonNode the json node\n@return the json parser\n@throws IOException",
"Throws if the given file is null, is not a file or directory, or is an empty directory.",
"Read the work weeks associated with this calendar.\n\n@param xmlCalendar XML calendar object\n@param mpxjCalendar MPXJ calendar object",
"Use this API to fetch a responderglobal_responderpolicy_binding resources.",
"Adds a step to the steps.\n\n@param name {@link String} name of the step\n@param robot {@link String} name of the robot used by the step.\n@param options {@link Map} extra options required for the step.",
"Computes the p=2 norm. If A is a matrix then the induced norm is computed.\n\n@param A Matrix or vector.\n@return The norm."
] |
public BoxFolder.Info getFolderInfo(String folderID) {
URL url = FOLDER_INFO_URL_TEMPLATE.build(this.api.getBaseURL(), folderID);
BoxAPIRequest request = new BoxAPIRequest(this.api, url, "GET");
BoxJSONResponse response = (BoxJSONResponse) request.send();
JsonObject jsonObject = JsonObject.readFrom(response.getJSON());
BoxFolder folder = new BoxFolder(this.api, jsonObject.get("id").asString());
return folder.new Info(response.getJSON());
} | [
"Gets information about a trashed folder.\n@param folderID the ID of the trashed folder.\n@return info about the trashed folder."
] | [
"Load a cube map texture asynchronously.\n\nThis is the implementation of\n{@link GVRAssetLoader#loadCubemapTexture(GVRAndroidResource)} - it will\nusually be more convenient (and more efficient) to call that directly.\n\n@param gvrContext\nThe GVRF context\n@param textureCache\nTexture cache - may be {@code null}\n@param resource\nA steam containing a zip file which contains six bitmaps. The\nsix bitmaps correspond to +x, -x, +y, -y, +z, and -z faces of\nthe cube map texture respectively. The default names of the\nsix images are \"posx.png\", \"negx.png\", \"posy.png\", \"negx.png\",\n\"posz.png\", and \"negz.png\", which can be changed by calling\n{@link GVRCubemapImage#setFaceNames(String[])}.\n@param priority\nThis request's priority. Please see the notes on asynchronous\npriorities in the <a href=\"package-summary.html#async\">package\ndescription</a>.\n@return A {@link Future} that you can pass to methods like\n{@link GVRShaderData#setMainTexture(Future)}",
"Override for customizing XmlMapper and ObjectMapper",
"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 the name of this alias if path has been added\nto the aliased portions of attributePath\n\n@param path the path to test for inclusion in the alias",
"Retrieves a specific range of items in this collection.\n@param offset the index of the first item to retrieve.\n@param limit the maximum number of items to retrieve after the offset.\n@param fields the fields to retrieve.\n@return a partial collection containing the specified range of items.",
"When all the elements in a sorted set are inserted with the same score, in order to force lexicographical\nordering, this command returns all the elements in the sorted set with a value in the given range.\nIf the elements in the sorted set have different scores, the returned elements are unspecified.\n@param lexRange\n@return the range of elements",
"Creates a jrxml file\n\n@param dr\n@param layoutManager\n@param _parameters\n@param xmlEncoding (default is UTF-8 )\n@param outputStream\n@throws JRException",
"Pick arbitrary wrapping method. No generics should be set.\n@param builder",
"Unmarshal test suite from given file."
] |
public synchronized void addCertAndPrivateKey(String hostname, final X509Certificate cert, final PrivateKey privKey)
throws KeyStoreException, CertificateException, NoSuchAlgorithmException
{
// String alias = ThumbprintUtil.getThumbprint(cert);
_ks.deleteEntry(hostname);
_ks.setCertificateEntry(hostname, cert);
_ks.setKeyEntry(hostname, privKey, _keypassword, new java.security.cert.Certificate[] {cert});
if(persistImmediately)
{
persist();
}
} | [
"Stores a new certificate and its associated private key in the keystore.\n@param hostname\n@param cert\n@param privKey @throws KeyStoreException\n@throws CertificateException\n@throws NoSuchAlgorithmException"
] | [
"The test that checks if clipping is needed.\n\n@param f\nfeature to test\n@param scale\nscale\n@return true if clipping is needed",
"Obtains a local date in Discordian 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 Discordian local date, not null\n@throws DateTimeException if unable to create the date",
"This method is used to initiate a release staging process using the Artifactory Release Staging API.",
"Locks a file.\n\n@param expiresAt expiration date of the lock.\n@param isDownloadPrevented is downloading of file prevented when locked.\n@return the lock returned from the server.",
"Read the work weeks associated with this calendar.\n\n@param xmlCalendar XML calendar object\n@param mpxjCalendar MPXJ calendar object",
"This method writes data for a single task to a Planner file.\n\n@param mpxjTask MPXJ Task instance\n@param taskList list of child tasks for current parent",
"Add an appender to Logback logging framework that will track the types of log messages made.",
"Get the canonical method declared on this object.\n\n@param method the method to look up\n@return the canonical method object, or {@code null} if no matching method exists",
"Map originator type.\n\n@param originatorType the originator type\n@return the originator"
] |
private boolean matchesFingerprint(byte[] buffer, byte[] fingerprint)
{
return Arrays.equals(fingerprint, Arrays.copyOf(buffer, fingerprint.length));
} | [
"Determine if the start of the buffer matches a fingerprint byte array.\n\n@param buffer bytes from file\n@param fingerprint fingerprint bytes\n@return true if the file matches the fingerprint"
] | [
"Open a database and build a set of table names.\n\n@param url database URL\n@return set containing table names",
"Gets the txinfo cache weight\n\n@param conf The FluoConfiguration\n@return The size of the cache value from the property value {@value #TX_INFO_CACHE_WEIGHT} if\nit is set, else the value of the default value {@value #TX_INFO_CACHE_WEIGHT_DEFAULT}",
"Gets the persistence broker used by this indirection handler.\nIf no PBKey is available a runtime exception will be thrown.\n\n@return a PersistenceBroker",
"If any of the given list of properties are not found, returns the\nname of that property. Otherwise, returns null.",
"This static method calculated the rho of a call option under a Black-Scholes model\n\n@param initialStockValue The initial value of the underlying, i.e., the spot.\n@param riskFreeRate The risk free rate of the bank account numerarie.\n@param volatility The Black-Scholes volatility.\n@param optionMaturity The option maturity T.\n@param optionStrike The option strike.\n@return The rho of the option",
"Test for convergence by seeing if the element with the largest change\nis smaller than the tolerance. In some test cases it alternated between\nthe + and - values of the eigen vector. When this happens it seems to have \"converged\"\nto a non-dominant eigen vector. At least in the case I looked at. I haven't devoted\na lot of time into this issue...",
"Set the depth of the cursor.\nThis is the length of the ray from the origin\nto the cursor.\n@param depth default cursor depth",
"The way calendars are stored in an MPP14 file means that there\ncan be forward references between the base calendar unique ID for a\nderived calendar, and the base calendar itself. To get around this,\nwe initially populate the base calendar name attribute with the\nbase calendar unique ID, and now in this method we can convert those\nID values into the correct names.\n\n@param baseCalendars list of calendars and base calendar IDs\n@param map map of calendar ID values and calendar objects",
"Clear the mask for a new selection"
] |
public static Multimap<String, String> convertToMultiMap(final PObject objectParams) {
Multimap<String, String> params = HashMultimap.create();
if (objectParams != null) {
Iterator<String> customParamsIter = objectParams.keys();
while (customParamsIter.hasNext()) {
String key = customParamsIter.next();
if (objectParams.isArray(key)) {
final PArray array = objectParams.optArray(key);
for (int i = 0; i < array.size(); i++) {
params.put(key, array.getString(i));
}
} else {
params.put(key, objectParams.optString(key, ""));
}
}
}
return params;
} | [
"convert a param object to a multimap.\n\n@param objectParams the parameters to convert.\n@return the corresponding Multimap."
] | [
"Append Join for SQL92 Syntax without parentheses",
"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",
"Reads characters into a portion of an array, then replace invalid XML characters\n\n@throws IOException If an I/O error occurs\n@see ru.yandex.qatools.allure.config.AllureNamingUtils#isBadXmlCharacter(char) by space",
"Use this API to fetch all the transformpolicy resources that are configured on netscaler.",
"Gets information about all of the group memberships for this user.\nDoes not support paging.\n\n<p>Note: This method is only available to enterprise admins.</p>\n\n@return a collection of information about the group memberships for this user.",
"Used to create a new indefinite retention policy.\n@param api the API connection to be used by the created user.\n@param name the name of the retention policy.\n@return the created retention policy's info.",
"Get the geo interface.\n\n@return Access class to the flickr.photos.geo methods.",
"Sends out the SQL as defined in the config upon first init of the connection.\n@param connection\n@param initSQL\n@throws SQLException",
"Read project calendars."
] |
public void bindDelete(PreparedStatement stmt, Identity oid, ClassDescriptor cld) throws SQLException
{
Object[] pkValues = oid.getPrimaryKeyValues();
FieldDescriptor[] pkFields = cld.getPkFields();
int i = 0;
try
{
for (; i < pkValues.length; i++)
{
setObjectForStatement(stmt, i + 1, pkValues[i], pkFields[i].getJdbcType().getType());
}
}
catch (SQLException e)
{
m_log.error("bindDelete failed for: " + oid.toString() + ", while set value '" +
pkValues[i] + "' for column " + pkFields[i].getColumnName());
throw e;
}
} | [
"binds the Identities Primary key values to the statement"
] | [
"Logs all properties",
"This method extracts data for an exception day from an MSPDI file.\n\n@param calendar Calendar data\n@param day Day data",
"Convert this update description to an update document.\n\n@return an update document with the appropriate $set and $unset documents.",
"Manage the artifact add to the Module AbstractGraph\n\n@param graph\n@param depth",
"Specify additional query parameters to be passed to the filter function.\n\n@param queryParams map of key-value parameters\n@return this Replication instance to set more options or trigger the replication",
"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",
"Plots the MSD curve with the trajectory t and adds the fitted model for confined diffusion above.\n@param t Trajectory to calculate the msd curve\n@param lagMin Minimum timelag (e.g. 1,2,3..) lagMin*timelag = elapsed time in seconds\n@param lagMax Maximum timelag (e.g. 1,2,3..) lagMax*timelag = elapsed time in seconds\n@param timelag Elapsed time between two frames.\n@param a Parameter alpha\n@param b Shape parameter 1\n@param c Shape parameter 2\n@param d Diffusion coefficient",
"Plots the trajectory\n@param title Title of the plot\n@param t Trajectory to be plotted",
"Adds a symbol to the end of the token list\n@param symbol Symbol which is to be added\n@return The new Token created around symbol"
] |
public void removeLicenseFromArtifact(final String gavc, final String licenseId) {
final DbArtifact dbArtifact = getArtifact(gavc);
//
// The artifact may not have the exact string associated with it, but rather one
// matching license regexp expression.
//
repositoryHandler.removeLicenseFromArtifact(dbArtifact, licenseId, licenseMatcher);
} | [
"Remove a license from an artifact\n\n@param gavc String The artifact GAVC\n@param licenseId String The license id to be removed."
] | [
"This method can be called to ensure that the IDs of all\nentities are sequential, and start from an\nappropriate point. If entities are added to and removed from\nthis list, then the project is loaded into Microsoft\nproject, if the ID values have gaps in the sequence, there will\nbe blank rows shown.",
"Remove the group and all references to it\n\n@param groupId ID of group",
"Get file extension for script language.\n\n@param language the language name\n@return the file extension as string or null if the language is not in the set of languages supported by spin",
"After obtaining a connection, perform additional tasks.\n@param handle\n@param statsObtainTime",
"Gets a list of split keys given a desired number of splits.\n\n<p>This list will contain multiple split keys for each split. Only a single split key\nwill be chosen as the split point, however providing multiple keys allows for more uniform\nsharding.\n\n@param numSplits the number of desired splits.\n@param query the user query.\n@param partition the partition to run the query in.\n@param datastore the datastore containing the data.\n@throws DatastoreException if there was an error when executing the datastore query.",
"Check, if all values used for calculating the series for a specific pattern are valid.\n@return <code>null</code> if the pattern is valid, a suitable error message otherwise.",
"Issue the database statements to drop the table associated with a class.\n\n<p>\n<b>WARNING:</b> This is [obviously] very destructive and is unrecoverable.\n</p>\n\n@param connectionSource\nAssociated connection source.\n@param dataClass\nThe class for which a table will be dropped.\n@param ignoreErrors\nIf set to true then try each statement regardless of {@link SQLException} thrown previously.\n@return The number of statements executed to do so.",
"Calculate start dates for a monthly absolute recurrence.\n\n@param calendar current date\n@param frequency frequency\n@param dates array of start dates",
"makes object obj persistent to the Objectcache under the key oid."
] |
public boolean hasDeploymentSubsystemModel(final String subsystemName) {
final Resource root = deploymentUnit.getAttachment(DEPLOYMENT_RESOURCE);
final PathElement subsystem = PathElement.pathElement(SUBSYSTEM, subsystemName);
return root.hasChild(subsystem);
} | [
"Checks to see if a subsystem resource has already been registered for the deployment.\n\n@param subsystemName the name of the subsystem\n\n@return {@code true} if the subsystem exists on the deployment otherwise {@code false}"
] | [
"Register the agent in the platform\n\n@param agent_name\nThe name of the agent to be registered\n@param agent\nThe agent to register.\n@throws FIPAException",
"Set an enterprise duration value.\n\n@param index duration index (1-30)\n@param value duration value",
"Performs the update to the persistent configuration model. This default implementation simply removes\nthe targeted resource.\n\n@param context the operation context\n@param operation the operation\n@throws OperationFailedException if there is a problem updating the model",
"Performs a get all operation with the specified composite request object\n\n@param requestWrapper Composite request object containing a reference to\nthe Iterable keys\n\n@return Map of the keys to the corresponding versioned values",
"Set the state of an individual day in a weekly recurrence.\n\n@param day Day instance\n@param value true if this day is included in the recurrence",
"OR operation which takes the previous clause and the next clause and OR's them together.",
"Takes an HTML file, looks for the first instance of the specified insertion point, and\ninserts the diagram image reference and a client side map in that point.",
"For each node, checks if the store exists and then verifies that the remote schema\nmatches the new one. If the remote store doesn't exist, it creates it.",
"Use this API to add cachecontentgroup."
] |
public static Property getChildAddress(final ModelNode address) {
if (address.getType() != ModelType.LIST) {
throw new IllegalArgumentException("The address type must be a list.");
}
final List<Property> addressParts = address.asPropertyList();
if (addressParts.isEmpty()) {
throw new IllegalArgumentException("The address is empty.");
}
return addressParts.get(addressParts.size() - 1);
} | [
"Finds the last entry of the address list and returns it as a property.\n\n@param address the address to get the last part of\n\n@return the last part of the address\n\n@throws IllegalArgumentException if the address is not of type {@link ModelType#LIST} or is empty"
] | [
"Obtain newline-delimited headers from method\n\n@param method HttpMethod to scan\n@return newline-delimited headers",
"Use this API to fetch appfwjsoncontenttype resources of given names .",
"Find the the qualified container port of the target service\nUses java annotations first or returns the container port.\n\n@param service\nThe target service.\n@param qualifiers\nThe set of qualifiers.\n\n@return Returns the resolved containerPort of '0' as a fallback.",
"Adjust submatrices and helper data structures for the input matrix. Must be called\nbefore the decomposition can be computed.\n\n@param orig",
"Create a list of operations required to a boot a managed server.\n\n@param serverName the server name\n@param domainModel the complete domain model\n@param hostModel the local host model\n@param domainController the domain controller\n@return the list of boot operations",
"Add an empty work week.\n\n@return new work week",
"scroll only once",
"Get the authorization uri, where the user logs in.\n\n@param redirectUri\nUri the user is redirected to, after successful authorization.\nThis must be the same as specified at the Eve Online developer\npage.\n@param scopes\nScopes of the Eve Online SSO.\n@param state\nThis should be some secret to prevent XRSF, please read:\nhttp://www.thread-safe.com/2014/05/the-correct-use-of-state-\nparameter-in.html\n@return",
"Returns the base URL of the print servlet.\n\n@param httpServletRequest the request"
] |
public static List<String> parse(final String[] args, final Object... objs) throws IOException
{
final List<String> ret = Colls.list();
final List<Arg> allArgs = Colls.list();
final HashMap<String, Arg> shortArgs = new HashMap<String, Arg>();
final HashMap<String, Arg> longArgs = new HashMap<String, Arg>();
parseArgs(objs, allArgs, shortArgs, longArgs);
for (int i = 0; i < args.length; i++)
{
final String s = args[i];
final Arg a;
if (s.startsWith("--"))
{
a = longArgs.get(s.substring(2));
if (a == null)
{
throw new IOException("Unknown switch: " + s);
}
}
else if (s.startsWith("-"))
{
a = shortArgs.get(s.substring(1));
if (a == null)
{
throw new IOException("Unknown switch: " + s);
}
}
else
{
a = null;
ret.add(s);
}
if (a != null)
{
if (a.isSwitch)
{
a.setField("true");
}
else
{
if (i + 1 >= args.length)
{
System.out.println("Missing parameter for: " + s);
}
if (a.isCatchAll())
{
final List<String> ca = Colls.list();
for (++i; i < args.length; ++i)
{
ca.add(args[i]);
}
a.setCatchAll(ca);
}
else
{
++i;
a.setField(args[i]);
}
}
a.setPresent();
}
}
for (final Arg a : allArgs)
{
if (!a.isOk())
{
throw new IOException("Missing mandatory argument: " + a);
}
}
return ret;
} | [
"Parses command line arguments.\n\n@param args\nArray of arguments, like the ones provided by\n{@code void main(String[] args)}\n@param objs\nOne or more objects with annotated public fields.\n@return A {@code List} containing all unparsed arguments (i.e. arguments\nthat are no switches)\n@throws IOException\nif a parsing error occurred.\n@see CmdArgument"
] | [
"Called when a ParentViewHolder has triggered a collapse for it's parent\n\n@param flatParentPosition the position of the parent that is calling to be collapsed",
"crops the srcBmp with the canvasView bounds and returns the cropped bitmap",
"2-D Integer array to float array.\n\n@param array Integer array.\n@return Float array.",
"We have received notification that a device is no longer on the network, so clear out its metadata.\n\n@param announcement the packet which reported the device’s disappearance",
"Returns the entry associated with the given key.\n\n@param key the key of the entry to look up\n@return the entry associated with that key, or null\nif the key is not in this map",
"Get all field attributes in an unmodifiable Map, or null if no attributes have been added\n\n@return all field attributes, or <code>NULL</code> if none exist",
"We have obtained album art for a device, so store it and alert any listeners.\n\n@param update the update which caused us to retrieve this art\n@param art the album art which we retrieved",
"Finds all nWise combinations of a set of variables, each with a given domain of values\n\n@param nWise the number of variables in each combination\n@param coVariables the varisbles\n@param variableDomains the domains\n@return all nWise combinations of the set of variables",
"Converts the given CharSequence into a List of Strings of one character.\n\n@param self a CharSequence\n@return a List of characters (a 1-character String)\n@see #toSet(String)\n@since 1.8.2"
] |
public Object copy(final Object obj, final PersistenceBroker broker)
{
return clone(obj, IdentityMapFactory.getIdentityMap(), broker);
} | [
"Uses an IdentityMap to make sure we don't recurse infinitely on the same object in a cyclic object model.\nProxies\n@param obj\n@return"
] | [
"Checks whether given class descriptor has a primary key.\n\n@param classDef The class descriptor\n@param checkLevel The current check level (this constraint is only checked in strict)\n@exception ConstraintException If the constraint has been violated",
"Parse a string representation of a Boolean value.\n\n@param value string representation\n@return Boolean value",
"add trace information for received frame",
"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.",
"Pump events from event stream.",
"Create a patch representing what we actually processed. This may contain some fixed content hashes for removed\nmodules.\n\n@param original the original\n@return the processed patch",
"Collapse repeated records, using exact string match on the record.\nThis is generally useful for making very verbose logs more readable.\n@return this",
"Generates a set of excluded method names.\n\n@param methodNames method names\n@return set of method names",
"Filters a dot at the end of the passed package name if present.\n\n@param pkgName\na package name\n@return a filtered package name"
] |
public static Polygon calculateBounds(final MapfishMapContext context) {
double rotation = context.getRootContext().getRotation();
ReferencedEnvelope env = context.getRootContext().toReferencedEnvelope();
Coordinate centre = env.centre();
AffineTransform rotateInstance = AffineTransform.getRotateInstance(rotation, centre.x, centre.y);
double[] dstPts = new double[8];
double[] srcPts = {
env.getMinX(), env.getMinY(), env.getMinX(), env.getMaxY(),
env.getMaxX(), env.getMaxY(), env.getMaxX(), env.getMinY()
};
rotateInstance.transform(srcPts, 0, dstPts, 0, 4);
return new GeometryFactory().createPolygon(new Coordinate[]{
new Coordinate(dstPts[0], dstPts[1]), new Coordinate(dstPts[2], dstPts[3]),
new Coordinate(dstPts[4], dstPts[5]), new Coordinate(dstPts[6], dstPts[7]),
new Coordinate(dstPts[0], dstPts[1])
});
} | [
"Create a polygon that represents in world space the exact area that will be visible on the printed\nmap.\n\n@param context map context"
] | [
"Inserts the specified array into the specified original array at the specified index.\n\n@param original the original array into which we want to insert another array\n@param index the index at which we want to insert the array\n@param inserted the array that we want to insert\n@return the combined array",
"Matches an array value if it contains all the elements of the argument array\n@param rhs The arguments\n@return PredicateExpression: $all rhs",
"Associate the batched Children with their owner object.\nLoop over owners",
"Stops the current debug server. Active connections are\nnot affected.",
"Overrides the superclass implementation to allow the value type's AttributeDefinition to in turn\nresolve each element.\n\n{@inheritDoc}",
"Converts a Map to an array of objects, adding only those entries whose key is in the nameMapping array.\n\n@param values\nthe Map of values to convert\n@param nameMapping\nthe keys to extract from the Map (elements in the target array will be added in this order)\n@return the array of Objects\n@throws NullPointerException\nif values or nameMapping is null",
"Read an individual Phoenix task relationship.\n\n@param relation Phoenix task relationship",
"Gets the value of the callout property.\n\n<p>\nThis accessor method returns a reference to the live list,\nnot a snapshot. Therefore any modification you make to the\nreturned list will be present inside the JAXB object.\nThis is why there is not a <CODE>set</CODE> method for the callout property.\n\n<p>\nFor example, to add a new item, do as follows:\n<pre>\ngetCallout().add(newItem);\n</pre>\n\n\n<p>\nObjects of the following type(s) are allowed in the list\n{@link Callouts.Callout }",
"Add precedence -10 because we need that ContainerRegistry is available in the Arquillian scope."
] |
static void undoChanges(final PatchEntry entry, final PatchContentLoader loader) {
final List<ContentModification> modifications = new ArrayList<ContentModification>(entry.rollbackActions);
for (final ContentModification modification : modifications) {
final ContentItem item = modification.getItem();
if (item.getContentType() != ContentType.MISC) {
// Skip modules and bundles they should be removed as part of the {@link FinalizeCallback}
continue;
}
final PatchingTaskDescription description = new PatchingTaskDescription(entry.applyPatchId, modification, loader, false, false, false);
try {
final PatchingTask task = PatchingTask.Factory.create(description, entry);
task.execute(entry);
} catch (Exception e) {
PatchLogger.ROOT_LOGGER.failedToUndoChange(item.toString());
}
}
} | [
"Undo changes for a single patch entry.\n\n@param entry the patch entry\n@param loader the content loader"
] | [
"Retrieve the effective calendar for this task. If the task does not have\na specific calendar associated with it, fall back to using the default calendar\nfor the project.\n\n@return ProjectCalendar instance",
"Try to provide an escaped, ready-to-use shell line to repeat a given command line.",
"Stop offering shared dbserver sessions.",
"Swaps two specified partitions.\n\nPair-wase partition swapping may be more prone to local minima than\nlarger perturbations. Could consider \"swapping\" a list of\n<nodeId/partitionId>. This would allow a few nodes to be identified\n(random # btw 2-5?) and then \"swapped\" (shuffled? rotated?).\n\n@return modified cluster metadata.",
"Use this API to fetch vpnvserver_responderpolicy_binding resources of given name .",
"Generate a path select string\n\n@return Select query string",
"Create a forward curve from forwards given by a LIBORMonteCarloModel.\n\n@param name name of the forward curve.\n@param model Monte Carlo model providing the forwards.\n@param startTime time at which the curve starts, i.e. zero time for the curve\n@return a forward curve from forwards given by a LIBORMonteCarloModel.\n@throws CalculationException Thrown if the model failed to provide the forward rates.",
"Waits for a job V3 to complete\n\n@param cloudFoundryClient the client to use to request job status\n@param completionTimeout the amount of time to wait for the job to complete.\n@param jobId the id of the job\n@return {@code onComplete} once job has completed",
"This method extracts byte arrays from the embedded object data\nand converts them into RTFEmbeddedObject instances, which\nit then adds to the supplied list.\n\n@param offset offset into the RTF document\n@param text RTF document\n@param objects destination for RTFEmbeddedObject instances\n@return new offset into the RTF document"
] |
public static final BigDecimal printRate(Rate rate)
{
BigDecimal result = null;
if (rate != null && rate.getAmount() != 0)
{
result = new BigDecimal(rate.getAmount());
}
return result;
} | [
"Print rate.\n\n@param rate Rate instance\n@return rate value"
] | [
"Parses btch api response to create a list of BoxAPIResponse objects.\n@param batchResponse response of a batch api request\n@return list of BoxAPIResponses",
"not start with another option name",
"Whether or not points are within some threshold.\n@param point1 Point 1\n@param point2 Point 2\n@return True or false",
"Get the authentication method to use.\n\n@return authentication method",
"Crop the image between two points.\n\n@param top Top bound.\n@param left Left bound.\n@param bottom Bottom bound.\n@param right Right bound.\n@throws IllegalArgumentException if {@code top} or {@code left} are less than zero or {@code\nbottom} or {@code right} are less than one or less than {@code top} or {@code left},\nrespectively.",
"Moves the given row up.\n\n@param row the row to move",
"Read a Synchro date from an input stream.\n\n@param is input stream\n@return Date instance",
"Use this API to fetch dnssuffix resources of given names .",
"This method is called to alert project listeners to the fact that\na calendar has been read from a project file.\n\n@param calendar calendar instance"
] |
protected void printFeatures(IN wi, Collection<String> features) {
if (flags.printFeatures == null || writtenNum > flags.printFeaturesUpto) {
return;
}
try {
if (cliqueWriter == null) {
cliqueWriter = new PrintWriter(new FileOutputStream("feats" + flags.printFeatures + ".txt"), true);
writtenNum = 0;
}
} catch (Exception ioe) {
throw new RuntimeException(ioe);
}
if (writtenNum >= flags.printFeaturesUpto) {
return;
}
if (wi instanceof CoreLabel) {
cliqueWriter.print(wi.get(TextAnnotation.class) + ' ' + wi.get(PartOfSpeechAnnotation.class) + ' '
+ wi.get(CoreAnnotations.GoldAnswerAnnotation.class) + '\t');
} else {
cliqueWriter.print(wi.get(CoreAnnotations.TextAnnotation.class)
+ wi.get(CoreAnnotations.GoldAnswerAnnotation.class) + '\t');
}
boolean first = true;
for (Object feat : features) {
if (first) {
first = false;
} else {
cliqueWriter.print(" ");
}
cliqueWriter.print(feat);
}
cliqueWriter.println();
writtenNum++;
} | [
"Print the String features generated from a IN"
] | [
"Updates this BoxJSONObject using the information in a JSON object.\n@param jsonObject the JSON object containing updated information.",
"Creates an operation to list the deployments.\n\n@return the operation",
"Finish service initialization.\n\n@throws GeomajasException oops",
"By default all bean archives see each other.",
"Return the version string of this instance of finmath-lib.\n\n@return The version string of this instance of finmath-lib.",
"append normal text\n\n@param text normal text\n@return SimplifySpanBuild",
"This is the main entry point used to convert the internal representation\nof timephased baseline cost into an external form which can\nbe displayed to the user.\n\n@param file parent project file\n@param cost timephased resource assignment data\n@param rangeUnits timescale units\n@param dateList timescale date ranges\n@return list of durations, one per timescale date range",
"Returns true if this entity's primary key is not null, and for numeric\nfields, is non-zero.",
"Read an element which contains only a single boolean attribute.\n@param reader the reader\n@param attributeName the attribute name, usually \"value\"\n@return the boolean value\n@throws javax.xml.stream.XMLStreamException if an error occurs or if the\nelement does not contain the specified attribute, contains other\nattributes, or contains child elements."
] |
@Override
public List<String> contentTypes() {
List<String> contentTypes = null;
final HttpServletRequest request = getHttpRequest();
if (favorParameterOverAcceptHeader) {
contentTypes = getFavoredParameterValueAsList(request);
} else {
contentTypes = getAcceptHeaderValues(request);
}
if (isEmpty(contentTypes)) {
logger.debug("Setting content types to default: {}.", DEFAULT_SUPPORTED_CONTENT_TYPES);
contentTypes = DEFAULT_SUPPORTED_CONTENT_TYPES;
}
return unmodifiableList(contentTypes);
} | [
"Returns requested content types or default content type if none found.\n\n@return Requested content types or default content type if none found."
] | [
"Close all JDBC objects related to this connection.",
"Convenience method for retrieving a char resource.\n\n@param locale locale identifier\n@param key resource key\n@return resource value",
"Adds a chain of vertices to the end of this list.",
"Use this API to delete appfwjsoncontenttype of given name.",
"Sets the highlight strength for the InnerPaddingOutline.\n\n@param _highlightStrength The highlighting value for the outline.",
"Finish initializing the service.",
"Adds an alias to the currently configured site.\n\n@param alias the URL of the alias server\n@param redirect <code>true</code> to always redirect to main URL\n@param offset the optional time offset for this alias",
"Returns the texture magnification filter\n\nIf missing, defaults to {@link GL_LINEAR }\n\n@param type the texture type\n@param index the index in the texture stack\n@return the texture magnification filter",
"Calculate a threshold.\n\n@param x first string.\n@param y second string.\n@param p the threshold coefficient.\n@return 2 maxLength(x, y) (1-p)"
] |
@JmxOperation(description = "Retrieve operation status")
public String getStatus(int id) {
try {
return getOperationStatus(id).toString();
} catch(VoldemortException e) {
return "No operation with id " + id + " found";
}
} | [
"Wrap getOperationStatus to avoid throwing exception over JMX"
] | [
"Adds all options from the passed container to this container.\n\n@param container a container with options to add",
"Use this API to update cmpparameter.",
"parse the stencil out of a JSONObject and set it to the current shape\n@param modelJSON\n@param current\n@throws org.json.JSONException",
"Get random geographical location\n@return 2-Tuple of ints (latitude, longitude)",
"Create a new path address by appending more elements to the end of this address.\n\n@param additionalElements the elements to append\n@return the new path address",
"Used to parse the dividend dates. Returns null if the date cannot be\nparsed.\n\n@param date String received that represents the date\n@return Calendar object representing the parsed date",
"Pushes a basic event.\n\n@param eventName The name of the event",
"Declaration of the variable within a block",
"Converts to credentials for use in Grgit.\n@return {@code null} if both username and password are {@code null},\notherwise returns credentials in Grgit format."
] |
public static <K, V, T> Map<K, List<Versioned<V>>> getAll(Store<K, V, T> storageEngine,
Iterable<K> keys,
Map<K, T> transforms) {
Map<K, List<Versioned<V>>> result = newEmptyHashMap(keys);
for(K key: keys) {
List<Versioned<V>> value = storageEngine.get(key,
transforms != null ? transforms.get(key)
: null);
if(!value.isEmpty())
result.put(key, value);
}
return result;
} | [
"Implements getAll by delegating to get."
] | [
"After cluster management operations, i.e. reset quota and recover quota\nenforcement settings",
"Removes columns from the matrix.\n\n@param A Matrix. Modified\n@param col0 First column\n@param col1 Last column, inclusive.",
"Construct an InterestRateSwapLegProductDescriptor from a node in a FIPXML file.\n\n@param leg The node containing the leg.\n@param forwardCurveName Forward curve name form outside the node.\n@param discountCurveName Discount curve name form outside the node.\n@param daycountConvention Daycount convention from outside the node.\n@return Descriptor of the swap leg.",
"Creates needed textfields for general label in footer groups.\n@param djgroup\n@param jgroup",
"Use this API to fetch the statistics of all appfwpolicylabel_stats resources that are configured on netscaler.",
"takes the pixels from a BufferedImage and stores them in an array",
"Invokes the observer method immediately passing the event.\n\n@param event The event to notify observer with",
"Determine the enum value corresponding to the third play state found in the packet.\n\n@return the proper value",
"Abort an active extern transaction associated with the given PB."
] |
public static ipset[] get(nitro_service service) throws Exception{
ipset obj = new ipset();
ipset[] response = (ipset[])obj.get_resources(service);
return response;
} | [
"Use this API to fetch all the ipset resources that are configured on netscaler."
] | [
"This returns a string from decimal digit smallestDigit to decimal digit\nbiggest digit. Smallest digit is labeled 1, and the limits are\ninclusive.",
"Close tracks when the JVM shuts down.\n@return this",
"Convert the value to requested quoting convention.\nConversion involving receiver premium assumes zero wide collar.\n\n@param value The value to convert.\n@param key The key of the value.\n@param toConvention The convention to convert to.\n@param toDisplacement The displacement to be used, if converting to log normal implied volatility.\n@param fromConvention The current convention of the value.\n@param fromDisplacement The current displacement.\n@param model The model for context.\n\n@return The converted value.",
"Returns all the Artifacts of the module\n\n@param module Module\n@return List<Artifact>",
"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)",
"Use this API to fetch vpnvserver_vpnnexthopserver_binding resources of given name .",
"Remove all scene objects.",
"A find query only given as criterion. Leave it to MongoDB's own parser to handle it.\n\n@return the {@link Rule} to identify a find query only",
"Gets Widget bounds depth\n@return depth"
] |
public Document removeDocument(String key) throws PrintingException {
if (documentMap.containsKey(key)) {
return documentMap.remove(key);
} else {
throw new PrintingException(PrintingException.DOCUMENT_NOT_FOUND, key);
}
} | [
"Gets a document from the service.\n\n@param key\nunique key to reference the document\n@return the document or null if no such document"
] | [
"Updates a metadata classification on the specified file.\n\n@param classificationType the metadata classification type.\n@return the new metadata classification type updated on the file.",
"note this string is used by hashCode",
"Returns all model classes registered on this datasource\n\n@return model classes talk to this datasource",
"Read an individual Phoenix task relationship.\n\n@param relation Phoenix task relationship",
"Converts a standard optimizer to one which the given amount of l1 or l2 regularization.",
"Get the max extent as a envelop object.",
"Returns a flag indicating if also unreleased resources should be found.\n@return A flag indicating if also unreleased resources should be found.",
"Adds this vector to v1 and places the result in this vector.\n\n@param v1\nright-hand vector",
"Convert a name into initials.\n\n@param name source name\n@return initials"
] |
public static String read(final File file) throws IOException {
final StringBuilder sb = new StringBuilder();
try (
final FileReader fr = new FileReader(file);
final BufferedReader br = new BufferedReader(fr);
) {
String sCurrentLine;
while ((sCurrentLine = br.readLine()) != null) {
sb.append(sCurrentLine);
}
}
return sb.toString();
} | [
"Reads a file and returns the result in a String\n\n@param file File\n@return String\n@throws IOException"
] | [
"Marks a given list of statements for insertion into the current document.\nInserted statements can have an id if they should update an existing\nstatement, or use an empty string as id if they should be added. The\nmethod removes duplicates and avoids unnecessary modifications by\nchecking the current content of the given document before marking\nstatements for being written.\n\n@param currentDocument\nthe document with the current statements\n@param addStatements\nthe list of new statements to be added",
"Returns the list of atlas information necessary to map\nthe texture atlas to each scene object.\n\n@return List of atlas information.",
"Helper to read an optional String value list.\n@param path The XML path of the element to read.\n@return The String list stored in the XML, or <code>null</code> if the value could not be read.",
"Always returns the original proxy object that was serialized.\n\n@return the proxy object\n@throws java.io.ObjectStreamException",
"Sends out the SQL as defined in the config upon first init of the connection.\n@param connection\n@param initSQL\n@throws SQLException",
"Fetches a list of available photo licenses for Flickr.\n\nThis method does not require authentication.\n\n@return A collection of License objects\n@throws FlickrException",
"Parses whole value as list attribute\n@deprecated in favour of using {@link AttributeParser attribute parser}\n@param value String with \",\" separated string elements\n@param operation operation to with this list elements are added\n@param reader xml reader from where reading is be done\n@throws XMLStreamException if {@code value} is not valid",
"Convert an object to another object given a parameterized type signature\n\n@param context\n@param destinationType\nthe destination type\n@param source\nthe source object\n\n@return the converted object\n@throws ConverterException\nif conversion failed",
"Retrieves a long value from the extended data.\n\n@param type Type identifier\n@return long value"
] |
public static dnsview[] get(nitro_service service, String viewname[]) throws Exception{
if (viewname !=null && viewname.length>0) {
dnsview response[] = new dnsview[viewname.length];
dnsview obj[] = new dnsview[viewname.length];
for (int i=0;i<viewname.length;i++) {
obj[i] = new dnsview();
obj[i].set_viewname(viewname[i]);
response[i] = (dnsview) obj[i].get_resource(service);
}
return response;
}
return null;
} | [
"Use this API to fetch dnsview resources of given names ."
] | [
"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",
"Resolves the POM for the specified parent.\n\n@param parent the parent coordinates to resolve, must not be {@code null}\n@return The source of the requested POM, never {@code null}\n@since Apache-Maven-3.2.2 (MNG-5639)",
"Send the started notification",
"Write an attribute name.\n\n@param name attribute name",
"Perform a post-boot scan to remove any deployments added during boot that failed to deploy properly.\nThis method isn't private solely to allow a unit test in the same package to call it.",
"Validates the data for correct annotation",
"Tries to guess location of the user secure keyring using various\nheuristics.\n\n@return path to the keyring file\n@throws FileNotFoundException if no keyring file found",
"Send a database announcement to all registered listeners.\n\n@param slot the media slot whose database availability has changed\n@param database the database whose relevance has changed\n@param available if {@code} true, the database is newly available, otherwise it is no longer relevant",
"Stops the current connection. No reconnecting will occur. Kills thread + cleanup.\nWaits for the loop to end"
] |
public static double KumarJohnsonDivergence(double[] p, double[] q) {
double r = 0;
for (int i = 0; i < p.length; i++) {
if (p[i] != 0 && q[i] != 0) {
r += Math.pow(p[i] * p[i] - q[i] * q[i], 2) / 2 * Math.pow(p[i] * q[i], 1.5);
}
}
return r;
} | [
"Gets the Kumar-Johnson divergence.\n\n@param p P vector.\n@param q Q vector.\n@return The Kumar-Johnson divergence between p and q."
] | [
"Returns all migrations starting from and excluding the given version. Usually you want to provide the version of\nthe database here to get all migrations that need to be executed. In case there is no script with a newer\nversion than the one given, an empty list is returned.\n\n@param version the version that is currently in the database\n@return all versions since the given version or an empty list if no newer script is available. Never null.\nDoes not include the given version.",
"Use this API to fetch the statistics of all vpath_stats resources that are configured on netscaler.",
"Add a misc file.\n\n@param name the file name\n@param path the relative path\n@param newHash the new hash of the added content\n@param isDirectory whether the file is a directory or not\n@return the builder",
"decides which icon to apply or hide this view\n\n@param imageHolder\n@param imageView\n@param iconColor\n@param tint",
"Processes an anonymous field definition specified at the class level.\n\n@param attributes The attributes of the tag\n@exception XDocletException if an error occurs\[email protected] type=\"content\"\[email protected] name=\"attributes\" optional=\"true\" description=\"Attributes of the field as name-value pairs 'name=value',\nseparated by commas\"\[email protected] name=\"autoincrement\" optional=\"true\" description=\"Whether the field is\nauto-incremented\" values=\"true,false\"\[email protected] name=\"column\" optional=\"true\" description=\"The column for the field\"\[email protected] name=\"conversion\" optional=\"true\" description=\"The fully qualified name of the\nconversion for the field\"\[email protected] name=\"default-fetch\" optional=\"true\" description=\"The default-fetch setting\"\nvalues=\"true,false\"\[email protected] name=\"documentation\" optional=\"true\" description=\"Documentation on the field\"\[email protected] name=\"id\" optional=\"true\" description=\"The position of the field in the class\ndescriptor\"\[email protected] name=\"indexed\" optional=\"true\" description=\"Whether the field is indexed\"\nvalues=\"true,false\"\[email protected] name=\"jdbc-type\" optional=\"true\" description=\"The jdbc type of the column\"\[email protected] name=\"length\" optional=\"true\" description=\"The length of the column\"\[email protected] name=\"locking\" optional=\"true\" description=\"Whether the field supports locking\"\nvalues=\"true,false\"\[email protected] name=\"name\" optional=\"false\" description=\"The name of the field\"\[email protected] name=\"nullable\" optional=\"true\" description=\"Whether the field is nullable\"\nvalues=\"true,false\"\[email protected] name=\"precision\" optional=\"true\" description=\"The precision of the column\"\[email protected] name=\"primarykey\" optional=\"true\" description=\"Whether the field is a primarykey\"\nvalues=\"true,false\"\[email protected] name=\"scale\" optional=\"true\" description=\"The scale of the column\"\[email protected] name=\"sequence-name\" optional=\"true\" description=\"The name of the sequence for\nincrementing the field\"\[email protected] name=\"table\" optional=\"true\" description=\"The table of the field (not implemented\nyet)\"\[email protected] name=\"update-lock\" optional=\"true\" description=\"Can be set to false if the persistent attribute is\nused for optimistic locking AND the dbms should update the lock column itself (default is true). Can only be set for\nTIMESTAMP and INTEGER columns\" values=\"true,false\"",
"Creates custom Http Client connection pool to be used by Http Client\n\n@return {@link PoolingHttpClientConnectionManager}",
"Get siblings of the same type as element from parent.\n\n@param parent parent node.\n@param element element.\n@return List of sibling (from element) under parent",
"Polls from the location header and updates the polling state with the\npolling response for a PUT operation.\n\n@param pollingState the polling state for the current operation.\n@param <T> the return type of the caller.",
"Used to create a new retention policy.\n@param api the API connection to be used by the created user.\n@param name the name of the retention policy.\n@param type the type of the retention policy. Can be \"finite\" or \"indefinite\".\n@param length the duration in days that the retention policy will be active for after being assigned to content.\n@param action the disposition action can be \"permanently_delete\" or \"remove_retention\".\n@return the created retention policy's info."
] |
public DbConn getConn()
{
Connection cnx = null;
try
{
Thread.interrupted(); // this is VERY sad. Needed for Oracle driver which otherwise fails spectacularly.
cnx = _ds.getConnection();
if (cnx.getAutoCommit())
{
cnx.setAutoCommit(false);
cnx.rollback(); // To ensure no open transaction created by the pool before changing TX mode
}
if (cnx.getTransactionIsolation() != Connection.TRANSACTION_READ_COMMITTED)
{
cnx.setTransactionIsolation(Connection.TRANSACTION_READ_COMMITTED);
}
return new DbConn(this, cnx);
}
catch (SQLException e)
{
DbHelper.closeQuietly(cnx); // May have been left open when the pool has given us a failed connection.
throw new DatabaseException(e);
}
} | [
"A connection to the database. Should be short-lived. No transaction active by default.\n\n@return a new open connection."
] | [
"Utility method to convert a String to an Integer, and\nhandles null values.\n\n@param value string representation of an integer\n@return int value",
"Indicates if a bean's scope type is passivating\n\n@param bean The bean to inspect\n@return True if the scope is passivating, false otherwise",
"Returns the text for the JSONObject of Link provided\nThe JSONObject of Link provided should be of the type \"url\"\n@param jsonObject of Link\n@return String",
"Add a Opacity bar to the color wheel.\n\n@param bar The instance of the Opacity bar.",
"Retrieve a child record by name.\n\n@param key child record name\n@return child record",
"Send an ERROR log message with specified subsystem. If subsystem is not enabled the message\nwill not be logged\n@param subsystem logging subsystem\n@param tag Used to identify the source of a log message. It usually identifies the class or\nactivity where the log call occurs.\n@param msg The message you would like logged.\n@return",
"Use this API to delete lbroute.",
"Search for a publisher of the given type in a project and return it, or null if it is not found.\n\n@return The publisher",
"Determine how many forked JVMs to use."
] |
public static boolean validate(final String ip) {
Matcher matcher = pattern.matcher(ip);
return matcher.matches();
} | [
"Validate ipv4 address with regular expression\n\n@param ip\naddress for validation\n\n@return true valid ip address, false invalid ip address"
] | [
"Convert an Object to a Date.",
"This method extracts assignment data from an MSPDI file.\n\n@param project Root node of the MSPDI file",
"waits for all async mutations that were added before this was called to be flushed. Does not\nwait for async mutations added after call.",
"Set the values using the specified Properties object\n\n@param properties Properties object containing specific property values\nfor the Coordinator config",
"Escapes control characters with a preceding backslash.\nOptionally encodes special chars as unicode escape sequence.\nThe resulting string is safe to be put into a Java string literal between\nthe quotes.",
"Scroll to the specific position\n@param position\n@return the new current item after the scrolling processed.",
"Sends a request to the API with the given parameters and the given\nrequest method and returns the result string. It automatically fills the\ncookie map with cookies in the result header after the request.\n\nWarning: You probably want to use ApiConnection.sendJsonRequest\nthat execute the request using JSON content format,\nthrows the errors and logs the warnings.\n\n@param requestMethod\neither POST or GET\n@param parameters\nMaps parameter keys to values. Out of this map the function\nwill create a query string for the request.\n@return API result\n@throws IOException",
"Invoke an operation on an MBean by name.\nNote that only basic data types are supported for parameter values.\n@param operationName the operation name (can be URL-encoded).\n@param parameterMap the {@link Map} of parameter names and value arrays.\n@return the returned value from the operation.\n@throws JMException Java Management Exception\n@throws UnsupportedEncodingException if the encoding is not supported.",
"Check if the current version match the last release or the last snapshot one\n\n@param artifact\n@return boolean"
] |
@SuppressWarnings("rawtypes")
public static MonetaryAmountFactory getAmountFactory(MonetaryAmountFactoryQuery query) {
return Optional.ofNullable(monetaryAmountsSingletonQuerySpi()).orElseThrow(() -> new MonetaryException(
"No MonetaryAmountsSingletonQuerySpi loaded, query functionality is not available."))
.getAmountFactory(query);
} | [
"Executes the query and returns the factory found, if there is only one factory.\nIf multiple factories match the query, one is selected.\n\n@param query the factory query, not null.\n@return the factory found, or null."
] | [
"Process a compilation unit already parsed and build.",
"Adds search fields from elements on a container page to a container page's document.\n@param document The document for the container page\n@param cms The current CmsObject\n@param resource The resource of the container page\n@param systemFields The list of field names for fields where mappings to should be discarded, since these fields are used system internally.\n@return the manipulated document",
"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",
"Function to perform forward pooling",
"Convert the value to requested quoting convention.\nConversion involving receiver premium assumes zero wide collar.\n\n@param value The value to convert.\n@param key The key of the value.\n@param toConvention The convention to convert to.\n@param toDisplacement The displacement to be used, if converting to log normal implied volatility.\n@param fromConvention The current convention of the value.\n@param fromDisplacement The current displacement.\n@param model The model for context.\n\n@return The converted value.",
"Returns a handle to the pool. Useful to obtain a handle to the\nstatistics for example.\n@return pool",
"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",
"Remove a list of stores from the session\n\nFirst commit all entries for these stores and then cleanup resources\n\n@param storeNameToRemove List of stores to be removed from the current\nstreaming session",
"Start a server.\n\n@return the http server\n@throws Exception the exception"
] |
@Override
public Object[] getAgentPlans(String agent_name, Connector connector) {
// Not supported in JADE
connector.getLogger().warning("Non suported method for Jade Platform. There is no plans in Jade platform.");
throw new java.lang.UnsupportedOperationException("Non suported method for Jade Platform. There is no extra properties.");
} | [
"Non-supported in JadeAgentIntrospector"
] | [
"Assign arguments to the statement.\n\n@return The statement passed in or null if it had to be closed on error.",
"Remove an addon from an app.\n@param appName App name. See {@link #listApps} for a list of apps that can be used.\n@param addonName Addon name. See {@link #listAppAddons} for a list of addons that can be used.\n@return the request object",
"Called when the pattern has changed.",
"Returns a new client id for the profileIdentifier\n\n@param model\n@param profileIdentifier\n@return json with a new client_id\n@throws Exception",
"Initializes the external child resource collection.",
"Processes an anonymous field definition specified at the class level.\n\n@param attributes The attributes of the tag\n@exception XDocletException if an error occurs\[email protected] type=\"content\"\[email protected] name=\"attributes\" optional=\"true\" description=\"Attributes of the field as name-value pairs 'name=value',\nseparated by commas\"\[email protected] name=\"autoincrement\" optional=\"true\" description=\"Whether the field is\nauto-incremented\" values=\"true,false\"\[email protected] name=\"column\" optional=\"true\" description=\"The column for the field\"\[email protected] name=\"conversion\" optional=\"true\" description=\"The fully qualified name of the\nconversion for the field\"\[email protected] name=\"default-fetch\" optional=\"true\" description=\"The default-fetch setting\"\nvalues=\"true,false\"\[email protected] name=\"documentation\" optional=\"true\" description=\"Documentation on the field\"\[email protected] name=\"id\" optional=\"true\" description=\"The position of the field in the class\ndescriptor\"\[email protected] name=\"indexed\" optional=\"true\" description=\"Whether the field is indexed\"\nvalues=\"true,false\"\[email protected] name=\"jdbc-type\" optional=\"true\" description=\"The jdbc type of the column\"\[email protected] name=\"length\" optional=\"true\" description=\"The length of the column\"\[email protected] name=\"locking\" optional=\"true\" description=\"Whether the field supports locking\"\nvalues=\"true,false\"\[email protected] name=\"name\" optional=\"false\" description=\"The name of the field\"\[email protected] name=\"nullable\" optional=\"true\" description=\"Whether the field is nullable\"\nvalues=\"true,false\"\[email protected] name=\"precision\" optional=\"true\" description=\"The precision of the column\"\[email protected] name=\"primarykey\" optional=\"true\" description=\"Whether the field is a primarykey\"\nvalues=\"true,false\"\[email protected] name=\"scale\" optional=\"true\" description=\"The scale of the column\"\[email protected] name=\"sequence-name\" optional=\"true\" description=\"The name of the sequence for\nincrementing the field\"\[email protected] name=\"table\" optional=\"true\" description=\"The table of the field (not implemented\nyet)\"\[email protected] name=\"update-lock\" optional=\"true\" description=\"Can be set to false if the persistent attribute is\nused for optimistic locking AND the dbms should update the lock column itself (default is true). Can only be set for\nTIMESTAMP and INTEGER columns\" values=\"true,false\"",
"Get the Operation metadata for a single operation on an MBean by name.\n@param operationName the Operation name (can be URL-encoded).\n@return the {@link MBeanOperationInfo} for the operation.\n@throws OperationNotFoundException Method was not found\n@throws UnsupportedEncodingException if the encoding is not supported.",
"Print the parameters of the parameterized type t",
"Extract assignment hyperlink data.\n\n@param assignment assignment instance\n@param data hyperlink data"
] |
public CollectionRequest<Attachment> findByTask(String task) {
String path = String.format("/tasks/%s/attachments", task);
return new CollectionRequest<Attachment>(this, Attachment.class, path, "GET");
} | [
"Returns the compact records for all attachments on the task.\n\n@param task Globally unique identifier for the task.\n@return Request object"
] | [
"Sets the frame pointer to a specific frame\n\n@return boolean true if the move was successful",
"Used for unit tests only.\n\nFIXME: Refactor test code with dependency injection or scope restrictions so this function is not public.\n\n@deprecated Do not use for production code, use {@link #fetch(String, String, voldemort.server.protocol.admin.AsyncOperationStatus, String, long, voldemort.store.metadata.MetadataStore, Long diskQuotaSizeInKB)} instead.",
"Reads each token from a single record and adds it to a list.\n\n@param tk tokenizer\n@param record list of tokens\n@throws IOException",
"Use this API to fetch all the systemcore resources that are configured on netscaler.",
"Remove a DAO from the cache. This is necessary if we've registered it already but it throws an exception during\nconfiguration.",
"Creates the event type.\n\n@param type the EventEnumType\n@return the event type",
"Read resource assignment baseline values.\n\n@param row result set row",
"Combines two trajectories by adding the corresponding positions. The trajectories have to have the same length.\n@param a The first trajectory\n@param b The second trajectory\n@return The combined trajectory",
"Creates a curator built using the given zookeeper connection string and timeout"
] |
private void addTraceForFrame(WebSocketFrame frame, String type) {
Map<String, Object> trace = new LinkedHashMap<>();
trace.put("type", type);
trace.put("direction", "in");
if (frame instanceof TextWebSocketFrame) {
trace.put("payload", ((TextWebSocketFrame) frame).text());
}
if (traceEnabled) {
websocketTraceRepository.add(trace);
}
} | [
"add trace information for received frame"
] | [
"Return the List of VariableExpression objects referenced by the specified DeclarationExpression.\n@param declarationExpression - the DeclarationExpression\n@return the List of VariableExpression objects",
"Retrieve URL without parameters\n\n@param sourceURI source URI\n@return URL without parameters",
"Calculates how much of a time range is before or after a\ntarget intersection point.\n\n@param start time range start\n@param end time range end\n@param target target intersection point\n@param after true if time after target required, false for time before\n@return length of time in milliseconds",
"2-D Integer array to double array.\n\n@param array Integer array.\n@return Double array.",
"Add the list with given bundles to the \"Require-Bundle\" main attribute.\n\n@param requiredBundles The list of all bundles to add.",
"Gets an exception reporting an unexpected XML attribute.\n\n@param reader a reference to the stream reader.\n@param index the attribute index.\n@return the constructed {@link javax.xml.stream.XMLStreamException}.",
"Sets the jdbc connection to use.\n\n@param jcd The connection to use\n@throws PlatformException If the target database cannot be handled with torque",
"Use this API to fetch vpnvserver_vpnsessionpolicy_binding resources of given name .",
"Rotate the specified photo. The only allowed values for degrees are 90, 180 and 270.\n\n@param photoId\nThe photo ID\n@param degrees\nThe degrees to rotate (90, 170 or 270)"
] |
private String generatedBuilderSimpleName(TypeElement type) {
String packageName = elements.getPackageOf(type).getQualifiedName().toString();
String originalName = type.getQualifiedName().toString();
checkState(originalName.startsWith(packageName + "."));
String nameWithoutPackage = originalName.substring(packageName.length() + 1);
return String.format(BUILDER_SIMPLE_NAME_TEMPLATE, nameWithoutPackage.replaceAll("\\.", "_"));
} | [
"Returns the simple name of the builder class that should be generated for the given type.\n\n<p>This is simply the {@link #BUILDER_SIMPLE_NAME_TEMPLATE} with the original type name\nsubstituted in. (If the original type is nested, its enclosing classes will be included,\nseparated with underscores, to ensure uniqueness.)"
] | [
"Sets the underlying write timeout in milliseconds.\nA value of 0 specifies an infinite timeout.\n@see okhttp3.OkHttpClient.Builder#writeTimeout(long, TimeUnit)",
"Given a string with the scenario or story name, creates a Class Name with\nno spaces and first letter capital\n\n@param String\n- The name of the scenario/story. It should be in lower case.\n@returns String - The class name",
"Gets the final transform of the bone.\n\n@return the 4x4 matrix representing the final transform of the\nbone during animation, which comprises bind pose and skeletal\ntransform at the current time of the animation.",
"this class loader interface can be used by other plugins to lookup\nresources from the bundles. A temporary class loader interface is set\nduring other configuration loading as well\n\n@return ClassLoaderInterface (BundleClassLoaderInterface)",
"Set a proxy for REST-requests.\n\n@param proxyHost\n@param proxyPort",
"Retrieves a prompt value.\n\n@param field field type\n@param block criteria data block\n@return prompt value",
"Moves a particular enum option to be either before or after another specified enum option in the custom field.\n\n@param customField Globally unique identifier for the custom field.\n@return Request object",
"parse the stencil out of a JSONObject and set it to the current shape\n@param modelJSON\n@param current\n@throws org.json.JSONException",
"Read a single field alias from an extended attribute.\n\n@param attribute extended attribute"
] |
public Where<T, ID> like(String columnName, Object value) throws SQLException {
addClause(new SimpleComparison(columnName, findColumnFieldType(columnName), value,
SimpleComparison.LIKE_OPERATION));
return this;
} | [
"Add a LIKE clause so the column must mach the value using '%' patterns."
] | [
"Creates the publish button.\n\n@param updateListener the update listener\n@return the publish button",
"Returns the full workspace record for a single workspace.\n\n@param workspace Globally unique identifier for the workspace or organization.\n@return Request object",
"Convenience method to set the underlying bean instance for a proxy.\n\n@param proxy the proxy instance\n@param beanInstance the instance of the bean",
"Verify that all OGM custom externalizers are present.\nN.B. even if some Externalizer is only needed in specific configuration,\nit is not safe to start a CacheManager without one as the same CacheManager\nmight be used, or have been used in the past, to store data using a different\nconfiguration.\n\n@see ExternalizerIds\n@see AdvancedExternalizer\n@param externalCacheManager the provided CacheManager to validate",
"Registers the deployment resources needed.\n\n@param deploymentResourceSupport the deployment resource support\n@param service the service, which may be {@code null}, used to find the resource names that need to be registered",
"Given the initial and final cluster dumps it into the output directory\n\n@param currentCluster Initial cluster metadata\n@param finalCluster Final cluster metadata\n@param outputDirName Output directory where to dump this file\n@param filePrefix String to prepend to the initial & final cluster\nmetadata files\n@throws IOException",
"Gets the event type from message.\n\n@param message the message\n@return the event type",
"Determines a histogram of contiguous runs of partitions within a zone.\nI.e., for each run length of contiguous partitions, how many such runs\nare there.\n\nDoes not correctly address \"wrap around\" of partition IDs (i.e., the fact\nthat partition ID 0 is \"next\" to partition ID 'max')\n\n@param cluster\n@param zoneId\n@return map of length of contiguous run of partitions to count of number\nof such runs.",
"See convertToSQL92.\n\n@return SQL like sub-expression\n@throws IllegalArgumentException oops"
] |
public List<List<IN>> classifyFile(String filename) {
ObjectBank<List<IN>> documents =
makeObjectBankFromFile(filename, plainTextReaderAndWriter);
List<List<IN>> result = new ArrayList<List<IN>>();
for (List<IN> document : documents) {
// System.err.println(document);
classify(document);
List<IN> sentence = new ArrayList<IN>();
for (IN wi : document) {
sentence.add(wi);
// System.err.println(wi);
}
result.add(sentence);
}
return result;
} | [
"Classify the contents of a file.\n\n@param filename\nContains the sentence(s) to be classified.\n@return {@link List} of classified List of IN."
] | [
"Execute a slave process. Pump events to the given event bus.",
"Get a property as a double or null.\n\n@param key the property name",
"Specify the socket to be used as underlying socket to connect\nto the APN service.\n\nThis assumes that the socket connects to a SOCKS proxy.\n\n@deprecated use {@link ApnsServiceBuilder#withProxy(Proxy)} instead\n@param proxySocket the underlying socket for connections\n@return this",
"Returns an input stream that applies the required decompression to the\ngiven input stream.\n\n@param inputStream\nthe input stream with the (possibly compressed) data\n@param compressionType\nthe kind of compression\n@return an input stream with decompressed data\n@throws IOException\nif there was a problem creating the decompression streams",
"Send parallel task to execution manager.\n\n@param task\nthe parallel task\n@return the batch response from manager",
"Sets the ssh priv key relative path wtih passphrase.\n\n@param privKeyRelativePath the priv key relative path\n@param passphrase the passphrase\n@return the parallel task builder",
"Unescape and unquote the path. Ready for translation.",
"Returns the collection definition of the given name if it exists.\n\n@param name The name of the collection\n@return The collection definition or <code>null</code> if there is no such collection",
"Generate a uniform random number in the range [lo, hi)\n\n@param lo lower limit of range\n@param hi upper limit of range\n@return a uniform random real in the range [lo, hi)"
] |
protected Object buildOrRefreshObject(Map row, ClassDescriptor targetClassDescriptor, Object targetObject)
{
Object result = targetObject;
FieldDescriptor fmd;
FieldDescriptor[] fields = targetClassDescriptor.getFieldDescriptor(true);
if(targetObject == null)
{
// 1. create new object instance if needed
result = ClassHelper.buildNewObjectInstance(targetClassDescriptor);
}
// 2. fill all scalar attributes of the new object
for (int i = 0; i < fields.length; i++)
{
fmd = fields[i];
fmd.getPersistentField().set(result, row.get(fmd.getColumnName()));
}
if(targetObject == null)
{
// 3. for new build objects, invoke the initialization method for the class if one is provided
Method initializationMethod = targetClassDescriptor.getInitializationMethod();
if (initializationMethod != null)
{
try
{
initializationMethod.invoke(result, NO_ARGS);
}
catch (Exception ex)
{
throw new PersistenceBrokerException("Unable to invoke initialization method:" + initializationMethod.getName() + " for class:" + m_cld.getClassOfObject(), ex);
}
}
}
return result;
} | [
"Creates an object instance according to clb, and fills its fileds width data provided by row.\n@param row A {@link Map} contain the Object/Row mapping for the object.\n@param targetClassDescriptor If the \"ojbConcreteClass\" feature was used, the target\n{@link org.apache.ojb.broker.metadata.ClassDescriptor} could differ from the descriptor\nthis class was associated - see {@link #selectClassDescriptor}.\n@param targetObject If 'null' a new object instance is build, else fields of object will\nbe refreshed.\n@throws PersistenceBrokerException if there ewas an error creating the new object"
] | [
"Removes the token from the list\n@param token Token which is to be removed",
"Get the account knowing his position\n@param position the position of the account (it can change at runtime!)\n@return the account",
"Validates the binding types",
"Updates the properties of a tag. Only the fields provided in the `data`\nblock will be updated; any unspecified fields will remain unchanged.\n\nWhen using this method, it is best to specify only those fields you wish\nto change, or else you may overwrite changes made by another user since\nyou last retrieved the task.\n\nReturns the complete updated tag record.\n\n@param tag The tag to update.\n@return Request object",
"Adds the file to the tar archive represented by output stream. It's caller's responsibility to close output stream\nproperly.\n\n@param out target archive.\n@param source file to be added.\n@param fileSize size of the file (which is known in most cases).\n@throws IOException in case of any issues with underlying store.",
"Use this API to fetch auditsyslogpolicy_lbvserver_binding resources of given name .",
"Retrieves the class object for the given qualified class name.\n\n@param className The qualified name of the class\n@param initialize Whether the class shall be initialized\n@return The class object",
"Create a directory at the given path if it does not exist yet.\n\n@param path\nthe path to the directory\n@throws IOException\nif it was not possible to create a directory at the given\npath",
"Returns the compact project records for all projects in the workspace.\n\n@param workspace The workspace or organization to find projects in.\n@return Request object"
] |
public void setHomeAsUpIndicator(Drawable indicator) {
if(!deviceSupportMultiPane()) {
pulsante.setHomeAsUpIndicator(indicator);
}
else {
actionBar.setHomeAsUpIndicator(indicator);
}
} | [
"Set the HomeAsUpIndicator that is visible when user navigate to a fragment child\n@param indicator the resource drawable to use as indicator"
] | [
"judge a->b is ordered clockwise\n\n@param center\n@param a\n@param b\n@return",
"sets the row reader class name for thie class descriptor",
"Iterates through the given CharSequence line by line, splitting each line using\nthe given regex delimiter. The list of tokens for each line is then passed to\nthe given closure.\n\n@param self a CharSequence\n@param regex the delimiting regular expression\n@param closure a closure\n@return the last value returned by the closure\n@throws java.io.IOException if an error occurs\n@throws java.util.regex.PatternSyntaxException if the regular expression's syntax is invalid\n@see #splitEachLine(CharSequence, java.util.regex.Pattern, groovy.lang.Closure)\n@since 1.8.2",
"Sets the values of this vector to those of v1.\n\n@param v1\nvector whose values are copied",
"Set the TableAlias for aPath\n@param aPath\n@param hintClasses\n@param TableAlias",
"Obtain parameters from query\n\n@param query query to scan\n@return Map of parameters",
"at this point definition below is not really needed as it is the same as for 1.1, but it is here as place holder when subsystem parser evolves.",
"Reverse how the transition is applied, such that the transition previously performed when progress=start of range is only performed when progress=end of range\n\n@return",
"Remove all scene objects."
] |
protected int adjustIndex(Widget child, int beforeIndex) {
checkIndexBoundsForInsertion(beforeIndex);
// Check to see if this widget is already a direct child.
if (child.getParent() == this) {
// If the Widget's previous position was left of the desired new position
// shift the desired position left to reflect the removal
int idx = getWidgetIndex(child);
if (idx < beforeIndex) {
beforeIndex--;
}
}
return beforeIndex;
} | [
"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"
] | [
"Will auto format the given string to provide support for pickadate.js formats.",
"Record operation for sync ops time\n\n@param dest Destination of the socket to connect to. Will actually record\nif null. Otherwise will call this on self and corresponding child\nwith this param null.\n@param opTimeUs The number of us for the op to finish",
"This method writes a single predecessor link to the MSPDI file.\n\n@param taskID The task UID\n@param type The predecessor type\n@param lag The lag duration\n@return A new link to be added to the MSPDI file",
"Initializes the metadataCache for MetadataStore",
"Use this API to update sslocspresponder resources.",
"Use this API to fetch dnsview resource of given name .",
"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",
"Sobel method to generate bump map from a height map\n\n@param input - A height map\n@return bump map",
"Retrieve the parent task based on its WBS.\n\n@param wbs parent WBS\n@return parent task"
] |
public <T extends CanvasReader> T getReader(Class<T> type, OauthToken oauthToken, Integer paginationPageSize) {
LOG.debug("Factory call to instantiate class: " + type.getName());
RestClient restClient = new RefreshingRestClient();
@SuppressWarnings("unchecked")
Class<T> concreteClass = (Class<T>)readerMap.get(type);
if (concreteClass == null) {
throw new UnsupportedOperationException("No implementation for requested interface found: " + type.getName());
}
LOG.debug("got class: " + concreteClass);
try {
Constructor<T> constructor = concreteClass.getConstructor(String.class, Integer.class,
OauthToken.class, RestClient.class, Integer.TYPE, Integer.TYPE, Integer.class, Boolean.class);
return constructor.newInstance(canvasBaseUrl, CANVAS_API_VERSION, oauthToken, restClient,
connectTimeout, readTimeout, paginationPageSize, false);
} catch (NoSuchMethodException | InvocationTargetException | IllegalAccessException | InstantiationException e) {
throw new UnsupportedOperationException("Unknown error instantiating the concrete API class: " + type.getName(), e);
}
} | [
"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"
] | [
"The selectionStrategy given as String argument is selected as locatorSelectionStrategy.\nIf selectionStrategy is null, the defaultLocatorSelectionStrategy is used instead.\nThen the new locatorSelectionStrategy is connected to the locatorClient and the matcher.\nA new LocatorTargetSelector is created, set to the locatorSelectionStrategy and then set\nas selector in the conduitSelectorHolder.\n\n@param conduitSelectorHolder\n@param matcher\n@param selectionStrategy",
"Remove an write lock.",
"Joins the given ints using the given separator into a single string.\n\n@return the joined string or an empty string if the int array is null",
"Get all views from the list content\n@return list of views currently visible",
"Stops download dispatchers.",
"Write an unsigned short to the byte array starting at the given offset\n\n@param bytes The byte array\n@param value The short to write\n@param offset The offset to begin writing at",
"Inserts a column name, value pair into the SQL.\n\n@param column\nName of the table column.\n@param value\nValue to substitute in. InsertBuilder does *no* interpretation\nof this. If you want a string constant inserted, you must\nprovide the single quotes and escape the internal quotes. It\nis more common to use a question mark or a token in the style\nof {@link ParameterizedPreparedStatementCreator}, e.g. \":foo\".",
"Loads the Configuration from the properties file.\n\nLoads the properties file, or uses defaults on failure.\n\n@see org.apache.ojb.broker.util.configuration.impl.ConfigurationAbstractImpl#setFilename(java.lang.String)",
"One of the two main methods in this class. Creates a RendererViewHolder instance with a\nRenderer inside ready to be used. The RendererBuilder to create a RendererViewHolder using the\ninformation given as parameter.\n\n@param viewGroup used to create the ViewHolder.\n@param viewType associated to the renderer.\n@return ViewHolder extension with the Renderer it has to use inside."
] |
public Integer getNodesPartitionIdForKey(int nodeId, final byte[] key) {
// this is all the partitions the key replicates to.
List<Integer> partitionIds = getReplicatingPartitionList(key);
for(Integer partitionId: partitionIds) {
// check which of the replicating partitions belongs to the node in
// question
if(getNodeIdForPartitionId(partitionId) == nodeId) {
return partitionId;
}
}
return null;
} | [
"Determines the partition ID that replicates the key on the given node.\n\n@param nodeId of the node\n@param key to look up.\n@return partitionId if found, otherwise null."
] | [
"Returns iterable containing assignments for this single legal hold policy.\nParameters can be used to filter retrieved assignments.\n@param type filter assignments of this type only.\nCan be \"file_version\", \"file\", \"folder\", \"user\" or null if no type filter is necessary.\n@param id filter assignments to this ID only. Can be null if no id filter is necessary.\n@param limit the limit of entries per page. Default limit is 100.\n@param fields the fields to retrieve.\n@return an iterable containing assignments for this single legal hold policy.",
"Returns the adapter position of the Parent associated with this ParentViewHolder\n\n@return The adapter position of the Parent if it still exists in the adapter.\nRecyclerView.NO_POSITION if item has been removed from the adapter,\nRecyclerView.Adapter.notifyDataSetChanged() has been called after the last\nlayout pass or the ViewHolder has already been recycled.",
"Records the list of backedup files into a text file\n\n@param filesInEnv\n@param backupDir",
"Set the group name\n\n@param name new name of server group\n@param id ID of group",
"Performs a put operation with the specified composite request object\n\n@param requestWrapper A composite request object containing the key and\nvalue\n@return Version of the value for the successful put",
"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",
"Groups the current element according to the value\n\n@param answer the map containing the results\n@param element the element to be placed\n@param value the value according to which the element will be placed\n@since 1.5.0",
"Returns iterable containing assignments for this single legal hold policy.\n@param fields the fields to retrieve.\n@return an iterable containing assignments for this single legal hold policy.",
"Sets top and bottom padding for all cells in the row.\n@param padding new padding for top and bottom, ignored if smaller than 0\n@return this to allow chaining"
] |
public static void writeBytes(byte[] bytes, long value, int offset, int numBytes) {
int shift = 0;
for(int i = offset + numBytes - 1; i >= offset; i--) {
bytes[i] = (byte) (0xFF & (value >> shift));
shift += 8;
}
} | [
"Write the given number of bytes out to the array\n\n@param bytes The array to write to\n@param value The value to write from\n@param offset the offset into the array\n@param numBytes The number of bytes to write"
] | [
"flushes log queue, this actually writes combined log message into system log",
"Check if values in the column \"property\" are written to the bundle descriptor.\n@param property the property id of the table column.\n@return a flag, indicating if values of the table column are stored to the bundle descriptor.",
"Set the serial pattern type.\n@param patternType the pattern type to set.",
"this class requires that the supplied enum is not fitting a\nCollection case for casting",
"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",
"Override this method to supply a custom splash screen image.\n\n@param gvrContext\nThe new {@link GVRContext}\n@return Texture to display\n\n@since 1.6.4",
"Delete all enabled overrides for a client\n\n@param profileId profile ID of teh client\n@param client_uuid UUID of teh client",
"Calculates Tangent value of the complex number.\n\n@param z1 A ComplexNumber instance.\n@return Returns new ComplexNumber instance containing the Tangent value of the specified complex number.",
"If this Aztec Code symbol is part of a series of Aztec Code symbols appended in a structured format,\nthis method sets the unique message ID for the series. Values may not contain spaces and must contain\nonly printable ASCII characters. Message IDs are optional.\n\n@param messageId the unique message ID for the series that this symbol is part of"
] |
private void writeCustomField(CustomField field) throws IOException
{
if (field.getAlias() != null)
{
m_writer.writeStartObject(null);
m_writer.writeNameValuePair("field_type_class", field.getFieldType().getFieldTypeClass().name().toLowerCase());
m_writer.writeNameValuePair("field_type", field.getFieldType().name().toLowerCase());
m_writer.writeNameValuePair("field_alias", field.getAlias());
m_writer.writeEndObject();
}
} | [
"Write attributes for an individual custom field.\nNote that at present we are only writing a subset of the\navailable data... in this instance the field alias.\nIf the field does not have an alias we won't write an\nentry.\n\n@param field custom field to write\n@throws IOException"
] | [
"Make a copy of JobContext of current thread\n@return the copy of current job context or an empty job context",
"Should the URI be cached?\n\n@param requestUri request URI\n@return true when caching is needed",
"Return the position of an element inside an array\n\n@param array the array where it looks for an element\n@param element the element to find in the array\n@param <T> the type of elements in the array\n@return the position of the element if it's found in the array, -1 otherwise",
"Sets the text alignment for all cells in the table.\n@param textAlignment new text alignment\n@throws NullPointerException if the argument was null\n@return this to allow chaining\n@throws {@link NullPointerException} if the argument was null",
"Returns the accrued interest of the bond for a given date.\n\n@param date The date of interest.\n@param model The model under which the product is valued.\n@return The accrued interest.",
"OR operation which takes 2 arguments and OR's them together.\n\n<p>\n<b>NOTE:</b> There is no guarantee of the order of the clauses that are generated in the final query.\n</p>\n<p>\n<b>NOTE:</b> I can't remove the generics code warning that can be associated with this method. You can instead\nuse the {@link #or(int)} method.\n</p>",
"Finds to a given point p the point on the spline with minimum distance.\n@param p Point where the nearest distance is searched for\n@param nPointsPerSegment Number of interpolation points between two support points\n@return Point spline which has the minimum distance to p",
"Convert the MSPDI representation of a UUID into a Java UUID instance.\n\n@param value MSPDI UUID\n@return Java UUID instance",
"This method determines whether the given date falls in the range of\ndates covered by this exception. Note that this method assumes that both\nthe start and end date of this exception have been set.\n\n@param date Date to be tested\n@return Boolean value"
] |
protected boolean equivalentClaims(Claim claim1, Claim claim2) {
return claim1.getMainSnak().equals(claim2.getMainSnak())
&& isSameSnakSet(claim1.getAllQualifiers(),
claim2.getAllQualifiers());
} | [
"Checks if two claims are equivalent in the sense that they have the same\nmain snak and the same qualifiers, but possibly in a different order.\n\n@param claim1\n@param claim2\n@return true if claims are equivalent"
] | [
"Reads each token from a single record and adds it to a list.\n\n@param tk tokenizer\n@param record list of tokens\n@throws IOException",
"Decode the String from Base64 into a byte array.\n\n@param value the string to be decoded\n@return the decoded bytes as an array\n@since 1.0",
"Create an error image should an error occur while fetching a WMS map.\n\n@param width image width\n@param height image height\n@param e exception\n@return error image\n@throws java.io.IOException oops",
"Store the given data and return a uuid for later retrieval of the data\n\n@param data\n@return unique id for the stored data",
"Convert this lattice to store data in the given convention.\nConversion involving receiver premium assumes zero wide collar.\n\n@param targetConvention The convention to store the data in.\n@param displacement The displacement to use, if applicable.\n@param model The model for context.\n\n@return The converted lattice.",
"Sets the set of language filters based on the given string.\n\n@param filters\ncomma-separates list of language codes, or \"-\" to filter all\nlanguages",
"Given a string which is either the name of a predefined tab configuration or a configuration string, returns\nthe corresponding tab configuration.\n\n@param configStr a configuration string or predefined configuration name\n\n@return the gallery tab configuration",
"Adds the specified serie column to the dataset with custom label expression.\n\n@param column the serie column\n@param labelExpression column the custom label expression",
"those could be incorporated with above, but that would blurry everything."
] |
private void addFoldersToSearchIn(final List<String> folders) {
if (null == folders) {
return;
}
for (String folder : folders) {
if (!CmsResource.isFolder(folder)) {
folder += "/";
}
m_foldersToSearchIn.add(folder);
}
} | [
"Adds folders to perform the search in.\n@param folders Folders to search in."
] | [
"Releases a database connection, and cleans up any resources\nassociated with that connection.",
"This handler will be triggered when there's no search result",
"Set the pointer on the bar. With the Value value.\n\n@param value float between 0 and 1",
"Set the color for each total for the column\n@param column the number of the column (starting from 1)\n@param color",
"Normalizes the matrix such that the Frobenius norm is equal to one.\n\n@param A The matrix that is to be normalized.",
"Print a class's relations",
"Returns iterable with all enterprise assignments of this retention policy.\n@param limit the limit of entries per response. The default value is 100.\n@param fields the fields to retrieve.\n@return an iterable containing all enterprise assignments.",
"Create a Task instance from a Phoenix activity.\n\n@param activity Phoenix activity data",
"Receive an expected number of bytes from the player, logging a warning if we get a different number of them.\n\n@param is the input stream associated with the player metadata socket.\n@param size the number of bytes we expect to receive.\n@param description the type of response being processed, for use in the warning message.\n@return the bytes read.\n\n@throws IOException if there is a problem reading the response."
] |
static void populateFileCreationRecord(Record record, ProjectProperties properties)
{
properties.setMpxProgramName(record.getString(0));
properties.setMpxFileVersion(FileVersion.getInstance(record.getString(1)));
properties.setMpxCodePage(record.getCodePage(2));
} | [
"Populate a file creation record.\n\n@param record MPX record\n@param properties project properties"
] | [
"A document that is paused no longer has remote updates applied to it.\nAny local updates to this document cause it to be resumed. An example of pausing a document\nis when a conflict is being resolved for that document and the handler throws an exception.\n\nThis method allows you to resume sync for a document.\n\n@param namespace namespace for the document\n@param documentId the id of the document to resume syncing\n@return true if successfully resumed, false if the document\ncould not be found or there was an error resuming",
"Ask the specified player for metadata about the track in the specified slot with the specified rekordbox ID,\nunless we have a metadata cache available for the specified media slot, in which case that will be used instead.\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\n@return the metadata, if any",
"Arbitrarily resolve the inconsistency by choosing the first object if\nthere is one.\n\n@param values The list of objects\n@return A single value, if one exists, taken from the input list.",
"Gets the index to use in the search.\n\n@return the index to use in the search",
"Iterates through the given CharSequence line by line, splitting each line using\nthe given separator Pattern. The list of tokens for each line is then passed to\nthe given closure.\n\n@param self a CharSequence\n@param pattern the regular expression Pattern for the delimiter\n@param closure a closure\n@return the last value returned by the closure\n@throws java.io.IOException if an error occurs\n@since 1.8.2",
"This version assumes relativeIndices array no longer needs to\nbe copied. Further it is assumed that it has already been\nchecked or assured by construction that relativeIndices\nis sorted.",
"Adds folders to perform the search in.\n@param folders Folders to search in.",
"Compares two annotated types and returns true if they are the same",
"Does not mutate the TestMatrix.\nVerifies that the test matrix contains all the required tests and that\neach required test is valid.\n\n@param testMatrix the {@link TestMatrixArtifact} to be verified.\n@param matrixSource a {@link String} of the source of proctor artifact. For example a path of proctor artifact file.\n@param requiredTests a {@link Map} of required test. The {@link TestSpecification} would be verified\n@param functionMapper a given el {@link FunctionMapper}\n@param providedContext a {@link Map} containing variables describing the context in which the request is executing. These will be supplied to verifying all rules.\n@param dynamicTests a {@link Set} of dynamic tests determined by filters.\n@return a {@link ProctorLoadResult} to describe the result of verification. It contains errors of verification and a list of missing test."
] |
static Shell createTelnetConsoleShell(String prompt, String appName,
ShellCommandHandler mainHandler, InputStream input, OutputStream output) {
try {
// Set up nvt4j; ignore the initial clear & reposition
final nvt4j.impl.Terminal nvt4jTerminal = new nvt4j.impl.Terminal(input, output) {
private boolean cleared;
private boolean moved;
@Override
public void clear() throws IOException {
if (this.cleared)
super.clear();
this.cleared = true;
}
@Override
public void move(int row, int col) throws IOException {
if (this.moved)
super.move(row, col);
this.moved = true;
}
};
nvt4jTerminal.put(nvt4j.impl.Terminal.AUTO_WRAP_ON);
nvt4jTerminal.setCursor(true);
// Have JLine do input & output through telnet terminal
final InputStream jlineInput = new InputStream() {
@Override
public int read() throws IOException {
return nvt4jTerminal.get();
}
};
final OutputStream jlineOutput = new OutputStream() {
@Override
public void write(int value) throws IOException {
nvt4jTerminal.put(value);
}
};
return createTerminalConsoleShell(prompt, appName, mainHandler, jlineInput, jlineOutput);
} catch (Exception e) {
// Failover: use default shell
BufferedReader in = new BufferedReader(new InputStreamReader(input));
PrintStream out = new PrintStream(output);
return createConsoleShell(prompt, appName, mainHandler, in, out, out, null);
}
} | [
"Facade method for operating the Telnet Shell supporting line editing and command\nhistory over a socket.\n\n@param prompt Prompt to be displayed\n@param appName The app name string\n@param mainHandler Main command handler\n@param input Input stream.\n@param output Output stream.\n@return Shell that can be either further customized or run directly by calling commandLoop()."
] | [
"Handles the file deletions.\n\n@param cms the CMS context to use\n@param toDelete the resources to delete\n\n@throws CmsException if something goes wrong",
"Adds the complex number with a scalar value.\n\n@param z1 Complex Number.\n@param scalar Scalar value.\n@return Returns new ComplexNumber instance containing the add of specified complex number with scalar value.",
"Method used as dynamical parameter converter",
"Matrix inverse for symmetric positive definite matrices. For small matrices an unrolled\ncholesky is used. Otherwise a standard decomposition.\n\n@see UnrolledCholesky_DDRM\n@see LinearSolverFactory_DDRM#chol(int)\n\n@param mat (Input) SPD matrix\n@param result (Output) Inverted matrix.\n@return true if it could invert the matrix false if it could not.",
"Set all unknown fields\n@param unknownFields the new unknown fields",
"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",
"Discards any tracks from the hot cache that were loaded from a now-unmounted media slot, because they are no\nlonger valid.",
"Get the filters ImporterServiceFilter and ImportDeclarationFilter from the properties, stop the instance if one of.\nthem is invalid.",
"Copy the contents of the given InputStream into a String.\nLeaves the stream open when done.\n@param in the InputStream to copy from\n@return the String that has been copied to\n@throws IOException in case of I/O errors"
] |
public PhotoList<Photo> getUntagged(int perPage, int page) throws FlickrException {
Map<String, Object> parameters = new HashMap<String, Object>();
parameters.put("method", METHOD_GET_UNTAGGED);
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;
} | [
"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"
] | [
"This method allows a resource assignment to be added to the\ncurrent task.\n\n@param resource the resource to assign\n@return ResourceAssignment object",
"Flush the network buffer and write all entries to the serve. then wait\nfor an ack from the server. This is a blocking call. It is invoked on\nevery Commit batch size of entries, It is also called on the close\nsession call\n\n@param storeNamesToCommit List of stores to be flushed and committed",
"Configure if you want this collapsible container to\naccordion its child elements or use expandable.",
"Creates a metadata cache archive file of all tracks in the specified slot on the specified player. Any\nprevious contents of the specified file will be replaced.\n\n@param slot the slot in which the media to be cached can be found\n@param playlistId the id of playlist to be cached, or 0 of all tracks should be cached\n@param cache the file into which the metadata cache should be written\n\n@throws Exception if there is a problem communicating with the player or writing the cache file.",
"Starts a background thread which calls the controller every\ncheck_interval milliseconds. Returns immediately, leaving the\nbackground thread running.",
"We want to get the best result possible as this value\nis used to determine what work needs to be recovered.\n\n@return",
"Parses a single query item for the query facet.\n@param item JSON object of the query item.\n@return the parsed query item, or <code>null</code> if parsing failed.",
"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.",
"Ask the specified player for a Folder menu for exploring its raw filesystem.\nThis is a request for unanalyzed items, so we do a typed menu request.\n\n@param slotReference the player and slot for which the menu is desired\n@param sortOrder the order in which responses should be sorted, 0 for default, see Section 6.11.1 of the\n<a href=\"https://github.com/Deep-Symmetry/dysentery/blob/master/doc/Analysis.pdf\">Packet Analysis\ndocument</a> for details\n@param folderId identifies the folder whose contents should be listed, use -1 to get the root folder\n\n@return the entries in the folder menu\n\n@throws Exception if there is a problem obtaining the menu"
] |
protected void handleRequestOut(T message) throws Fault {
String flowId = FlowIdHelper.getFlowId(message);
if (flowId == null
&& message.containsKey(PhaseInterceptorChain.PREVIOUS_MESSAGE)) {
// Web Service consumer is acting as an intermediary
@SuppressWarnings("unchecked")
WeakReference<Message> wrPreviousMessage = (WeakReference<Message>) message
.get(PhaseInterceptorChain.PREVIOUS_MESSAGE);
Message previousMessage = (Message) wrPreviousMessage.get();
flowId = FlowIdHelper.getFlowId(previousMessage);
if (flowId != null && LOG.isLoggable(Level.FINE)) {
LOG.fine("flowId '" + flowId + "' found in previous message");
}
}
if (flowId == null) {
// No flowId found. Generate one.
flowId = ContextUtils.generateUUID();
if (LOG.isLoggable(Level.FINE)) {
LOG.fine("Generate new flowId '" + flowId + "'");
}
}
FlowIdHelper.setFlowId(message, flowId);
} | [
"Handling out request.\n\n@param message\nthe message\n@throws Fault\nthe fault"
] | [
"Adds a metadata classification to the specified file.\n\n@param classificationType the metadata classification type.\n@return the metadata classification type added to the file.",
"Use this API to fetch all the sslservice resources that are configured on netscaler.",
"Mark the given child resource as the post run dependent of the parent of this collection.\n\n@param childResource the child resource",
"Returns the screen height in pixels\n\n@param context is the context to get the resources\n@return the screen height in pixels",
"Produces all tuples of size n chosen from a list of variable names\n\n@param variables the list of variable names to make tuples of\n@param nWise the size of the desired tuples\n@return all tuples of size nWise",
"If this address section is equivalent to the mask for a CIDR prefix block, it returns that prefix length.\nOtherwise, it returns null.\nA CIDR network mask is an address with all 1s in the network section and then all 0s in the host section.\nA CIDR host mask is an address with all 0s in the network section and then all 1s in the host section.\nThe prefix length is the length of the network section.\n\nAlso, keep in mind that the prefix length returned by this method is not equivalent to the prefix length used to construct this object.\nThe prefix length used to construct indicates the network and host section of this address.\nThe prefix length returned here indicates the whether the value of this address can be used as a mask for the network and host\nsection of any other address. Therefore the two values can be different values, or one can be null while the other is not.\n\nThis method applies only to the lower value of the range if this section represents multiple values.\n\n@param network whether to check for a network mask or a host mask\n@return the prefix length corresponding to this mask, or null if there is no such prefix length",
"Load the installation state based on the identity\n\n@param installedIdentity the installed identity\n@return the installation state\n@throws IOException",
"Calls the stored procedure stored procedure throws an\nerror if it doesn't exist.\n@param broker\n@param cld\n@param sequenceName\n@return\n@throws LookupException\n@throws SQLException",
"Guess whether given file is binary. Just checks for anything under 0x09."
] |
public Where<T, ID> not(Where<T, ID> comparison) {
addClause(new Not(pop("NOT")));
return this;
} | [
"Used to NOT the argument clause specified."
] | [
"Use this API to unset the properties of responderparam resource.\nProperties that need to be unset are specified in args array.",
"Reset the Where object so it can be re-used.",
"Use this API to fetch tmtrafficaction resource of given name .",
"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",
"Retrieves a specific range of child items in this folder.\n\n@param offset the index of the first child item to retrieve.\n@param limit the maximum number of children to retrieve after the offset.\n@param fields the fields to retrieve.\n@return a partial collection containing the specified range of child items.",
"Clear all beans and call the destruction callback.",
"Delete a module from Grapes server\n\n@param name\n@param version\n@throws GrapesCommunicationException\n@throws javax.naming.AuthenticationException",
"The CommandContext can be retrieved thatnks to the ExecutableBuilder.",
"creates a shape list containing all child shapes and set it to the\ncurrent shape new shape get added to the shape array\n@param shapes\n@param modelJSON\n@param current\n@throws org.json.JSONException"
] |
public static DMatrixRBlock transpose(DMatrixRBlock A , DMatrixRBlock A_tran )
{
if( A_tran != null ) {
if( A.numRows != A_tran.numCols || A.numCols != A_tran.numRows )
throw new IllegalArgumentException("Incompatible dimensions.");
if( A.blockLength != A_tran.blockLength )
throw new IllegalArgumentException("Incompatible block size.");
} else {
A_tran = new DMatrixRBlock(A.numCols,A.numRows,A.blockLength);
}
for( int i = 0; i < A.numRows; i += A.blockLength ) {
int blockHeight = Math.min( A.blockLength , A.numRows - i);
for( int j = 0; j < A.numCols; j += A.blockLength ) {
int blockWidth = Math.min( A.blockLength , A.numCols - j);
int indexA = i*A.numCols + blockHeight*j;
int indexC = j*A_tran.numCols + blockWidth*i;
transposeBlock( A , A_tran , indexA , indexC , blockWidth , blockHeight );
}
}
return A_tran;
} | [
"Transposes a block matrix.\n\n@param A Original matrix. Not modified.\n@param A_tran Transposed matrix. Modified."
] | [
"Shrinks the alert message body so that the resulting payload\nmessage fits within the passed expected payload length.\n\nThis method performs best-effort approach, and its behavior\nis unspecified when handling alerts where the payload\nwithout body is already longer than the permitted size, or\nif the break occurs within word.\n\n@param payloadLength the expected max size of the payload\n@param postfix for the truncated body, e.g. \"...\"\n@return this",
"Returns the compact tag records for all tags in the workspace.\n\n@param workspace The workspace or organization to find tags in.\n@return Request object",
"Read an element which contains only a single list attribute of a given\ntype, returning it as an array.\n@param reader the reader\n@param attributeName the attribute name, usually \"value\"\n@param type the value type class\n@param <T> the value type\n@return the value list as an array\n@throws javax.xml.stream.XMLStreamException if an error occurs or if the\nelement does not contain the specified attribute, contains other\nattributes, or contains child elements.",
"Record a content loader for a given patch id.\n\n@param patchID the patch id\n@param contentLoader the content loader",
"Converts a time in milliseconds to the appropriate x coordinate for drawing something at that time.\n\n@param milliseconds the time at which something should be drawn\n\n@return the component x coordinate at which it should be drawn",
"Finishes the current box - empties the text line buffer and creates a DOM element from it.",
"Check the given JWT\n\n@param jwtString the JSON Web Token\n@return the parsed and verified token or null if token is invalid\n@throws ParseException if the token cannot be parsed",
"Perform a post-boot scan to remove any deployments added during boot that failed to deploy properly.\nThis method isn't private solely to allow a unit test in the same package to call it.",
"Convert a collection of objects to a JSON array with the string representations of that objects.\n@param collection the collection of objects.\n@return the JSON array with the string representations."
] |
private void setAnimationProgress(float progress) {
if (isAlphaUsedForScale()) {
setColorViewAlpha((int) (progress * MAX_ALPHA));
} else {
ViewCompat.setScaleX(mCircleView, progress);
ViewCompat.setScaleY(mCircleView, progress);
}
} | [
"Pre API 11, this does an alpha animation.\n\n@param progress"
] | [
"Retrieve the finish slack.\n\n@return finish slack",
"This method is called on every reference that is in the .class file.\n@param typeReference\n@return",
"Splits up value into multiple versioned values\n\n@param value\n@return\n@throws IOException",
"Bessel function of order n.\n\n@param n Order.\n@param x Value.\n@return J value.",
"Get a log file and last relevant date, and check if the log file is relevant\n@param currentLogFile The log file\n@param lastRelevantDate The last date which files should be keeping since\n@return false if the file should be deleted, true if it does not.",
"Adds format information to eval.",
"Use this API to fetch snmpalarm resources of given names .",
"Obtains the collection of server groups defined for a profile\n\n@param model\n@param profileId\n@return\n@throws Exception",
"Create an error image.\n\n@param area The size of the image"
] |
public BoxFileUploadSessionPart uploadPart(InputStream stream, long offset, int partSize,
long totalSizeOfFile) {
URL uploadPartURL = this.sessionInfo.getSessionEndpoints().getUploadPartEndpoint();
BoxAPIRequest request = new BoxAPIRequest(this.getAPI(), uploadPartURL, HttpMethod.PUT);
request.addHeader(HttpHeaders.CONTENT_TYPE, ContentType.APPLICATION_OCTET_STREAM);
//Read the partSize bytes from the stream
byte[] bytes = new byte[partSize];
try {
stream.read(bytes);
} catch (IOException ioe) {
throw new BoxAPIException("Reading data from stream failed.", ioe);
}
return this.uploadPart(bytes, offset, partSize, totalSizeOfFile);
} | [
"Uploads chunk of a stream to an open upload session.\n@param stream the stream that is used to read the chunck using the offset and part size.\n@param offset the byte position where the chunk begins in the file.\n@param partSize the part size returned as part of the upload session instance creation.\nOnly the last chunk can have a lesser value.\n@param totalSizeOfFile The total size of the file being uploaded.\n@return the part instance that contains the part id, offset and part size."
] | [
"Parses the dictionary from an InputStream.\n\n@param client The SolrClient instance object.\n@param lang The language of the dictionary.\n@param is The InputStream object.\n@param documents List to put the assembled SolrInputObjects into.\n@param closeStream boolean flag that determines whether to close the inputstream\nor not.",
"Returns the adapter position of the Parent associated with this ParentViewHolder\n\n@return The adapter position of the Parent if it still exists in the adapter.\nRecyclerView.NO_POSITION if item has been removed from the adapter,\nRecyclerView.Adapter.notifyDataSetChanged() has been called after the last\nlayout pass or the ViewHolder has already been recycled.",
"This method returns the value of the product using a Black-Scholes model for the swap rate\nThe model is determined by a discount factor curve and a swap rate volatility.\n\n@param forwardCurve The forward curve on which to value the swap.\n@param swaprateVolatility The Black volatility.\n@return Value of this product",
"Add a Renderer instance as prototype.\n\n@param renderer to use as prototype.\n@return the current RendererBuilder instance.",
"Extracts baseline work from the MPP file for a specific baseline.\nReturns null if no baseline work is present, otherwise returns\na list of timephased work items.\n\n@param assignment parent assignment\n@param calendar baseline calendar\n@param normaliser normaliser associated with this data\n@param data timephased baseline work data block\n@param raw flag indicating if this data is to be treated as raw\n@return timephased work",
"Disables all the overrides for a specific profile\n\n@param model\n@param profileID\n@param clientUUID\n@return",
"Gets the uuid from response.\n\n@param myResponse\nthe my response\n@return the uuid from response",
"Returns the configured page sizes, or the default page size if no core is configured.\n@return The configured page sizes, or the default page size if no core is configured.",
"Writes all error responses to the client.\n\nTODO REST-Server 1. collect error stats\n\n@param messageEvent - for retrieving the channel details\n@param status - error code\n@param message - error message"
] |
public boolean overrides(Link other) {
if (other.getStatus() == LinkStatus.ASSERTED &&
status != LinkStatus.ASSERTED)
return false;
else if (status == LinkStatus.ASSERTED &&
other.getStatus() != LinkStatus.ASSERTED)
return true;
// the two links are from equivalent sources of information, so we
// believe the most recent
return timestamp > other.getTimestamp();
} | [
"Returns true if the information in this link should take\nprecedence over the information in the other link."
] | [
"Add an entry to the cache.\n@param key key to use.\n@param value access token information to store.",
"Updates the store definition object and the retention time based on the\nupdated store definition",
"Given a filesystem, path and buffer-size, read the file contents and\npresents it as a string\n\n@param fs Underlying filesystem\n@param path The file to read\n@param bufferSize The buffer size to use for reading\n@return The contents of the file as a string\n@throws IOException",
"Load an animation for the current avatar.\n@param animResource resource with the animation\n@param boneMap optional bone map to map animation skeleton to avatar",
"Gets information for a Box Storage Policy with optional fields.\n\n@param fields the fields to retrieve.\n@return info about this item containing only the specified fields, including storage policy.",
"Print an extended attribute date value.\n\n@param value date value\n@return string representation",
"Joins the given ints using the given separator into a single string.\n\n@return the joined string or an empty string if the int array is null",
"If there is a zero on the diagonal element, the off diagonal element needs pushed\noff so that all the algorithms assumptions are two and so that it can split the matrix.",
"Use this API to flush cachecontentgroup resources."
] |
public void cache(String key, Object obj, int expiration) {
H.Session session = this.session;
if (null != session) {
session.cache(key, obj, expiration);
} else {
app().cache().put(key, obj, expiration);
}
} | [
"Add an object into cache by key with expiration time specified\n\n@param key\nthe key to index the object within the cache\n@param obj\nthe object to be cached\n@param expiration\nthe seconds after which the object will be evicted from the cache"
] | [
"Use this API to save cachecontentgroup.",
"Set the menu's width in pixels.",
"Arbitrarily resolve the inconsistency by choosing the first object if\nthere is one.\n\n@param values The list of objects\n@return A single value, if one exists, taken from the input list.",
"Use this API to delete onlinkipv6prefix of given name.",
"Put new sequence object for given sequence name.\n@param sequenceName Name of the sequence.\n@param seq The sequence object to add.",
"Used to finish up pushing the bulge off the matrix.",
"Use this API to convert sslpkcs8.",
"Get the nearest scale.\n\n@param zoomLevels the list of Zoom Levels.\n@param tolerance the tolerance to use when considering if two values are equal. For example if\n12.0 == 12.001. The tolerance is a percentage.\n@param zoomLevelSnapStrategy the strategy to use for snapping to the nearest zoom level.\n@param geodetic snap to geodetic scales.\n@param paintArea the paint area of the map.\n@param dpi the DPI.",
"Groups the current element according to the value\n\n@param answer the map containing the results\n@param element the element to be placed\n@param value the value according to which the element will be placed\n@since 1.5.0"
] |
public Object getFieldByAlias(String alias)
{
return getCachedValue(getParentFile().getCustomFields().getFieldByAlias(FieldTypeClass.TASK, alias));
} | [
"Retrieve the value of a field using its alias.\n\n@param alias field alias\n@return field value"
] | [
"Write resource assignment workgroup.\n\n@param record resource assignment workgroup instance\n@throws IOException",
"Use this API to add cachepolicylabel.",
"return a prepared DELETE Statement fitting for the given ClassDescriptor",
"Sets the value associated with the given key; if the the key is one\nof the hashable keys, throws an exception.\n\n@throws HashableCoreMapException Attempting to set the value for an\nimmutable, hashable key.",
"Internally undo recorded changes we did so far.\n\n@return whether the state required undo actions",
"Returns an iterator over the items in the trash.\n@return an iterator over the items in the trash.",
"Removes the given key with its associated element from the receiver, if present.\n\n@param key the key to be removed from the receiver.\n@return <tt>true</tt> if the receiver contained the specified key, <tt>false</tt> otherwise.",
"Build a standard-format UDP packet for sending to port 50001 or 50002 in the protocol.\n\n@param type the type of packet to create.\n@param deviceName the 0x14 (twenty) bytes of the device name to send in the packet.\n@param payload the remaining bytes which come after the device name.\n@return the packet to send.",
"Calculate start dates for a monthly relative recurrence.\n\n@param calendar current date\n@param frequency frequency\n@param dates array of start dates"
] |
public Info getInfo() {
BoxAPIConnection api = this.getAPI();
URL url = COLLABORATION_URL_TEMPLATE.build(api.getBaseURL(), this.getID());
BoxAPIRequest request = new BoxAPIRequest(api, url, "GET");
BoxJSONResponse response = (BoxJSONResponse) request.send();
JsonObject jsonObject = JsonObject.readFrom(response.getJSON());
return new Info(jsonObject);
} | [
"Gets information about this collaboration.\n\n@return info about this collaboration."
] | [
"Check if all cluster objects in the list are congruent.\n\n@param clusterUrls of cluster objects\n@return",
"Sets the response context.\n\n@param responseContext\nthe response context\n@return the parallel task builder",
"Detect bad xml 1.0 characters\n\n@param c to detect\n@return true if specified character valid, false otherwise",
"If this represents an ip address, returns that address.\nIf this represents a host, returns the resolved ip address of that host.\nOtherwise, returns null, but only for strings that are considered valid address strings but cannot be converted to address objects.\n\nThis method will throw exceptions for invalid formats and failures to resolve the address. The equivalent method {@link #getAddress()} will simply return null rather than throw those exceptions.\n\nIf you wish to get the represented address and avoid DNS resolution, use {@link #asAddress()} or {@link #asAddressString()}\n\n@return",
"Calculate start dates for a monthly relative recurrence.\n\n@param calendar current date\n@param frequency frequency\n@param dates array of start dates",
"Loads a CRF classifier from an InputStream, and returns it. This method\ndoes not buffer the InputStream, so you should have buffered it before\ncalling this method.\n\n@param in\nInputStream to load classifier from\n@return The CRF classifier\n\n@throws IOException\nIf there are problems accessing the input stream\n@throws ClassCastException\nIf there are problems interpreting the serialized data\n@throws ClassNotFoundException\nIf there are problems interpreting the serialized data",
"Use this API to fetch tmtrafficpolicy_tmglobal_binding resources of given name .",
"Quits server by closing server socket and closing client socket handlers.",
"Inflate the main layout used to render videos in the list view.\n\n@param inflater LayoutInflater service to inflate.\n@param parent ViewGroup used to inflate xml.\n@return view inflated."
] |
public Plugin[] getPlugins(Boolean onlyValid) {
Configuration[] configurations = ConfigurationService.getInstance().getConfigurations(Constants.DB_TABLE_CONFIGURATION_PLUGIN_PATH);
ArrayList<Plugin> plugins = new ArrayList<Plugin>();
if (configurations == null) {
return new Plugin[0];
}
for (Configuration config : configurations) {
Plugin plugin = new Plugin();
plugin.setId(config.getId());
plugin.setPath(config.getValue());
File path = new File(plugin.getPath());
if (path.isDirectory()) {
plugin.setStatus(Constants.PLUGIN_STATUS_VALID);
plugin.setStatusMessage("Valid");
} else {
plugin.setStatus(Constants.PLUGIN_STATUS_NOT_DIRECTORY);
plugin.setStatusMessage("Path is not a directory");
}
if (!onlyValid || plugin.getStatus() == Constants.PLUGIN_STATUS_VALID) {
plugins.add(plugin);
}
}
return plugins.toArray(new Plugin[0]);
} | [
"Returns the data about all of the plugins that are set\n\n@param onlyValid True to get only valid plugins, False for all\n@return array of Plugins set"
] | [
"Gets the uuid from response.\n\n@param myResponse\nthe my response\n@return the uuid from response",
"Extract calendar data from the file.\n\n@throws SQLException",
"Adds a Statement.\n\n@param rank\nrank of the statement\n@param subject\nrdf resource that refers to the statement",
"Say whether this character is an annotation introducing\ncharacter.\n\n@param ch The character to check\n@return Whether it is an annotation introducing character",
"Retrieves the content of the filename. Also reads from JAR Searches for the resource in the\nroot folder in the jar\n\n@param fileName Filename.\n@return The contents of the file.\n@throws IOException On error.",
"Load the avatar base model\n@param avatarResource resource with avatar model",
"Set the mbean server on the QueryExp and try and pass back any previously set one",
"Checks to see if a standalone server is running.\n\n@param client the client used to communicate with the server\n\n@return {@code true} if the server is running, otherwise {@code false}",
"Answer the TableAlias for aPath or aUserAlias\n@param aPath\n@param aUserAlias\n@param hintClasses\n@return TableAlias, null if none"
] |
public void setCustomRequest(int pathId, String customRequest, String clientUUID) {
PreparedStatement statement = null;
try (Connection sqlConnection = sqlService.getConnection()) {
int profileId = EditService.getProfileIdFromPathID(pathId);
statement = sqlConnection.prepareStatement(
"UPDATE " + Constants.DB_TABLE_REQUEST_RESPONSE +
" SET " + Constants.REQUEST_RESPONSE_CUSTOM_REQUEST + "= ?" +
" WHERE " + Constants.GENERIC_PROFILE_ID + "= ?" +
" AND " + Constants.GENERIC_CLIENT_UUID + "= ?" +
" AND " + Constants.REQUEST_RESPONSE_PATH_ID + "= ?"
);
statement.setString(1, customRequest);
statement.setInt(2, profileId);
statement.setString(3, clientUUID);
statement.setInt(4, pathId);
statement.executeUpdate();
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
if (statement != null) {
statement.close();
}
} catch (Exception e) {
}
}
} | [
"Set the value for a custom request\n\n@param pathId ID of path\n@param customRequest value of custom request\n@param clientUUID UUID of client"
] | [
"Use this API to fetch a appfwglobal_auditnslogpolicy_binding resources.",
"Adds format information to eval.",
"Set the named arguments.\n\n@param vars\nthe new named arguments",
"This method returns an array containing all of the unique identifiers\nfor which data has been stored in the Var2Data block.\n\n@return array of unique identifiers",
"Given a string with the scenario or story name, creates a Class Name with\nno spaces and first letter capital\n\n@param String\n- The name of the scenario/story. It should be in lower case.\n@returns String - The class name",
"Convert a Planner date-time value into a Java date.\n\n20070222T080000Z\n\n@param value Planner date-time\n@return Java Date instance",
"Send the started notification",
"Checks if request is intended for Gerrit host.",
"Checks the given class descriptor.\n\n@param classDef The class descriptor\n@param checkLevel The amount of checks to perform\n@exception ConstraintException If a constraint has been violated"
] |
private void complete(final InstallationManager.InstallationModification modification, final FinalizeCallback callback) {
final List<File> processed = new ArrayList<File>();
List<File> reenabled = Collections.emptyList();
List<File> disabled = Collections.emptyList();
try {
try {
// Update the state to invalidate and process module resources
if (stateUpdater.compareAndSet(this, State.PREPARED, State.INVALIDATE)) {
if (mode == PatchingTaskContext.Mode.APPLY) {
// Only invalidate modules when applying patches; on rollback files are immediately restored
for (final File invalidation : moduleInvalidations) {
processed.add(invalidation);
PatchModuleInvalidationUtils.processFile(this, invalidation, mode);
}
if (!modulesToReenable.isEmpty()) {
reenabled = new ArrayList<File>(modulesToReenable.size());
for (final File path : modulesToReenable) {
reenabled.add(path);
PatchModuleInvalidationUtils.processFile(this, path, PatchingTaskContext.Mode.ROLLBACK);
}
}
} else if(mode == PatchingTaskContext.Mode.ROLLBACK) {
if (!modulesToDisable.isEmpty()) {
disabled = new ArrayList<File>(modulesToDisable.size());
for (final File path : modulesToDisable) {
disabled.add(path);
PatchModuleInvalidationUtils.processFile(this, path, PatchingTaskContext.Mode.APPLY);
}
}
}
}
modification.complete();
callback.completed(this);
state = State.COMPLETED;
} catch (Exception e) {
this.moduleInvalidations.clear();
this.moduleInvalidations.addAll(processed);
this.modulesToReenable.clear();
this.modulesToReenable.addAll(reenabled);
this.modulesToDisable.clear();
this.moduleInvalidations.addAll(disabled);
throw new RuntimeException(e);
}
} finally {
if (state != State.COMPLETED) {
try {
modification.cancel();
} finally {
try {
undoChanges();
} finally {
callback.operationCancelled(this);
}
}
} else {
try {
if (checkForGarbageOnRestart) {
final File cleanupMarker = new File(installedImage.getInstallationMetadata(), "cleanup-patching-dirs");
cleanupMarker.createNewFile();
}
storeFailedRenaming();
} catch (IOException e) {
PatchLogger.ROOT_LOGGER.debugf(e, "failed to create cleanup marker");
}
}
}
} | [
"Complete the current operation and persist the current state to the disk. This will also trigger the invalidation\nof outdated modules.\n\n@param modification the current modification\n@param callback the completion callback"
] | [
"Write a comma to the output stream if required.",
"return currently-loaded Proctor instance, throwing IllegalStateException if not loaded",
"Get a property as a json array or default.\n\n@param key the property name\n@param defaultValue default",
"Notifies that multiple header items are inserted.\n\n@param positionStart the position.\n@param itemCount the item count.",
"Determine the enum value corresponding to the third play state found in the packet.\n\n@return the proper value",
"Use this API to fetch authenticationvserver_authenticationlocalpolicy_binding resources of given name .",
"Use this API to add clusterinstance.",
"Uses getResult to get the final Result and executes it\n\n@throws ConfigurationException\nIf not result can be found with the returned code",
"Adds a set of tests based on pattern matching."
] |
private void processCalendar(MapRow row)
{
ProjectCalendar calendar = m_project.addCalendar();
Map<UUID, List<DateRange>> dayTypeMap = processDayTypes(row.getRows("DAY_TYPES"));
calendar.setName(row.getString("NAME"));
processRanges(dayTypeMap.get(row.getUUID("SUNDAY_DAY_TYPE")), calendar.addCalendarHours(Day.SUNDAY));
processRanges(dayTypeMap.get(row.getUUID("MONDAY_DAY_TYPE")), calendar.addCalendarHours(Day.MONDAY));
processRanges(dayTypeMap.get(row.getUUID("TUESDAY_DAY_TYPE")), calendar.addCalendarHours(Day.TUESDAY));
processRanges(dayTypeMap.get(row.getUUID("WEDNESDAY_DAY_TYPE")), calendar.addCalendarHours(Day.WEDNESDAY));
processRanges(dayTypeMap.get(row.getUUID("THURSDAY_DAY_TYPE")), calendar.addCalendarHours(Day.THURSDAY));
processRanges(dayTypeMap.get(row.getUUID("FRIDAY_DAY_TYPE")), calendar.addCalendarHours(Day.FRIDAY));
processRanges(dayTypeMap.get(row.getUUID("SATURDAY_DAY_TYPE")), calendar.addCalendarHours(Day.SATURDAY));
for (MapRow assignment : row.getRows("DAY_TYPE_ASSIGNMENTS"))
{
Date date = assignment.getDate("DATE");
processRanges(dayTypeMap.get(assignment.getUUID("DAY_TYPE_UUID")), calendar.addCalendarException(date, date));
}
m_calendarMap.put(row.getUUID("UUID"), calendar);
} | [
"Extract data for a single calendar.\n\n@param row calendar data"
] | [
"Handle interval change.\n@param event the change event.",
"Computes either the vector p-norm or the induced matrix p-norm depending on A\nbeing a vector or a matrix respectively.\n\n@param A Vector or matrix whose norm is to be computed.\n@param p The p value of the p-norm.\n@return The computed norm.",
"Returns the configuration value with the specified name.",
"Returns the names of the bundles configured as workplace bundles in any module configuration.\n@return the names of the bundles configured as workplace bundles in any module configuration.",
"Returns the master mode's editor state for editing a bundle with descriptor.\n@return the master mode's editor state for editing a bundle with descriptor.",
"Use this API to add policydataset.",
"Tests whether the given string is the name of a java.lang type.",
"Apply the necessary rotation to the transform so that it is in front of\nthe camera.\n\n@param transform The transform to modify.",
"Recursively inspects the given objects and returns a node representing their differences. Both objects\nhave be have the same type.\n\n@param working This object will be treated as the successor of the `base` object.\n@param base This object will be treated as the predecessor of the <code>working</code> object.\n@return A node representing the differences between the given objects."
] |
@Override
@SuppressWarnings("unchecked")
public ChronoLocalDateTime<EthiopicDate> localDateTime(TemporalAccessor temporal) {
return (ChronoLocalDateTime<EthiopicDate>) super.localDateTime(temporal);
} | [
"Obtains a Ethiopic local date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the Ethiopic local date-time, not null\n@throws DateTimeException if unable to create the date-time"
] | [
"Creates a descriptor for the currently edited message bundle.\n@return <code>true</code> if the descriptor could be created, <code>false</code> otherwise.",
"Join the Collection of Strings using the specified delimiter.\n\n@param s\nThe String collection\n@param delimiter\nThe delimiter String\n@return The joined String",
"Reads a string from input stream saved as a sequence of UTF chunks.\n\n@param stream stream to read from.\n@return output string\n@throws IOException if something went wrong",
"Record a device announcement in the devices map, so we know whe saw it.\n\n@param announcement the announcement to be recorded",
"OJB can handle only classes that declare at least one primary key attribute,\nthis method checks this condition.\n\n@param realObject The real object to check\n@throws ClassNotPersistenceCapableException thrown if no primary key is specified for the objects class",
"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",
"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 ℜ <sup>m × p</sup>. Not modified.\n@param X A matrix ℜ <sup>n × p</sup>, where the solution is written to. Modified.",
"Answer the counted size\n\n@return int",
"If this Aztec Code symbol is part of a series of Aztec Code symbols appended in a structured format,\nthis method sets the unique message ID for the series. Values may not contain spaces and must contain\nonly printable ASCII characters. Message IDs are optional.\n\n@param messageId the unique message ID for the series that this symbol is part of"
] |
public void processSplitData(Task task, List<TimephasedWork> timephasedComplete, List<TimephasedWork> timephasedPlanned)
{
Date splitsComplete = null;
TimephasedWork lastComplete = null;
TimephasedWork firstPlanned = null;
if (!timephasedComplete.isEmpty())
{
lastComplete = timephasedComplete.get(timephasedComplete.size() - 1);
splitsComplete = lastComplete.getFinish();
}
if (!timephasedPlanned.isEmpty())
{
firstPlanned = timephasedPlanned.get(0);
}
LinkedList<DateRange> splits = new LinkedList<DateRange>();
TimephasedWork lastAssignment = null;
DateRange lastRange = null;
for (TimephasedWork assignment : timephasedComplete)
{
if (lastAssignment != null && lastRange != null && lastAssignment.getTotalAmount().getDuration() != 0 && assignment.getTotalAmount().getDuration() != 0)
{
splits.removeLast();
lastRange = new DateRange(lastRange.getStart(), assignment.getFinish());
}
else
{
lastRange = new DateRange(assignment.getStart(), assignment.getFinish());
}
splits.add(lastRange);
lastAssignment = assignment;
}
//
// We may not have a split, we may just have a partially
// complete split.
//
Date splitStart = null;
if (lastComplete != null && firstPlanned != null && lastComplete.getTotalAmount().getDuration() != 0 && firstPlanned.getTotalAmount().getDuration() != 0)
{
lastRange = splits.removeLast();
splitStart = lastRange.getStart();
}
lastAssignment = null;
lastRange = null;
for (TimephasedWork assignment : timephasedPlanned)
{
if (splitStart == null)
{
if (lastAssignment != null && lastRange != null && lastAssignment.getTotalAmount().getDuration() != 0 && assignment.getTotalAmount().getDuration() != 0)
{
splits.removeLast();
lastRange = new DateRange(lastRange.getStart(), assignment.getFinish());
}
else
{
lastRange = new DateRange(assignment.getStart(), assignment.getFinish());
}
}
else
{
lastRange = new DateRange(splitStart, assignment.getFinish());
}
splits.add(lastRange);
splitStart = null;
lastAssignment = assignment;
}
//
// We must have a minimum of 3 entries for this to be a valid split task
//
if (splits.size() > 2)
{
task.getSplits().addAll(splits);
task.setSplitCompleteDuration(splitsComplete);
}
else
{
task.setSplits(null);
task.setSplitCompleteDuration(null);
}
} | [
"Process the timephased resource assignment data to work out the\nsplit structure of the task.\n\n@param task parent task\n@param timephasedComplete completed resource assignment work\n@param timephasedPlanned planned resource assignment work"
] | [
"Execute all recorded tasks.\n\n@param context the patch context\n@param callback the finalization callback\n@throws Exception",
"Returns a source excerpt of the type parameters of this type, including angle brackets.\nAlways an empty string if the type class is not generic.\n\n<p>e.g. {@code <N, C>}",
"This method lists all resource assignments defined in the file.\n\n@param file MPX file",
"Adds an additional alias to the constructed document.\n\n@param text\nthe text of the alias\n@param languageCode\nthe language code of the alias\n@return builder object to continue construction",
"Gets whether the given server can be updated.\n\n@param server the id of the server. Cannot be <code>null</code>\n\n@return <code>true</code> if the server can be updated; <code>false</code>\nif the update should be cancelled\n\n@throws IllegalStateException if this policy is not expecting a request\nto update the given server",
"This method is called to alert project listeners to the fact that\na task has been written to a project file.\n\n@param task task instance",
"Get the deferred flag. Exchange rates can be deferred or real.time.\n\n@return the deferred flag, or {code null}.",
"Adds the position.\n\n@param position the position",
"Finds to a given point p the point on the spline with minimum distance.\n@param p Point where the nearest distance is searched for\n@param nPointsPerSegment Number of interpolation points between two support points\n@return Point spline which has the minimum distance to p"
] |
public static final Integer parseInteger(String value)
{
return (value == null || value.length() == 0 ? null : Integer.valueOf(Integer.parseInt(value)));
} | [
"Utility method to convert a String to an Integer, and\nhandles null values.\n\n@param value string representation of an integer\n@return int value"
] | [
"Convert weekly recurrence days into a bit field.\n\n@param task recurring task\n@return bit field as a string",
"This method takes the textual version of an accrue type name\nand populates the class instance appropriately. Note that unrecognised\nvalues are treated as \"Prorated\".\n\n@param type text version of the accrue type\n@param locale target locale\n@return AccrueType class instance",
"Use this API to add gslbsite.",
"Invalidate the item in layout\n@param dataIndex data index",
"checkpoint the transaction",
"Gets the index of the specified value.\n\n@param value the value of the item to be found\n@return the index of the value",
"Closes the JDBC statement and its associated connection.",
"Optional operations to do before the multiple-threads start indexing\n\n@param backend",
"Gets all data set values.\n\n@param dataSet\nIIM record and dataset code (See constants in {@link IIM})\n@return data set value\n@throws SerializationException\nif value can't be deserialized from binary representation"
] |
public void setGlobal(int pathId, Boolean global) {
PreparedStatement statement = null;
try (Connection sqlConnection = sqlService.getConnection()) {
statement = sqlConnection.prepareStatement(
"UPDATE " + Constants.DB_TABLE_PATH +
" SET " + Constants.PATH_PROFILE_GLOBAL + " = ? " +
" WHERE " + Constants.GENERIC_ID + " = ?"
);
statement.setBoolean(1, global);
statement.setInt(2, pathId);
statement.executeUpdate();
} catch (SQLException e) {
e.printStackTrace();
} finally {
try {
if (statement != null) {
statement.close();
}
} catch (Exception e) {
}
}
} | [
"Sets the global setting for this ID\n\n@param pathId ID of path\n@param global True if global, False otherwise"
] | [
"Return true if the AST expression has not already been visited. If it is\nthe first visit, register the expression so that the next visit will return false.\n\n@param expression - the AST expression to check\n@return true if the AST expression has NOT already been visited",
"Read FTS file data from the configured source and return a populated ProjectFile instance.\n\n@return ProjectFile instance",
"This adds database table configurations to the internal cache which can be used to speed up DAO construction.\nThis is especially true of Android and other mobile platforms.",
"Populates a relation list.\n\n@param task parent task\n@param field target task field\n@param data MPX relation list data",
"Create a unique signature for this shader.\nThe signature for simple shaders is just the class name.\nFor the more complex shaders generated by GVRShaderTemplate\nthe signature includes information about the vertex attributes,\nuniforms, textures and lights used by the shader variant.\n\n@param defined\nnames to be defined for this shader\n@return string signature for shader\n@see GVRShaderTemplate",
"Use this API to fetch onlinkipv6prefix resource of given name .",
"Use this API to diff nsconfig.",
"Sets left and right padding for all cells in the table.\n@param padding new padding for left and right, ignored if smaller than 0\n@return this to allow chaining",
"Gets the boxed type of a class\n\n@param type The type\n@return The boxed type"
] |
@Override
synchronized public V put(K key, V value) {
V oldValue = this.get(key);
try {
super.put(key, value);
writeBack(key, value);
return oldValue;
} catch(Exception e) {
super.put(key, oldValue);
writeBack(key, oldValue);
throw new VoldemortException("Failed to put(" + key + ", " + value
+ ") in write through cache", e);
}
} | [
"Updates the value in HashMap and writeBack as Atomic step"
] | [
"read broker info for watching topics\n\n@param zkClient the zookeeper client\n@param topics topic names\n@return topic->(brokerid-0,brokerid-1...brokerid2-0,brokerid2-1...)",
"Retrieve a work field.\n\n@param type field type\n@return Duration instance",
"Returns an array of all declared fields in the given class and all\nsuper-classes.",
"Create a new Time, with no date component.",
"called when we are completed finished with using the TcpChannelHub",
"Assigns this retention policy to folder.\n@param folder the folder to assign policy to.\n@return info about created assignment.",
"Attempts to insert a colon so that a value without a colon can\nbe parsed.",
"If the String argument defaultLocatorSelectionStrategy is as key in the map representing the locatorSelectionStrategies, the\ncorresponding strategy is selected and set as default strategy, else both the selected strategy and the default strategy remain\nunchanged.\n@param defaultLocatorSelectionStrategy",
"Toggle between single events and series.\n@param isSeries flag, indicating if we want a series of events."
] |
public static Diagram parseJson(String json,
Boolean keepGlossaryLink) throws JSONException {
JSONObject modelJSON = new JSONObject(json);
return parseJson(modelJSON,
keepGlossaryLink);
} | [
"Parse the json string to the diagram model, assumes that the json is\nhierarchical ordered\n@param json\n@return Model with all shapes defined in JSON\n@throws org.json.JSONException"
] | [
"Associate the batched Children with their owner object.\nLoop over owners",
"Log a warning for the resource at the provided address and the given attributes. 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 attributes attributes we are warning about",
"To be used with AutoText class constants ALIGMENT_LEFT, ALIGMENT_CENTER and ALIGMENT_RIGHT\n@param aligment\n@return",
"Locates the services in the context classloader of the current thread.\n\n@param serviceType the type of the services to locate\n@param <X> the type of the service\n@return the service type loader",
"Use this API to fetch all the responderpolicy resources that are configured on netscaler.",
"Converts the string of given content to an input stream.\n\n@param content the string content.\n@param charset the charset for conversion.\n@return the stream (should be closed by invoker).",
"If status is in failed state then throw CloudException.",
"Uses the iterator to run through the dao and retain only the items that are in the passed in collection. This\nwill remove the items from the associated database table as well.\n\n@return Returns true of the collection was changed at all otherwise false.",
"Returns the ViewGroup used as a parent for the content view.\n\n@return The content view's parent."
] |
public Photoset create(String title, String description, String primaryPhotoId) throws FlickrException {
Map<String, Object> parameters = new HashMap<String, Object>();
parameters.put("method", METHOD_CREATE);
parameters.put("title", title);
parameters.put("description", description);
parameters.put("primary_photo_id", primaryPhotoId);
Response response = transportAPI.post(transportAPI.getPath(), parameters, apiKey, sharedSecret);
if (response.isError()) {
throw new FlickrException(response.getErrorCode(), response.getErrorMessage());
}
Element photosetElement = response.getPayload();
Photoset photoset = new Photoset();
photoset.setId(photosetElement.getAttribute("id"));
photoset.setUrl(photosetElement.getAttribute("url"));
return photoset;
} | [
"Create a new photoset.\n\n@param title\nThe photoset title\n@param description\nThe photoset description\n@param primaryPhotoId\nThe primary photo id\n@return The new Photset\n@throws FlickrException"
] | [
"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",
"Get the waveform previews available for all tracks currently loaded in any player, either on the play deck, or\nin a hot cue.\n\n@return the previews associated with all current players, including for any tracks loaded in their hot cue slots\n\n@throws IllegalStateException if the WaveformFinder is not running",
"Unmarshals the descriptor content.\n\n@throws CmsXmlException thrown if the XML structure of the descriptor is wrong.\n@throws CmsException thrown if reading the descriptor file fails.",
"Checks if a given number is in the range of a float.\n\n@param number\na number which should be in the range of a float (positive or negative)\n\n@see java.lang.Float#MIN_VALUE\n@see java.lang.Float#MAX_VALUE\n\n@return number as a float",
"Returns this bar code's pattern, converted into a set of corresponding codewords.\nUseful for bar codes that encode their content as a pattern.\n\n@param size the number of digits in each codeword\n@return this bar code's pattern, converted into a set of corresponding codewords",
"Given a HTTPResponce, process it, throwing an error if needed and return a Token for the next\nrequest.",
"Computes the product of the diagonal elements. For a diagonal or triangular\nmatrix this is the determinant.\n\n@param T A matrix.\n@return product of the diagonal elements.",
"Extract the parameters from a method using the Jmx annotation if present,\nor just the raw types otherwise\n\n@param m The method to extract parameters from\n@return An array of parameter infos",
"Generate a currency format.\n\n@param position currency symbol position\n@return currency format"
] |
public static boolean isSinglePositionPrefix(FieldInfo fieldInfo,
String prefix) throws IOException {
if (fieldInfo == null) {
throw new IOException("no fieldInfo");
} else {
String info = fieldInfo.getAttribute(
MtasCodecPostingsFormat.MTAS_FIELDINFO_ATTRIBUTE_PREFIX_SINGLE_POSITION);
if (info == null) {
throw new IOException("no "
+ MtasCodecPostingsFormat.MTAS_FIELDINFO_ATTRIBUTE_PREFIX_SINGLE_POSITION);
} else {
return Arrays.asList(info.split(Pattern.quote(MtasToken.DELIMITER)))
.contains(prefix);
}
}
} | [
"Checks if is single position prefix.\n\n@param fieldInfo\nthe field info\n@param prefix\nthe prefix\n@return true, if is single position prefix\n@throws IOException\nSignals that an I/O exception has occurred."
] | [
"Sets the specified integer attribute to the specified value.\n\n@param name name of the attribute\n@param value value of the attribute\n@since 1.9.0",
"Initializes the persistence strategy to be used when accessing the datastore. In particular, all the required\ncaches will be configured and initialized.\n\n@param cacheMappingType the {@link org.hibernate.ogm.datastore.keyvalue.options.CacheMappingType} to be used\n@param entityTypes meta-data of all the entity types registered with the current session factory\n@param associationTypes meta-data of all the association types registered with the current session factory\n@param idSourceTypes meta-data of all the id source types registered with the current session factory\n@param namespaces from the database currently in use",
"This is the profiles page. this is the 'regular' page when the url is typed in",
"This only gets half of the EnabledEndpoint from a JDBC ResultSet\nGetting the method for the override id requires an additional SQL query and needs to be called after\nthe SQL connection is released\n\n@param result result to scan for endpoint\n@return EnabledEndpoint\n@throws Exception exception",
"Update the given resource in the persistent configuration model based on the values in the given operation.\n\n@param operation the operation\n@param resource the resource that corresponds to the address of {@code operation}\n\n@throws OperationFailedException if {@code operation} is invalid or populating the model otherwise fails",
"Sets the maximum time to wait before a call to getConnection is timed out.\n\nSetting this to zero is similar to setting it to Long.MAX_VALUE\n\n@param connectionTimeout\n@param timeUnit the unit of the connectionTimeout argument",
"Get the list of supported resolutions for the layer. Each resolution is specified in map units per pixel.\n\n@return list of supported resolutions\n@deprecated use {@link #getZoomLevels()}",
"return a HashMap with all properties, name as key, value as value\n@return the properties",
"Visits a method instruction. A method instruction is an instruction that\ninvokes a method.\n\n@param opcode\nthe opcode of the type instruction to be visited. This opcode\nis either INVOKEVIRTUAL, INVOKESPECIAL, INVOKESTATIC or\nINVOKEINTERFACE.\n@param owner\nthe internal name of the method's owner class (see\n{@link Type#getInternalName() getInternalName}).\n@param name\nthe method's name.\n@param desc\nthe method's descriptor (see {@link Type Type}).\n@param itf\nif the method's owner class is an interface."
] |
protected Element createLineElement(float x1, float y1, float x2, float y2)
{
HtmlDivLine line = new HtmlDivLine(x1, y1, x2, y2);
String color = colorString(getGraphicsState().getStrokingColor());
StringBuilder pstyle = new StringBuilder(50);
pstyle.append("left:").append(style.formatLength(line.getLeft())).append(';');
pstyle.append("top:").append(style.formatLength(line.getTop())).append(';');
pstyle.append("width:").append(style.formatLength(line.getWidth())).append(';');
pstyle.append("height:").append(style.formatLength(line.getHeight())).append(';');
pstyle.append(line.getBorderSide()).append(':').append(style.formatLength(line.getLineStrokeWidth())).append(" solid ").append(color).append(';');
if (line.getAngleDegrees() != 0)
pstyle.append("transform:").append("rotate(").append(line.getAngleDegrees()).append("deg);");
Element el = doc.createElement("div");
el.setAttribute("class", "r");
el.setAttribute("style", pstyle.toString());
el.appendChild(doc.createEntityReference("nbsp"));
return el;
} | [
"Create an element that represents a horizntal or vertical line.\n@param x1\n@param y1\n@param x2\n@param y2\n@return the created DOM element"
] | [
"Throws an IllegalStateException when the given value is not null.\n@return the value",
"Restore the recorded state from the rollback xml.\n\n@param target the patchable target\n@param rollbackPatchId the rollback patch id\n@param patchType the the current patch type\n@param history the recorded history\n@throws PatchingException",
"Method used to write the name of the scenarios\n\n@param word\n@return the same word starting with capital letter",
"Retrieves the cost rate table entry active on a given date.\n\n@param date target date\n@return cost rate table entry",
"delete topic never used\n\n@param topic topic name\n@param password password\n@return number of partitions deleted\n@throws IOException if an I/O error",
"Print a time value.\n\n@param value time value\n@return time value",
"Request a database sends a list of UUIDs.\n\n@param count The count of UUIDs.",
"Add key value pair to extra info\n\n@param key Key of new item\n@param value New value to add",
"Use this API to rename a responderpolicy resource."
] |
Subsets and Splits