query
stringlengths 74
6.1k
| positive
sequencelengths 1
1
| negative
sequencelengths 9
9
|
---|---|---|
public void enable(ConduitSelectorHolder conduitSelectorHolder, SLPropertiesMatcher matcher,
String selectionStrategy) {
LocatorTargetSelector selector = new LocatorTargetSelector();
selector.setEndpoint(conduitSelectorHolder.getConduitSelector().getEndpoint());
String actualStrategy = selectionStrategy != null ? selectionStrategy : defaultLocatorSelectionStrategy;
LocatorSelectionStrategy locatorSelectionStrategy = getLocatorSelectionStrategy(actualStrategy);
locatorSelectionStrategy.setServiceLocator(locatorClient);
if (matcher != null) {
locatorSelectionStrategy.setMatcher(matcher);
}
selector.setLocatorSelectionStrategy(locatorSelectionStrategy);
if (LOG.isLoggable(Level.INFO)) {
LOG.log(Level.INFO, "Client enabled with strategy "
+ locatorSelectionStrategy.getClass().getName() + ".");
}
conduitSelectorHolder.setConduitSelector(selector);
if (LOG.isLoggable(Level.FINE)) {
LOG.log(Level.FINE, "Successfully enabled client " + conduitSelectorHolder
+ " for the service locator");
}
} | [
"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"
] | [
"Retrieve the start slack.\n\n@return start slack",
"Reads a nested table. Uses the supplied reader class instance.\n\n@param readerClass reader class instance\n@return table rows",
"Delivers the correct JSON Object for outgoings\n\n@param outgoings\n@throws org.json.JSONException",
"Returns an empty map with expected size matching the iterable size if\nit's of type Collection. Otherwise, an empty map with the default size is\nreturned.",
"Set value for given object field.\n\n@param object object to be updated\n@param field field name\n@param value field value\n\n@throws NoSuchMethodException if property writer is not available\n@throws InvocationTargetException if property writer throws an exception\n@throws IllegalAccessException if property writer is inaccessible",
"Get the cached ETag for the given host and file\n@param host the host\n@param file the file\n@return the cached ETag or null if there is no ETag in the cache",
"Returns a byte array containing a copy of the bytes",
"Get the MVT type mapping for the provided JTS Geometry.\n\n@param geometry JTS Geometry to get MVT type for\n@return MVT type for the given JTS Geometry, may return\n{@link com.wdtinc.mapbox_vector_tile.VectorTile.Tile.GeomType#UNKNOWN}",
"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 ValueContainer[] getAllValues(ClassDescriptor cld, Object obj) throws PersistenceBrokerException
{
return m_broker.serviceBrokerHelper().getAllRwValues(cld, obj);
} | [
"returns an array containing values for all the Objects attribute\n@throws PersistenceBrokerException if there is an erros accessing obj field values"
] | [
"Clones the cluster by constructing a new one with same name, partition\nlayout, and nodes.\n\n@param cluster\n@return clone of Cluster cluster.",
"Ensure that the nodeList is either null or empty.\n\n@param nodeList the nodeList to ensure to be either null or empty\n@param expression the expression was used to fine the nodeList\n@throws SpinXPathException if the nodeList is either null or empty",
"Write a resource.\n\n@param record resource instance\n@throws IOException",
"Plots the MSD curve with the trajectory t and adds the fitted model for anomalous diffusion above.\n@param t\n@param lagMin Minimum timelag (e.g. 1,2,3..) lagMin*timelag = elapsed time in seconds\n@param lagMax 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 Exponent alpha of power law function\n@param D Diffusion coeffcient",
"Use this API to fetch vpnsessionaction resource of given name .",
"Gets the declared bean type\n\n@return The bean type",
"Use this API to login into Netscaler.\n@param username Username\n@param password Password for the Netscaler.\n@param timeout timeout for netscaler session.Default is 1800secs\n@return status of the operation performed.\n@throws Exception nitro exception is thrown.",
"Makes sure that the operation name and the address have been set and returns a ModelNode\nrepresenting the operation request.",
"Draw the specified geometry.\n\n@param geometry geometry to draw\n@param symbol symbol for geometry\n@param fillColor fill colour\n@param strokeColor stroke colour\n@param lineWidth line width\n@param clipRect clipping rectangle"
] |
private static String[] readArgsFile(String argsFile) throws IOException {
final ArrayList<String> lines = new ArrayList<String>();
final BufferedReader reader = new BufferedReader(
new InputStreamReader(
new FileInputStream(argsFile), "UTF-8"));
try {
String line;
while ((line = reader.readLine()) != null) {
line = line.trim();
if (!line.isEmpty() && !line.startsWith("#")) {
lines.add(line);
}
}
} finally {
reader.close();
}
return lines.toArray(new String [lines.size()]);
} | [
"Read arguments from a file. Newline delimited, UTF-8 encoded. No fanciness to\navoid dependencies."
] | [
"Adjust the date according to the whole day options.\n\n@param date the date to adjust.\n@param isEnd flag, indicating if the date is the end of the event (in contrast to the beginning)\n\n@return the adjusted date, which will be exactly the beginning or the end of the provide date's day.",
"read data from channel to buffer\n\n@param channel readable channel\n@param buffer bytebuffer\n@return read size\n@throws IOException any io exception",
"This method lists all tasks defined in the file in a hierarchical\nformat, reflecting the parent-child relationships between them.\n\n@param file MPX file",
"Callback when each frame in the indicator animation should be drawn.",
"Get the active overrides with parameters and the active server group for a client\n\n@param profileID Id of profile to get configuration for\n@param clientUUID Client Id to export configuration\n@return SingleProfileBackup containing active overrides and active server group\n@throws Exception exception",
"Does the server support log downloads?\n\n@param cliGuiCtx The context.\n@return <code>true</code> if the server supports log downloads,\n<code>false</code> otherwise.",
"Add a row to the table if it does not already exist\n\n@param cells String...",
"Process TestCaseEvent. You can change current testCase context\nusing this method.\n\n@param event to process",
"Calculate where within the beat grid array the information for the specified beat can be found.\nYes, this is a super simple calculation; the main point of the method is to provide a nice exception\nwhen the beat is out of bounds.\n\n@param beatNumber the beat desired\n\n@return the offset of the start of our cache arrays for information about that beat"
] |
public static float noise2(float x, float y) {
int bx0, bx1, by0, by1, b00, b10, b01, b11;
float rx0, rx1, ry0, ry1, q[], sx, sy, a, b, t, u, v;
int i, j;
if (start) {
start = false;
init();
}
t = x + N;
bx0 = ((int)t) & BM;
bx1 = (bx0+1) & BM;
rx0 = t - (int)t;
rx1 = rx0 - 1.0f;
t = y + N;
by0 = ((int)t) & BM;
by1 = (by0+1) & BM;
ry0 = t - (int)t;
ry1 = ry0 - 1.0f;
i = p[bx0];
j = p[bx1];
b00 = p[i + by0];
b10 = p[j + by0];
b01 = p[i + by1];
b11 = p[j + by1];
sx = sCurve(rx0);
sy = sCurve(ry0);
q = g2[b00]; u = rx0 * q[0] + ry0 * q[1];
q = g2[b10]; v = rx1 * q[0] + ry0 * q[1];
a = lerp(sx, u, v);
q = g2[b01]; u = rx0 * q[0] + ry1 * q[1];
q = g2[b11]; v = rx1 * q[0] + ry1 * q[1];
b = lerp(sx, u, v);
return 1.5f*lerp(sy, a, b);
} | [
"Compute 2-dimensional Perlin noise.\n@param x the x coordinate\n@param y the y coordinate\n@return noise value at (x,y)"
] | [
"return either the first space or the first nbsp",
"Sends out the SQL as defined in the config upon first init of the connection.\n@param connection\n@param initSQL\n@throws SQLException",
"Function to perform forward activation",
"Logs all properties",
"Stops the service. If a timeout is given and the service has still not\ngracefully been stopped after timeout ms the service is stopped by force.\n\n@param millis value in ms",
"This method extracts candidate elements from the current DOM tree in the browser, based on\nthe crawl tags defined by the user.\n\n@param currentState the state in which this extract method is requested.\n@return a list of candidate elements that are not excluded.\n@throws CrawljaxException if the method fails.",
"Returns iterable with all non-deleted file version legal holds for this legal hold policy.\n@param limit the limit of entries per response. The default value is 100.\n@param fields the fields to retrieve.\n@return an iterable containing file version legal holds info.",
"Get the number of views, comments and favorites on a collection for a given date.\n\n@param date\n(Required) Stats will be returned for this date. A day according to Flickr Stats starts at midnight GMT for all users, and timestamps will\nautomatically be rounded down to the start of the day.\n@param collectionId\n(Required) The id (from the URL!) of the collection to get stats for.\n@see \"http://www.flickr.com/services/api/flickr.stats.getCollectionStats.htm\"",
"Returns a PreparedStatementCreator that returns a page of the underlying\nresult set.\n\n@param dialect\nDatabase dialect to use.\n@param limit\nMaximum number of rows to return.\n@param offset\nIndex of the first row to return."
] |
public FluoMutationGenerator put(Column col, CharSequence value) {
return put(col, value.toString().getBytes(StandardCharsets.UTF_8));
} | [
"Puts value at given column\n\n@param value Will be encoded using UTF-8"
] | [
"Convert any number class to array of integer.\n\n@param <T> Type.\n@param array Array.\n@return Integer array.",
"Set trimmed value.\n\n@param t Trimmed value.",
"Returns a list with argument words that are not equal in all cases",
"Returns the formula for the percentage\n@param group\n@param type\n@return",
"Notification that boot has completed successfully and the configuration history should be updated",
"Checks if the provided artifactQuery is valid\n\n@param artifactQuery ArtifactQuery\n@throws WebApplicationException if the data is corrupted",
"Set an unknown field.\n@param name the unknown property name\n@param value the unknown property value",
"Cleans up the subsystem children for the deployment and each sub-deployment resource.\n\n@param resource the subsystem resource to clean up",
"Checks that the data starting at startLocRecord looks like a local file record header.\n\n@param channel the channel\n@param startLocRecord offset into channel of the start of the local record\n@param compressedSize expected compressed size of the file, or -1 to indicate this isn't known"
] |
@Override
public void invert( ZMatrixRMaj inv ) {
if( inv.numRows != n || inv.numCols != n ) {
throw new RuntimeException("Unexpected matrix dimension");
}
if( inv.data == t ) {
throw new IllegalArgumentException("Passing in the same matrix that was decomposed.");
}
if(decomposer.isLower()) {
setToInverseL(inv.data);
} else {
throw new RuntimeException("Implement");
}
} | [
"Sets the matrix 'inv' equal to the inverse of the matrix that was decomposed.\n\n@param inv Where the value of the inverse will be stored. Modified."
] | [
"Delete rows that match the prepared statement.",
"Ensures that every path starts and ends with a slash character.\n\n@param scriptPath the scriptPath that needs to be normalized\n@return a path with leading and trailing slash",
"Returns the list view of corporate groupIds of an organization\n\n@param organizationId String\n@return ListView",
"Part of the endOfRun process that needs the database. May be deferred if the database is not available.",
"Calling this twice will not actually overwrite the gauge\n\n@param collectionSizeGauge",
"Appends the query part for the facet to the query string.\n@param query The current query string.\n@param name The name of the facet parameter, e.g. \"limit\", \"order\", ....\n@param value The value to set for the parameter specified by name.",
"Used to finish up pushing the bulge off the matrix.",
"Resolves the path relative to the parent and normalizes it.\n\n@param parent the parent path\n@param path the path\n\n@return the normalized path",
"Runs through the log removing segments until the size of the log is at least\nlogRetentionSize bytes in size\n\n@throws IOException"
] |
public static List<RebalanceTaskInfo> filterTaskPlanWithStores(List<RebalanceTaskInfo> existingPlanList,
List<StoreDefinition> storeDefs) {
List<RebalanceTaskInfo> plans = Lists.newArrayList();
List<String> storeNames = StoreDefinitionUtils.getStoreNames(storeDefs);
for(RebalanceTaskInfo existingPlan: existingPlanList) {
RebalanceTaskInfo info = RebalanceTaskInfo.create(existingPlan.toJsonString());
// Filter the plans only for stores given
HashMap<String, List<Integer>> storeToPartitions = info.getStoreToPartitionIds();
HashMap<String, List<Integer>> newStoreToPartitions = Maps.newHashMap();
for(String storeName: storeNames) {
if(storeToPartitions.containsKey(storeName))
newStoreToPartitions.put(storeName, storeToPartitions.get(storeName));
}
info.setStoreToPartitionList(newStoreToPartitions);
plans.add(info);
}
return plans;
} | [
"Given a list of partition plans and a set of stores, copies the store\nnames to every individual plan and creates a new list\n\n@param existingPlanList Existing partition plan list\n@param storeDefs List of store names we are rebalancing\n@return List of updated partition plan"
] | [
"get the jdbcTypes from the Query or the ResultSet if not available from the Query\n@throws SQLException",
"Serialize an object with Json\n@param obj Object\n@return String\n@throws IOException",
"given the groupId, and 2 string arrays, adds the name-responses pair to the table_override\n\n@param groupId ID of group\n@param methodName name of method\n@param className name of class\n@throws Exception exception",
"Pretty prints the given source code.\n\n@param code\nsource code to format\n@param options\nformatter options\n@param lineEnding\ndesired line ending\n@return formatted source code",
"Get a collection of tags used by the specified user.\n\n<p>\nThis method does not require authentication.\n</p>\n\n@param userId\nThe User ID\n@return The User object\n@throws FlickrException",
"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",
"Returns data tree structured as Transloadit expects it.\n\n@param data\n@return {@link Map}\n@throws LocalOperationException",
"Get content for URL only\n\n@param stringUrl URL to get content\n@return the content\n@throws IOException I/O error happened",
"Handling out responce.\n\n@param message\nthe message\n@throws Fault\nthe fault"
] |
private static boolean isVariableInteger(TokenList.Token t) {
if( t == null )
return false;
return t.getScalarType() == VariableScalar.Type.INTEGER;
} | [
"Checks to see if the token is an integer scalar\n\n@return true if integer or false if not"
] | [
"Chooses a single segment to be compressed, or null if no segment could be chosen.\n@param options\n@param createMixed\n@return",
"Use this API to fetch statistics of cmppolicy_stats resource of given name .",
"Returns all the deployment runtime names associated with an overlay.\n\n@param context the current OperationContext.\n@param overlayAddress the address for the averlay.\n@return all the deployment runtime names associated with an overlay.",
"Check if the given class represents an array of primitive wrappers,\ni.e. Boolean, Byte, Character, Short, Integer, Long, Float, or Double.\n@param clazz the class to check\n@return whether the given class is a primitive wrapper array class",
"Whether the given grid dialect implements the specified facet or not.\n\n@param gridDialect the dialect of interest\n@param facetType the dialect facet type of interest\n@return {@code true} in case the given dialect implements the specified facet, {@code false} otherwise",
"Check for exceptions.\n\n@return the list",
"Build a new WebDriver based EmbeddedBrowser.\n\n@return the new build WebDriver based embeddedBrowser",
"depth- first search for any module - just to check that the suggestion has any chance of delivering correct result",
"Move the SQL value to the next one for version processing."
] |
private boolean hasPrimaryKey(T entity) {
Object pk = getPrimaryKey(entity);
if (pk == null) {
return false;
} else {
if (pk instanceof Number && ((Number) pk).longValue() == 0) {
return false;
}
}
return true;
} | [
"Returns true if this entity's primary key is not null, and for numeric\nfields, is non-zero."
] | [
"Parse the string representation of a timestamp.\n\n@param value string representation\n@return Java representation",
"Image scale method\n@param imageToScale The image to be scaled\n@param dWidth Desired width, the new image object is created to this size\n@param dHeight Desired height, the new image object is created to this size\n@param fWidth What to multiply the width by. value < 1 scales down, and value > one scales up\n@param fHeight What to multiply the height by. value < 1 scales down, and value > one scales up\n@return A scaled image",
"Returns the specified range of elements in the sorted set.\nThe elements are considered to be ordered from the highest to the lowest score.\nDescending lexicographical order is used for elements with equal score.\nBoth start and stop are zero-based inclusive indexes. They can also be negative numbers indicating offsets from\nthe end of the sorted set, with -1 being the last element of the sorted set.\n@param start\n@param end\n@return the range of elements",
"Navigate to this address in the given model node.\n\n@param model the model node\n@param create {@code true} to create the last part of the node if it does not exist\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\nshould obtain a {@link org.jboss.as.controller.registry.Resource Resource} from the\n{@link org.jboss.as.controller.OperationContext#readResource(PathAddress) OperationContext}\nand use the {@code Resource} API to access child resources",
"The default User-Agent header. Override this method to override the user agent.\n\n@return the user agent string.",
"Unregister the mgmt channel.\n\n@param old the proxy controller to unregister\n@param shuttingDown whether the server inventory is shutting down\n@return whether the registration can be removed from the domain-controller",
"Use this API to fetch all the ntpserver resources that are configured on netscaler.",
"Answer the real ClassDescriptor for anObj\nie. aCld may be an Interface of anObj, so the cld for anObj is returned",
"Removes a parameter from this configuration.\n\n@param key the parameter to remove"
] |
public static base_responses add(nitro_service client, dnstxtrec resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
dnstxtrec addresources[] = new dnstxtrec[resources.length];
for (int i=0;i<resources.length;i++){
addresources[i] = new dnstxtrec();
addresources[i].domain = resources[i].domain;
addresources[i].String = resources[i].String;
addresources[i].ttl = resources[i].ttl;
}
result = add_bulk_request(client, addresources);
}
return result;
} | [
"Use this API to add dnstxtrec resources."
] | [
"Reads the given text stream and compressed its content.\n\n@param stream The input stream\n@return A byte array containing the GZIP-compressed content of the stream\n@throws IOException If an error ocurred",
"Returns a String summarizing overall accuracy that will print nicely.",
"Reset the internal state of this object back to what it originally was.\n\nUsed then reloading a server or in a slave host controller following a post-boot reconnect\nto the master.",
"Provides the scrollableList implementation for page scrolling\n@return {@link LayoutScroller.ScrollableList} implementation, passed to {@link LayoutScroller}\nfor the processing the scrolling",
"convert object into another class using the JSON mapper\n\n@param <C> the generic target type\n@param object the object to convert\n@param targetClass the class of the target object\n@return the converted object\n@throws IllegalArgumentException if conversion fails",
"This method retrieves a double of the specified type,\nbelonging to the item with the specified unique ID.\n\n@param id unique ID of entity to which this data belongs\n@param type data type identifier\n@return required double data",
"Sets the baseline duration text value.\n\n@param baselineNumber baseline number\n@param value baseline duration text value",
"Register the DAO with the cache. This will allow folks to build a DAO externally and then register so it can be\nused internally as necessary.\n\n<p>\n<b>NOTE:</b> By default this registers the DAO to be associated with the class that it uses. If you need to\nregister multiple dao's that use different {@link DatabaseTableConfig}s then you should use\n{@link #registerDaoWithTableConfig(ConnectionSource, Dao)}.\n</p>\n\n<p>\n<b>NOTE:</b> You should maybe use the {@link DatabaseTable#daoClass()} and have the DaoManager construct the DAO\nif possible.\n</p>",
"Use this API to delete dnstxtrec."
] |
public static double ChiSquare(double[] histogram1, double[] histogram2) {
double r = 0;
for (int i = 0; i < histogram1.length; i++) {
double t = histogram1[i] + histogram2[i];
if (t != 0)
r += Math.pow(histogram1[i] - histogram2[i], 2) / t;
}
return 0.5 * r;
} | [
"Gets the Chi Square distance between two normalized histograms.\n\n@param histogram1 Histogram.\n@param histogram2 Histogram.\n@return The Chi Square distance between x and y."
] | [
"Helper method to synchronously invoke a callback\n\n@param call",
"Prepare a parallel HTTP HEAD Task.\n\n@param url\nthe UrlPostfix: e.g. in http://localhost:8080/index.html.,the url is \"/index.html\"\n@return the parallel task builder",
"Use this API to update nd6ravariables.",
"Stores an new entry in the cache.",
"Get all the attribute values for an MBean by name. The values are HTML escaped.\n@return the {@link Map} of attribute names and values.\n@throws javax.management.AttributeNotFoundException Unable to find the 'attribute'\n@throws InstanceNotFoundException unable to find the specific bean\n@throws ReflectionException unable to interrogate the bean",
"Creates a random symmetric matrix. The entire matrix will be filled in, not just a triangular\nportion.\n\n@param N Number of rows and columns\n@param nz_total Number of nonzero elements in the triangular portion of the matrix\n@param min Minimum element value, inclusive\n@param max Maximum element value, inclusive\n@param rand Random number generator\n@return Randomly generated matrix",
"Use this API to fetch the statistics of all servicegroup_stats resources that are configured on netscaler.",
"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",
"Transforms the category path of a category to the category.\n@return a map from root or site path to category."
] |
protected void countStatements(UsageStatistics usageStatistics,
StatementDocument statementDocument) {
// Count Statement data:
for (StatementGroup sg : statementDocument.getStatementGroups()) {
// Count Statements:
usageStatistics.countStatements += sg.size();
// Count uses of properties in Statements:
countPropertyMain(usageStatistics, sg.getProperty(), sg.size());
for (Statement s : sg) {
for (SnakGroup q : s.getQualifiers()) {
countPropertyQualifier(usageStatistics, q.getProperty(), q.size());
}
for (Reference r : s.getReferences()) {
usageStatistics.countReferencedStatements++;
for (SnakGroup snakGroup : r.getSnakGroups()) {
countPropertyReference(usageStatistics,
snakGroup.getProperty(), snakGroup.size());
}
}
}
}
} | [
"Count the statements and property uses of an item or property document.\n\n@param usageStatistics\nstatistics object to store counters in\n@param statementDocument\ndocument to count the statements of"
] | [
"Use this API to fetch filtered set of dbdbprofile resources.\nset the filter parameter values in filtervalue object.",
"Return the knot at a given position.\n@param x the position\n@return the knot number, or 1 if no knot found",
"Initialize the pattern choice button group.",
"Save page to log\n\n@return address of this page after save",
"Use this API to fetch all the callhome resources that are configured on netscaler.",
"Return the serialized form of this Identity.\n\n@return The serialized representation\n@see #fromByteArray\n@deprecated",
"Establish connection to the ChromeCast device",
"Feeds input stream to data consumer using metadata from tar entry.\n@param consumer the consumer\n@param inputStream the stream to feed\n@param entry the entry to use for metadata\n@throws IOException on consume error",
"Add the option specifying if the categories should be displayed collapsed\nwhen the dialog opens.\n\n@see org.opencms.ui.actions.I_CmsADEAction#getParams()"
] |
public static String readDesignerVersion(ServletContext context) {
String retStr = "";
BufferedReader br = null;
try {
InputStream inputStream = context.getResourceAsStream("/META-INF/MANIFEST.MF");
br = new BufferedReader(new InputStreamReader(inputStream,
"UTF-8"));
String line;
while ((line = br.readLine()) != null) {
if (line.startsWith(BUNDLE_VERSION)) {
retStr = line.substring(BUNDLE_VERSION.length() + 1);
retStr = retStr.trim();
}
}
inputStream.close();
} catch (Exception e) {
logger.error(e.getMessage(),
e);
} finally {
if (br != null) {
IOUtils.closeQuietly(br);
}
}
return retStr;
} | [
"Returns the designer version from the manifest.\n@param context\n@return version"
] | [
"Use this API to fetch appfwprofile resource of given name .",
"Destroys all resource requests in requestQueue.\n\n@param requestQueue The queue for which all resource requests are to be\ndestroyed.",
"removes an Object from the cache.\n\n@param oid the Identity of the object to be removed.",
"Use this API to unset the properties of sslocspresponder resource.\nProperties that need to be unset are specified in args array.",
"Construct an InterestRateSwapProductDescriptor from a node in a FpML file.\n\n@param trade The node containing the swap.\n@return Descriptor of the swap.",
"Make superclasses method protected??",
"crates a StencilSet object and add it to the current diagram\n@param modelJSON\n@param current\n@throws org.json.JSONException",
"Cancels all the pending & running requests and releases all the dispatchers.",
"Get the ordinal value for the last of a particular override on a path\n\n@param overrideId Id of the override to check\n@param pathId Path the override is on\n@param clientUUID UUID of the client\n@param filters If supplied, only endpoints ending with values in filters are returned\n@return The integer ordinal\n@throws Exception"
] |
public void setBaselineStartText(int baselineNumber, String value)
{
set(selectField(TaskFieldLists.BASELINE_STARTS, baselineNumber), value);
} | [
"Sets the baseline start text value.\n\n@param baselineNumber baseline number\n@param value baseline start text value"
] | [
"Use this API to add sslaction resources.",
"Compares the two comma-separated lists.\n\n@param list1 The first list\n@param list2 The second list\n@return <code>true</code> if the lists are equal",
"Use this API to update nsspparams.",
"Add an URL to the given classloader\n\n@param loader ClassLoader\n@param url URL to add\n@throws IOException I/O Error\n@throws InvocationTargetException Invocation Error\n@throws IllegalArgumentException Illegal Argument\n@throws IllegalAccessException Illegal Access\n@throws SecurityException Security Constraint\n@throws NoSuchMethodException Method not found",
"This method must be called on the stop of the component. Stop the directory monitor and unregister all the\ndeclarations.",
"Initialize VIDEO_INFO data.",
"Set dates where the event should not take place, even if they are part of the series.\n@param dates dates to set.",
"Use this API to fetch aaauser_intranetip_binding resources of given name .",
"Constructs a list of items with given separators.\n\n@param sql\nStringBuilder to which the constructed string will be\nappended.\n@param list\nList of objects (usually strings) to join.\n@param init\nString to be added to the start of the list, before any of the\nitems.\n@param sep\nSeparator string to be added between items in the list."
] |
public static base_response unset(nitro_service client, systemuser resource, String[] args) throws Exception{
systemuser unsetresource = new systemuser();
unsetresource.username = resource.username;
return unsetresource.unset_resource(client,args);
} | [
"Use this API to unset the properties of systemuser resource.\nProperties that need to be unset are specified in args array."
] | [
"Use this API to fetch statistics of streamidentifier_stats resource of given name .",
"For internal use, don't call the public API internally",
"Compute pose of skeleton at the given time from the animation channels.\n@param timeInSec animation time in seconds.",
"Create the environment as specified by @Template or\narq.extension.ce-cube.openshift.template.* properties.\n<p>\nIn the future, this might be handled by starting application Cube\nobjects, e.g. CreateCube(application), StartCube(application)\n<p>\nNeeds to fire before the containers are started.",
"Remove a misc file.\n\n@param name the file name\n@param path the relative path\n@param existingHash the existing hash\n@param isDirectory whether the file is a directory or not\n@return the builder",
"If credentials are incorrect or not provided for Basic Auth, then Android\nmay throw this exception when an HTTP 401 is received. A separate exception\nis thrown for proxy authentication errors. Checking for this response and\nreturning the proper status.\n@param ex the exception raised from Android\n@return HTTP Status Code",
"Sets the Base Calendar field indicates which calendar is the base calendar\nfor a resource calendar. The list includes the three built-in calendars,\nas well as any new base calendars you have created in the Change Working\nTime dialog box.\n\n@param val calendar name",
"Upload a photo from a byte-array.\n\n@param data\nThe photo data as a byte array\n@param metaData\nThe meta data\n@return photoId or ticketId\n@throws FlickrException",
"Generates timephased actual costs from the assignment's cost value. Used for Cost type Resources.\n\n@return timephased cost"
] |
public static nsconfig diff(nitro_service client, nsconfig resource) throws Exception {
nsconfig diffresource = new nsconfig();
diffresource.config1 = resource.config1;
diffresource.config2 = resource.config2;
diffresource.outtype = resource.outtype;
diffresource.template = resource.template;
diffresource.ignoredevicespecific = resource.ignoredevicespecific;
return (nsconfig)diffresource.perform_operationEx(client,"diff");
} | [
"Use this API to diff nsconfig."
] | [
"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",
"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.",
"Add a source and destination.\n\n@param source Source path to be routed. Routed path can have named wild-card pattern with braces \"{}\".\n@param destination Destination of the path.",
"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}.",
"why isn't this functionality in enum?",
"Used for initialization of the underlying map provider.\n\n@param fragmentManager required for initialization",
"Returns the class hierarchy of the given type, from bottom to top, starting with the given class itself.\nInterfaces are not included.\n\n@param clazz the class of interest\n@return the class hierarchy of the given class",
"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.",
"Validates a favorite entry.\n\n<p>If the favorite entry references a resource or project that can't be read, this will return false.\n\n@param entry the favorite entry\n@return the"
] |
static AzureAsyncOperation fromResponse(SerializerAdapter<?> serializerAdapter, Response<ResponseBody> response) throws CloudException {
AzureAsyncOperation asyncOperation = null;
String rawString = null;
if (response.body() != null) {
try {
rawString = response.body().string();
asyncOperation = serializerAdapter.deserialize(rawString, AzureAsyncOperation.class);
} catch (IOException exception) {
// Exception will be handled below
} finally {
response.body().close();
}
}
if (asyncOperation == null || asyncOperation.status() == null) {
throw new CloudException("polling response does not contain a valid body: " + rawString, response);
}
else {
asyncOperation.rawString = rawString;
}
return asyncOperation;
} | [
"Creates AzureAsyncOperation from the given HTTP response.\n\n@param serializerAdapter the adapter to use for deserialization\n@param response the response\n@return the async operation object\n@throws CloudException if the deserialization fails or response contains invalid body"
] | [
"Add UDFType objects to a PM XML file.\n\n@author kmahan\n@date 2014-09-24\n@author lsong\n@date 2015-7-24",
"Internal method that finds the matching enum for a configured field that has the name argument.\n\n@return The matching enum value or null if blank enum name.\n@throws IllegalArgumentException\nIf the enum name is not known.",
"Add BoxMetaDataFilter to the JsonArray boxMetadataFilterRequestArray.\n@param @param bmf accepts a filter that has templateKey, scope, and filters populated.\n@return JsonArray that is formated Json request",
"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",
"Add a custom query parameter to the _changes request. Useful for specifying extra parameters\nto a filter function for example.\n\n@param name the name of the query parameter\n@param value the value of the query parameter\n@return this Changes instance\n@since 2.5.0",
"Merge the given maps.\n\n<p>\nThe replied map is a view on the given two maps.\nIf a key exists in the two maps, the replied value is the value of the right operand.\n</p>\n\n<p>\nEven if the key of the right operand exists in the left operand, the value in the right operand is preferred.\n</p>\n\n<p>\nThe replied map is unmodifiable.\n</p>\n\n@param <K> type of the map keys.\n@param <V> type of the map values.\n@param left the left map.\n@param right the right map.\n@return a map with the merged contents from the two maps.\n@since 2.15",
"Sets the left and right frame margin.\n@param frameLeft margin\n@param frameRight margin\n@return this to allow chaining",
"Gets the time warp.\n\n@return the time warp",
"Writes task baseline data.\n\n@param xmlTask MSPDI task\n@param mpxjTask MPXJ task"
] |
private ResultAction getFailedResultAction(Throwable cause) {
if (currentStage == Stage.MODEL || cancelled || isRollbackOnRuntimeFailure() || isRollbackOnly()
|| (cause != null && !(cause instanceof OperationFailedException))) {
return ResultAction.ROLLBACK;
}
return ResultAction.KEEP;
} | [
"Decide whether failure should trigger a rollback.\n\n@param cause\nthe cause of the failure, or {@code null} if failure is not\nthe result of catching a throwable\n@return the result action"
] | [
"Provide Jersey client for the targeted Grapes server\n\n@return webResource",
"Use this API to fetch aaauser_intranetip_binding resources of given name .",
"Classify stdin by senteces seperated by blank line\n@param readerWriter\n@return\n@throws IOException",
"Get a System property by its name.\n\n@param name the name of the wanted System property.\n@return the System property value - null if it is not defined.",
"Skips the stream over the specified number of bytes, adding the skipped\namount to the count.\n\n@param length the number of bytes to skip\n@return the actual number of bytes skipped\n@throws java.io.IOException if an I/O error occurs\n@see java.io.InputStream#skip(long)",
"Checks whether a String satisfies the number range selection filter.\nThe test is evaluated based on the rightmost natural number found in\nthe String. Note that this is just evaluated on the String as given.\nIt is not trying to interpret it as a filename and to decide whether\nthe file exists, is a directory or anything like that.\n\n@param str The String to check for a number in\n@return true If the String is within the ranges filtered for",
"Use this API to export appfwlearningdata resources.",
"Returns the number of key-value mappings in this map for the second key.\n\n@param firstKey\nthe first key\n@return Returns the number of key-value mappings in this map for the second key.",
"Returns status message.\n\n@param user CmsUser\n@param disabled boolean\n@param newUser boolean\n@return String"
] |
public static final Date parseFinishDateTime(String value)
{
Date result = parseDateTime(value);
if (result != null)
{
result = DateHelper.addDays(result, -1);
}
return result;
} | [
"Convert the Phoenix representation of a finish date time into a Date instance.\n\n@param value Phoenix date time\n@return Date instance"
] | [
"Execute the transactional flow - catch only specified exceptions\n\n@param input Initial data input\n@param classes Exception types to catch\n@return Try that represents either success (with result) or failure (with errors)",
"Creates a field map for resources.\n\n@param props props data",
"return a prepared Insert Statement fitting for the given ClassDescriptor",
"Use this API to fetch authenticationtacacspolicy_systemglobal_binding resources of given name .",
"Add an exception to a calendar.\n\n@param parentNode parent node\n@param exception calendar exceptions",
"Parse the XML for a collection as returned by getTree call.\n\n@param collectionElement\n@return",
"Creates the given connection pool with the given configuration. Extracted here to make unit mocking easier.\n@param config configuration object.\n@return BoneCP connection pool handle.",
"New SOAP client uses new SOAP service.",
"Converts a time represented as an integer to a Date instance.\n\n@param time integer time\n@return Date instance"
] |
public String login(Authentication authentication) {
String token = getToken();
return login(token, authentication);
} | [
"Login for a specific authentication, creating a new token.\n\n@param authentication authentication to assign to token\n@return token"
] | [
"Main file parser. Reads GIF content blocks. Stops after reading maxFrames",
"Moves the elements contained in \"band\" in the Y axis \"yOffset\"\n@param yOffset\n@param band",
"Hides the original Java-style method name using an attribute\nwhich should be respected by Visual Studio, the creates a new\nwrapper method using a .Net style method name.\n\nNote that this does not work for VB as it is case insensitive. Even\nthough Visual Studio won't show you the Java-style method name,\nthe VB compiler sees both and thinks they are the same... which\ncauses it to fail.\n\n@param writer output stream\n@param aClass class being processed\n@param methodSet set of methods which have been processed.\n@throws XMLStreamException",
"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",
"We are adding a redeploy operation step for each specified deployment runtime name.\n\n@param context\n@param deploymentsRootAddress\n@param deploymentNames\n@throws OperationFailedException",
"If status is in failed state then throw CloudException.",
"Returns the filename of the resource with extension.\n\n@return Filename of the GVRAndroidResource. May return null if the\nresource is not associated with any file",
"generate a message for loglevel DEBUG\n\n@param pObject the message Object",
"Tells you if an expression is the expected constant.\n@param expression\nany expression\n@param expected\nthe expected int or String\n@return\nas described"
] |
public static Map<String, Map<String, Metadata>> parseAndPopulateMetadataMap(JsonObject jsonObject) {
Map<String, Map<String, Metadata>> metadataMap = new HashMap<String, Map<String, Metadata>>();
//Parse all templates
for (JsonObject.Member templateMember : jsonObject) {
if (templateMember.getValue().isNull()) {
continue;
} else {
String templateName = templateMember.getName();
Map<String, Metadata> scopeMap = metadataMap.get(templateName);
//If templateName doesn't yet exist then create an entry with empty scope map
if (scopeMap == null) {
scopeMap = new HashMap<String, Metadata>();
metadataMap.put(templateName, scopeMap);
}
//Parse all scopes in a template
for (JsonObject.Member scopeMember : templateMember.getValue().asObject()) {
String scope = scopeMember.getName();
Metadata metadataObject = new Metadata(scopeMember.getValue().asObject());
scopeMap.put(scope, metadataObject);
}
}
}
return metadataMap;
} | [
"Creates a map of metadata from json.\n@param jsonObject metadata json object for metadata field in get /files?fileds=,etadata.scope.template response\n@return Map of String as key a value another Map with a String key and Metadata value"
] | [
"Initializes class data structures and parameters",
"Notify our own event listeners of a Z-Wave event.\n@param event the event to send.",
"Main method of this class related to ListView widget. This method is the responsible of\nrecycle or create a new Renderer instance with all the needed information to implement the\nrendering. This method will validate all the attributes passed in the builder constructor and\nwill check if can recycle or has to create a new Renderer instance.\n\nThis method is used with ListView because the view recycling mechanism is implemented in this\nclass. RecyclerView widget will use buildRendererViewHolder method.\n\n@return ready to use Renderer instance.",
"Method that takes an inputstream, read it preserving the end lines, and subtitute using commons-lang-3 calls\nthe variables, first searching as system properties vars and then in environment var list.\nIn case of missing the property is replaced by white space.\n@param stream\n@return",
"Merge the two maps.\n\n<p>\nThe replied map is a view on the given map. It means that any change\nin the original map is reflected to the result of this operation.\n</p>\n\n<p>\nIf a key exists in the left and right operands, the value in the right operand is preferred.\n</p>\n\n@param <K> type of the map keys.\n@param <V> type of the map values.\n@param left the left map.\n@param right the right map.\n@return a map with the merged contents from the two maps.\n@throws IllegalArgumentException - when a right operand key exists in the left operand.\n@since 2.15",
"Reads a time value. The time is represented as tenths of a\nminute since midnight.\n\n@param data byte array of data\n@param offset location of data as offset into the array\n@return time value",
"Returns the bundle descriptor for the bundle with the provided base name.\n@param cms {@link CmsObject} used for searching.\n@param basename the bundle base name, for which the descriptor is searched.\n@return the bundle descriptor, or <code>null</code> if it does not exist or searching fails.",
"Replaces all characters in the second parameter found in the first\nparameter with the final character.\n@param value the string to replace characters in\n@param chars the characters to replace\n@param replacement the character to insert as replacement",
"1.5 and on, 2.0 and on, 3.0 and on."
] |
private void setMasterTempo(double newTempo) {
double oldTempo = Double.longBitsToDouble(masterTempo.getAndSet(Double.doubleToLongBits(newTempo)));
if ((getTempoMaster() != null) && (Math.abs(newTempo - oldTempo) > getTempoEpsilon())) {
// This is a change in tempo, so report it to any registered listeners, and update our metronome if we are synced.
if (isSynced()) {
metronome.setTempo(newTempo);
notifyBeatSenderOfChange();
}
deliverTempoChangedAnnouncement(newTempo);
}
} | [
"Establish a new master tempo, and if it is a change from the existing one, report it to the listeners.\n\n@param newTempo the newly reported master tempo."
] | [
"Use this API to fetch authenticationvserver_authenticationlocalpolicy_binding resources of given name .",
"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.",
"removes all timed out lock entries from the persistent storage.\nThe timeout value can be set in the OJB properties file.",
"Use this API to unset the properties of csparameter resource.\nProperties that need to be unset are specified in args array.",
"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.",
"Pause the current entry point, and invoke the provided listener when all current requests have finished.\n\nIf individual control point tracking is not enabled then the listener will be invoked straight away\n\n@param requestCountListener The listener to invoke",
"a small static helper to set a multi state drawable on a view\n\n@param icon\n@param iconColor\n@param selectedIcon\n@param selectedIconColor\n@param tinted\n@param imageView",
"Pretty print a progress update after each batch complete.\n\n@param batchCount current batch\n@param numBatches total number of batches\n@param partitionStoreCount partition stores migrated\n@param numPartitionStores total number of partition stores to migrate\n@param totalTimeMs total time, in milliseconds, of execution thus far.",
"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"
] |
public void copy(ProjectCalendar cal)
{
setName(cal.getName());
setParent(cal.getParent());
System.arraycopy(cal.getDays(), 0, getDays(), 0, getDays().length);
for (ProjectCalendarException ex : cal.m_exceptions)
{
addCalendarException(ex.getFromDate(), ex.getToDate());
for (DateRange range : ex)
{
ex.addRange(new DateRange(range.getStart(), range.getEnd()));
}
}
for (ProjectCalendarHours hours : getHours())
{
if (hours != null)
{
ProjectCalendarHours copyHours = cal.addCalendarHours(hours.getDay());
for (DateRange range : hours)
{
copyHours.addRange(new DateRange(range.getStart(), range.getEnd()));
}
}
}
} | [
"Copy the settings from another calendar to this calendar.\n\n@param cal calendar data source"
] | [
"Checks all data sets in a given record for constraint violations.\n\n@param record\nIIM record (1,2,3, ...) to check\n\n@return list of constraint violations, empty set if IIM file is valid",
"Draw an elliptical interior with this color.\n\n@param rect rectangle in which ellipse should fit\n@param color colour to use for filling",
"Generates a Map of query parameters for Artifact regarding the filters\n\n@return Map<String, Object>",
"Use this API to update sslparameter.",
"Load a table configuration in from a text-file reader.\n\n@return A config if any of the fields were set otherwise null if we reach EOF.",
"Returns a client model from a ResultSet\n\n@param result resultset containing client information\n@return Client or null\n@throws Exception exception",
"Serialize the Document object.\n\n@param dom the document to serialize\n@return the serialized dom String",
"Close the Closeable. Logging a warning if any problems occur.\n\n@param c the thing to close",
"Read JdbcConnectionDescriptors from the given repository file.\n\n@see #mergeConnectionRepository"
] |
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"
] | [
"add a FK column pointing to the item Class",
"This method extracts resource data from a Phoenix file.\n\n@param phoenixProject parent node for resources",
"Collect the URIs of resources, that are referenced by the given description.\n@return the list of referenced URIs. Never <code>null</code>.",
"Use this API to add sslcertkey.",
"This one picks up on Dan2 ideas, but seeks to make less distinctions\nmid sequence by sorting for long words, but to maintain extra\ndistinctions for short words, by always recording the class of the\nfirst and last two characters of the word.\nCompared to chris2 on which it is based,\nit uses more Unicode classes, and so collapses things like\npunctuation more, and might work better with real unicode.\n\n@param s The String to find the word shape of\n@param omitIfInBoundary If true, character classes present in the\nfirst or last two (i.e., BOUNDARY_SIZE) letters\nof the word are not also registered\nas classes that appear in the middle of the word.\n@param knownLCWords If non-null and non-empty, tag with a \"k\" suffix words\nthat are in this list when lowercased (representing\nthat the word is \"known\" as a lowercase word).\n@return A word shape for the word.",
"Applies the matrices computed from the scene object's\nlinked to the skeleton bones to the current pose.\n@see #applyPose(GVRPose, int)\n@see #setPose(GVRPose)",
"Extract data for a single task.\n\n@param parent task parent\n@param row Synchro task data",
"Begin a \"track;\" that is, begin logging at one level deeper.\nChannels other than the FORCE channel are ignored.\n@param args The title of the track to begin, with an optional FORCE flag.",
"Return a list of the top 100 unique places clustered by a given placetype for a user.\n\n@param placeType\nUse Type-constants at {@link Place}\n@param woeId\nA Where On Earth (WOE) ID. Optional, can be null.\n@param placeId\nA Flickr Places ID. Optional, can be null.\n@param threshold\nThe minimum number of photos that a place type must have to be included. If the number of photos is lowered then the parent place type for\nthat place will be used. Optional, can be null.\n@param minUploadDate\nOptional, can be null.\n@param maxUploadDate\nOptional, can be null.\n@param minTakenDate\nOptional, can be null.\n@param maxTakenDate\nOptional, can be null.\n@return A PlacesList\n@throws FlickrException"
] |
@UiHandler("m_endTime")
void onEndTimeChange(CmsDateBoxEvent event) {
if (handleChange() && !event.isUserTyping()) {
m_controller.setEndTime(event.getDate());
}
} | [
"Handle an end time change.\n@param event the change event."
] | [
"Extract information from a resource ID string with the resource type\nas the identifier.\n\n@param id the resource ID\n@param identifier the identifier to match, e.g. \"resourceGroups\", \"storageAccounts\"\n@return the information extracted from the identifier",
"Clears the collection and uses the iterator to run through the dao and delete all of the items in the collection\nfrom the associated database table. This is different from removing all of the elements in the table since this\niterator is across just one item's foreign objects.",
"Create a HttpComponents HttpUriRequest object for the given HTTP method and URI specification.\n\n@param httpMethod the HTTP method\n@param uri the URI\n@return the HttpComponents HttpUriRequest object",
"Checks that native primarykey fields have readonly access, and warns if not.\n\n@param fieldDef The field descriptor\n@param checkLevel The current check level (this constraint is checked in basic and strict)",
"Return the key if there is one else return -1",
"Generates a change event for a local update of a document in the given namespace referring\nto the given document _id.\n\n@param namespace the namespace where the document was inserted.\n@param documentId the _id of the document that was updated.\n@param update the update specifier.\n@return a change event for a local update of a document in the given namespace referring\nto the given document _id.",
"Use this API to add linkset.",
"We have received an update that invalidates the beat grid for a player, so clear it and alert\nany listeners if this represents a change. This does not affect the hot cues; they will stick around until the\nplayer loads a new track that overwrites one or more of them.\n\n@param update the update which means we have no beat grid for the associated player",
"Returns a string array of the methods loaded for a class\n\n@param pluginClass name of class\n@return string array of the methods loaded for the class\n@throws Exception exception"
] |
public final String getPath(final String key) {
StringBuilder result = new StringBuilder();
addPathTo(result);
result.append(".");
result.append(getPathElement(key));
return result.toString();
} | [
"Gets the string representation of the path to the current JSON element.\n\n@param key the leaf key"
] | [
"Gets a collection.\n\n@param collectionName the name of the collection to return\n@return the collection",
"Sets the bottom padding for all cells in the table.\n@param paddingBottom new padding, ignored if smaller than 0\n@return this to allow chaining",
"Load a configuration in from a text file.\n\n@return A config if any of the fields were set otherwise null on EOF.",
"Unlink the specified reference from this object.\nMore info see OJB doc.\n\n@param obj Object with reference\n@param ord the ObjectReferenceDescriptor of the reference\n@param insert flag signals insert operation",
"Find all methods on classes under scanBase that are annotated with annotationClass.\n\n@param scanBase Package to scan recursively, in dot notation (ie: org.jrugged...)\n@param annotationClass Class of the annotation to search for\n@return Set<Method> The set of all @{java.lang.reflect.Method}s having the annotation",
"Delivers the correct JSON Object for the dockers\n\n@param dockers\n@throws org.json.JSONException",
"Prints the error message as log message.\n\n@param level the log level",
"Sets the max min.\n\n@param n the new max min",
"add a foreign key field ID"
] |
public static String getHeaders(HttpMethod method) {
String headerString = "";
Header[] headers = method.getRequestHeaders();
for (Header header : headers) {
String name = header.getName();
if (name.equals(Constants.ODO_PROXY_HEADER)) {
// skip.. don't want to log this
continue;
}
if (headerString.length() != 0) {
headerString += "\n";
}
headerString += header.getName() + ": " + header.getValue();
}
return headerString;
} | [
"Obtain newline-delimited headers from method\n\n@param method HttpMethod to scan\n@return newline-delimited headers"
] | [
"This method lists all tasks defined in the file.\n\n@param file MPX file",
"Reads entries from transforms.xml.\n\n@param file the XML file\n@return the transform entries read from the file\n\n@throws Exception if something goes wrong",
"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.",
"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",
"Parser for actual conditions\n\n@param feed\n@return",
"Uncheck all items in the list including all sub-items.\n@param list list of CmsTreeItem entries.",
"We have received an update that invalidates the beat grid for a player, so clear it and alert\nany listeners if this represents a change. This does not affect the hot cues; they will stick around until the\nplayer loads a new track that overwrites one or more of them.\n\n@param update the update which means we have no beat grid for the associated player",
"Searches for brackets which are only used to construct new matrices by concatenating\n1 or more matrices together",
"Support the subscript operator for CharSequence.\n\n@param text a CharSequence\n@param index the index of the Character to get\n@return the Character at the given index\n@since 1.0"
] |
private void deliverAlbumArtUpdate(int player, AlbumArt art) {
if (!getAlbumArtListeners().isEmpty()) {
final AlbumArtUpdate update = new AlbumArtUpdate(player, art);
for (final AlbumArtListener listener : getAlbumArtListeners()) {
try {
listener.albumArtChanged(update);
} catch (Throwable t) {
logger.warn("Problem delivering album art update to listener", t);
}
}
}
} | [
"Send an album art update announcement to all registered listeners."
] | [
"Counts the amount of 'ch' at the start of this line optionally ignoring\nspaces.\n\n@param ch\nThe char to count.\n@param allowSpaces\nWhether to allow spaces or not\n@return Number of characters found.\n@since 0.12",
"Check the document field's type\nand object\n@param lhs The field to check\n@param rhs The type\n@return Expression: lhs $type rhs",
"Add tasks to the tree.\n\n@param parentNode parent tree node\n@param parent parent task container",
"Throws an IllegalStateException when the given value is not null.\n@return the value",
"Tells you if an expression is the expected constant.\n@param expression\nany expression\n@param expected\nthe expected int or String\n@return\nas described",
"Use this API to update transformpolicy.",
"Generate a map file from a jar file.\n\n@param jarFile jar file\n@param mapFileName map file name\n@param mapClassMethods true if we want to produce .Net style class method names\n@throws XMLStreamException\n@throws IOException\n@throws ClassNotFoundException\n@throws IntrospectionException",
"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",
"Execute a request\n\n@param httpMethodProxyRequest\n@param httpServletRequest\n@param httpServletResponse\n@param history\n@throws Exception"
] |
private void readResources(Project plannerProject) throws MPXJException
{
Resources resources = plannerProject.getResources();
if (resources != null)
{
for (net.sf.mpxj.planner.schema.Resource res : resources.getResource())
{
readResource(res);
}
}
} | [
"This method extracts resource data from a Planner file.\n\n@param plannerProject Root node of the Planner file"
] | [
"Check the given resource back into the pool\n\n@param key The key for the resource\n@param resource The resource",
"Visit an open package of the current module.\n\n@param packaze the qualified name of the opened package.\n@param access the access flag of the opened package,\nvalid values are among {@code ACC_SYNTHETIC} and\n{@code ACC_MANDATED}.\n@param modules the qualified names of the modules that can use deep\nreflection to the classes of the open package or\n<tt>null</tt>.",
"Use this API to fetch authenticationradiusaction resource of given name .",
"SetLoop will either set the GVRNodeAnimation's Repeat Mode to REPEATED if loop is true.\nor it will set the GVRNodeAnimation's Repeat Mode to ONCE if loop is false\nif loop is set to TRUE, when it was previously FALSE, then start the Animation.\n@param doLoop\n@param gvrContext",
"This method allows a pre-existing resource calendar to be attached to a\nresource.\n\n@param calendar resource calendar",
"It is required that T be Serializable",
"Adds the specified list of users as followers to the project. Followers are a subset of members, therefore if\nthe users are not already members of the project they will also become members as a result of this operation.\nReturns the updated project record.\n\n@param project The project to add followers to.\n@return Request object",
"Removes from this set all of its elements that are contained in the specified members array\n@param members the members to remove\n@return the number of members actually removed",
"Deploys application reading resources from specified classpath location\n\n@param applicationName to configure in cluster\n@param classpathLocations where resources are read\n@throws IOException"
] |
protected AbstractElement getEnclosingSingleElementGroup(AbstractElement elementToParse) {
EObject container = elementToParse.eContainer();
if (container instanceof Group) {
if (((Group) container).getElements().size() == 1) {
return (AbstractElement) container;
}
}
return null;
} | [
"Return the containing group if it contains exactly one element.\n\n@since 2.14"
] | [
"Edit which photos are in the photoset.\n\n@param photosetId\nThe photoset ID\n@param primaryPhotoId\nThe primary photo Id\n@param photoIds\nThe photo IDs for the photos in the set\n@throws FlickrException",
"Retrieve the Charset used to read the file.\n\n@return Charset instance",
"Logs to Info if the debug level is greater than or equal to 1.",
"Update max.\n\n@param n the n\n@param c the c",
"Reset the internal state of this object back to what it originally was.\n\nUsed then reloading a server or in a slave host controller following a post-boot reconnect\nto the master.",
"Establish a new master tempo, and if it is a change from the existing one, report it to the listeners.\n\n@param newTempo the newly reported master tempo.",
"Performs a variety of tests to see if the provided matrix is a valid\ncovariance matrix.\n\n@return 0 = is valid 1 = failed positive diagonal, 2 = failed on symmetry, 2 = failed on positive definite",
"Two stage promotion, dry run and actual promotion to verify correctness.\n\n@param promotion\n@param client\n@param listener\n@param buildName\n@param buildNumber\n@throws IOException",
"Loops over cluster and repeatedly tries to break up contiguous runs of\npartitions. After each phase of breaking up contiguous partitions, random\npartitions are selected to move between zones to balance the number of\npartitions in each zone. The second phase may re-introduce contiguous\npartition runs in another zone. Therefore, this overall process is\nrepeated multiple times.\n\n@param nextCandidateCluster\n@param maxContiguousPartitionsPerZone See RebalanceCLI.\n@return updated cluster"
] |
public final static void codeEncode(final StringBuilder out, final String value, final int offset)
{
for (int i = offset; i < value.length(); i++)
{
final char c = value.charAt(i);
switch (c)
{
case '&':
out.append("&");
break;
case '<':
out.append("<");
break;
case '>':
out.append(">");
break;
default:
out.append(c);
}
}
} | [
"Appends the given string to the given StringBuilder, replacing '&',\n'<' and '>' by their respective HTML entities.\n\n@param out\nThe StringBuilder to append to.\n@param value\nThe string to append.\n@param offset\nThe character offset into value from where to start"
] | [
"Performs a null edit on an item. This has some effects on Wikibase,\nsuch as refreshing the labels of the referred items in the UI.\n\n@param itemId\nthe document to perform a null edit on\n@throws MediaWikiApiErrorException\nif the API returns errors\n@throws IOException\nif there are any IO errors, such as missing network connection",
"Calculate the actual bit length of the proposed binary string.",
"Reads the next chunk for the intermediate work buffer.",
"Returns the JMX connector address of a child process.\n\n@param p the process to which to connect\n@param startAgent whether to installed the JMX agent in the target process if not already in place\n@return a {@link JMXServiceURL} to the process's MBean server",
"Calculate start dates for a yearly relative recurrence.\n\n@param calendar current date\n@param dates array of start dates",
"Send message to all connections of a certain user\n\n@param message the message to be sent\n@param username the username\n@return this context",
"Handles newlines by removing them and add new rows instead",
"Gathers information, that couldn't be collected while tree traversal.",
"Attempt to reconnect to Redis.\n\n@param jedis\nthe connection to Redis\n@param reconAttempts\nnumber of times to attempt to reconnect before giving up\n@param reconnectSleepTime\ntime in milliseconds to wait between attempts\n@return true if reconnection was successful"
] |
protected boolean isTransient(ClassDescriptor cld, Object obj, Identity oid)
{
// if the Identity is transient we assume a non-persistent object
boolean isNew = oid != null && oid.isTransient();
/*
detection of new objects is costly (select of ID in DB to check if object
already exists) we do:
a. check if the object has nullified PK field
b. check if the object is already registered
c. lookup from cache and if not found, last option select on DB
*/
if(!isNew)
{
final PersistenceBroker pb = getBroker();
if(cld == null)
{
cld = pb.getClassDescriptor(obj.getClass());
}
isNew = pb.serviceBrokerHelper().hasNullPKField(cld, obj);
if(!isNew)
{
if(oid == null)
{
oid = pb.serviceIdentity().buildIdentity(cld, obj);
}
final ObjectEnvelope mod = objectEnvelopeTable.getByIdentity(oid);
if(mod != null)
{
// already registered object, use current state
isNew = mod.needsInsert();
}
else
{
// if object was found cache, assume it's old
// else make costly check against the DB
isNew = pb.serviceObjectCache().lookup(oid) == null
&& !pb.serviceBrokerHelper().doesExist(cld, oid, obj);
}
}
}
return isNew;
} | [
"Detect new objects."
] | [
"Randomly generates matrix with the specified number of matrix elements filled with values from min to max.\n\n@param numRows Number of rows\n@param numCols Number of columns\n@param nz_total Total number of non-zero elements in the matrix\n@param min Minimum value\n@param max maximum value\n@param rand Random number generated\n@return Randomly generated matrix",
"Create an image of the proper size to hold a new waveform preview image and draw it.",
"Post the specified photo to a blog. Note that the Photo.title and Photo.description are used for the blog entry title and body respectively.\n\n@param photo\nThe photo metadata\n@param blogId\nThe blog ID\n@param blogPassword\nThe blog password\n@throws FlickrException",
"Calculate the value of a swaption assuming the Black'76 model.\n\n@param forwardSwaprate The forward (spot)\n@param volatility The Black'76 volatility.\n@param optionMaturity The option maturity.\n@param optionStrike The option strike.\n@param swapAnnuity The swap annuity corresponding to the underlying swap.\n@return Returns the value of a Swaption under the Black'76 model",
"create a new instance of the class represented by the no-argument constructor provided\n@param constructor the zero argument constructor for the class\n@return a new instance of the class\n@throws InstantiationException\n@throws ClassNotPersistenceCapableException if the constructor is null or there is an\nexception while trying to create a new instance",
"Add a dependency to the graph\n\n@param dependency\n@param graph\n@param depth\n@param parentId",
"Empirical data from 3.x, actual =40",
"Adds a user defined field value to a task.\n\n@param fieldType field type\n@param container FieldContainer instance\n@param row UDF 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"
] |
public static base_responses unset(nitro_service client, String sitename[], String args[]) throws Exception {
base_responses result = null;
if (sitename != null && sitename.length > 0) {
gslbsite unsetresources[] = new gslbsite[sitename.length];
for (int i=0;i<sitename.length;i++){
unsetresources[i] = new gslbsite();
unsetresources[i].sitename = sitename[i];
}
result = unset_bulk_request(client, unsetresources,args);
}
return result;
} | [
"Use this API to unset the properties of gslbsite resources.\nProperties that need to be unset are specified in args array."
] | [
"Converts a sequence of Java characters to a sequence of unicode code points.\n\n@return the number of code points written to the destination buffer",
"Returns the bounding box of the vertices.\n@param corners destination array to get corners of bounding box.\nThe first three entries are the minimum X,Y,Z values\nand the next three are the maximum X,Y,Z.\n@return true if bounds are not empty, false if empty (no vertices)",
"Wrapper to avoid throwing an exception over JMX",
"Retrieves a CodePage instance. Defaults to ANSI.\n\n@param field the index number of the field to be retrieved\n@return the value of the required field",
"Add join info to the query. This can be called multiple times to join with more than one table.",
"This method lists task predecessor and successor relationships.\n\n@param file project file",
"Stores an new entry in the cache.",
"Only one boolean param should be true at a time for this function to return the proper results\n\n@param hostName\n@param enable\n@param disable\n@param remove\n@param isEnabled\n@param exists\n@return\n@throws Exception",
"Adds the specified list of objects at the end of the array.\n\n@param collection The objects to add at the end of the array."
] |
public void clear()
{
Class collClass = getCollectionClass();
// ECER: assure we notify all objects being removed,
// necessary for RemovalAwareCollections...
if (IRemovalAwareCollection.class.isAssignableFrom(collClass))
{
getData().clear();
}
else
{
Collection coll;
// BRJ: use an empty collection so isLoaded will return true
// for non RemovalAwareCollections only !!
try
{
coll = (Collection) collClass.newInstance();
}
catch (Exception e)
{
coll = new ArrayList();
}
setData(coll);
}
_size = 0;
} | [
"Clears the proxy. A cleared proxy is defined as loaded\n\n@see Collection#clear()"
] | [
"Ends the transition",
"Add the string representation of the given object to this sequence immediately. That is, all the trailing\nwhitespace of this sequence will be ignored and the string is appended directly after the last segment that\ncontains something besides whitespace. The given indentation will be prepended to each line except the first one\nif the object has a multi-line string representation.\n\n@param object\nthe to-be-appended object.\n@param indentation\nthe indentation string that should be prepended. May not be <code>null</code>.",
"Populate the expanded exceptions list based on the main exceptions list.\nWhere we find recurring exception definitions, we generate individual\nexceptions for each recurrence to ensure that we account for them correctly.",
"This method processes any extended attributes associated with a task.\n\n@param xml MSPDI task instance\n@param mpx MPX task instance",
"Don't use input, it's match values might have been reset in the\nloop that looks for the first possible match.\n\n@param pairIndex TODO\n@param result TODO\n@return TODO",
"Set OAuth 1 authentication credentials for the replication target\n\n@param consumerSecret client secret\n@param consumerKey client identifier\n@param tokenSecret OAuth server token secret\n@param token OAuth server issued token\n@return this Replication instance to set more options or trigger the replication",
"Constraint that ensures that the field has precision and scale settings if the jdbc type requires it.\n\n@param fieldDef The field descriptor\n@param checkLevel The current check level (this constraint is checked in all levels)",
"Retrieves the value component of a criteria expression.\n\n@param field field type\n@param block block data\n@return field value",
"Over simplistic helper to compare two strings to check radio buttons.\n\n@param value1 the first value\n@param value2 the second value\n@return \"checked\" if both values are equal, the empty String \"\" otherwise"
] |
private GraphicsDocument createFeatureDocument(StringWriter writer) throws RenderException {
if (TileMetadata.PARAM_SVG_RENDERER.equalsIgnoreCase(renderer)) {
DefaultSvgDocument document = new DefaultSvgDocument(writer, false);
document.setMaximumFractionDigits(MAXIMUM_FRACTION_DIGITS);
document.registerWriter(InternalFeatureImpl.class, new SvgFeatureWriter(getTransformer()));
document.registerWriter(InternalTileImpl.class, new SvgTileWriter());
return document;
} else if (TileMetadata.PARAM_VML_RENDERER.equalsIgnoreCase(renderer)) {
DefaultVmlDocument document = new DefaultVmlDocument(writer);
int coordWidth = tile.getScreenWidth();
int coordHeight = tile.getScreenHeight();
document.registerWriter(InternalFeatureImpl.class, new VmlFeatureWriter(getTransformer(), coordWidth,
coordHeight));
document.registerWriter(InternalTileImpl.class, new VmlTileWriter(coordWidth, coordHeight));
document.setMaximumFractionDigits(MAXIMUM_FRACTION_DIGITS);
return document;
} else {
throw new RenderException(ExceptionCode.RENDERER_TYPE_NOT_SUPPORTED, renderer);
}
} | [
"Create a document that parses the tile's featureFragment, using GraphicsWriter classes.\n\n@param writer\nwriter\n@return document\n@throws RenderException\noops"
] | [
"Get a property as an int or default value.\n\n@param key the property name\n@param defaultValue the default value",
"Get a lower-scoped token restricted to a resource for the list of scopes that are passed.\n@param scopes the list of scopes to which the new token should be restricted for\n@param resource the resource for which the new token has to be obtained\n@return scopedToken which has access token and other details",
"Adds a row for the given component at the end of the group.\n\n@param component the component to wrap in the row to be added",
"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",
"Writes a list of UDF types.\n\n@author lsong\n@param type parent entity type\n@param mpxj parent entity\n@return list of UDFAssignmentType instances",
"A slop is dead if the destination node or the store does not exist\nanymore on the cluster.\n\n@param slop\n@return",
"Updates the database. Never call this during normal operations, upgrade is a user-controlled operation.",
"Use this API to fetch all the cachepolicylabel resources that are configured on netscaler.",
"Write a duration field to the JSON file.\n\n@param fieldName field name\n@param value field value"
] |
public static String getExtensionByMimeType(String type) {
MimeTypes types = getDefaultMimeTypes();
try {
return types.forName(type).getExtension();
} catch (Exception e) {
LOGGER.warn("Can't detect extension for MIME-type " + type, e);
return "";
}
} | [
"Generate attachment extension from mime type\n\n@param type valid mime-type\n@return extension if it's known for specified mime-type, or empty string\notherwise"
] | [
"Reads a quoted string value from the request.",
"Answer the orderBy of all Criteria and Sub Criteria\nthe elements are of class Criteria.FieldHelper\n@return List",
"Adds this handler to the widget.\n\n@param <H> the type of handler to add\n@param type the event type\n@param handler the handler\n@return {@link HandlerRegistration} used to remove the handler",
"To store an object in a quick & dirty way.",
"Returns the value of the matrix at the specified index of the 1D row major array.\n\n@see DMatrixRMaj#get(int)\n\n@param index The element's index whose value is to be returned\n@return The value of the specified element.",
"Are both Id's the same?\n\n@param otherElement the other element to compare\n@return true if id == otherElement.id",
"Parse a string representation of an Integer value.\n\n@param value string representation\n@return Integer value",
"Normalizes this vector in place.",
"Use this API to fetch hanode_routemonitor_binding resources of given name ."
] |
private void doDelete(Object obj, boolean ignoreReferences) throws PersistenceBrokerException
{
//logger.info("DELETING " + obj);
// object is not null
if (obj != null)
{
obj = getProxyFactory().getRealObject(obj);
/**
* Kuali Foundation modification -- 8/24/2007
*/
if ( obj == null ) return;
/**
* End of Kuali Foundation modification
*/
/**
* MBAIRD
* 1. if we are marked for delete already, avoid recursing on this object
*
* arminw:
* use object instead Identity object in markedForDelete List,
* because using objects we get a better performance. I can't find
* side-effects in doing so.
*/
if (markedForDelete.contains(obj))
{
return;
}
ClassDescriptor cld = getClassDescriptor(obj.getClass());
//BRJ: check for valid pk
if (!serviceBrokerHelper().assertValidPkForDelete(cld, obj))
{
String msg = "Cannot delete object without valid PKs. " + obj;
logger.error(msg);
return;
}
/**
* MBAIRD
* 2. register object in markedForDelete map.
*/
markedForDelete.add(obj);
Identity oid = serviceIdentity().buildIdentity(cld, obj);
// Invoke events on PersistenceBrokerAware instances and listeners
BEFORE_DELETE_EVENT.setTarget(obj);
fireBrokerEvent(BEFORE_DELETE_EVENT);
BEFORE_DELETE_EVENT.setTarget(null);
// now perform deletion
performDeletion(cld, obj, oid, ignoreReferences);
// Invoke events on PersistenceBrokerAware instances and listeners
AFTER_DELETE_EVENT.setTarget(obj);
fireBrokerEvent(AFTER_DELETE_EVENT);
AFTER_DELETE_EVENT.setTarget(null);
// let the connection manager to execute batch
connectionManager.executeBatchIfNecessary();
}
} | [
"do delete given object. Should be used by all intern classes to delete\nobjects."
] | [
"Start speech recognizer.\n\n@param speechListener",
"The list of device types on which this application can run.",
"Deletes the disabled marker file in the directory of the specified version.\n\n@param version to enable\n@throws PersistenceFailureException if the marker file could not be deleted (can happen if\nthe storage system has become read-only or is otherwise\ninaccessible).",
"Given counters of true positives, false positives, and false\nnegatives, prints out precision, recall, and f1 for each key.",
"Use this API to fetch appfwprofile_cookieconsistency_binding resources of given name .",
"Login the user and redirect back to original URL. If no\noriginal URL found then redirect to `defaultLandingUrl`.\n\n@param userIdentifier\nthe user identifier, could be either userId or username\n@param defaultLandingUrl\nthe URL to be redirected if original URL not found",
"Convert an integer value into a TimeUnit instance.\n\n@param value time unit value\n@return TimeUnit instance",
"Parses a code block with no parentheses and no commas. After it is done there should be a single token left,\nwhich is returned.",
"Returns a map of URIs to package name, as specified by the packageNames\nparameter."
] |
private boolean relevant(File currentLogFile, GregorianCalendar lastRelevantDate) {
String fileName=currentLogFile.getName();
Pattern p = Pattern.compile(APPENER_DATE_DEFAULT_PATTERN);
Matcher m = p.matcher(fileName);
if(m.find()){
int year=Integer.parseInt(m.group(1));
int month=Integer.parseInt(m.group(2));
int dayOfMonth=Integer.parseInt(m.group(3));
GregorianCalendar fileDate=new GregorianCalendar(year, month, dayOfMonth);
fileDate.add(Calendar.MONTH,-1); //Because of Calendar save the month such that January is 0
return fileDate.compareTo(lastRelevantDate)>0;
}
else{
return false;
}
} | [
"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."
] | [
"Unmark a PersistenceBroker as preferred choice for current Thread\n\n@param key The PBKey the broker is associated to\n@param broker The PersistenceBroker to unmark",
"Initialize the container for the current application deployment\n\n@param deploymentManager\n@param deploymentServices",
"Obtain the ID associated with a profile name\n\n@param profileName profile name\n@return ID of profile",
"Signals that the processor to finish and waits until it finishes.",
"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",
"Methods returns InetAddress for localhost\n\n@return InetAddress of the localhost\n@throws UnknownHostException if localhost could not be resolved",
"Record operation for async 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",
"Get the element value in the list by index\n@param index the position in the list from which to get the element\n@return the element value",
"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"
] |
static void export(String path, String queueName, DbConn cnx) throws JqmXmlException
{
// Argument tests
if (queueName == null)
{
throw new IllegalArgumentException("queue name cannot be null");
}
if (cnx == null)
{
throw new IllegalArgumentException("database connection cannot be null");
}
Queue q = CommonXml.findQueue(queueName, cnx);
if (q == null)
{
throw new IllegalArgumentException("there is no queue named " + queueName);
}
List<Queue> l = new ArrayList<>();
l.add(q);
export(path, l, cnx);
} | [
"Exports a single queue to an XML file."
] | [
"Delete an artifact in the Grapes server\n\n@param gavc\n@throws GrapesCommunicationException\n@throws javax.naming.AuthenticationException",
"Append the text at the end of the Path.\n\n@param self a Path\n@param text the text to append at the end of the Path\n@throws java.io.IOException if an IOException occurs.\n@since 2.3.0",
"Map originator type.\n\n@param originatorType the originator type\n@return the originator",
"Set the timeout for idle connections. Voldemort client caches all\nconnections to the Voldemort server. This setting allows the a connection\nto be dropped, if it is idle for more than this time.\n\nThis could be useful in the following cases 1) Voldemort client is not\ndirectly connected to the server and is connected via a proxy or\nfirewall. The Proxy or firewall could drop the connection silently. If\nthe connection is dropped, then client will see operations fail with a\ntimeout. Setting this property enables the Voldemort client to tear down\nthe connection before a firewall could drop it. 2) Voldemort server\ncaches the connection and each connection has an associated memory cost.\nSetting this property on all clients, enable the clients to prune the\nconnections and there by freeing up the server connections.\n\nthrows IllegalArgumentException if the timeout is less than 10 minutes.\n\nCurrently it can't be set below 10 minutes to avoid the racing risk of\ncontention between connection checkout and selector trying to close it.\nThis is intended for low throughput scenarios.\n\n@param idleConnectionTimeout\nzero or negative number to disable the feature ( default -1)\ntimeout\n@param unit {@link TimeUnit}\n@return ClientConfig object for chained set\n\nthrows {@link IllegalArgumentException} if the timeout is greater\nthan 0, but less than 10 minutes.",
"Creates a ServiceCall from an observable object.\n\n@param observable the observable to create from\n@param <T> the type of the response\n@return the created ServiceCall",
"Send JSON representation of a data object to all connections of a certain user\n\n@param data the data to be sent\n@param username the username\n@return this context",
"Parser for actual conditions\n\n@param feed\n@return",
"A write through put to inner-store.\n\n@param keyBytes : keyName strings serialized as bytes eg. 'cluster.xml'\n@param valueBytes : versioned byte[] eg. UTF bytes for cluster xml\ndefinitions\n@throws VoldemortException",
"Use this API to fetch the statistics of all protocoludp_stats resources that are configured on netscaler."
] |
private void readColumn(int startIndex, int length) throws Exception
{
if (m_currentTable != null)
{
int value = FastTrackUtility.getByte(m_buffer, startIndex);
Class<?> klass = COLUMN_MAP[value];
if (klass == null)
{
klass = UnknownColumn.class;
}
FastTrackColumn column = (FastTrackColumn) klass.newInstance();
m_currentColumn = column;
logColumnData(startIndex, length);
column.read(m_currentTable.getType(), m_buffer, startIndex, length);
FastTrackField type = column.getType();
//
// Don't try to add this data if:
// 1. We don't know what type it is
// 2. We have seen the type already
//
if (type != null && !m_currentFields.contains(type))
{
m_currentFields.add(type);
m_currentTable.addColumn(column);
updateDurationTimeUnit(column);
updateWorkTimeUnit(column);
logColumn(column);
}
}
} | [
"Read data for a single column.\n\n@param startIndex block start\n@param length block length"
] | [
"Replace error msg.\n\n@param origMsg\nthe orig msg\n@return the string",
"Returns a compact representation of all of the stories on the task.\n\n@param task The task containing the stories to get.\n@return Request object",
"Starts the HTTP service.\n\n@throws Exception if the service failed to started",
"Builder method for specifying the stack an app should be created on.\n@param stack Stack to create the app on.\n@return A copy of the {@link App}",
"Populates a resource availability table.\n\n@param table resource availability table\n@param data file data",
"Copies from buffer to our internal strBufferIndex, expanding the internal buffer if necessary\n@param offset offset in the buffer to start copying from\n@param length length to copy",
"Use this API to fetch statistics of authenticationvserver_stats resource of given name .",
"Sets a string that will be prepended to the JAR file's data.\n\n@param value the prefix, or {@code null} for none.\n@return {@code this}",
"This method is called when the locale of the parent file is updated.\nIt resets the locale specific currency attributes to the default values\nfor the new locale.\n\n@param properties project properties\n@param locale new locale"
] |
private void deleteByQuery(Query query, ClassDescriptor cld) throws PersistenceBrokerException
{
if (logger.isDebugEnabled())
{
logger.debug("deleteByQuery " + cld.getClassNameOfObject() + ", " + query);
}
if (query instanceof QueryBySQL)
{
String sql = ((QueryBySQL) query).getSql();
this.dbAccess.executeUpdateSQL(sql, cld);
}
else
{
// if query is Identity based transform it to a criteria based query first
if (query instanceof QueryByIdentity)
{
QueryByIdentity qbi = (QueryByIdentity) query;
Object oid = qbi.getExampleObject();
// make sure it's an Identity
if (!(oid instanceof Identity))
{
oid = serviceIdentity().buildIdentity(oid);
}
query = referencesBroker.getPKQuery((Identity) oid);
}
if (!cld.isInterface())
{
this.dbAccess.executeDelete(query, cld);
}
// if class is an extent, we have to delete all extent classes too
String lastUsedTable = cld.getFullTableName();
if (cld.isExtent())
{
Iterator extents = getDescriptorRepository().getAllConcreteSubclassDescriptors(cld).iterator();
while (extents.hasNext())
{
ClassDescriptor extCld = (ClassDescriptor) extents.next();
// read same table only once
if (!extCld.getFullTableName().equals(lastUsedTable))
{
lastUsedTable = extCld.getFullTableName();
this.dbAccess.executeDelete(query, extCld);
}
}
}
}
} | [
"Extent aware Delete by Query\n@param query\n@param cld\n@throws PersistenceBrokerException"
] | [
"Tests whether the ClassNode implements the specified method name\n\n@param classNode The ClassNode\n@param methodName The method name\n@param argTypes\n@return True if it implements the method",
"Retrieves all of the headers from the servlet request and sets them on\nthe proxy request\n\n@param httpServletRequest The request object representing the client's request to the\nservlet engine\n@param httpMethodProxyRequest The request that we are about to send to the proxy host",
"Set the header names to forward from the request. Should not be defined if all is set to true\n\n@param names the header names.",
"Use this API to rename a nsacl6 resource.",
"Use this API to update gslbservice.",
"Visit this and all child nodes.\n\n@param visitor The visitor to use.",
"Get's the user's current upload limits, User object only contains user_id\n\n@return Media Limits",
"This method handles submitting and then waiting for the request from the\nserver. It uses the ClientRequest API to actually write the request and\nthen read back the response. This implementation will block for a\nresponse from the server.\n\n@param <T> Return type\n\n@param clientRequest ClientRequest implementation used to write the\nrequest and read the response\n@param operationName Simple string representing the type of request\n\n@return Data returned by the individual requests",
"Set the attributes of a feature.\n\n@param feature the feature\n@param attributes the attributes\n@throws LayerException oops"
] |
public static vpnvserver_aaapreauthenticationpolicy_binding[] get(nitro_service service, String name) throws Exception{
vpnvserver_aaapreauthenticationpolicy_binding obj = new vpnvserver_aaapreauthenticationpolicy_binding();
obj.set_name(name);
vpnvserver_aaapreauthenticationpolicy_binding response[] = (vpnvserver_aaapreauthenticationpolicy_binding[]) obj.get_resources(service);
return response;
} | [
"Use this API to fetch vpnvserver_aaapreauthenticationpolicy_binding resources of given name ."
] | [
"Entry point for processing saved view state.\n\n@param file project file\n@param varData view state var data\n@param fixedData view state fixed data\n@throws IOException",
"Get a collection of all of the user's groups.\n\n@return A Collection of Group objects\n@throws FlickrException",
"Verify that the given queues are all valid.\n\n@param queues the given queues",
"Utility function to get the current text.",
"Defers an event for processing in a later phase of the current\ntransaction.\n\n@param metadata The event object",
"Registers all custom Externalizer implementations that Hibernate OGM needs into a running\nInfinispan CacheManager configuration.\nThis is only safe to do when Caches from this CacheManager haven't been started yet,\nor the ones already started do not contain any data needing these.\n\n@see ExternalizerIds\n@param globalCfg the Serialization section of a GlobalConfiguration builder",
"Returns the complete definition of a custom field's metadata.\n\n@param customField Globally unique identifier for the custom field.\n@return Request object",
"Use this API to fetch vpnvserver_auditnslogpolicy_binding resources of given name .",
"Parses the provided file, using the given libraryPaths and sourcePaths as context. The libraries may be either\njar files or references to directories containing class files.\n\nThe sourcePaths must be a reference to the top level directory for sources (eg, for a file\nsrc/main/java/org/example/Foo.java, the source path would be src/main/java).\n\nThe wildcard resolver provides a fallback for processing wildcard imports that the underlying parser was unable\nto resolve."
] |
private String safeToString(Object obj)
{
String toString = null;
if (obj != null)
{
try
{
toString = obj.toString();
}
catch (Throwable ex)
{
toString = "BAD toString() impl for " + obj.getClass().getName();
}
}
return toString;
} | [
"provides a safe toString"
] | [
"Scroll to specific page. The final page might be different from the requested one if the\nrequested page is larger than the last page. To process the scrolling by pages\nLayoutScroller must be constructed with a pageSize greater than zero.\n@param pageNumber page to scroll to\n@return the new current item after the scrolling processed.",
"Publish finish events for each of the specified query types\n\n<pre>\n{@code\nRequestEvents.start(\"get\", 1l, bus, \"typeA\", \"custom\");\ntry {\nreturn \"ok\";\n} finally {\nRequestEvents.finish(\"get\", 1l, bus, \"typeA\", \"custom\");\n}\n\n}\n</pre>\n\n\n@param query Completed query\n@param correlationId Identifier\n@param bus EventBus to post events to\n@param types Query types to post to event bus",
"Update the background color of the mBgCircle image view.",
"Use this API to fetch appqoepolicy resource of given name .",
"We need to distinguish the case where we're newly available and the case\nwhere we're already available. So we check the node status before we\nupdate it and return it to the caller.\n\n@param isAvailable True to set to available, false to make unavailable\n\n@return Previous value of isAvailable",
"Adds another condition for an element within this annotation.",
"Add a calendar node.\n\n@param parentNode parent node\n@param calendar calendar",
"Computes the householder vector used in QR decomposition.\n\nu = x / max(x)\nu(0) = u(0) + |u|\nu = u / u(0)\n\n@param x Input vector. Unmodified.\n@return The found householder reflector vector",
"Retrieve an instance of the ResourceField class based on the data read from an\nMS Project file.\n\n@param value value from an MS Project file\n@return ResourceField instance"
] |
public static base_response delete(nitro_service client, dnsaaaarec resource) throws Exception {
dnsaaaarec deleteresource = new dnsaaaarec();
deleteresource.hostname = resource.hostname;
deleteresource.ipv6address = resource.ipv6address;
return deleteresource.delete_resource(client);
} | [
"Use this API to delete dnsaaaarec."
] | [
"Within a single zone, tries swapping some minimum number of random\npartitions per node with some minimum number of random partitions from\nother nodes within the zone. Chooses the best swap in each iteration.\nLarge values of the greedSwapMaxPartitions... arguments make this method\nequivalent to comparing every possible swap. This is very expensive.\n\nNormal case should be :\n\n#zones X #nodes/zone X max partitions/node X max partitions/zone\n\n@param nextCandidateCluster cluster object.\n@param greedyAttempts See RebalanceCLI.\n@param greedySwapMaxPartitionsPerNode See RebalanceCLI.\n@param greedySwapMaxPartitionsPerZone See RebalanceCLI.\n@param greedySwapZoneIds The set of zoneIds to consider. Each zone is done\nindependently.\n@param storeDefs\n@return updated cluster",
"A simple helper method that creates a pool of connections to Redis using\nthe supplied configurations.\n\n@param jesqueConfig the config used to create the pooled Jedis connections\n@param poolConfig the config used to create the pool\n@return a configured Pool of Jedis connections",
"Retrieves the project start date. If an explicit start date has not been\nset, this method calculates the start date by looking for\nthe earliest task start date.\n\n@return project start date",
"Reports that a node is resolved hence other nodes depends on it can consume it.\n\n@param completed the node ready to be consumed",
"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",
"Use this API to fetch bridgegroup_nsip_binding resources of given name .",
"Creates an object from the given JSON data.\n\n@param data the JSON data\n@param clazz the class object for the content of the JSON data\n@param <T> the type of the class object extending {@link InterconnectObject}\n@return the object contained in the given JSON data\n@throws JsonParseException if a the JSON data could not be parsed\n@throws JsonMappingException if the mapping of the JSON data to the IVO failed\n@throws IOException if an I/O related problem occurred",
"Adds a procedure argument definition to this class descriptor.\n\n@param argDef The procedure argument definition",
"Remove a module.\n\n@param moduleName the module name\n@param slot the module slot\n@param existingHash the existing hash\n@return the builder"
] |
private Layout getActiveLayout(Project phoenixProject)
{
//
// Start with the first layout we find
//
Layout activeLayout = phoenixProject.getLayouts().getLayout().get(0);
//
// If this isn't active, find one which is... and if none are,
// we'll just use the first.
//
if (!activeLayout.isActive().booleanValue())
{
for (Layout layout : phoenixProject.getLayouts().getLayout())
{
if (layout.isActive().booleanValue())
{
activeLayout = layout;
break;
}
}
}
return activeLayout;
} | [
"Find the current active layout.\n\n@param phoenixProject phoenix project data\n@return current active layout"
] | [
"Traverses the test case annotations. Will inject a HiveShell in the test case that envelopes the HiveServer.",
"Removes a tag from the resource.\n@param key the key of the tag to remove\n@return the next stage of the definition/update",
"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 a SerialMessage with the MULTI INSTANCE GET command.\nReturns the number of instances for this command class.\n@param the command class to return the number of instances for.\n@return the serial message.",
"Use this API to fetch all the vridparam resources that are configured on netscaler.",
"Gets Widget bounds depth\n@return depth",
"Check that the scope type is allowed by the stereotypes on the bean and\nthe bean type",
"Return a new instance of the BufferedImage\n\n@return BufferedImage",
"public for testing purpose"
] |
public void delete() {
BoxAPIConnection api = this.getAPI();
URL url = COLLABORATION_WHITELIST_ENTRY_URL_TEMPLATE.build(api.getBaseURL(), this.getID());
BoxAPIRequest request = new BoxAPIRequest(api, url, HttpMethod.DELETE);
BoxAPIResponse response = request.send();
response.disconnect();
} | [
"Deletes this collaboration whitelist."
] | [
"Use this API to fetch vrid6 resource of given name .",
"Specify the time out of the session established at the server. The\nsession is kept alive by requests sent by this client object. If the\nsession is idle for a period of time that would timeout the session, the\nclient will send a PING request to keep the session alive.\n\n@param timeout timeout in milliseconds, must be greater than zero and less\nthan 60000.",
"Creates a timestamp from the equivalent long value. This conversion\ntakes account of the time zone and any daylight savings time.\n\n@param timestamp timestamp expressed as a long integer\n@return new Date instance",
"Use this API to add dnstxtrec.",
"Return a copy of the new fragment and set the variable above.",
"Try to build an default PBKey for convenience PB create method.\n\n@return PBKey or <code>null</code> if default key was not declared in\nmetadata",
"Use this API to fetch server_service_binding resources of given name .",
"Gets a Map of attributes from a json object given a path to traverse.\n\n@param record a JSONObject to traverse.\n@param path the json path to follow.\n@return the attributes as a {@link HashMap}, or null if it was not found.",
"Use this API to unset the properties of nstimeout resource.\nProperties that need to be unset are specified in args array."
] |
private int slopSize(Versioned<Slop> slopVersioned) {
int nBytes = 0;
Slop slop = slopVersioned.getValue();
nBytes += slop.getKey().length();
nBytes += ((VectorClock) slopVersioned.getVersion()).sizeInBytes();
switch(slop.getOperation()) {
case PUT: {
nBytes += slop.getValue().length;
break;
}
case DELETE: {
break;
}
default:
logger.error("Unknown slop operation: " + slop.getOperation());
}
return nBytes;
} | [
"Returns the approximate size of slop to help in throttling\n\n@param slopVersioned The versioned slop whose size we want\n@return Size in bytes"
] | [
"Detach a scope from its parent, this will trigger the garbage collection of this scope and it's\nsub-scopes\nif they are not referenced outside of Toothpick.\n\n@param name the name of the scope to close.",
"Fires the event and waits for a specified time.\n\n@param webElement the element to fire event on.\n@param eventable The HTML event type (onclick, onmouseover, ...).\n@return true if firing event is successful.\n@throws InterruptedException when interrupted during the wait.",
"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",
"Create the image elements for the banners tha goes into the\ntitle and header bands depending on the case",
"Return the number of arguments associated with the specified option.\nThe return value includes the actual option.\nWill return 0 if the option is not supported.",
"Get prototype name.\n\n@return prototype name",
"Flushes all changes to disk.",
"Pushes a basic event.\n\n@param eventName The name of the event",
"Disable all overrides for a specified path with overrideType\n\n@param pathID ID of path containing overrides\n@param clientUUID UUID of client\n@param overrideType Override type identifier"
] |
public AnnotationVisitor visitLocalVariableAnnotation(int typeRef,
TypePath typePath, Label[] start, Label[] end, int[] index,
String desc, boolean visible) {
if (mv != null) {
return mv.visitLocalVariableAnnotation(typeRef, typePath, start,
end, index, desc, visible);
}
return null;
} | [
"Visits an annotation on a local variable type.\n\n@param typeRef\na reference to the annotated type. The sort of this type\nreference must be {@link TypeReference#LOCAL_VARIABLE\nLOCAL_VARIABLE} or {@link TypeReference#RESOURCE_VARIABLE\nRESOURCE_VARIABLE}. See {@link TypeReference}.\n@param typePath\nthe path to the annotated type argument, wildcard bound, array\nelement type, or static inner type within 'typeRef'. May be\n<tt>null</tt> if the annotation targets 'typeRef' as a whole.\n@param start\nthe fist instructions corresponding to the continuous ranges\nthat make the scope of this local variable (inclusive).\n@param end\nthe last instructions corresponding to the continuous ranges\nthat make the scope of this local variable (exclusive). This\narray must have the same size as the 'start' array.\n@param index\nthe local variable's index in each range. This array must have\nthe same size as the 'start' array.\n@param desc\nthe class descriptor of the annotation class.\n@param visible\n<tt>true</tt> if the annotation is visible at runtime.\n@return a visitor to visit the annotation values, or <tt>null</tt> if\nthis visitor is not interested in visiting this annotation."
] | [
"Binds the Identities Primary key values to the statement.",
"Disable all overrides for a specified path with overrideType\n\n@param pathID ID of path containing overrides\n@param clientUUID UUID of client\n@param overrideType Override type identifier",
"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",
"Modify a module.\n\n@param moduleName the module name\n@param slot the module slot\n@param existingHash the existing hash\n@param newHash the new hash of the modified content\n@return the builder",
"Parses the supplied text and converts it to a Long\ncorresponding to that midnight in UTC on the specified date.\n\n@return null if it fails to parsing using the specified\nDateTimeFormat",
"Process the hours and exceptions for an individual calendar.\n\n@param calendar project calendar\n@param calendarData hours and exception rows for this calendar",
"Output method responsible for sending the updated content to the Subscribers.\n\n@param cn",
"Layout children inside the layout container",
"Send the message using the JavaMail session defined in the message\n\n@param mimeMessage Message to send"
] |
private <Y> void checkObserverMethod(EnhancedAnnotatedMethod<T, Y> annotated) {
// Make sure exactly one and only one parameter is annotated with Observes or ObservesAsync
List<EnhancedAnnotatedParameter<?, Y>> eventObjects = annotated.getEnhancedParameters(Observes.class);
eventObjects.addAll(annotated.getEnhancedParameters(ObservesAsync.class));
if (this.reception.equals(Reception.IF_EXISTS) && declaringBean.getScope().equals(Dependent.class)) {
throw EventLogger.LOG.invalidScopedConditionalObserver(this, Formats.formatAsStackTraceElement(annotated.getJavaMember()));
}
if (eventObjects.size() > 1) {
throw EventLogger.LOG.multipleEventParameters(this, Formats.formatAsStackTraceElement(annotated.getJavaMember()));
}
EnhancedAnnotatedParameter<?, Y> eventParameter = eventObjects.iterator().next();
checkRequiredTypeAnnotations(eventParameter);
// Check for parameters annotated with @Disposes
List<?> disposeParams = annotated.getEnhancedParameters(Disposes.class);
if (disposeParams.size() > 0) {
throw EventLogger.LOG.invalidDisposesParameter(this, Formats.formatAsStackTraceElement(annotated.getJavaMember()));
}
// Check annotations on the method to make sure this is not a producer
// method, initializer method, or destructor method.
if (this.observerMethod.getAnnotated().isAnnotationPresent(Produces.class)) {
throw EventLogger.LOG.invalidProducer(this, Formats.formatAsStackTraceElement(annotated.getJavaMember()));
}
if (this.observerMethod.getAnnotated().isAnnotationPresent(Inject.class)) {
throw EventLogger.LOG.invalidInitializer(this, Formats.formatAsStackTraceElement(annotated.getJavaMember()));
}
boolean containerLifecycleObserverMethod = Observers.isContainerLifecycleObserverMethod(this);
for (EnhancedAnnotatedParameter<?, ?> parameter : annotated.getEnhancedParameters()) {
// if this is an observer method for container lifecycle event, it must not inject anything besides BeanManager
if (containerLifecycleObserverMethod && !parameter.isAnnotationPresent(Observes.class) && !parameter.isAnnotationPresent(ObservesAsync.class) && !BeanManager.class.equals(parameter.getBaseType())) {
throw EventLogger.LOG.invalidInjectionPoint(this, Formats.formatAsStackTraceElement(annotated.getJavaMember()));
}
}
} | [
"Performs validation of the observer method for compliance with the specifications."
] | [
"Get the inactive history directories.\n\n@return the inactive history",
"Retrieve the value of a single-valued parameter.\n\n@param key\n@param defaultValue\n@param cnx",
"Determine which type of percent complete is used on on this task,\nand calculate the required value.\n\n@param row task data\n@return percent complete value",
"Create the work pattern assignment map.\n\n@param rows calendar rows\n@return work pattern assignment map",
"Allocate a timestamp",
"Assign FK value of main object with PK values of the reference object.\n\n@param obj real object with reference (proxy) object (or real object with set FK values on insert)\n@param cld {@link ClassDescriptor} of the real object\n@param rds An {@link ObjectReferenceDescriptor} of real object.\n@param insert Show if \"linking\" is done while insert or update.",
"Prepare a parallel HTTP OPTION Task.\n\n@param url\nthe UrlPostfix: e.g. in http://localhost:8080/index.html.,the url is \"/index.html\"\n@return the parallel task builder",
"Gets any previous versions of this file. Note that only users with premium accounts will be able to retrieve\nprevious versions of their files.\n\n@return a list of previous file versions.",
"Refresh children using read-resource operation."
] |
public static String next(CharSequence self) {
StringBuilder buffer = new StringBuilder(self);
if (buffer.length() == 0) {
buffer.append(Character.MIN_VALUE);
} else {
char last = buffer.charAt(buffer.length() - 1);
if (last == Character.MAX_VALUE) {
buffer.append(Character.MIN_VALUE);
} else {
char next = last;
next++;
buffer.setCharAt(buffer.length() - 1, next);
}
}
return buffer.toString();
} | [
"This method is called by the ++ operator for the class CharSequence.\nIt increments the last character in the given CharSequence. If the last\ncharacter in the CharSequence is Character.MAX_VALUE a Character.MIN_VALUE\nwill be appended. The empty CharSequence is incremented to a string\nconsisting of the character Character.MIN_VALUE.\n\n@param self a CharSequence\n@return a value obtained by incrementing the toString() of the CharSequence\n@since 1.8.2"
] | [
"Used by TracedParallelBatch where its used to wrap a TraceContext and puts it in the\nregistry for the forked execution. This is marked deprecated as we prefer not to\nexpose details of the RatpackCurrentTraceContext implementation.\n\n@param traceContext a trace context.\n@return a holder for the trace context, which can be put into the registry.",
"Removes all pending broadcasts\n\n@param sessionIds to remove broadcast for (or null for all sessions)",
"Use this API to add dnspolicylabel resources.",
"Use this API to unset the properties of nsip6 resource.\nProperties that need to be unset are specified in args array.",
"Confirms that both clusters have the same number of total partitions.\n\n@param lhs\n@param rhs",
"Convert an array of column definitions into a map keyed by column name.\n\n@param columns array of column definitions\n@return map of column definitions",
"Analyses the content of the general section of an ini configuration file\nand fills out the class arguments with this data.\n\n@param section\n{@link Section} with name \"general\"",
"Reads GIF image from stream.\n\n@param is containing GIF file.\n@return read status code (0 = no errors).",
"Returns the start position of the indicator.\n\n@return The start position of the indicator."
] |
public Task<Void> registerWithEmail(@NonNull final String email, @NonNull final String password) {
return dispatcher.dispatchTask(
new Callable<Void>() {
@Override
public Void call() {
registerWithEmailInternal(email, password);
return null;
}
});
} | [
"Registers a new user with the given email and password.\n\n@param email the email to register with. This will be the username used during log in.\n@param password the password to associated with the email. The password must be between\n6 and 128 characters long.\n@return A {@link Task} that completes when registration completes/fails."
] | [
"Use this API to add sslcipher resources.",
"Skips variable length blocks up to and including next zero length block.",
"This method writes extended attribute data for a task.\n\n@param xml MSPDI task\n@param mpx MPXJ task",
"Returns a reference definition of the given name if it exists.\n\n@param name The name of the reference\n@return The reference def or <code>null</code> if there is no such reference",
"Filter the URI based on a regular expression.\nCan be combined with an additional file-extension filter.",
"Describe the model as a list of resources with their address and model, which\nthe HC can directly apply to create the model. Although the format might appear\nsimilar as the operations generated at boot-time this description is only useful\nto create the resource tree and cannot be used to invoke any operation.\n\n@param rootAddress the address of the root resource being described\n@param resource the root resource\n@return the list of resources",
"Pause between cluster change in metadata and starting server rebalancing\nwork.",
"Performs a request against a Stitch app server determined by the deployment model\nof the underlying app. Throws a Stitch specific exception if the request fails.\n\n@param stitchReq the request to perform.\n@return a {@link Response} to the request.",
"Replace the current with a new generated identity object and\nreturns the old one."
] |
public static int minutesDiff(Date earlierDate, Date laterDate) {
if (earlierDate == null || laterDate == null) {
return 0;
}
return (int) ((laterDate.getTime() / MINUTE_MILLIS) - (earlierDate.getTime() / MINUTE_MILLIS));
} | [
"Get the minutes difference"
] | [
"Used to map from a var data key to a field type. Note this\nis designed for diagnostic use only, and uses an inefficient search.\n\n@param key var data key\n@return field type",
"Adds the parent package to the java.protocol.handler.pkgs system property.",
"This method maps the currency symbol position from the\nrepresentation used in the MPP file to the representation\nused by MPX.\n\n@param value MPP symbol position\n@return MPX symbol position",
"Sends a multipart response. Each body part represents a versioned value\nof the given key.\n\n@throws IOException\n@throws MessagingException",
"Add a dependency to the graph\n\n@param dependency\n@param graph\n@param depth\n@param parentId",
"Convert an Object to a Timestamp, without an Exception",
"Saves messages to a propertyvfsbundle file.\n\n@throws CmsException thrown if writing to the file fails.",
"See convertToSQL92.\n\n@return SQL like sub-expression\n@throws IllegalArgumentException oops",
"Signals that the processor to finish and waits until it finishes."
] |
private long size(final Jedis jedis, final String queueName) {
final String key = key(QUEUE, queueName);
final long size;
if (JedisUtils.isDelayedQueue(jedis, key)) { // If delayed queue, use ZCARD
size = jedis.zcard(key);
} else { // Else, use LLEN
size = jedis.llen(key);
}
return size;
} | [
"Size of a queue.\n\n@param jedis\n@param queueName\n@return"
] | [
"Generates and writes the sql for inserting the currently contained data objects.\n\n@param model The database model\n@param platform The platform\n@param writer The output stream",
"Performs an efficient update of each columns' norm",
"Release the rebalancing permit for a particular node id\n\n@param nodeId The node id whose permit we want to release",
"Returns the value of the matrix at the specified index of the 1D row major array.\n\n@see DMatrixRMaj#get(int)\n\n@param index The element's index whose value is to be returned\n@return The value of the specified element.",
"The third method to write caseManager. Its task is to write the call to\nthe story to be run.\n\n@param caseManager\nthe file where the test must be written\n@param storyName\nthe name of the story\n@param test_path\nthe path where the story can be found\n@param user\nthe user requesting the story\n@param feature\nthe feature requested by the user\n@param benefit\nthe benefit provided by the feature\n@throws BeastException",
"Looks up the EJB in the container and executes the method on it\n\n@param self the proxy instance.\n@param method the overridden method declared in the super class or\ninterface.\n@param proceed the forwarder method for invoking the overridden method. It\nis null if the overridden method is abstract or declared in the\ninterface.\n@param args an array of objects containing the values of the arguments\npassed in the method invocation on the proxy instance. If a\nparameter type is a primitive type, the type of the array\nelement is a wrapper class.\n@return the resulting value of the method invocation.\n@throws Throwable if the method invocation fails.",
"Configure a selector to choose documents that should be added to the index.",
"Returns true if string starts and ends with double-quote\n@param str\n@return",
"Handle content length.\n\n@param event\nthe event"
] |
public <T> T get(Class<T> type) {
return get(type.getName(), type);
} | [
"Access an attribute, hereby using the class name as key.\n\n@param type the type, not {@code null}\n@return the type attribute value, or {@code null}."
] | [
"Sets the top padding for all cells in the table.\n@param paddingTop new padding, ignored if smaller than 0\n@return this to allow chaining",
"Create the index file that sets up the frameset.\n@param outputDirectory The target directory for the generated file(s).",
"Print rate.\n\n@param rate Rate instance\n@return rate value",
"Decrease the indent level.",
"This method dumps the entire contents of a file to an output\nprint writer as ascii data.\n\n@param is Input Stream\n@param pw Output PrintWriter\n@return number of bytes read\n@throws Exception Thrown on file read errors",
"Use this API to disable snmpalarm of given name.",
"Adds an ORDER BY item with a direction indicator.\n\n@param name\nName of the column by which to sort.\n@param ascending\nIf true, specifies the direction \"asc\", otherwise, specifies\nthe direction \"desc\".",
"Fill queue.\n\n@param item the item\n@param minStartPosition the min start position\n@param maxStartPosition the max start position\n@param minEndPosition the min end position\n@throws IOException Signals that an I/O exception has occurred.",
"Given a layer ID, search for the WMS layer.\n\n@param layerId layer id\n@return WMS layer or null if layer is not a WMS layer"
] |
protected int mapGanttBarHeight(int height)
{
switch (height)
{
case 0:
{
height = 6;
break;
}
case 1:
{
height = 8;
break;
}
case 2:
{
height = 10;
break;
}
case 3:
{
height = 12;
break;
}
case 4:
{
height = 14;
break;
}
case 5:
{
height = 18;
break;
}
case 6:
{
height = 24;
break;
}
}
return (height);
} | [
"This method maps the encoded height of a Gantt bar to\nthe height in pixels.\n\n@param height encoded height\n@return height in pixels"
] | [
"Switches from a sparse to dense matrix",
"Helper function to return the minimum size of the index space to be passed to the reduction given the input and\noutput tensors",
"This function is responsible for starting the actual async rebalance\noperation. This is run if this node is the stealer node\n\n<br>\n\nWe also assume that the check that this server is in rebalancing state\nhas been done at a higher level\n\n@param stealInfo Partition info to steal\n@return Returns a id identifying the async operation",
"Collect environment variables and system properties under with filter constrains",
"Assigns retention policy with givenID to folder or enterprise.\n@param api the API connection to be used by the created assignment.\n@param policyID id of the assigned retention policy.\n@param assignTo object representing folder or enterprise to assign policy to.\n@return info about created assignment.",
"If this node represents a bean property this method returns all annotations of its getter.\n\n@return A set of annotations of this nodes property getter or an empty set.",
"Retrieves a field type from a location in a data block.\n\n@param data data block\n@param offset offset into data block\n@return field type",
"Convert weekly recurrence days into a bit field.\n\n@param task recurring task\n@return bit field as a string",
"Constraint that ensures that the field has a conversion if the java type requires it. Also checks the conversion class.\n\n@param fieldDef The field descriptor\n@param checkLevel The current check level (this constraint is checked in basic (partly) and strict)\n@exception ConstraintException If the conversion class is invalid"
] |
public static <T> void injectBoundFields(T instance, CreationalContext<T> creationalContext, BeanManagerImpl manager,
Iterable<? extends FieldInjectionPoint<?, ?>> injectableFields) {
for (FieldInjectionPoint<?, ?> injectableField : injectableFields) {
injectableField.inject(instance, manager, creationalContext);
}
} | [
"Injects bound fields\n\n@param instance The instance to inject into"
] | [
"Process this deployment for annotations. This will use an annotation indexer to create an index of all annotations\nfound in this deployment and attach it to the deployment unit context.\n\n@param phaseContext the deployment unit context\n@throws DeploymentUnitProcessingException",
"Iterates over all tags of current member and evaluates the template for each one.\n\n@param template The template to be evaluated\n@param attributes The attributes of the template tag\n@exception XDocletException If an error occurs\[email protected] type=\"block\"\[email protected] name=\"tagName\" optional=\"false\" description=\"The tag name.\"\[email protected] name=\"paramName\" optional=\"true\" description=\"The parameter name.\"",
"Convenience method that returns the attribute value for the specified attribute name.\n\n@param attributeName the name of the attribute\n@return the value of the attribute or null if no such attribute exists\n@since 1.9.0",
"Set the value of one or more fields based on the contents of a database row.\n\n@param map column to field map\n@param row database row\n@param container field container",
"Check if information model entity referenced by archetype\nhas right name or type",
"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",
"Sets the bytecode compatibility mode\n\n@param version the bytecode compatibility mode",
"Returns a portion of the Bytes object\n\n@param start index of subsequence start (inclusive)\n@param end index of subsequence end (exclusive)",
"Test for equality.\n@param obj1 the first object\n@param obj2 the second object\n@return true if both are null or the two objects are equal"
] |
public boolean getBoolean(FastTrackField type)
{
boolean result = false;
Object value = getObject(type);
if (value != null)
{
result = BooleanHelper.getBoolean((Boolean) value);
}
return result;
} | [
"Retrieve a boolean field.\n\n@param type field type\n@return field data"
] | [
"Get a default style. If null a simple black line style will be returned.\n\n@param geometryType the name of the geometry type (point, line, polygon)",
"Obtains a Julian zoned date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the Julian zoned date-time, not null\n@throws DateTimeException if unable to create the date-time",
"Unicast addresses allocated for private use\n\n@see java.net.InetAddress#isSiteLocalAddress()",
"Get list of Jobs from a queue.\n\n@param jedis\n@param queueName\n@param jobOffset\n@param jobCount\n@return",
"Adds a set of tests based on pattern matching.",
"Use this API to kill systemsession.",
"Convert an Object to a Time.",
"Creates the save and exit button UI Component.\n@return the save and exit button.",
"Check local saved copy first ??. If Auth by username is available, then we will not need to make the API call.\n\n@throws FlickrException"
] |
public ItemRequest<Task> removeFollowers(String task) {
String path = String.format("/tasks/%s/removeFollowers", task);
return new ItemRequest<Task>(this, Task.class, path, "POST");
} | [
"Removes each of the specified followers from the task if they are\nfollowing. Returns the complete, updated record for the affected task.\n\n@param task The task to remove followers from.\n@return Request object"
] | [
"Use this API to add ntpserver.",
"Generate random velocities for every particle. The direction is obtained by assuming\nthe position of a particle as a vector. This normalised vector is scaled by\nthe speed range.\n\n@return",
"Set the inner angle of the spotlight cone in degrees.\n\nBeyond the outer cone angle there is no illumination.\nThe underlying uniform \"outer_cone_angle\" is the cosine\nof this input angle. If the inner cone angle is larger than the outer cone angle\nthere will be unexpected results.\n@see #setInnerConeAngle(float)\n@see #getOuterConeAngle()",
"Returns a pretty printed string of nodes that host specific \"hot\"\npartitions, where hot is defined as following a contiguous run of\npartitions of some length in another zone.\n\n@param cluster The cluster to analyze\n@param hotContiguityCutoff cutoff below which a contiguous run is not\nhot.\n@return pretty string of hot partitions",
"Choose from three numbers based on version.",
"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.",
"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",
"Create a Css Selector Transform",
"Sets the resource to which this calendar is linked. Note that this\nmethod updates the calendar's name to be the same as the resource name.\nIf the resource does not yet have a name, then the calendar is given\na default name.\n\n@param resource resource instance"
] |
public void growInternal(int amount ) {
int tmp[] = new int[ data.length + amount ];
System.arraycopy(data,0,tmp,0,data.length);
this.data = tmp;
} | [
"Increases the internal array's length by the specified amount. Previous values are preserved.\nThe length value is not modified since this does not change the 'meaning' of the array, just\nincreases the amount of data which can be stored in it.\n\nthis.data = new data_type[ data.length + amount ]\n\n\n@param amount Number of elements added to the internal array's length"
] | [
"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",
"Use the universal project reader to open the file.\nThrow an exception if we can't determine the file type.\n\n@param inputFile file name\n@return ProjectFile instance",
"Retrieves the notes text for this resource.\n\n@return notes text",
"Determine if a job name and job type are valid.\n@param jobName the name of the job\n@param jobType the class of the job\n@throws IllegalArgumentException if the name or type are invalid",
"Use this API to fetch server_service_binding resources of given name .",
"Recurses the given folder and adds references to these files to the graph as FileModels.\n\nWe don't set the parent file model in the case of the initial children, as the direct parent is really the archive itself. For example for file\n\"root.zip/pom.xml\" - the parent for pom.xml is root.zip, not the directory temporary directory that happens to hold it.",
"Called by the engine to trigger the cleanup at the end of a payload thread.",
"is ready to service requests",
"Compute costs."
] |
final protected void putChar(char c) {
final int clen = _internalBuffer.length;
if (clen == _bufferPosition) {
final char[] next = new char[2 * clen + 1];
System.arraycopy(_internalBuffer, 0, next, 0, _bufferPosition);
_internalBuffer = next;
}
_internalBuffer[_bufferPosition++] = c;
} | [
"Store the char in the internal buffer"
] | [
"Use this API to unset the properties of coparameter resource.\nProperties that need to be unset are specified in args array.",
"Send message to all connections tagged with all given tags\n@param message the message\n@param labels the tag labels",
"Gets the prefix from value.\n\n@param value the value\n@return the prefix from value",
"Use this API to add tmtrafficaction.",
"Look up record by identity.",
"This method is called to try to catch any invalid tasks that may have sneaked past all our other checks.\nThis is done by validating the tasks by task ID.",
"Gets the task from in progress map.\n\n@param jobId\nthe job id\n@return the task from in progress map",
"If you register a CustomExpression with the name \"customExpName\", then this will create the text needed\nto invoke it in a JRDesignExpression\n\n@param customExpName\n@param usePreviousFieldValues\n@return",
"This method is called to format a relation list.\n\n@param value relation list instance\n@return formatted relation list"
] |
public static double blackModelDgitialCapletValue(
double forward,
double volatility,
double periodLength,
double discountFactor,
double optionMaturity,
double optionStrike)
{
// May be interpreted as a special version of the Black-Scholes Formula
return AnalyticFormulas.blackScholesDigitalOptionValue(forward, 0.0, volatility, optionMaturity, optionStrike) * periodLength * discountFactor;
} | [
"Calculate the value of a digital caplet assuming the Black'76 model.\n\n@param forward The forward (spot).\n@param volatility The Black'76 volatility.\n@param periodLength The period length of the underlying forward rate.\n@param discountFactor The discount factor corresponding to the payment date (option maturity + period length).\n@param optionMaturity The option maturity\n@param optionStrike The option strike.\n@return Returns the price of a digital caplet under the Black'76 model"
] | [
"Try Oracle update batching and call sendBatch or revert to\nJDBC update batching.\n@param stmt the batched prepared statement about to be executed\n@return always <code>null</code> if Oracle update batching is used,\nsince it is impossible to dissolve total row count into distinct\nstatement counts. If JDBC update batching is used, an int array is\nreturned containing number of updated rows for each batched statement.\n@throws PlatformException upon JDBC failure",
"Only meant to be called once\n\n@throws Exception exception",
"This method reads a single byte from the input stream.\n\n@param is the input stream\n@return byte value\n@throws IOException on file read error or EOF",
"Read all configuration files.\n@return the list with all available configurations",
"Delete a path recursively.\n@param path a Path pointing to a file or a directory that may not exists anymore.\n@throws IOException",
"Creates a Blob holding a single-sheet spreadsheet with a pivot of the domain objects. The sheet name is derived from the\nclass name.\n\n<p>\nMinimal requirements for the domain object are:\n</p>\n<ul>\n<li>\nOne property has annotation {@link PivotRow} and will be used as row identifier in left column of pivot.\nEmpty values are supported.\n</li>\n<li>\nAt least one property has annotation {@link PivotColumn}. Its values will be used in columns of pivot.\nEmpty values are supported.\n</li>\n<li>\nAt least one property has annotation {@link PivotValue}. Its values will be distributed in the pivot.\n</li>\n</ul>",
"convenience method for setting working or non-working days.\n\n@param day required day\n@param working flag indicating if the day is a working day",
"Get a bean from the application context. Returns null if the bean does not exist.\n@param name name of bean\n@param requiredType type of bean\n@return the bean or null",
"If a policy already exists on a folder, this will apply that policy to all existing files and sub folders within\nthe target folder.\n\n@param conflictResolution the desired behavior for conflict-resolution. Set to either none or overwrite."
] |
public void setIdleMaxAge(long idleMaxAge, TimeUnit timeUnit) {
this.idleMaxAgeInSeconds = TimeUnit.SECONDS.convert(idleMaxAge, checkNotNull(timeUnit));
} | [
"Sets Idle max age.\n\nThe time, for a connection to remain unused before it is closed off. Do not use aggressive values here!\n@param idleMaxAge time after which a connection is closed off\n@param timeUnit idleMaxAge time granularity."
] | [
"For a particular stealer node find all the primary partitions tuples it\nwill steal.\n\n@param currentCluster The cluster definition of the existing cluster\n@param finalCluster The final cluster definition\n@param stealNodeId Node id of the stealer node\n@return Returns a list of primary partitions which this stealer node will\nget",
"Use this API to fetch all the cmppolicylabel resources that are configured on netscaler.",
"return a prepared Update Statement fitting to the given ClassDescriptor",
"Select item by it's position\n\n@param position int value of item position to select\n@param invokeListeners boolean value for invoking listeners",
"Returns the 'Up' - vector of the camera coordinate system.\n\nThe returned vector is relative to the coordinate space defined by the\ncorresponding node.<p>\n\nThe 'right' vector of the camera coordinate system is the cross product\nof the up and lookAt vectors. The default value is 0|1|0. The vector\nmay be normalized, but it needn't.<p>\n\nThis method is part of the wrapped API (see {@link AiWrapperProvider}\nfor details on wrappers).<p>\n\nThe built-in behavior is to return a {@link AiVector}.\n\n@param wrapperProvider the wrapper provider (used for type inference)\n@return the 'Up' vector",
"Checks if maintenance mode is enabled for the given app\n\n@param appName See {@link #listApps} for a list of apps that can be used.\n@return true if maintenance mode is enabled",
"Add working days and working time to a calendar.\n\n@param mpxjCalendar MPXJ calendar\n@param gpCalendar GanttProject calendar",
"Reads a string of two byte characters from the input array.\nThis method assumes that the string finishes either at the\nend of the array, or when char zero is encountered.\nThe value starts at the position specified by the offset\nparameter.\n\n@param data byte array of data\n@param offset start point of unicode string\n@return string value",
"Returns a non-validating XML parser. The parser ignores both DTDs and XSDs.\n\n@return An XML parser in the form of a DocumentBuilder"
] |
protected void checkForPrimaryKeys(final Object realObject) throws ClassNotPersistenceCapableException
{
// if no PKs are specified OJB can't handle this class !
if (m_pkValues == null || m_pkValues.length == 0)
{
throw createException("OJB needs at least one primary key attribute for class: ", realObject, null);
}
// arminw: should never happen
// if(m_pkValues[0] instanceof ValueContainer)
// throw new OJBRuntimeException("Can't handle pk values of type "+ValueContainer.class.getName());
} | [
"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"
] | [
"Adds a class to the unit.",
"Returns the key for the best matching local-specific property version.\n\n@param propertiesMap the \"raw\" property map\n@param key the name of the property to search for\n@param locale the locale to search for\n\n@return the key for the best matching local-specific property version.",
"Handle content length.\n\n@param event\nthe event",
"Registers all custom Externalizer implementations that Hibernate OGM needs into a running\nInfinispan CacheManager configuration.\nThis is only safe to do when Caches from this CacheManager haven't been started yet,\nor the ones already started do not contain any data needing these.\n\n@see ExternalizerIds\n@param globalCfg the Serialization section of a GlobalConfiguration builder",
"A helper - in Java 9, the extension CL was renamed to platform CL and hosts all the JDK classes. Before 9, it was useless and we used\nbootstrap CL instead.\n\n@return the base CL to use.",
"Helper method to add cue list entries from a parsed ANLZ cue tag\n\n@param entries the list of entries being accumulated\n@param tag the tag whose entries are to be added",
"We have received an update that invalidates the beat grid for a player, so clear it and alert\nany listeners if this represents a change. This does not affect the hot cues; they will stick around until the\nplayer loads a new track that overwrites one or more of them.\n\n@param update the update which means we have no beat grid for the associated player",
"Determine how many forked JVMs to use.",
"Simple context menu handler for multi-select tables.\n\n@param table the table\n@param menu the table's context menu\n@param event the click event\n@param entries the context menu entries"
] |
public static String formatTimeISO8601(TimeValue value) {
StringBuilder builder = new StringBuilder();
DecimalFormat yearForm = new DecimalFormat(FORMAT_YEAR);
DecimalFormat timeForm = new DecimalFormat(FORMAT_OTHER);
if (value.getYear() > 0) {
builder.append("+");
}
builder.append(yearForm.format(value.getYear()));
builder.append("-");
builder.append(timeForm.format(value.getMonth()));
builder.append("-");
builder.append(timeForm.format(value.getDay()));
builder.append("T");
builder.append(timeForm.format(value.getHour()));
builder.append(":");
builder.append(timeForm.format(value.getMinute()));
builder.append(":");
builder.append(timeForm.format(value.getSecond()));
builder.append("Z");
return builder.toString();
} | [
"Returns a representation of the date from the value attributes as ISO\n8601 encoding.\n\n@param value\n@return ISO 8601 value (String)"
] | [
"Internal method which performs the authenticated request by preparing the auth request with\nthe provided auth info and request.",
"Acquire the shared lock allowing the acquisition to be interrupted.\n@param permit - the permit Integer for this operation. May not be {@code null}.\n@throws InterruptedException - if the acquiring thread is interrupted.\n@throws IllegalArgumentException if {@code permit} is null.",
"Retrieve a table of data.\n\n@param type table type\n@return FastTrackTable instance",
"Processes the template for the comma-separated value pairs in an attribute of the current object on the specified level.\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=\"level\" optional=\"false\" description=\"The level for the current object\"\nvalues=\"class,field,reference,collection\"\[email protected] name=\"name\" optional=\"true\" description=\"The name of the attribute containg attributes (defaults to 'attributes')\"\[email protected] name=\"default-right\" optional=\"true\" description=\"The default right value if none is given (defaults to empty value)\"",
"Get string value of flow context for current instance\n@return string value of flow context",
"Get bean for given name in the \"thread\" scope.\n\n@param name name of bean\n@param factory factory for new instances\n@return bean for this scope",
"Set the parent from which this week is derived.\n\n@param parent parent week",
"Gets the Chi Square distance between two normalized histograms.\n\n@param histogram1 Histogram.\n@param histogram2 Histogram.\n@return The Chi Square distance between x and y.",
"Set the weekdays at which the event should take place.\n@param weekDays the weekdays at which the event should take place."
] |
public Object getBeliefValue(String agent_name, final String belief_name,
Connector connector) {
((IExternalAccess) connector.getAgentsExternalAccess(agent_name))
.scheduleStep(new IComponentStep<Integer>() {
public IFuture<Integer> execute(IInternalAccess ia) {
IBDIInternalAccess bia = (IBDIInternalAccess) ia;
belief_value = bia.getBeliefbase()
.getBelief(belief_name).getFact();
return null;
}
}).get(new ThreadSuspendable());
return belief_value;
} | [
"This method takes the value of an agent's belief through its external\naccess\n\n@param agent_name\nThe name of the agent\n@param belief_name\nThe name of the belief inside agent's adf\n@param connector\nThe connector to get the external access\n@return belief_value The value of the requested belief"
] | [
"Aliases variables with an unknown type.\n@param variable The variable being aliased\n@param name Name of the variable",
"Updates the value in HashMap and writeBack as Atomic step",
"Get or create the log context based on the logging profile.\n\n@param loggingProfile the logging profile to get or create the log context for\n\n@return the log context that was found or a new log context",
"Register the given common classes with the ClassUtils cache.",
"Compute the A matrix from the Q and R matrices.\n\n@return The A matrix.",
"Updates the exceptions.\n@param exceptions the exceptions to set",
"Decides what are the preferred credentials to use for resolving the repo keys of the server\n\n@return Preferred credentials for repo resolving. Never null.",
"Initialize the version properties map from the gradle.properties file, and the additional properties from the\ngradle.properties file.",
"Process a single project.\n\n@param reader Primavera reader\n@param projectID required project ID\n@param outputFile output file name"
] |
public final void notifyContentItemRangeChanged(int positionStart, int itemCount) {
if (positionStart < 0 || itemCount < 0 || positionStart + itemCount > contentItemCount) {
throw new IndexOutOfBoundsException("The given range [" + positionStart + " - "
+ (positionStart + itemCount - 1) + "] is not within the position bounds for content items [0 - "
+ (contentItemCount - 1) + "].");
}
notifyItemRangeChanged(positionStart + headerItemCount, itemCount);
} | [
"Notifies that multiple content items are changed.\n\n@param positionStart the position.\n@param itemCount the item count."
] | [
"Merge the contents of the given plugin.xml into this one.",
"sorts are a bit more awkward and need a helper...",
"Sets a property on this Javascript object for which the value is a\nJavascriptEnum\n\nThe value is set to what is returned by the getEnumValue() method on the JavascriptEnum\n\n@param propertyName The name of the property.\n@param propertyValue The value of the property.",
"returns an Array with an Objects PK VALUES\n@throws PersistenceBrokerException if there is an erros accessing o field values",
"Push docker image using the docker java client.\n\n@param imageTag\n@param username\n@param password\n@param host",
"Possibly coalesces the newest change event to match the user's original intent. For example,\nan unsynchronized insert and update is still an insert.\n\n@param lastUncommittedChangeEvent the last change event known about for a document.\n@param newestChangeEvent the newest change event known about for a document.\n@return the possibly coalesced change event.",
"Update the current position with specified length.\nThe input will append to the current position of the iterator.\n\n@param length update length",
"Process each regex group matched substring of the given CharSequence. If the closure\nparameter takes one argument, an array with all match groups is passed to it.\nIf the closure takes as many arguments as there are match groups, then each\nparameter will be one match group.\n\n@param self the source CharSequence\n@param regex a Regex CharSequence\n@param closure a closure with one parameter or as much parameters as groups\n@return the source CharSequence\n@see #eachMatch(String, String, groovy.lang.Closure)\n@since 1.8.2",
"Set RGB output range.\n\n@param outRGB Range."
] |
public FinishRequest toFinishRequest(boolean includeHeaders) {
if (includeHeaders) {
return new FinishRequest(body, copyHeaders(headers), statusCode);
} else {
String mime = null;
if (body!=null) {
mime = "text/plain";
if (headers!=null && (headers.containsKey("Content-Type") || headers.containsKey("content-type"))) {
mime = headers.get("Content-Type");
if (mime==null) {
mime = headers.get("content-type");
}
}
}
return new FinishRequest(body, mime, statusCode);
}
} | [
"Convert the message to a FinishRequest"
] | [
"get an AdminClient from the cache if exists, if not create new one\nand return it. This method is non-blocking.\n\nAll AdminClient returned from checkout, once after the completion of\nusage must be returned to the pool by calling checkin. If not,\nthere will be leak of AdminClients (connections, threads and file handles).\n\n@return AdminClient",
"Use this API to fetch all the snmpoption resources that are configured on netscaler.",
"Call the appropriate handler for handling the httprequest. 404 if path is not found. 405 if path is found but\nhttpMethod does not match what's configured.\n\n@param request instance of {@code HttpRequest}\n@param responder instance of {@code HttpResponder} to handle the request.",
"Complete timing the operation with the given identifier. If you had not previously started a timing operation with this identifier, then this\nwill effectively be a noop.",
"Determines whether a project has the specified publisher type, wrapped by the \"Flexible Publish\" publisher.\n@param project The project\n@param type The type of the publisher\n@return true if the project contains a publisher of the specified type wrapped by the \"Flexible Publish\" publisher.",
"Resets the helper's state.\n\n@return this {@link Searcher} for chaining.",
"Refactor the method into public CXF utility and reuse it from CXF instead copy&paste",
"Get the max extent as a envelop object.",
"Sets the ssh priv key relative path.\nNote that must be relative path for now.\nThis default to no need of passphrase for the private key.\nWill also auto set the login type to key based.\n\n@param privKeyRelativePath\nthe priv key relative path\n@return the parallel task builder"
] |
public void setBooleanAttribute(String name, Boolean value) {
ensureValue();
Attribute attribute = new BooleanAttribute(value);
attribute.setEditable(isEditable(name));
getValue().getAllAttributes().put(name, attribute);
} | [
"Sets the specified boolean 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"
] | [
"Switches from a dense to sparse matrix",
"compute Sinh using Taylor Series.\n\n@param x An angle, in radians.\n@param nTerms Number of terms.\n@return Result.",
"Reverses a sequence of elements.\n@param array Array containing the sequence\n@param first Beginning of the range\n@param last One past the end of the range\n@exception ArrayIndexOutOfBoundsException If the range\nis invalid.",
"Use this API to fetch authenticationradiuspolicy_vpnvserver_binding resources of given name .",
"Resize and return the image passing the new height and width\n\n@param height\n@param width\n@return",
"Creates the code mappings.\n\n@param mtasTokenIdFactory\nthe mtas token id factory\n@param level\nthe level\n@param stringValue\nthe string value\n@param offsetStart\nthe offset start\n@param offsetEnd\nthe offset end\n@param realOffsetStart\nthe real offset start\n@param realOffsetEnd\nthe real offset end\n@param codePositions\nthe code positions\n@throws IOException\nSignals that an I/O exception has occurred.",
"Returns the user defined field without its prefix.\n\n@param field the name of the user defined field\n@return the user defined field without the prefix, or null if the fields\ndoesn't apply to this control file.\n@since 1.1",
"We have received an update that invalidates any previous metadata for that player, so clear it out, and alert\nany listeners if this represents a change. This does not affect the hot cues; they will stick around until the\nplayer loads a new track that overwrites one or more of them.\n\n@param update the update which means we can have no metadata for the associated player",
"get the setter method corresponding to given property"
] |
private static int getTrimmedHeight(BufferedImage img) {
int width = img.getWidth();
int height = img.getHeight();
int trimmedHeight = 0;
for (int i = 0; i < width; i++) {
for (int j = height - 1; j >= 0; j--) {
if (img.getRGB(i, j) != Color.WHITE.getRGB() && j > trimmedHeight) {
trimmedHeight = j;
break;
}
}
}
return trimmedHeight;
} | [
"Get the last non-white Y point\n@param img Image in memory\n@return The trimmed height"
] | [
"A Maven stub is a Maven Project for which we have found information, but the project has not yet been located\nwithin the input application. If we have found an application of the same GAV within the input app, we should\nfill out this stub instead of creating a new one.",
"Set whether we should obtain color versions of waveforms and previews when they are available. This will only\naffect waveforms loaded after the setting has been changed. If this changes the setting, and we were running,\nstop and restart in order to flush and reload the correct waveform versions.\n\n@param preferColor if {@code true}, the full-color versions of waveforms will be requested, if {@code false}\nonly the older blue versions will be retrieved",
"Convert this path address to its model node representation.\n\n@return the model node list of properties",
"Checks if class is on class path\n@param className of the class to check.\n@return true if class in on class path, false otherwise.",
"Implement this to do your drawing.\n\n@param canvas the canvas on which the background will be drawn",
"Counts the number of lines.\n\n@param str the input string\n@return Returns the number of lines terminated by '\\n' in string",
"Convert a drawable object into a Bitmap.\n@param drawable Drawable to extract a Bitmap from.\n@return A Bitmap created from the drawable parameter.",
"Returns the resolution of resolving the conflict between a local and remote event using\nthe given conflict resolver.\n\n@param conflictResolver the conflict resolver to use.\n@param documentId the document id related to the conflicted events.\n@param localEvent the conflicted local event.\n@param remoteEvent the conflicted remote event.\n@return the resolution to the conflict.",
"flush all messages to disk\n\n@param force flush anyway(ignore flush interval)"
] |
public ServerRedirect updateServerRedirectHost(int serverMappingId, String hostHeader) {
ServerRedirect redirect = new ServerRedirect();
BasicNameValuePair[] params = {
new BasicNameValuePair("hostHeader", hostHeader),
new BasicNameValuePair("profileIdentifier", this._profileName)
};
try {
JSONObject response = new JSONObject(doPost(BASE_SERVER + "/" + serverMappingId + "/host", params));
redirect = getServerRedirectFromJSON(response);
} catch (Exception e) {
e.printStackTrace();
return null;
}
return redirect;
} | [
"Update server mapping's host header\n\n@param serverMappingId ID of server mapping\n@param hostHeader value of host header\n@return updated ServerRedirect"
] | [
"Gets the current Stack. If the stack is not set, a new empty instance is created and set.\n@return",
"Find the latest task finish date. We treat this as the\nfinish date for the project.\n\n@return finish date",
"Retrieve the field location for a specific field.\n\n@param type field type\n@return field location",
"Refresh children using read-resource operation.",
"Gets constructors with given annotation type\n\n@param annotationType The annotation type to match\n@return A set of abstracted constructors with given annotation type. If\nthe constructors set is empty, initialize it first. Returns an\nempty set if there are no matches.\n@see org.jboss.weld.annotated.enhanced.EnhancedAnnotatedType#getEnhancedConstructors(Class)",
"2-D Gaussian kernel.\n\n@param size Kernel size (should be odd), [3, 101].\n@return Returns 2-D Gaussian kernel of specified size.",
"Sets the bit at the specified index.\n@param index The index of the bit to set (0 is the least-significant bit).\n@param set A boolean indicating whether the bit should be set or not.\n@throws IndexOutOfBoundsException If the specified index is not a bit\nposition in this bit string.",
"Performs the filtering of the expired entries based on retention time.\nOptionally, deletes them also\n\n@param key the key whose value is to be deleted if needed\n@param vals set of values to be filtered out\n@return filtered list of values which are currently valid",
"Generate a new check box with the provided date and check state.\n@param date date for the check box.\n@param checkState the initial check state.\n@return the created check box"
] |
public void value2x2( double a11 , double a12, double a21 , double a22 )
{
// apply a rotators such that th a11 and a22 elements are the same
double c,s;
if( a12 + a21 == 0 ) { // is this pointless since
c = s = 1.0 / Math.sqrt(2);
} else {
double aa = (a11-a22);
double bb = (a12+a21);
double t_hat = aa/bb;
double t = t_hat/(1.0 + Math.sqrt(1.0+t_hat*t_hat));
c = 1.0/ Math.sqrt(1.0+t*t);
s = c*t;
}
double c2 = c*c;
double s2 = s*s;
double cs = c*s;
double b11 = c2*a11 + s2*a22 - cs*(a12+a21);
double b12 = c2*a12 - s2*a21 + cs*(a11-a22);
double b21 = c2*a21 - s2*a12 + cs*(a11-a22);
// double b22 = c2*a22 + s2*a11 + cs*(a12+a21);
// apply second rotator to make A upper triangular if real eigenvalues
if( b21*b12 >= 0 ) {
if( b12 == 0 ) {
c = 0;
s = 1;
} else {
s = Math.sqrt(b21/(b12+b21));
c = Math.sqrt(b12/(b12+b21));
}
// c2 = b12;//c*c;
// s2 = b21;//s*s;
cs = c*s;
a11 = b11 - cs*(b12 + b21);
// a12 = c2*b12 - s2*b21;
// a21 = c2*b21 - s2*b12;
a22 = b11 + cs*(b12 + b21);
value0.real = a11;
value1.real = a22;
value0.imaginary = value1.imaginary = 0;
} else {
value0.real = value1.real = b11;
value0.imaginary = Math.sqrt(-b21*b12);
value1.imaginary = -value0.imaginary;
}
} | [
"if |a11-a22| >> |a12+a21| there might be a better way. see pg371"
] | [
"Use this API to delete appfwlearningdata.",
"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",
"Find a toBuilder method, if the user has provided one.",
"Creates a polling state.\n\n@param response the response from Retrofit REST call that initiate the long running operation.\n@param lroOptions long running operation options.\n@param defaultRetryTimeout the long running operation retry timeout.\n@param resourceType the type of the resource the long running operation returns\n@param serializerAdapter the adapter for the Jackson object mapper\n@param <T> the result type\n@return the polling state\n@throws IOException thrown by deserialization",
"Format the label text.\n\n@param scaleUnit The unit used for the scalebar.\n@param value The scale value.\n@param intervalUnit The scaled unit for the intervals.",
"Look-up the results data for a particular test class.",
"Remove all the existing links of the Declaration.\n\n@param declarationSRef the ServiceReference<Declaration> of the Declaration",
"append multi clickable SpecialUnit or String\n\n@param specialClickableUnit SpecialClickableUnit\n@param specialUnitOrStrings Unit Or String\n@return",
"Write a message to the console.\n\n@param pattern\nA {@link String#format(String, Object...)} pattern\n@param parameters\nOptional parameters to plug into the pattern"
] |
private void refreshMetadataCache(final Queue<WindupMetadataSystem> metadataSystemCache, final DecompilerSettings settings)
{
metadataSystemCache.clear();
for (int i = 0; i < this.getNumberOfThreads(); i++)
{
metadataSystemCache.add(new NoRetryMetadataSystem(settings.getTypeLoader()));
}
} | [
"The metadata cache can become huge over time. This simply flushes it periodically."
] | [
"Use this API to fetch a tmglobal_binding resource .",
"Acquires a write lock on a specific key.\n@param key The key to lock\n@param timeout in milliseconds; -1 means wait indefinitely, 0 means no wait.",
"Closes off this connection pool.",
"Use this API to fetch a vpnglobal_authenticationsamlpolicy_binding resources.",
"Recover log up to the last complete entry. Truncate off any bytes from any incomplete\nmessages written\n\n@throws IOException any exception",
"Update the value of an embedded node property.\n\n@param executionEngine the {@link GraphDatabaseService} used to run the query\n@param keyValues the columns representing the identifier in the entity owning the embedded\n@param embeddedColumn the column on the embedded node (dot-separated properties)\n@param value the new value for the property",
"Adds a shutdown hook for the process.\n\n@param process the process to add a shutdown hook for\n\n@return the thread set as the shutdown hook\n\n@throws java.lang.SecurityException If a security manager is present and it denies {@link\njava.lang.RuntimePermission <code>RuntimePermission(\"shutdownHooks\")</code>}",
"Use this API to delete ntpserver resources.",
"Infer app name from entry class\n\n@param entryClass\nthe entry class\n@return\napp name inferred from the entry class"
] |
public static void fillHermitian(ZMatrixRMaj A, double min, double max, Random rand) {
if( A.numRows != A.numCols )
throw new IllegalArgumentException("A must be a square matrix");
double range = max-min;
int length = A.numRows;
for( int i = 0; i < length; i++ ) {
A.set(i,i,rand.nextDouble()*range + min,0);
for( int j = i+1; j < length; j++ ) {
double real = rand.nextDouble()*range + min;
double imaginary = rand.nextDouble()*range + min;
A.set(i,j,real,imaginary);
A.set(j,i,real,-imaginary);
}
}
} | [
"Assigns the provided square matrix to be a random Hermitian matrix with elements from min to max value.\n\n@param A The matrix that is to be modified. Must be square. Modified.\n@param min Minimum value an element can have.\n@param max Maximum value an element can have.\n@param rand Random number generator."
] | [
"Updates the information about this collaboration with any info fields that have been modified locally.\n\n@param info the updated info.",
"Assigns an element a value based on its index in the internal array..\n\n@param index The matrix element that is being assigned a value.\n@param value The element's new value.",
"Reads and sets the next feed in the stream.",
"Get an exception reporting a missing, required XML child element.\n@param reader the stream reader\n@param required a set of enums whose toString method returns the\nattribute name\n@return the exception",
"Process the layers.conf file.\n\n@param repoRoot the root\n@return the layers conf\n@throws java.io.IOException",
"For creating regular columns\n@return",
"Serializes the timing data to a \"~\" delimited file at outputPath.",
"Use this API to fetch all the cachecontentgroup resources that are configured on netscaler.",
"Gen error response.\n\n@param t\nthe t\n@return the response on single request"
] |
public ApiClient setHttpClient(OkHttpClient newHttpClient) {
if (!httpClient.equals(newHttpClient)) {
newHttpClient.networkInterceptors().addAll(httpClient.networkInterceptors());
httpClient.networkInterceptors().clear();
newHttpClient.interceptors().addAll(httpClient.interceptors());
httpClient.interceptors().clear();
this.httpClient = newHttpClient;
}
return this;
} | [
"Set HTTP client\n\n@param httpClient\nAn instance of OkHttpClient\n@return Api Client"
] | [
"Whether the specified JavaBeans property exists on the given type or not.\n\n@param clazz the type of interest\n@param property the JavaBeans property name\n@param elementType the element type to check, must be either {@link ElementType#FIELD} or\n{@link ElementType#METHOD}.\n@return {@code true} if the specified property exists, {@code false} otherwise",
"Writes all data that was collected about properties to a json file.",
"Use this API to fetch aaagroup_aaauser_binding resources of given name .",
"Returns a pretty printed string of nodes that host specific \"hot\"\npartitions, where hot is defined as following a contiguous run of\npartitions of some length in another zone.\n\n@param cluster The cluster to analyze\n@param hotContiguityCutoff cutoff below which a contiguous run is not\nhot.\n@return pretty string of hot partitions",
"Computes the best fit set of polynomial coefficients to the provided observations.\n\n@param samplePoints where the observations were sampled.\n@param observations A set of observations.",
"Synchronize the required files to a slave HC from the master DC if this is required.\n@param fileRepository the HostFileRepository of the HC.\n@param contentRepository the ContentRepository of the HC.\n@param backup inidcates if this is a DC backup HC.\n@param oldHash the hash of the deployment to be replaced.\n@return true if the content should be pulled by the slave HC - false otherwise.",
"Check the version to assure it is allowed.\n\n@param pluginName plugin name which needs the dependency\n@param dependency dependency which needs to be verified\n@param requestedVersion requested/minimum version\n@param availableVersion available version\n@return version check problem or empty string when all is fine",
"Find a toBuilder method, if the user has provided one.",
"Hide keyboard from phoneEdit field"
] |
public void load(File file) {
try {
PropertiesConfiguration config = new PropertiesConfiguration();
// disabled to prevent accumulo classpath value from being shortened
config.setDelimiterParsingDisabled(true);
config.load(file);
((CompositeConfiguration) internalConfig).addConfiguration(config);
} catch (ConfigurationException e) {
throw new IllegalArgumentException(e);
}
} | [
"Loads configuration from File. Later loads have lower priority.\n\n@param file File to load from\n@since 1.2.0"
] | [
"Use this API to delete systemuser of given name.",
"Draw an elliptical interior with this color.\n\n@param rect rectangle in which ellipse should fit\n@param color colour to use for filling",
"Only return tools with a name matching this partial string\n@param searchTerm Tool name to search for\n@return This object to allow adding more options",
"Is the given resource type id free?\n@param id to be checked\n@return boolean",
"Returns the Field for a given parent class and a dot-separated path of\nfield names.\n\n@param clazz\nParent class.\n@param path\nPath to the desired field.",
"Apply an XMLDSig onto the passed document.\n\n@param aPrivateKey\nThe private key used for signing. May not be <code>null</code>.\n@param aCertificate\nThe certificate to be used. May not be <code>null</code>.\n@param aDocument\nThe document to be signed. The signature will always be the first\nchild element of the document element. The document may not contains\nany disg:Signature element. This element is inserted manually.\n@throws Exception\nIn case something goes wrong\n@see #createXMLSignature(X509Certificate)",
"Create a Count-Query for QueryBySQL\n\n@param aQuery\n@return The count query",
"Add new control at the end of control bar with specified touch listener.\nSize of control bar is updated based on new number of controls.\n@param name name of the control to remove\n@param properties JSON control specific properties\n@param listener touch listener",
"Converts a collection of dates to a JSON array with the long representation of the dates as strings.\n@param dates the list to convert.\n@return JSON array with long values of dates as string"
] |
@Deprecated
public void setViews(String views) {
if (views != null) {
try {
setViews(Integer.parseInt(views));
} catch (NumberFormatException e) {
setViews(-1);
}
}
} | [
"Sets the number of views for this Photo. For un-authenticated calls this value is not available and will be set to -1.\n\n@param views\n@deprecated attribute no longer available"
] | [
"Performs a Versioned put operation with the specified composite request\nobject\n\n@param requestWrapper Composite request object containing the key and the\nversioned object\n@return Version of the value for the successful put\n@throws ObsoleteVersionException",
"Retrieve the value of a field using its alias.\n\n@param alias field alias\n@return field value",
"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",
"Returns the root path for this source file, based upon the package name.\n\nFor example, if path is \"/project/src/main/java/org/example/Foo.java\" and the package is \"org.example\", then this\nshould return \"/project/src/main/java\".\n\nReturns null if the folder structure does not match the package name.",
"Reset the pool of resources for a specific destination. Idle resources\nwill be destroyed. Checked out resources that are subsequently checked in\nwill be destroyed. Newly created resources can be checked in to\nreestablish resources for the specific destination.",
"What is something came in between when we last checked and when this method is called",
"General API\n-> compile each of supplied files\n-> recompile any required types for which we have an incomplete principle structure",
"This produces a shorter string for the address that uses the canonical representation but not using leading zeroes.\n\nEach address has a unique compressed string.",
"Read custom fields for a GanttProject resource.\n\n@param gpResource GanttProject resource\n@param mpxjResource MPXJ Resource instance"
] |
static <T> boolean syncInstantiation(T objectType) {
List<Template> templates = new ArrayList<>();
Templates tr = TEMP_FINDER.findAnnotations(templates, objectType);
if (tr == null) {
/* Default to synchronous instantiation */
return true;
} else {
return tr.syncInstantiation();
}
} | [
"Returns true if templates are to be instantiated synchronously and false if\nasynchronously."
] | [
"Write objects to data store, but don't release the locks.\nI don't know what we should do if we are in a checkpoint and\nwe need to abort.",
"Set the diffuse light intensity.\n\nThis designates the color of the diffuse reflection.\nIt is multiplied by the material diffuse color to derive\nthe hue of the diffuse reflection for that material.\nThe built-in phong shader {@link GVRPhongShader} uses a {@code vec4} uniform named\n{@code diffuse_intensity} to control the intensity of diffuse light reflected.\n\n@param r red component (0 to 1)\n@param g green component (0 to 1)\n@param b blue component (0 to 1)\n@param a alpha component (0 to 1)",
"Gets an overrideID for a class name, method name\n\n@param className name of class\n@param methodName name of method\n@return override ID of method",
"Get a timer of the given string name and todos for the current thread. If\nno such timer exists yet, then it will be newly created.\n\n@param timerName\nthe name of the timer\n@param todoFlags\n@return timer",
"Use this API to add authenticationradiusaction resources.",
"Read, validate, and discard a single message, returning the next valid offset, and the\nmessage being validated\n\n@throws IOException any exception",
"If X == null then the solution is written into B. Otherwise the solution is copied\nfrom B into X.",
"Find all methods on classes under scanBase that are annotated with annotationClass.\n\n@param scanBase Package to scan recursively, in dot notation (ie: org.jrugged...)\n@param annotationClass Class of the annotation to search for\n@return Set<Method> The set of all @{java.lang.reflect.Method}s having the annotation",
"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"
] |
public void onDrawFrame(float frameTime)
{
if (!isEnabled() || (owner == null) || (getFloat("enabled") <= 0.0f))
{
return;
}
float[] odir = getVec3("world_direction");
float[] opos = getVec3("world_position");
GVRSceneObject parent = owner;
Matrix4f worldmtx = parent.getTransform().getModelMatrix4f();
mOldDir.x = odir[0];
mOldDir.y = odir[1];
mOldDir.z = odir[2];
mOldPos.x = opos[0];
mOldPos.y = opos[1];
mOldPos.z = opos[2];
mNewDir.x = 0.0f;
mNewDir.y = 0.0f;
mNewDir.z = -1.0f;
worldmtx.getTranslation(mNewPos);
worldmtx.mul(mLightRot);
worldmtx.transformDirection(mNewDir);
if ((mOldDir.x != mNewDir.x) || (mOldDir.y != mNewDir.y) || (mOldDir.z != mNewDir.z))
{
setVec4("world_direction", mNewDir.x, mNewDir.y, mNewDir.z, 0);
}
if ((mOldPos.x != mNewPos.x) || (mOldPos.y != mNewPos.y) || (mOldPos.z != mNewPos.z))
{
setPosition(mNewPos.x, mNewPos.y, mNewPos.z);
}
} | [
"Updates the position and direction of this light from the transform of\nscene object that owns it."
] | [
"Use this API to fetch all the snmpmanager resources that are configured on netscaler.",
"For use on a slave HC to get all the server groups used by the host\n\n@param hostResource the host resource\n@return the server configs on this host",
"Use this API to unset the properties of sslcertkey resources.\nProperties that need to be unset are specified in args array.",
"Set up server for report directory.",
"Answer the orderBy of all Criteria and Sub Criteria\nthe elements are of class Criteria.FieldHelper\n@return List",
"Checks if a property's type is valid to be included in the report.\n@param _property the property.\n@return true if the property is is of a valid type.",
"Use this API to unset the properties of responderpolicy resource.\nProperties that need to be unset are specified in args array.",
"Set the classpath for loading the driver using the classpath reference.\n\n@param r reference to the classpath",
"Waits until all pending operations are complete and closes this repository.\n\n@param failureCauseSupplier the {@link Supplier} that creates a new {@link CentralDogmaException}\nwhich will be used to fail the operations issued after this method is called"
] |
public AutomatonInstance doClone() {
AutomatonInstance clone = new AutomatonInstance(this.automatonEng, this.current, this.instanceId, this.safeGuard);
clone.failed = this.failed;
clone.transitionCount = this.transitionCount;
clone.failCount = this.failCount;
clone.iterateCount = this.iterateCount;
clone.backtrackCount = this.backtrackCount;
clone.trace = new LinkedList<>();
for(StateExploration se:this.trace) {
clone.trace.add(se.doClone());
}
return clone;
} | [
"Creates a clone of the current automatonEng instance for\niteration alternative purposes.\n@return"
] | [
"Make a copy of JobContext of current thread\n@return the copy of current job context or an empty job context",
"It should be called when the picker is hidden",
"Get the sub registry for the domain.\n\n@param range the version range\n@return the sub registry",
"Consumes the next character in the request, checking that it matches the\nexpected one. This method should be used when the",
"Adds a chain of vertices to the end of this list.",
"Return all valid tenors for a given moneyness and maturity.\nUses the payment times of the fix schedule to determine fractions.\n\n@param moneyness The moneyness as actual offset from par swap rate for which to get the maturities.\n@param maturity The maturities as year fraction from the reference date.\n@return The tenors as year fraction from reference date.",
"Checks if the specified bytecode version string represents a JDK 1.5+ compatible\nbytecode version.\n@param bytecodeVersion the bytecode version string (1.4, 1.5, 1.6, 1.7 or 1.8)\n@return true if the bytecode version is JDK 1.5+",
"Shows a dialog with user information for given session.\n\n@param session to show information for",
"Determines if this value is the default value for the given field type.\n\n@param type field type\n@param value value\n@return true if the value is not default"
] |
public CollectionRequest<Tag> findByWorkspace(String workspace) {
String path = String.format("/workspaces/%s/tags", workspace);
return new CollectionRequest<Tag>(this, Tag.class, path, "GET");
} | [
"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"
] | [
"Use this API to fetch all the clusterinstance resources that are configured on netscaler.",
"Creates a non-binary media type with the given type, subtype, and UTF-8 encoding\n@throws com.tngtech.jgiven.exception.JGivenWrongUsageException if any of the given arguments is {@code null}",
"Creates a sort configuration iff at least one of the parameters is not null and the options list is not empty.\n@param sortParam The request parameter used to send the currently chosen search option.\n@param options The available sort options.\n@param defaultOption The default sort option.\n@return the sort configuration or null, depending on the arguments.",
"Returns the user records for all users in the specified workspace or\norganization.\n\n@param workspace The workspace in which to get users.\n@return Request object",
"Remove a connection from all keys.\n\n@param connection\nthe connection",
"add a foreign key field",
"Get the root path where the build is located, the project may be checked out to\na sub-directory from the root workspace location.\n\n@param globalEnv EnvVars to take the workspace from, if workspace is not found\nthen it is take from project.getSomeWorkspace()\n@return The location of the root of the Gradle build.\n@throws IOException\n@throws InterruptedException",
"Open the log file for writing.",
"Check whether we have diverged from what we would predict from the last update that was sent to a particular\ntrack position listener.\n\n@param lastUpdate the last update that was sent to the listener\n@param currentUpdate the latest update available for the same player\n\n@return {@code true }if the listener will have diverged by more than our permitted amount of slack, and so\nshould be updated"
] |
public static PredicateExpression all(Object... rhs) {
PredicateExpression ex = new PredicateExpression( "$all", rhs);
if (rhs.length == 1) {
ex.single = true;
}
return ex;
} | [
"Matches an array value if it contains all the elements of the argument array\n@param rhs The arguments\n@return PredicateExpression: $all rhs"
] | [
"Returns the compact project membership records for the project.\n\n@param project The project for which to fetch memberships.\n@return Request object",
"Adds a Statement.\n\n@param rank\nrank of the statement\n@param subject\nrdf resource that refers to the statement",
"This method takes an array of data and uses this to populate the\nfield map.\n\n@param defaultData field map default data",
"read data from channel to buffer\n\n@param channel readable channel\n@param buffer bytebuffer\n@return read size\n@throws IOException any io exception",
"converts a java.net.URI to a decoded string",
"This looks at the servlet attributes to get the list of response headers to remove while the response object gets created by the servlet",
"Get content of a file as a Map<String, String>, using separator to split values\n@param file File to get content\n@param separator The separator\n@return The map with the values\n@throws IOException I/O Error",
"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",
"Set the map attribute.\n\n@param name the attribute name\n@param attribute the attribute"
] |
private Object getParameter(String name, String value) throws ParseException, NumberFormatException {
Object result = null;
if (name.length() > 0) {
switch (name.charAt(0)) {
case 'i':
if (null == value || value.length() == 0) {
value = "0";
}
result = new Integer(value);
break;
case 'f':
if (name.startsWith("form")) {
result = value;
} else {
if (null == value || value.length() == 0) {
value = "0.0";
}
result = new Double(value);
}
break;
case 'd':
if (null == value || value.length() == 0) {
result = null;
} else {
SimpleDateFormat dateParser = new SimpleDateFormat("yyyy-MM-dd");
result = dateParser.parse(value);
}
break;
case 't':
if (null == value || value.length() == 0) {
result = null;
} else {
SimpleDateFormat timeParser = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
result = timeParser.parse(value);
}
break;
case 'b':
result = "true".equalsIgnoreCase(value) ? Boolean.TRUE : Boolean.FALSE;
break;
default:
result = value;
}
if (log.isDebugEnabled()) {
if (result != null) {
log.debug(
"parameter " + name + " value " + result + " class " + result.getClass().getName());
} else {
log.debug("parameter" + name + "is null");
}
}
}
return result;
} | [
"Convert a query parameter to the correct object type based on the first letter of the name.\n\n@param name parameter name\n@param value parameter value\n@return parameter object as\n@throws ParseException value could not be parsed\n@throws NumberFormatException value could not be parsed"
] | [
"Returns true if the given method has a possibly matching instance method with the given name and arguments.\n\n@param name the name of the method of interest\n@param arguments the arguments to match against\n@return true if a matching method was found",
"Use this API to delete application.",
"Add working days and working time to a calendar.\n\n@param mpxjCalendar MPXJ calendar\n@param gpCalendar GanttProject calendar",
"Return the List of Arguments for the specified MethodCallExpression or a ConstructorCallExpression.\nThe returned List contains either ConstantExpression or MapEntryExpression objects.\n@param methodCall - the AST MethodCallExpression or ConstructorCalLExpression\n@return the List of argument objects",
"Method used to write the name of the scenarios\n\n@param word\n@return the same word starting with capital letter",
"Transforms a position according to the current transformation matrix and current page transformation.\n@param x\n@param y\n@return",
"Get the sub registry for the domain.\n\n@param range the version range\n@return the sub registry",
"This method permanently removes a webhook. Note that it may be possible\nto receive a request that was already in flight after deleting the\nwebhook, but no further requests will be issued.\n\n@param webhook The webhook to delete.\n@return Request object",
"Reads an argument of type \"nstring\" from the request."
] |
public void updateSchema(String migrationPath) {
try {
logger.info("Updating schema... ");
int current_version = 0;
// first check the current schema version
HashMap<String, Object> configuration = getFirstResult("SELECT * FROM " + Constants.DB_TABLE_CONFIGURATION +
" WHERE " + Constants.DB_TABLE_CONFIGURATION_NAME + " = \'" + Constants.DB_TABLE_CONFIGURATION_DATABASE_VERSION + "\'");
if (configuration == null) {
logger.info("Creating configuration table..");
// create configuration table
executeUpdate("CREATE TABLE "
+ Constants.DB_TABLE_CONFIGURATION
+ " (" + Constants.GENERIC_ID + " INTEGER IDENTITY,"
+ Constants.DB_TABLE_CONFIGURATION_NAME + " VARCHAR(256),"
+ Constants.DB_TABLE_CONFIGURATION_VALUE + " VARCHAR(1024));");
executeUpdate("INSERT INTO " + Constants.DB_TABLE_CONFIGURATION
+ "(" + Constants.DB_TABLE_CONFIGURATION_NAME + "," + Constants.DB_TABLE_CONFIGURATION_VALUE + ")"
+ " VALUES (\'"
+ Constants.DB_TABLE_CONFIGURATION_DATABASE_VERSION
+ "\', '0');");
} else {
logger.info("Getting current schema version..");
// get current version
current_version = new Integer(configuration.get("VALUE").toString());
logger.info("Current schema version is {}", current_version);
}
// loop through until we get up to the right schema version
while (current_version < Constants.DB_CURRENT_SCHEMA_VERSION) {
current_version++;
// look for a schema file for this version
logger.info("Updating to schema version {}", current_version);
String currentFile = migrationPath + "/schema."
+ current_version;
Resource migFile = new ClassPathResource(currentFile);
BufferedReader in = new BufferedReader(new InputStreamReader(
migFile.getInputStream()));
String str;
while ((str = in.readLine()) != null) {
// execute each line
if (str.length() > 0) {
executeUpdate(str);
}
}
in.close();
}
// update the configuration table with the correct version
executeUpdate("UPDATE " + Constants.DB_TABLE_CONFIGURATION
+ " SET " + Constants.DB_TABLE_CONFIGURATION_VALUE + "='" + current_version
+ "' WHERE " + Constants.DB_TABLE_CONFIGURATION_NAME + "='"
+ Constants.DB_TABLE_CONFIGURATION_DATABASE_VERSION + "';");
} catch (Exception e) {
logger.info("Error in executeUpdate");
e.printStackTrace();
}
} | [
"Update database schema\n\n@param migrationPath path to migrations"
] | [
"Returns the bounding sphere of the vertices.\n@param sphere destination array to get bounding sphere.\nThe first entry is the radius, the next\nthree are the center.\n@return radius of bounding sphere or 0.0 if no vertices",
"Translates the Fluo row, column, and value set into the persistent format that is stored in\nAccumulo.\n\n<p>\nThe objects returned by this method are reused each time its called. So each time this is\ncalled it invalidates what was returned by previous calls to this method.\n\n@return A an array of Accumulo key values in correct sorted order.",
"Modify a module.\n\n@param moduleName the module name\n@param slot the module slot\n@param existingHash the existing hash\n@param newHash the new hash of the modified content\n@return the builder",
"Bessel function of the first kind, of order 0.\n\n@param x Value.\n@return I0 value.",
"Close all JDBC objects related to this connection.",
"Substitute the variables in the given expression with the\nvalues from the resolver\n\n@param pResolver\n@param pExpression",
"Facade method for operating the Shell.\n\nRun the obtained Shell with commandLoop().\n\n@see org.gearvrf.debug.cli.Shell#Shell(org.gearvrf.debug.cli.Shell.Settings, org.gearvrf.debug.cli.CommandTable, java.util.List)\n\n@param prompt Prompt to be displayed\n@param appName The app name string\n@param mainHandler Command handler\n@return Shell that can be either further customized or run directly by calling commandLoop().",
"Get the aggregated result human readable string for easy display.\n\n\n@param aggregateResultMap the aggregate result map\n@return the aggregated result human",
"generate a message for loglevel WARN\n\n@param pObject the message Object"
] |
protected boolean hasVectorClock(boolean isVectorClockOptional) {
boolean result = false;
String vectorClockHeader = this.request.getHeader(RestMessageHeaders.X_VOLD_VECTOR_CLOCK);
if(vectorClockHeader != null) {
ObjectMapper mapper = new ObjectMapper();
try {
VectorClockWrapper vcWrapper = mapper.readValue(vectorClockHeader,
VectorClockWrapper.class);
this.parsedVectorClock = new VectorClock(vcWrapper.getVersions(),
vcWrapper.getTimestamp());
result = true;
} catch(Exception e) {
logger.error("Exception while parsing and constructing vector clock", e);
RestErrorHandler.writeErrorResponse(this.messageEvent,
HttpResponseStatus.BAD_REQUEST,
"Invalid Vector Clock");
}
} else if(!isVectorClockOptional) {
logger.error("Error when validating request. Missing Vector Clock");
RestErrorHandler.writeErrorResponse(this.messageEvent,
HttpResponseStatus.BAD_REQUEST,
"Missing Vector Clock");
} else {
result = true;
}
return result;
} | [
"Retrieve and validate vector clock value from the REST request.\n\"X_VOLD_VECTOR_CLOCK\" is the vector clock header.\n\n@return true if present, false if missing"
] | [
"A GString variant of the equivalent GString method.\n\n@param self the original GString\n@param condition the closure that must evaluate to true to continue taking elements\n@return a prefix of elements in the GString where each\nelement passed to the given closure evaluates to true\n@since 2.3.7",
"Setting the type of Checkbox.",
"Checks if the dependency server is available\n\n@return true if the server is reachable, false otherwise",
"Rethrows OperationCanceledErrors and wraps platform specific OperationCanceledExceptions. Does nothing for any other type of Throwable.",
"Set the named roles which may be defined.\n\n@param roles map with roles, keys are the values for {@link #rolesAttribute}, probably DN values\n@since 1.10.0",
"Returns the filename of the resource with extension.\n\n@return Filename of the GVRAndroidResource. May return null if the\nresource is not associated with any file",
"Retrieves the amount of time represented by a calendar exception\nbefore or after an intersection point.\n\n@param exception calendar exception\n@param date intersection time\n@param after true to report time after intersection, false to report time before\n@return length of time in milliseconds",
"Give an embedded association, creates all the nodes and relationships required to represent it.\nIt assumes that the entity node containing the association already exists in the db.\n\n@param executionEngine the {@link GraphDatabaseService} to run the query\n@param associationKey the {@link AssociationKey} identifying the association\n@param embeddedKey the {@link EntityKey} identifying the embedded component\n@return the created {@link Relationship} that represents the association",
"Remove a server mapping from current profile by ID\n\n@param serverMappingId server mapping ID\n@return Collection of updated ServerRedirects"
] |
static boolean shouldShowRequestPermissionRationale(Activity activity, String... permissions) {
for (String permission : permissions) {
if (ActivityCompat.shouldShowRequestPermissionRationale(activity, permission)) {
return true;
}
}
return false;
} | [
"Checks given permissions are needed to show rationale.\n\n@return returns true if one of the permission is needed to show rationale."
] | [
"Verifies that the connection is still alive. Returns true if it\nis, false if it is not. If the connection is broken we try\nclosing everything, too, so that the caller need only open a new\nconnection.",
"Return a named object associated with the specified key.",
"Rename a key for all languages.\n@param oldKey the key to rename\n@param newKey the new key name\n@return <code>true</code> if renaming was successful, <code>false</code> otherwise.",
"Returns an unmodifiable view of the specified multi-value map.\n\n@param map the map for which an unmodifiable view is to be returned.\n@return an unmodifiable view of the specified multi-value map.",
"Add all headers in a header map.\n\n@param headers a map of headers.\n@return the interceptor instance itself.",
"Has to be called when the scenario is finished in order to execute after methods.",
"Returns if a request should be retried based on the retry count, current response,\nand the current strategy.\n\n@param retryCount The current retry attempt count.\n@param response The exception that caused the retry conditions to occur.\n@return true if the request should be retried; false otherwise.",
"Read activities.",
"Compares two avro strings which contains single store configs\n\n@param configAvro1\n@param configAvro2\n@return true if two config avro strings have same content"
] |
public static <T extends Publisher> T getPublisher(AbstractProject<?, ?> project, Class<T> type) {
// Search for a publisher of the given type in the project and return it if found:
T publisher = new PublisherFindImpl<T>().find(project, type);
if (publisher != null) {
return publisher;
}
// If not found, the publisher might be wrapped by a "Flexible Publish" publisher. The below searches for it inside the
// Flexible Publisher:
publisher = new PublisherFlexible<T>().find(project, type);
return publisher;
} | [
"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"
] | [
"This ensures that we are able to use the default preference from JSDK, to check basically if we are in Android or Not\n@param preference\n@throws BackingStoreException",
"Term value.\n\n@param term\nthe term\n@return the string",
"Open a new content stream.\n\n@param item the content item\n@return the content stream",
"Removes the duplicate node list.\n\n@param list\nthe list\n@return the int",
"Generate query parameters for a forward page with the specified start key.\n\n@param initialQueryParameters page 1 query parameters\n@param startkey the startkey for the forward page\n@param startkey_docid the doc id for the startkey (in case of duplicate keys)\n@param <K> the view key type\n@param <V> the view value type\n@return the query parameters for the forward page",
"Return the AnnotationNode for the named annotation, or else null.\nSupports Groovy 1.5 and Groovy 1.6.\n@param node - the AnnotatedNode\n@param name - the name of the annotation\n@return the AnnotationNode or else null",
"Appends the String representation of the given operand to this CharSequence.\n\n@param left a CharSequence\n@param value any Object\n@return the original toString() of the CharSequence with the object appended\n@since 1.8.2",
"Print a resource type.\n\n@param value ResourceType instance\n@return resource type value",
"For the DC to check whether an operation should be ignored on the slave, if the slave is set up to ignore config not relevant to it\n\n@param domainResource the domain root resource\n@param serverConfigs the server configs the slave is known to have\n@param pathAddress the address of the operation to check if should be ignored or not"
] |
public static <K,V> SortedMap<K,V> asImmutable(SortedMap<K, ? extends V> self) {
return Collections.unmodifiableSortedMap(self);
} | [
"A convenience method for creating an immutable sorted map.\n\n@param self a SortedMap\n@return an immutable SortedMap\n@see java.util.Collections#unmodifiableSortedMap(java.util.SortedMap)\n@since 1.0"
] | [
"Convert a Java date into a Planner date.\n\n20070222\n\n@param value Java Date instance\n@return Planner date",
"Sets the name of the base calendar associated with this task.\nNote that this attribute appears in MPP9 and MSPDI files.\n\n@param calendar calendar instance",
"This method log given exception in specified listener",
"Retrieve the next page and store the continuation token, the new data, and any IOException that may occur.\n\nNote that it is safe to pass null values to {@link CollectionRequest#query(String, Object)}. Method\n{@link com.asana.Client#request(com.asana.requests.Request)} will not include such options.",
"Checks if the DPI value is already set for GeoServer.",
"Obtain an OTMConnection for the given persistence broker key",
"Print channels to the left of log messages\n@param width The width (in characters) to print the channels\n@return this",
"Create a random video.\n\n@return random video.",
"Retrieve the ordinal text for a given integer.\n\n@param value integer value\n@return ordinal text"
] |
public int compareTo(WordTag wordTag) {
int first = (word != null ? word().compareTo(wordTag.word()) : 0);
if(first != 0)
return first;
else {
if (tag() == null) {
if (wordTag.tag() == null)
return 0;
else
return -1;
}
return tag().compareTo(wordTag.tag());
}
} | [
"Orders first by word, then by tag.\n\n@param wordTag object to compare to\n@return result (positive if <code>this</code> is greater than\n<code>obj</code>, 0 if equal, negative otherwise)"
] | [
"Add several jvm metrics.",
"Returns the coupon payment of the period with the given index. The analytic model is needed in case of floating bonds.\n\n@param periodIndex The index of the period of interest.\n@param model The model under which the product is valued.\n@return The value of the coupon payment in the given period.",
"Returns the 'Up' - vector of the camera coordinate system.\n\nThe returned vector is relative to the coordinate space defined by the\ncorresponding node.<p>\n\nThe 'right' vector of the camera coordinate system is the cross product\nof the up and lookAt vectors. The default value is 0|1|0. The vector\nmay be normalized, but it needn't.<p>\n\nThis method is part of the wrapped API (see {@link AiWrapperProvider}\nfor details on wrappers).<p>\n\nThe built-in behavior is to return a {@link AiVector}.\n\n@param wrapperProvider the wrapper provider (used for type inference)\n@return the 'Up' vector",
"Suite end.",
"this method is basically checking whether we can return \"this\" for getNetworkSection",
"Digest format to layer file name.\n\n@param digest\n@return",
"Use this API to update systemuser resources.",
"Send a waveform preview update announcement to all registered listeners.\n\n@param player the player whose waveform preview has changed\n@param preview the new waveform preview, if any",
"Perform the work of processing the various OperationContext.Stage queues, and then the DONE stage."
] |
public static lbmonitor_binding get(nitro_service service, String monitorname) throws Exception{
lbmonitor_binding obj = new lbmonitor_binding();
obj.set_monitorname(monitorname);
lbmonitor_binding response = (lbmonitor_binding) obj.get_resource(service);
return response;
} | [
"Use this API to fetch lbmonitor_binding resource of given name ."
] | [
"List the greetings in the specified guestbook.",
"Use this API to add inat resources.",
"Use this API to fetch all the dospolicy resources that are configured on netscaler.",
"Searches the variables layers, top to bottom, for the iterable having all of it's items of the given type. Return\nnull if not found.",
"Create a buffered image with the correct image bands etc... for the tiles being loaded.\n\n@param imageWidth width of the image to create\n@param imageHeight height of the image to create.",
"The way calendars are stored in an MSPDI file means that there\ncan be forward references between the base calendar unique ID for a\nderived calendar, and the base calendar itself. To get around this,\nwe initially populate the base calendar name attribute with the\nbase calendar unique ID, and now in this method we can convert those\nID values into the correct names.\n\n@param baseCalendars list of calendars and base calendar IDs\n@param map map of calendar ID values and calendar objects",
"Set the mbean server on the QueryExp and try and pass back any previously set one",
"Use this API to update snmpmanager.",
"Returns a new iterator filtering any null references.\n\n@param unfiltered\nthe unfiltered iterator. May not be <code>null</code>.\n@return an unmodifiable iterator containing all elements of the original iterator without any <code>null</code>\nreferences. Never <code>null</code>."
] |
private EndpointOverride getEndpointOverrideFromResultSet(ResultSet results) throws Exception {
EndpointOverride endpoint = new EndpointOverride();
endpoint.setPathId(results.getInt(Constants.GENERIC_ID));
endpoint.setPath(results.getString(Constants.PATH_PROFILE_ACTUAL_PATH));
endpoint.setBodyFilter(results.getString(Constants.PATH_PROFILE_BODY_FILTER));
endpoint.setPathName(results.getString(Constants.PATH_PROFILE_PATHNAME));
endpoint.setContentType(results.getString(Constants.PATH_PROFILE_CONTENT_TYPE));
endpoint.setRequestType(results.getInt(Constants.PATH_PROFILE_REQUEST_TYPE));
endpoint.setRepeatNumber(results.getInt(Constants.REQUEST_RESPONSE_REPEAT_NUMBER));
endpoint.setGroupIds(results.getString(Constants.PATH_PROFILE_GROUP_IDS));
endpoint.setRequestEnabled(results.getBoolean(Constants.REQUEST_RESPONSE_REQUEST_ENABLED));
endpoint.setResponseEnabled(results.getBoolean(Constants.REQUEST_RESPONSE_RESPONSE_ENABLED));
endpoint.setClientUUID(results.getString(Constants.GENERIC_CLIENT_UUID));
endpoint.setProfileId(results.getInt(Constants.GENERIC_PROFILE_ID));
endpoint.setGlobal(results.getBoolean(Constants.PATH_PROFILE_GLOBAL));
return endpoint;
} | [
"Turn a resultset into EndpointOverride\n\n@param results results containing relevant information\n@return EndpointOverride\n@throws Exception exception"
] | [
"Build and return a foreign collection based on the field settings that matches the id argument. This can return\nnull in certain circumstances.\n\n@param parent\nThe parent object that we will set on each item in the collection.\n@param id\nThe id of the foreign object we will look for. This can be null if we are creating an empty\ncollection.",
"Remove a custom field setting on the project.\n\n@param project The project to associate the custom field with\n@return Request object",
"To sql pattern.\n\n@param attribute the attribute\n@return the string",
"Takes a string of the form \"x1=y1,x2=y2,...\" and returns Map\n@param map A string of the form \"x1=y1,x2=y2,...\"\n@return A Map m is returned such that m.get(xn) = yn",
"Iterates through the range of prefixes in this range instance using the given prefix length.\n\n@param prefixLength\n@return",
"Attaches meta info about the current state of the device to an event.\nTypically, this meta is added only to the ping event.",
"Validates for non-conflicting roles",
"Use this API to fetch bridgegroup_nsip_binding resources of given name .",
"Retrieve the value of a single-valued parameter.\n\n@param key\n@param defaultValue\n@param cnx"
] |
private void registerInterceptor(Node source,
String beanName,
BeanDefinitionRegistry registry) {
List<String> methodList = buildMethodList(source);
BeanDefinitionBuilder initializer =
BeanDefinitionBuilder.rootBeanDefinition(SingleServiceWrapperInterceptor.class);
initializer.addPropertyValue("methods", methodList);
String perfMonitorName = beanName + "PerformanceMonitor";
initializer.addPropertyReference("serviceWrapper", perfMonitorName);
String interceptorName = beanName + "PerformanceMonitorInterceptor";
registry.registerBeanDefinition(interceptorName, initializer.getBeanDefinition());
} | [
"Register a new SingleServiceWrapperInterceptor for the bean being\nwrapped, associate it with the PerformanceMonitor and tell it which methods\nto intercept.\n\n@param source An Attribute node from the spring configuration\n@param beanName The name of the bean that this performance monitor is wrapped around\n@param registry The registry where all the spring beans are registered"
] | [
"Use this API to restart dbsmonitors.",
"Returns the position of the specified value in the specified array.\n\n@param value the value to search for\n@param array the array to search in\n@return the position of the specified value in the specified array",
"Retrieve multiple properties.\n\n@param method method definition\n@param object target object\n@param map parameter values",
"Retrieve list of task extended attributes.\n\n@return list of extended attributes",
"Searches for brackets which are only used to construct new matrices by concatenating\n1 or more matrices together",
"Hide multiple channels. All other channels will be unaffected.\n@param channels The channels to hide",
"backing bootstrap method with all parameters",
"Computes the WordNet 2.0 POS tag corresponding to the PTB POS tag s.\n\n@param s a Penn TreeBank POS tag.",
"Read pattern information from the provided JSON object.\n@param patternJson the JSON object containing the pattern information."
] |
public static void writeUTF(@NotNull final OutputStream stream, @NotNull final String str) throws IOException {
try (DataOutputStream dataStream = new DataOutputStream(stream)) {
int len = str.length();
if (len < SINGLE_UTF_CHUNK_SIZE) {
dataStream.writeUTF(str);
} else {
int startIndex = 0;
int endIndex;
do {
endIndex = startIndex + SINGLE_UTF_CHUNK_SIZE;
if (endIndex > len) {
endIndex = len;
}
dataStream.writeUTF(str.substring(startIndex, endIndex));
startIndex += SINGLE_UTF_CHUNK_SIZE;
} while (endIndex < len);
}
}
} | [
"Writes long strings to output stream as several chunks.\n\n@param stream stream to write to.\n@param str string to be written.\n@throws IOException if something went wrong"
] | [
"Set an enterprise date value.\n\n@param index date index (1-30)\n@param value date value",
"The quick way to detect for a tier of devices.\nThis method detects for devices which can\ndisplay iPhone-optimized web content.\nIncludes iPhone, iPod Touch, Android, Windows Phone 7 and 8, BB10, WebOS, Playstation Vita, etc.\n@return detection of any device in the iPhone/Android/Windows Phone/BlackBerry/WebOS Tier",
"Perform the work of processing the various OperationContext.Stage queues, and then the DONE stage.",
"Signal that all threads have run to completion, and the multithreaded\nenvironment is over.\n@param check The name of the thread group passed to startThreads()",
"Parse a duration in minutes form a number of hours.\n\n@param value String representation\n@return Integer instance",
"Create a Map composed of the entries of the first map minus the\nentries of the given map.\n\n@param self a map object\n@param removeMe the entries to remove from the map\n@return the resulting map\n@since 1.7.4",
"Use this API to add cmppolicylabel.",
"Deletes this collaboration whitelist.",
"Write a calendar.\n\n@param record calendar instance\n@throws IOException"
] |
private boolean containsCollectionAndMapsToDifferentTable(CollectionDescriptorDef origCollDef, TableDef origTableDef, ClassDescriptorDef classDef)
{
if (classDef.getBooleanProperty(PropertyHelper.OJB_PROPERTY_GENERATE_TABLE_INFO, true) &&
!origTableDef.getName().equals(classDef.getProperty(PropertyHelper.OJB_PROPERTY_TABLE)))
{
CollectionDescriptorDef curCollDef = classDef.getCollection(origCollDef.getName());
if ((curCollDef != null) &&
!curCollDef.getBooleanProperty(PropertyHelper.OJB_PROPERTY_IGNORE, false))
{
return true;
}
}
return false;
} | [
"Checks whether the given class maps to a different table but also has the given collection.\n\n@param origCollDef The original collection to search for\n@param origTableDef The original table\n@param classDef The class descriptor to test\n@return <code>true</code> if the class maps to a different table and has the collection"
] | [
"Determine the size of a field in a fixed data block.\n\n@param type field data type\n@return field size in bytes",
"Create an error image.\n\n@param area The size of the image",
"Starts or stops capturing.\n\n@param capture If true, capturing is started. If false, it is stopped.\n@param fps Capturing FPS (frames per second).",
"Call this method to initialize the Fluo connection props\n\n@param conf Job configuration\n@param props Use {@link org.apache.fluo.api.config.FluoConfiguration} to set props\nprogrammatically",
"Converts a value to the appropriate type.\n\n@param type target type\n@param value input value\n@return output value",
"We have obtained a beat grid for a device, so store it and alert any listeners.\n\n@param update the update which caused us to retrieve this beat grid\n@param beatGrid the beat grid which we retrieved",
"Type-safe wrapper around setVariable which sets only one framed vertex.",
"Get DPI suggestions.\n\n@return DPI suggestions",
"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"
] |
public static base_response add(nitro_service client, linkset resource) throws Exception {
linkset addresource = new linkset();
addresource.id = resource.id;
return addresource.add_resource(client);
} | [
"Use this API to add linkset."
] | [
"Retrieves a vertex attribute as a float buffer.\nThe attribute name must be one of the\nattributes named in the descriptor passed to the constructor.\n@param attributeName name of the attribute to update\n@throws IllegalArgumentException if attribute name not in descriptor vertex attribute is not <i>float</i>\n@see #setFloatArray(String, float[])\n@see #getFloatVec(String)",
"Resolve an operation transformer entry.\n\n@param address the address\n@param operationName the operation name\n@param placeholderResolver a placeholder resolver used to resolve children of a placeholder registration\n@return the transformer entry",
"Closes the Netty Channel and releases all resources",
"This is the profiles page. this is the 'regular' page when the url is typed in",
"Use this API to clear route6.",
"Computes A-B\n\n@param listA\n@param listB\n@return",
"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",
"Adds, eventually merging, a direction for the specified relation type\n@param relationType\n@param direction",
"Import CountryList from RAW resource\n\n@param context Context\n@return CountryList"
] |
public static base_response update(nitro_service client, snmpalarm resource) throws Exception {
snmpalarm updateresource = new snmpalarm();
updateresource.trapname = resource.trapname;
updateresource.thresholdvalue = resource.thresholdvalue;
updateresource.normalvalue = resource.normalvalue;
updateresource.time = resource.time;
updateresource.state = resource.state;
updateresource.severity = resource.severity;
updateresource.logging = resource.logging;
return updateresource.update_resource(client);
} | [
"Use this API to update snmpalarm."
] | [
"Informs this sequence model that the value of the element at position pos has changed.\nThis allows this sequence model to update its internal model if desired.",
"Decrease the indent level.",
"Convert a document List into arrays storing the data features and labels.\n\n@param document\nTraining documents\n@return A Pair, where the first element is an int[][][] representing the\ndata and the second element is an int[] representing the labels",
"Receive a notification that the channel was closed.\n\nThis is used for the {@link ManagementClientChannelStrategy.Establishing} since it might use multiple channels.\n\n@param closed the closed resource\n@param e the exception which occurred during close, if any",
"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",
"Returns the number of key-value mappings in this map for the third key.\n\n@param firstKey\nthe first key\n@param secondKey\nthe second key\n@return Returns the number of key-value mappings in this map for the third key.",
"Set HTTP headers to allow caching for the given number of seconds.\n\n@param response where to set the caching settings\n@param seconds number of seconds into the future that the response should be cacheable for",
"Resolves the configuration.\n\n@param config The specified configuration.\n@return The resolved configuration.",
"Do the set-up that's needed to access Amazon S3."
] |
private void countPropertyMain(UsageStatistics usageStatistics,
PropertyIdValue property, int count) {
addPropertyCounters(usageStatistics, property);
usageStatistics.propertyCountsMain.put(property,
usageStatistics.propertyCountsMain.get(property) + count);
} | [
"Counts additional occurrences of a property as the main property of\nstatements.\n\n@param usageStatistics\nstatistics object where count is stored\n@param property\nthe property to count\n@param count\nthe number of times to count the property"
] | [
"Reads the NTriples file from the reader, pushing statements into\nthe handler.",
"Compare two versions\n\n@param other\n@return an integer: 0 if equals, -1 if older, 1 if newer\n@throws IncomparableException is thrown when two versions are not coparable",
"Gets the actual key - will create a new row with the max key of table if it\ndoes not exist.\n@param field\n@return\n@throws SequenceManagerException",
"Function to go through all the store definitions contained in the STORES\ndirectory and\n\n1. Update metadata cache.\n\n2. Update STORES_KEY by stitching together all these keys.\n\n3. Update 'storeNames' list.\n\nThis method is not thread safe. It is expected that the caller of this\nmethod will correctly handle concurrency issues. Currently this is not an\nissue since its invoked by init, put, add and delete store all of which\nuse locks to deal with any concurrency related issues.",
"Use this API to fetch all the appfwhtmlerrorpage resources that are configured on netscaler.",
"If a custom CSS file has been specified, returns the path. Otherwise\nreturns null.\n@return A {@link File} pointing to the stylesheet, or null if no stylesheet\nis specified.",
"With the QR algorithm it is possible for the found singular values to be native. This\nmakes them all positive by multiplying it by a diagonal matrix that has",
"Obtains a Accounting zoned date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the Accounting zoned date-time, not null\n@throws DateTimeException if unable to create the date-time",
"Log the data for a single column.\n\n@param startIndex offset into buffer\n@param length length"
] |
private void fireTreeStructureChanged()
{
// Guaranteed to return a non-null array
Object[] listeners = m_listenerList.getListenerList();
TreeModelEvent e = null;
// Process the listeners last to first, notifying
// those that are interested in this event
for (int i = listeners.length - 2; i >= 0; i -= 2)
{
if (listeners[i] == TreeModelListener.class)
{
// Lazily create the event:
if (e == null)
{
e = new TreeModelEvent(getRoot(), new Object[]
{
getRoot()
}, null, null);
}
((TreeModelListener) listeners[i + 1]).treeStructureChanged(e);
}
}
} | [
"Notify listeners that the tree structure has changed."
] | [
"Update the BinderDescriptor of the declarationBinderRef.\n\n@param declarationBinderRef the ServiceReference<DeclarationBinder> of the DeclarationBinder",
"This method is used to configure the primary and alternative\nformat patterns.\n\n@param primaryPattern new format pattern\n@param alternativePatterns alternative format patterns\n@param decimalSeparator Locale specific decimal separator to replace placeholder\n@param groupingSeparator Locale specific grouping separator to replace placeholder",
"Get the property name from the expression.\n\n@param expression expression\n@return property name",
"Sets the target hosts from json path.\n\n@param jsonPath\nthe json path\n@param sourcePath\nthe source path\n@param sourceType\nthe source type\n@return the parallel task builder\n@throws TargetHostsLoadException\nthe target hosts load exception",
"Use this API to delete systemuser of given name.",
"Helper to return the first item in the iterator or null.\n\n@return T the first item or null.",
"Serializes descriptor instance to XML\n@param descriptor descriptor to be serialized\n@return xml representation of descriptor as string",
"Utility method to register a proxy has a Service in OSGi.",
"Upgrades a read transaction to a write transaction, executes the work then downgrades to a read transaction\nagain.\n\n@since 2.4\n@noreference"
] |
public boolean contains(Date date)
{
boolean result = false;
if (date != null)
{
result = (DateHelper.compare(getFromDate(), getToDate(), date) == 0);
}
return (result);
} | [
"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"
] | [
"Use this API to fetch appfwprofile_xmlvalidationurl_binding resources of given name .",
"Convert a Identification to a By used in WebDriver Drivers.\n\n@return the correct By specification of the current Identification.",
"With the QR algorithm it is possible for the found singular values to be native. This\nmakes them all positive by multiplying it by a diagonal matrix that has",
"Add a dependency to the module.\n\n@param dependency Dependency",
"Use this API to fetch the statistics of all rnat_stats resources that are configured on netscaler.",
"MPP14 files seem to exhibit some occasional weirdness\nwith duplicate ID values which leads to the task structure\nbeing reported incorrectly. The following method attempts to correct this.\nThe method uses ordering data embedded in the file to reconstruct\nthe correct ID order of the tasks.",
"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.",
"Returns a time interval as Solr compatible query string.\n@param searchField the field to search for.\n@param startTime the lower limit of the interval.\n@param endTime the upper limit of the interval.\n@return Solr compatible query string.",
"Get the upload parameters.\n@return"
] |
public static boolean isVariable(ASTNode expression, String pattern) {
return (expression instanceof VariableExpression && ((VariableExpression) expression).getName().matches(pattern));
} | [
"Tells you if the given ASTNode is a VariableExpression with the given name.\n@param expression\nany AST Node\n@param pattern\na string pattern to match\n@return\ntrue if the node is a variable with the specified name"
] | [
"Increases the maximum size of the data array so that it can store sparse data up to 'length'. The class\nparameter nz_length is not modified by this function call.\n\n@param arrayLength Desired maximum length of sparse data\n@param preserveValue If true the old values will be copied into the new arrays. If false that step will be skipped.",
"Gets the pathClasses.\nA Map containing hints about what Class to be used for what path segment\nIf local instance not set, try parent Criteria's instance. If this is\nthe top-level Criteria, try the m_query's instance\n@return Returns a Map",
"Fetch a value from the Hashmap .\n\n@param firstKey\nfirst key\n@param secondKey\nsecond key\n@return the element or null.",
"Intercepts calls for setting a key and value for a JSON object\n\n@param name the key name\n@param args the value associated with the key",
"Convert an object to a list.\n\n@param mapper the object mapper\n@param source the source object\n@param targetElementType the target list element type\n@return list",
"Try to link the declaration with the importerService referenced by the ServiceReference,.\nreturn true if they have been link together, false otherwise.\n\n@param declaration The Declaration\n@param declarationBinderRef The ServiceReference<S> of S\n@return true if they have been link together, false otherwise.",
"Use this API to reset appfwlearningdata resources.",
"Checks whether a user account can be locked because of inactivity.\n\n@param cms the CMS context\n@param user the user to check\n@return true if the user may be locked after being inactive for too long",
"Add all elements in the iterable to the collection.\n\n@param target\n@param iterable\n@return true if the target was modified, false otherwise"
] |
@SuppressWarnings("unchecked")
static void logToFile(String filename) {
Logger rootLogger = (Logger) LoggerFactory.getLogger(org.slf4j.Logger.ROOT_LOGGER_NAME);
FileAppender<ILoggingEvent> fileappender = new FileAppender<>();
fileappender.setContext(rootLogger.getLoggerContext());
fileappender.setFile(filename);
fileappender.setName("FILE");
ConsoleAppender<?> console = (ConsoleAppender<?>) rootLogger.getAppender("STDOUT");
fileappender.setEncoder((Encoder<ILoggingEvent>) console.getEncoder());
fileappender.start();
rootLogger.addAppender(fileappender);
console.stop();
} | [
"Configure file logging and stop console logging.\n\n@param filename\nLog to this file."
] | [
"Magnitude of complex number.\n\n@param z Complex number.\n@return Magnitude of complex number.",
"Optimized version of the Wagner & Fischer algorithm that only\nkeeps a single column in the matrix in memory at a time. It\nimplements the simple cutoff, but otherwise computes the entire\nmatrix. It is roughly twice as fast as the original function.",
"Creates a new pagination configuration if at least one of the provided parameters is not null.\nOtherwise returns null.\n@param pageParam The request parameter used to send the current page number.\n@param pageSizes The page sizes for the first pages. The last provided size is the size of all following pages.\n@param pageNavLength The length of the \"Google\"-like page navigation. Should be an odd number.\n@return the pagination configuration, or <code>null</code> if none of the provided parameters is not null.",
"Obtain newline-delimited headers from method\n\n@param method HttpMethod to scan\n@return newline-delimited headers",
"Helper method that encapsulates the minimum logic for adding a high\npriority job to a queue.\n\n@param jedis\nthe connection to Redis\n@param namespace\nthe Resque namespace\n@param queue\nthe Resque queue name\n@param jobJson\nthe job serialized as JSON",
"Rollback the last applied patch.\n\n@param contentPolicy the content policy\n@param resetConfiguration whether to reset the configuration\n@param modification the installation modification\n@return the patching result\n@throws PatchingException",
"Checks the id value.\n\n@param fieldDef The field descriptor\n@param checkLevel The current check level (this constraint is checked in basic and strict)\n@exception ConstraintException If the constraint has been violated",
"Lift a Java Func2 to a Scala Function2\n\n@param f the function to lift\n\n@returns the Scala function",
"Get stream for URL only\n\n@param stringUrl URL to get content\n@return the input stream\n@throws IOException I/O error happened"
] |
Subsets and Splits