query
stringlengths 74
6.1k
| positive
sequencelengths 1
1
| negative
sequencelengths 9
9
|
---|---|---|
private List<String> getRotatedList(List<String> strings) {
int index = RANDOM.nextInt(strings.size());
List<String> rotated = new ArrayList<String>();
for (int i = 0; i < strings.size(); i++) {
rotated.add(strings.get(index));
index = (index + 1) % strings.size();
}
return rotated;
} | [
"Rotate list of String. Used for randomize selection of received endpoints\n\n@param strings\nlist of Strings\n@return the same list in random order"
] | [
"Use this API to fetch all the cmpparameter resources that are configured on netscaler.",
"Puts a new document in the service. The generate key is globally unique.\n\n@param document document\n@return key unique key to reference the document",
"Reads a line from the input stream, where a line is terminated by \\r, \\n, or \\r\\n\n@param trim whether to trim trailing \\r and \\ns",
"Returns the JSON String representation of the payload\naccording to Apple APNS specification\n\n@return the String representation as expected by Apple",
"Inserts a Bundle value into the mapping of the underlying Bundle, replacing any existing value\nfor the given key. Either key or value may be null.\n\n@param key a String, or null\n@param value a Bundle object, or null\n@return this bundler instance to chain method calls",
"Processes a row of the sites table and stores the site information found\ntherein.\n\n@param siteRow\nstring serialisation of a sites table row as found in the SQL\ndump",
"Destroys the internal connection handle and creates a new one.\n@throws SQLException",
"Deletes a vertex from this list.",
"Retrieve a list of the available P3 project names from a directory.\n\n@param directory directory containing P3 files\n@return list of project names"
] |
private Object runWithPossibleProxySwap(Method method, Object target, Object[] args)
throws IllegalAccessException, InvocationTargetException {
Object result;
// swap with proxies to these too.
if (method.getName().equals("createStatement")){
result = memorize((Statement)method.invoke(target, args), this.connectionHandle.get());
}
else if (method.getName().equals("prepareStatement")){
result = memorize((PreparedStatement)method.invoke(target, args), this.connectionHandle.get());
}
else if (method.getName().equals("prepareCall")){
result = memorize((CallableStatement)method.invoke(target, args), this.connectionHandle.get());
}
else result = method.invoke(target, args);
return result;
} | [
"Runs the given method with the specified arguments, substituting with proxies where necessary\n@param method\n@param target proxy target\n@param args\n@return Proxy-fied result for statements, actual call result otherwise\n@throws IllegalAccessException\n@throws InvocationTargetException"
] | [
"Gets a list of registered docker images from the images cache, if it has been\nregistered to the cache for a specific build-info ID and if a docker manifest has been captured for it\nby the build-info proxy.\n@param buildInfoId\n@return",
"Prints a few aspects of the TreebankLanguagePack, just for debugging.",
"Returns the locale specified by the named scoped attribute or context\nconfiguration parameter.\n\n<p> The named scoped attribute is searched in the page, request,\nsession (if valid), and application scope(s) (in this order). If no such\nattribute exists in any of the scopes, the locale is taken from the\nnamed context configuration parameter.\n\n@param pageContext the page in which to search for the named scoped\nattribute or context configuration parameter\n@param name the name of the scoped attribute or context configuration\nparameter\n\n@return the locale specified by the named scoped attribute or context\nconfiguration parameter, or <tt>null</tt> if no scoped attribute or\nconfiguration parameter with the given name exists",
"Compute the location of the generated file from the given trace file.",
"Pseudo-Inverse of a matrix calculated in the least square sense.\n\n@param matrix The given matrix A.\n@return pseudoInverse The pseudo-inverse matrix P, such that A*P*A = A and P*A*P = P",
"Get a property as a double or null.\n\n@param key the property name",
"Adds a metadata classification to the specified file.\n\n@param classificationType the metadata classification type.\n@return the metadata classification type added to the file.",
"Gets JmsDestinationType from java class name\n\nReturns null for unrecognized class",
"Start pushing the element off to the right."
] |
protected void addFacetPart(CmsSolrQuery query) {
query.set("facet", "true");
String excludes = "";
if (m_config.getIgnoreAllFacetFilters()
|| (!m_state.getCheckedEntries().isEmpty() && !m_config.getIsAndFacet())) {
excludes = "{!ex=" + m_config.getIgnoreTags() + "}";
}
for (I_CmsFacetQueryItem q : m_config.getQueryList()) {
query.add("facet.query", excludes + q.getQuery());
}
} | [
"Add query part for the facet, without filters.\n@param query The query part that is extended for the facet"
] | [
"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",
"Add an accessory to be handled and advertised by this root. Any existing Homekit connections\nwill be terminated to allow the clients to reconnect and see the updated accessory list. When\nusing this for a bridge, the ID of the accessory must be greater than 1, as that ID is reserved\nfor the Bridge itself.\n\n@param accessory to advertise and handle.",
"Convert an ObjectBank to arrays of data features and labels.\n\n@return A Pair, where the first element is an int[][][][] representing the\ndata and the second element is an int[][] representing the labels.",
"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)",
"Use this API to fetch lbvserver_auditnslogpolicy_binding resources of given name .",
"Adds all items from the iterable to the Collection.\n\n@param self the collection\n@param items the items to add\n@return true if the collection changed",
"Add an exception to a calendar.\n\n@param parentNode parent node\n@param exception calendar exceptions",
"retrieve an Object by query\nI.e perform a SELECT ... FROM ... WHERE ... in an RDBMS",
"Overridden 'consume' method. Corresponding parent method will be called necessary number of times\n\n@param initialVars - a map containing the initial variables assignments\n@return the number of lines written"
] |
protected void beforeMaterialization()
{
if (_listeners != null)
{
MaterializationListener listener;
for (int idx = _listeners.size() - 1; idx >= 0; idx--)
{
listener = (MaterializationListener) _listeners.get(idx);
listener.beforeMaterialization(this, _id);
}
}
} | [
"Calls beforeMaterialization on all registered listeners in the reverse\norder of registration."
] | [
"Sets the offset for the animation.\n\n@param startOffset animation will start at the specified offset value\n\n@return {@code this}, so you can chain setProperty() calls.\n@throws IllegalArgumentException\nIf {@code startOffset} is either negative or greater than\nthe animation duration",
"Sets the transformations to be applied to the shape before indexing it.\n\n@param transformations the sequence of transformations\n@return this with the specified sequence of transformations",
"Handles the response of the Request node request.\n@param incomingMessage the response message to process.",
"Get a writer implementation to push data into Canvas.\n@param type Interface type you wish to get an implementation for\n@param oauthToken An OAuth token to use for authentication when making API calls\n@param <T> A writer implementation\n@return A writer implementation class",
"Get the JSON string representation of the selector configured for this index.\n\n@return selector JSON as string",
"Use this API to unset the properties of nslimitselector resource.\nProperties that need to be unset are specified in args array.",
"Read calendar hours and exception data.\n\n@param calendar parent calendar\n@param row calendar hours and exception data",
"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",
"Initialize the fat client for the given store.\n\n1. Updates the coordinatorMetadata 2.Gets the new store configs from the\nconfig file 3.Creates a new @SocketStoreClientFactory 4. Subsequently\ncaches the @StoreClient obtained from the factory.\n\n\nThis is synchronized because if Coordinator Admin is already doing some\nchange we want the AsyncMetadataVersionManager to wait.\n\n@param storeName"
] |
public static appfwprofile_csrftag_binding[] get(nitro_service service, String name) throws Exception{
appfwprofile_csrftag_binding obj = new appfwprofile_csrftag_binding();
obj.set_name(name);
appfwprofile_csrftag_binding response[] = (appfwprofile_csrftag_binding[]) obj.get_resources(service);
return response;
} | [
"Use this API to fetch appfwprofile_csrftag_binding resources of given name ."
] | [
"Sets the provided square matrix to be a random symmetric matrix whose values are selected from an uniform distribution\nfrom min to max, inclusive.\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.",
"Adds the correct load instruction based on the type descriptor\n\n@param code the bytecode to add the instruction to\n@param type the type of the variable\n@param variable the variable number",
"Returns the list of colliders attached to scene objects that are\nvisible from the viewpoint of the camera.\n\n<p>\nThis method is thread safe because it guarantees that only\none thread at a time is picking against particular scene graph,\nand it extracts the hit data during within its synchronized block. You\ncan then examine the return list without worrying about another thread\ncorrupting your hit data.\n\nThe hit location returned is the world position of the scene object center.\n\n@param scene\nThe {@link GVRScene} with all the objects to be tested.\n\n@return A list of {@link org.gearvrf.GVRPicker.GVRPickedObject}, sorted by distance from the\ncamera rig. Each {@link org.gearvrf.GVRPicker.GVRPickedObject} contains the scene object\nwhich owns the {@link GVRCollider} along with the hit\nlocation and distance from the camera.\n\n@since 1.6.6",
"Check whether error handling works. If it works, you should see an\nok, otherwise, you might see the actual error message and then\nthe program exits.",
"Update an existing feature. Made package private for testing purposes.\n\n@param feature feature to update\n@throws LayerException oops",
"Use this API to rename a responderpolicy resource.",
"Reads Netscape extension to obtain iteration count.",
"Returns the logger name that should be used in the log manager.\n\n@param name the name of the logger from the resource\n\n@return the name of the logger",
"Apply clipping to the features in a tile. The tile and its features should already be in map space.\n\n@param tile\ntile to put features in\n@param scale\nscale\n@param panOrigin\nWhen panning on the client, only this parameter changes. So we need to be aware of it as we calculate\nthe maxScreenEnvelope.\n@throws GeomajasException oops"
] |
protected void checkConsecutiveAlpha() {
Pattern symbolsPatter = Pattern.compile(REGEX_ALPHA_UC + "+");
Matcher matcher = symbolsPatter.matcher(this.password);
int met = 0;
while (matcher.find()) {
int start = matcher.start();
int end = matcher.end();
if (start == end) {
continue;
}
int diff = end - start;
if (diff >= 3) {
met += diff;
}
}
this.result.negative(met * CONSECUTIVE_ALPHA_WEIGHT);
// alpha lower case
symbolsPatter = Pattern.compile(REGEX_ALPHA_LC + "+");
matcher = symbolsPatter.matcher(this.password);
met = 0;
while (matcher.find()) {
int start = matcher.start();
int end = matcher.end();
if (start == end) {
continue;
}
int diff = end - start;
if (diff >= 3) {
met += diff;
}
}
this.result.negative(met * CONSECUTIVE_ALPHA_WEIGHT);
} | [
"those could be incorporated with above, but that would blurry everything."
] | [
"Scans the given file looking for a complete zip file format end of central directory record.\n\n@param file the file\n\n@return true if a complete end of central directory record could be found\n\n@throws IOException",
"Use this API to update clusterinstance resources.",
"Accessor method used to retrieve a Number instance representing the\ncontents of an individual field. If the field does not exist in the\nrecord, null is returned.\n\n@param field the index number of the field to be retrieved\n@return the value of the required field\n@throws MPXJException normally thrown when parsing fails",
"Returns the property value read from the given JavaBean.\n\n@param bean the JavaBean to read the property from\n@param property the property to read\n\n@return the property value read from the given JavaBean",
"Obtains a local date in Symmetry010 calendar system from the\nera, year-of-era and day-of-year fields.\n\n@param era the Symmetry010 era, not null\n@param yearOfEra the year-of-era\n@param dayOfYear the day-of-year\n@return the Symmetry010 local date, not null\n@throws DateTimeException if unable to create the date\n@throws ClassCastException if the {@code era} is not a {@code IsoEra}",
"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.",
"If the file is compressed, handle this so that the stream is ready to read.\n\n@param stream input stream\n@return uncompressed input stream",
"Attempts to return the token from cache. If this is not possible because it is expired or was\nnever assigned, a new token is requested and parallel requests will block on retrieving a new\ntoken. As such no guarantee of maximum latency is provided.\n\nTo avoid blocking the token is refreshed before it's expiration, while parallel requests\ncontinue to use the old token.",
"Moves the cursor to the given row number in the iterator. If the row\nnumber is positive, the cursor moves to the given row number with\nrespect to the beginning of the iterator. The first row is row 1, the\nsecond is row 2, and so on.\n\n@param row the row to move to in this iterator, by absolute number"
] |
@Override
@SuppressWarnings("unchecked")
public ChronoZonedDateTime<AccountingDate> zonedDateTime(TemporalAccessor temporal) {
return (ChronoZonedDateTime<AccountingDate>) super.zonedDateTime(temporal);
} | [
"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"
] | [
"Makes the object unpickable and removes the touch handler for it\n@param sceneObject\n@return true if the handler has been successfully removed",
"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",
"Set new point coordinates somewhere on screen and apply new direction\n\n@param position the point position to apply new values to",
"Extract name of the resource from a resource ID.\n@param id the resource ID\n@return the name of the resource",
"Performs backward pass of Batch Normalization layer. Returns x gradient,\nbnScale gradient and bnBias gradient",
"Returns the meta-data for the inverse side of the association represented by the given property on the given\npersister in case it represents the main side of a bi-directional one-to-many or many-to-many association.\n\n@param mainSidePersister persister of the entity hosting the property of interest\n@param propertyIndex index of the property of interest\n@return the meta-data of the inverse side of the specified association or {@code null} if no such meta-data\nexists",
"Decode the password from the given data. Will decode the data block as well.\n\n@param data encrypted data block\n@param encryptionCode encryption code\n\n@return password",
"Extract schema of the key field",
"Send a request for a menu that we will retrieve items from in subsequent requests, when the request must reflect\nthe actual type of track being asked about.\n\n@param requestType identifies what kind of menu request to send\n@param targetMenu the destination for the response to this query\n@param slot the media library of interest for this query\n@param trackType the type of track for which metadata is being requested, since this affects the request format\n@param arguments the additional arguments needed, if any, to complete the request\n\n@return the {@link Message.KnownType#MENU_AVAILABLE} response reporting how many items are available in the menu\n\n@throws IOException if there is a problem communicating, or if the requested menu is not available\n@throws IllegalStateException if {@link #tryLockingForMenuOperations(long, TimeUnit)} was not called successfully\nbefore attempting this call"
] |
protected void fixIntegerPrecisions(ItemIdValue itemIdValue,
String propertyId) {
String qid = itemIdValue.getId();
try {
// Fetch the online version of the item to make sure we edit the
// current version:
ItemDocument currentItemDocument = (ItemDocument) dataFetcher
.getEntityDocument(qid);
if (currentItemDocument == null) {
System.out.println("*** " + qid
+ " could not be fetched. Maybe it has been deleted.");
return;
}
// Get the current statements for the property we want to fix:
StatementGroup editPropertyStatements = currentItemDocument
.findStatementGroup(propertyId);
if (editPropertyStatements == null) {
System.out.println("*** " + qid
+ " no longer has any statements for " + propertyId);
return;
}
PropertyIdValue property = Datamodel
.makeWikidataPropertyIdValue(propertyId);
List<Statement> updateStatements = new ArrayList<>();
for (Statement s : editPropertyStatements) {
QuantityValue qv = (QuantityValue) s.getValue();
if (qv != null && isPlusMinusOneValue(qv)) {
QuantityValue exactValue = Datamodel.makeQuantityValue(
qv.getNumericValue(), qv.getNumericValue(),
qv.getNumericValue());
Statement exactStatement = StatementBuilder
.forSubjectAndProperty(itemIdValue, property)
.withValue(exactValue).withId(s.getStatementId())
.withQualifiers(s.getQualifiers())
.withReferences(s.getReferences())
.withRank(s.getRank()).build();
updateStatements.add(exactStatement);
}
}
if (updateStatements.size() == 0) {
System.out.println("*** " + qid + " quantity values for "
+ propertyId + " already fixed");
return;
}
logEntityModification(currentItemDocument.getEntityId(),
updateStatements, propertyId);
dataEditor.updateStatements(currentItemDocument, updateStatements,
Collections.<Statement> emptyList(),
"Set exact values for [[Property:" + propertyId + "|"
+ propertyId + "]] integer quantities (Task MB2)");
} catch (MediaWikiApiErrorException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
} | [
"Fetches the current online data for the given item, and fixes the\nprecision of integer quantities if necessary.\n\n@param itemIdValue\nthe id of the document to inspect\n@param propertyId\nid of the property to consider"
] | [
"Find a statement group by its property id, without checking for\nequality with the site IRI. More efficient implementation than\nthe default one.",
"These exact lines are shared between three different tools, so\nthey have been moved here to reduce code duplication.\n@return The parsed command-line, with options removed.",
"Build the Criteria using multiple ORs\n@param ids collection of identities\n@param fields\n@return Criteria",
"Removes any child object that has the given name by performing\ncase-sensitive search.\n\n@param name name of scene object to be removed.\n\n@return number of removed objects, 0 if none was found.",
"Use this API to fetch csvserver_cachepolicy_binding resources of given name .",
"Parse rate.\n\n@param value rate value\n@return Rate instance",
"copy all fields from the \"from\" object to the \"to\" object.\n\n@param from source object\n@param to from's clone\n@param fields fields to be populated\n@param accessible 'true' if all 'fields' have been made accessible during\ntraversal",
"Returns true if the ASTNode is a declaration of a closure, either as a declaration\nor a field.\n@param expression\nthe target expression\n@return\nas described",
"Convert an MPXJ Duration instance into an integer duration in minutes\nready to be written to an MPX file.\n\n@param properties project properties, used for duration units conversion\n@param duration Duration instance\n@return integer duration in minutes"
] |
public ReferenceDescriptorDef getReference(String name)
{
ReferenceDescriptorDef refDef;
for (Iterator it = _references.iterator(); it.hasNext(); )
{
refDef = (ReferenceDescriptorDef)it.next();
if (refDef.getName().equals(name))
{
return refDef;
}
}
return null;
} | [
"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"
] | [
"Checks given permissions are needed to show rationale.\n\n@return returns true if one of the permission is needed to show rationale.",
"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",
"Method is called by spring and verifies that there is only one plugin per URI scheme.",
"Performs a standard QR decomposition on the specified submatrix that is one block wide.\n\n@param blockLength\n@param Y\n@param gamma",
"Creates an IBlur instance for the given algorithm enum\n\n@param algorithm\n@param contextWrapper\n@return",
"Ensures that the primary keys required by the given reference are present in the referenced class.\n\n@param modelDef The model\n@param refDef The reference\n@throws ConstraintException If there is a conflict between the primary keys",
"Use this API to fetch linkset resource of given name .",
"Compute a singular-value decomposition of A.\n\n@return A DoubleMatrix[3] array of U, S, V such that A = U * diag(S) * V'",
"Return the class's name, possibly by stripping the leading path"
] |
public static <T extends JsonRtn> T parseJsonRtn(String jsonRtn, Class<T> jsonRtnClazz) {
T rtn = JSONObject.parseObject(jsonRtn, jsonRtnClazz);
appendErrorHumanMsg(rtn);
return rtn;
} | [
"parse json text to specified class\n\n@param jsonRtn\n@param jsonRtnClazz\n@return"
] | [
"Retrieve the default number of minutes per year.\n\n@return minutes per year",
"Removes bean from scope.\n\n@param name bean name\n@return previous value",
"Prints to a file. If the file does not exist, rewrites the file;\ndoes not append.",
"Save the changes.",
"Obtains a Symmetry454 zoned date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the Symmetry454 zoned date-time, not null\n@throws DateTimeException if unable to create the date-time",
"Acquire the shared lock, with a max wait timeout to acquire.\n@param permit - the permit Integer for this operation. May not be {@code null}.\n@param timeout - the timeout scalar quantity.\n@param unit - see {@code TimeUnit} for quantities.\n@return {@code boolean} true on successful acquire.\n@throws InterruptedException - if the acquiring thread was interrupted.\n@throws IllegalArgumentException if {@code permit} is null.",
"Checks if a parameter exists. If it exists, it is updated. If it doesn't, it is created. Only works for parameters which key is\nunique. Will create a transaction on the given entity manager.",
"Parse a map of objects from a JsonParser.\n\n@param jsonParser The JsonParser, preconfigured to be at the START_ARRAY token.",
"Calculates the world matrix based on the local matrix."
] |
private void parseMetadataItem(Message item) {
switch (item.getMenuItemType()) {
case TRACK_TITLE:
title = ((StringField) item.arguments.get(3)).getValue();
artworkId = (int) ((NumberField) item.arguments.get(8)).getValue();
break;
case ARTIST:
artist = buildSearchableItem(item);
break;
case ORIGINAL_ARTIST:
originalArtist = buildSearchableItem(item);
break;
case REMIXER:
remixer = buildSearchableItem(item);
case ALBUM_TITLE:
album = buildSearchableItem(item);
break;
case LABEL:
label = buildSearchableItem(item);
break;
case DURATION:
duration = (int) ((NumberField) item.arguments.get(1)).getValue();
break;
case TEMPO:
tempo = (int) ((NumberField) item.arguments.get(1)).getValue();
break;
case COMMENT:
comment = ((StringField) item.arguments.get(3)).getValue();
break;
case KEY:
key = buildSearchableItem(item);
break;
case RATING:
rating = (int) ((NumberField)item.arguments.get(1)).getValue();
break;
case COLOR_NONE:
case COLOR_AQUA:
case COLOR_BLUE:
case COLOR_GREEN:
case COLOR_ORANGE:
case COLOR_PINK:
case COLOR_PURPLE:
case COLOR_RED:
case COLOR_YELLOW:
color = buildColorItem(item);
break;
case GENRE:
genre = buildSearchableItem(item);
break;
case DATE_ADDED:
dateAdded = ((StringField) item.arguments.get(3)).getValue();
break;
case YEAR:
year = (int) ((NumberField) item.arguments.get(1)).getValue();
break;
case BIT_RATE:
bitRate = (int) ((NumberField) item.arguments.get(1)).getValue();
break;
default:
logger.warn("Ignoring track metadata item with unknown type: {}", item);
}
} | [
"Processes one of the menu responses that jointly constitute the track metadata, updating our\nfields accordingly.\n\n@param item the menu response to be considered"
] | [
"Removes all currently assigned labels for this Datum then adds all\nof the given Labels.",
"Make a copy of JobContext of current thread\n@return the copy of current job context or an empty job context",
"Examines the error data returned from Facebook and throws the most applicable exception.\n@param errorDetails a Map containing a \"type\" and a \"message\" corresponding to the Graph API's error response structure.",
"Ends interception context if it was previously stated. This is indicated by a local variable with index 0.",
"Get the GroupDiscussInterface.\n\n@return The GroupDiscussInterface",
"Sets the path to the script file to load and loads the script.\n\n@param filePath path to script file\n@throws IOException if the script cannot be read.\n@throws GVRScriptException if a script processing error occurs.",
"Write an unsigned short to the byte array starting at the given offset\n\n@param bytes The byte array\n@param value The short to write\n@param offset The offset to begin writing at",
"Propagate onMotionOutside events to listeners\n@param MotionEvent Android MotionEvent when nothing is picked",
"Parse a string representation of a Boolean value.\nXER files sometimes have \"N\" and \"Y\" to indicate boolean\n\n@param value string representation\n@return Boolean value"
] |
public static int[] insertArray(int[] original, int index, int[] inserted) {
int[] modified = new int[original.length + inserted.length];
System.arraycopy(original, 0, modified, 0, index);
System.arraycopy(inserted, 0, modified, index, inserted.length);
System.arraycopy(original, index, modified, index + inserted.length, modified.length - index - inserted.length);
return modified;
} | [
"Inserts the specified array into the specified original array at the specified index.\n\n@param original the original array into which we want to insert another array\n@param index the index at which we want to insert the array\n@param inserted the array that we want to insert\n@return the combined array"
] | [
"Checks if the last argument matches the vararg type.\n@param params\n@param args\n@return -1 if no match, 0 if the last argument is exactly the vararg type and 1 if of an assignable type",
"Pauses the playback of a sound.",
"Reads a data block and adds it to the list of blocks.\n\n@param text RTF data\n@param offset current offset\n@param length next block length\n@param blocks list of blocks\n@return next offset",
"Read a single field alias from an extended attribute.\n\n@param attribute extended attribute",
"Map custom info.\n\n@param ciType the custom info type\n@return the map",
"Updates the internal list of dates and fires a value change if necessary.\n\n@param dates the dates to set.",
"Pause component timer for current instance\n@param type - of component",
"Checks whether the compilation has been canceled and reports the given progress to the compiler progress.",
"Backup the current version of the configuration to the versioned configuration history"
] |
public Object newInstance(String resource) {
try {
String name = resource.startsWith("/") ? resource : "/" + resource;
File file = new File(this.getClass().getResource(name).toURI());
return newInstance(classLoader.parseClass(new GroovyCodeSource(file), true));
} catch (Exception e) {
throw new GroovyClassInstantiationFailed(classLoader, resource, e);
}
} | [
"Creates an object instance from the Groovy resource\n\n@param resource the Groovy resource to parse\n@return An Object instance"
] | [
"Use this API to disable Interface resources of given names.",
"Update environment variables to an app.\n@param appName App name. See {@link #listApps} for a list of apps that can be used.\n@param config Key/Value pairs of environment variables.",
"Use this API to delete nsip6.",
"Adds a new task to this file. The task can have an optional message to include, and a due date.\n\n@param action the action the task assignee will be prompted to do.\n@param message an optional message to include with the task.\n@param dueAt the day at which this task is due.\n@return information about the newly added task.",
"Returns the value of the identified field as a Float.\n@param fieldName the name of the field\n@return the value of the field as a Float\n@throws FqlException if the field cannot be expressed as an Float",
"disables the current active id, enables the new one selected\n\n@param profileId profile ID of the client\n@param clientUUID UUID of the client\n@param active true to make client active, false to make client inactive\n@throws Exception exception",
"Use this API to update onlinkipv6prefix resources.",
"Attemps to delete all provided segments from a log and returns how many it was able to",
"Get the ver\n\n@param id\n@return"
] |
public void setEnterpriseDate(int index, Date value)
{
set(selectField(AssignmentFieldLists.ENTERPRISE_DATE, index), value);
} | [
"Set an enterprise date value.\n\n@param index date index (1-30)\n@param value date value"
] | [
"create a HashMap form the json properties and add it to the shape\n@param modelJSON\n@param current\n@throws org.json.JSONException",
"Get the value of the fist child element with the given name.\n\n@param element\nThe parent element\n@param name\nThe child element name\n@return The child element value or null",
"Convert the holiday format from EquivalenceClassTransformer into a date format\n\n@param holiday the date\n@return a date String in the format yyyy-MM-dd",
"Checks if the name of the file follows the version-n format\n\n@param versionDir The directory\n@return Returns true if the name is correct, else false",
"Creates a directory at the given path if it does not exist yet and if the\ndirectory manager was not configured for read-only access.\n\n@param path\n@throws IOException\nif it was not possible to create a directory at the given\npath",
"Returns a new AWT BufferedImage from this image.\n\n@param type the type of buffered image to create, if not specified then defaults to the current image type\n@return a new, non-shared, BufferedImage with the same data as this Image.",
"Gets all of the column names for a result meta data\n\n@param rsmd Resultset metadata\n@return Array of column names\n@throws Exception exception",
"Subtract a complex number.\n\n@param z1 Complex Number.\n@param scalar Scalar value.\n@return Returns new ComplexNumber instance containing the subtract of specified complex number with a scalar value.",
"Sets that there are some pending writes that occurred at a time for an associated\nlocally emitted change event. This variant maintains the last version set.\n\n@param atTime the time at which the write occurred.\n@param changeEvent the description of the write/change."
] |
public void installApp(Functions.Func callback) {
if (isPwaSupported()) {
appInstaller = new AppInstaller(callback);
appInstaller.prompt();
}
} | [
"Will prompt a user the \"Add to Homescreen\" feature\n\n@param callback A callback function after the method has been executed."
] | [
"Add a photo to the user's favorites.\n\n@param photoId\nThe photo ID\n@throws FlickrException",
"Sets an attribute in the main section of the manifest.\n\n@param name the attribute's name\n@param value the attribute's value\n@return {@code this}\n@throws IllegalStateException if entries have been added or the JAR has been written prior to calling this methods.",
"return request is success by JsonRtn object\n\n@param jsonRtn\n@return",
"Perform construction with custom thread pool size.",
"Runs the command session.\nCreate the Shell, then run this method to listen to the user,\nand the Shell will invoke Handler's methods.\n@throws java.io.IOException when can't readLine() from input.",
"Log a warning for the given operation at the provided address for the given attributes, using the provided detail\nmessage.\n\n@param address where warning occurred\n@param operation where which problem occurred\n@param message custom error message to append\n@param attributes attributes we that have problems about",
"Converts a vector into a quaternion.\nUsed for the direction of spot and directional lights\nCalled upon initialization and updates to those vectors\n\n@param d",
"Use this API to fetch lbvserver_filterpolicy_binding resources of given name .",
"Make log segment file name from offset bytes. All this does is pad out the offset number\nwith zeros so that ls sorts the files numerically\n@param offset offset value (padding with zero)\n@return filename with offset"
] |
static boolean killProcess(final String processName, int id) {
int pid;
try {
pid = processUtils.resolveProcessId(processName, id);
if(pid > 0) {
try {
Runtime.getRuntime().exec(processUtils.getKillCommand(pid));
return true;
} catch (Throwable t) {
ProcessLogger.ROOT_LOGGER.debugf(t, "failed to kill process '%s' with pid '%s'", processName, pid);
}
}
} catch (Throwable t) {
ProcessLogger.ROOT_LOGGER.debugf(t, "failed to resolve pid of process '%s'", processName);
}
return false;
} | [
"Try to kill a given process.\n\n@param processName the process name\n@param id the process integer id, or {@code -1} if this is not relevant\n@return {@code true} if the command succeeded, {@code false} otherwise"
] | [
"Use this API to fetch responderpolicy resource of given name .",
"Traces the duration between origin time in the http Request and time just\nbefore being processed by the fat client\n\n@param operationType\n@param originTimeInMS - origin time in the Http Request\n@param requestReceivedTimeInMs - System Time in ms\n@param keyString",
"Answer the real ClassDescriptor for anObj\nie. aCld may be an Interface of anObj, so the cld for anObj is returned",
"Prints and stores final result of the processing. This should be called\nafter finishing the processing of a dump. It will print the statistics\ngathered during processing and it will write a CSV file with usage counts\nfor every property.",
"Return a list of unique namespaces, optionally limited by a given predicate, in alphabetical order.\n\nThis method does not require authentication.\n\n@param predicate\n@param perPage\n@param page\n@return NamespacesList\n@throws FlickrException",
"Use this API to fetch the statistics of all service_stats resources that are configured on netscaler.",
"Helper function to return the minimum size of the index space to be passed to the reduction given the input and\noutput tensors",
"Returns the current definition on the indicated level.\n\n@param level The level\n@return The definition",
"get the bean property type\n\n@param clazz\n@param propertyName\n@param originalType\n@return"
] |
public static int[] arrayFromStringOfIntegers(String str) throws IllegalArgumentException {
StringTokenizer tokenizer = new StringTokenizer(str, ",");
int n = tokenizer.countTokens();
int[] list = new int[n];
for (int i = 0; i < n; i++) {
String token = tokenizer.nextToken();
list[i] = Integer.parseInt(token);
}
return list;
} | [
"Split string of comma-delimited ints into an a int array\n\n@param str\n@return\n@throws IllegalArgumentException"
] | [
"Use this API to fetch the statistics of all scpolicy_stats resources that are configured on netscaler.",
"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",
"Returns angle in degrees between two points\n\n@param ax x of the point 1\n@param ay y of the point 1\n@param bx x of the point 2\n@param by y of the point 2\n@return angle in degrees between two points",
"Returns the compact records for all teams to which user is assigned.\n\n@param user An identifier for the user. Can be one of an email address,\nthe globally unique identifier for the user, or the keyword `me`\nto indicate the current user making the request.\n@return Request object",
"Parse a comma-delimited list of method names into a List of strings.\nWhitespace is ignored.\n\n@param methods the comma delimited list of methods from the spring configuration\n\n@return List<String>",
"Wrap a simple attribute def as list.\n\n@param def the attribute definition\n@return the list attribute def",
"Returns a list of resource wrappers created from the input list of resources.\n\n@param cms the current OpenCms user context\n@param list the list to create the resource wrapper list from\n\n@return the list of wrapped resources.",
"should not be public",
"Sets the timewarp setting from a numeric string\n\n@param timewarp a numeric string containing the number of milliseconds since the epoch"
] |
public static aaauser_auditsyslogpolicy_binding[] get(nitro_service service, String username) throws Exception{
aaauser_auditsyslogpolicy_binding obj = new aaauser_auditsyslogpolicy_binding();
obj.set_username(username);
aaauser_auditsyslogpolicy_binding response[] = (aaauser_auditsyslogpolicy_binding[]) obj.get_resources(service);
return response;
} | [
"Use this API to fetch aaauser_auditsyslogpolicy_binding resources of given name ."
] | [
"Stop offering shared dbserver sessions.",
"Organises the data from Asta into a hierarchy and converts this into tasks.\n\n@param bars bar data\n@param expandedTasks expanded task data\n@param tasks task data\n@param milestones milestone data",
"Evaluates the body if current member has no tag with the specified name.\n\n@param template The body of the block tag\n@param attributes The attributes of the template tag\n@exception XDocletException Description of Exception\[email protected] type=\"block\"\[email protected] name=\"tagName\" optional=\"false\" description=\"The tag name.\"\[email protected] name=\"paramName\" description=\"The parameter name. If not specified, then the raw\ncontent of the tag is returned.\"\[email protected] name=\"paramNum\" description=\"The zero-based parameter number. It's used if the user\nused the space-separated format for specifying parameters.\"\[email protected] name=\"error\" description=\"Show this error message if no tag found.\"",
"Invoke to tell listeners that an step started event processed",
"Convert moneyness given as difference to par swap rate to moneyness in bp.\nUses the fixing times of the fix schedule to determine fractions.\n\n@param moneyness as offset.\n@return Moneyness in bp.",
"returns a collection of Reader LockEntries for object obj.\nIf now LockEntries could be found an empty Vector is returned.",
"Use this API to fetch statistics of service_stats resource of given name .",
"Creates a color item that represents a color field found for a track based on a dbserver message.\n\n@param menuItem the rendered menu item containing the color metadata field\n\n@return the color metadata field",
"Gets a design document from the database.\n\n@param id the design document id (optionally prefixed with \"_design/\")\n@return {@link DesignDocument}"
] |
private void readDay(ProjectCalendar calendar, Project.Calendars.Calendar.WeekDays.WeekDay day, boolean readExceptionsFromDays)
{
BigInteger dayType = day.getDayType();
if (dayType != null)
{
if (dayType.intValue() == 0)
{
if (readExceptionsFromDays)
{
readExceptionDay(calendar, day);
}
}
else
{
readNormalDay(calendar, day);
}
}
} | [
"This method extracts data for a single day from an MSPDI file.\n\n@param calendar Calendar data\n@param day Day data\n@param readExceptionsFromDays read exceptions form day definitions"
] | [
"Per the navigation drawer design guidelines, updates the action bar to show the global app\n'context', rather than just what's in the current screen.",
"Saves a screenshot of every new state.",
"This method is used to extract the task hyperlink attributes\nfrom a block of data and call the appropriate modifier methods\nto configure the specified task object.\n\n@param task task instance\n@param data hyperlink data block",
"This method lists all resource assignments defined in the file.\n\n@param file MPX file",
"Opens a new FileOutputStream for a file of the given name in the given\nresult directory. Any file of this name that exists already will be\nreplaced. The caller is responsible for eventually closing the stream.\n\n@param resultDirectory\nthe path to the result directory\n@param filename\nthe name of the file to write to\n@return FileOutputStream for the file\n@throws IOException\nif the file or example output directory could not be created",
"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\".",
"This method is called to alert project listeners to the fact that\na task has been read from a project file.\n\n@param task task instance",
"Returns a list of the compact representation of all of the custom fields in a workspace.\n\n@param workspace The workspace or organization to find custom field definitions in.\n@return Request object",
"Get all backup data\n\n@param model\n@return\n@throws Exception"
] |
public static base_response add(nitro_service client, autoscaleprofile resource) throws Exception {
autoscaleprofile addresource = new autoscaleprofile();
addresource.name = resource.name;
addresource.type = resource.type;
addresource.url = resource.url;
addresource.apikey = resource.apikey;
addresource.sharedsecret = resource.sharedsecret;
return addresource.add_resource(client);
} | [
"Use this API to add autoscaleprofile."
] | [
"Reads the header data from a block.\n\n@param buffer block data\n@param offset current offset into block data\n@param postHeaderSkipBytes bytes to skip after reading the header\n@return current BlockHeader instance",
"Return the basis functions for the regression suitable for this product.\n\n@param fixingDate The condition time.\n@param model The model\n@return The basis functions for the regression suitable for this product.\n@throws net.finmath.exception.CalculationException Thrown if the valuation fails, specific cause may be available via the <code>cause()</code> method.",
"region Override Methods",
"Read a text file resource into a single string\n\n@param context\nA non-null Android Context\n@param resourceId\nAn Android resource id\n@return The contents, or null on error.",
"Adds an object to the Index. If it was already in the Index,\nthen nothing is done. If it is not in the Index, then it is\nadded iff the Index hasn't been locked.\n\n@return true if the item was added to the index and false if the\nitem was already in the index or if the index is locked",
"Deserializes a variable, checking whether the datatype is custom or not\n@param s\n@param variableType\n@param dataTypes\n@return",
"FOR internal use. This method was called after the external transaction was completed.\n\n@see javax.transaction.Synchronization",
"Calculates the smallest value between the three inputs.\n@param first value\n@param second value\n@param third value\n@return the smallest value between the three inputs",
"Enable a custom response\n\n@param custom custom response\n@param path_id path ID of the response\n@param client_uuid client UUID\n@throws Exception exception"
] |
public static policydataset_value_binding[] get(nitro_service service, String name) throws Exception{
policydataset_value_binding obj = new policydataset_value_binding();
obj.set_name(name);
policydataset_value_binding response[] = (policydataset_value_binding[]) obj.get_resources(service);
return response;
} | [
"Use this API to fetch policydataset_value_binding resources of given name ."
] | [
"Classify stdin by senteces seperated by blank line\n@param readerWriter\n@return\n@throws IOException",
"Remove any overrides for an endpoint\n\n@param pathValue path (endpoint) value\n@param requestType path request type. \"GET\", \"POST\", etc\n@return true if success, false otherwise",
"Emit status line for an aggregated event.",
"MOVED INSIDE ExpressionUtils\n\nprotected JRDesignExpression getExpressionForConditionalStyle(ConditionalStyle condition, String columExpression) {\nString fieldsMap = \"((\"+DJDefaultScriptlet.class.getName() + \")$P{REPORT_SCRIPTLET}).getCurrentFields()\";\nString parametersMap = \"((\"+DJDefaultScriptlet.class.getName() + \")$P{REPORT_SCRIPTLET}).getCurrentParams()\";\nString variablesMap = \"((\"+DJDefaultScriptlet.class.getName() + \")$P{REPORT_SCRIPTLET}).getCurrentVariables()\";\n\nString evalMethodParams = fieldsMap +\", \" + variablesMap + \", \" + parametersMap + \", \" + columExpression;\n\nString text = \"((\"+ConditionStyleExpression.class.getName()+\")$P{\" + JRParameter.REPORT_PARAMETERS_MAP + \"}.get(\\\"\"+condition.getName()+\"\\\")).\"+CustomExpression.EVAL_METHOD_NAME+\"(\"+evalMethodParams+\")\";\nJRDesignExpression expression = new JRDesignExpression();\nexpression.setValueClass(Boolean.class);\nexpression.setText(text);\nreturn expression;\n}",
"Find any standard methods the user has 'underridden' in their type.",
"Resets all member fields that hold information about the revision that is\ncurrently being processed.",
"Initialize new instance\n@param instance\n@param logger\n@param auditor",
"Removes a filter from this project file.\n\n@param filterName The name of the filter",
"Clear all overrides, reset repeat counts for a response path\n\n@param pathId ID of path\n@param clientUUID UUID of client\n@throws Exception exception"
] |
@UiThread
public int getParentAdapterPosition() {
int flatPosition = getAdapterPosition();
if (mExpandableAdapter == null || flatPosition == RecyclerView.NO_POSITION) {
return RecyclerView.NO_POSITION;
}
return mExpandableAdapter.getNearestParentPosition(flatPosition);
} | [
"Returns the adapter position of the Parent associated with this ChildViewHolder\n\n@return The adapter position of the Parent if it still exists in the adapter.\nRecyclerView.NO_POSITION if item has been removed from the adapter,\nRecyclerView.Adapter.notifyDataSetChanged() has been called after the last\nlayout pass or the ViewHolder has already been recycled."
] | [
"Requests the beat grid for a specific track ID, given a connection to a player that has already been set up.\n\n@param rekordboxId the track of interest\n@param slot identifies the media slot we are querying\n@param client the dbserver client that is communicating with the appropriate player\n\n@return the retrieved beat grid, or {@code null} if there was none available\n\n@throws IOException if there is a communication problem",
"Deals with the case where we have had to map a task ID to a new value.\n\n@param id task ID from database\n@return mapped task ID",
"Obtains a local date in Symmetry010 calendar system from the\nera, year-of-era and day-of-year fields.\n\n@param era the Symmetry010 era, not null\n@param yearOfEra the year-of-era\n@param dayOfYear the day-of-year\n@return the Symmetry010 local date, not null\n@throws DateTimeException if unable to create the date\n@throws ClassCastException if the {@code era} is not a {@code IsoEra}",
"Attaches an arbitrary object to this context only if the object was not already attached. If a value has already\nbeen attached with the key provided, the current value associated with the key is returned.\n\n@param key they attachment key used to ensure uniqueness and used for retrieval of the value.\n@param value the value to store.\n@param <V> the value type of the attachment.\n\n@return the previous value associated with the key or {@code null} if there was no previous value.",
"Returns the primary port of the server.\n\n@return the primary {@link ServerPort} if the server is started. {@link Optional#empty()} otherwise.",
"Converts a string representation of an integer into an Integer object.\nSilently ignores any parse exceptions and returns null.\n\n@param value String representation of an integer\n@return Integer instance",
"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",
"used for upload progress",
"Detect numbers using comma as a decimal separator and replace with period.\n\n@param value original numeric value\n@return corrected numeric value"
] |
protected void updateFontTable()
{
PDResources resources = pdpage.getResources();
if (resources != null)
{
try
{
processFontResources(resources, fontTable);
} catch (IOException e) {
log.error("Error processing font resources: "
+ "Exception: {} {}", e.getMessage(), e.getClass());
}
}
} | [
"Updates the font table by adding new fonts used at the current page."
] | [
"Retrieve timephased baseline work. Note that index 0 represents \"Baseline\",\nindex 1 represents \"Baseline1\" and so on.\n\n@param index baseline index\n@return timephased work, or null if no baseline is present",
"Use this API to fetch all the vpnsessionaction resources that are configured on netscaler.",
"Returns an encrypted token combined with answer.",
"Creates an instance of a NewSimpleBean from an annotated class\n\n@param clazz The annotated class\n@param beanManager The Bean manager\n@return a new NewSimpleBean instance",
"Use this API to reset Interface resources.",
"Return total number of connections currently in use by an application\n@return no of leased connections",
"Initial random seed used for shuffling test suites and other sources\nof pseudo-randomness. If not set, any random value is set.\n\n<p>The seed's format is compatible with {@link RandomizedRunner} so that\nseed can be fixed for suites and methods alike.",
"Take screenshot of the current window.\n\n@param target The target type/format of the Screenshot\n@return Screenshot of current window, in the requested format",
"Converts the string representation of the days bit field into an integer.\n\n@param days string bit field\n@return integer bit field"
] |
public ScheduleDescriptor generateScheduleDescriptor(LocalDate startDate, LocalDate endDate) {
return new ScheduleDescriptor(startDate, endDate, getFrequency(), getDaycountConvention(), getShortPeriodConvention(), getDateRollConvention(),
getBusinessdayCalendar(), getFixingOffsetDays(), getPaymentOffsetDays(), isUseEndOfMonth());
} | [
"Generate a schedule descriptor for the given start and end date.\n\n@param startDate The start date.\n@param endDate The end date.\n@return The schedule descriptor"
] | [
"This method extracts data for a single calendar from a Phoenix file.\n\n@param calendar calendar data",
"A recursive getAttribute method. In case a one-to-many is passed, an array will be returned.\n\n@param feature The feature wherein to search for the attribute\n@param name The attribute's full name. (can be attr1.attr2)\n@return Returns the value. In case a one-to-many is passed along the way, an array will be returned.\n@throws LayerException oops",
"delete of files more than 1 day old",
"After obtaining a connection, perform additional tasks.\n@param handle\n@param statsObtainTime",
"This static method calculated the rho of a call option under a Black-Scholes model\n\n@param initialStockValue The initial value of the underlying, i.e., the spot.\n@param riskFreeRate The risk free rate of the bank account numerarie.\n@param volatility The Black-Scholes volatility.\n@param optionMaturity The option maturity T.\n@param optionStrike The option strike.\n@return The rho of the option",
"Use this API to fetch statistics of tunnelip_stats resource of given name .",
"Retrieves a list of Terms of Service that belong to your Enterprise as an Iterable.\n@param api api the API connection to be used by the resource.\n@param termsOfServiceType the type of terms of service to be retrieved. Can be set to \"managed\" or \"external\"\n@return the Iterable of Terms of Service in an Enterprise that match the filter parameters.",
"low level http operations",
"Processes the template for all class definitions.\n\n@param template The template\n@param attributes The attributes of the tag\n@exception XDocletException if an error occurs\[email protected] type=\"block\""
] |
public IndirectionHandler getIndirectionHandler(Object obj)
{
if(obj == null)
{
return null;
}
else if(isNormalOjbProxy(obj))
{
return getDynamicIndirectionHandler(obj);
}
else if(isVirtualOjbProxy(obj))
{
return VirtualProxy.getIndirectionHandler((VirtualProxy) obj);
}
else
{
return null;
}
} | [
"Returns the invocation handler object of the given proxy object.\n\n@param obj The object\n@return The invocation handler if the object is an OJB proxy, or <code>null</code>\notherwise"
] | [
"A convenience method for creating an immutable map.\n\n@param self a Map\n@return an immutable Map\n@see java.util.Collections#unmodifiableMap(java.util.Map)\n@since 1.0",
"Pops the top event off the current event stack. This action has to be\nperformed immediately after the event has been dispatched to all\nlisteners.\n\n@param <L> Type of the listener.\n@param expected The Event which is expected at the top of the stack.\n@see #pushEvent(Event)",
"Calculates the bar width and bar margin based on the _DataSize and settings and starts the boundary\ncalculation in child classes.\n@param _DataSize Amount of data sets",
"Retrieve the parent task based on its WBS.\n\n@param wbs parent WBS\n@return parent task",
"Download a file asynchronously.\n@param url the URL pointing to the file\n@param retrofit the retrofit client\n@return an Observable pointing to the content of the file",
"Use this API to unset the properties of protocolhttpband resource.\nProperties that need to be unset are specified in args array.",
"This method is called to alert project listeners to the fact that\na task has been written to a project file.\n\n@param task task instance",
"dispatch to gravity state",
"Sets the submatrix of W up give Y is already configured and if it is being cached or not."
] |
public static boolean readBooleanAttributeElement(final XMLExtendedStreamReader reader, final String attributeName)
throws XMLStreamException {
requireSingleAttribute(reader, attributeName);
final boolean value = Boolean.parseBoolean(reader.getAttributeValue(0));
requireNoContent(reader);
return value;
} | [
"Read an element which contains only a single boolean attribute.\n@param reader the reader\n@param attributeName the attribute name, usually \"value\"\n@return the boolean value\n@throws javax.xml.stream.XMLStreamException if an error occurs or if the\nelement does not contain the specified attribute, contains other\nattributes, or contains child elements."
] | [
"Checks if is file exist.\n\n@param filePath\nthe file path\n@return true, if is file exist",
"Creates a resource ID from information of a generic resource.\n\n@param subscriptionId the subscription UUID\n@param resourceGroupName the resource group name\n@param resourceProviderNamespace the resource provider namespace\n@param resourceType the type of the resource or nested resource\n@param resourceName name of the resource or nested resource\n@param parentResourcePath parent resource's relative path to the provider,\nif the resource is a generic resource\n@return the resource ID string",
"Stops all servers.\n\n{@inheritDoc}",
"Use this API to delete sslfipskey of given name.",
"Returns a signed string representation of the given number.\n\n@param number\n@return String for BigDecimal value",
"Replace full request content.\n\n@param requestContentTemplate\nthe request content template\n@param replacementString\nthe replacement string\n@return the string",
"Creates a new ServerDetails object for deployer, this will take URL and name from the oldDeployer ServerDetails",
"Return the entity of a resource\n\n@param resource the resource\n@param <T> the type of the resource's entity\n@param <R> the resource type\n@return the resource's entity",
"Return the score of the specified element of the sorted set at key.\n@param member\n@return The score value or <code>null</code> if the element does not exist in the set."
] |
public void updateProvider(final String gavc, final String provider) {
final DbArtifact artifact = getArtifact(gavc);
repositoryHandler.updateProvider(artifact, provider);
} | [
"Update artifact provider\n\n@param gavc String\n@param provider String"
] | [
"Returns true if all pixels in the array have the same color",
"Record a Screen View event\n@param screenName String, the name of the screen",
"Cancel all task with this tag and returns the canceled task count\n\n@param tagToCancel\n@return",
"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.",
"Emit an enum event with parameters and force all listeners to be called asynchronously.\n\n@param event\nthe target event\n@param args\nthe arguments passed in\n@see #emit(Enum, Object...)",
"Gets the JsonObject representation of the Field Operation.\n@param fieldOperation represents the template update operation\n@return the json object",
"Retrieve the version number",
"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.",
"Sets the yearly absolute date.\n\n@param date yearly absolute date"
] |
public static DMatrixRMaj nullspaceSVD( DMatrixRMaj A , int totalSingular ) {
SolveNullSpace<DMatrixRMaj> solver = new SolveNullSpaceSvd_DDRM();
DMatrixRMaj nullspace = new DMatrixRMaj(1,1);
if( !solver.process(A,totalSingular,nullspace))
throw new RuntimeException("Solver failed. try SVD based method instead?");
return nullspace;
} | [
"Computes the null space using SVD. Slowest bust most stable way to find the solution\n\n@param A (Input) Matrix\n@param totalSingular Number of singular values\n@return Null space"
] | [
"Infer app name from entry class\n\n@param entryClass\nthe entry class\n@return\napp name inferred from the entry class",
"Delete inactive contents.",
"Removes the given object from the cache\n\n@param oid oid of the object to remove",
"Validates for non-conflicting roles",
"Use this API to fetch all the dnsnsecrec resources that are configured on netscaler.\nThis uses dnsnsecrec_args which is a way to provide additional arguments while fetching the resources.",
"Use this API to update nsrpcnode resources.",
"Add a IN clause so the column must be equal-to one of the objects passed in.",
"Removes top of thread-local shell stack.",
"Checks whether two internet addresses are on the same subnet.\n\n@param prefixLength the number of bits within an address that identify the network\n@param address1 the first address to be compared\n@param address2 the second address to be compared\n\n@return true if both addresses share the same network bits"
] |
public static void showOnlyChannels(Object... channels){
for(LogRecordHandler handler : handlers){
if(handler instanceof VisibilityHandler){
VisibilityHandler visHandler = (VisibilityHandler) handler;
visHandler.hideAll();
for (Object channel : channels) {
visHandler.alsoShow(channel);
}
}
}
} | [
"Show only the given channel.\n@param channels The channels to show"
] | [
"Use this API to Reboot reboot.",
"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.",
"Initializes context size.\n\n@param rectangle rectangle",
"Update rows in the database.",
"Return a string representation of the object.",
"Returns the adapter position of the Child associated with this ChildViewHolder\n\n@return The adapter position of the Child if it still exists in the adapter.\nRecyclerView.NO_POSITION if item has been removed from the adapter,\nRecyclerView.Adapter.notifyDataSetChanged() has been called after the last\nlayout pass or the ViewHolder has already been recycled.",
"Destroys dependent instance\n\n@param instance\n@return true if the instance was destroyed, false otherwise",
"Search for photos which match the given search parameters.\n\n@param params\nThe search parameters\n@param perPage\nThe number of photos to show per page\n@param page\nThe page offset\n@return A PhotoList\n@throws FlickrException",
"Open the event stream\n\n@return true if successfully opened, false if not"
] |
private void readExceptionDay(ProjectCalendar calendar, Project.Calendars.Calendar.WeekDays.WeekDay day)
{
Project.Calendars.Calendar.WeekDays.WeekDay.TimePeriod timePeriod = day.getTimePeriod();
Date fromDate = timePeriod.getFromDate();
Date toDate = timePeriod.getToDate();
Project.Calendars.Calendar.WeekDays.WeekDay.WorkingTimes times = day.getWorkingTimes();
ProjectCalendarException exception = calendar.addCalendarException(fromDate, toDate);
if (times != null)
{
List<Project.Calendars.Calendar.WeekDays.WeekDay.WorkingTimes.WorkingTime> time = times.getWorkingTime();
for (Project.Calendars.Calendar.WeekDays.WeekDay.WorkingTimes.WorkingTime period : time)
{
Date startTime = period.getFromTime();
Date endTime = period.getToTime();
if (startTime != null && endTime != null)
{
if (startTime.getTime() >= endTime.getTime())
{
endTime = DateHelper.addDays(endTime, 1);
}
exception.addRange(new DateRange(startTime, endTime));
}
}
}
} | [
"This method extracts data for an exception day from an MSPDI file.\n\n@param calendar Calendar data\n@param day Day data"
] | [
"Heuristic check if string might be an IPv6 address.\n\n@param input Any string or null\n@return true, if input string contains only hex digits and at least two colons, before '.' or '%' character.",
"Used to add working hours to the calendar. Note that the MPX file\ndefinition allows a maximum of 7 calendar hours records to be added to\na single calendar.\n\n@param day day number\n@return new ProjectCalendarHours instance",
"This method is called to alert project listeners to the fact that\na task has been written to a project file.\n\n@param task task instance",
"Adds the headers.\n\n@param builder\nthe builder\n@param headerMap\nthe header map",
"Converts a DTO attribute into a generic attribute object.\n\n@param attribute\nThe DTO attribute.\n@return The server side attribute representation. As we don't know at this point what kind of object the\nattribute is (that's a problem for the <code>FeatureModel</code>), we return an <code>Object</code>.",
"Converts an image to a RGBA direct color model using a workaround via buffered image directly calling the\nColorConvert operation fails for unknown reasons ?!\n\n@param img image to convert\n@return converted image",
"Returns the complete record for a single section.\n\n@param section The section to get.\n@return Request object",
"Gets a SerialMessage with the WAKE_UP_NO_MORE_INFORMATION command.\n@return the serial message",
"Returns a reasonable timeout duration for a watch request.\n\n@param expectedTimeoutMillis timeout duration that a user wants to use, in milliseconds\n@param bufferMillis buffer duration which needs to be added, in milliseconds\n@return timeout duration in milliseconds, between the specified {@code bufferMillis} and\nthe {@link #MAX_MILLIS}."
] |
protected List<I_CmsFacetQueryItem> parseFacetQueryItems(JSONObject queryFacetObject) throws JSONException {
JSONArray items = queryFacetObject.getJSONArray(JSON_KEY_QUERY_FACET_QUERY);
List<I_CmsFacetQueryItem> result = new ArrayList<I_CmsFacetQueryItem>(items.length());
for (int i = 0; i < items.length(); i++) {
I_CmsFacetQueryItem item = parseFacetQueryItem(items.getJSONObject(i));
if (item != null) {
result.add(item);
}
}
return result;
} | [
"Parses the list of query items for the query facet.\n@param queryFacetObject JSON object representing the node with the query facet.\n@return list of query options\n@throws JSONException if the list cannot be parsed."
] | [
"This method is called when the locale of the parent file is updated.\nIt resets the locale specific date attributes to the default values\nfor the new locale.\n\n@param locale new locale",
"This method is called if the data set has been changed. Subclasses might want to override\nthis method to add some extra logic.\n\nGo through all items in the list:\n- reuse the existing views in the list\n- add new views in the list if needed\n- trim the unused views\n- request re-layout\n\n@param preferableCenterPosition the preferable center position. If it is -1 - keep the\ncurrent center position.",
"Ensures that the primary keys required by the given reference are present in the referenced class.\n\n@param modelDef The model\n@param refDef The reference\n@throws ConstraintException If there is a conflict between the primary keys",
"Stop the service and end the program",
"Gets the progress from response.\n\n@param myResponse\nthe my response\n@return the progress from response",
"Use this API to fetch statistics of authenticationvserver_stats resource of given name .",
"Generate the init script from the Artifactory URL.\n\n@return The generated script.",
"Organises the data from Asta into a hierarchy and converts this into tasks.\n\n@param bars bar data\n@param expandedTasks expanded task data\n@param tasks task data\n@param milestones milestone data",
"Use this API to rename a nsacl6 resource."
] |
public static <T> List<T> flatten(Collection<List<T>> nestedList) {
List<T> result = new ArrayList<T>();
for (List<T> list : nestedList) {
result.addAll(list);
}
return result;
} | [
"combines all the lists in a collection to a single list"
] | [
"Add fields to the text index configuration.\n\n@param fields the {@link TextIndex.Field} configurations to add\n@return the builder for chaining",
"Convert string to qname.\n\n@param str the string\n@return the qname",
"map a property id. Property id can only be an Integer or String",
"Detaches or removes the value from this context.\n\n@param key the key to the attachment.\n@param <V> the value type of the attachment.\n\n@return the attachment if found otherwise {@code null}.",
"Overridden method always creating a new instance\n\n@param contextual The bean to create\n@param creationalContext The creation context",
"Retrieve and validate store name from the REST request.\n\n@return true if valid, false otherwise",
"Launch Application Setting to grant permission.",
"Rename an existing app.\n@param appName Existing app name. See {@link #listApps()} for names that can be used.\n@param newName New name to give the existing app.\n@return the new name of the object",
"Recursively construct a LblTree from DOM tree\n\n@param walker tree walker for DOM tree traversal\n@return tree represented by DOM tree"
] |
private boolean isOrdered(FieldDescriptor[] flds, String[] pkFieldNames)
{
if((flds.length > 1 && pkFieldNames == null) || flds.length != pkFieldNames.length)
{
throw new PersistenceBrokerException("pkFieldName length does not match number of defined PK fields." +
" Expected number of PK fields is " + flds.length + ", given number was " +
(pkFieldNames != null ? pkFieldNames.length : 0));
}
boolean result = true;
for(int i = 0; i < flds.length; i++)
{
FieldDescriptor fld = flds[i];
result = result && fld.getPersistentField().getName().equals(pkFieldNames[i]);
}
return result;
} | [
"Checks length and compare order of field names with declared PK fields in metadata."
] | [
"Returns the value of the sum of discounted cash flows of the bond where\nthe discounting is done with the given yield curve.\nThis method can be used for optimizer.\n\n@param evaluationTime The evaluation time as double. Cash flows prior and including this time are not considered.\n@param rate The yield which is used for discounted the coupon payments.\n@param model The model under which the product is valued.\n@return The value of the bond for the given yield.",
"Returns the raw class of the given type.",
"This method lists all tasks defined in the file.\n\n@param file MPX file",
"Get a boolean value from the values or null.\n\n@param key the look up key of the value",
"This method returns the actual raw class associated with the specified\ntype.",
"Filter unsafe or unnecessary request.\n\n@param nodeDataMapValidSource\nthe node data map valid source\n@param nodeDataMapValidSafe\nthe node data map valid safe",
"Use this API to unset the properties of Interface resource.\nProperties that need to be unset are specified in args array.",
"Ends interception context if it was previously stated. This is indicated by a local variable with index 0.",
"Creates an observer\n\n@param method The observer method abstraction\n@param declaringBean The declaring bean\n@param manager The Bean manager\n@return An observer implementation built from the method abstraction"
] |
public String getURN() throws InvalidRegistrationContentException {
if (parsedConfig==null || parsedConfig.urn==null || parsedConfig.urn.trim().isEmpty()) {
throw new InvalidRegistrationContentException("Invalid registration config - failed to read mediator URN");
}
return parsedConfig.urn;
} | [
"Reads and returns the mediator URN from the JSON content.\n\n@see #RegistrationConfig(String)"
] | [
"Build the context name.\n\n@param objs the objects\n@return the global context name",
"get the jdbcTypes from the Query or the ResultSet if not available from the Query\n@throws SQLException",
"Save an HTTP response to a file\n@param response the response to save\n@param destFile the destination file\n@throws IOException if the response could not be downloaded",
"Runs the record linkage process.",
"Accessor method used to retrieve an Duration object representing the\ncontents of an individual field. If the field does not exist in the\nrecord, null is returned.\n\n@param field the index number of the field to be retrieved\n@return the value of the required field\n@throws MPXJException normally thrown when parsing fails",
"Examins the structure of A for QR decomposition\n@param A matrix which is to be decomposed\n@return true if the solution is valid or false if the decomposition can't be performed (i.e. requires column pivots)",
"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)",
"If there is a zero on the diagonal element, the off diagonal element needs pushed\noff so that all the algorithms assumptions are two and so that it can split the matrix.",
"Paint a check pattern, used for a background to indicate image transparency.\n@param c the component to draw into\n@param g the Graphics objects\n@param x the x position\n@param y the y position\n@param width the width\n@param height the height"
] |
public static void dumpClusters(Cluster currentCluster,
Cluster finalCluster,
String outputDirName) {
dumpClusters(currentCluster, finalCluster, outputDirName, "");
} | [
"Given the current and final cluster dumps it into the output directory\n\n@param currentCluster Initial cluster metadata\n@param finalCluster Final cluster metadata\n@param outputDirName Output directory where to dump this file\n@throws IOException"
] | [
"Gets all of the column names for a result meta data\n\n@param rsmd Resultset metadata\n@return Array of column names\n@throws Exception exception",
"Creates a new Box Developer Edition connection with enterprise token leveraging an access token cache.\n@param enterpriseId the enterprise ID to use for requesting access token.\n@param clientId the client ID to use when exchanging the JWT assertion for an access token.\n@param clientSecret the client secret to use when exchanging the JWT assertion for an access token.\n@param encryptionPref the encryption preferences for signing the JWT.\n@param accessTokenCache the cache for storing access token information (to minimize fetching new tokens)\n@return a new instance of BoxAPIConnection.",
"Creates an appropriate HSGE for a domain-wide resource of a type that is mappable to server groups",
"Get the best guess we have for the current track position on the specified player.\n\n@param player the player number whose position is desired\n\n@return the milliseconds into the track that we believe playback has reached, or -1 if we don't know\n\n@throws IllegalStateException if the TimeFinder is not running",
"Re-reads the given entity, refreshing any properties updated on the server-side during insert or update.",
"Performs a Bulk Documents insert request.\n\n@param objects The {@link List} of objects.\n@param allOrNothing Indicates whether the request has <tt>all-or-nothing</tt> semantics.\n@return {@code List<Response>} Containing the resulted entries.",
"Sets the category of the notification for iOS8 notification\nactions. See 13 minutes into \"What's new in iOS Notifications\"\n\nPassing {@code null} removes the category.\n\n@param category the name of the category supplied to the app\nwhen receiving the notification\n@return this",
"List app dynos for an app\n\n@param appName See {@link #listApps} for a list of apps that can be used.",
"Parse units.\n\n@param value units value\n@return units value"
] |
@PrefMetadata(type = CmsHiddenBuiltinPreference.class)
public String getExplorerFileEntryOptions() {
if (m_settings.getExplorerFileEntryOptions() == null) {
return "";
} else {
return "" + m_settings.getExplorerFileEntryOptions();
}
} | [
"Gets the explorer file entry options.\n\n@return the explorer file entry options"
] | [
"trim \"act.\" from conf keys",
"Handles incoming Send Data Request. Send Data request are used\nto acknowledge or cancel failed messages.\n@param incomingMessage the request message to process.",
"Recover log up to the last complete entry. Truncate off any bytes from any incomplete\nmessages written\n\n@throws IOException any exception",
"Create a new Time, with no date component.",
"The mediator registration config. If it contains default config and definitions,\nthen the dynamic config will be initialized with those values.\n\n@see org.openhim.mediator.engine.RegistrationConfig\n@see #getDynamicConfig()",
"Invalidate the item in layout\n@param dataIndex data index",
"Get the metadata of all tracks currently loaded in any player, either on the play deck, or in a hot cue.\n\n@return the track information reported by all current players, including any tracks loaded in their hot cue slots\n\n@throws IllegalStateException if the MetadataFinder is not running",
"judge if an point in the area or not\n\n@param point\n@param area\n@param offsetRatio\n@return",
"Get a property as a object or throw exception.\n\n@param key the property name"
] |
public static tmtrafficpolicy_tmglobal_binding[] get(nitro_service service, String name) throws Exception{
tmtrafficpolicy_tmglobal_binding obj = new tmtrafficpolicy_tmglobal_binding();
obj.set_name(name);
tmtrafficpolicy_tmglobal_binding response[] = (tmtrafficpolicy_tmglobal_binding[]) obj.get_resources(service);
return response;
} | [
"Use this API to fetch tmtrafficpolicy_tmglobal_binding resources of given name ."
] | [
"Converts this update description to its document representation as it would appear in a\nMongoDB Change Event.\n\n@return the update description document as it would appear in a change event",
"Removing surrounding space in image. Get trim color from specified pixel.\n@param value orientation from where to get the pixel color.\n@param colorTolerance 0 - 442. This is the euclidian distance\nbetween the colors of the reference pixel and the surrounding pixels is used.\nIf the distance is within the tolerance they'll get trimmed.",
"Find out which method to call on the service bean.",
"Use this API to fetch the statistics of all nslimitidentifier_stats resources that are configured on netscaler.",
"Convert an Object to a Date.",
"Use this API to fetch all the systementitydata resources that are configured on netscaler.\nThis uses systementitydata_args which is a way to provide additional arguments while fetching the resources.",
"Checks that index is valid an throw an exception if not.\n\n@param type the type\n@param index the index to check",
"Initialize dates panel elements.",
"Refactor the method into public CXF utility and reuse it from CXF instead copy&paste"
] |
public IPv4Address getEmbeddedIPv4Address(int byteIndex) {
if(byteIndex == IPv6Address.MIXED_ORIGINAL_SEGMENT_COUNT * IPv6Address.BYTES_PER_SEGMENT) {
return getEmbeddedIPv4Address();
}
IPv4AddressCreator creator = getIPv4Network().getAddressCreator();
return creator.createAddress(getSection().getEmbeddedIPv4AddressSection(byteIndex, byteIndex + IPv4Address.BYTE_COUNT)); /* address creation */
} | [
"Produces an IPv4 address from any sequence of 4 bytes in this IPv6 address.\n\n@param byteIndex the byte index to start\n@throws IndexOutOfBoundsException if the index is less than zero or bigger than 7\n@return"
] | [
"See convertToSQL92.\n\n@return SQL like sub-expression\n@throws IllegalArgumentException oops",
"Populates a relation list.\n\n@param task parent task\n@param field target task field\n@param data MPX relation list data",
"Loaders call this method to register themselves. This method can be called by\nloaders provided by the application.\n\n@param textureClass\nThe class the loader is responsible for loading.\n\n@param asyncLoaderFactory\nThe factory object.",
"In case parent thread spawn thread we need create a new queue\nfor child thread but use the only one root step. In the end all steps will be\nchildren of root step, all we need is sync adding steps\n@param parentValue value from parent thread\n@return local copy of queue in this thread with parent root as first element",
"Use this API to fetch a cmpglobal_cmppolicy_binding resources.",
"Use this API to fetch dnspolicy_dnsglobal_binding resources of given name .",
"Resets all member fields that hold information about the revision that is\ncurrently being processed.",
"Check if this is a redeployment triggered after the removal of a link.\n@param operation the current operation.\n@return true if this is a redeploy after the removal of a link.\n@see org.jboss.as.server.deploymentoverlay.DeploymentOverlayDeploymentRemoveHandler",
"Returns the total number of weights associated with this classifier.\n\n@return number of weights"
] |
public static ConstraintField getInstance(int value)
{
ConstraintField result = null;
if (value >= 0 && value < FIELD_ARRAY.length)
{
result = FIELD_ARRAY[value];
}
return (result);
} | [
"Retrieve an instance of the ConstraintField class based on the data read from an\nMS Project file.\n\n@param value value from an MS Project file\n@return ConstraintField instance"
] | [
"Calls the specified function with the specified arguments. This is used for v2 response overrides\n\n@param className name of class\n@param methodName name of method\n@param pluginArgs plugin arguments\n@param args arguments to supply to function\n@throws Exception exception",
"Use this API to add dnsview resources.",
"Select a List of values from a Matcher using a Collection\nto identify the indices to be selected.\n\n@param self a Matcher\n@param indices a Collection of indices\n@return a String of the values at the given indices\n@since 1.6.0",
"Create an error image.\n\n@param area The size of the image",
"Read resource data from a PEP file.",
"Process the module and bundle roots and cross check with the installed information.\n\n@param conf the installed configuration\n@param moduleRoots the module roots\n@param bundleRoots the bundle roots\n@return the processed layers\n@throws IOException",
"Sets the content type for this ID\n\n@param pathId ID of path\n@param contentType content type value",
"Polls the next char from the stack\n\n@return next char",
"Frees the temporary LOBs when an exception is raised in the application\nor when the LOBs are no longer needed. If the LOBs are not freed, the\nspace used by these LOBs are not reclaimed.\n@param clob CLOB-wrapper to free or null\n@param blob BLOB-wrapper to free or null"
] |
protected Boolean getSearchForEmptyQuery() {
Boolean isSearchForEmptyQuery = parseOptionalBooleanValue(m_configObject, JSON_KEY_SEARCH_FOR_EMPTY_QUERY);
return (isSearchForEmptyQuery == null) && (null != m_baseConfig)
? Boolean.valueOf(m_baseConfig.getGeneralConfig().getSearchForEmptyQueryParam())
: isSearchForEmptyQuery;
} | [
"Returns a flag, indicating if search should be performed using a wildcard if the empty query is given.\n@return A flag, indicating if search should be performed using a wildcard if the empty query is given."
] | [
"Print a day.\n\n@param day Day instance\n@return day value",
"Insert an entity into the datastore.\n\nThe entity must have no ids.\n\n@return The key for the inserted entity.\n@throws DatastoreException on error",
"Retrieve an enterprise field value.\n\n@param index field index\n@return field value",
"Fires the event.\n\n@param source the event source\n@param date the date\n@param isTyping true if event was caused by user pressing key that may have changed the value",
"Sets the license for a photo.\n\nThis method requires authentication with 'write' permission.\n\n@param photoId\nThe photo to update the license for.\n@param licenseId\nThe license to apply, or 0 (zero) to remove the current license.\n@throws FlickrException",
"Adds each of the specified followers to the task, if they are not already\nfollowing. Returns the complete, updated record for the affected task.\n\n@param task The task to add followers to.\n@return Request object",
"Orders first by word, then by lemma, then by tag.\n\n@param wordLemmaTag object to compare to\n@return result (positive if <code>this</code> is greater than\n<code>obj</code>, 0 if equal, negative otherwise)",
"Convolve with a 2D kernel.\n@param kernel the kernel\n@param inPixels the input pixels\n@param outPixels the output pixels\n@param width the width\n@param height the height\n@param alpha include alpha channel\n@param edgeAction what to do at the edges",
"Given a directory, determine if it contains a multi-file database whose format\nwe can process.\n\n@param directory directory to process\n@return ProjectFile instance if we can process anything, or null"
] |
public ItemRequest<Project> removeCustomFieldSetting(String project) {
String path = String.format("/projects/%s/removeCustomFieldSetting", project);
return new ItemRequest<Project>(this, Project.class, path, "POST");
} | [
"Remove a custom field setting on the project.\n\n@param project The project to associate the custom field with\n@return Request object"
] | [
"Validates the inputed color value.\n@param colorvalue the value of the color\n@return true if the inputed color value is valid",
"Counts a single pair of coordinates in all datasets.\n\n@param xCoord\n@param yCoord\n@param itemDocument",
"This method writes data for a single calendar to an MSPDI file.\n\n@param bc Base calendar data\n@return New MSPDI calendar instance",
"Arrange to become the tempo master. Starts a sequence of interactions with the other players that should end\nup with us in charge of the group tempo and beat alignment.\n\n@throws IllegalStateException if we are not sending status updates\n@throws IOException if there is a problem sending the master yield request",
"Use this API to fetch all the systemuser resources that are configured on netscaler.",
"Returns a Span that covers all rows beginning with a prefix.",
"Given a string with method or package name, creates a Class Name with no\nspaces and first letter lower case\n\n@param String\n- The name of the scenario/story. It should be in lower case.\n@returns String - The class name",
"build a complete set of local files, files from referenced projects, and dependencies.",
"find the middle point of two intersect points in circle,only one point will be correct\n\n@param center\n@param a\n@param b\n@param area\n@param radius\n@return"
] |
protected void modify(Transaction t) {
try {
this.lock.writeLock().lock();
t.perform();
} finally {
this.lock.writeLock().unlock();
}
} | [
"Executes the given transaction within the context of a write lock.\n\n@param t The transaction to execute."
] | [
"Get all info for the specified photo.\n\nThe calling user must have permission to view the photo.\n\nThis method does not require authentication.\n\n@param photoId\nThe photo Id\n@param secret\nThe optional secret String\n@return The Photo\n@throws FlickrException",
"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)",
"Use this API to update cmpparameter.",
"Register this broker in ZK for the first time.",
"Splits timephased work segments in line with cost rates. Note that this is\nan approximation - where a rate changes during a working day, the second\nrate is used for the whole day.\n\n@param table cost rate table\n@param calendar calendar used by this assignment\n@param work timephased work segment\n@param rateIndex rate applicable at the start of the timephased work segment\n@return list of segments which replace the one supplied by the caller",
"Serialize a parameterized object to an OutputStream.\n\n@param object The object to serialize.\n@param parameterizedType The ParameterizedType describing the object. Ex: LoganSquare.serialize(object, new ParameterizedType<MyModel<OtherModel>>() { }, os);\n@param os The OutputStream being written to.",
"Computes the null space using QRP decomposition. This is faster than using SVD but slower than QR.\nMuch more stable than QR though.\n@param A (Input) Matrix\n@param totalSingular Number of singular values\n@return Null space",
"All the sub-level attributes.\n\n@param name the attribute name.\n@param attribute the attribute.",
"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."
] |
public boolean attachComponent(GVRComponent component) {
if (component.getNative() != 0) {
NativeSceneObject.attachComponent(getNative(), component.getNative());
}
synchronized (mComponents) {
long type = component.getType();
if (!mComponents.containsKey(type)) {
mComponents.put(type, component);
component.setOwnerObject(this);
return true;
}
}
return false;
} | [
"Attach a component to this scene object.\n\nEach scene object has a list of components that may\nbe attached to it. Only one component of a particular type\ncan be attached. Components are retrieved based on their type.\n\n@return true if component is attached, false if a component of that class is already attached.\n@param component component to attach.\n@see GVRSceneObject#detachComponent(long)\n@see GVRSceneObject#getComponent(long)"
] | [
"Returns the Set of entities recognized by this Classifier.\n\n@return The Set of entities recognized by this Classifier.",
"Dumps all properties of a material to stdout.\n\n@param material the material",
"Make a copy of this Area of Interest.",
"Use this API to fetch all the spilloverpolicy resources that are configured on netscaler.",
"Add all elements in the iterator to the collection.\n\n@param target\n@param iterator\n@return true if the target was modified, false otherwise",
"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.",
"Returns an immutable view of a given map.",
"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.",
"handles when a member leaves and hazelcast partition data is lost. We want\nto find the Futures that are waiting on lost data and error them"
] |
public CollectionRequest<Task> getTasksWithTag(String tag) {
String path = String.format("/tags/%s/tasks", tag);
return new CollectionRequest<Task>(this, Task.class, path, "GET");
} | [
"Returns the compact task records for all tasks with the given tag.\nTasks can have more than one tag at a time.\n\n@param tag The tag to fetch tasks from.\n@return Request object"
] | [
"Helper for parsing properties\n@param p The properties object\n@param key The key to retrieve\n@param defaultValue The default value if the key does not exist\n@param used The set of keys we have seen\n@return The value of the property at the key",
"Checks the existence of the directory. If it does not exist, the method creates it.\n\n@param dir the directory to check.\n@throws IOException if fails.",
"Throw IllegalArgumentException if the value is null.\n\n@param name the parameter name.\n@param value the value that should not be null.\n@param <T> the value type.\n@throws IllegalArgumentException if value is null.",
"Compares the StoreVersionManager's internal state with the content on the file-system\nof the rootDir provided at construction time.\n\nTODO: If the StoreVersionManager supports non-RO stores in the future,\nwe should move some of the ReadOnlyUtils functions below to another Utils class.",
"Use this API to fetch all the nd6ravariables resources that are configured on netscaler.",
"Sign in a group of connections to the registry by key\n\n@param key\nthe key\n@param connections\na collection of websocket connections",
"Await service container stability ignoring thread interruption.\n\n@param timeout maximum period to wait for service container stability\n@param timeUnit unit in which {@code timeout} is expressed\n\n@throws java.util.concurrent.TimeoutException if service container stability is not reached before the specified timeout",
"Get the label distance..\n\n@param settings Parameters for rendering the scalebar.",
"Converts plan text into anonymous text. Preserves upper case, lower case,\npunctuation, whitespace and digits while making the text unreadable.\n\n@param oldText text to replace\n@param replacements map of find/replace pairs"
] |
public Weld extensions(Extension... extensions) {
this.extensions.clear();
for (Extension extension : extensions) {
addExtension(extension);
}
return this;
} | [
"Define the set of extensions.\n\n@param extensions\n@return self"
] | [
"Decomposes a submatrix. The results are written to the submatrix\nand to its internal matrix L.\n\n@param mat A matrix which has a submatrix that needs to be inverted\n@param indexStart the first index of the submatrix\n@param n The width of the submatrix that is to be inverted.\n@return True if it was able to finish the decomposition.",
"Alias accessor provided for JSON serialization only",
"Convert a geometry class to a layer type.\n\n@param geometryClass\nJTS geometry class\n@return Geomajas layer type",
"Creates a triangular matrix where the amount of fill is randomly selected too.\n\n@param upper true for upper triangular and false for lower\n@param N number of rows and columns\ner * @param minFill minimum fill fraction\n@param maxFill maximum fill fraction\n@param rand random number generator\n@return Random matrix",
"Scans the given token global token stream for a list of sub-token\nstreams representing those portions of the global stream that\nmay contain date time information\n\n@param stream\n@return",
"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\".",
"Print a work contour.\n\n@param value WorkContour instance\n@return work contour value",
"Pick arbitrary wrapping method. No generics should be set.\n@param builder",
"Use this API to update tmtrafficaction."
] |
private static String mapContent(DataHandler dh) {
if (dh == null) {
return "";
}
try {
InputStream is = dh.getInputStream();
String content = IOUtils.toString(is);
is.close();
return content;
} catch (IOException e) {
throw new RuntimeException(e);
}
} | [
"Map content.\n\n@param dh the data handler\n@return the string"
] | [
"Gets a property from system, environment or an external map.\nThe lookup order is system > env > map > defaultValue.\n\n@param name\nThe name of the property.\n@param map\nThe external map.\n@param defaultValue\nThe value that should be used if property is not found.",
"Configure if you want this collapsible container to\naccordion its child elements or use expandable.",
"Use this API to export appfwlearningdata resources.",
"Sets the time to wait when close connection watch threads are enabled. 0 = wait forever.\n@param closeConnectionWatchTimeout the watchTimeout to set\n@param timeUnit Time granularity",
"Attach all project models within the application to the index. This will make it easy to navigate from the\nprojectModel to the application index.",
"Read metadata by populating an instance of the target class\nusing SAXParser.",
"Finds all lazily-declared classes and methods and adds their definitions to the source.",
"Shows the Loader component",
"Convert an Object of type Class to an Object."
] |
public static BoxUser.Info createAppUser(BoxAPIConnection api, String name,
CreateUserParams params) {
params.setIsPlatformAccessOnly(true);
return createEnterpriseUser(api, null, name, params);
} | [
"Provisions a new app user in an enterprise with additional user information using Box Developer Edition.\n@param api the API connection to be used by the created user.\n@param name the name of the user.\n@param params additional user information.\n@return the created user's info."
] | [
"Convert event type.\n\n@param eventType the event type\n@return the event enum type",
"Initializes the fields on the changes file with the values of the specified\nbinary package control file.\n\n@param packageControlFile",
"Returns the real value object.",
"Evict cached object\n\n@param key\nthe key indexed the cached object to be evicted",
"This method returns the string representation of an object. In most\ncases this will simply involve calling the normal toString method\non the object, but a couple of exceptions are handled here.\n\n@param o the object to formatted\n@return formatted string representing input Object",
"Add the key and return it's index code. If the key already is present, the previous\nindex code is returned and no insertion is done.\n\n@param key key to add\n@return index of the key",
"Process class properties.\n\n@param writer output stream\n@param methodSet set of methods processed\n@param aClass class being processed\n@throws IntrospectionException\n@throws XMLStreamException",
"Calculate a threshold.\n\n@param x first string.\n@param y second string.\n@param p the threshold coefficient.\n@return 2 maxLength(x, y) (1-p)",
"Get container for principal.\n\n@param cms cmsobject\n@param list of principals\n@param captionID caption id\n@param descID description id\n@param iconID icon id\n@param ouID ou id\n@param icon icon\n@param iconList iconlist\n@return indexedcontainer"
] |
private GeometryCoordinateSequenceTransformer getTransformer() {
if (unitToPixel == null) {
unitToPixel = new GeometryCoordinateSequenceTransformer();
unitToPixel.setMathTransform(ProjectiveTransform.create(new AffineTransform(scale, 0, 0, -scale, -scale
* panOrigin.x, scale * panOrigin.y)));
}
return unitToPixel;
} | [
"Get transformer to use.\n\n@return transformation to apply"
] | [
"Generates a Map of query parameters for Module regarding the filters\n\n@return Map<String, Object>",
"Sets the right padding character for all cells in the table.\n@param paddingRightChar new padding character, ignored if null\n@return this to allow chaining",
"Add the given, single header value under the given name.\n@param headerName the header name\n@param headerValue the header value\n@throws UnsupportedOperationException if adding headers is not supported\n@see #put(String, List)\n@see #set(String, String)",
"Pretty prints the output of getMapOfContiguousPartitionRunLengths\n\n@param cluster\n@param zoneId\n@return pretty string of contiguous run lengths",
"Given a key and a list of steal infos give back a list of stealer node\nids which will steal this.\n\n@param key Byte array of key\n@param stealerNodeToMappingTuples Pairs of stealer node id to their\ncorresponding [ partition - replica ] tuples\n@param cluster Cluster metadata\n@param storeDef Store definitions\n@return List of node ids",
"Extracts project properties from a ConceptDraw PROJECT file.\n\n@param cdp ConceptDraw PROJECT file",
"Convert the Phoenix representation of a duration into a Duration instance.\n\n@param value Phoenix duration\n@return Duration instance",
"Reads the configuration of a range facet.\n@param pathPrefix The XML Path that leads to the range facet configuration, or <code>null</code> if the XML was not correctly structured.\n@return The read configuration, or <code>null</code> if the XML was not correctly structured.",
"Gets an app client by its client app id if it has been initialized; throws if none can be\nfound.\n\n@param clientAppId the client app id of the app client to get.\n@return the app client associated with the client app id."
] |
public HttpServer build() {
checkNotNull(baseUri);
StandaloneWebConverterConfiguration configuration = makeConfiguration();
// The configuration has to be configured both by a binder to make it injectable
// and directly in order to trigger life cycle methods on the deployment container.
ResourceConfig resourceConfig = ResourceConfig
.forApplication(new WebConverterApplication(configuration))
.register(configuration);
if (sslContext == null) {
return GrizzlyHttpServerFactory.createHttpServer(baseUri, resourceConfig);
} else {
return GrizzlyHttpServerFactory.createHttpServer(baseUri, resourceConfig, true, new SSLEngineConfigurator(sslContext));
}
} | [
"Creates the conversion server that is specified by this builder.\n\n@return The conversion server that is specified by this builder."
] | [
"Serialize an object with Json\n@param obj Object\n@return String\n@throws IOException",
"Convert tenor given as offset in months to year fraction.\n\n@param maturityInMonths The maturity as offset in months.\n@param tenorInMonths The tenor as offset in months.\n@return THe tenor as year fraction.",
"This method writes extended attribute data for a task.\n\n@param xml MSPDI task\n@param mpx MPXJ task",
"Internal method which is called when the user has finished editing the title.\n\n@param box the text box which has been edited",
"Abort and close the transaction.\nCalling abort abandons all persistent object modifications and releases the\nassociated locks.\nIf transaction is not in progress a TransactionNotInProgressException is thrown",
"We want to get the best result possible as this value\nis used to determine what work needs to be recovered.\n\n@return",
"Returns a flag, indicating if search should be performed using a wildcard if the empty query is given.\n@return A flag, indicating if search should be performed using a wildcard if the empty query is given.",
"Given a filesystem and path to a node, gets all the files which belong to\na partition and replica type\n\nWorks only for {@link ReadOnlyStorageFormat.READONLY_V2}\n\n@param fs Underlying filesystem\n@param path The node directory path\n@param partitionId The partition id for which we get the files\n@param replicaType The replica type\n@return Returns list of files of this partition, replicaType\n@throws IOException",
"Adds all fields declared in the object's class and its superclasses to the output.\n@return this"
] |
public Channel sessionConnectGenerateChannel(Session session)
throws JSchException {
// set timeout
session.connect(sshMeta.getSshConnectionTimeoutMillis());
ChannelExec channel = (ChannelExec) session.openChannel("exec");
channel.setCommand(sshMeta.getCommandLine());
// if run as super user, assuming the input stream expecting a password
if (sshMeta.isRunAsSuperUser()) {
try {
channel.setInputStream(null, true);
OutputStream out = channel.getOutputStream();
channel.setOutputStream(System.out, true);
channel.setExtOutputStream(System.err, true);
channel.setPty(true);
channel.connect();
out.write((sshMeta.getPassword()+"\n").getBytes());
out.flush();
} catch (IOException e) {
logger.error("error in sessionConnectGenerateChannel for super user", e);
}
} else {
channel.setInputStream(null);
channel.connect();
}
return channel;
} | [
"Session connect generate channel.\n\n@param session\nthe session\n@return the channel\n@throws JSchException\nthe j sch exception"
] | [
"Are these two numbers effectively equal?\n\nThe same logic is applied for each of the 3 vector dimensions: see {@link #equal}\n@param v1\n@param v2",
"Read data for a single column.\n\n@param startIndex block start\n@param length block length",
"If directory doesn't exists try to create it.\n\n@param directory given directory to check\n@throws ReportGenerationException if can't create specified directory",
"Inserts the result of the migration into the migration table\n\n@param migration the migration that was executed\n@param wasSuccessful indicates if the migration was successful or not",
"Calculate start dates for a daily recurrence.\n\n@param calendar current date\n@param frequency frequency\n@param dates array of start dates",
"Removes CRs but returns LFs",
"The handling method.",
"Use this API to update csparameter.",
"Refresh's this connection's access token using Box Developer Edition.\n@throws IllegalStateException if this connection's access token cannot be refreshed."
] |
static void handleNotificationClicked(Context context,Bundle notification) {
if (notification == null) return;
String _accountId = null;
try {
_accountId = notification.getString(Constants.WZRK_ACCT_ID_KEY);
} catch (Throwable t) {
// no-op
}
if (instances == null) {
CleverTapAPI instance = createInstanceIfAvailable(context, _accountId);
if (instance != null) {
instance.pushNotificationClickedEvent(notification);
}
return;
}
for (String accountId: instances.keySet()) {
CleverTapAPI instance = CleverTapAPI.instances.get(accountId);
boolean shouldProcess = false;
if (instance != null) {
shouldProcess = (_accountId == null && instance.config.isDefaultInstance()) || instance.getAccountId().equals(_accountId);
}
if (shouldProcess) {
instance.pushNotificationClickedEvent(notification);
break;
}
}
} | [
"other static handlers"
] | [
"This method extracts a portion of a byte array and writes it into\nanother byte array.\n\n@param data Source data\n@param offset Offset into source data\n@param size Required size to be extracted from the source data\n@param buffer Destination buffer\n@param bufferOffset Offset into destination buffer",
"returns a sorted array of constructors",
"Get the inactive history directories.\n\n@return the inactive history",
"Adds multiple observers using unique integer prefixes for each.\n\n@deprecated since 1.1.0. Replaced by {@link #setObserverProvider(String)} and\n{@link #getObserverProvider()}",
"Used to create a new finite retention policy with optional parameters.\n@param api the API connection to be used by the created user.\n@param name the name of the retention policy.\n@param length the duration in days that the retention policy will be active for after being assigned to content.\n@param action the disposition action can be \"permanently_delete\" or \"remove_retention\".\n@param optionalParams the optional parameters.\n@return the created retention policy's info.",
"Get the nearest scale.\n\n@param zoomLevels the list of Zoom Levels.\n@param tolerance the tolerance to use when considering if two values are equal. For example if\n12.0 == 12.001. The tolerance is a percentage.\n@param zoomLevelSnapStrategy the strategy to use for snapping to the nearest zoom level.\n@param geodetic snap to geodetic scales.\n@param paintArea the paint area of the map.\n@param dpi the DPI.",
"Closes the connection to the Z-Wave controller.",
"Template method for verification of lazy initialisation.",
"Process the layers.conf file.\n\n@param repoRoot the root\n@return the layers conf\n@throws java.io.IOException"
] |
public void translateRectangle(Rectangle rect, float dx, float dy) {
float width = rect.getWidth();
float height = rect.getHeight();
rect.setLeft(rect.getLeft() + dx);
rect.setBottom(rect.getBottom() + dy);
rect.setRight(rect.getLeft() + dx + width);
rect.setTop(rect.getBottom() + dy + height);
} | [
"Translate this rectangle over the specified following distances.\n\n@param rect rectangle to move\n@param dx delta x\n@param dy delta y"
] | [
"Calculates the vega of a digital option under a Black-Scholes model\n\n@param initialStockValue The initial value of the underlying, i.e., the spot.\n@param riskFreeRate The risk free rate of the bank account numerarie.\n@param volatility The Black-Scholes volatility.\n@param optionMaturity The option maturity T.\n@param optionStrike The option strike.\n@return The vega of the digital option",
"Look for a child view with the given id. If this view has the given\nid, return this view.\n\n@param id The id to search for.\n@return The view that has the given id in the hierarchy or null",
"Parses operations where the input comes from variables to its left and right\n\n@param ops List of operations which should be parsed\n@param tokens List of all the tokens\n@param sequence List of operation sequence",
"Returns a site record for the site of the given name, creating a new one\nif it does not exist yet.\n\n@param siteKey\nthe key of the site\n@return the suitable site record",
"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",
"Creates a new ServerDetails object for resolver, this will take URL and name from the deployer ServerDetails as a default behaviour",
"Get the value for a particular configuration property\n\n@param name - name of the property\n@return The first value encountered or null",
"Use this API to update responderpolicy.",
"Gets bounds which are identical for all dimensions.\n\n@param dim The number of dimensions.\n@param l The value of all lower bounds.\n@param u The value of all upper bounds.\n@return The new bounds."
] |
public DynamicReportBuilder setProperty(String name, String value) {
this.report.setProperty(name, value);
return this;
} | [
"Adds a property to report design, this properties are mostly used by\nexporters to know if any specific configuration is needed\n\n@param name\n@param value\n@return A Dynamic Report Builder"
] | [
"Get the spin scripting environment\n\n@param language the language name\n@return the environment script as string or null if the language is\nnot in the set of languages supported by spin.",
"Validates the inputed color value.\n@param colorvalue the value of the color\n@return true if the inputed color value is valid",
"Returns true if\n- includeTags is not empty and tag is in includeTags\n- includeTags is empty and tag is not in excludeTags\n@param tags Hint tags\n@param includeTags Include tags\n@param excludeTags Exclude tags\n@return has tag match",
"add an Extent class to the current descriptor\n@param newExtentClassName name of the class to add",
"Schedule at most one task.\n\nThe scheduled task *must* invoke 'doneTask()' upon\ncompletion/termination.\n\n@param executeService flag to control execution of the service, some tests pass\nin value 'false'\n@return The task scheduled or null if not possible to schedule a task at\nthis time.",
"Sets reference to the graph owning this node.\n\n@param ownerGraph the owning graph",
"Used to load a classifier stored as a resource inside a jar file. THIS\nFUNCTION WILL ONLY WORK IF THE CODE WAS LOADED FROM A JAR FILE WHICH HAS A\nSERIALIZED CLASSIFIER STORED INSIDE IT.\n\n@param resourceName\nName of clasifier resource inside the jar file.\n@return A CRFClassifier stored in the jar file",
"Encodes the given URI path segment with the given encoding.\n@param segment the segment to be encoded\n@param encoding the character encoding to encode to\n@return the encoded segment\n@throws UnsupportedEncodingException when the given encoding parameter is not supported",
"Create the service name for a channel\n\n@param channelName\nthe channel name\n@return the service name"
] |
public ItemRequest<CustomField> updateEnumOption(String enumOption) {
String path = String.format("/enum_options/%s", enumOption);
return new ItemRequest<CustomField>(this, CustomField.class, path, "PUT");
} | [
"Updates an existing enum option. Enum custom fields require at least one enabled enum option.\n\nReturns the full record of the updated enum option.\n\n@param enumOption Globally unique identifier for the enum option.\n@return Request object"
] | [
"Read assignment data.",
"Find the channel in the animation that animates the named bone.\n@param boneName name of bone to animate.",
"Clears the internal used cache for object materialization.",
"Return collection of path Ids in priority order\n\n@param profileId ID of profile\n@return collection of path Ids in priority order",
"Use this API to add dnspolicylabel resources.",
"Returns a single item from the Iterator.\nIf there's none, returns null.\nIf there are more, throws an IllegalStateException.\n\n@throws IllegalStateException",
"Replace a single value at the appropriate location in the existing value array.\n@param index - location in the array list\n@param newValue - the new String",
"Map originator type.\n\n@param originatorType the originator type\n@return the originator",
"Retrieves a vertex attribute as an integer array.\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>int</i>\n@see #setIntVec(String, IntBuffer)\n@see #getIntArray(String)"
] |
public List depthFirst() {
List answer = new NodeList();
answer.add(this);
answer.addAll(depthFirstRest());
return answer;
} | [
"Provides a collection of all the nodes in the tree\nusing a depth first traversal.\n\n@return the list of (depth-first) ordered nodes"
] | [
"Use this API to save cacheobject resources.",
"Determine the enum value corresponding to the track source slot found in the packet.\n\n@return the proper value",
"Installs a path service.\n\n@param name the name to use for the service\n@param path the relative portion of the path\n@param possiblyAbsolute {@code true} if {@code path} may be an {@link #isAbsoluteUnixOrWindowsPath(String) absolute path}\nand should be {@link AbsolutePathService installed as such} if it is, with any\n{@code relativeTo} parameter ignored\n@param relativeTo the name of the path that {@code path} may be relative to\n@param serviceTarget the {@link ServiceTarget} to use to install the service\n@return the ServiceController for the path service",
"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",
"This method extracts data for a normal working day from an MSPDI file.\n\n@param calendar Calendar data\n@param weekDay Day data",
"Merges the item from the resultLocaleValues into the corresponding item of the localeValues.\n@param item the item to merge\n@param localeValues the values where the item gets merged into\n@param resultLocaleValues the values where the item to merge is read from\n@return the modified localeValues with the merged item",
"ceiling for clipped RELU, alpha for ELU",
"Returns whether this address contains the non-zero host addresses in other.\n@param other\n@return",
"Use this API to fetch statistics of service_stats resource of given name ."
] |
private void logOriginalResponseHistory(
PluginResponse httpServletResponse, History history) throws URIException {
RequestInformation requestInfo = requestInformation.get();
if (requestInfo.handle && requestInfo.client.getIsActive()) {
logger.info("Storing original response history");
history.setOriginalResponseHeaders(HttpUtilities.getHeaders(httpServletResponse));
history.setOriginalResponseCode(Integer.toString(httpServletResponse.getStatus()));
history.setOriginalResponseContentType(httpServletResponse.getContentType());
history.setOriginalResponseData(httpServletResponse.getContentString());
logger.info("Done storing");
}
} | [
"Log original response\n\n@param httpServletResponse\n@param history\n@throws URIException"
] | [
"Create an object of the given type using a constructor that matches the\nsupplied arguments and invoke the setters with the supplied variables.\n\n@param <T> the object type\n@param clazz\nthe type to create\n@param args\nthe arguments to the constructor\n@param vars\nthe named arguments for setters\n@return a new object of the given type, initialized with the given\narguments\n@throws NoSuchConstructorException\nif there is not a constructor that matches the given\narguments\n@throws AmbiguousConstructorException\nif there is more than one constructor that matches the given\narguments\n@throws ReflectiveOperationException\nif any of the reflective operations throw an exception",
"Notify all WorkerListeners currently registered for the given WorkerEvent.\n@param event the WorkerEvent that occurred\n@param worker the Worker that the event occurred in\n@param queue the queue the Worker is processing\n@param job the Job related to the event (only supply for JOB_PROCESS, JOB_EXECUTE, JOB_SUCCESS, and\nJOB_FAILURE events)\n@param runner the materialized object that the Job specified (only supply for JOB_EXECUTE and\nJOB_SUCCESS events)\n@param result the result of the successful execution of the Job (only set for JOB_SUCCESS and if the Job was\na Callable that returned a value)\n@param t the Throwable that caused the event (only supply for JOB_FAILURE and ERROR events)",
"Provides a message which describes the expected format and arguments\nfor this command. This is used to provide user feedback when a command\nrequest is malformed.\n\n@return A message describing the command protocol format.",
"Traverses the test case annotations. Will inject a HiveShell in the test case that envelopes the HiveServer.",
"Get a list of modules regarding filters\n\n@param filters Map<String,String>\n@return List<Module>\n@throws GrapesCommunicationException",
"note this string is used by hashCode",
"Compute \"sent\" date\n\n@param msg Message to take sent date from. May be null to use default\n@param defaultVal Default if sent date is not present\n@return Sent date or now if no date could be found",
"Function to perform backward softmax",
"Append environment variables and system properties from othre PipelineEvn object"
] |
@Override
protected void clearReference(EObject obj, EReference ref) {
super.clearReference(obj, ref);
if (obj.eIsSet(ref) && ref.getEType().equals(XtextPackage.Literals.TYPE_REF)) {
INode node = NodeModelUtils.getNode((EObject) obj.eGet(ref));
if (node == null)
obj.eUnset(ref);
}
if (obj.eIsSet(ref) && ref == XtextPackage.Literals.CROSS_REFERENCE__TERMINAL) {
INode node = NodeModelUtils.getNode((EObject) obj.eGet(ref));
if (node == null)
obj.eUnset(ref);
}
if (ref == XtextPackage.Literals.RULE_CALL__RULE) {
obj.eUnset(XtextPackage.Literals.RULE_CALL__EXPLICITLY_CALLED);
}
} | [
"We add typeRefs without Nodes on the fly, so we should remove them before relinking."
] | [
"Updates the terms and statements of the current document.\nThe updates are computed with respect to the current data in the document,\nmaking sure that no redundant deletions or duplicate insertions\nhappen. The references of duplicate statements will be merged. The labels\nand aliases in a given language are kept distinct.\n\n@param currentDocument\nthe document to be updated; needs to have a correct revision id and\nentity id\n@param addLabels\nlabels to be set on the item. They will overwrite existing values\nin the same language.\n@param addDescriptions\ndescription to be set on the item. They will overwrite existing values\nin the same language.\n@param addAliases\naliases to be added. Existing aliases will be kept.\n@param deleteAliases\naliases to be deleted.\n@param addStatements\nthe list of statements to be added or updated; statements with\nempty statement id will be added; statements with non-empty\nstatement id will be updated (if such a statement exists)\n@param deleteStatements\nthe list of statements to be deleted; statements will only be\ndeleted if they are present in the current document (in\nexactly the same form, with the same id)\n@param summary\nshort edit summary\n@return the updated document\n@throws MediaWikiApiErrorException\nif the API returns errors\n@throws IOException\nif there are any IO errors, such as missing network connection",
"Sets the server groups for the deployment.\n\n@param serverGroups the server groups to set\n\n@return this deployment",
"Parses a record containing hours and add them to a container.\n\n@param ranges hours container\n@param hoursRecord hours record",
"Process a calendar exception.\n\n@param calendar parent calendar\n@param row calendar exception data",
"Return a new File object based on the baseDir and the segments.\n\nThis method does not perform any operation on the file system.",
"Process the module and bundle roots and cross check with the installed information.\n\n@param conf the installed configuration\n@param moduleRoots the module roots\n@param bundleRoots the bundle roots\n@return the processed layers\n@throws IOException",
"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",
"Sets the maximum time to wait before a call to getConnection is timed out.\n\nSetting this to zero is similar to setting it to Long.MAX_VALUE\n\n@param connectionTimeout\n@param timeUnit the unit of the connectionTimeout argument",
"Records the result of updating a server.\n\n@param server the id of the server. Cannot be <code>null</code>\n@param response the result of the updates"
] |
public int executeTask(final TransactionalProtocolClient.TransactionalOperationListener<ServerOperation> listener, final ServerUpdateTask task) {
try {
return execute(listener, task.getServerIdentity(), task.getOperation());
} catch (OperationFailedException e) {
// Handle failures operation transformation failures
final ServerIdentity identity = task.getServerIdentity();
final ServerOperation serverOperation = new ServerOperation(identity, task.getOperation(), null, null, OperationResultTransformer.ORIGINAL_RESULT);
final TransactionalProtocolClient.PreparedOperation<ServerOperation> result = BlockingQueueOperationListener.FailedOperation.create(serverOperation, e);
listener.operationPrepared(result);
recordExecutedRequest(new ExecutedServerRequest(identity, result.getFinalResult(), OperationResultTransformer.ORIGINAL_RESULT));
return 1; // 1 ms timeout since there is no reason to wait for the locally stored result
}
} | [
"Execute a server task.\n\n@param listener the transactional server listener\n@param task the server task\n@return time to wait in ms for a response from the server, or {@code -1} if the task execution failed locally"
] | [
"Gets the data handler from event.\n\n@param event the event\n@return the data handler",
"Writes resource baseline data.\n\n@param xmlResource MSPDI resource\n@param mpxjResource MPXJ resource",
"Confirms that both clusters have the same set of zones defined.\n\n@param lhs\n@param rhs",
"Get a property as a boolean or default value.\n\n@param key the property name\n@param defaultValue the default",
"Move sections relative to each other in a board view. One of\n`before_section` or `after_section` is required.\n\nSections cannot be moved between projects.\n\nAt this point in time, moving sections is not supported in list views, only board views.\n\nReturns an empty data block.\n\n@param project The project in which to reorder the given section\n@return Request object",
"create a broker with given broker info\n\n@param id broker id\n@param brokerInfoString broker info format: <b>creatorId:host:port:autocreated</b>\n@return broker instance with connection config\n@see #getZKString()",
"Modies the matrix to make sure that at least one element in each column has a value",
"Extract data for a single resource assignment.\n\n@param task parent task\n@param row Synchro resource assignment",
"Calculates the Black-Scholes option value of a digital call option.\n\n@param initialStockValue The initial value of the underlying, i.e., the spot.\n@param riskFreeRate The risk free rate of the bank account numerarie.\n@param volatility The Black-Scholes volatility.\n@param optionMaturity The option maturity T.\n@param optionStrike The option strike.\n@return Returns the value of a European call option under the Black-Scholes model"
] |
private int decode(Huffman h) throws IOException
{
int len; /* current number of bits in code */
int code; /* len bits being decoded */
int first; /* first code of length len */
int count; /* number of codes of length len */
int index; /* index of first code of length len in symbol table */
int bitbuf; /* bits from stream */
int left; /* bits left in next or left to process */
//short *next; /* next number of codes */
bitbuf = m_bitbuf;
left = m_bitcnt;
code = first = index = 0;
len = 1;
int nextIndex = 1; // next = h->count + 1;
while (true)
{
while (left-- != 0)
{
code |= (bitbuf & 1) ^ 1; /* invert code */
bitbuf >>= 1;
//count = *next++;
count = h.m_count[nextIndex++];
if (code < first + count)
{ /* if length len, return symbol */
m_bitbuf = bitbuf;
m_bitcnt = (m_bitcnt - len) & 7;
return h.m_symbol[index + (code - first)];
}
index += count; /* else update for next length */
first += count;
first <<= 1;
code <<= 1;
len++;
}
left = (MAXBITS + 1) - len;
if (left == 0)
{
break;
}
if (m_left == 0)
{
m_in = m_input.read();
m_left = m_in == -1 ? 0 : 1;
if (m_left == 0)
{
throw new IOException("out of input"); /* out of input */
}
}
bitbuf = m_in;
m_left--;
if (left > 8)
{
left = 8;
}
}
return -9; /* ran out of codes */
} | [
"Decode a code from the stream s using huffman table h. Return the symbol or\na negative value if there is an error. If all of the lengths are zero, i.e.\nan empty code, or if the code is incomplete and an invalid code is received,\nthen -9 is returned after reading MAXBITS bits.\n\nFormat notes:\n\n- The codes as stored in the compressed data are bit-reversed relative to\na simple integer ordering of codes of the same lengths. Hence below the\nbits are pulled from the compressed data one at a time and used to\nbuild the code value reversed from what is in the stream in order to\npermit simple integer comparisons for decoding.\n\n- The first code for the shortest length is all ones. Subsequent codes of\nthe same length are simply integer decrements of the previous code. When\nmoving up a length, a one bit is appended to the code. For a complete\ncode, the last code of the longest length will be all zeros. To support\nthis ordering, the bits pulled during decoding are inverted to apply the\nmore \"natural\" ordering starting with all zeros and incrementing.\n\n@param h Huffman table\n@return status code"
] | [
"Reads a \"flags\" argument from the request.",
"Check whether error handling works. If it works, you should see an\nok, otherwise, you might see the actual error message and then\nthe program exits.",
"splits a string into a list of strings, ignoring the empty string",
"Decrements the client's use count, and makes it eligible for closing if it is no longer in use.\n\n@param client the dbserver connection client which is no longer being used for a task",
"Parses the list of query items for the query facet.\n@param queryFacetObject JSON object representing the node with the query facet.\n@return list of query options\n@throws JSONException if the list cannot be parsed.",
"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",
"decides which icon to apply or hide this view\n\n@param imageHolder\n@param imageView\n@param iconColor\n@param tint",
"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",
"Finds the maximum abs in each column of A and stores it into values\n@param A (Input) Matrix\n@param values (Output) storage for column max abs"
] |
public static String getGalleryNotFoundKey(String gallery) {
StringBuffer sb = new StringBuffer(ERROR_REASON_NO_PREFIX);
sb.append(gallery.toUpperCase());
sb.append(GUI_TITLE_POSTFIX);
return sb.toString();
} | [
"Convert gallery name to not found error key.\n@param gallery gallery name for example \"downloadgallery\"\n@return key as string \"ERR_REASON_NO_DOWNLOADGALLERY_0\""
] | [
"Use this API to fetch lbmonitor_binding resources of given names .",
"Updates the path_order column in the table, loops though the pathOrder array, and changes the value to the loop\nindex+1 for the specified pathId\n\n@param profileId ID of profile\n@param pathOrder array containing new order of paths",
"Operators which affect the variables to its left and right",
"Setter for property value. Doesn't affect entity version and doesn't\ninvalidate any of the cached entity iterables.\n\n@param localId entity local id.\n@param value property value.\n@param oldValue property old value\n@param propertyId property id",
"Return whether or not the data object has a default value passed for this field of this type.",
"Transforms the category path of a category to the category.\n@return a map from root or site path to category.",
"Use this API to fetch a filterglobal_filterpolicy_binding resources.",
"Determines the accessor method name based on a field name.\n\n@param fieldName\na field name\n@return the resulting method name",
"Apply the matching client UUID for the request\n\n@param httpServletRequest\n@param history"
] |
public boolean nextSplit() {
if( numSplits == 0 )
return false;
x2 = splits[--numSplits];
if( numSplits > 0 )
x1 = splits[numSplits-1]+1;
else
x1 = 0;
return true;
} | [
"Tells it to process the submatrix at the next split. Should be called after the\ncurrent submatrix has been processed."
] | [
"Process the module and bundle roots and cross check with the installed information.\n\n@param conf the installed configuration\n@param moduleRoots the module roots\n@param bundleRoots the bundle roots\n@return the processed layers\n@throws IOException",
"Use this API to clear nspbr6.",
"Use this API to fetch the statistics of all tunnelip_stats resources that are configured on netscaler.",
"Use this API to update rnatparam.",
"Use this API to fetch clusternodegroup resource of given name .",
"Assembles the exception message when the value received by a CellProcessor isn't of the correct type.\n\n@param expectedType\nthe expected type\n@param actualValue\nthe value received by the CellProcessor\n@return the message\n@throws NullPointerException\nif expectedType is null",
"Handles incoming Application Command Request.\n@param incomingMessage the request message to process.",
"Checks to see if a standalone server is running.\n\n@param client the client used to communicate with the server\n\n@return {@code true} if the server is running, otherwise {@code false}",
"Hides the Loader component"
] |
private Optional<? extends SoyMsgBundle> mergeMsgBundles(final Locale locale, final List<SoyMsgBundle> soyMsgBundles) {
if (soyMsgBundles.isEmpty()) {
return Optional.absent();
}
final List<SoyMsg> msgs = Lists.newArrayList();
for (final SoyMsgBundle smb : soyMsgBundles) {
for (final Iterator<SoyMsg> it = smb.iterator(); it.hasNext();) {
msgs.add(it.next());
}
}
return Optional.of(new SoyMsgBundleImpl(locale.toString(), msgs));
} | [
"Merge msg bundles together, creating new MsgBundle with merges msg bundles passed in as a method argument"
] | [
"Given a file name and read-only storage format, tells whether the file\nname format is correct\n\n@param fileName The name of the file\n@param format The RO format\n@return true if file format is correct, else false",
"Expands all parents in a range of indices in the list of parents.\n\n@param startParentPosition The index at which to to start expanding parents\n@param parentCount The number of parents to expand",
"Answer the orderBy of all Criteria and Sub Criteria\nthe elements are of class Criteria.FieldHelper\n@return List",
"Lookup the username for the specified User URL.\n\n@param url\nThe user profile URL\n@return The username\n@throws FlickrException",
"Returns the meta-data for the inverse side of the association represented by the given property on the given\npersister in case it represents the main side of a bi-directional one-to-many or many-to-many association.\n\n@param mainSidePersister persister of the entity hosting the property of interest\n@param propertyIndex index of the property of interest\n@return the meta-data of the inverse side of the specified association or {@code null} if no such meta-data\nexists",
"Print an earned value method.\n\n@param value EarnedValueMethod instance\n@return earned value method value",
"Returns the nested object definition with the specified name.\n\n@param name The name of the attribute of the nested object\n@return The nested object definition or <code>null</code> if there is no such nested object",
"Parses a single query facet item with query and label.\n@param prefix path to the query facet item (with trailing '/').\n@return the query facet item.",
"Populates a resource.\n\n@param resource resource instance\n@param record MPX record\n@throws MPXJException"
] |
public static int Hamming(String first, String second) {
if (first.length() != second.length())
throw new IllegalArgumentException("The size of string must be the same.");
int diff = 0;
for (int i = 0; i < first.length(); i++)
if (first.charAt(i) != second.charAt(i))
diff++;
return diff;
} | [
"Gets the Hamming distance between two strings.\n\n@param first First string.\n@param second Second string.\n@return The Hamming distance between p and q."
] | [
"Resize and return the image passing the new height and width\n\n@param height\n@param width\n@return",
"Generate the init script from the Artifactory URL.\n\n@return The generated script.",
"Gets the current Stack. If the stack is not set, a new empty instance is created and set.\n@return",
"Perform a security check against OpenCms.\n\n@param cms The OpenCms object.\n\n@throws CmsPermissionViolationException in case of the anonymous guest user",
"Wait and retry.",
"Returns the length of the message in bytes as it is encoded on the wire.\n\nApple require the message to be of length 255 bytes or less.\n\n@return length of encoded message in bytes",
"Gets the Jaccard distance between two points.\n\n@param p A point in space.\n@param q A point in space.\n@return The Jaccard distance between x and y.",
"Provides a RunAs client login context",
"returns a sorted array of properties"
] |
public void symm2x2_fast( double a11 , double a12, double a22 )
{
// double p = (a11 - a22)*0.5;
// double r = Math.sqrt(p*p + a12*a12);
//
// value0.real = a22 + a12*a12/(r-p);
// value1.real = a22 - a12*a12/(r+p);
// }
//
// public void symm2x2_std( double a11 , double a12, double a22 )
// {
double left = (a11+a22)*0.5;
double b = (a11-a22)*0.5;
double right = Math.sqrt(b*b+a12*a12);
value0.real = left + right;
value1.real = left - right;
} | [
"See page 385 of Fundamentals of Matrix Computations 2nd"
] | [
"Gets the element at the given index.\n\n@param index the index\n@return the element\n\n@throws IndexOutOfBoundsException if the index is out of range (<tt>index < 0 || index >= size()</tt>)",
"Retrieve any task field value lists defined in the MPP file.",
"Reads outline code custom field values and populates container.",
"Use this API to fetch filtered set of lbvserver resources.\nset the filter parameter values in filtervalue object.",
"Give next index i where i and i+timelag is valid",
"Append the given path segments to the existing path of this builder.\nEach given path segment may contain URI template variables.\n@param pathSegments the URI path segments\n@return this UriComponentsBuilder",
"Use this API to fetch all the cacheobject resources that are configured on netscaler.\nThis uses cacheobject_args which is a way to provide additional arguments while fetching the resources.",
"Assemble the configuration section of the URL.",
"Use this API to delete locationfile."
] |
public static Integer distance(String h1, String h2) {
HammingDistance distance = new HammingDistance();
return distance.apply(h1, h2);
} | [
"Calculate the Hamming distance between two hashes\n\n@param h1\n@param h2\n@return"
] | [
"Creates a new Message from the specified text.",
"Create the work pattern assignment map.\n\n@param rows calendar rows\n@return work pattern assignment map",
"Checks the existence of the directory. If it does not exist, the method creates it.\n\n@param dir the directory to check.\n@throws IOException if fails.",
"Encodes the given URI host with the given encoding.\n@param host the host to be encoded\n@param encoding the character encoding to encode to\n@return the encoded host\n@throws UnsupportedEncodingException when the given encoding parameter is not supported",
"Returns the full record for a single team.\n\n@param team Globally unique identifier for the team.\n@return Request object",
"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",
"Builds the mapping table.",
"Extracts a house holder vector from the column of A and stores it in u\n@param A Complex matrix with householder vectors stored in the lower left triangle\n@param row0 first row in A (implicitly assumed to be r + i0)\n@param row1 last row + 1 in A\n@param col Column in A\n@param u Output array storage\n@param offsetU first index in U",
"Use this API to fetch appfwwsdl resource of given name ."
] |
public void start() {
instanceLock.writeLock().lock();
try {
for (final Map.Entry<MongoNamespace, NamespaceChangeStreamListener> streamerEntry :
nsStreamers.entrySet()) {
streamerEntry.getValue().start();
}
} finally {
instanceLock.writeLock().unlock();
}
} | [
"Starts all streams."
] | [
"Generate the global CSS style for the whole document.\n@return the CSS code used in the generated document header",
"Use this API to fetch sslcipher_individualcipher_binding resources of given name .",
"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",
"initializer to setup JSAdapter prototype in the given scope",
"This method extracts resource data from a Planner file.\n\n@param plannerProject Root node of the Planner file",
"Writes this address as a single hexadecimal value with always the exact same number of characters, with or without a preceding 0x prefix.",
"Scales the weights of this crfclassifier by the specified weight\n\n@param scale",
"Remove a key from the given map.\n\n@param <K> type of the map keys.\n@param <V> type of the map values.\n@param map the map to update.\n@param key the key to remove.\n@return the removed value, or <code>null</code> if the key was not\npresent in the map.\n@since 2.15",
"Calculates the column width according to its type.\n@param _property the property.\n@return the column width."
] |
private boolean isDepOfIdlArtifact(Artifact artifact, Map<String, Artifact> depsMap) {
List<String> depTrail = artifact.getDependencyTrail();
// depTrail can be null sometimes, which seems like a maven bug
if (depTrail != null) {
for (String name : depTrail) {
Artifact dep = depsMap.get(name);
if (dep != null && isIdlCalssifier(dep, classifier)) {
return true;
}
}
}
return false;
} | [
"Checks if the artifact is dependency of an dependent idl artifact\n@returns true if the artifact was a dependency of idl artifact"
] | [
"Retrieves child nodes from a directory entry.\n\n@param parent parent directory entry\n@return list of child nodes",
"Creates and returns a GVRSceneObject with the specified mesh attributes.\n\n@param vertices the vertex positions of that make up the mesh. (x1, y1, z1, x2, y2, z2, ...)\n@param velocities the velocity attributes for each vertex. (vx1, vy1, vz1, vx2, vy2, vz2...)\n@param particleTimeStamps the spawning times of each vertex. (t1, 0, t2, 0, t3, 0 ..)\n\n@return The GVRSceneObject with this mesh.",
"once animation is setup, start the animation record the beginning and\nending time for the animation",
"Removes obsolete elements from names and shared elements.\n\n@param names Shared element names.\n@param sharedElements Shared elements.\n@param elementsToRemove The elements that should be removed.",
"Reads a command \"tag\" from the request.",
"Sets the distance from the origin to the far clipping plane for the\nwhole camera rig.\n\n@param far\nDistance to the far clipping plane.",
"Plots the MSD curve with the trajectory t and adds the fitted model for directed motion 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 diffusionCoefficient Diffusion coefficient\n@param velocity velocity of the active transport",
"This method is called to alert project listeners to the fact that\na calendar has been read from a project file.\n\n@param calendar calendar instance",
"Process normal calendar working and non-working days.\n\n@param calendar parent calendar"
] |
private static String firstFoundTableName(PersistenceBroker brokerForClass, ClassDescriptor cld)
{
String name = null;
if (!cld.isInterface() && cld.getFullTableName() != null)
{
return cld.getFullTableName();
}
if (cld.isExtent())
{
Collection extentClasses = cld.getExtentClasses();
for (Iterator iterator = extentClasses.iterator(); iterator.hasNext();)
{
name = firstFoundTableName(brokerForClass, brokerForClass.getClassDescriptor((Class) iterator.next()));
// System.out.println("## " + cld.getClassNameOfObject()+" - name: "+name);
if (name != null) break;
}
}
return name;
} | [
"try to find the first none null table name for the given class-descriptor.\nIf cld has extent classes, all of these cld's searched for the first none null\ntable name."
] | [
"Look for a style in the named styles provided in the configuration.\n\n@param styleName the name of the style to look for.",
"So we will follow rfc 1035 and in addition allow the underscore.",
"Prints associations recovered from the fields of a class. An association is inferred only\nif another relation between the two classes is not already in the graph.\n@param classes",
"Seeks to the given season within the given year\n\n@param seasonString\n@param yearString",
"Delete all backups asynchronously",
"Process calendar hours and exception data from the database.\n\n@param calendars all calendars for the project",
"Add a line symbolizer definition to the rule.\n\n@param styleJson The old style.",
"Use this API to fetch all the sslparameter resources that are configured on netscaler.",
"Set the query parameter values overriding all existing query values for\nthe same parameter. If no values are given, the query parameter is removed.\n@param name the query parameter name\n@param values the query parameter values\n@return this UriComponentsBuilder"
] |
private void addObjectReferenceEdges(Vertex vertex, ObjectReferenceDescriptor rds)
{
Object refObject = rds.getPersistentField().get(vertex.getEnvelope().getRealObject());
Class refClass = rds.getItemClass();
for (int i = 0; i < vertices.length; i++)
{
Edge edge = null;
// ObjectEnvelope envelope = vertex.getEnvelope();
Vertex refVertex = vertices[i];
ObjectEnvelope refEnvelope = refVertex.getEnvelope();
if (refObject == refEnvelope.getRealObject())
{
edge = buildConcrete11Edge(vertex, refVertex, rds.hasConstraint());
}
else if (refClass.isInstance(refVertex.getEnvelope().getRealObject()))
{
edge = buildPotential11Edge(vertex, refVertex, rds.hasConstraint());
}
if (edge != null)
{
if (!edgeList.contains(edge))
{
edgeList.add(edge);
}
else
{
edge.increaseWeightTo(edge.getWeight());
}
}
}
} | [
"Finds edges based to a specific object reference descriptor and\nadds them to the edge map.\n@param vertex the object envelope vertex holding the object reference\n@param rds the object reference descriptor"
] | [
"Build the operation transformers.\n\n@param registry the shared resource registry\n@return the operation transformers",
"Determine the relevant pieces of configuration which need to be included when processing the domain model.\n\n@param root the resource root\n@param requiredConfigurationHolder the resolution context\n@param serverConfig the server config\n@param extensionRegistry the extension registry",
"Converts a number of bytes to a human-readable string\n@param bytes the bytes\n@return the human-readable string",
"Process class properties.\n\n@param writer output stream\n@param methodSet set of methods processed\n@param aClass class being processed\n@throws IntrospectionException\n@throws XMLStreamException",
"Sets the timewarp setting from a numeric string\n\n@param timewarp a numeric string containing the number of milliseconds since the epoch",
"Sets the distance from the origin to the far clipping plane for the\nwhole camera rig.\n\n@param far\nDistance to the far clipping plane.",
"With the Batik SVG library it is only possible to create new SVG graphics, but you can not modify an\nexisting graphic. So, we are loading the SVG file as plain XML and doing the modifications by hand.",
"Returns the data about all of the plugins that are set\n\n@param onlyValid True to get only valid plugins, False for all\n@return array of Plugins set",
"Remove all controllers but leave input manager running.\n@return number of controllers removed"
] |
private Iterable<Key> getSplitKey(List<Key> keys, int numSplits) {
// If the number of keys is less than the number of splits, we are limited in the number of
// splits we can make.
if (keys.size() < numSplits - 1) {
return keys;
}
// Calculate the number of keys per split. This should be KEYS_PER_SPLIT, but may
// be less if there are not KEYS_PER_SPLIT * (numSplits - 1) scatter entities.
//
// Consider the following dataset, where - represents an entity and * represents an entity
// that is returned as a scatter entity:
// ||---*-----*----*-----*-----*------*----*----||
// If we want 4 splits in this data, the optimal split would look like:
// ||---*-----*----*-----*-----*------*----*----||
// | | |
// The scatter keys in the last region are not useful to us, so we never request them:
// ||---*-----*----*-----*-----*------*---------||
// | | |
// With 6 scatter keys we want to set scatter points at indexes: 1, 3, 5.
//
// We keep this as a double so that any "fractional" keys per split get distributed throughout
// the splits and don't make the last split significantly larger than the rest.
double numKeysPerSplit = Math.max(1.0, ((double) keys.size()) / (numSplits - 1));
List<Key> keysList = new ArrayList<Key>(numSplits - 1);
// Grab the last sample for each split, otherwise the first split will be too small.
for (int i = 1; i < numSplits; i++) {
int splitIndex = (int) Math.round(i * numKeysPerSplit) - 1;
keysList.add(keys.get(splitIndex));
}
return keysList;
} | [
"Given a list of keys and a number of splits find the keys to split on.\n\n@param keys the list of keys.\n@param numSplits the number of splits."
] | [
"Organises the data from Asta into a hierarchy and converts this into tasks.\n\n@param bars bar data\n@param expandedTasks expanded task data\n@param tasks task data\n@param milestones milestone data",
"New SOAP client uses new SOAP service.",
"Processes the original class rather than the current class definition.\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\"",
"Creates an empty block style definition.\n@return",
"Get the set of metadata providers that can offer metadata for tracks loaded from the specified media.\n\n@param sourceMedia the media whose metadata providers are desired, or {@code null} to get the set of\nmetadata providers that can offer metadata for all media.\n\n@return any registered metadata providers that reported themselves as supporting tracks from that media",
"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",
"Invalidate layout setup.",
"Returns an attribute's map value from this JAR's manifest's main section.\nThe attributes string value will be split on whitespace into map entries, and each entry will be split on '=' to get the key-value pair.\nThe returned map may be safely modified.\n\n@param name the attribute's name",
"Attach a metadata cache file to a particular player media slot, so the cache will be used instead of querying\nthe player for metadata. This supports operation with metadata during shows where DJs are using all four player\nnumbers and heavily cross-linking between them.\n\nIf the media is ejected from that player slot, the cache will be detached.\n\n@param slot the media slot to which a meta data cache is to be attached\n@param file the metadata cache to be attached\n\n@throws IOException if there is a problem reading the cache file\n@throws IllegalArgumentException if an invalid player number or slot is supplied\n@throws IllegalStateException if the metadata finder is not running"
] |
public PreparedStatementCreator count(final Dialect dialect) {
return new PreparedStatementCreator() {
public PreparedStatement createPreparedStatement(Connection con)
throws SQLException {
return getPreparedStatementCreator()
.setSql(dialect.createCountSelect(builder.toString()))
.createPreparedStatement(con);
}
};
} | [
"Returns a PreparedStatementCreator that returns a count of the rows that\nthis creator would return.\n\n@param dialect\nDatabase dialect."
] | [
"Read properties from the raw header data.\n\n@param stream input stream",
"Does the headset the device is docked into have a dedicated home key\n@return",
"Returns the name of the current member which is the name in the case of a field, or the property name for an\naccessor method.\n\n@return The member name\n@exception XDocletException if an error occurs",
"Get the value for a single attribute on an MBean by name.\n@param attributeName the attribute name (can be URL-encoded).\n@return the value as a String.\n@throws JMException Java Management Exception\n@throws UnsupportedEncodingException if the encoding is not supported.",
"Adds a data source to the configuration. If in deduplication mode\ngroupno == 0, otherwise it gives the number of the group to which\nthe data source belongs.",
"Validates aliases.\n\n@param uuid The structure id for which the aliases should be valid\n@param aliasPaths a map from id strings to alias paths\n@param callback the callback which should be called with the validation results",
"Register a new DropPasteWorkerInterface.\n@param worker The new worker",
"get target hosts from line by line.\n\n@param sourcePath\nthe source path\n@param sourceType\nthe source type\n@return the list\n@throws TargetHostsLoadException\nthe target hosts load exception",
"Adds an additional statement to the constructed document.\n\n@param statement\nthe additional statement\n@return builder object to continue construction"
] |
public static Command newGetGlobal(String identifier,
String outIdentifier) {
return getCommandFactoryProvider().newGetGlobal( identifier,
outIdentifier );
} | [
"Gets the global and adds it ot the BatchExecutionresults using the alternative outIdentifier.\n\n@param identifier\nThe identifier of the global\n@param outIdentifier\nThe identifier used in the ExecutionResults to store the global.\n@return"
] | [
"Set the DPI value for GeoServer if there are already FORMAT_OPTIONS.",
"Look up record by identity.",
"Overridden to skip some symbolizers.",
"Adds an audio source to the audio manager.\nAn audio source cannot be played unless it is\nadded to the audio manager. A source cannot be\nadded twice.\n@param audioSource audio source to add",
"Shows error dialog, manually supplying details instead of getting them from an exception stack trace.\n\n@param message the error message\n@param details the details",
"Loaders call this method to register themselves. This method can be called by\nloaders provided by the application.\n\n@param textureClass\nThe class the loader is responsible for loading.\n\n@param asyncLoaderFactory\nThe factory object.",
"Returns the setter method for the field on an object.\n\n@param object\nthe object\n@param fieldName\nthe field name\n@param argumentType\nthe type to be passed to the setter\n@param <T>\nthe object type\n@return the setter method associated with the field on the object\n@throws NullPointerException\nif object, fieldName or fieldType is null\n@throws SuperCsvReflectionException\nif the setter doesn't exist or is not visible",
"Determines how many primary partitions each node within each zone should\nhave. The list of integers returned per zone is the same length as the\nnumber of nodes in that zone.\n\n@param nextCandidateCluster\n@param targetPartitionsPerZone\n@return A map of zoneId to list of target number of partitions per node\nwithin zone.",
"OR operation which takes 2 arguments and OR's them together.\n\n<p>\n<b>NOTE:</b> There is no guarantee of the order of the clauses that are generated in the final query.\n</p>\n<p>\n<b>NOTE:</b> I can't remove the generics code warning that can be associated with this method. You can instead\nuse the {@link #or(int)} method.\n</p>"
] |
public void editComment(String commentId, String commentText) throws FlickrException {
Map<String, Object> parameters = new HashMap<String, Object>();
parameters.put("method", METHOD_EDIT_COMMENT);
parameters.put("comment_id", commentId);
parameters.put("comment_text", commentText);
// Note: This method requires an HTTP POST request.
Response response = transportAPI.post(transportAPI.getPath(), parameters, apiKey, sharedSecret);
if (response.isError()) {
throw new FlickrException(response.getErrorCode(), response.getErrorMessage());
}
// This method has no specific response - It returns an empty
// sucess response if it completes without error.
} | [
"Edit the text of a comment as the currently authenticated user.\n\nThis method requires authentication with 'write' permission.\n\n@param commentId\nThe id of the comment to edit.\n@param commentText\nUpdate the comment to this text.\n@throws FlickrException"
] | [
"Loads the localization for the current locale from a bundle of type xmlvfsbundle.\nIt assumes, the content has already been unmarshalled before.\n@param locale the locale for which the localization should be loaded",
"Creates and attaches the annotation index to a resource root, if it has not already been attached",
"Returns the directory of the file.\n\n@param filePath Path of the file.\n@return The directory string or {@code null} if\nthere is no parent directory.\n@throws IllegalArgumentException if path is bad",
"Removes the row with the specified key from this association.\n\n@param key the key of the association row to remove",
"Sets the permissions associated with this shared link.\n@param permissions the new permissions for this shared link.",
"Create a forward curve from forwards given by a LIBORMonteCarloModel.\n\n@param name name of the forward curve.\n@param model Monte Carlo model providing the forwards.\n@param startTime time at which the curve starts, i.e. zero time for the curve\n@return a forward curve from forwards given by a LIBORMonteCarloModel.\n@throws CalculationException Thrown if the model failed to provide the forward rates.",
"Set brightness to eg. darken the resulting image for use as background\n\n@param brightness default is 0, pos values increase brightness, neg. values decrease brightness\n.-100 is black, positive goes up to 1000+",
"Create a local target.\n\n@param jbossHome the jboss home\n@param moduleRoots the module roots\n@param bundlesRoots the bundle roots\n@return the local target\n@throws IOException",
"Provide array of String results from inputOutput MFString field named url.\n@array saved in valueDestination"
] |
public int addServerGroup(String groupName, int profileId) throws Exception {
int groupId = -1;
PreparedStatement statement = null;
ResultSet results = null;
try (Connection sqlConnection = sqlService.getConnection()) {
statement = sqlConnection.prepareStatement("INSERT INTO " + Constants.DB_TABLE_SERVER_GROUPS
+ "(" + Constants.GENERIC_NAME + "," +
Constants.GENERIC_PROFILE_ID + ")"
+ " VALUES (?, ?);", PreparedStatement.RETURN_GENERATED_KEYS);
statement.setString(1, groupName);
statement.setInt(2, profileId);
statement.executeUpdate();
results = statement.getGeneratedKeys();
if (results.next()) {
groupId = results.getInt(1);
} else {
// something went wrong
throw new Exception("Could not add group");
}
} catch (SQLException e) {
e.printStackTrace();
} finally {
try {
if (results != null) {
results.close();
}
} catch (Exception e) {
}
try {
if (statement != null) {
statement.close();
}
} catch (Exception e) {
}
}
return groupId;
} | [
"Add a new server group\n\n@param groupName name of the group\n@param profileId ID of associated profile\n@return id of server group\n@throws Exception"
] | [
"Determines the number of elements that the query would return. Override this\nmethod if the size shall be determined in a specific way.\n\n@return The number of elements",
"Set a bean in the context.\n\n@param name bean name\n@param object bean value",
"Method for reporting SQLException. This is used by\nthe treenodes if retrieving information for a node\nis not successful.\n@param message The message describing where the error occurred\n@param sqlEx The exception to be reported.",
"Converts a boolean array containing the pixel data in BINARY mode to an\ninteger array with the pixel data in RGB mode.\n\n@param binaryArray pixel binary data\n@return pixel integer data in RGB mode.",
"Add a new download. The download will start automatically once the download manager is\nready to execute it and connectivity is available.\n\n@param request the parameters specifying this download\n@return an ID for the download, unique across the application. This ID is used to make future\ncalls related to this download.\n@throws IllegalArgumentException",
"Asynchronous call that begins execution of the task\nand returns immediately.",
"Add columns to the tree.\n\n@param parentNode parent tree node\n@param table columns container",
"Send Identify Node message to the controller.\n@param nodeId the nodeId of the node to identify\n@throws SerialInterfaceException when timing out or getting an invalid response.",
"Iterate through a set of bit field flags and set the value for each one\nin the supplied container.\n\n@param flags bit field flags\n@param container field container\n@param data source data"
] |
public synchronized boolean acquireRebalancingPermit(int nodeId) {
boolean added = rebalancePermits.add(nodeId);
logger.info("Acquiring rebalancing permit for node id " + nodeId + ", returned: " + added);
return added;
} | [
"Acquire a permit for a particular node id so as to allow rebalancing\n\n@param nodeId The id of the node for which we are acquiring a permit\n@return Returns true if permit acquired, false if the permit is already\nheld by someone"
] | [
"In case we cannot delete a directory create a marker to recheck whether we can garbage collect some not\nreferenced directories and files.\n\n@param file the directory",
"Use this API to fetch all the dnsaaaarec resources that are configured on netscaler.",
"Returns the list of nodes which match the expression xpathExpr in the String domStr.\n\n@return the list of nodes which match the query\n@throws XPathExpressionException\n@throws IOException",
"Sets the request type for this ID. Defaults to GET\n\n@param pathId ID of path\n@param requestType type of request to service",
"Adds a path to the request response table with the specified values\n\n@param profileId ID of profile\n@param clientUUID UUID of client\n@param pathId ID of path\n@throws Exception exception",
"Use this API to fetch aaapreauthenticationpolicy_aaaglobal_binding resources of given name .",
"Update the descriptor content with values from the editor.\n@throws CmsXmlException thrown if update fails due to a wrong XML structure (should never happen)",
"Converts Observable of list to Observable of Inner.\n@param innerList list to be converted.\n@param <InnerT> type of inner.\n@return Observable for list of inner.",
"a simple contains helper method, checks if array contains a numToCheck\n\n@param array array of ints\n@param numToCheck value to find\n@return True if found, false otherwise"
] |
public List<IssueCategory> getIssueCategories()
{
return this.issueCategories.values().stream()
.sorted((category1, category2) -> category1.getPriority() - category2.getPriority())
.collect(Collectors.toList());
} | [
"Returns a list ordered from the highest priority to the lowest."
] | [
"Executes the API action \"wbremoveclaims\" for the given parameters.\n\n@param statementIds\nthe statement ids to delete\n@param bot\nif true, edits will be flagged as \"bot edits\" provided that\nthe logged in user is in the bot group; for regular users, the\nflag will just be ignored\n@param baserevid\nthe revision of the data that the edit refers to or 0 if this\nshould not be submitted; when used, the site will ensure that\nno edit has happened since this revision to detect edit\nconflicts; it is recommended to use this whenever in all\noperations where the outcome depends on the state of the\nonline data\n@param summary\nsummary for the edit; will be prepended by an automatically\ngenerated comment; the length limit of the autocomment\ntogether with the summary is 260 characters: everything above\nthat limit will be cut off\n@return the JSON response from the API\n@throws IOException\nif there was an IO problem. such as missing network\nconnection\n@throws MediaWikiApiErrorException\nif the API returns an error\n@throws IOException\n@throws MediaWikiApiErrorException",
"Remove multiple fields from the map\n@param fields the fields to remove\n@return the number of fields removed",
"Check if the specified sql-string is a stored procedure\nor not.\n@param sql The sql query to check\n@return <em>True</em> if the query is a stored procedure, else <em>false</em> is returned.",
"Fetches the HttpMethod from annotations and returns String representation of HttpMethod.\nReturn emptyString if not present.\n\n@param method Method handling the http request.\n@return String representation of HttpMethod from annotations or emptyString as a default.",
"converts the file URIs with an absent authority to one with an empty",
"Calls the stored procedure stored procedure throws an\nerror if it doesn't exist.\n@param broker\n@param cld\n@param sequenceName\n@return\n@throws LookupException\n@throws SQLException",
"Returns true if required properties for MiniFluo are set",
"Sets the delegate of the service, that gets notified of the\nstatus of message delivery.\n\nNote: This option has no effect when using non-blocking\nconnections.",
"Use this API to fetch all the nsrpcnode resources that are configured on netscaler."
] |
private static BoxRetentionPolicy.Info createRetentionPolicy(BoxAPIConnection api, String name, String type,
int length, String action) {
return createRetentionPolicy(api, name, type, length, action, null);
} | [
"Used to create a new retention policy.\n@param api the API connection to be used by the created user.\n@param name the name of the retention policy.\n@param type the type of the retention policy. Can be \"finite\" or \"indefinite\".\n@param length the duration in days that the retention policy will be active for after being assigned to content.\n@param action the disposition action can be \"permanently_delete\" or \"remove_retention\".\n@return the created retention policy's info."
] | [
"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.",
"Get Rule\nGet a rule using the Rule ID\n@param ruleId Rule ID. (required)\n@return RuleEnvelope\n@throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body",
"Append the path to the StringBuilder.\n\n@param result the string builder to add the path to.",
"Update the BinderDescriptor of the declarationBinderRef.\n\n@param declarationBinderRef the ServiceReference<DeclarationBinder> of the DeclarationBinder",
"The type descriptor for a method node is a string containing the name of the method, its return type,\nand its parameter types in a canonical form. For simplicity, I'm using the format of a Java declaration\nwithout parameter names.\n\n@return the type descriptor",
"Read all top level tasks.",
"Use this API to fetch lbvserver_cachepolicy_binding resources of given name .",
"Writes assignment data to a PM XML file.",
"Stop listening for device announcements. Also discard any announcements which had been received, and\nnotify any registered listeners that those devices have been lost."
] |
public void checkAllGroupsSatisfied(final String currentPath) {
StringBuilder errors = new StringBuilder();
for (OneOfGroup group: this.mapping.values()) {
if (group.satisfiedBy.isEmpty()) {
errors.append("\n");
errors.append("\t* The OneOf choice: ").append(group.name)
.append(" was not satisfied. One (and only one) of the ");
errors.append("following fields is required in the request data: ")
.append(toNames(group.choices));
}
Collection<OneOfSatisfier> oneOfSatisfiers =
Collections2.filter(group.satisfiedBy, input -> !input.isCanSatisfy);
if (oneOfSatisfiers.size() > 1) {
errors.append("\n");
errors.append("\t* The OneOf choice: ").append(group.name)
.append(" was satisfied by too many fields. Only one choice ");
errors.append("may be in the request data. The fields found were: ")
.append(toNames(toFields(group.satisfiedBy)));
}
}
Assert.equals(0, errors.length(),
"\nErrors were detected when analysing the @OneOf dependencies of '" + currentPath +
"': \n" + errors);
} | [
"Check that each group is satisfied by one and only one field.\n\n@param currentPath the json path to the element being checked"
] | [
"Compute the repair set from the given values and nodes\n\n@param nodeValues The value found on each node\n@return A set of repairs to perform",
"Check if this applies to the provided authorization scope and return the credentials for that scope or\nnull if it doesn't apply to the scope.\n\n@param authscope the scope to test against.",
"Return a string representation of the object.",
"Generate a string with all selected checkboxes separated with ','.\n\n@return a string with all selected checkboxes",
"Resolve temporary folder.",
"Enqueues a message for sending on the send thread.\n@param serialMessage the serial message to enqueue.",
"Create servlet deployment.\n\nCan be overridden with custom servlet deployment. e.g. exact resources listing in restricted env like GAE\n\n@param context the servlet context\n@param bootstrap the bootstrap\n@return new servlet deployment",
"Clears out the statement handles.\n@param internalClose if true, close the inner statement handle too.",
"Notifies that multiple footer items are removed.\n\n@param positionStart the position.\n@param itemCount the item count."
] |
public void rename(String newName) {
URL url = FILE_URL_TEMPLATE.build(this.getAPI().getBaseURL(), this.getID());
BoxJSONRequest request = new BoxJSONRequest(this.getAPI(), url, "PUT");
JsonObject updateInfo = new JsonObject();
updateInfo.add("name", newName);
request.setBody(updateInfo.toString());
BoxAPIResponse response = request.send();
response.disconnect();
} | [
"Renames this file.\n\n@param newName the new name of the file."
] | [
"Calculates Tangent value of the complex number.\n\n@param z1 A ComplexNumber instance.\n@return Returns new ComplexNumber instance containing the Tangent value of the specified complex number.",
"Get the AuthInterface.\n\n@return The AuthInterface",
"Read leaf tasks attached to the WBS.\n\n@param id initial WBS ID",
"Use this API to update gslbsite.",
"Renumbers all entity unique IDs.",
"Calculate the color using the supplied angle.\n\n@param angle The selected color's position expressed as angle (in rad).\n\n@return The ARGB value of the color on the color wheel at the specified\nangle.",
"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 all the inatparam resources that are configured on netscaler.",
"Adds the content info for the collected resources used in the \"This page\" publish dialog."
] |
public static vpath_stats get(nitro_service service) throws Exception{
vpath_stats obj = new vpath_stats();
vpath_stats[] response = (vpath_stats[])obj.stat_resources(service);
return response[0];
} | [
"Use this API to fetch the statistics of all vpath_stats resources that are configured on netscaler."
] | [
"Initialize elements of the panel displayed for the deactivated widget.",
"The users element defines users within the domain model, it is a simple authentication for some out of the box users.",
"Given a set of versions, constructs a resolved list of versions based on\nthe compare function above\n\n@param values\n@return list of values after resolution",
"Use this API to update cachecontentgroup.",
"Use this API to reset Interface.",
"Merges this with the list of sections to produce the smallest array of sequential block subnets, going from smallest to largest\n\n@param sections the sections to merge with this\n@return",
"Sets maintenance mode for the given app\n\n@param appName See {@link #listApps} for a list of apps that can be used.\n@param enable true to enable; false to disable",
"Use this API to fetch statistics of spilloverpolicy_stats resource of given name .",
"Active inverter colors"
] |
public Object remove(String name) {
ThreadScopeContext context = ThreadScopeContextHolder.getContext();
return context.remove(name);
} | [
"Removes bean from scope.\n\n@param name bean name\n@return previous value"
] | [
"Starts closing the keyboard when the hits are scrolled.",
"Wrap CallableStatement with a proxy.\n@param target statement handle\n@param connectionHandle originating bonecp connection\n@return Proxy to a Callablestatement.",
"Calculated the numeraire relative value of an underlying swap leg.\n\n@param model The Monte Carlo model.\n@param legSchedule The schedule of the leg.\n@param paysFloat If true a floating rate is payed.\n@param swaprate The swaprate. May be 0.0 for pure floating leg.\n@param notional The notional.\n@return The sum of the numeraire relative cash flows.\n@throws CalculationException Thrown if underlying model failed to calculate stochastic process.",
"Checks the existence of the directory. If it does not exist, the method creates it.\n\n@param dir the directory to check.\n@throws IOException if fails.",
"Iterates over the elements of an iterable collection of items, starting from\na specified startIndex, and returns the index values of the items that match\nthe condition specified in the closure.\n\n@param self the iteration object over which to iterate\n@param startIndex start matching from this index\n@param closure the filter to perform a match on the collection\n@return a list of numbers corresponding to the index values of all matched objects\n@since 1.5.2",
"Returns the local collection representing the given namespace for raw document operations.\n\n@param namespace the namespace referring to the local collection.\n@return the local collection representing the given namespace for raw document operations.",
"Sets the bounds of a UIObject, moving and sizing to match the\nbounds specified. Currently used for the itemhover and useful\nfor other absolutely positioned elements.",
"Map Synchro constraints to MPXJ constraints.\n\n@param task task\n@param row Synchro constraint data",
"copy all fields from the \"from\" object to the \"to\" object.\n\n@param from source object\n@param to from's clone\n@param fields fields to be populated\n@param accessible 'true' if all 'fields' have been made accessible during\ntraversal"
] |
public static ExtensibleConfigurationPersister createHostXmlConfigurationPersister(final ConfigurationFile file, final HostControllerEnvironment environment,
final ExecutorService executorService, final ExtensionRegistry hostExtensionRegistry,
final LocalHostControllerInfo localHostControllerInfo) {
String defaultHostname = localHostControllerInfo.getLocalHostName();
if (environment.getRunningModeControl().isReloaded()) {
if (environment.getRunningModeControl().getReloadHostName() != null) {
defaultHostname = environment.getRunningModeControl().getReloadHostName();
}
}
HostXml hostXml = new HostXml(defaultHostname, environment.getRunningModeControl().getRunningMode(),
environment.isUseCachedDc(), Module.getBootModuleLoader(), executorService, hostExtensionRegistry);
BackupXmlConfigurationPersister persister = new BackupXmlConfigurationPersister(file, new QName(Namespace.CURRENT.getUriString(), "host"), hostXml, hostXml, false);
for (Namespace namespace : Namespace.domainValues()) {
if (!namespace.equals(Namespace.CURRENT)) {
persister.registerAdditionalRootElement(new QName(namespace.getUriString(), "host"), hostXml);
}
}
hostExtensionRegistry.setWriterRegistry(persister);
return persister;
} | [
"host.xml"
] | [
"Read task relationships.",
"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.",
"Scales the weights of this crfclassifier by the specified weight\n\n@param scale",
"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",
"Enable a custom response\n\n@param custom custom response\n@param path_id path ID of the response\n@param client_uuid client UUID\n@throws Exception exception",
"performs a primary key lookup operation against RDBMS and materializes\nan object from the resulting row. Only skalar attributes are filled from\nthe row, references are not resolved.\n@param oid contains the primary key info.\n@param cld ClassDescriptor providing mapping information.\n@return the materialized object, null if no matching row was found or if\nany error occured.",
"Get a prefix for the log message to help identify which request is which and which responses\nbelong to which requests.",
"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",
"overridden in ipv6 to handle zone"
] |
public List getFeedback()
{
List<?> messages = new ArrayList();
for ( ValueSource vs : valueSources )
{
List feedback = vs.getFeedback();
if ( feedback != null && !feedback.isEmpty() )
{
messages.addAll( feedback );
}
}
return messages;
} | [
"Return any feedback messages and errors that were generated - but\nsuppressed - during the interpolation process. Since unresolvable\nexpressions will be left in the source string as-is, this feedback is\noptional, and will only be useful for debugging interpolation problems.\n\n@return a {@link List} that may be interspersed with {@link String} and\n{@link Throwable} instances."
] | [
"Retrieve the Charset used to read the file.\n\n@return Charset instance",
"Used to apply or update the watermark for the item.\n@param itemUrl url template for the item.\n@param imprint the value must be \"default\", as custom watermarks is not yet supported.\n@return the watermark associated with the item.",
"Validates the type",
"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",
"Use this API to fetch lbvserver_scpolicy_binding resources of given name .",
"Called whenever a rebalance task completes. This means one task is done\nand some number of partition stores have been migrated.\n\n@param taskId\n@param partitionStoresMigrated Number of partition stores moved by this\ncompleted task.",
"Create an embedded host controller.\n\n@param jbossHomePath the location of the root of the host controller installation. Cannot be {@code null} or empty.\n@param modulePath the location of the root of the module repository. May be {@code null} if the standard\nlocation under {@code jbossHomePath} should be used\n@param systemPackages names of any packages that must be treated as system packages, with the same classes\nvisible to the caller's classloader visible to host-controller-side classes loaded from\nthe server's modular classloader\n@param cmdargs any additional arguments to pass to the embedded host controller (e.g. -b=192.168.100.10)\n@return the server. Will not be {@code null}",
"This is pretty ugly. We end up mimicking the request logic here, so this\nneeds to stay in sync with handleRequest.",
"Adds a new metadata value of array type.\n@param path the path to the field.\n@param values the collection of values.\n@return the metadata object for chaining."
] |
@UiThread
protected void parentCollapsedFromViewHolder(int flatParentPosition) {
ExpandableWrapper<P, C> parentWrapper = mFlatItemList.get(flatParentPosition);
updateCollapsedParent(parentWrapper, flatParentPosition, true);
} | [
"Called when a ParentViewHolder has triggered a collapse for it's parent\n\n@param flatParentPosition the position of the parent that is calling to be collapsed"
] | [
"Computes the mean or average of all the elements.\n\n@return mean",
"Can be overridden if you want to replace or supplement the debug handling for responses.\n\n@param responseCode\n@param inputStream",
"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.",
"Obtains a British Cutover local date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the British Cutover local date-time, not null\n@throws DateTimeException if unable to create the date-time",
"Return true if the two connections seem to one one connection under the covers.",
"This filter adds a blur effect to the image using the specified radius and sigma.\n@param radius Radius used in the gaussian function to generate a matrix, maximum value is 150.\nThe bigger the radius more blurred will be the image.\n@param sigma Sigma used in the gaussian function.",
"Create a classname from a given path\n\n@param path\n@return",
"Use this API to fetch a tmglobal_binding resource .",
"Validates this string is a valid address, and if not, throws an exception with a descriptive message indicating why it is not.\n@throws AddressStringException"
] |
public static base_response add(nitro_service client, dnspolicylabel resource) throws Exception {
dnspolicylabel addresource = new dnspolicylabel();
addresource.labelname = resource.labelname;
addresource.transform = resource.transform;
return addresource.add_resource(client);
} | [
"Use this API to add dnspolicylabel."
] | [
"Helper method to retrieve a canonical revision for git commits migrated from SVN. Migrated commits are\ndetected by the presence of 'git-svn-id' in the commit message.\n\n@param revision the commit/revision to inspect\n@param branch the name of the branch it came from\n@return the original SVN revision if it was a migrated commit from the branch specified, otherwise the git revision",
"Helper method to lookup a DAO if it has already been associated with the class. Otherwise this returns null.",
"Use this API to fetch the statistics of all ipseccounters_stats resources that are configured on netscaler.",
"This method takes an integer enumeration of a priority\nand returns an appropriate instance of this class. Note that unrecognised\nvalues are treated as medium priority.\n\n@param priority int version of the priority\n@return Priority class instance",
"Checks that the modified features exist.\n\n@param classDef The class descriptor\n@param checkLevel The current check level (this constraint is checked in basic and strict)\n@exception ConstraintException If the constraint has been violated",
"Get a configured database connection via JNDI.",
"get the converted object corresponding to sourceObject as converted to\ndestination type by converter\n\n@param converter\n@param sourceObject\n@param destinationType\n@return",
"Performs a put operation with the specified composite request object\n\n@param requestWrapper A composite request object containing the key and\nvalue\n@return Version of the value for the successful put",
"Issue the database statements to drop the table associated with a table configuration.\n\n<p>\n<b>WARNING:</b> This is [obviously] very destructive and is unrecoverable.\n</p>\n\n@param connectionSource\nAssociated connection source.\n@param tableConfig\nHand or spring wired table configuration. If null then the class must have {@link DatabaseField}\nannotations.\n@param ignoreErrors\nIf set to true then try each statement regardless of {@link SQLException} thrown previously.\n@return The number of statements executed to do so."
] |
public List<File> getInactiveHistory() throws PatchingException {
if (validHistory == null) {
walk();
}
final File[] inactiveDirs = installedIdentity.getInstalledImage().getPatchesDir().listFiles(new FileFilter() {
@Override
public boolean accept(File pathname) {
return pathname.isDirectory() && !validHistory.contains(pathname.getName());
}
});
return inactiveDirs == null ? Collections.<File>emptyList() : Arrays.asList(inactiveDirs);
} | [
"Get the inactive history directories.\n\n@return the inactive history"
] | [
"Helper method that encapsulates the minimum logic for publishing a job to\na channel.\n\n@param jedis\nthe connection to Redis\n@param namespace\nthe Resque namespace\n@param channel\nthe channel name\n@param jobJson\nthe job serialized as JSON",
"Plots a list of charts in matrix with 2 columns.\n@param charts",
"Adds a column to this table definition.\n\n@param columnDef The new column",
"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>.",
"Returns an array of the names of all atributes of this descriptor.\n\n@return The list of attribute names (will not be <code>null</code>)",
"Returns the classDescriptor.\n\n@return ClassDescriptor",
"Handles retrieval of primitive char type.\n\n@param field required field\n@param defaultValue default value if field is missing\n@return char value",
"The main method. See the class documentation.",
"Wrapped version of standard jdbc executeUpdate Pays attention to DB\nlocked exception and waits up to 1s\n\n@param query SQL query to execute\n@throws Exception - will throw an exception if we can never get a lock"
] |
public void populateContainer(Class<? extends FieldType> type, FieldContainer container, Integer id, byte[][] fixedData, Var2Data varData)
{
//System.out.println(container.getClass().getSimpleName()+": " + id);
for (FieldItem item : m_map.values())
{
if (item.getType().getClass().equals(type))
{
//System.out.println(item.m_type);
Object value = item.read(id, fixedData, varData);
//System.out.println(item.m_type.getClass().getSimpleName() + "." + item.m_type + ": " + value);
container.set(item.getType(), value);
}
}
} | [
"Given a container, and a set of raw data blocks, this method extracts\nthe field data and writes it into the container.\n\n@param type expected type\n@param container field container\n@param id entity ID\n@param fixedData fixed data block\n@param varData var data block"
] | [
"Scales the weights of this crfclassifier by the specified weight\n\n@param scale",
"Closes off this connection pool.",
"Produces all tuples of size n chosen from a list of variable names\n\n@param variables the list of variable names to make tuples of\n@param nWise the size of the desired tuples\n@return all tuples of size nWise",
"Extracts the list of columns from the given field list.\n\n@param fields The fields\n@return The corresponding columns",
"Set the position of the pick ray.\nThis function is used internally to update the\npick ray with the new controller position.\n@param x the x value of the position.\n@param y the y value of the position.\n@param z the z value of the position.",
"Use this API to fetch aaauser_binding resource of given name .",
"Counts each property for which there is a statement in the given item\ndocument, ignoring the property thisPropertyIdValue to avoid properties\ncounting themselves.\n\n@param statementDocument\n@param usageRecord\n@param thisPropertyIdValue",
"Gets information about a trashed file.\n@param fileID the ID of the trashed file.\n@return info about the trashed file.",
"Get the node that has been selected by the user, or null if\nnothing is selected.\n@return The node or <code>null</code>"
] |
public void combine(CRFClassifier<IN> crf, double weight) {
Timing timer = new Timing();
// Check the CRFClassifiers are compatible
if (!this.pad.equals(crf.pad)) {
throw new RuntimeException("Incompatible CRFClassifier: pad does not match");
}
if (this.windowSize != crf.windowSize) {
throw new RuntimeException("Incompatible CRFClassifier: windowSize does not match");
}
if (this.labelIndices.length != crf.labelIndices.length) {
// Should match since this should be same as the windowSize
throw new RuntimeException("Incompatible CRFClassifier: labelIndices length does not match");
}
this.classIndex.addAll(crf.classIndex.objectsList());
// Combine weights of the other classifier with this classifier,
// weighing the other classifier's weights by weight
// First merge the feature indicies
int oldNumFeatures1 = this.featureIndex.size();
int oldNumFeatures2 = crf.featureIndex.size();
int oldNumWeights1 = this.getNumWeights();
int oldNumWeights2 = crf.getNumWeights();
this.featureIndex.addAll(crf.featureIndex.objectsList());
this.knownLCWords.addAll(crf.knownLCWords);
assert (weights.length == oldNumFeatures1);
// Combine weights of this classifier with other classifier
for (int i = 0; i < labelIndices.length; i++) {
this.labelIndices[i].addAll(crf.labelIndices[i].objectsList());
}
System.err.println("Combining weights: will automatically match labelIndices");
combineWeights(crf, weight);
int numFeatures = featureIndex.size();
int numWeights = getNumWeights();
long elapsedMs = timer.stop();
System.err.println("numFeatures: orig1=" + oldNumFeatures1 + ", orig2=" + oldNumFeatures2 + ", combined="
+ numFeatures);
System.err
.println("numWeights: orig1=" + oldNumWeights1 + ", orig2=" + oldNumWeights2 + ", combined=" + numWeights);
System.err.println("Time to combine CRFClassifier: " + Timing.toSecondsString(elapsedMs) + " seconds");
} | [
"Combines weighted crf with this crf\n\n@param crf\n@param weight"
] | [
"Creates an upper triangular matrix whose values are selected from a uniform distribution. If hessenberg\nis greater than zero then a hessenberg matrix of the specified degree is created instead.\n\n@param dimen Number of rows and columns in the matrix..\n@param hessenberg 0 for triangular matrix and > 0 for hessenberg matrix.\n@param min minimum value an element can be.\n@param max maximum value an element can be.\n@param rand random number generator used.\n@return The randomly generated matrix.",
"Check if we still need more nodes from the given zone and reduce the\nzoneReplicationFactor count accordingly.\n\n@param requiredRepFactor\n@param zoneId\n@return",
"Prepares a representation of the model that is easier accessible for our purposes.\n\n@param model The original model\n@return The model representation",
"Set the pointer on the bar. With the Value value.\n\n@param value float between 0 and 1",
"do 'Distinct' operation\n\n@param queryDescriptor descriptor of MongoDB query\n@param collection collection for execute the operation\n@return result iterator\n@see <a href =\"https://docs.mongodb.com/manual/reference/method/db.collection.distinct/\">distinct</a>",
"compute Sin using Taylor Series.\n\n@param x An angle, in radians.\n@param nTerms Number of terms.\n@return Result.",
"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",
"Use this API to delete clusterinstance resources.",
"Calculate the starting content offset based on the layout orientation and Gravity\n@param totalSize total size occupied by the content"
] |
private Map<UUID, List<DateRange>> processDayTypes(List<MapRow> types)
{
Map<UUID, List<DateRange>> map = new HashMap<UUID, List<DateRange>>();
for (MapRow row : types)
{
List<DateRange> ranges = new ArrayList<DateRange>();
for (MapRow range : row.getRows("TIME_RANGES"))
{
ranges.add(new DateRange(range.getDate("START"), range.getDate("END")));
}
map.put(row.getUUID("UUID"), ranges);
}
return map;
} | [
"Extract day type definitions.\n\n@param types Synchro day type rows\n@return Map of day types by UUID"
] | [
"Indicates whether or not an event ID is a duplicate.\n\n<p>This method can be overridden by a subclass in order to provide custom de-duping logic.</p>\n\n@param eventID the event ID.\n@return true if the event is a duplicate; otherwise false.",
"Return the regression basis functions.\n\n@param exerciseDate The date w.r.t. which the basis functions should be measurable.\n@param model The model.\n@return Array of random variables.\n@throws net.finmath.exception.CalculationException Thrown if the valuation fails, specific cause may be available via the <code>cause()</code> method.",
"Clones the given reference.\n\n@param refDef The reference descriptor\n@param prefix A prefix for the name\n@return The cloned reference",
"Use this API to add snmpmanager resources.",
"Creates and start an engine representing the node named as the given parameter.\n\n@param name\nname of the node, as present in the configuration (case sensitive)\n@param handler\ncan be null. A set of callbacks hooked on different engine life cycle events.\n@return an object allowing to stop the engine.",
"Unchecks the widget by index\n@param checkableIndex The index is in the range from 0 to size -1, where size is the number of\nCheckable widgets in the group. It does not take into account any\nnon-Checkable widgets added to the group widget.\n@return {@code True} if {@code checkableWidget} is a child of this {@code CheckableGroup} and\nwas not already unchecked; {@code false} otherwise.",
"Cancels all requests still waiting for a response.\n\n@return this {@link Searcher} for chaining.",
"Returns the name of this alias if path has been added\nto the aliased portions of attributePath\n\n@param path the path to test for inclusion in the alias",
"return the squared area of the triangle defined by the half edge hedge0\nand the point at the head of hedge1.\n\n@param hedge0\n@param hedge1\n@return"
] |
@SuppressWarnings("StringEquality")
public static MatchInfo fromAuthScope(final AuthScope authscope) {
String newScheme = StringUtils.equals(authscope.getScheme(), AuthScope.ANY_SCHEME) ? ANY_SCHEME :
authscope.getScheme();
String newHost = StringUtils.equals(authscope.getHost(), AuthScope.ANY_HOST) ? ANY_HOST :
authscope.getHost();
int newPort = authscope.getPort() == AuthScope.ANY_PORT ? ANY_PORT : authscope.getPort();
String newRealm = StringUtils.equals(authscope.getRealm(), AuthScope.ANY_REALM) ? ANY_REALM :
authscope.getRealm();
return new MatchInfo(newScheme, newHost, newPort, ANY_PATH, ANY_QUERY,
ANY_FRAGMENT, newRealm, ANY_METHOD);
} | [
"Create an info object from an authscope object.\n\n@param authscope the authscope"
] | [
"Given a filesystem, path and buffer-size, read the file contents and\npresents it as a string\n\n@param fs Underlying filesystem\n@param path The file to read\n@param bufferSize The buffer size to use for reading\n@return The contents of the file as a string\n@throws IOException",
"Adds the correct load instruction based on the type descriptor\n\n@param code the bytecode to add the instruction to\n@param type the type of the variable\n@param variable the variable number",
"Returns a string representation of map of chunk id to number of chunks\n\n@return String of map of chunk id to number of chunks",
"Send a master handoff yield response to all registered listeners.\n\n@param fromPlayer the device number that is responding to our request that it yield the tempo master role to us\n@param yielded will be {@code true} if we should now be the tempo master",
"Use this API to fetch all the systemcore resources that are configured on netscaler.",
"Sets the global. Does not add the global to the ExecutionResults.\n\n@param identifier\nThe identifier of the global\n@param object\nThe instance to be set as the global.\n@return",
"Returns an unmodifiable set containing the given elements.\n\n@param ts the elements from which to create a set\n@param <T> the type of the element in the set\n@return an unmodifiable set containing the given elements or {@code null} in case the given element array is\n{@code null}.",
"Generates a download id for the request and adds the download request to the download request queue for the dispatchers pool to act on immediately.\n\n@param request\n@return downloadId",
"Creates a Document that can be passed to the MongoDB batch insert function"
] |
public static void setTime(Calendar cal, Date time)
{
if (time != null)
{
Calendar startCalendar = popCalendar(time);
cal.set(Calendar.HOUR_OF_DAY, startCalendar.get(Calendar.HOUR_OF_DAY));
cal.set(Calendar.MINUTE, startCalendar.get(Calendar.MINUTE));
cal.set(Calendar.SECOND, startCalendar.get(Calendar.SECOND));
pushCalendar(startCalendar);
}
} | [
"Given a date represented by a Calendar instance, set the time\ncomponent of the date based on the hours and minutes of the\ntime supplied by the Date instance.\n\n@param cal Calendar instance representing the date\n@param time Date instance representing the time of day"
] | [
"Get file extension for script language.\n\n@param language the language name\n@return the file extension as string or null if the language is not in the set of languages supported by spin",
"With this impl, it only returns the same credentials once. Otherwise it's possible that a loop will occur.\nWhen server returns status code 401, the HTTP client provides the same credentials forever.\nSince we create a new HTTP client for every request, we can handle it this way.",
"Enables or disables auto closing when selecting a date.",
"running in App Engine",
"Start a task. The id is needed to end the task\n\n@param id\n@param taskName",
"Parses a String email address to an IMAP address string.",
"Loads the leap second rules from a URL, often in a jar file.\n\n@param url the jar file to load, not null\n@throws Exception if an error occurs",
"Assign FK values and store entries in indirection table\nfor all objects referenced by given object.\n\n@param obj real object with 1:n reference\n@param cod {@link CollectionDescriptor} of referenced 1:n objects\n@param insert flag signal insert operation, false signals update operation",
"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."
] |
private static int weekRange(int weekBasedYear) {
LocalDate date = LocalDate.of(weekBasedYear, 1, 1);
// 53 weeks if year starts on Thursday, or Wed in a leap year
if (date.getDayOfWeek() == THURSDAY || (date.getDayOfWeek() == WEDNESDAY && date.isLeapYear())) {
return 53;
}
return 52;
} | [
"from IsoFields in ThreeTen-Backport"
] | [
"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",
"Save an HTTP response to a file\n@param response the response to save\n@param destFile the destination file\n@throws IOException if the response could not be downloaded",
"Print a constraint type.\n\n@param value ConstraintType instance\n@return constraint type value",
"Utility method to clear cached calendar data.",
"Converts an Accumulo Range to a Fluo Span\n\n@param range Range\n@return Span",
"Use this API to fetch appflowpolicy_appflowpolicylabel_binding resources of given name .",
"Called when the pattern has changed.",
"Get prototype name.\n\n@return prototype name",
"Creates a timespan from a list of other timespans.\n\n@return a timespan representing the sum of all the timespans provided"
] |
private void registerSynchronization(TransactionImpl odmgTrans, Transaction transaction)
{
// todo only need for development
if (odmgTrans == null || transaction == null)
{
log.error("One of the given parameters was null --> cannot do synchronization!" +
" omdg transaction was null: " + (odmgTrans == null) +
", external transaction was null: " + (transaction == null));
return;
}
int status = -1; // default status.
try
{
status = transaction.getStatus();
if (status != Status.STATUS_ACTIVE)
{
throw new OJBRuntimeException(
"Transaction synchronization failed - wrong status of external container tx: " +
getStatusString(status));
}
}
catch (SystemException e)
{
throw new OJBRuntimeException("Can't read status of external tx", e);
}
try
{
//Sequence of the following method calls is significant
// 1. register the synchronization with the ODMG notion of a transaction.
transaction.registerSynchronization((J2EETransactionImpl) odmgTrans);
// 2. mark the ODMG transaction as being in a JTA Transaction
// Associate external transaction with the odmg transaction.
txRepository.set(new TxBuffer(odmgTrans, transaction));
}
catch (Exception e)
{
log.error("Cannot associate PersistenceBroker with running Transaction", e);
throw new OJBRuntimeException(
"Transaction synchronization failed - wrong status of external container tx", e);
}
} | [
"Do synchronization of the given J2EE ODMG Transaction"
] | [
"Parse a duration value.\n\n@param value duration value\n@return Duration instance",
"Takes an object and converts it to a string.\n\n@param mapper the object mapper\n@param object the object to convert\n@return json string",
"Return primary key values of given Identity object.\n\n@param cld\n@param oid\n@return Object[]\n@throws PersistenceBrokerException",
"Are these two numbers effectively equal?\n\nThe same logic is applied for each of the 3 vector dimensions: see {@link #equal}\n@param v1\n@param v2",
"Removes all pending broadcasts\n\n@param sessionIds to remove broadcast for (or null for all sessions)",
"Use this API to fetch all the nsspparams resources that are configured on netscaler.",
"Adds mappings for each declared field in the mapped class. Any fields\nalready mapped by addColumn are skipped.",
"Add new control at the end of control bar with specified touch listener and resource.\nSize of control bar is updated based on new number of controls.\n@param name name of the control to remove\n@param resId the control face\n@param listener touch listener",
"Determine which field the Activity ID has been mapped to.\n\n@param map field map\n@return field"
] |
public void setDefaults(Annotation[] defaultAnnotations) {
if (defaultAnnotations == null) {
return;
}
for (Annotation each : defaultAnnotations) {
Class<? extends Annotation> key = each.annotationType();
if (Title.class.equals(key) || Description.class.equals(key)) {
continue;
}
if (!annotations.containsKey(key)) {
annotations.put(key, each);
}
}
} | [
"Set default values for annotations.\nInitial annotation take precedence over the default annotation when both annotation types are present\n\n@param defaultAnnotations default value for annotations"
] | [
"performs a SQL UPDTE, INSERT or DELETE statement against RDBMS.\n@param sqlStatement the query string.\n@param cld ClassDescriptor providing meta-information.\n@return int returncode",
"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.",
"Sets the the time of day\n\n@param hours the hours to set. Must be guaranteed to parse as an\ninteger between 0 and 23\n\n@param minutes the minutes to set. Must be guaranteed to parse as\nan integer between 0 and 59\n\n@param seconds the optional seconds to set. Must be guaranteed to parse as\nan integer between 0 and 59\n\n@param amPm the meridian indicator to use. Must be either 'am' or 'pm'\n\n@param zoneString the time zone to use in one of two formats:\n- zoneinfo format (America/New_York, America/Los_Angeles, etc)\n- GMT offset (+05:00, -0500, +5, etc)",
"Adds the basic sentence.\n\n@param s the s\n@throws ParseException the parse exception",
"Add a dependency to this node.\n\n@param node the dependency to add.",
"Provides a consistent ordering over lists. First compares by the first\nelement. If that element is equal, the next element is considered, and so\non.",
"List all the environment variables for an app.\n@param appName App name. See {@link #listApps} for a list of apps that can be used.\n@return map of config vars",
"Cancel request and workers.",
"Gets the currency codes, or the regular expression to select codes.\n\n@return the query for chaining."
] |
public void removePrefetchingListeners()
{
if (prefetchingListeners != null)
{
for (Iterator it = prefetchingListeners.iterator(); it.hasNext(); )
{
PBPrefetchingListener listener = (PBPrefetchingListener) it.next();
listener.removeThisListener();
}
prefetchingListeners.clear();
}
} | [
"remove all prefetching listeners"
] | [
"try to find the first none null table name for the given class-descriptor.\nIf cld has extent classes, all of these cld's searched for the first none null\ntable name.",
"Use 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",
"This method is very similar to addMainHandler, except ShellFactory\nwill pass all handlers registered with this method to all this shell's subshells.\n\n@see org.gearvrf.debug.cli.Shell#addMainHandler(java.lang.Object, java.lang.String)\n\n@param handler Object which should be registered as handler.\n@param prefix Prefix that should be prepended to all handler's command names.",
"delete of files more than 1 day old",
"The range of velocities that a particle generated from this emitter can have.\n@param minV Minimum velocity that a particle can have\n@param maxV Maximum velocity that a particle can have",
"Given a field node, checks if we are calling a private field from an inner class.",
"Computes the eigenvalue of the 2 by 2 matrix.",
"Performs MAC signing of the SMB. This is done as follows.\nThe signature field of the SMB is overwritted with the sequence number;\nThe MD5 digest of the MAC signing key + the entire SMB is taken;\nThe first 8 bytes of this are placed in the signature field.\n\n@param data The data.\n@param offset The starting offset at which the SMB header begins.\n@param length The length of the SMB data starting at offset.",
"Use this API to add onlinkipv6prefix."
] |
public void checkAllRequirementsSatisfied(final String currentPath) {
StringBuilder errors = new StringBuilder();
for (Field field: this.dependantsInJson) {
final Collection<String> requirements = this.dependantToRequirementsMap.get(field);
if (!requirements.isEmpty()) {
errors.append("\n");
String type = field.getType().getName();
if (field.getType().isArray()) {
type = field.getType().getComponentType().getName() + "[]";
}
errors.append("\t* ").append(type).append(' ').append(field.getName()).append(" depends on ")
.append(requirements);
}
}
Assert.equals(0, errors.length(),
"\nErrors were detected when analysing the @Requires dependencies of '" +
currentPath + "': " + errors);
} | [
"Check that each requirement is satisfied.\n\n@param currentPath the json path to the element being checked"
] | [
"Generates the path to an output file for a given source URL. Creates\nall necessary parent directories for the destination file.\n@param src the source\n@return the path to the output file",
"Gets the thread dump.\n\n@return the thread dump",
"Creates a color item that represents a color field found for a track based on a dbserver message.\n\n@param menuItem the rendered menu item containing the color metadata field\n\n@return the color metadata field",
"Read an unsigned integer from the given byte array\n\n@param bytes The bytes to read from\n@param offset The offset to begin reading at\n@return The integer as a long",
"Specifies the timeout for a network request.\n\n@param timeout The timeout for a network request.\n@param unit The time unit of the specified timeout.\n@return This builder instance.",
"Set the names of six images in the zip file. The default names of the six\nimages are \"posx.png\", \"negx.png\", \"posy.png\", \"negx.png\", \"posz.png\",\nand \"negz.png\". If the names of the six images in the zip file are\ndifferent to the default ones, this function must be called before load\nthe zip file.\n\n@param nameArray\nAn array containing six strings which are names of images\ncorresponding to +x, -x, +y, -y, +z, and -z faces of the cube\nmap texture respectively.",
"compare between two points.",
"This method returns the value random variable of the product within the specified model,\nevaluated at a given evalutationTime.\nCash-flows prior evaluationTime are not considered.\n\n@param evaluationTime The time on which this products value should be observed.\n@param model The model used to price the product.\n@return The random variable representing the value of the product discounted to evaluation time.\n@throws net.finmath.exception.CalculationException Thrown if the valuation fails, specific cause may be available via the <code>cause()</code> method.",
"Marks the start of a query identified by the provided correlationId\n\n@param query - Query data\n@param correlationId - Identifier\n@return Start event to pass to the Events systems EventBus"
] |
public Map<Integer, List<Row>> createTimeEntryMap(List<Row> rows)
{
Map<Integer, List<Row>> map = new HashMap<Integer, List<Row>>();
for (Row row : rows)
{
Integer workPatternID = row.getInteger("TIME_ENTRYID");
List<Row> list = map.get(workPatternID);
if (list == null)
{
list = new LinkedList<Row>();
map.put(workPatternID, list);
}
list.add(row);
}
return map;
} | [
"Creates a map between a work pattern ID and a list of time entry rows.\n\n@param rows time entry rows\n@return time entry map"
] | [
"Build a Dataset from some data.\n\n@param oldData This {@link Dataset} represents data for which we which to\nsome features, specifically those features not in the {@link edu.stanford.nlp.util.Index}\ngoodFeatures.\n@param goodFeatures An {@link edu.stanford.nlp.util.Index} of features we wish to retain.\n@return A new {@link Dataset} wheres each datapoint contains only features\nwhich were in goodFeatures.",
"Execute a CLI command. This can be any command that you might execute on\nthe CLI command line, including both server-side operations and local\ncommands such as 'cd' or 'cn'.\n\n@param cliCommand A CLI command.\n@return A result object that provides all information about the execution\nof the command.",
"Checks the preconditions for creating a new RequireSubStr processor with a List of Strings.\n\n@param requiredSubStrings\nthe required substrings\n@throws NullPointerException\nif requiredSubStrings or one of its elements is null\n@throws IllegalArgumentException\nif requiredSubStrings is empty",
"Get the target entry for a given patch element.\n\n@param element the patch element\n@return the patch entry\n@throws PatchingException",
"Gets the data handler from event.\n\n@param event the event\n@return the data handler",
"Create a document that parses the tile's featureFragment, using GraphicsWriter classes.\n\n@param writer\nwriter\n@return document\n@throws RenderException\noops",
"Account for key being fetched.\n\n@param key",
"Use this API to fetch all the sslservice resources that are configured on netscaler.",
"Wraps the specified object pool for connections as a DataSource.\n\n@param jcd the OJB connection descriptor for the pool to be wrapped\n@param connectionPool the connection pool to be wrapped\n@return a DataSource attached to the connection pool.\nConnections will be wrapped using DBCP PoolGuard, that will not allow\nunwrapping unless the \"accessToUnderlyingConnectionAllowed=true\" configuration\nis specified."
] |
public void setPropertyDestinationType(Class<?> clazz, String propertyName,
TypeReference<?> destinationType) {
propertiesDestinationTypes.put(new ClassProperty(clazz, propertyName), destinationType);
} | [
"set the property destination type for given property\n\n@param propertyName\n@param destinationType"
] | [
"Loads the schemas associated to this catalog.",
"Resize the given mesh keeping its aspect ration.\n@param mesh Mesh to be resized.\n@param size Max size for the axis.",
"Performs an implicit double step using the values contained in the lower right hand side\nof the submatrix for the estimated eigenvector values.\n@param x1\n@param x2",
"Creates a spin wrapper for a data input of a given data format.\n\n@param input the input to wrap\n@param format the data format of the input\n@return the spin wrapper for the input\n\n@throws IllegalArgumentException in case an argument of illegal type is provided (such as 'null')",
"Query zipcode from Yahoo to find associated WOEID",
"Determines the offset code of a forward contract from a schedule. Rounds the average period length to full months.\n\n@param schedule The schedule.\n@return The offset code as String",
"Modifier method to set the unique ID of this calendar.\n\n@param uniqueID unique identifier",
"ten less than Cube Q",
"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."
] |
public static int[] longestWord(LinkedList<AT_Row> rows, int colNumbers){
if(rows==null){
return null;
}
if(rows.size()==0){
return new int[0];
}
int[] ret = new int[colNumbers];
for(AT_Row row : rows){
if(row.getType()==TableRowType.CONTENT) {
LinkedList<AT_Cell> cells = row.getCells();
for(int i=0; i<cells.size(); i++) {
if(cells.get(i).getContent()!=null){
String[] ar = StringUtils.split(Object_To_StrBuilder.convert(cells.get(i).getContent()).toString());
for(int k=0; k<ar.length; k++){
int count = ar[k].length() + cells.get(i).getContext().getPaddingLeft() + cells.get(i).getContext().getPaddingRight();
if(count>ret[i]){
ret[i] = count;
}
}
}
}
}
}
return ret;
} | [
"Returns an array with the width of the longest word per column calculated from the given table.\nDefault padding will be added per column.\nPadding for individual columns will be added if defined.\n@param rows the table rows for calculations\n@param colNumbers number of columns in the table\n@return array with width of longest word for each column, null if input table was null"
] | [
"Ignore some element from the AST\n\n@param element\n@return",
"depth- first search for any module - just to check that the suggestion has any chance of delivering correct result",
"Build a query to read the mn-implementors\n@param ids",
"Create a local target.\n\n@param jbossHome the jboss home\n@param moduleRoots the module roots\n@param bundlesRoots the bundle roots\n@return the local target\n@throws IOException",
"Sets an attribute in the main section of the manifest.\n\n@param name the attribute's name\n@param value the attribute's value\n@return {@code this}\n@throws IllegalStateException if entries have been added or the JAR has been written prior to calling this methods.",
"At the moment we only support the case where one entity type is returned",
"Creates a scatter query from the given user query\n\n@param query the user's query.\n@param numSplits the number of splits to create.",
"Returns the adapter position of the Parent associated with this ChildViewHolder\n\n@return The adapter position of the Parent if it still exists in the adapter.\nRecyclerView.NO_POSITION if item has been removed from the adapter,\nRecyclerView.Adapter.notifyDataSetChanged() has been called after the last\nlayout pass or the ViewHolder has already been recycled.",
"Read in lines and execute them.\n\n@param reader the reader from which to get the groovy source to exec\n@param out the outputstream to use\n@throws java.io.IOException if something goes wrong"
] |
public static <T> T createObject(final Class<T> clazz, final Object... args) throws NoSuchConstructorException,
AmbiguousConstructorException, ReflectiveOperationException {
return findConstructor(clazz, args).newInstance(args);
} | [
"Create an object of the given type using a constructor that matches the\nsupplied arguments.\n\n@param <T> the object type\n@param clazz\nthe type to create\n@param args\nthe arguments to the constructor\n@return a new object of the given type, initialized with the given\narguments\n@throws NoSuchConstructorException\nif there is not a constructor that matches the given\narguments\n@throws AmbiguousConstructorException\nif there is more than one constructor that matches the given\narguments\n@throws ReflectiveOperationException\nif any of the reflective operations throw an exception"
] | [
"Get the SuggestionsInterface.\n\n@return The SuggestionsInterface",
"Lift a Java Func3 to a Scala Function3\n\n@param f the function to lift\n\n@returns the Scala function",
"Retrieves the text value for the baseline duration.\n\n@return baseline duration text",
"Writes the entire remaining contents of the buffer to the channel. May complete in one operation, but the\ndocumentation is vague, so this keeps going until we are sure.\n\n@param buffer the data to be written\n@param channel the channel to which we want to write data\n\n@throws IOException if there is a problem writing to the channel",
"Get global hotkey provider for current platform\n\n@param useSwingEventQueue whether the provider should be using Swing Event queue or a regular thread\n@return new instance of Provider, or null if platform is not supported\n@see X11Provider\n@see WindowsProvider\n@see CarbonProvider",
"generate a message for loglevel ERROR\n\n@param pObject the message Object",
"Rename an existing app.\n@param appName Existing app name. See {@link #listApps()} for names that can be used.\n@param newName New name to give the existing app.\n@return the new name of the object",
"This method only overrides properties that are specific from Cube like await strategy or before stop events.\n\n@param overrideDockerCompositions\nthat contains information to override.",
"Returns the WDTK datatype IRI for the property datatype as represented by\nthe given JSON datatype string.\n\n@param jsonDatatype\nthe JSON datatype string; case-sensitive\n@throws IllegalArgumentException\nif the given datatype string is not known"
] |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.