query
stringlengths 74
6.1k
| positive
sequencelengths 1
1
| negative
sequencelengths 9
9
|
---|---|---|
public List<CmsFavoriteEntry> loadFavorites() throws CmsException {
List<CmsFavoriteEntry> result = new ArrayList<>();
try {
CmsUser user = readUser();
String data = (String)user.getAdditionalInfo(ADDINFO_KEY);
if (CmsStringUtil.isEmptyOrWhitespaceOnly(data)) {
return new ArrayList<>();
}
JSONObject json = new JSONObject(data);
JSONArray array = json.getJSONArray(BASE_KEY);
for (int i = 0; i < array.length(); i++) {
JSONObject fav = array.getJSONObject(i);
try {
CmsFavoriteEntry entry = new CmsFavoriteEntry(fav);
if (validate(entry)) {
result.add(entry);
}
} catch (Exception e) {
LOG.warn(e.getLocalizedMessage(), e);
}
}
} catch (JSONException e) {
LOG.error(e.getLocalizedMessage(), e);
}
return result;
} | [
"Loads the favorite list.\n\n@return the list of favorites\n\n@throws CmsException if something goes wrong"
] | [
"Helper method to synchronously invoke a callback\n\n@param call",
"Returns the JSON String representation of the payload\naccording to Apple APNS specification\n\n@return the String representation as expected by Apple",
"High-accuracy Normal cumulative distribution function.\n\n@param x Value.\n@return Result.",
"Update the underlying buffer using the integer\n\n@param number number to be stored in checksum buffer",
"depth- first search for any module - just to check that the suggestion has any chance of delivering correct result",
"Obtain the ID associated with a profile name\n\n@param profileName profile name\n@return ID of profile",
"Constructs a valid request and passes it on to the next handler. It also\ncreates the 'StoreClient' object corresponding to the store name\nspecified in the REST request.\n\n@param requestValidator The Validator object used to construct the\nrequest object\n@param ctx Context of the Netty channel\n@param messageEvent Message Event used to write the response / exception",
"Use this method to enable device network-related information tracking, including IP address.\nThis reporting is disabled by default. To re-disable tracking call this method with enabled set to false.\n\n@param value boolean Whether device network info reporting should be enabled/disabled.",
"Attaches a morph to scene object with a base mesh\n@param sceneObj is the base mesh.\n@throws IllegalStateException if component is null\n@throws IllegalStateException if mesh is null\n@throws IllegalStateException if material is null"
] |
private boolean processQueue(K key) {
Queue<AsyncResourceRequest<V>> requestQueue = getRequestQueueForKey(key);
if(requestQueue.isEmpty()) {
return false;
}
// Attempt to get a resource.
Pool<V> resourcePool = getResourcePoolForKey(key);
V resource = null;
Exception ex = null;
try {
// Must attempt non-blocking checkout to ensure resources are
// created for the pool.
resource = attemptNonBlockingCheckout(key, resourcePool);
} catch(Exception e) {
destroyResource(key, resourcePool, resource);
ex = e;
resource = null;
}
// Neither we got a resource, nor an exception. So no requests can be
// processed return
if(resource == null && ex == null) {
return false;
}
// With resource in hand, process the resource requests
AsyncResourceRequest<V> resourceRequest = getNextUnexpiredResourceRequest(requestQueue);
if(resourceRequest == null) {
if(resource != null) {
// Did not use the resource! Directly check in via super to
// avoid
// circular call to processQueue().
try {
super.checkin(key, resource);
} catch(Exception e) {
logger.error("Exception checking in resource: ", e);
}
} else {
// Poor exception, no request to tag this exception onto
// drop it on the floor and continue as usual.
}
return false;
} else {
// We have a request here.
if(resource != null) {
resourceRequest.useResource(resource);
} else {
resourceRequest.handleException(ex);
}
return true;
}
} | [
"Attempts to checkout a resource so that one queued request can be\nserviced.\n\n@param key The key for which to process the requestQueue\n@return true iff an item was processed from the Queue."
] | [
"This method is called to format a relation.\n\n@param relation relation instance\n@return formatted relation instance",
"Curries a procedure that takes two arguments.\n\n@param procedure\nthe original procedure. May not be <code>null</code>.\n@param argument\nthe fixed first argument of {@code procedure}.\n@return a procedure that takes one argument. Never <code>null</code>.",
"Whether this association contains no rows.\n\n@return {@code true} if this association contains no rows, {@code false} otherwise",
"Encrypts data.\n\n@param plainData {@code initVector || payload || zeros:4}\n@return {@code initVector || E(payload) || I(signature)}",
"Adjusts the day in the provided month, that it fits the specified week day.\nIf there's no match for that provided month, the next possible month is checked.\n\n@param date the date to adjust, with the correct year and month already set.",
"Helper method to convert seed bytes into the long value required by the\nsuper class.",
"Returns the aliased certificate. Certificates are aliased by their hostname.\n@see ThumbprintUtil\n@param alias\n@return\n@throws KeyStoreException\n@throws UnrecoverableKeyException\n@throws NoSuchProviderException\n@throws NoSuchAlgorithmException\n@throws CertificateException\n@throws SignatureException\n@throws CertificateNotYetValidException\n@throws CertificateExpiredException\n@throws InvalidKeyException\n@throws CertificateParsingException",
"Get an exception reporting a missing, required XML child element.\n@param reader the stream reader\n@param required a set of enums whose toString method returns the\nattribute name\n@return the exception",
"Set the week days the events should occur.\n@param weekDays the week days to set."
] |
public static base_responses Import(nitro_service client, sslfipskey resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
sslfipskey Importresources[] = new sslfipskey[resources.length];
for (int i=0;i<resources.length;i++){
Importresources[i] = new sslfipskey();
Importresources[i].fipskeyname = resources[i].fipskeyname;
Importresources[i].key = resources[i].key;
Importresources[i].inform = resources[i].inform;
Importresources[i].wrapkeyname = resources[i].wrapkeyname;
Importresources[i].iv = resources[i].iv;
Importresources[i].exponent = resources[i].exponent;
}
result = perform_operation_bulk_request(client, Importresources,"Import");
}
return result;
} | [
"Use this API to Import sslfipskey resources."
] | [
"Returns true of the specified matrix element is valid element inside this matrix.\n\n@param row Row index.\n@param col Column index.\n@return true if it is a valid element in the matrix.",
"appends a HAVING-clause to the Statement\n@param having\n@param crit\n@param stmt",
"Use this API to fetch the statistics of all appfwpolicylabel_stats resources that are configured on netscaler.",
"Attaches meta info about the current state of the device to an event.\nTypically, this meta is added only to the ping event.",
"This internal method is used to convert from a Date instance to an\ninteger representing the number of minutes past midnight.\n\n@param date date instance\n@return minutes past midnight as an integer",
"Generate a uniform random number in the range [lo, hi)\n\n@param lo lower limit of range\n@param hi upper limit of range\n@return a uniform random real in the range [lo, hi)",
"Generate an ordered set of column definitions from an ordered set of column names.\n\n@param columns column definitions\n@param order column names\n@return ordered set of column definitions",
"Check whether the URL contains one of the patterns.\n\n@param uri URI\n@param patterns possible patterns\n@return true when URL contains one of the patterns",
"Find and read the cache format entry in a metadata cache file.\n\n@return the content of the format entry, or {@code null} if none was found\n\n@throws IOException if there is a problem reading the file"
] |
@SuppressWarnings("unchecked")
public Multimap<String, Processor> getAllRequiredAttributes() {
Multimap<String, Processor> requiredInputs = HashMultimap.create();
for (ProcessorGraphNode root: this.roots) {
final BiMap<String, String> inputMapper = root.getInputMapper();
for (String attr: inputMapper.keySet()) {
requiredInputs.put(attr, root.getProcessor());
}
final Object inputParameter = root.getProcessor().createInputParameter();
if (inputParameter instanceof Values) {
continue;
} else if (inputParameter != null) {
final Class<?> inputParameterClass = inputParameter.getClass();
final Set<String> requiredAttributesDefinedInInputParameter =
getAttributeNames(inputParameterClass,
FILTER_ONLY_REQUIRED_ATTRIBUTES);
for (String attName: requiredAttributesDefinedInInputParameter) {
try {
if (inputParameterClass.getField(attName).getType() == Values.class) {
continue;
}
} catch (NoSuchFieldException e) {
throw new RuntimeException(e);
}
String mappedName = ProcessorUtils.getInputValueName(
root.getProcessor().getInputPrefix(),
inputMapper, attName);
requiredInputs.put(mappedName, root.getProcessor());
}
}
}
return requiredInputs;
} | [
"Get all the names of inputs that are required to be in the Values object when this graph is executed."
] | [
"Returns the output path specified on the javadoc options",
"Convert a string to a URL and fallback to classpath resource, if not convertible.\n\n@param s\nThe string to convert.\n\n@return The URL.",
"Create a rollback patch based on the recorded actions.\n\n@param patchId the new patch id, depending on release or one-off\n@param patchType the current patch identity\n@return the rollback patch",
"Create a new DateTime. To the last second. This will not create any\nextra-millis-seconds, which may cause bugs when writing to stores such as\ndatabases that round milli-seconds up and down.",
"Resamples a trajectory\n@param t Trajectory to resample\n@param n Resample rate\n@return Returns a resampled trajectory which contains every n'th position of t",
"Configures a text field to look like a filter box for a table.\n\n@param searchBox the text field to configure",
"Checks if we can see any players that are on a different network than the one we chose for the Virtual CDJ.\nIf so, we are not going to be able to communicate with them, and they should all be moved onto a single\nnetwork.\n\n@return the device announcements of any players which are on unreachable networks, or hopefully an empty list\n@throws IllegalStateException if we are not running",
"Update a note.\n\n@param note\nThe Note to update\n@throws FlickrException",
"Add the value to list of values to be used as part of the\nevaluation of this indicator.\n\n@param index position in the list\n@param value evaluation value"
] |
private void processCalendarDays(ProjectCalendar calendar, Record root)
{
// Retrieve working hours ...
Record daysOfWeek = root.getChild("DaysOfWeek");
if (daysOfWeek != null)
{
for (Record dayRecord : daysOfWeek.getChildren())
{
processCalendarHours(calendar, dayRecord);
}
}
} | [
"Process calendar days of the week.\n\n@param calendar project calendar\n@param root calendar data"
] | [
"Creates a db handling object.\n\n@return The db handling object\n@throws BuildException If the handling is invalid",
"Converts the suggestions from the Solrj format to JSON format.\n\n@param response The SpellCheckResponse object containing the spellcheck results.\n@return The spellcheck suggestions as JSON object or null if something goes wrong.",
"Creates the stats items.\n\n@param statsType\nthe stats type\n@return the sorted set\n@throws IOException\nSignals that an I/O exception has occurred.",
"Removes the observation that fits the model the worst and recomputes the coefficients.\nThis is done efficiently by using an adjustable solver. Often times the elements with\nthe largest errors are outliers and not part of the system being modeled. By removing them\na more accurate set of coefficients can be computed.",
"Add a new profile with the profileName given.\n\n@param profileName name of new profile\n@return newly created profile\n@throws Exception exception",
"Appends to the statement table and all tables joined to it.\n@param alias the table alias\n@param where append conditions for WHERE clause here",
"Extracts a numeric id from a string, which can be either a Wikidata\nentity URI or a short entity or property id.\n\n@param idString\n@param isUri\n@return numeric id, or 0 if there was an error",
"Modifies the \"msgCount\" belief\n\n@param int - the number to add or remove",
"Adds a row to the internal storage, indexed by primary key.\n\n@param uniqueID unique ID of the row\n@param map row data as a simpe map"
] |
void stop() {
try {
dm.stop(getBundleContext());
} catch (DirectoryMonitoringException e) {
LOG.error("Failed to stop " + DirectoryMonitor.class.getName() + " for the directory " + monitoredDirectory, e);
}
declarationsFiles.clear();
declarationRegistrationManager.unregisterAll();
} | [
"This method must be called on the stop of the component. Stop the directory monitor and unregister all the\ndeclarations."
] | [
"Used to determine if a particular day of the week is normally\na working day.\n\n@param mpxjCalendar ProjectCalendar instance\n@param day Day instance\n@return boolean flag",
"Returns an array specifing the index of each hull vertex with respect to\nthe original input points.\n\n@return vertex indices with respect to the original points",
"Stops the service. If a timeout is given and the service has still not\ngracefully been stopped after timeout ms the service is stopped by force.\n\n@param millis value in ms",
"Converts a Fluo Span to Accumulo Range\n\n@param span Span\n@return Range",
"read messages beginning from offset\n\n@param offset next message offset\n@param length the max package size\n@return a MessageSet object with length data or empty\n@see MessageSet#Empty\n@throws IOException any exception",
"Check if the node matches the column values\n\n@param nodeProperties the properties on the node\n@param keyColumnNames the name of the columns to check\n@param keyColumnValues the value of the columns to check\n@return true if the properties of the node match the column names and values",
"Use this API to fetch the statistics of all dos_stats resources that are configured on netscaler.",
"Add all sub-classes using multiple joined tables feature for specified class.\n@param result The list to add results.\n@param cld The {@link ClassDescriptor} of the class to search for sub-classes.\n@param wholeTree If set <em>true</em>, the whole sub-class tree of the specified\nclass will be returned. If <em>false</em> only the direct sub-classes of the specified class\nwill be returned.",
"When the descriptor was added while editing, but the change was not saved, it has to be removed\nwhen the editor is closed.\n@throws CmsException thrown when deleting the descriptor resource fails"
] |
public static String getDateTimeStr(Date d) {
if (d == null)
return "";
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSSZ");
// 20140315 test will problem +0000
return sdf.format(d);
} | [
"Gets the date time str.\n\n@param d\nthe d\n@return the date time str"
] | [
"Send a master changed announcement to all registered master listeners.\n\n@param update the message announcing the new tempo master",
"Retrieve row from a nested table.\n\n@param name column name\n@return nested table rows",
"Write exceptions in the format used by MSPDI files prior to Project 2007.\n\n@param dayList list of calendar days\n@param exceptions list of exceptions",
"Verifies a provided signature.\n\n@param key\nfor which signature key\n@param actualAlgorithm\ncurrent signature algorithm\n@param actualSignature\ncurrent signature\n@param webHookPayload\nfor signing\n@param deliveryTimestamp\nfor signing\n@return true if verification passed",
"List the photos with the most views, comments or favorites.\n\n@param date\n(Optional) Stats will be returned for this date. A day according to Flickr Stats starts at midnight GMT for all users, and timestamps will\nautomatically be rounded down to the start of the day. If no date is provided, all time view counts will be returned.\n@param sort\n(Optional) The order in which to sort returned photos. Defaults to views. The possible values are views, comments and favorites. Other sort\noptions are available through flickr.photos.search.\n@param perPage\n(Optional) Number of referrers to return per page. If this argument is omitted, it defaults to 25. The maximum allowed value is 100.\n@param page\n(Optional) The page of results to return. If this argument is omitted, it defaults to 1.\n@throws FlickrException\n@see \"http://www.flickr.com/services/api/flickr.stats.getPopularPhotos.html\"",
"Sets any application-specific custom fields. The values\nare presented to the application and the iPhone doesn't\ndisplay them automatically.\n\nThis can be used to pass specific values (urls, ids, etc) to\nthe application in addition to the notification message\nitself.\n\n@param key the custom field name\n@param value the custom field value\n@return this",
"Computes the decomposition of the provided matrix. If no errors are detected then true is returned,\nfalse otherwise.\n@param A The matrix that is being decomposed. Not modified.\n@return If it detects any errors or not.",
"Deletes a story. A user can only delete stories they have created. Returns an empty data record.\n\n@param story Globally unique identifier for the story.\n@return Request object",
"Convenience routine to move to the next iterator if needed.\n@return true if the iterator is changed, false if no changes."
] |
public static boolean sameNetwork(int prefixLength, InetAddress address1, InetAddress address2) {
if (logger.isDebugEnabled()) {
logger.debug("Comparing address " + address1.getHostAddress() + " with " + address2.getHostAddress() + ", prefixLength=" + prefixLength);
}
long prefixMask = 0xffffffffL & (-1 << (32 - prefixLength));
return (addressToLong(address1) & prefixMask) == (addressToLong(address2) & prefixMask);
} | [
"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"
] | [
"This method searches in the Component Management Service, so given an\nagent name returns its IExternalAccess\n\n@param agent_name\nThe name of the agent in the platform\n@return The IComponentIdentifier of the agent in the platform",
"Parse a filter expression.\n\n@param filter the filter expression\n@return compiled nodes",
"Check the given resource back into the pool\n\n@param key The key for the resource\n@param resource The resource",
"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",
"Parse a list of Photos from given Element.\n\n@param photosElement\n@return PhotoList",
"Updates the style of the field label according to the field value if the\nfield value is empty - null or \"\" - removes the label 'active' style else\nwill add the 'active' style to the field label.",
"Get the underlying channel. This may block until the channel is set.\n\n@return the channel\n@throws IOException for any error",
"Use this API to fetch all the nsrollbackcmd resources that are configured on netscaler.\nThis uses nsrollbackcmd_args which is a way to provide additional arguments while fetching the resources.",
"Inverts an upper or lower triangular block submatrix.\n\n@param blockLength\n@param upper Is it upper or lower triangular.\n@param T Triangular matrix that is to be inverted. Must be block aligned. Not Modified.\n@param T_inv Where the inverse is stored. This can be the same as T. Modified.\n@param temp Work space variable that is size blockLength*blockLength."
] |
public static long decodeLong(byte[] ba, int offset) {
return ((((long) ba[offset + 0] << 56) + ((long) (ba[offset + 1] & 255) << 48)
+ ((long) (ba[offset + 2] & 255) << 40) + ((long) (ba[offset + 3] & 255) << 32)
+ ((long) (ba[offset + 4] & 255) << 24) + ((ba[offset + 5] & 255) << 16)
+ ((ba[offset + 6] & 255) << 8) + ((ba[offset + 7] & 255) << 0)));
} | [
"Decode long from byte array at offset\n\n@param ba byte array\n@param offset Offset\n@return long value"
] | [
"Pick arbitrary wrapping method. No generics should be set.\n@param builder",
"If provided with an AVRO schema, validates it and checks if there are\nbackwards compatible.\n\nTODO should probably place some similar checks for other serializer types\nas well?\n\n@param serializerDef",
"Checks if the specified latitude is correct.\n\n@param name the name of the latitude field\n@param latitude the value of the latitude field\n@return the latitude",
"Utility method used to convert an arbitrary Number into an Integer.\n\n@param value Number instance\n@return Integer instance",
"Gets the index of the specified value.\n\n@param value the value of the item to be found\n@return the index of the value",
"Initializes the set of report implementation.",
"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",
"capture screenshot of an eye",
"Given a rebalance-task info, convert it into the protobuf equivalent\n\n@param stealInfo Rebalance task info\n@return Protobuf equivalent of the same"
] |
private static void attachToContent(Activity activity, MenuDrawer menuDrawer) {
/**
* Do not call mActivity#setContentView.
* E.g. if using with a ListActivity, Activity#setContentView is overridden and dispatched to
* MenuDrawer#setContentView, which then again would call Activity#setContentView.
*/
ViewGroup content = (ViewGroup) activity.findViewById(android.R.id.content);
content.removeAllViews();
content.addView(menuDrawer, LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);
} | [
"Attaches the menu drawer to the content view."
] | [
"Use this API to fetch all the transformpolicylabel resources that are configured on netscaler.",
"Stop finding waveforms for all active players.",
"Reads basic summary details from the project properties.\n\n@param file MPX file",
"Output method responsible for sending the updated content to the Subscribers.\n\n@param cn",
"Close off the connection.\n\n@throws SQLException",
"Iterates over the elements of an iterable collection of items, starting\nfrom a specified startIndex, and returns the index of the last item that\nmatches the condition specified in the closure.\n\n@param self the iteration object over which to iterate\n@param startIndex start matching from this index\n@param closure the filter to perform a match on the collection\n@return an integer that is the index of the last matched object or -1 if no match was found\n@since 1.5.2",
"This is generally only useful for extensions that delegate some of their functionality to other \"internal\"\nextensions of their own that they need to configure.\n\n@param configuration the configuration to be supplied with the returned analysis context.\n@return an analysis context that is a clone of this instance but its configuration is replaced with the provided\none.",
"Executed read-resource-description and returns access-control info.\nReturns null in case there was any kind of problem.\n\n@param client\n@param address\n@return",
"Embeds the given SVG element into a new SVG element scaling the graphic to the given dimension and\napplying the given rotation."
] |
public QueryBuilder<T, ID> selectColumns(String... columns) {
for (String column : columns) {
addSelectColumnToList(column);
}
return this;
} | [
"Add columns to be returned by the SELECT query. If no columns are selected then all columns are returned by\ndefault. For classes with id columns, the id column is added to the select list automagically. This can be called\nmultiple times to add more columns to select.\n\n<p>\n<b>WARNING:</b> If you specify any columns to return, then any foreign-collection fields will be returned as null\n<i>unless</i> their {@link ForeignCollectionField#columnName()} is also in the list.\n</p>"
] | [
"Checks if provided class package is on the exclude list\n\n@param classPackageName\nname of class package\n@return false if class package is on the {@link #excludePackages} list",
"Starting with the given column index, will return the first column index\nwhich contains a colour that does not match the given color.",
"Use this API to fetch all the responderhtmlpage resources that are configured on netscaler.",
"If you register a CustomExpression with the name \"customExpName\", then this will create the text needed\nto invoke it in a JRDesignExpression\n\n@param customExpName\n@param usePreviousFieldValues\n@return",
"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",
"Create all the links possible between the Declaration and all the ImporterService matching the.\nImporterServiceFilter of the Linker.\n\n@param declarationSRef the ServiceReference<Declaration> of the Declaration",
"depth- first search for any module - just to check that the suggestion has any chance of delivering correct result",
"Check, if the resource should be exported with minimal meta-data.\nThis holds for resources that are not part of the export, but must be\nexported as super-folders.\n\n@param path export-site relative path of the resource to check.\n\n@return flag, indicating if the resource should be exported with minimal meta data.",
"Queues up a callback to be removed and invoked on the next change event."
] |
List<W3CEndpointReference> lookupEndpoints(QName serviceName,
MatcherDataType matcherData) throws ServiceLocatorFault,
InterruptedExceptionFault {
SLPropertiesMatcher matcher = createMatcher(matcherData);
List<String> names = null;
List<W3CEndpointReference> result = new ArrayList<W3CEndpointReference>();
String adress;
try {
initLocator();
if (matcher == null) {
names = locatorClient.lookup(serviceName);
} else {
names = locatorClient.lookup(serviceName, matcher);
}
} catch (ServiceLocatorException e) {
ServiceLocatorFaultDetail serviceFaultDetail = new ServiceLocatorFaultDetail();
serviceFaultDetail.setLocatorFaultDetail(serviceName.toString()
+ "throws ServiceLocatorFault");
throw new ServiceLocatorFault(e.getMessage(), serviceFaultDetail);
} catch (InterruptedException e) {
InterruptionFaultDetail interruptionFaultDetail = new InterruptionFaultDetail();
interruptionFaultDetail.setInterruptionDetail(serviceName
.toString() + "throws InterruptionFault");
throw new InterruptedExceptionFault(e.getMessage(),
interruptionFaultDetail);
}
if (names != null && !names.isEmpty()) {
for (int i = 0; i < names.size(); i++) {
adress = names.get(i);
result.add(buildEndpoint(serviceName, adress));
}
} else {
if (LOG.isLoggable(Level.WARNING)) {
LOG.log(Level.WARNING, "lookup Endpoints for " + serviceName
+ " failed, service is not known.");
}
ServiceLocatorFaultDetail serviceFaultDetail = new ServiceLocatorFaultDetail();
serviceFaultDetail.setLocatorFaultDetail("lookup Endpoint for "
+ serviceName + " failed, service is not known.");
throw new ServiceLocatorFault("Can not find Endpoint",
serviceFaultDetail);
}
return result;
} | [
"For the given service name return list of endpoint references currently\nregistered at the service locator server endpoints.\n\n@param serviceName\nthe name of the service for which to get the endpoints, must\nnot be <code>null</code>\n@return EndpointReferenceListType encapsulate list of endpoint references\nor <code>null</code>"
] | [
"Do the search, called as a \"page action\"",
"Copies just the upper or lower triangular portion of a matrix.\n\n@param src Matrix being copied. Not modified.\n@param dst Where just a triangle from src is copied. If null a new one will be created. Modified.\n@param upper If the upper or lower triangle should be copied.\n@return The copied matrix.",
"Append the text at the end of the File, using a specified encoding.\n\n@param file a File\n@param text the text to append at the end of the File\n@param charset the charset used\n@throws IOException if an IOException occurs.\n@since 1.0",
"Merges two lists together.\n\n@param one first list\n@param two second list\n@return merged lists",
"Utility method used to convert an arbitrary Number into an Integer.\n\n@param value Number instance\n@return Integer instance",
"Returns true if the string is a valid Java full qualified class name.\n\n@param str the string to be examined\n@return true if str is a valid Java Fqcn",
"Returns a list of all templates under the user account\n\n@param options {@link Map} extra options to send along with the request.\n@return {@link ListResponse}\n\n@throws RequestException if request to transloadit server fails.\n@throws LocalOperationException if something goes wrong while running non-http operations.",
"Use this API to clear gslbldnsentries.",
"A simple convinience function that decomposes the matrix but automatically checks the input ti make\nsure is not being modified.\n\n@param decomp Decomposition which is being wrapped\n@param M THe matrix being decomposed.\n@param <T> Matrix type.\n@return If the decomposition was successful or not."
] |
public void setCurrencySymbol(String symbol)
{
if (symbol == null)
{
symbol = DEFAULT_CURRENCY_SYMBOL;
}
set(ProjectField.CURRENCY_SYMBOL, symbol);
} | [
"Sets currency symbol.\n\n@param symbol currency symbol"
] | [
"Converts the suggestions from the Solrj format to JSON format.\n\n@param response The SpellCheckResponse object containing the spellcheck results.\n@return The spellcheck suggestions as JSON object or null if something goes wrong.",
"Returns the target locales.\n\n@return the target locales, never null.",
"Redirect URL to the specified profile ID\n\n@param model\n@param profileId\n@return\n@throws Exception",
"Binding view holder with payloads is used to handle partial changes in item.",
"private HttpServletResponse headers;",
"Creates a ServiceCall from an observable object.\n\n@param observable the observable to create from\n@param <T> the type of the response\n@return the created ServiceCall",
"This deals with the CoNLL files for different languages which have\nbetween 2 and 5 columns on non-blank lines.\n\n@param line A line of CoNLL input\n@return The constructed token",
"Retrieve the FeatureSource object from the data store.\n\n@return An OpenGIS FeatureSource object;\n@throws LayerException\noops",
"Make a composite filter from the given sub-filters using AND to combine filters."
] |
private static String getUnexpectedTypeMessage(final Class<?> expectedType, final Object actualValue) {
if( expectedType == null ) {
throw new NullPointerException("expectedType should not be null");
}
String expectedClassName = expectedType.getName();
String actualClassName = (actualValue != null) ? actualValue.getClass().getName() : "null";
return String.format("the input value should be of type %s but is %s", expectedClassName, actualClassName);
} | [
"Assembles the exception message when the value received by a CellProcessor isn't of the correct type.\n\n@param expectedType\nthe expected type\n@param actualValue\nthe value received by the CellProcessor\n@return the message\n@throws NullPointerException\nif expectedType is null"
] | [
"Sets the node meta data.\n\n@param key - the meta data key\n@param value - the meta data value\n@throws GroovyBugError if key is null or there is already meta\ndata under that key",
"Updates the gatewayDirection attributes of all gateways.\n@param def",
"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",
"Additional objects to include with the requested group.\nNote that all the optional includes depend on \"assignments\" also being included.\n@param includes List of included objects to return\n@return this object to continue building options",
"Find any standard methods the user has 'underridden' in their type.",
"Cancel request and workers.",
"Set all unknown fields\n@param unknownFields the new unknown fields",
"Returns the text for the JSONObject of Link provided\nThe JSONObject of Link provided should be of the type \"copy\"\n@param jsonObject of Link\n@return String",
"Show only the given channel.\n@param channels The channels to show"
] |
private void flushOutput() throws IOException {
outStream.flush();
outWriter.completeLine();
errStream.flush();
errWriter.completeLine();
} | [
"Flush output streams."
] | [
"Create a new custom field setting on the project.\n\n@param project The project to associate the custom field with\n@return Request object",
"Returns whether this address section represents a subnet block of addresses associated its prefix length.\n\nReturns false if it has no prefix length, if it is a single address with a prefix length (ie not a subnet), or if it is a range of addresses that does not include\nthe entire subnet block for its prefix length.\n\nIf {@link AddressNetwork#getPrefixConfiguration} is set to consider all prefixes as subnets, this returns true for any grouping with prefix length.\n\n@return",
"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.\"",
"Re-Tag the websocket connection hold by this context with label specified.\nThis method will remove all previous tags on the websocket connection and then\ntag it with the new label.\n@param label the label.\n@return this websocket conext.",
"Returns the arguments as a list in their command line form.\n\n@return the arguments for the command line",
"Set the color for the statusBar\n\n@param statusBarColor",
"The derivative of the objective function. You may override this method\nif you like to implement your own derivative.\n\n@param parameters Input value. The parameter vector.\n@param derivatives Output value, where derivatives[i][j] is d(value(j)) / d(parameters(i)\n@throws SolverException Thrown if the valuation fails, specific cause may be available via the <code>cause()</code> method.",
"Clear all beans and call the destruction callback.",
"This method lists all resource assignments defined in the file.\n\n@param file MPX file"
] |
@Override
public T next() {
SQLException sqlException = null;
try {
T result = nextThrow();
if (result != null) {
return result;
}
} catch (SQLException e) {
sqlException = e;
}
// we have to throw if there is no next or on a SQLException
last = null;
closeQuietly();
throw new IllegalStateException("Could not get next result for " + dataClass, sqlException);
} | [
"Returns the next object in the table.\n\n@throws IllegalStateException\nIf there was a problem extracting the object from SQL."
] | [
"Tries to guess the packaging of the archive - whether it's an EAR, WAR, JAR.\nMaybe not needed as we can rely on the suffix?",
"Changes the image data associated with a GVRTexture.\nThis can be a simple bitmap, a compressed bitmap,\na cubemap or a compressed cubemap.\n@param imageData data for the texture as a GVRImate",
"Compiles and performs the provided equation.\n\n@param equation String in simple equation format",
"Obtains a Julian local date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the Julian local date-time, not null\n@throws DateTimeException if unable to create the date-time",
"Can be overridden if you want to replace or supplement the debug handling for responses.\n\n@param responseCode\n@param inputStream",
"Use this API to fetch inat resource of given name .",
"Write back to hints file.",
"FOR internal use. This method was called before the external transaction was completed.\n\nThis method was called by the JTA-TxManager before the JTA-tx prepare call. Within this method\nwe prepare odmg for commit and pass all modified persistent objects to DB and release/close the used\nconnection. We have to close the connection in this method, because the TxManager does prepare for commit\nafter this method and all used DataSource-connections have to be closed before.\n\n@see javax.transaction.Synchronization",
"prefetch defined relationships requires JDBC level 2.0, does not work\nwith Arrays"
] |
public static <InnerT> Observable<InnerT> convertPageToInnerAsync(Observable<Page<InnerT>> innerPage) {
return innerPage.flatMap(new Func1<Page<InnerT>, Observable<InnerT>>() {
@Override
public Observable<InnerT> call(Page<InnerT> pageInner) {
return Observable.from(pageInner.items());
}
});
} | [
"Converts Observable of page to Observable of Inner.\n@param <InnerT> type of inner.\n@param innerPage Page to be converted.\n@return Observable for list of inner."
] | [
"Send message to all connections connected to the same URL of this context\n\n@param message the message to be sent\n@param excludeSelf whether the connection of this context should be sent to\n@return this context",
"The metadata cache can become huge over time. This simply flushes it periodically.",
"Takes a list of Strings and combines them into a single comma-separated\nString.\n@param strings The Strings to combine.\n@return The combined, comma-separated, String.",
"Use this API to fetch all the dospolicy resources that are configured on netscaler.",
"Read a short int from an input stream.\n\n@param is input stream\n@return int value",
"Returns the complete tag record for a single tag.\n\n@param tag The tag to get.\n@return Request object",
"Support the subscript operator for String.\n\n@param text a String\n@param index the index of the Character to get\n@return the Character at the given index\n@since 1.0",
"Insert a value into the right bucket of the histogram. If the value is\nlarger than any bound, insert into the last bucket. If the value is less\nthan zero, then ignore it.\n\n@param data The value to insert into the histogram",
"Unregister all MBeans"
] |
private Project.Calendars.Calendar writeCalendar(ProjectCalendar bc)
{
//
// Create a calendar
//
Project.Calendars.Calendar calendar = m_factory.createProjectCalendarsCalendar();
calendar.setUID(NumberHelper.getBigInteger(bc.getUniqueID()));
calendar.setIsBaseCalendar(Boolean.valueOf(!bc.isDerived()));
ProjectCalendar base = bc.getParent();
// SF-329: null default required to keep Powerproject happy when importing MSPDI files
calendar.setBaseCalendarUID(base == null ? NULL_CALENDAR_ID : NumberHelper.getBigInteger(base.getUniqueID()));
calendar.setName(bc.getName());
//
// Create a list of normal days
//
Project.Calendars.Calendar.WeekDays days = m_factory.createProjectCalendarsCalendarWeekDays();
Project.Calendars.Calendar.WeekDays.WeekDay.WorkingTimes.WorkingTime time;
ProjectCalendarHours bch;
List<Project.Calendars.Calendar.WeekDays.WeekDay> dayList = days.getWeekDay();
for (int loop = 1; loop < 8; loop++)
{
DayType workingFlag = bc.getWorkingDay(Day.getInstance(loop));
if (workingFlag != DayType.DEFAULT)
{
Project.Calendars.Calendar.WeekDays.WeekDay day = m_factory.createProjectCalendarsCalendarWeekDaysWeekDay();
dayList.add(day);
day.setDayType(BigInteger.valueOf(loop));
day.setDayWorking(Boolean.valueOf(workingFlag == DayType.WORKING));
if (workingFlag == DayType.WORKING)
{
Project.Calendars.Calendar.WeekDays.WeekDay.WorkingTimes times = m_factory.createProjectCalendarsCalendarWeekDaysWeekDayWorkingTimes();
day.setWorkingTimes(times);
List<Project.Calendars.Calendar.WeekDays.WeekDay.WorkingTimes.WorkingTime> timesList = times.getWorkingTime();
bch = bc.getCalendarHours(Day.getInstance(loop));
if (bch != null)
{
for (DateRange range : bch)
{
if (range != null)
{
time = m_factory.createProjectCalendarsCalendarWeekDaysWeekDayWorkingTimesWorkingTime();
timesList.add(time);
time.setFromTime(range.getStart());
time.setToTime(range.getEnd());
}
}
}
}
}
}
//
// Create a list of exceptions
//
// A quirk of MS Project is that these exceptions must be
// in date order in the file, otherwise they are ignored
//
List<ProjectCalendarException> exceptions = new ArrayList<ProjectCalendarException>(bc.getCalendarExceptions());
if (!exceptions.isEmpty())
{
Collections.sort(exceptions);
writeExceptions(calendar, dayList, exceptions);
}
//
// Do not add a weekdays tag to the calendar unless it
// has valid entries.
// Fixes SourceForge bug 1854747: MPXJ and MSP 2007 XML formats
//
if (!dayList.isEmpty())
{
calendar.setWeekDays(days);
}
writeWorkWeeks(calendar, bc);
m_eventManager.fireCalendarWrittenEvent(bc);
return (calendar);
} | [
"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"
] | [
"When the JRField needs properties, use this method.\n@param propertyName\n@param value\n@return",
"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.",
"Add the final assignment of the property to the partial value object's source code.",
"Sets the publish queue shutdown time.\n\n@param publishQueueShutdowntime the shutdown time to set, parsed as <code>int</code>",
"Copy a patch element\n\n@param entry the patch entry\n@param patchId the patch id for the element\n@param modifications the element modifications\n@return the new patch element",
"Creates a Bytes object by copying the data of the given ByteBuffer.\n\n@param bb Data will be read from this ByteBuffer in such a way that its position is not\nchanged.",
"This method log given exception in specified listener",
"Write the given pattern to given log in given logging level\n@param logger\n@param level\n@param pattern\n@param exception",
"Check that each requirement is satisfied.\n\n@param currentPath the json path to the element being checked"
] |
public CompositeGeneratorNode appendTemplate(final CompositeGeneratorNode parent, final StringConcatenationClient templateString) {
final TemplateNode proc = new TemplateNode(templateString, this);
List<IGeneratorNode> _children = parent.getChildren();
_children.add(proc);
return parent;
} | [
"Creates a template node for the given templateString and appends it to the given parent node.\n\nTemplates are translated to generator node trees and expressions in templates can be of type IGeneratorNode.\n\n@return the given parent node"
] | [
"Builds the resource.\n\n@return the cms resource",
"if you want to convert some string to an object, you have an argument to parse",
"Inserts a CharSequence value into the mapping of the underlying Bundle, replacing any existing\nvalue for the given key. Either key or value may be null.\n\n@param key a String, or null\n@param value a CharSequence, or null\n@return this bundler instance to chain method calls",
"Retrieve an activity status.\n\n@param mpxj MPXJ Task instance\n@return activity status",
"Matches the styles and adjusts the size. This needs to be\ncalled after the input is added to the DOM, so we do it in\nonLoad.",
"Clears all scopes. Useful for testing and not getting any leak...",
"This method retrieves a string of the specified type,\nbelonging to the item with the specified unique ID.\n\n@param id unique ID of entity to which this data belongs\n@param type data type identifier\n@return required string data",
"This method is used to process an MPP14 file. This is the file format\nused by Project 14.\n\n@param reader parent file reader\n@param file parent MPP file\n@param root Root of the POI file system.",
"Sets the bottom padding character for all cells in the row.\n@param paddingBottomChar new padding character, ignored if null\n@return this to allow chaining"
] |
protected static String getTimePrecisionString(byte precision) {
switch (precision) {
case TimeValue.PREC_SECOND:
return "sec";
case TimeValue.PREC_MINUTE:
return "min";
case TimeValue.PREC_HOUR:
return "hour";
case TimeValue.PREC_DAY:
return "day";
case TimeValue.PREC_MONTH:
return "month";
case TimeValue.PREC_YEAR:
return "year";
case TimeValue.PREC_DECADE:
return "decade";
case TimeValue.PREC_100Y:
return "100 years";
case TimeValue.PREC_1KY:
return "1000 years";
case TimeValue.PREC_10KY:
return "10K years";
case TimeValue.PREC_100KY:
return "100K years";
case TimeValue.PREC_1MY:
return "1 million years";
case TimeValue.PREC_10MY:
return "10 million years";
case TimeValue.PREC_100MY:
return "100 million years";
case TimeValue.PREC_1GY:
return "1000 million years";
default:
return "Unsupported precision " + precision;
}
} | [
"Returns a human-readable string representation of a reference to a\nprecision that is used for a time value.\n\n@param precision\nthe numeric precision\n@return a string representation of the precision"
] | [
"Convert a Throwable into a list containing all of its causes.\n@param t The throwable for which the causes are to be returned.\n@return A (possibly empty) list of {@link Throwable}s.",
"Stops all servers linked with the current camel context\n\n@param camelContext",
"Draws the specified image with the first rectangle's bounds, clipping with the second one.\n\n@param img image\n@param rect rectangle\n@param clipRect clipping bounds\n@param opacity opacity of the image (1 = opaque, 0= transparent)",
"Use this API to fetch all the lbvserver resources that are configured on netscaler.",
"Detects if the current browser is a BlackBerry device AND\nhas a more capable recent browser. Excludes the Playbook.\nExamples, Storm, Bold, Tour, Curve2\nExcludes the new BlackBerry OS 6 and 7 browser!!\n@return detection of a Blackberry device with a better browser",
"Closes the server socket. No new clients are accepted afterwards.",
"Read data from the table. Return a reference to the current\ninstance to allow method chaining.\n\n@return reader instance",
"Update the given resource in the persistent configuration model based on the values in the given operation.\n\n@param operation the operation\n@param resource the resource that corresponds to the address of {@code operation}\n\n@throws OperationFailedException if {@code operation} is invalid or populating the model otherwise fails",
"Lists the buildpacks installed on an app\n\n@param appName See {@link #listApps} for a list of apps that can be used."
] |
public ConfigurableMessages getConfigurableMessages(CmsMessages defaultMessages, Locale locale) {
return new ConfigurableMessages(defaultMessages, locale, m_configuredBundle);
} | [
"Returns the configured bundle, or the provided default bundle.\n@param defaultMessages the default bundle\n@param locale the preferred locale\n@return the configured bundle or, if not found, the default bundle."
] | [
"Start unmarshalling using the parser.\n@param parser\n@param preProcessingData\n@return the root element of a bpmn2 document.\n@throws java.io.IOException",
"Binds the Identities Primary key values to the statement.",
"Delete the given file in a separate thread\n\n@param file The file to delete",
"Close the store.",
"Creates a new Logger instance for the specified name.",
"This method is used to change the credentials of CleverTap account Id and token programmatically\n@param accountID CleverTap Account Id\n@param token CleverTap Account Token",
"Convert an Object of type Class to an Object.",
"Makes a CRFDatum by producing features and a label from input data at a\nspecific position, using the provided factory.\n\n@param info\nThe input data\n@param loc\nThe position to build a datum at\n@param featureFactory\nThe FeatureFactory to use to extract features\n@return The constructed CRFDatum",
"Set the name to be used in announcing our presence on the network. The name can be no longer than twenty\nbytes, and should be normal ASCII, no Unicode.\n\n@param name the device name to report in our presence announcement packets."
] |
public static base_responses kill(nitro_service client, systemsession resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
systemsession killresources[] = new systemsession[resources.length];
for (int i=0;i<resources.length;i++){
killresources[i] = new systemsession();
killresources[i].sid = resources[i].sid;
killresources[i].all = resources[i].all;
}
result = perform_operation_bulk_request(client, killresources,"kill");
}
return result;
} | [
"Use this API to kill systemsession resources."
] | [
"Use this API to fetch nssimpleacl resources of given names .",
"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.",
"Returns a copy of this year-week with the new year and week, checking\nto see if a new object is in fact required.\n\n@param newYear the year to represent, validated from MIN_YEAR to MAX_YEAR\n@param newWeek the week to represent, validated from 1 to 53\n@return the year-week, not null",
"Checks attributes for rejection\n\n@param rejectedAttributes gathers information about failed attributes\n@param attributeValue the attribute value",
"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",
"Returns the complete project record for a single project.\n\n@param project The project to get.\n@return Request object",
"Allows testsuites to shorten the domain timeout adder",
"This method retrieves a String of the specified type,\nbelonging to the item with the specified unique ID.\n\n@param id unique ID of entity to which this data belongs\n@param type data type identifier\n@return string containing required data",
"Sets the HTML entity translator.\nIt will also remove any other translator set.\nNothing will happen if the argument is null.\n@param htmlElementTranslator translator"
] |
private String escapeString(String value)
{
m_buffer.setLength(0);
m_buffer.append('"');
for (int index = 0; index < value.length(); index++)
{
char c = value.charAt(index);
switch (c)
{
case '"':
{
m_buffer.append("\\\"");
break;
}
case '\\':
{
m_buffer.append("\\\\");
break;
}
case '/':
{
m_buffer.append("\\/");
break;
}
case '\b':
{
m_buffer.append("\\b");
break;
}
case '\f':
{
m_buffer.append("\\f");
break;
}
case '\n':
{
m_buffer.append("\\n");
break;
}
case '\r':
{
m_buffer.append("\\r");
break;
}
case '\t':
{
m_buffer.append("\\t");
break;
}
default:
{
// Append if it's not a control character (0x00 to 0x1f)
if (c > 0x1f)
{
m_buffer.append(c);
}
break;
}
}
}
m_buffer.append('"');
return m_buffer.toString();
} | [
"Escape text to ensure valid JSON.\n\n@param value value\n@return escaped value"
] | [
"Returns the index of the eigenvalue which has the smallest magnitude.\n\n@return index of the smallest magnitude eigen value.",
"Apply content type to response with result provided.\n\nIf `result` is an error then it might not apply content type as requested:\n* If request is not ajax request, then use `text/html`\n* If request is ajax request then apply requested content type only when `json` or `xml` is requested\n* otherwise use `text/html`\n\n@param result\nthe result used to check if it is error result\n@return this `ActionContext`.",
"Performs any needed operation on subreports after they are built like ensuring proper subreport with\nif \"fitToParentPrintableArea\" flag is set to true\n\n@param dr\n@param _parameters\n@throws JRException",
"Request the list of all tracks in the specified slot, given a dbserver connection to a player that has already\nbeen set up.\n\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 track list entry items\n\n@throws IOException if there is a communication problem\n@throws InterruptedException if the thread is interrupted while trying to lock the client for menu operations\n@throws TimeoutException if we are unable to lock the client for menu operations",
"Crop the image between two points.\n\n@param top Top bound.\n@param left Left bound.\n@param bottom Bottom bound.\n@param right Right bound.\n@throws IllegalArgumentException if {@code top} or {@code left} are less than zero or {@code\nbottom} or {@code right} are less than one or less than {@code top} or {@code left},\nrespectively.",
"Zeros an inner rectangle inside the matrix.\n\n@param A Matrix that is to be modified.\n@param row0 Start row.\n@param row1 Stop row+1.\n@param col0 Start column.\n@param col1 Stop column+1.",
"Unregister the mbean with the given name, if there is one registered\n\n@param name The mbean name to unregister\n@see #registerMBean(Object, String)",
"Gets a design document using the id and revision from the database.\n\n@param id the document id (optionally prefixed with \"_design/\")\n@param rev the document revision\n@return {@link DesignDocument}",
"Constructs a new FastEvent instance\n@param type the event type\n@param manager the bean manager\n@param notifier the notifier to be used for observer method resolution\n@param qualifiers the event qualifiers\n@return"
] |
private void normalizeSelectedCategories() {
Collection<String> normalizedCategories = new ArrayList<String>(m_selectedCategories.size());
for (CmsTreeItem item : m_categories.values()) {
if (item.getCheckBox().isChecked()) {
normalizedCategories.add(item.getId());
}
}
m_selectedCategories = normalizedCategories;
} | [
"Normalize the list of selected categories to fit for the ids of the tree items."
] | [
"Delete the proxy history for the active profile\n\n@throws Exception exception",
"Use this API to fetch appfwprofile_safeobject_binding resources of given name .",
"Execute a Runnable on a thread pool thread\n\n@param priority\nThe thread priority. Be careful with this! <blockquote>\n<b>Note:</b> Use Thread.MIN_PRIORITY..Thread.MAX_PRIORITY\n(1..10), <b>not</b> the Process/Linux -20..19 range!\n</blockquote>\n@param threadProc\nThe code to run. It doesn't matter if this code never returns\n- by using spawn (and, hence the thread pool) there is at\nleast a chance that you will be reusing a thread, thus saving\nteardown/startup costs.\n\n@return A Future<?> that lets you wait for thread completion, if\nnecessary",
"Use this API to update rsskeytype.",
"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",
"Returns an iterator of all direct and indirect extents of this class.\n\n@return The extents iterator",
"appends a WHERE-clause to the Statement\n@param where\n@param crit\n@param stmt",
"convert Event bean to EventType manually.\n\n@param event the event\n@return the event type",
"Sets the options contained in the DJCrosstab to the JRDesignCrosstab.\nAlso fits the correct width"
] |
public ItemRequest<Task> update(String task) {
String path = String.format("/tasks/%s", task);
return new ItemRequest<Task>(this, Task.class, path, "PUT");
} | [
"A specific, existing task can be updated by making a PUT request on the\nURL for that task. Only the fields provided in the `data` block will be\nupdated; any unspecified fields will remain unchanged.\n\nWhen using this method, it is best to specify only those fields you wish\nto change, or else you may overwrite changes made by another user since\nyou last retrieved the task.\n\nReturns the complete updated task record.\n\n@param task The task to update.\n@return Request object"
] | [
"Exceptions specific to each operation is handled in the corresponding\nsubclass. At this point we don't know the reason behind this exception.\n\n@param exception",
"Implements get by delegating to getAll.",
"Polls the next ParsedWord from the stack.\n\n@return next ParsedWord",
"Get transformer to use.\n\n@return transformation to apply",
"Checks to see if a valid deployment parameter has been defined.\n\n@param operation the operation to check.\n\n@return {@code true} of the parameter is valid, otherwise {@code false}.",
"Gets the prefix from value.\n\n@param value the value\n@return the prefix from value",
"Try to obtain the value that is cached for the given key in the given resource.\nIf no value is cached, the provider is used to compute it and store it afterwards.\n@param resource the resource. If it is <code>null</code>, the provider will be used to compute the value.\n@param key the cache key. May not be <code>null</code>.\n@param provider the strategy to compute the value if necessary. May not be <code>null</code>.",
"Initialize the ui elements for the management part.",
"Finds a child resource with the given key.\n\n@param key the child resource key\n@return null if no child resource exists with the given name else the child resource"
] |
public void setColorForTotal(int row, int column, Color color){
int mapC = (colors.length-1) - column;
int mapR = (colors[0].length-1) - row;
colors[mapC][mapR]=color;
} | [
"Sets the color for the big total between the column and row\n@param row row index (starting from 1)\n@param column column index (starting from 1)\n@param color"
] | [
"Sobel method to generate bump map from a height map\n\n@param input - A height map\n@return bump map",
"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.",
"Get the element at the index as a json object.\n\n@param i the index of the object to access",
"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",
"Overloads the left shift operator to provide an easy way to append multiple\nobjects as string representations to a String.\n\n@param self a String\n@param value an Object\n@return a StringBuffer built from this string\n@since 1.0",
"Performs a partial BFS on model until the search frontier reaches the desired bootstrap size\n\n@param min the desired bootstrap size\n@return a list of found PossibleState\n@throws ModelException if the desired bootstrap can not be reached",
"Creates a general purpose solver. Use this if you are not sure what you need.\n\n@param numRows The number of rows that the decomposition is optimized for.\n@param numCols The number of columns that the decomposition is optimized for.",
"Creates a new Product in Grapes database\n\n@param dbProduct DbProduct",
"Use this API to delete application."
] |
public RemoteMongoCollection<Document> getCollection(final String collectionName) {
return new RemoteMongoCollectionImpl<>(proxy.getCollection(collectionName), dispatcher);
} | [
"Gets a collection.\n\n@param collectionName the name of the collection to return\n@return the collection"
] | [
"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",
"Parses the resource String id and get back the int res id\n@param context\n@param id String resource id\n@return int resource id",
"Get an exception reporting an unexpected end tag for an XML element.\n@param reader the stream reader\n@return the exception",
"Use this API to export sslfipskey.",
"Returns the metallic factor for PBR shading",
"Remove paths with no active overrides\n\n@throws Exception",
"Given the current cluster and a zone id that needs to be dropped, this\nmethod will remove all partitions from the zone that is being dropped and\nmove it to the existing zones. The partitions are moved intelligently so\nas not to avoid any data movement in the existing zones.\n\nThis is achieved by moving the partitions to nodes in the surviving zones\nthat is zone-nry to that partition in the surviving zone.\n\n@param currentCluster Current cluster metadata\n@return Returns an interim cluster with empty partition lists on the\nnodes from the zone being dropped",
"Use this API to link sslcertkey.",
"only TOP or Bottom"
] |
public static lbvserver_rewritepolicy_binding[] get(nitro_service service, String name) throws Exception{
lbvserver_rewritepolicy_binding obj = new lbvserver_rewritepolicy_binding();
obj.set_name(name);
lbvserver_rewritepolicy_binding response[] = (lbvserver_rewritepolicy_binding[]) obj.get_resources(service);
return response;
} | [
"Use this API to fetch lbvserver_rewritepolicy_binding resources of given name ."
] | [
"Returns the next object in the table.\n\n@throws IllegalStateException\nIf there was a problem extracting the object from SQL.",
"Retrieve a duration in the form required by Primavera.\n\n@param duration Duration instance\n@return formatted duration",
"Try Oracle update batching and call sendBatch or revert to\nJDBC update batching.\n@param stmt the batched prepared statement about to be executed\n@return always <code>null</code> if Oracle update batching is used,\nsince it is impossible to dissolve total row count into distinct\nstatement counts. If JDBC update batching is used, an int array is\nreturned containing number of updated rows for each batched statement.\n@throws PlatformException upon JDBC failure",
"Generates the context diagram for a single class",
"Returns the mode in the Collection. If the Collection has multiple modes, this method picks one\narbitrarily.",
"Searches the type and its sub types for the nearest ojb-persistent type and returns its name.\n\n@param type The type to search\n@return The qualified name of the found type or <code>null</code> if no type has been found",
"Obtains a International Fixed zoned date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the International Fixed zoned date-time, not null\n@throws DateTimeException if unable to create the date-time",
"Gets the Json Array representation of the given list of strings.\n@param keys List of strings\n@return the JsonArray represents the list of keys",
"Create the grid feature type.\n\n@param mapContext the map context containing the information about the map the grid will be\nadded to.\n@param geomClass the geometry type"
] |
@Override public void setModel(TableModel model)
{
super.setModel(model);
int columns = model.getColumnCount();
TableColumnModel tableColumnModel = getColumnModel();
for (int index = 0; index < columns; index++)
{
tableColumnModel.getColumn(index).setPreferredWidth(m_columnWidth);
}
} | [
"Updates the model. Ensures that we reset the columns widths.\n\n@param model table model"
] | [
"Use this API to fetch appflowpolicy_appflowglobal_binding resources of given name .",
"Get upload status for the currently authenticated user.\n\nRequires authentication with 'read' permission using the new authentication API.\n\n@return A User object with upload status data fields filled\n@throws FlickrException",
"Use this API to kill systemsession resources.",
"Get the hours difference",
"Prepare a parallel HTTP POST Task.\n\n@param url\nthe UrlPostfix: e.g. in http://localhost:8080/index.html.,the url is \"/index.html\"\n@return the parallel task builder",
"Used by FreeStyle Maven jobs only",
"Process StepStartedEvent. New step will be created and added to\nstepStorage.\n\n@param event to process",
"Creates a ProjectCalendar instance from the Asta data.\n\n@param calendarRow basic calendar data\n@param workPatternMap work pattern map\n@param workPatternAssignmentMap work pattern assignment map\n@param exceptionAssignmentMap exception assignment map\n@param timeEntryMap time entry map\n@param exceptionTypeMap exception type map",
"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"
] |
@Inline(value = "$1.putAll($2)", statementExpression = true)
public static <K, V> void operator_add(Map<K, V> outputMap, Map<? extends K, ? extends V> inputMap) {
outputMap.putAll(inputMap);
} | [
"Add the given entries of the input map into the output map.\n\n<p>\nIf a key in the inputMap already exists in the outputMap, its value is\nreplaced in the outputMap by the value from the inputMap.\n</p>\n\n@param <K> type of the map keys.\n@param <V> type of the map values.\n@param outputMap the map to update.\n@param inputMap the entries to add.\n@since 2.15"
] | [
"Processes the template for all column definitions of the current table.\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\"",
"Add the steal information to the rebalancer state\n\n@param stealInfo The steal information to add",
"Gets information about a trashed folder that's limited to a list of specified fields.\n@param folderID the ID of the trashed folder.\n@param fields the fields to retrieve.\n@return info about the trashed folder containing only the specified fields.",
"Polls from the provided URL and updates the polling state with the\npolling response.\n\n@param pollingState the polling state for the current operation.\n@param url the url to poll from\n@param <T> the return type of the caller.",
"If X == null then the solution is written into B. Otherwise the solution is copied\nfrom B into X.",
"Prepares this DAG for node enumeration using getNext method, each call to getNext returns next node\nin the DAG with no dependencies.",
"This method log given exception in specified listener",
"Generate a sql where-clause for the array of fields\n\n@param fields array containing all columns used in WHERE clause",
"Returns iterable containing assignments for this single legal hold policy.\n@param fields the fields to retrieve.\n@return an iterable containing assignments for this single legal hold policy."
] |
protected Element createPageElement()
{
String pstyle = "";
PDRectangle layout = getCurrentMediaBox();
if (layout != null)
{
/*System.out.println("x1 " + layout.getLowerLeftX());
System.out.println("y1 " + layout.getLowerLeftY());
System.out.println("x2 " + layout.getUpperRightX());
System.out.println("y2 " + layout.getUpperRightY());
System.out.println("rot " + pdpage.findRotation());*/
float w = layout.getWidth();
float h = layout.getHeight();
final int rot = pdpage.getRotation();
if (rot == 90 || rot == 270)
{
float x = w; w = h; h = x;
}
pstyle = "width:" + w + UNIT + ";" + "height:" + h + UNIT + ";";
pstyle += "overflow:hidden;";
}
else
log.warn("No media box found");
Element el = doc.createElement("div");
el.setAttribute("id", "page_" + (pagecnt++));
el.setAttribute("class", "page");
el.setAttribute("style", pstyle);
return el;
} | [
"Creates an element that represents a single page.\n@return the resulting DOM element"
] | [
"Get the bone index for the given scene object.\n\n@param bone GVRSceneObject bone to search for\n@return bone index or -1 for root bone.\n@see #getParentBoneIndex",
"Use this API to fetch all the appfwprofile resources that are configured on netscaler.",
"Upcasts a Builder instance to the generated superclass, to allow access to private fields.\n\n<p>Reuses an existing upcast instance if one was already declared in this scope.\n\n@param code the {@link SourceBuilder} to add the declaration to\n@param datatype metadata about the user type the builder is being generated for\n@param builder the Builder instance to upcast\n@returns a variable holding the upcasted instance",
"Utility method to retrieve the previous working date finish time, given\na date and time as a starting point.\n\n@param date date and time start point\n@return date and time of previous work finish",
"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",
"Sort MapRows based on a named attribute.\n\n@param rows map rows to sort\n@param attribute attribute to sort on\n@return list argument (allows method chaining)",
"Use this API to update sslocspresponder resources.",
"SuppressWarnings I really want to return HazeltaskTasks instead of Runnable",
"Convenience method to escape any character that is special to the regex system.\n\n@param inString\nthe string to fix\n\n@return the fixed string"
] |
public double getValue(int[] batch) {
double value = 0.0;
for (int i=0; i<batch.length; i++) {
value += getValue(i);
}
return value;
} | [
"Gets value of this function at the current point, computed on the given batch of examples.\n@param batch A set of indices indicating the examples over which the gradient should be computed.\n@return The value of the function at the point."
] | [
"Read task data from a Gantt Designer file.\n\n@param gantt Gantt Designer file",
"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",
"Performs a query to retrieve all the design documents defined in the database.\n\n@return a list of the design documents from the database\n@throws IOException if there was an error communicating with the server\n@since 2.5.0",
"Sets up and declares internal data structures.\n\n@param diag Diagonal elements from tridiagonal matrix. Modified.\n@param off Off diagonal elements from tridiagonal matrix. Modified.\n@param numCols number of columns (and rows) in the matrix.",
"Initializes data structures",
"Get a collection of Photo objects for the specified Photoset.\n\nThis method does not require authentication.\n\n@see com.flickr4java.flickr.photos.Extras\n@see com.flickr4java.flickr.Flickr#PRIVACY_LEVEL_NO_FILTER\n@see com.flickr4java.flickr.Flickr#PRIVACY_LEVEL_PUBLIC\n@see com.flickr4java.flickr.Flickr#PRIVACY_LEVEL_FRIENDS\n@see com.flickr4java.flickr.Flickr#PRIVACY_LEVEL_FRIENDS_FAMILY\n@see com.flickr4java.flickr.Flickr#PRIVACY_LEVEL_FAMILY\n@see com.flickr4java.flickr.Flickr#PRIVACY_LEVEL_FRIENDS\n@param photosetId\nThe photoset ID\n@param extras\nSet of extra-fields\n@param privacy_filter\nfilter value for authenticated calls\n@param perPage\nThe number of photos per page\n@param page\nThe page offset\n@return PhotoList The Collection of Photo objects\n@throws FlickrException",
"if any item in toCheck is present in collection\n@param <T>\n@param collection\n@param toCheck\n@return",
"Read resource baseline values.\n\n@param row result set row",
"Sets the value of the given variable\n\n@param name the name of the variable to set\n@param value the new value for the given variable"
] |
public void setValue(Vector3f scale) {
mX = scale.x;
mY = scale.y;
mZ = scale.z;
} | [
"Sets the scale vector of the keyframe."
] | [
"Call the Coverage Task.",
"Write exceptions in the format used by MSPDI files prior to Project 2007.\n\n@param dayList list of calendar days\n@param exceptions list of exceptions",
"Copies all available data from in to out without closing any stream.\n\n@return number of bytes copied",
"Downloads a part of this file's contents, starting at rangeStart and stopping at rangeEnd.\n\n@param output the stream to where the file will be written.\n@param rangeStart the byte offset at which to start the download.\n@param rangeEnd the byte offset at which to stop the download.",
"Sanity checks the input or declares a new matrix. Return matrix is an identity matrix.",
"Searches the variables layers, top to bottom, for given name, and returns if found; null otherwise.\n\nIf maxDepth is set to {@link Variables#SEARCH_ALL_LAYERS}, then search all layers.",
"is there a faster algorithm out there? This one is a bit sluggish",
"Recursively read the WBS structure from a PEP file.\n\n@param parent parent container for tasks\n@param id initial WBS ID",
"Converts an integer into a time format.\n\n@param format integer format value\n@return TimeUnit instance"
] |
void resizeArray(int newArraySize) {
long[] newArray = new long[newArraySize];
System.arraycopy(this.arrayOfBits, 0, newArray, 0,
Math.min(this.arrayOfBits.length, newArraySize));
this.arrayOfBits = newArray;
} | [
"Resizes the array that represents this bit vector.\n\n@param newArraySize\nnew array size"
] | [
"Extracts the column from the matrix a.\n@param a Input matrix\n@param column Which column is to be extracted\n@param out output. Storage for the extracted column. If null then a new vector will be returned.\n@return The extracted column.",
"Returns true if the activity is a start milestone.\n\n@param activity Phoenix activity\n@return true if the activity is a milestone",
"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.",
"Use this API to fetch authorizationpolicylabel_binding resource of given name .",
"Extract day type definitions.\n\n@param types Synchro day type rows\n@return Map of day types by UUID",
"Creates a new InternetPrintWriter for given charset encoding.\n\n@param outputStream the wrapped output stream.\n@param charset the charset.\n@return a new InternetPrintWriter.",
"Create and get actor system.\n\n@return the actor system",
"Prep for a new connection\n@return if stats are enabled, return the nanoTime when this connection was requested.\n@throws SQLException",
"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"
] |
public void convertToSparse() {
switch ( mat.getType() ) {
case DDRM: {
DMatrixSparseCSC m = new DMatrixSparseCSC(mat.getNumRows(), mat.getNumCols());
ConvertDMatrixStruct.convert((DMatrixRMaj) mat, m,0);
setMatrix(m);
} break;
case FDRM: {
FMatrixSparseCSC m = new FMatrixSparseCSC(mat.getNumRows(), mat.getNumCols());
ConvertFMatrixStruct.convert((FMatrixRMaj) mat, m,0);
setMatrix(m);
} break;
case DSCC:
case FSCC:
break;
default:
throw new RuntimeException("Conversion not supported!");
}
} | [
"Switches from a dense to sparse matrix"
] | [
"Entry point for the example.\n\n@param args Command-line arguments for the example. To use samplemachine.xml from resources, send\nno arguments. To use other file, send a filename without xml extension).",
"close the AdminPool, if no long required.\nAfter closed, all public methods will throw IllegalStateException",
"Reports a dependency of this node has been faulted.\n\n@param dependencyKey the id of the dependency node\n@param throwable the reason for unsuccessful resolution",
"Use this API to add sslocspresponder resources.",
"Returns a Span that covers all rows beginning with a prefix.",
"Write to a context. Uses NullWritable for key so that only value of output string is ultimately written\n\n@param cr the DataPipe to write to",
"Renames the current base log file to the roll file name.\n\n@param from\nThe current base log file.\n@param to\nThe backup file.",
"Get a list of topics from a group.\n\n@param groupId\nUnique identifier of a group returns a list of topics for a given group {@link Group}.\n@param perPage\nNumber of records per page.\n@param page\nResult-section.\n@return A group topic list\n@throws FlickrException\n@see <a href=\"http://www.flickr.com/services/api/flickr.groups.discuss.topics.getList.html\">API Documentation</a>",
"Retrieves state and metrics information for all channels on individual connection.\n@param connectionName the connection name to retrieve channels\n@return list of channels on the connection"
] |
protected void generateFile(File file,
String templateName,
VelocityContext context) throws Exception
{
Writer writer = new BufferedWriter(new FileWriter(file));
try
{
Velocity.mergeTemplate(classpathPrefix + templateName,
ENCODING,
context,
writer);
writer.flush();
}
finally
{
writer.close();
}
} | [
"Generate the specified output file by merging the specified\nVelocity template with the supplied context."
] | [
"Calls a function script associated with this component.\nThe function is called even if the component\nis not enabled and not attached to a scene object.\n@param funcName name of script function to call.\n@param args function parameters as an array of objects.\n@return true if function was called, false if no such function\n@see org.gearvrf.script.GVRScriptFile#invokeFunction(String, Object[]) invokeFunction",
"Convert an operation for deployment overlays to be executed on local servers.\nSince this might be called in the case of redeployment of affected deployments, we need to take into account\nthe composite op resulting from such a transformation\n@see AffectedDeploymentOverlay#redeployLinksAndTransformOperationForDomain\n@param operation\n@param host\n@return",
"Curries a procedure that takes five arguments.\n\n@param procedure\nthe original procedure. May not be <code>null</code>.\n@param argument\nthe fixed first argument of {@code procedure}.\n@return a procedure that takes four arguments. Never <code>null</code>.",
"Sends a dummy statement to the server to keep the connection alive\n@param connection Connection handle to perform activity on\n@return true if test query worked, false otherwise",
"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 immutable map. A copy of the given map is used. As a result, it is safe to modify the source map afterwards.\n\n@param map the given map\n@return an immutable map",
"Return a replica of this instance with the quality value of the given MediaType.\n@return the same instance if the given MediaType doesn't have a quality value, or a new one otherwise",
"Computes the final list of versions to be stored, on top of what is\ncurrently being stored. Final list is valuesInStorage modified in place\n\n\n@param valuesInStorage list of versions currently in storage\n@param multiPutValues list of new versions being written to storage\n@return list of versions from multiPutVals that were rejected as obsolete",
"Populate a resource assignment.\n\n@param record MPX record\n@param assignment resource assignment\n@throws MPXJException"
] |
protected void writeBody(HttpURLConnection connection, ProgressListener listener) {
if (this.body == null) {
return;
}
connection.setDoOutput(true);
try {
OutputStream output = connection.getOutputStream();
if (listener != null) {
output = new ProgressOutputStream(output, listener, this.bodyLength);
}
int b = this.body.read();
while (b != -1) {
output.write(b);
b = this.body.read();
}
output.close();
} catch (IOException e) {
throw new BoxAPIException("Couldn't connect to the Box API due to a network error.", e);
}
} | [
"Writes the body of this request to an HttpURLConnection.\n\n<p>Subclasses overriding this method must remember to close the connection's OutputStream after writing.</p>\n\n@param connection the connection to which the body should be written.\n@param listener an optional listener for monitoring the write progress.\n@throws BoxAPIException if an error occurs while writing to the connection."
] | [
"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.",
"Assigns retention policy with givenID to the folder.\n@param api the API connection to be used by the created assignment.\n@param policyID id of the assigned retention policy.\n@param folderID id of the folder to assign policy to.\n@return info about created assignment.",
"This produces a string with no compressed segments and all segments of full length,\nwhich is 3 characters for IPv4 segments.",
"Use this API to fetch nssimpleacl resource of given name .",
"Use this API to fetch all the inatparam resources that are configured on netscaler.",
"Appends formatted text to the source.\n\n<p>Formatting supports {@code %s} and {@code %n$s}. Most args are converted according to their\n{@link Object#toString()} method, except that:<ul>\n<li> {@link Package} and {@link PackageElement} instances use their fully-qualified names\n(no \"package \" prefix).\n<li> {@link Class}, {@link TypeElement}, {@link DeclaredType} and {@link QualifiedName}\ninstances use their qualified names where necessary, or shorter versions if a suitable\nimport line can be added.\n<li> {@link Excerpt} instances have {@link Excerpt#addTo(SourceBuilder)} called.\n</ul>",
"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",
"Generate a placeholder for an unknown type.\n\n@param type expected type\n@param fieldID field ID\n@return placeholder",
"Parses int value and returns the provided default if the value can't be parsed.\n@param value the int to parse.\n@param defaultValue the default value.\n@return the parsed int, or the default value if parsing fails."
] |
private boolean isSecuredByProperty(Server server) {
boolean isSecured = false;
Object value = server.getEndpoint().get("org.talend.tesb.endpoint.secured"); //Property name TBD
if (value instanceof String) {
try {
isSecured = Boolean.valueOf((String) value);
} catch (Exception ex) {
}
}
return isSecured;
} | [
"Is the transport secured by a JAX-WS property"
] | [
"Override this method to change the default splash screen size or\nposition.\n\nThis method will be called <em>before</em> {@link #onInit(GVRContext)\nonInit()} and before the normal render pipeline starts up. In particular,\nthis means that any {@linkplain GVRAnimation animations} will not start\nuntil the first {@link #onStep()} and normal rendering starts.\n\n@param splashScreen\nThe splash object created from\n{@link #getSplashTexture(GVRContext)},\n{@link #getSplashMesh(GVRContext)}, and\n{@link #getSplashShader(GVRContext)}.\n\n@since 1.6.4",
"Add an individual class to the map file.\n\n@param loader jar file class loader\n@param jarEntry jar file entry\n@param writer XML stream writer\n@param mapClassMethods true if we want to produce .Net style class method names\n@throws ClassNotFoundException\n@throws XMLStreamException\n@throws IntrospectionException",
"Search for interesting photos using the Flickr Interestingness algorithm.\n\n@param params\nAny search parameters\n@param perPage\nNumber of items per page\n@param page\nThe page to start on\n@return A PhotoList\n@throws FlickrException",
"Returns list of files matches specified regex in specified directories\n\n@param regex to match file names\n@param directories to find\n@return list of files matches specified regex in specified directories",
"Use this API to fetch all the vrid6 resources that are configured on netscaler.",
"Use this API to update sslparameter.",
"Determine if the exception is relative based on the recurrence type integer value.\n\n@param value integer value\n@return true if the recurrence is relative",
"Merge the two maps.\n\n<p>\nThe replied map is a view on the given map. It means that any change\nin the original map is reflected to the result of this operation.\n</p>\n\n<p>\nIf a key exists in the left and right operands, the value in the right operand is preferred.\n</p>\n\n@param <K> type of the map keys.\n@param <V> type of the map values.\n@param left the left map.\n@param right the right map.\n@return a map with the merged contents from the two maps.\n@throws IllegalArgumentException - when a right operand key exists in the left operand.\n@since 2.15",
"Sets the CircularImageView's border width in pixels.\n@param borderWidth Width in pixels for the border."
] |
public final static String process(final String input, final Configuration configuration)
{
try
{
return process(new StringReader(input), configuration);
}
catch (final IOException e)
{
// This _can never_ happen
return null;
}
} | [
"Transforms an input String into HTML using the given Configuration.\n\n@param input\nThe String to process.\n@param configuration\nThe Configuration.\n@return The processed String.\n@since 0.7\n@see Configuration"
] | [
"Use this API to enable snmpalarm of given name.",
"Creates an instance of a NewEnterpriseBean from an annotated class\n\n@param clazz The annotated class\n@param beanManager The Bean manager\n@return a new NewEnterpriseBean instance",
"Inserts a vertex into this list before another specificed vertex.",
"Checks if a given number is in the range of a short.\n\n@param number\na number which should be in the range of a short (positive or negative)\n\n@see java.lang.Short#MIN_VALUE\n@see java.lang.Short#MAX_VALUE\n\n@return number as a short (rounding might occur)",
"Use this API to fetch all the sslciphersuite resources that are configured on netscaler.",
"Resets all override settings for the clientUUID and disables it\n\n@param profileId profile ID of the client\n@param clientUUID UUID of the client\n@throws Exception exception",
"Runs a Story with the given steps factory, applying the given meta\nfilter, and staring from given state.\n\n@param configuration the Configuration used to run story\n@param stepsFactory the InjectableStepsFactory used to created the\ncandidate steps methods\n@param story the Story to run\n@param filter the Filter to apply to the story Meta\n@param beforeStories the State before running any of the stories, if not\n<code>null</code>\n\n@throws Throwable if failures occurred and FailureStrategy dictates it to\nbe re-thrown.",
"Function to perform backward pooling",
"Send a channels on-air update to all registered listeners.\n\n@param audibleChannels holds the device numbers of all channels that can currently be heard in the mixer output"
] |
public static byte[] concat(Bytes... listOfBytes) {
int offset = 0;
int size = 0;
for (Bytes b : listOfBytes) {
size += b.length() + checkVlen(b.length());
}
byte[] data = new byte[size];
for (Bytes b : listOfBytes) {
offset = writeVint(data, offset, b.length());
b.copyTo(0, b.length(), data, offset);
offset += b.length();
}
return data;
} | [
"Concatenates of list of Bytes objects to create a byte array\n\n@param listOfBytes Bytes objects to concatenate\n@return Bytes"
] | [
"Checks if the method being invoked should be wrapped by a service.\nIt looks the method name up in the methodList. If its in the list, then\nthe method should be wrapped. If the list is null, then all methods\nare wrapped.\n\n@param methodName The method being called\n\n@return boolean",
"Returns the screen width in pixels\n\n@param context is the context to get the resources\n@return the screen width in pixels",
"Reverse how the transition is applied, such that the transition previously performed when progress=start of range is only performed when progress=end of range\n\n@return",
"Populate time ranges.\n\n@param ranges time ranges from a Synchro table\n@param container time range container",
"creates a shape list containing all child shapes and set it to the\ncurrent shape new shape get added to the shape array\n@param shapes\n@param modelJSON\n@param current\n@throws org.json.JSONException",
"Sort MapRows based on a named attribute.\n\n@param rows map rows to sort\n@param attribute attribute to sort on\n@return list argument (allows method chaining)",
"get TypeSignature given the signature\n\n@param typeSignature\n@param useInternalFormFullyQualifiedName\nif true, fqn in parameterizedTypeSignature must be in the form\n'java/lang/Thread'. If false fqn must be of the form\n'java.lang.Thread'\n@return",
"Adds the word.\n\n@param w the w\n@throws ParseException the parse exception",
"Returns the zip entry for a file in the archive.\n@param filename the file name\n@return the zip entry for the file with the provided name\n@throws ZipException thrown if the file is not in the zip archive"
] |
public Object invokeOperation(Map<String, String[]> parameterMap) throws JMException {
MBeanParameterInfo[] parameterInfoArray = operationInfo.getSignature();
Object[] values = new Object[parameterInfoArray.length];
String[] types = new String[parameterInfoArray.length];
MBeanValueConverter valueConverter = createMBeanValueConverter(parameterMap);
for (int parameterNum = 0; parameterNum < parameterInfoArray.length; parameterNum++) {
MBeanParameterInfo parameterInfo = parameterInfoArray[parameterNum];
String type = parameterInfo.getType();
types[parameterNum] = type;
values[parameterNum] = valueConverter.convertParameterValue(parameterInfo.getName(), type);
}
return mBeanServer.invoke(objectName, operationInfo.getName(), values, types);
} | [
"Invoke the operation.\n@param parameterMap the {@link Map} of parameter names to value arrays.\n@return the {@link Object} return value from the operation.\n@throws JMException Java Management Exception"
] | [
"Returns the error correction codewords for the specified data codewords.\n\n@param codewords the codewords that we need error correction codewords for\n@param ecclen the number of error correction codewords needed\n@return the error correction codewords for the specified data codewords",
"Creates the database.\n\n@throws PlatformException If some error occurred",
"Reads the categories assigned to a resource.\n\n@return map from the resource path (root path) to the assigned categories",
"Use this API to update vpnclientlessaccesspolicy.",
"Returns the value of the identified field as a String.\n@param fieldName the name of the field\n@return the value of the field as a String",
"Test whether the operation has a defined criteria attribute.\n\n@param operation the operation\n@return",
"Returns an iterator over the items in this folder.\n\n@return an iterator over the items in this folder.",
"Invokes the observer method immediately passing the event.\n\n@param event The event to notify observer with",
"Process the hours and exceptions for an individual calendar.\n\n@param calendar project calendar\n@param calendarData hours and exception rows for this calendar"
] |
public void swapSubstring(BitString other, int start, int length)
{
assertValidIndex(start);
other.assertValidIndex(start);
int word = start / WORD_LENGTH;
int partialWordSize = (WORD_LENGTH - start) % WORD_LENGTH;
if (partialWordSize > 0)
{
swapBits(other, word, 0xFFFFFFFF << (WORD_LENGTH - partialWordSize));
++word;
}
int remainingBits = length - partialWordSize;
int stop = remainingBits / WORD_LENGTH;
for (int i = word; i < stop; i++)
{
int temp = data[i];
data[i] = other.data[i];
other.data[i] = temp;
}
remainingBits %= WORD_LENGTH;
if (remainingBits > 0)
{
swapBits(other, word, 0xFFFFFFFF >>> (WORD_LENGTH - remainingBits));
}
} | [
"An efficient method for exchanging data between two bit strings. Both bit strings must\nbe long enough that they contain the full length of the specified substring.\n@param other The bitstring with which this bitstring should swap bits.\n@param start The start position for the substrings to be exchanged. All bit\nindices are big-endian, which means position 0 is the rightmost bit.\n@param length The number of contiguous bits to swap."
] | [
"Get the primitive attributes for the associated object.\n\n@return attributes for associated objects\n@deprecated replaced by {@link #getAllAttributes()} after introduction of nested associations",
"Adds another scene object to pick against.\nEach frame all the colliders in the scene will be compared\nagainst the bounding volumes of all the collidables associated\nwith this picker.\n@param sceneObj new collidable\n@return index of collidable added, this is the CursorID in the GVRPickedObject",
"This method recursively descends the directory structure, dumping\ndetails of any files it finds to the output file.\n\n@param pw Output PrintWriter\n@param dir DirectoryEntry to dump\n@param prefix prefix used to identify path to this object\n@param showData flag indicating if data is dumped, or just structure\n@param hex set to true if hex output is required\n@param indent indent used if displaying structure only\n@throws Exception Thrown on file read errors",
"Obtains a local date in Discordian calendar system from the\nera, year-of-era and day-of-year fields.\n\n@param era the Discordian era, not null\n@param yearOfEra the year-of-era\n@param dayOfYear the day-of-year\n@return the Discordian local date, not null\n@throws DateTimeException if unable to create the date\n@throws ClassCastException if the {@code era} is not a {@code DiscordianEra}",
"Set a knot color.\n@param n the knot index\n@param color the color",
"This internal method is used to convert from a Date instance to an\ninteger representing the number of minutes past midnight.\n\n@param date date instance\n@return minutes past midnight as an integer",
"If converters are set on a table, this function tests if these can convert a cell value. The first\nconverter, which claims that it can convert, will be used to do the conversion.",
"Returns a lazily generated map from site paths of resources to the available locales for the resource.\n\n@return a lazily generated map from site paths of resources to the available locales for the resource.",
"Creates the automata.\n\n@param prefix the prefix\n@param regexp the regexp\n@param automatonMap the automaton map\n@return the list\n@throws IOException Signals that an I/O exception has occurred."
] |
private void handleTextWebSocketFrameInternal(TextWebSocketFrame frame, ChannelHandlerContext ctx) {
if (logger.isTraceEnabled()) {
logger.trace(String.format("%s received %s", ctx.channel(), frame.text()));
}
addTraceForFrame(frame, "text");
ctx.channel().write(new TextWebSocketFrame("Echo: " + frame.text()));
} | [
"simple echo implementation"
] | [
"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",
"gets a class from the class cache. This cache contains only classes loaded through\nthis class loader or an InnerLoader instance. If no class is stored for a\nspecific name, then the method should return null.\n\n@param name of the class\n@return the class stored for the given name\n@see #removeClassCacheEntry(String)\n@see #setClassCacheEntry(Class)\n@see #clearCache()",
"This method generates a list of lists. Each list represents the data\nfor an embedded object, and contains set set of RTFEmbeddedObject instances\nthat make up the embedded object. This method will return null\nif there are no embedded objects in the RTF document.\n\n@param text RTF document\n@return list of lists of RTFEmbeddedObject instances",
"Reads a single byte from the input stream.",
"Issue the database statements to drop the table associated with a dao.\n\n@param dao\nAssociated dao.\n@return The number of statements executed to do so.",
"Use this API to update onlinkipv6prefix.",
"Add an event to the queue. It will be processed in the order received.\n\n@param event Event",
"joins a collection of objects together as a String using a separator",
"a small static helper to set the color to a GradientDrawable null save\n\n@param colorHolder\n@param ctx\n@param gradientDrawable"
] |
public ParallelTaskBuilder setSshPrivKeyRelativePathWtihPassphrase(
String privKeyRelativePath, String passphrase) {
this.sshMeta.setPrivKeyRelativePath(privKeyRelativePath);
this.sshMeta.setPrivKeyUsePassphrase(true);
this.sshMeta.setPassphrase(passphrase);
this.sshMeta.setSshLoginType(SshLoginType.KEY);
return this;
} | [
"Sets the ssh priv key relative path wtih passphrase.\n\n@param privKeyRelativePath the priv key relative path\n@param passphrase the passphrase\n@return the parallel task builder"
] | [
"When it is time to actually close a client, do so, and clean up the related data structures.\n\n@param client the client which has been idle for long enough to be closed",
"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.",
"Clones the given collection.\n\n@param collDef The collection descriptor\n@param prefix A prefix for the name\n@return The cloned collection",
"convert selector used in an upsert statement into a document",
"Returns the value of the specified matrix element. Performs a bounds check to make sure\nthe requested element is part of the matrix.\n\n@param row The row of the element.\n@param col The column of the element.\n@return The value of the element.",
"When creating barcode columns\n@return",
"Adds an additional label to the constructed document.\n\n@param text\nthe text of the label\n@param languageCode\nthe language code of the label\n@return builder object to continue construction",
"Add additional source types",
"Given the histogram of columns compute the col_idx for the matrix. nz_length is automatically set and\nnz_values will grow if needed.\n@param histogram histogram of column values in the sparse matrix. modified, see above."
] |
public AbstractSqlCreator setParameter(String name, Object value) {
ppsc.setParameter(name, value);
return this;
} | [
"Sets a parameter for the creator."
] | [
"Get the art available for all tracks currently loaded in any player, either on the play deck, or in a hot cue.\n\n@return the album art associated with all current players, including for any tracks loaded in their hot cue slots\n\n@throws IllegalStateException if the ArtFinder is not running",
"This configuration requires that all your tasks you submit to the system implement\nthe Groupable interface. By default, it will round robin tasks from each group\n\nTasks will be tracked internally in the system by randomly generated UUIDs\n\n@return",
"Extract resource provider from a resource ID string.\n@param id the resource ID string\n@return the resource group name",
"Multiply scalar value to a complex number.\n\n@param z1 Complex Number.\n@param scalar Scalar value.\n@return Returns new ComplexNumber instance containing the multiply of specified complex number with the scalar value.",
"Entry point for processing filter definitions.\n\n@param properties project properties\n@param filters project filters\n@param fixedData filter fixed data\n@param varData filter var data",
"Convert this buffer to a java array.\n@return",
"Overridden to do only the clean-part of the linking but not\nthe actual linking. This is deferred until someone wants to access\nthe content of the resource.",
"Extract the outline level from a task's WBS attribute.\n\n@param task Task instance\n@return outline level",
"Reverses a sequence of elements.\n@param array Array containing the sequence\n@param first Beginning of the range\n@param last One past the end of the range\n@exception ArrayIndexOutOfBoundsException If the range\nis invalid."
] |
public synchronized GeoInterface getGeoInterface() {
if (geoInterface == null) {
geoInterface = new GeoInterface(apiKey, sharedSecret, transport);
}
return geoInterface;
} | [
"Get the geo interface.\n\n@return Access class to the flickr.photos.geo methods."
] | [
"Utility function to find the first index of a value in a\nListBox.",
"Checks if a given number is in the range of an integer.\n\n@param number\na number which should be in the range of an integer (positive or negative)\n\n@see java.lang.Integer#MIN_VALUE\n@see java.lang.Integer#MAX_VALUE\n\n@return number as an integer (rounding might occur)",
"Read leaf tasks attached to the WBS.\n\n@param id initial WBS ID",
"Create a BoxStoragePolicyAssignment for a BoxStoragePolicy.\n@param api the API connection to be used by the resource.\n@param policyID the policy ID of the BoxStoragePolicy.\n@param userID the user ID of the to assign the BoxStoragePolicy to.\n@return the information about the BoxStoragePolicyAssignment created.",
"to do with XmlId value being strictly of type 'String'",
"Validates for non-conflicting roles",
"Used by FreeStyle Maven jobs only",
"Instantiates the templates specified by @Template within @Templates",
"Use this API to enable clusterinstance resources of given names."
] |
@Override
protected boolean changeDirection(int currentIndex, int centerIndex, boolean inBounds) {
boolean changed = false;
if (getGravityInternal() == Gravity.CENTER &&
currentIndex <= centerIndex &&
currentIndex == 0 || !inBounds) {
changed = true;
}
return changed;
} | [
"<<<<<< measureUntilFull helper methods"
] | [
"The parameter must never be null\n\n@param queryParameters",
"Sets the day of the month.\n@param day the day to set.",
"Converts from partitionId to nodeId. The list of partition IDs,\npartitionIds, is expected to be a \"replicating partition list\", i.e., the\nmapping from partition ID to node ID should be one to one.\n\n@param partitionIds List of partition IDs for which to find the Node ID\nfor the Node that owns the partition.\n@return List of node ids, one for each partition ID in partitionIds\n@throws VoldemortException If multiple partition IDs in partitionIds map\nto the same Node ID.",
"Computes the p=2 norm. If A is a matrix then the induced norm is computed.\n\n@param A Matrix or vector.\n@return The norm.",
"Wait until a scan of the table completes without seeing notifications AND without the Oracle\nissuing any timestamps during the scan.",
"Determine if the start of the buffer matches a fingerprint byte array.\n\n@param buffer bytes from file\n@param fingerprint fingerprint bytes\n@return true if the file matches the fingerprint",
"Performs the actual spell check query using Solr.\n\n@param request the spell check request\n\n@return Results of the Solr spell check of type SpellCheckResponse or null if something goes wrong.",
"Mapping originator.\n\n@param originator the originator\n@return the originator type",
"adds a CmsJspImageBean as hi-DPI variant to this image\n@param factor the variant multiplier, e.g. \"2x\" (the common retina multiplier)\n@param image the image to be used for this variant"
] |
public Object lookup(Identity oid)
{
Object ret = null;
if (oid != null)
{
ObjectCache cache = getCache(oid, null, METHOD_LOOKUP);
if (cache != null)
{
ret = cache.lookup(oid);
}
}
return ret;
} | [
"Looks up the object from the cache\n\n@param oid The Identity to look up the object for\n@return The object if found, otherwise null"
] | [
"Compiles and performs the provided equation.\n\n@param equation String in simple equation format",
"Check if position is in inner circle\n\n@param x x position\n@param y y position\n@return true if in inner circle, false otherwise",
"Click handler for bottom drawer items.",
"Computes eigenvalues only\n\n@return",
"Use this API to fetch all the auditmessages resources that are configured on netscaler.",
"Optional operations to do before the multiple-threads start indexing\n\n@param backend",
"Perform all Cursor cleanup here.",
"Enables or disabled shadow casting for a direct light.\nEnabling shadows attaches a GVRShadowMap component to the\nGVRSceneObject which owns the light and provides the\ncomponent with an orthographic camera for shadow casting.\n@param enableFlag true to enable shadow casting, false to disable",
"Use this API to fetch authorizationpolicylabel_binding resource of given name ."
] |
public void handleStateEvent(String callbackKey) {
if (handlers.containsKey(callbackKey) && handlers.get(callbackKey) instanceof StateEventHandler) {
((StateEventHandler) handlers.get(callbackKey)).handle();
} else {
System.err.println("Error in handle: " + callbackKey + " for state handler ");
}
} | [
"This method is called from Javascript, passing in the previously created\ncallback key. It uses that to find the correct handler and then passes on\nthe call. State events in the Google Maps API don't pass any parameters.\n\n@param callbackKey Key generated by the call to registerHandler."
] | [
"A smoothed pulse function. A cubic function is used to smooth the step between two thresholds.\n@param a1 the lower threshold position for the start of the pulse\n@param a2 the upper threshold position for the start of the pulse\n@param b1 the lower threshold position for the end of the pulse\n@param b2 the upper threshold position for the end of the pulse\n@param x the input parameter\n@return the output value",
"Returns s if it's at most maxWidth chars, otherwise chops right side to fit.",
"Returns new instance of OptionalValue with given key and value\n@param key resource key of the created value\n@param value wrapped object\n@param <T> type of the wrapped object\n@return given object wrapped in OptionalValue with given key",
"Retrieve the configuration of the named template.\n\n@param name the template name;",
"Returns the class hierarchy of the given type, from bottom to top, starting with the given class itself.\nInterfaces are not included.\n\n@param clazz the class of interest\n@return the class hierarchy of the given class",
"Returns all values that can be selected in the widget.\n@param cms the current CMS object\n@param rootPath the root path to the currently edited xml file (sitemap config)\n@param allRemoved flag, indicating if all inheritedly available formatters should be disabled\n@return all values that can be selected in the widget.",
"Use this API to clear nspbr6.",
"Obtains a International Fixed zoned date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the International Fixed zoned date-time, not null\n@throws DateTimeException if unable to create the date-time",
"Returns any events for the given resource ID since the last sync token\n\n@param resource Globally unique identifier for the resource.\n@param sync Sync token provided by a previous call to the events API\n@return Request object"
] |
public void set( int row , int col , double value ) {
ops.set(mat, row, col, value);
} | [
"Assigns the element in the Matrix to the specified value. Performs a bounds check to make sure\nthe requested element is part of the matrix.\n\n@param row The row of the element.\n@param col The column of the element.\n@param value The element's new value."
] | [
"convenience method for setting working or non-working days.\n\n@param day required day\n@param working flag indicating if the day is a working day",
"Delete a license from the repository\n\n@param licName The name of the license to remove",
"Uncompresses the textual contents in the given map and and writes them to the files\ndenoted by the keys of the map.\n\n@param dir The base directory into which the files will be written\n@param contents The map containing the contents indexed by the filename\n@throws IOException If an error occurred",
"Creates a new DMatrixRMaj around the provided data. The data must encode\na row-major matrix. Any modification to the returned matrix will modify the\nprovided data.\n\n@param numRows Number of rows in the matrix.\n@param numCols Number of columns in the matrix.\n@param data Data that is being wrapped. Referenced Saved.\n@return A matrix which references the provided data internally.",
"Rebuild logging systems with updated mode\n@param newMode log mode",
"This method dumps the entire contents of a file to an output\nprint writer as ascii data.\n\n@param is Input Stream\n@param pw Output PrintWriter\n@return number of bytes read\n@throws Exception Thrown on file read errors",
"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.",
"Format a date that is parseable from JavaScript, according to ISO-8601.\n\n@param date the date to format to a JSON string\n@return a formatted date in the form of a string",
"Used by FreeStyle Maven jobs only"
] |
public static String buildDynamicCapabilityName(String baseName, String dynamicNameElement) {
return buildDynamicCapabilityName(baseName, new String[]{dynamicNameElement});
} | [
"todo remove, here only for binary compatibility of elytron subsystem, drop once it is in."
] | [
"checks if a bean has been seen before in the dependencyPath. If not, it\nresolves the InjectionPoints and adds the resolved beans to the set of\nbeans to be validated",
"Generates a License regarding the parameters.\n\n@param name String\n@param longName String\n@param comments String\n@param regexp String\n@param url String\n@return License",
"Returns the compact task records for all tasks within the given project,\nordered by their priority within the project. Tasks can exist in more than one project at a time.\n\n@param project The project in which to search for tasks.\n@return Request object",
"Remove a child view of Android hierarchy view .\n\n@param view View to be removed.",
"Create a list of operations required to a boot a managed server.\n\n@param serverName the server name\n@param domainModel the complete domain model\n@param hostModel the local host model\n@param domainController the domain controller\n@return the list of boot operations",
"URLDecode a string\n@param s\n@return",
"Append the path to the StringBuilder.\n\n@param result the string builder to add the path to.",
"Add a simple property to the map file.\n\n@param writer xml stream writer\n@param name property name\n@param propertyType property type\n@param readMethod read method name\n@param writeMethod write method name\n@throws XMLStreamException",
"Generate a uniform random number in the range [lo, hi)\n\n@param lo lower limit of range\n@param hi upper limit of range\n@return a uniform random real in the range [lo, hi)"
] |
void update(Object feature) throws LayerException {
SimpleFeatureSource source = getFeatureSource();
if (source instanceof SimpleFeatureStore) {
SimpleFeatureStore store = (SimpleFeatureStore) source;
String featureId = getFeatureModel().getId(feature);
Filter filter = filterService.createFidFilter(new String[] { featureId });
transactionSynchronization.synchTransaction(store);
List<Name> names = new ArrayList<Name>();
Map<String, Attribute> attrMap = getFeatureModel().getAttributes(feature);
List<Object> values = new ArrayList<Object>();
for (Map.Entry<String, Attribute> entry : attrMap.entrySet()) {
String name = entry.getKey();
names.add(store.getSchema().getDescriptor(name).getName());
values.add(entry.getValue().getValue());
}
try {
store.modifyFeatures(names.toArray(new Name[names.size()]), values.toArray(), filter);
store.modifyFeatures(store.getSchema().getGeometryDescriptor().getName(), getFeatureModel()
.getGeometry(feature), filter);
log.debug("Updated feature {} in {}", featureId, getFeatureSourceName());
} catch (IOException ioe) {
featureModelUsable = false;
throw new LayerException(ioe, ExceptionCode.LAYER_MODEL_IO_EXCEPTION);
}
} else {
log.error("Don't know how to create or update " + getFeatureSourceName() + ", class "
+ source.getClass().getName() + " does not implement SimpleFeatureStore");
throw new LayerException(ExceptionCode.CREATE_OR_UPDATE_NOT_IMPLEMENTED, getFeatureSourceName(), source
.getClass().getName());
}
} | [
"Update an existing feature. Made package private for testing purposes.\n\n@param feature feature to update\n@throws LayerException oops"
] | [
"Returns the name of the class to be instantiated.\n@param rs the Resultset\n@return null if the column is not available",
"Determine whether the given method is a \"readString\" method.\n\n@see Object#toString()",
"Use this API to fetch dnstxtrec resource of given name .",
"Returns the ordered Map value of the field.\n\n@return the ordered Map value of the field. It returns a reference of the value.\n@throws IllegalArgumentException if the value cannot be converted to ordered Map.",
"required for rest assured base URI configuration.",
"Returns this bar code's pattern, converted into a set of corresponding codewords.\nUseful for bar codes that encode their content as a pattern.\n\n@param size the number of digits in each codeword\n@return this bar code's pattern, converted into a set of corresponding codewords",
"returns an Array with an Objects PK VALUES\n@throws PersistenceBrokerException if there is an erros accessing o field values",
"Parses command line arguments.\n\n@param args\nArray of arguments, like the ones provided by\n{@code void main(String[] args)}\n@param objs\nOne or more objects with annotated public fields.\n@return A {@code List} containing all unparsed arguments (i.e. arguments\nthat are no switches)\n@throws IOException\nif a parsing error occurred.\n@see CmdArgument",
"Creates an SslHandler\n\n@param bufferAllocator the buffer allocator\n@return instance of {@code SslHandler}"
] |
public static void outputString(final HttpServletResponse response, final Object obj) {
try {
response.setContentType("text/javascript");
response.setCharacterEncoding("utf-8");
disableCache(response);
response.getWriter().write(obj.toString());
response.getWriter().flush();
response.getWriter().close();
} catch (IOException e) {
}
} | [
"response simple String\n\n@param response\n@param obj"
] | [
"Write a time units field to the JSON file.\n\n@param fieldName field name\n@param value field value",
"Make a composite filter from the given sub-filters using AND to combine filters.",
"Return an instance of this class.\n\n@param container Solr CoreContainer container object in order to create a server object.\n\n@return instance of CmsSolrSpellchecker",
"Converts this object to JSON.\n\n@return the JSON representation\n\n@throws JSONException if JSON operations fail",
"Create an element that represents a horizntal or vertical line.\n@param x1\n@param y1\n@param x2\n@param y2\n@return the created DOM element",
"Use this API to fetch ipset resource of given name .",
"returns a collection of Reader LockEntries for object obj.\nIf now LockEntries could be found an empty Vector is returned.",
"Record the connection establishment time\n\n@param dest Destination of the socket to connect to. Will actually record\nif null. Otherwise will call this on self and corresponding child\nwith this param null.\n@param connEstTimeUs The number of us to wait before establishing a\nconnection",
"Parser for actual conditions\n\n@param feed\n@return"
] |
public MembersList<Member> getList(String groupId, Set<String> memberTypes, int perPage, int page) throws FlickrException {
MembersList<Member> members = new MembersList<Member>();
Map<String, Object> parameters = new HashMap<String, Object>();
parameters.put("method", METHOD_GET_LIST);
parameters.put("group_id", groupId);
if (perPage > 0) {
parameters.put("per_page", "" + perPage);
}
if (page > 0) {
parameters.put("page", "" + page);
}
if (memberTypes != null) {
parameters.put("membertypes", StringUtilities.join(memberTypes, ","));
}
Response response = transportAPI.get(transportAPI.getPath(), parameters, apiKey, sharedSecret);
if (response.isError()) {
throw new FlickrException(response.getErrorCode(), response.getErrorMessage());
}
Element mElement = response.getPayload();
members.setPage(mElement.getAttribute("page"));
members.setPages(mElement.getAttribute("pages"));
members.setPerPage(mElement.getAttribute("perpage"));
members.setTotal(mElement.getAttribute("total"));
NodeList mNodes = mElement.getElementsByTagName("member");
for (int i = 0; i < mNodes.getLength(); i++) {
Element element = (Element) mNodes.item(i);
members.add(parseMember(element));
}
return members;
} | [
"Get a list of the members of a group. The call must be signed on behalf of a Flickr member, and the ability to see the group membership will be\ndetermined by the Flickr member's group privileges.\n\n@param groupId\nReturn a list of members for this group. The group must be viewable by the Flickr member on whose behalf the API call is made.\n@param memberTypes\nA set of Membertypes as available as constants in {@link Member}.\n@param perPage\nNumber of records per page.\n@param page\nResult-section.\n@return A members-list\n@throws FlickrException\n@see <a href=\"http://www.flickr.com/services/api/flickr.groups.members.getList.html\">API Documentation</a>"
] | [
"Create a ModelNode representing the JVM the instance is running on.\n\n@return a ModelNode representing the JVM the instance is running on.\n@throws OperationFailedException",
"Returns the real key object.",
"Compare the controlDOM and testDOM and save and return the differences in a list.\n\n@return list with differences",
"Wait until a range has no notifications.\n\n@return true if notifications were ever seen while waiting",
"Returns the directory of the URL.\n\n@param urlString URL of the file.\n@return The directory string.\n@throws IllegalArgumentException if URL is malformed",
"Deletes all of the Directories in root that match the FileFilter\n\n@param root\n@param filter",
"Use this API to fetch a vpnglobal_appcontroller_binding resources.",
"Checks the constraints on this class.\n\n@param checkLevel The amount of checks to perform\n@exception ConstraintException If a constraint has been violated",
"Sets the day of the month.\n@param day the day to set."
] |
private long validateMessage(FileChannel channel, long start, long len, ByteBuffer buffer) throws IOException {
buffer.rewind();
int read = channel.read(buffer, start);
if (read < 4) return -1;
// check that we have sufficient bytes left in the file
int size = buffer.getInt(0);
if (size < Message.MinHeaderSize) return -1;
long next = start + 4 + size;
if (next > len) return -1;
// read the message
ByteBuffer messageBuffer = ByteBuffer.allocate(size);
long curr = start + 4;
while (messageBuffer.hasRemaining()) {
read = channel.read(messageBuffer, curr);
if (read < 0) throw new IllegalStateException("File size changed during recovery!");
else curr += read;
}
messageBuffer.rewind();
Message message = new Message(messageBuffer);
if (!message.isValid()) return -1;
else return next;
} | [
"Read, validate, and discard a single message, returning the next valid offset, and the\nmessage being validated\n\n@throws IOException any exception"
] | [
"Get the response headers for URL\n\n@param stringUrl URL to use\n@return headers HTTP Headers\n@throws IOException I/O error happened",
"Sets the alias. Empty String is regarded as null.\n@param alias The alias to set",
"Use this API to fetch ipset_nsip_binding resources of given name .",
"Reverse how the transition is applied, such that the transition previously performed when progress=start of range is only performed when progress=end of range\n\n@return",
"Use this API to fetch all the protocolhttpband resources that are configured on netscaler.\nThis uses protocolhttpband_args which is a way to provide additional arguments while fetching the resources.",
"Adds a data set to IIM file.\n\n@param ds\ndata set id (see constants in IIM class)\n@param value\ndata set value. Null values are silently ignored.\n@throws SerializationException\nif value can't be serialized by data set's serializer\n@throws InvalidDataSetException\nif data set isn't defined",
"Parse a map of objects from a JsonParser.\n\n@param jsonParser The JsonParser, preconfigured to be at the START_ARRAY token.",
"Inserts an array of Parcelable values into the mapping of the underlying Bundle, replacing any\nexisting value for the given key. Either key or value may be null.\n\n@param key a String, or null\n@param value an array of Parcelable objects, or null\n@return this bundler instance to chain method calls",
"Gets the Json Array representation of the given list of strings.\n@param keys List of strings\n@return the JsonArray represents the list of keys"
] |
private void initDefaultScopeType(EnhancedAnnotation<T> annotatedAnnotation) {
Set<Annotation> scopeTypes = new HashSet<Annotation>();
scopeTypes.addAll(annotatedAnnotation.getMetaAnnotations(Scope.class));
scopeTypes.addAll(annotatedAnnotation.getMetaAnnotations(NormalScope.class));
if (scopeTypes.size() > 1) {
throw MetadataLogger.LOG.multipleScopes(annotatedAnnotation);
} else if (scopeTypes.size() == 1) {
this.defaultScopeType = scopeTypes.iterator().next();
}
} | [
"Initializes the default scope type"
] | [
"Sets the distance from the origin to the near clipping plane for the\nwhole camera rig.\n\n@param near\nDistance to the near clipping plane.",
"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",
"Apply aliases to task and resource fields.\n\n@param aliases map of aliases",
"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",
"Parses links for XMLContents etc.\n\n@param cms the CMS context to use\n@throws CmsException if something goes wrong",
"Loads the configuration XML from the given string.\n@since 1.3",
"Gets a collection of all the email aliases for this user.\n\n<p>Note that the user's primary login email is not included in the collection of email aliases.</p>\n\n@return a collection of all the email aliases for this user.",
"Returns tag formatted as an HTTP tag string.\n\n@return The formatted HTTP tag string.\n\n@see <a\nhref=\"http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.11\">HTTP\nEntity Tags</a>",
"Closes off all connections in all partitions."
] |
private void verifyClusterStoreDefinition() {
if(SystemStoreConstants.isSystemStore(storeDefinition.getName())) {
// TODO: Once "todo" in StorageService.initSystemStores is complete,
// this early return can be removed and verification can be enabled
// for system stores.
return;
}
Set<Integer> clusterZoneIds = cluster.getZoneIds();
if(clusterZoneIds.size() > 1) { // Zoned
Map<Integer, Integer> zoneRepFactor = storeDefinition.getZoneReplicationFactor();
Set<Integer> storeDefZoneIds = zoneRepFactor.keySet();
if(!clusterZoneIds.equals(storeDefZoneIds)) {
throw new VoldemortException("Zone IDs in cluster (" + clusterZoneIds
+ ") are incongruent with zone IDs in store defs ("
+ storeDefZoneIds + ")");
}
for(int zoneId: clusterZoneIds) {
if(zoneRepFactor.get(zoneId) > cluster.getNumberOfNodesInZone(zoneId)) {
throw new VoldemortException("Not enough nodes ("
+ cluster.getNumberOfNodesInZone(zoneId)
+ ") in zone with id " + zoneId
+ " for replication factor of "
+ zoneRepFactor.get(zoneId) + ".");
}
}
} else { // Non-zoned
if(storeDefinition.getReplicationFactor() > cluster.getNumberOfNodes()) {
System.err.println(storeDefinition);
System.err.println(cluster);
throw new VoldemortException("Not enough nodes (" + cluster.getNumberOfNodes()
+ ") for replication factor of "
+ storeDefinition.getReplicationFactor() + ".");
}
}
} | [
"Verify that cluster is congruent to store def wrt zones."
] | [
"Sets the quaternion of the keyframe.",
"Layout children inside the layout container",
"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.",
"Execute our refresh query statement and then update all of the fields in data with the fields from the result.\n\n@return 1 if we found the object in the table by id or 0 if not.",
"host.xml",
"Returns all values that can be selected in the widget.\n@param cms the current CMS object\n@param rootPath the root path to the currently edited xml file (sitemap config)\n@param allRemoved flag, indicating if all inheritedly available formatters should be disabled\n@return all values that can be selected in the widget.",
"Utility function to get the current text.",
"Does not mutate the TestMatrix.\nVerifies that the test matrix contains all the required tests and that\neach required test is valid.\n\n@param testMatrix the {@link TestMatrixArtifact} to be verified.\n@param matrixSource a {@link String} of the source of proctor artifact. For example a path of proctor artifact file.\n@param requiredTests a {@link Map} of required test. The {@link TestSpecification} would be verified\n@param functionMapper a given el {@link FunctionMapper}\n@param providedContext a {@link Map} containing variables describing the context in which the request is executing. These will be supplied to verifying all rules.\n@param dynamicTests a {@link Set} of dynamic tests determined by filters.\n@return a {@link ProctorLoadResult} to describe the result of verification. It contains errors of verification and a list of missing test.",
"Print currency.\n\n@param value currency value\n@return currency value"
] |
private void processDependencies()
{
Set<Task> tasksWithBars = new HashSet<Task>();
FastTrackTable table = m_data.getTable(FastTrackTableType.ACTBARS);
for (MapRow row : table)
{
Task task = m_project.getTaskByUniqueID(row.getInteger(ActBarField._ACTIVITY));
if (task == null || tasksWithBars.contains(task))
{
continue;
}
tasksWithBars.add(task);
String predecessors = row.getString(ActBarField.PREDECESSORS);
if (predecessors == null || predecessors.isEmpty())
{
continue;
}
for (String predecessor : predecessors.split(", "))
{
Matcher matcher = RELATION_REGEX.matcher(predecessor);
matcher.matches();
Integer id = Integer.valueOf(matcher.group(1));
RelationType type = RELATION_TYPE_MAP.get(matcher.group(3));
if (type == null)
{
type = RelationType.FINISH_START;
}
String sign = matcher.group(4);
double lag = NumberHelper.getDouble(matcher.group(5));
if ("-".equals(sign))
{
lag = -lag;
}
Task targetTask = m_project.getTaskByID(id);
if (targetTask != null)
{
Duration lagDuration = Duration.getInstance(lag, m_data.getDurationTimeUnit());
Relation relation = task.addPredecessor(targetTask, type, lagDuration);
m_eventManager.fireRelationReadEvent(relation);
}
}
}
} | [
"Process task dependencies."
] | [
"Assigns the element in the Matrix to the specified value. Performs a bounds check to make sure\nthe requested element is part of the matrix.\n\n@param row The row of the element.\n@param col The column of the element.\n@param value The element's new value.",
"I KNOW WHAT I AM DOING",
"Checks if ranges contain the uid\n\n@param idRanges the id ranges\n@param uid the uid\n@return true, if ranges contain given uid",
"Remove an read lock.",
"Returns the connection count by key specified in this registry\n\nNote it might count connections that are closed but not removed from registry yet\n\n@param key\nthe key\n@return connection count by key",
"Print classes that were parts of relationships, but not parsed by javadoc",
"Create a ModelNode representing the CPU the instance is running on.\n\n@return a ModelNode representing the CPU the instance is running on.\n@throws OperationFailedException",
"Show multiple channels. All other channels will be unaffected.\n@param channels The channels to show",
"Sets the value of a UDF.\n\n@param udf user defined field\n@param dataType MPXJ data type\n@param value field value"
] |
public List<String> parseMethodList(String methods) {
String[] methodArray = StringUtils.delimitedListToStringArray(methods, ",");
List<String> methodList = new ArrayList<String>();
for (String methodName : methodArray) {
methodList.add(methodName.trim());
}
return methodList;
} | [
"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>"
] | [
"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.\"",
"Locate the no arg constructor for the class.",
"Determines whether the object is a materialized object, i.e. no proxy or a\nproxy that has already been loaded from the database.\n\n@param object The object to test\n@return <code>true</code> if the object is materialized",
"Get transformer to use.\n\n@return transformation to apply",
"Makes it possible to uniquify a collection of objects which are normally\nnon-hashable. Alternatively, it lets you define an alternate hash function\nfor them for limited-use hashing.",
"Display a Notification message\n@param event",
"Creates a curator built using the given zookeeper connection string and timeout",
"build the Join-Information for Subclasses having a super reference to this class\n\n@param left\n@param cld\n@param name",
"Sets the size of the matrix being decomposed, declares new memory if needed,\nand sets all helper functions to their initial value."
] |
public Date getBaselineFinish()
{
Object result = getCachedValue(TaskField.BASELINE_FINISH);
if (result == null)
{
result = getCachedValue(TaskField.BASELINE_ESTIMATED_FINISH);
}
if (!(result instanceof Date))
{
result = null;
}
return (Date) result;
} | [
"The Baseline Finish field shows the planned completion date for a task\nat the time you saved a baseline. Information in this field becomes\navailable when you set a baseline for a task.\n\n@return Date"
] | [
"Transforms an input String into HTML using the given Configuration.\n\n@param input\nThe String to process.\n@param configuration\nThe Configuration.\n@return The processed String.\n@since 0.7\n@see Configuration",
"Load a JSON file from the application's \"asset\" directory.\n\n@param context Valid {@link Context}\n@param asset Name of the JSON file\n@return New instance of {@link JSONObject}",
"Loads the favorite list.\n\n@return the list of favorites\n\n@throws CmsException if something goes wrong",
"Releases a database connection, and cleans up any resources\nassociated with that connection.",
"Set a bean in the context.\n\n@param name bean name\n@param object bean value",
"Convert this lattice to store data in the given convention.\nConversion involving receiver premium assumes zero wide collar.\n\n@param targetConvention The convention to store the data in.\n@param displacement The displacement to use, if applicable.\n@param model The model for context.\n\n@return The converted lattice.",
"Prepare a parallel UDP Task.\n\n@param command\nthe command\n@return the parallel task builder",
"Read properties from the raw header data.\n\n@param stream input stream",
"Executes the mojo."
] |
public void addHandlerFactory(ManagementRequestHandlerFactory factory) {
for (;;) {
final ManagementRequestHandlerFactory[] snapshot = updater.get(this);
final int length = snapshot.length;
final ManagementRequestHandlerFactory[] newVal = new ManagementRequestHandlerFactory[length + 1];
System.arraycopy(snapshot, 0, newVal, 0, length);
newVal[length] = factory;
if (updater.compareAndSet(this, snapshot, newVal)) {
return;
}
}
} | [
"Add a management request handler factory to this context.\n\n@param factory the request handler to add"
] | [
"Generates a torque schema for the model.\n\n@param attributes The attributes of the tag\n@return The property value\n@exception XDocletException If an error occurs\[email protected] type=\"content\"",
"Adds a classpath source which contains the given resource.\n\nTODO: [GH-213] this is extremely ugly; separate the code required to run on the\nforked JVM into an isolated bundle and either create it on-demand (in temp.\nfiles location?) or locate it in classpath somehow (in a portable way).",
"Append field with quotes and escape characters added in the key, if required.\nThe value is added without quotes and any escape characters.\n\n@return this",
"Computes the blend weights for the given time and\nupdates them in the target.",
"Changes to cluster OR store definition metadata results in routing\nstrategies changing. These changes need to be propagated to all the\nlisteners.\n\n@param cluster The updated cluster metadata\n@param storeDefs The updated list of store definition",
"We need to make sure the terms are of the right type, otherwise they will not be serialized correctly.",
"Aggregates a list of templates specified by @Template",
"Check whether the URL end with one of the given suffixes.\n\n@param uri URI\n@param patterns possible suffixes\n@return true when URL ends with one of the suffixes",
"Convert the MSPDI representation of a UUID into a Java UUID instance.\n\n@param value MSPDI UUID\n@return Java UUID instance"
] |
public NestedDef getNested(String name)
{
NestedDef nestedDef = null;
for (Iterator it = _nested.iterator(); it.hasNext(); )
{
nestedDef = (NestedDef)it.next();
if (nestedDef.getName().equals(name))
{
return nestedDef;
}
}
return null;
} | [
"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"
] | [
"Reads the text files in the given directory and puts their content\nin the given map after compressing it. Note that this method does not\ntraverse recursivly into sub-directories.\n\n@param dir The directory to process\n@param results Map that will receive the contents (indexed by the relative filenames)\n@throws IOException If an error ocurred",
">>>>>> measureUntilFull helper methods",
"Returns the configured mappings of the current field.\n\n@return the configured mappings of the current field",
"Adds all categories from one resource to another, skipping categories that are not available for the resource copied to.\n\nThe resource where categories are copied to has to be locked.\n\n@param cms the CmsObject used for reading and writing.\n@param fromResource the resource to copy the categories from.\n@param toResourceSitePath the full site path of the resource to copy the categories to.\n@throws CmsException thrown if copying the resources fails.",
"Execute our refresh query statement and then update all of the fields in data with the fields from the result.\n\n@return 1 if we found the object in the table by id or 0 if not.",
"Initializes the metadataCache for MetadataStore",
"Iterates over the elements of an iterable collection of items, starting\nfrom a specified startIndex, and returns the index of the last item that\nmatches the condition specified in the closure.\n\n@param self the iteration object over which to iterate\n@param startIndex start matching from this index\n@param closure the filter to perform a match on the collection\n@return an integer that is the index of the last matched object or -1 if no match was found\n@since 1.5.2",
"Computes FPS average",
"Returns the y-coordinate of a vertex position.\n\n@param vertex the vertex index\n@return the y coordinate"
] |
public void build(Set<Bean<?>> beans) {
if (isBuilt()) {
throw new IllegalStateException("BeanIdentifier index is already built!");
}
if (beans.isEmpty()) {
index = new BeanIdentifier[0];
reverseIndex = Collections.emptyMap();
indexHash = 0;
indexBuilt.set(true);
return;
}
List<BeanIdentifier> tempIndex = new ArrayList<BeanIdentifier>(beans.size());
for (Bean<?> bean : beans) {
if (bean instanceof CommonBean<?>) {
tempIndex.add(((CommonBean<?>) bean).getIdentifier());
} else if (bean instanceof PassivationCapable) {
tempIndex.add(new StringBeanIdentifier(((PassivationCapable) bean).getId()));
}
}
Collections.sort(tempIndex, new Comparator<BeanIdentifier>() {
@Override
public int compare(BeanIdentifier o1, BeanIdentifier o2) {
return o1.asString().compareTo(o2.asString());
}
});
index = tempIndex.toArray(new BeanIdentifier[tempIndex.size()]);
ImmutableMap.Builder<BeanIdentifier, Integer> builder = ImmutableMap.builder();
for (int i = 0; i < index.length; i++) {
builder.put(index[i], i);
}
reverseIndex = builder.build();
indexHash = Arrays.hashCode(index);
if(BootstrapLogger.LOG.isDebugEnabled()) {
BootstrapLogger.LOG.beanIdentifierIndexBuilt(getDebugInfo());
}
indexBuilt.set(true);
} | [
"Note that the index can only be built once.\n\n@param beans The set of beans the index should be built from, only instances of {@link CommonBean} and implementations of {@link PassivationCapable} are\nincluded\n@throws IllegalStateException If the index is built already"
] | [
"Removes a child task.\n\n@param child child task instance",
"This method computes the list of unnamed parameters, by filtering the\nlist of raw arguments, stripping out the named parameters.",
"Build and return a string version of the query. If you change the where or make other calls you will need to\nre-call this method to re-prepare the query for execution.",
"Post the specified photo to a blog.\n\n@param photo\nThe photo metadata\n@param blogId\nThe blog ID\n@throws FlickrException",
"other static handlers",
"When it is time to actually close a client, do so, and clean up the related data structures.\n\n@param client the client which has been idle for long enough to be closed",
"Reinitializes the shader texture used to fill in\nthe Circle upon drawing.",
"Use this API to update dospolicy resources.",
"Determines the partition ID that replicates the key on the given node.\n\n@param nodeId of the node\n@param key to look up.\n@return partitionId if found, otherwise null."
] |
public void addRow(final String... cells){
final Row row = new Row((Object[]) cells);
if(!rows.contains(row)){
rows.add(row);
}
} | [
"Add a row to the table if it does not already exist\n\n@param cells String..."
] | [
"Returns all information related to a single texture.\n\n@param type the texture type\n@param index the index in the texture stack\n@return the texture information",
"Blocking function which completes the migration of one store\n\n@param storeName The name of the store\n@param adminClient Admin client used to initiate the copying of data\n@param stealInfo The steal information\n@param isReadOnlyStore Boolean indicating that this is a read-only store",
"Creates an object instance from the Groovy resource\n\n@param resource the Groovy resource to parse\n@return An Object instance",
"Read an optional boolean value form a JSON Object.\n@param json the JSON object to read from.\n@param key the key for the boolean value in the provided JSON object.\n@return the boolean or null if reading the boolean fails.",
"Answer the search class.\nThis is the class of the example object or\nthe class represented by Identity.\n@return Class",
"given the groupId, returns the groupName\n\n@param groupId ID of group\n@return name of group",
"Resets the resend counter and possibly resets the\nnode stage to DONE when previous initialization was\ncomplete.",
"Stops the scavenger.",
"Add UDFType objects to a PM XML file.\n\n@author kmahan\n@date 2014-09-24\n@author lsong\n@date 2015-7-24"
] |
protected void propagateOnEnter(GVRPickedObject hit)
{
GVRSceneObject hitObject = hit.getHitObject();
GVREventManager eventManager = getGVRContext().getEventManager();
if (mEventOptions.contains(EventOptions.SEND_TOUCH_EVENTS))
{
if (mEventOptions.contains(EventOptions.SEND_TO_LISTENERS))
{
eventManager.sendEvent(this, ITouchEvents.class, "onEnter", hitObject, hit);
}
if (mEventOptions.contains(EventOptions.SEND_TO_HIT_OBJECT))
{
eventManager.sendEvent(hitObject, ITouchEvents.class, "onEnter", hitObject, hit);
}
if (mEventOptions.contains(EventOptions.SEND_TO_SCENE) && (mScene != null))
{
eventManager.sendEvent(mScene, ITouchEvents.class, "onEnter", hitObject, hit);
}
}
if (mEventOptions.contains(EventOptions.SEND_PICK_EVENTS))
{
if (mEventOptions.contains(EventOptions.SEND_TO_LISTENERS))
{
eventManager.sendEvent(this, IPickEvents.class, "onEnter", hitObject, hit);
}
if (mEventOptions.contains(EventOptions.SEND_TO_HIT_OBJECT))
{
eventManager.sendEvent(hitObject, IPickEvents.class, "onEnter", hitObject, hit);
}
if (mEventOptions.contains(EventOptions.SEND_TO_SCENE) && (mScene != null))
{
eventManager.sendEvent(mScene, IPickEvents.class, "onEnter", hitObject, hit);
}
}
} | [
"Propagate onEnter events to listeners\n@param hit collision object"
] | [
"Prepare a parallel HTTP OPTION Task.\n\n@param url\nthe UrlPostfix: e.g. in http://localhost:8080/index.html.,the url is \"/index.html\"\n@return the parallel task builder",
"Gets the positions.\n\n@return the positions",
"Extract task data.",
"Get the hours difference",
"Get the Query Paramaters to be used for search request.\n@return this.QueryStringBuilder.",
"Cancel a particular download in progress. Returns 1 if the download Id is found else returns 0.\n\n@param downloadId\n@return int",
"In this method perform the actual override in runtime.\n\n@see org.apache.log4j.spi.HierarchyEventListener#addAppenderEvent(org.apache.log4j.Category, org.apache.log4j.Appender)",
"Returns the number of rows within this association.\n\n@return the number of rows within this association",
"Use this API to add nslimitselector."
] |
public static Map<String, Object> with(Object... params) {
Map<String, Object> map = new HashMap<>();
for (int i = 0; i < params.length; i++) {
map.put(String.valueOf(i), params[i]);
}
return map;
} | [
"Convenience wrapper for message parameters\n@param params\n@return"
] | [
"Sorts the specified list itself into ascending order, according to the natural ordering of its elements.\n\n@param list\nthe list to be sorted. May not be <code>null</code>.\n@return the sorted list itself.\n@see Collections#sort(List)",
"Creates the DAO if we have config information cached and caches the DAO.",
"Registers Jersey HeaderDelegateProviders for the specified TinyTypes.\n\n@param head a TinyType\n@param tail other TinyTypes\n@throws IllegalArgumentException when a non-TinyType is given",
"Enables or disabled shadow casting for a direct light.\nEnabling shadows attaches a GVRShadowMap component to the\nGVRSceneObject which owns the light and provides the\ncomponent with an orthographic camera for shadow casting.\n@param enableFlag true to enable shadow casting, false to disable",
"Returns Task field name of supplied code no.\n\n@param key - the code no of required Task field\n@return - field name",
"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",
"Assigns one variable to one value\n\n@param action an Assign Action\n@param possibleStateList a current list of possible states produced so far from expanding a model state\n\n@return the same list, with every possible state augmented with an assigned variable, defined by action",
"Adds an access constraint to the set used with the attribute\n@param accessConstraint the constraint\n@return a builder that can be used to continue building the attribute definition",
"Validate the consistency of patches to the point we rollback.\n\n@param patchID the patch id which gets rolled back\n@param identity the installed identity\n@throws PatchingException"
] |
public static List<Integer> toIntegerList(List<String> strList, boolean failOnException){
List<Integer> intList = new ArrayList<Integer>();
for(String str : strList){
try{
intList.add(Integer.parseInt(str));
}
catch(NumberFormatException nfe){
if(failOnException){
return null;
}
else{
intList.add(null);
}
}
}
return intList;
} | [
"Parse a list of String into a list of Integer.\nIf one element can not be parsed, the behavior depends on the value of failOnException.\n@param strList can't be null\n@param failOnException if an element can not be parsed should we return null or add a null element to the list.\n@return list of all String parsed as Integer or null if failOnException"
] | [
"Use this API to update clusterinstance.",
"Use this API to add appfwjsoncontenttype.",
"Build a Pk-Query base on the ClassDescriptor.\n\n@param cld\n@return a select by PK query",
"Delete by id.\n\n@param id the id",
"This method handles submitting and then waiting for the request from the\nserver. It uses the ClientRequest API to actually write the request and\nthen read back the response. This implementation will not block for a\nresponse from the server.\n\n@param <T> Return type\n\n@param clientRequest ClientRequest implementation used to write the\nrequest and read the response\n@param operationName Simple string representing the type of request\n\n@return Data returned by the individual requests",
"Remove all of the audio sources from the audio manager.\nThis will stop all sound from playing.",
"Log column data.\n\n@param column column data",
"Returns the Map value of the field.\n\n@return the Map value of the field. It returns a reference of the value both for <code>MAP</code> and\n<code>LIST_MAP</code>.\n@throws IllegalArgumentException if the value cannot be converted to Map.",
"Abort an upload session, discarding any chunks that were uploaded to it."
] |
@SuppressWarnings("unchecked")
protected String addeDependency(Appliable<? extends Indexable> appliable) {
TaskGroup.HasTaskGroup dependency = (TaskGroup.HasTaskGroup) appliable;
return this.addDependency(dependency);
} | [
"Add an appliable dependency for this task item.\n\n@param appliable the appliable dependency.\n@return the key to be used as parameter to taskResult(string) method to retrieve updated dependency"
] | [
"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",
"Use this API to unset the properties of coparameter resource.\nProperties that need to be unset are specified in args array.",
"Factory method that returns an Identity object created from a serializated representation.\n\n@param anArray The serialized representation\n@return The identity\n@see {@link #serialize}.\n@deprecated",
"Add a \"post-run\" dependent task item for this task item.\n\n@param dependent the \"post-run\" dependent task item.\n@return key to be used as parameter to taskResult(string) method to retrieve result of root\ntask in the given dependent task group",
"Inflate the main layout used to render videos in the list view.\n\n@param inflater LayoutInflater service to inflate.\n@param parent ViewGroup used to inflate xml.\n@return view inflated.",
"Returns an iterator over the items in the trash.\n@return an iterator over the items in the trash.",
"Checks if this has the passed suffix\n\n@param suffix is a Bytes object to compare to this\n@return true or false\n@since 1.1.0",
"Returns a list of your geo-tagged photos.\n\nThis method requires authentication with 'read' permission.\n\n@param minUploadDate\nMinimum upload date. Photos with an upload date greater than or equal to this value will be returned. Set to null to not specify a date.\n@param maxUploadDate\nMaximum upload date. Photos with an upload date less than or equal to this value will be returned. Set to null to not specify a date.\n@param minTakenDate\nMinimum taken date. Photos with an taken date greater than or equal to this value will be returned. Set to null to not specify a date.\n@param maxTakenDate\nMaximum taken date. Photos with an taken date less than or equal to this value will be returned. Set to null to not specify a date.\n@param privacyFilter\nReturn photos only matching a certain privacy level. Valid values are:\n<ul>\n<li>1 public photos</li>\n<li>2 private photos visible to friends</li>\n<li>3 private photos visible to family</li>\n<li>4 private photos visible to friends & family</li>\n<li>5 completely private photos</li>\n</ul>\nSet to 0 to not specify a privacy Filter.\n\n@see com.flickr4java.flickr.photos.Extras\n@param sort\nThe order in which to sort returned photos. Deafults to date-posted-desc. The possible values are: date-posted-asc, date-posted-desc,\ndate-taken-asc, date-taken-desc, interestingness-desc, and interestingness-asc.\n@param extras\nA set of Strings controlling the extra information to fetch for each returned record. Currently supported fields are: license, date_upload,\ndate_taken, owner_name, icon_server, original_format, last_update, geo. Set to null or an empty set to not specify any extras.\n@param perPage\nNumber of photos to return per page. If this argument is 0, it defaults to 100. The maximum allowed value is 500.\n@param page\nThe page of results to return. If this argument is 0, it defaults to 1.\n@return photos\n@throws FlickrException",
"Handles reports by consumers\n\n@param name the name of the reporting consumer\n@param report the number of lines the consumer has written since last report\n@return \"exit\" if maxScenarios has been reached, \"ok\" otherwise"
] |
public JsonNode wbRemoveClaims(List<String> statementIds,
boolean bot, long baserevid, String summary)
throws IOException, MediaWikiApiErrorException {
Validate.notNull(statementIds,
"statementIds parameter cannot be null when deleting statements");
Validate.notEmpty(statementIds,
"statement ids to delete must be non-empty when deleting statements");
Validate.isTrue(statementIds.size() <= 50,
"At most 50 statements can be deleted at once");
Map<String, String> parameters = new HashMap<String, String>();
parameters.put("claim", String.join("|", statementIds));
return performAPIAction("wbremoveclaims", null, null, null, null, parameters, summary, baserevid, bot);
} | [
"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"
] | [
"Collection of JRVariable\n\n@param variables\n@return",
"Adds the file to the tar archive represented by output stream. It's caller's responsibility to close output stream\nproperly.\n\n@param out target archive.\n@param source file to be added.\n@param fileSize size of the file (which is known in most cases).\n@throws IOException in case of any issues with underlying store.",
"Switches to the next tab.",
"Read project data from a database.\n\n@return ProjectFile instance\n@throws MPXJException",
"Write the auxiliary RDF data for encoding the given value.\n\n@param value\nthe value to write\n@param resource\nthe (subject) URI to use to represent this value in RDF\n@throws RDFHandlerException",
"Returns the orthogonal U matrix.\n\n@param U If not null then the results will be stored here. Otherwise a new matrix will be created.\n@return The extracted Q matrix.",
"returns a collection of Reader LockEntries for object obj.\nIf no LockEntries could be found an empty Vector is returned.",
"TestNG returns a compound thread ID that includes the thread name and its numeric ID,\nseparated by an 'at' sign. We only want to use the thread name as the ID is mostly\nunimportant and it takes up too much space in the generated report.\n@param threadId The compound thread ID.\n@return The thread name.",
"Prints the data of one property to the given output. This will be a\nsingle line in CSV.\n\n@param out\nthe output to write to\n@param propertyRecord\nthe data to write\n@param propertyIdValue\nthe property that the data refers to"
] |
public void addIterator(OJBIterator iterator)
{
/**
* only add iterators that are not null and non-empty.
*/
if (iterator != null)
{
if (iterator.hasNext())
{
setNextIterator();
m_rsIterators.add(iterator);
}
}
} | [
"use this method to construct the ChainingIterator\niterator by iterator."
] | [
"Use this API to update transformpolicy.",
"Convert an object to another object given a parameterized type signature\n\n@param context\n@param destinationType\nthe destination type\n@param source\nthe source object\n\n@return the converted object\n@throws ConverterException\nif conversion failed",
"Processes the template for all reference definitions of 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\"",
"Return the knot at a given position.\n@param x the position\n@return the knot number, or 1 if no knot found",
"Clone layer information considering what may be copied to the client.\n\n@param original layer info\n@return cloned copy including only allowed information",
"Use this API to fetch statistics of tunnelip_stats resource of given name .",
"Resets the resend counter and possibly resets the\nnode stage to DONE when previous initialization was\ncomplete.",
"This implementation does not support the 'offset' and 'maxResultSize' parameters.",
"Label accessor provided for JSON serialization only."
] |
public void startup() throws InterruptedException {
final int maxCacheConnectionPerThread = serverConfig.getMaxConnections() / processors.length;
logger.debug("start {} Processor threads",processors.length);
for (int i = 0; i < processors.length; i++) {
processors[i] = new Processor(handlerFactory, stats, maxRequestSize, maxCacheConnectionPerThread);
Utils.newThread("jafka-processor-" + i, processors[i], false).start();
}
Utils.newThread("jafka-acceptor", acceptor, false).start();
acceptor.awaitStartup();
} | [
"Start the socket server and waiting for finished\n\n@throws InterruptedException thread interrupted"
] | [
"Method used to write the name of the scenarios methods\n\n@param word\n@return the same word starting with lower case",
"Returns a licenses regarding its Id and a fake on if no license exist with such an Id\n\n@param licenseId String\n@return License",
"Loads the specified class name and stores it in the hash\n\n@param className class name\n@throws Exception exception",
"Process the layers.conf file.\n\n@param repoRoot the root\n@return the layers conf\n@throws java.io.IOException",
"Build filter for the request.\n\n@param layerFilter layer filter\n@param featureIds features to include in report (null for all)\n@return filter\n@throws GeomajasException filter could not be parsed/created",
"Converts a collection of dates to a JSON array with the long representation of the dates as strings.\n@param dates the list to convert.\n@return JSON array with long values of dates as string",
"Add network interceptor to httpClient to track download progress for\nasync requests.",
"Confirms a user with the given token and token id.\n\n@param token the confirmation token.\n@param tokenId the id of the confirmation token.\n@return A {@link Task} that completes when confirmation completes/fails.",
"Determines the address for the host being used.\n\n@param client the client used to communicate with the server\n\n@return the address of the host\n\n@throws IOException if an error occurs communicating with the server\n@throws OperationExecutionException if the operation used to determine the host name fails"
] |
public static <T> T assertNull(T value, String message) {
if (value != null)
throw new IllegalStateException(message);
return value;
} | [
"Throws an IllegalStateException when the given value is not null.\n@return the value"
] | [
"Use this API to Import sslfipskey resources.",
"Handles an incoming request message.\nAn incoming request message is a message initiated by a node or the controller.\n@param incomingMessage the incoming message to process.",
"calculate distance of two points\n\n@param a\n@param b\n@return",
"Randomize the gradient.",
"Use this API to update filterhtmlinjectionparameter.",
"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)",
"Get DPI suggestions.\n\n@return DPI suggestions",
"Request a scoped transactional token.\n@param accessToken application access token.\n@param scope scope of transactional token.\n@return a BoxAPIConnection which can be used to perform transactional requests.",
"Returns the compact records for all stories on the task.\n\n@param task Globally unique identifier for the task.\n@return Request object"
] |
private String readLine(boolean trim) throws IOException {
boolean done = false;
boolean sawCarriage = false;
// bytes to trim (the \r and the \n)
int removalBytes = 0;
while (!done) {
if (isReadBufferEmpty()) {
offset = 0;
end = 0;
int bytesRead = inputStream.read(buffer, end, Math.min(DEFAULT_READ_COUNT, buffer.length - end));
if (bytesRead < 0) {
// we failed to read anything more...
throw new IOException("Reached the end of the stream");
} else {
end += bytesRead;
}
}
int originalOffset = offset;
for (; !done && offset < end; offset++) {
if (buffer[offset] == LF) {
int cpLength = offset - originalOffset + 1;
if (trim) {
int length = 0;
if (buffer[offset] == LF) {
length ++;
if (sawCarriage) {
length++;
}
}
cpLength -= length;
}
if (cpLength > 0) {
copyToStrBuffer(buffer, originalOffset, cpLength);
} else {
// negative length means we need to trim a \r from strBuffer
removalBytes = cpLength;
}
done = true;
} else {
// did not see newline:
sawCarriage = buffer[offset] == CR;
}
}
if (!done) {
copyToStrBuffer(buffer, originalOffset, end - originalOffset);
offset = end;
}
}
int strLength = strBufferIndex + removalBytes;
strBufferIndex = 0;
return new String(strBuffer, 0, strLength, charset);
} | [
"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"
] | [
"Deletes a redirect by id\n\n@param id redirect ID",
"This method should be called after all column have been added to the report.\n@param numgroups\n@return",
"Sets the protocol, hostname and port to connect to.\n\n@param protocol the protocol to use\n@param hostname the host name\n@param port the port\n\n@return the builder",
"Join the Collection of Strings using the specified delimiter.\n\n@param s\nThe String collection\n@param delimiter\nThe delimiter String\n@return The joined String",
"Adds the given some-value restriction to the list of restrictions that\nshould still be serialized. The given resource will be used as a subject.\n\n@param subject\n@param propertyUri\n@param rangeUri",
"Finds out which dump files of the given type are available for download.\nThe result is a list of objects that describe the available dump files,\nin descending order by their date. Not all of the dumps included might be\nactually available.\n\n@return list of objects that provide information on available full dumps",
"Throws an exception if the current thread is not a GL thread.\n\n@since 1.6.5",
"Return a new instance of the BufferedImage\n\n@return BufferedImage",
"Format the message using the pattern and the arguments.\n\n@param pattern the pattern in the format of \"{1} this is a {2}\"\n@param arguments the arguments.\n@return the formatted result."
] |
public double mean() {
double total = 0;
final int N = getNumElements();
for( int i = 0; i < N; i++ ) {
total += get(i);
}
return total/N;
} | [
"Computes the mean or average of all the elements.\n\n@return mean"
] | [
"Use this API to unset the properties of inatparam resource.\nProperties that need to be unset are specified in args array.",
"Returns an iban with replaced check digit.\n\n@param iban The iban\n@return The iban without the check digit",
"Use this API to add inat resources.",
"Retrieve a duration in the form required by Primavera.\n\n@param duration Duration instance\n@return formatted duration",
"Transforms user name and icon size into the image path.\n\n@param name the user name\n@param size IconSize to get icon for\n\n@return the path",
"Get the names of all current registered providers.\n\n@return the names of all current registered providers, never null.",
"don't run on main thread",
"Add the given query parameters.\n@param params the params\n@return this UriComponentsBuilder",
"Perform the merge\n\n@param stereotypeAnnotations The stereotype annotations"
] |
public static List<Object> listOfEntities(SharedSessionContractImplementor session, Type[] resultTypes, ClosableIterator<Tuple> tuples) {
Class<?> returnedClass = resultTypes[0].getReturnedClass();
TupleBasedEntityLoader loader = getLoader( session, returnedClass );
OgmLoadingContext ogmLoadingContext = new OgmLoadingContext();
ogmLoadingContext.setTuples( getTuplesAsList( tuples ) );
return loader.loadEntitiesFromTuples( session, LockOptions.NONE, ogmLoadingContext );
} | [
"At the moment we only support the case where one entity type is returned"
] | [
"Creates a project shared with the given team.\n\nReturns the full record of the newly created project.\n\n@param team The team to create the project in.\n@return Request object",
"Entry point for recursive resolution of an expression and all of its\nnested expressions.\n\n@todo Ensure unresolvable expressions don't trigger infinite recursion.",
"Returns status message.\n\n@param user CmsUser\n@param disabled boolean\n@param newUser boolean\n@return String",
"The point that is the GOLDEN_SECTION along the way from a to b.\na may be less or greater than b, you find the point 60-odd percent\nof the way from a to b.\n\n@param a Interval minimum\n@param b Interval maximum\n@return The GOLDEN_SECTION along the way from a to b.",
"Converts an image in RGB mode to BINARY mode\n\n@param img image\n@param threshold grays cale threshold\n@return new MarvinImage instance in BINARY mode",
"Set default value\nWill try to retrieve phone number from device",
"Add a greeting to the specified guestbook.",
"Helper to read an optional String value list.\n@param path The XML path of the element to read.\n@return The String list stored in the XML, or <code>null</code> if the value could not be read.",
"Replies the elements of the left map without the pairs in the right map.\nIf the pair's values differ from\nthe value within the map, the map entry is not removed.\n\n<p>\nThe difference is an immutable\nsnapshot of the state of the maps at the time this method is called. It\nwill never change, even if the maps change at a later time.\n</p>\n\n<p>\nSince this method uses {@code HashMap} instances internally, the keys of\nthe supplied maps must be well-behaved with respect to\n{@link Object#equals} and {@link Object#hashCode}.\n</p>\n\n@param <K> type of the map keys.\n@param <V> type of the map values.\n@param left the map to update.\n@param right the pairs to remove.\n@return the map with the content of the left map except the pairs of the right map.\n@since 2.15"
] |
public static final String[] getRequiredSolrFields() {
if (null == m_requiredSolrFields) {
List<Locale> locales = OpenCms.getLocaleManager().getAvailableLocales();
m_requiredSolrFields = new String[14 + (locales.size() * 6)];
int count = 0;
m_requiredSolrFields[count++] = CmsSearchField.FIELD_PATH;
m_requiredSolrFields[count++] = CmsSearchField.FIELD_TYPE;
m_requiredSolrFields[count++] = CmsSearchField.FIELD_DATE_CREATED;
m_requiredSolrFields[count++] = CmsSearchField.FIELD_DATE_LASTMODIFIED;
m_requiredSolrFields[count++] = CmsSearchField.FIELD_DATE_EXPIRED;
m_requiredSolrFields[count++] = CmsSearchField.FIELD_DATE_RELEASED;
m_requiredSolrFields[count++] = CmsSearchField.FIELD_SIZE;
m_requiredSolrFields[count++] = CmsSearchField.FIELD_STATE;
m_requiredSolrFields[count++] = CmsSearchField.FIELD_USER_CREATED;
m_requiredSolrFields[count++] = CmsSearchField.FIELD_ID;
m_requiredSolrFields[count++] = CmsSearchField.FIELD_USER_LAST_MODIFIED;
m_requiredSolrFields[count++] = CmsSearchField.FIELD_ADDITIONAL_INFO;
m_requiredSolrFields[count++] = CmsSearchField.FIELD_CONTAINER_TYPES;
m_requiredSolrFields[count++] = CmsSearchField.FIELD_RESOURCE_LOCALES;
for (Locale locale : locales) {
m_requiredSolrFields[count++] = CmsSearchFieldConfiguration.getLocaleExtendedName(
CmsSearchField.FIELD_TITLE_UNSTORED,
locale.toString()) + "_s";
m_requiredSolrFields[count++] = CmsSearchFieldConfiguration.getLocaleExtendedName(
CmsPropertyDefinition.PROPERTY_TITLE,
locale.toString()) + CmsSearchField.FIELD_DYNAMIC_PROPERTIES_DIRECT + "_s";
m_requiredSolrFields[count++] = CmsPropertyDefinition.PROPERTY_TITLE
+ CmsSearchField.FIELD_DYNAMIC_PROPERTIES_DIRECT
+ "_s";
m_requiredSolrFields[count++] = CmsSearchFieldConfiguration.getLocaleExtendedName(
CmsSearchField.FIELD_DESCRIPTION,
locale.toString()) + "_s";
m_requiredSolrFields[count++] = CmsSearchFieldConfiguration.getLocaleExtendedName(
CmsPropertyDefinition.PROPERTY_DESCRIPTION,
locale.toString()) + CmsSearchField.FIELD_DYNAMIC_PROPERTIES + "_s";
m_requiredSolrFields[count++] = CmsPropertyDefinition.PROPERTY_DESCRIPTION
+ CmsSearchField.FIELD_DYNAMIC_PROPERTIES
+ "_s";
}
}
return m_requiredSolrFields;
} | [
"Returns the list of Solr fields a search result must have to initialize the gallery search result correctly.\n@return the list of Solr fields."
] | [
"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.",
"Convert event type.\n\n@param eventType the event type\n@return the event enum type",
"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",
"host.xml",
"Add a property with the given name and the given list of values to this Properties object. Name\nand values are trimmed before the property is added.\n\n@param name the name of the property, must not be <code>null</code>.\n@param values the values of the property, must no be <code>null</code>,\nnone of the values must be <code>null</code>",
"Log a fatal message.",
"Retrieve an instance of the TaskField class based on the data read from an\nMPX file.\n\n@param value value from an MS Project file\n@return TaskField instance",
"Adds a basic LHS OPERATOR RHS block.\n\n@param list parent criteria list\n@param block current block",
"Restores the dropout descriptor to a previously saved-off state"
] |
private List<Entity> runQuery(Query query) throws DatastoreException {
RunQueryRequest.Builder request = RunQueryRequest.newBuilder();
request.setQuery(query);
RunQueryResponse response = datastore.runQuery(request.build());
if (response.getBatch().getMoreResults() == QueryResultBatch.MoreResultsType.NOT_FINISHED) {
System.err.println("WARNING: partial results\n");
}
List<EntityResult> results = response.getBatch().getEntityResultsList();
List<Entity> entities = new ArrayList<Entity>(results.size());
for (EntityResult result : results) {
entities.add(result.getEntity());
}
return entities;
} | [
"Run a query on the datastore.\n\n@return The entities returned by the query.\n@throws DatastoreException on error"
] | [
"Updates the gatewayDirection attributes of all gateways.\n@param def",
"Remove multiple fields from the map\n@param fields the fields to remove\n@return the number of fields removed",
"Examines the list of variables for any unknown variables and throws an exception if one is found",
"Return configuration tweaks in a format appropriate for ness-jdbc DatabaseModule.",
"Return the name of the current conf set\n@return the conf set name",
"Connects to a child JVM process\n\n@param p the process to which to connect\n@param startAgent whether to installed the JMX agent in the target process if not already in place\n@return an {@link MBeanServerConnection} to the process's MBean server",
"FOR internal use. This method was called before the external transaction was completed.\n\nThis method was called by the JTA-TxManager before the JTA-tx prepare call. Within this method\nwe prepare odmg for commit and pass all modified persistent objects to DB and release/close the used\nconnection. We have to close the connection in this method, because the TxManager does prepare for commit\nafter this method and all used DataSource-connections have to be closed before.\n\n@see javax.transaction.Synchronization",
"Attach all project models within the application to the index. This will make it easy to navigate from the\nprojectModel to the application index.",
"Creates AzureAsyncOperation from the given HTTP response.\n\n@param serializerAdapter the adapter to use for deserialization\n@param response the response\n@return the async operation object\n@throws CloudException if the deserialization fails or response contains invalid body"
] |
public Equation process( String equation , boolean debug ) {
compile(equation,true,debug).perform();
return this;
} | [
"Compiles and performs the provided equation.\n\n@param equation String in simple equation format"
] | [
"Copy a subsequence of Bytes to specific byte array. Uses the specified offset in the dest byte\narray to start the copy.\n\n@param start index of subsequence start (inclusive)\n@param end index of subsequence end (exclusive)\n@param dest destination array\n@param destPos starting position in the destination data.\n@exception IndexOutOfBoundsException if copying would cause access of data outside array\nbounds.\n@exception NullPointerException if either <code>src</code> or <code>dest</code> is\n<code>null</code>.\n@since 1.1.0",
"Converts an integer into a time format.\n\n@param format integer format value\n@return TimeUnit instance",
"Reads characters until any 'end' character is encountered, ignoring\nescape sequences.\n\n@param out\nThe StringBuilder to write to.\n@param in\nThe Input String.\n@param start\nStarting position.\n@param end\nEnd characters.\n@return The new position or -1 if no 'end' char was found.",
"Creates metadata on this folder using a specified scope and template.\n\n@param templateName the name of the metadata template.\n@param scope the scope of the template (usually \"global\" or \"enterprise\").\n@param metadata the new metadata values.\n@return the metadata returned from the server.",
"Returns the coupon payment of the period with the given index. The analytic model is needed in case of floating bonds.\n\n@param periodIndex The index of the period of interest.\n@param model The model under which the product is valued.\n@return The value of the coupon payment in the given period.",
"Used to populate Map with given annotations\n\n@param annotations initial value for annotations",
"Creates a descriptor for the bundle in the same folder where the bundle files are located.\n@throws CmsException thrown if creation fails.",
"Use this API to save nsconfig.",
"Clears the handler hierarchy."
] |
static Path resolvePath(final Path base, final String... paths) {
return Paths.get(base.toString(), paths);
} | [
"Resolves a path relative to the base path.\n\n@param base the base path\n@param paths paths relative to the base directory\n\n@return the resolved path"
] | [
"visibility increased for testing",
"Returns an entry with the given proposal and the prefix from the context, or null if the proposal is not valid.",
"Read an optional JSON array.\n@param json the JSON Object that has the array as element\n@param key the key for the array in the provided JSON object\n@return the array or null if reading the array fails.",
"Create a WebMBeanAdaptor for a specified MBean name.\n@param mBeanName the MBean name (can be URL-encoded).\n@param encoding the string encoding to be used (i.e. UTF-8)\n@return the created WebMBeanAdaptor.\n@throws JMException Java Management Exception\n@throws UnsupportedEncodingException if the encoding is not supported.",
"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.",
"Checks to make sure that pseudo scoped beans (i.e. @Dependent scoped beans) have no circular dependencies.",
"Set source url for a server\n\n@param newUrl new URL\n@param id Server ID",
"Detect new objects.",
"This method is used to retrieve the calendar associated\nwith a task. If no calendar is associated with a task, this method\nreturns null.\n\n@param task MSPDI task\n@return calendar instance"
] |
public List<DbLicense> getModuleLicenses(final String moduleId,
final LicenseMatcher licenseMatcher) {
final DbModule module = getModule(moduleId);
final List<DbLicense> licenses = new ArrayList<>();
final FiltersHolder filters = new FiltersHolder();
final ArtifactHandler artifactHandler = new ArtifactHandler(repositoryHandler, licenseMatcher);
for (final String gavc : DataUtils.getAllArtifacts(module)) {
licenses.addAll(artifactHandler.getArtifactLicenses(gavc, filters));
}
return licenses;
} | [
"Return a licenses view of the targeted module\n\n@param moduleId String\n@return List<DbLicense>"
] | [
"This filter adds rounded corners to the image using the specified color as the background.\n\n@param radiusInner amount of pixels to use as radius.\n@param radiusOuter specifies the second value for the ellipse used for the radius. Use 0 for\nno value.\n@param color fill color for clipped region.",
"Generated the report.",
"Processes an object cache tag.\n\n@param template The template\n@param attributes The attributes of the tag\n@exception XDocletException If an error occurs\[email protected] type=\"content\"\[email protected] name=\"attributes\" optional=\"true\" description=\"Attributes of the object-cache as name-value pairs 'name=value',\[email protected] name=\"class\" optional=\"false\" description=\"The object cache implementation\"\[email protected] name=\"documentation\" optional=\"true\" description=\"Documentation on the object cache\"",
"Performs a streaming request against a Stitch app server determined by the deployment model\nof the underlying app. Throws a Stitch specific exception if the request fails.\n\n@param stitchReq the request to perform.\n@return an {@link EventStream} that will provide response events.",
"Adds a row to the internal storage, indexed by primary key.\n\n@param uniqueID unique ID of the row\n@param map row data as a simpe map",
"Creates a curator built using Application's zookeeper connection string. Root path will start\nat Fluo application chroot.",
"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",
"Append a Handler to every parent of the given class\n@param parent The class of the parents to add the child to\n@param child The Handler to add.",
"Attempt to shutdown the server. As much shutdown as possible will be\ncompleted, even if intermediate errors are encountered.\n\n@throws VoldemortException"
] |
private PersistentResourceXMLDescription getSimpleMapperParser() {
if (version.equals(Version.VERSION_1_0)) {
return simpleMapperParser_1_0;
} else if (version.equals(Version.VERSION_1_1)) {
return simpleMapperParser_1_1;
}
return simpleMapperParser;
} | [
"1.0 version of parser is different at simple mapperParser"
] | [
"Delivers the correct JSON Object for the Bounds\n\n@param bounds\n@throws org.json.JSONException",
"Sets up and declares internal data structures.\n\n@param diag Diagonal elements from tridiagonal matrix. Modified.\n@param off Off diagonal elements from tridiagonal matrix. Modified.\n@param numCols number of columns (and rows) in the matrix.",
"Get the QNames of the port components to be declared\nin the namespaces\n\n@return collection of QNames",
"Build a request URL.\n\n@param host\nThe host\n@param port\nThe port\n@param path\nThe path\n@param parameters\nThe parameters\n@return The URL\n@throws MalformedURLException\n@deprecated use {@link #buildSecureUrl(java.lang.String, int, java.lang.String, java.util.Map) }",
"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",
"Answer the foreign key query to retrieve the collection\ndefined by CollectionDescriptor",
"Applies the given filter to each of the given elems, and returns the\nlist of elems that were accepted. The runtime type of the returned\narray is the same as the passed in array.",
"This method retrieves a string of the specified type,\nbelonging to the item with the specified unique ID.\n\n@param id unique ID of entity to which this data belongs\n@param type data type identifier\n@return required string data",
"Set a Background Drawable using the appropriate Android version api call\n\n@param view\n@param drawable"
] |
protected void clearStatementCaches(boolean internalClose) {
if (this.statementCachingEnabled){ // safety
if (internalClose){
this.callableStatementCache.clear();
this.preparedStatementCache.clear();
} else {
if (this.pool.closeConnectionWatch){ // debugging enabled?
this.callableStatementCache.checkForProperClosure();
this.preparedStatementCache.checkForProperClosure();
}
}
}
} | [
"Clears out the statement handles.\n@param internalClose if true, close the inner statement handle too."
] | [
"Performs a remote service method invocation. This method is called by\ngenerated proxy classes.\n\n@param <T> return type for the AsyncCallback\n@param responseReader instance used to read the return value of the\ninvocation\n@param requestData payload that encodes the addressing and arguments of the\nRPC call\n@param callback callback handler\n\n@return a {@link Request} object that can be used to track the request",
"Returns a ReportWriter that which will use memory or a file depending on the parameter PAGES_THRESHOLD\n@param _jasperPrint\n@param _format\n@param _parameters\n@return",
"Read a FastTrack file.\n\n@param file FastTrack file",
"Generates an expression from a variable\n@param var The variable from which to generate the expression\n@return A expression that represents the given variable",
"Calculates the length of the next block of RTF data.\n\n@param text RTF data\n@param offset current offset into this data\n@return block length",
"Use this API to fetch the statistics of all ipseccounters_stats resources that are configured on netscaler.",
"Get the time zone for a specific exchange suffix\n\n@param suffix suffix for the exchange in YahooFinance\n@return time zone of the exchange",
"Use this API to update nsip6.",
"Attempt to send the specified field to the dbserver.\nThis low-level function is available only to the package itself for use in setting up the connection. It was\npreviously also used for sending parts of larger-scale messages, but because that sometimes led to them being\nfragmented into multiple network packets, and Windows rekordbox cannot handle that, full message sending no\nlonger uses this method.\n\n@param field the field to be sent\n\n@throws IOException if the field cannot be sent"
] |
protected I_CmsSearchConfigurationFacetField parseFieldFacet(JSONObject fieldFacetObject) {
try {
String field = fieldFacetObject.getString(JSON_KEY_FACET_FIELD);
String name = parseOptionalStringValue(fieldFacetObject, JSON_KEY_FACET_NAME);
String label = parseOptionalStringValue(fieldFacetObject, JSON_KEY_FACET_LABEL);
Integer minCount = parseOptionalIntValue(fieldFacetObject, JSON_KEY_FACET_MINCOUNT);
Integer limit = parseOptionalIntValue(fieldFacetObject, JSON_KEY_FACET_LIMIT);
String prefix = parseOptionalStringValue(fieldFacetObject, JSON_KEY_FACET_PREFIX);
String sorder = parseOptionalStringValue(fieldFacetObject, JSON_KEY_FACET_ORDER);
I_CmsSearchConfigurationFacet.SortOrder order;
try {
order = I_CmsSearchConfigurationFacet.SortOrder.valueOf(sorder);
} catch (Exception e) {
order = null;
}
String filterQueryModifier = parseOptionalStringValue(fieldFacetObject, JSON_KEY_FACET_FILTERQUERYMODIFIER);
Boolean isAndFacet = parseOptionalBooleanValue(fieldFacetObject, JSON_KEY_FACET_ISANDFACET);
List<String> preselection = parseOptionalStringValues(fieldFacetObject, JSON_KEY_FACET_PRESELECTION);
Boolean ignoreFilterAllFacetFilters = parseOptionalBooleanValue(
fieldFacetObject,
JSON_KEY_FACET_IGNOREALLFACETFILTERS);
return new CmsSearchConfigurationFacetField(
field,
name,
minCount,
limit,
prefix,
label,
order,
filterQueryModifier,
isAndFacet,
preselection,
ignoreFilterAllFacetFilters);
} catch (JSONException e) {
LOG.error(
Messages.get().getBundle().key(Messages.ERR_FIELD_FACET_MANDATORY_KEY_MISSING_1, JSON_KEY_FACET_FIELD),
e);
return null;
}
} | [
"Parses the field facet configurations.\n@param fieldFacetObject The JSON sub-node with the field facet configurations.\n@return The field facet configurations."
] | [
"Obtains a local date in Discordian calendar system from the\nproleptic-year, month-of-year and day-of-month fields.\n\n@param prolepticYear the proleptic-year\n@param month the month-of-year\n@param dayOfMonth the day-of-month\n@return the Discordian local date, not null\n@throws DateTimeException if unable to create the date",
"Lift a Java Func0 to a Scala Function0\n\n@param f the function to lift\n\n@returns the Scala function",
"Builds the data structures that show the effects of the plan by server group",
"Set the weekdays at which the event should take place.\n@param weekDays the weekdays at which the event should take place.",
"Returns list of files matches specified regex in specified directories\n\n@param regex to match file names\n@param directories to find\n@return list of files matches specified regex in specified directories",
"Converts a row major block matrix into a row major matrix.\n\n@param src Original DMatrixRBlock.. Not modified.\n@param dst Equivalent DMatrixRMaj. Modified.",
"If task completed success or failure from response.\n\n@param myResponse\nthe my response\n@return true, if successful",
"Configs created by this ConfigBuilder will use the given Redis sentinels.\n\n@param sentinels the Redis set of sentinels\n@return this ConfigBuilder",
"Use this API to fetch all the aaaparameter resources that are configured on netscaler."
] |
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"
] | [
"Recursively searches for formatting annotations.\n\n@param visitedTypes used to prevent an endless loop\n@param parameterName",
"Support the range subscript operator for String with IntRange\n\n@param text a String\n@param range an IntRange\n@return the resulting String\n@since 1.0",
"This method is called on every reference that is in the .class file.\n@param typeReference\n@return",
"Reports that a node is faulted.\n\n@param faulted the node faulted\n@param throwable the reason for fault",
"Iterates over all the documents, adding each to the given target.\n\n@param target the collection to insert into\n@param <A> the collection type\n@return the target",
"Adds one or several attributes to facet on for the next queries.\n\n@param attributes one or more attribute names.\n@return this {@link Searcher} for chaining.",
"Returns iterable with all non-deleted file version legal holds for this legal hold policy.\n@param limit the limit of entries per response. The default value is 100.\n@param fields the fields to retrieve.\n@return an iterable containing file version legal holds info.",
"Compute singular values and U and V at the same time",
"Applies the given codec registry to be used alongside the default codec registry.\n\n@param codecRegistry the codec registry to merge in.\n@return an {@link StitchObjectMapper} with the merged codec registries."
] |
private static void logVersionWarnings(String label1, String version1, String label2, String version2) {
if (version1 == null) {
if (version2 != null) {
warning(null, "Unknown version", " for {}, version for {} is '{}'", new Object[] { label1, label2,
version2 });
}
} else {
if (version2 == null) {
warning(null, "Unknown version", " for {}, version for {} is '{}'", new Object[] { label2, label1,
version1 });
} else if (!version1.equals(version2)) {
warning(null, "Mismatched versions", ": {} is '{}', while {} is '{}'", new Object[] { label1, version1,
label2, version2 });
}
}
} | [
"Log error information"
] | [
"Extracts location result from intent object\n\n@param intent valid intent object\n@return location result.\n@since 1.1.0",
"Retrieve an instance of the ResourceField class based on the data read from an\nMS Project file.\n\n@param value value from an MS Project file\n@return ResourceField instance",
"Gets the appropriate cache dir\n\n@param ctx\n@return",
"Create a hazard curve from given times and given discount factors using default interpolation and extrapolation methods.\n\n@param name The name of this hazard curve.\n@param times Array of times as doubles.\n@param givenSurvivalProbabilities Array of corresponding survival probabilities.\n@return A new discount factor object.",
"Copies a classworlds file to a temporary location either on the local filesystem or on a slave depending on the\nnode type.\n\n@return The path of the classworlds.conf file",
"Creates the tables according to the schema files.\n\n@throws PlatformException If some error occurred",
"Creates a jrxml file\n\n@param dr\n@param layoutManager\n@param _parameters\n@param xmlEncoding (default is UTF-8 )\n@param outputStream\n@throws JRException",
"Returns a single template.\n\n@param id id of the template to retrieve.\n@return {@link Response}\n\n@throws RequestException if request to transloadit server fails.\n@throws LocalOperationException if something goes wrong while running non-http operations.",
"In common shader cases, NaN makes little sense. Correspondingly, GVRF is\ngoing to use Float.NaN as illegal flag in many cases. Therefore, we need\na function to check if there is any setX that is using NaN as input.\n\n@param parameterName\nThe name of the user-supplied parameter that we are validating\nso that the user can easily find the error in their code.\n@param data\nA single float data.\n@throws IllegalArgumentException\nif the data includes NaN."
] |
private void lockLocalization(Locale l) throws CmsException {
if (null == m_lockedBundleFiles.get(l)) {
LockedFile lf = LockedFile.lockResource(m_cms, m_bundleFiles.get(l));
m_lockedBundleFiles.put(l, lf);
}
} | [
"Locks the bundle file that contains the translation for the provided locale.\n@param l the locale for which the bundle file should be locked.\n@throws CmsException thrown if locking fails."
] | [
"mark a node as blacklisted\n\n@param nodeId Integer node id of the node to be blacklisted",
"Sorts the specified list itself according to the order induced by applying a key function to each element which\nyields a comparable criteria.\n\n@param list\nthe list to be sorted. May not be <code>null</code>.\n@param key\nthe key function to-be-used. May not be <code>null</code>.\n@return the sorted list itself.\n@see Collections#sort(List)",
"Write the config to the writer.",
"Mark for creation all newly introduced dependent references.\nMark for deletion all nullified dependent references.\n@return the list of created objects",
"Return all option names that not already have a value\nand is enabled",
"Update the name of a script\n\n@param id ID of script\n@param name new name\n@return updated script\n@throws Exception exception",
"Sets the initial MoificationState of the wrapped object myObj. The initial state will be StateNewDirty if myObj\nis not persisten already. The state will be set to StateOldClean if the object is already persistent.",
"convert a param object to a multimap.\n\n@param objectParams the parameters to convert.\n@return the corresponding Multimap.",
"Maps the text representation of column data to Java types.\n\n@param table table name\n@param column column name\n@param data text representation of column data\n@param type column data type\n@param epochDateFormat true if date is represented as an offset from an epoch\n@return Java representation of column data\n@throws MPXJException"
] |
public Metadata setMetadata(String templateName, String scope, Metadata metadata) {
Metadata metadataValue = null;
try {
metadataValue = this.createMetadata(templateName, scope, metadata);
} catch (BoxAPIException e) {
if (e.getResponseCode() == 409) {
Metadata metadataToUpdate = new Metadata(scope, templateName);
for (JsonValue value : metadata.getOperations()) {
if (value.asObject().get("value").isNumber()) {
metadataToUpdate.add(value.asObject().get("path").asString(),
value.asObject().get("value").asFloat());
} else if (value.asObject().get("value").isString()) {
metadataToUpdate.add(value.asObject().get("path").asString(),
value.asObject().get("value").asString());
} else if (value.asObject().get("value").isArray()) {
ArrayList<String> list = new ArrayList<String>();
for (JsonValue jsonValue : value.asObject().get("value").asArray()) {
list.add(jsonValue.asString());
}
metadataToUpdate.add(value.asObject().get("path").asString(), list);
}
}
metadataValue = this.updateMetadata(metadataToUpdate);
}
}
return metadataValue;
} | [
"Sets the provided metadata on the folder, overwriting any existing metadata keys already present.\n\n@param templateName the name of the metadata template.\n@param scope the scope of the template (usually \"global\" or \"enterprise\").\n@param metadata the new metadata values.\n@return the metadata returned from the server."
] | [
"Returns status help message.\n\n@param user CmsUser\n@param disabled boolean\n@param newUser boolean\n@return String",
"Use this API to update dbdbprofile.",
"use the design parameters to compute the constraint equation to get the value",
"Get an exception reporting an unexpected end tag for an XML element.\n@param reader the stream reader\n@return the exception",
"Checks the given class descriptor for correct row-reader setting.\n\n@param classDef The class descriptor\n@param checkLevel The current check level (this constraint is only checked in strict)\n@exception ConstraintException If the constraint has been violated",
"Use this API to fetch crvserver_binding resource of given name .",
"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",
"Reads baseline values for the current task.\n\n@param xmlTask MSPDI task instance\n@param mpxjTask MPXJ task instance\n@param durationFormat duration format to use",
"Retrieve a finish date.\n\n@param data byte array\n@param offset offset into byte array\n@return finish date"
] |
public synchronized void addRange(final float range, final GVRSceneObject sceneObject)
{
if (null == sceneObject) {
throw new IllegalArgumentException("sceneObject must be specified!");
}
if (range < 0) {
throw new IllegalArgumentException("range cannot be negative");
}
final int size = mRanges.size();
final float rangePow2 = range*range;
final Object[] newElement = new Object[] {rangePow2, sceneObject};
for (int i = 0; i < size; ++i) {
final Object[] el = mRanges.get(i);
final Float r = (Float)el[0];
if (r > rangePow2) {
mRanges.add(i, newElement);
break;
}
}
if (mRanges.size() == size) {
mRanges.add(newElement);
}
final GVRSceneObject owner = getOwnerObject();
if (null != owner) {
owner.addChildObject(sceneObject);
}
} | [
"Add a range to this LOD group. Specify the scene object that should be displayed in this\nrange. Add the LOG group as a component to the parent scene object. The scene objects\nassociated with each range will automatically be added as children to the parent.\n@param range show the scene object if the camera distance is greater than this value\n@param sceneObject scene object that should be rendered when in this range\n@throws IllegalArgumentException if range is negative or sceneObject null"
] | [
"Read hints from a file and merge with the given hints map.",
"Main method, handles all the setup tasks for DataGenerator a user would normally do themselves\n\n@param args command line arguments",
"Specify the string and the int identifying which word shaper to\nuse and this returns the result of using that wordshaper on the String.\n\n@param inStr String to calculate word shape of\n@param wordShaper Constant for which shaping formula to use\n@param knownLCWords A Collection of known lowercase words, which some shapers use\nto decide the class of capitalized words.\n<i>Note: while this code works with any Collection, you should\nprovide a Set for decent performance.</i> If this parameter is\nnull or empty, then this option is not used (capitalized words\nare treated the same, regardless of whether the lowercased\nversion of the String has been seen).\n@return The wordshape String",
"Writes a list of UDF types.\n\n@author lsong\n@param type parent entity type\n@param mpxj parent entity\n@return list of UDFAssignmentType instances",
"Check the given JWT\n\n@param jwtString the JSON Web Token\n@return the parsed and verified token or null if token is invalid\n@throws ParseException if the token cannot be parsed",
"Resolve the targeted license thanks to the license ID\nReturn null if no license is matching the licenseId\n\n@param licenseId\n@return DbLicense",
"Returns a diagonal matrix with the specified diagonal elements.\n@param values values of diagonal elements\n@return A diagonal matrix",
"Use this API to add nssimpleacl.",
"Return the Renderer class associated to the prototype.\n\n@param prototypeClass used to search the renderer in the prototypes collection.\n@return the prototype index associated to the prototypeClass."
] |
public Client findClient(String clientUUID, Integer profileId) throws Exception {
Client client = null;
/* ERROR CODE: 500 WHEN TRYING TO DELETE A SERVER GROUP.
THIS APPEARS TO BE BECAUSE CLIENT UUID IS NULL.
*/
/* CODE ADDED TO PREVENT NULL POINTERS. */
if (clientUUID == null) {
clientUUID = "";
}
// first see if the clientUUID is actually a uuid.. it might be a friendlyName and need conversion
/* A UUID IS A UNIVERSALLY UNIQUE IDENTIFIER. */
if (clientUUID.compareTo(Constants.PROFILE_CLIENT_DEFAULT_ID) != 0 &&
!clientUUID.matches("[\\w]{8}-[\\w]{4}-[\\w]{4}-[\\w]{4}-[\\w]{12}")) {
Client tmpClient = this.findClientFromFriendlyName(profileId, clientUUID);
// if we can't find a client then fall back to the default ID
if (tmpClient == null) {
clientUUID = Constants.PROFILE_CLIENT_DEFAULT_ID;
} else {
return tmpClient;
}
}
PreparedStatement statement = null;
ResultSet results = null;
try (Connection sqlConnection = sqlService.getConnection()) {
String queryString = "SELECT * FROM " + Constants.DB_TABLE_CLIENT +
" WHERE " + Constants.CLIENT_CLIENT_UUID + " = ?";
if (profileId != null) {
queryString += " AND " + Constants.GENERIC_PROFILE_ID + "=?";
}
statement = sqlConnection.prepareStatement(queryString);
statement.setString(1, clientUUID);
if (profileId != null) {
statement.setInt(2, profileId);
}
results = statement.executeQuery();
if (results.next()) {
client = this.getClientFromResultSet(results);
}
} catch (Exception e) {
throw e;
} finally {
try {
if (results != null) {
results.close();
}
} catch (Exception e) {
}
try {
if (statement != null) {
statement.close();
}
} catch (Exception e) {
}
}
return client;
} | [
"Returns a Client object for a clientUUID and profileId\n\n@param clientUUID UUID or friendlyName of client\n@param profileId - can be null, safer if it is not null\n@return Client object or null\n@throws Exception exception"
] | [
"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",
"Get the exception message using the requested locale.\n\n@param locale locale for message\n@return exception message",
"Get the default provider used.\n\n@return the default provider, never {@code null}.",
"Performs a HTTP DELETE request.\n\n@return {@link Response}",
"Use this API to fetch authorizationpolicylabel_binding resource of given name .",
"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 organization of a given module\n\n@return Organization",
"Sets the Red, Green, and Blue color variables. This will automatically populate the Hue, Saturation and Brightness and Hexadecimal fields, too.\n\nThe RGB color model is an additive color model in which red, green, and blue light are added together in various ways to reproduce a broad array of colors. The name of the model comes from the initials of the three additive primary colors, red, green, and blue.\n@param red strength - valid range is 0-255\n@param green strength - valid range is 0-255\n@param blue strength - valid range is 0-255\n@throws java.lang.Exception Exception if the Red, Green or Blue variables are out of range.",
"Remember the order of execution"
] |
public static String capitalize( String text ) {
if( text == null || text.isEmpty() ) {
return text;
}
return text.substring( 0, 1 ).toUpperCase().concat( text.substring( 1, text.length() ) );
} | [
"Returns the given text with the first letter in upper case.\n\n<h2>Examples:</h2>\n<pre>\ncapitalize(\"hi\") == \"Hi\"\ncapitalize(\"Hi\") == \"Hi\"\ncapitalize(\"hi there\") == \"hi there\"\ncapitalize(\"\") == \"\"\ncapitalize(null) == null\n</pre>\n@param text the text to capitalize\n@return text with the first letter in upper case"
] | [
"Replace a photo from a File.\n\n@param file\n@param flickrId\n@param async\n@return photoId or ticketId\n@throws FlickrException",
"Use this API to delete dnstxtrec of given name.",
"Add an empty work week.\n\n@return new work week",
"Deploys application reading resources from specified InputStream.\n\n@param inputStream where resources are read\n@throws IOException",
"Use this API to add cmppolicylabel resources.",
"Add an additional SSExtension\n@param ssExt the ssextension to set",
"Read the tag structure from the provided stream.",
"adds the qualified names to the export-package attribute, if not already\npresent.\n\n@param packages - passing parameterized packages is not supported",
"Use this API to delete gslbsite of given name."
] |
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
final ServicesAttachment servicesAttachment = deploymentUnit.getAttachment(Attachments.SERVICES);
if (servicesAttachment == null || servicesAttachment.getServiceImplementations(ServiceActivator.class.getName()).isEmpty()) {
return; // Skip it if it has not been marked
}
final Module module = deploymentUnit.getAttachment(Attachments.MODULE);
if (module == null) {
return; // Skip deployments with no module
}
AttachmentList<DeploymentUnit> duList = deploymentUnit.getAttachment(Attachments.SUB_DEPLOYMENTS);
List<String> serviceAcitvatorList = new ArrayList<String>();
if (duList!=null && !duList.isEmpty()) {
for (DeploymentUnit du : duList) {
ServicesAttachment duServicesAttachment = du.getAttachment(Attachments.SERVICES);
for (String serv : duServicesAttachment.getServiceImplementations(ServiceActivator.class.getName())) {
serviceAcitvatorList.add(serv);
}
}
}
ServiceRegistry serviceRegistry = phaseContext.getServiceRegistry();
if (WildFlySecurityManager.isChecking()) {
//service registry allows you to modify internal server state across all deployments
//if a security manager is present we use a version that has permission checks
serviceRegistry = new SecuredServiceRegistry(serviceRegistry);
}
final ServiceActivatorContext serviceActivatorContext = new ServiceActivatorContextImpl(phaseContext.getServiceTarget(), serviceRegistry);
final ClassLoader current = WildFlySecurityManager.getCurrentContextClassLoaderPrivileged();
try {
WildFlySecurityManager.setCurrentContextClassLoaderPrivileged(module.getClassLoader());
for (ServiceActivator serviceActivator : module.loadService(ServiceActivator.class)) {
try {
for (String serv : servicesAttachment.getServiceImplementations(ServiceActivator.class.getName())) {
if (serv.compareTo(serviceActivator.getClass().getName()) == 0 && !serviceAcitvatorList.contains(serv)) {
serviceActivator.activate(serviceActivatorContext);
break;
}
}
} catch (ServiceRegistryException e) {
throw new DeploymentUnitProcessingException(e);
}
}
} finally {
WildFlySecurityManager.setCurrentContextClassLoaderPrivileged(current);
}
} | [
"If the deployment has a module attached it will ask the module to load the ServiceActivator services.\n\n@param phaseContext the deployment unit context"
] | [
"Parse the XML for a collection as returned by getTree call.\n\n@param collectionElement\n@return",
"Returns a string to resolve apostrophe issue in xpath\n\n@param text\n@return the apostrophe resolved xpath value string",
"Notifies that multiple content items are changed.\n\n@param positionStart the position.\n@param itemCount the item count.",
"Checks if a given number is in the range of a short.\n\n@param number\na number which should be in the range of a short (positive or negative)\n\n@see java.lang.Short#MIN_VALUE\n@see java.lang.Short#MAX_VALUE\n\n@return number as a short (rounding might occur)",
"This method computes the eigen vector with the largest eigen value by using the\ndirect power method. This technique is the easiest to implement, but the slowest to converge.\nWorks only if all the eigenvalues are real.\n\n@param A The matrix. Not modified.\n@return If it converged or not.",
"If a given x is into an interval of the partition, this method returns the reference point of the corresponding interval.\nIf the given x is not contained in any interval of the partition, this method returns x.\n\n@param x The point of interest.\n@return The discretized value.",
"Validate the header signature.\n\n@param input The input to read the signature from\n@throws IOException If any read problems occur",
"Get a list of all methods.\n\n@return The method names\n@throws FlickrException",
"Build query string.\n@return Query string or null if query string contains no parameters at all."
] |
public String[] getItemsSelected() {
List<String> selected = new LinkedList<>();
for (int i = getIndexOffset(); i < listBox.getItemCount(); i++) {
if (listBox.isItemSelected(i)) {
selected.add(listBox.getValue(i));
}
}
return selected.toArray(new String[selected.size()]);
} | [
"Returns all selected values of the list box, or empty array if none.\n\n@return the selected values of the list box"
] | [
"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.",
"Gets the invalid message.\n\n@param key the key\n@return the invalid message",
"Retrieve the default mapping between MPXJ task fields and Primavera wbs field names.\n\n@return mapping",
"Prepares a Jetty server for communicating with consumers.",
"Load the available layers.\n\n@param image the installed image\n@param productConfig the product config to establish the identity\n@param moduleRoots the module roots\n@param bundleRoots the bundle roots\n@return the layers\n@throws IOException",
"Create and return a new Violation for this rule and the specified import\n@param sourceCode - the SourceCode\n@param importNode - the ImportNode for the import triggering the violation\n@return a new Violation object",
"Add an index on the given collection and field\n\n@param collection the collection to use for the index\n@param field the field to use for the index\n@param asc the sorting direction. <code>true</code> to sort ascending; <code>false</code> to sort descending\n@param background iff <code>true</code> the index is created in the background",
"set the layout which will host the ScrimInsetsFrameLayout and its layoutParams\n\n@param container\n@param layoutParams\n@return",
"if |a11-a22| >> |a12+a21| there might be a better way. see pg371"
] |
public int getCrossZonePartitionStoreMoves() {
int xzonePartitionStoreMoves = 0;
for (RebalanceTaskInfo info : batchPlan) {
Node donorNode = finalCluster.getNodeById(info.getDonorId());
Node stealerNode = finalCluster.getNodeById(info.getStealerId());
if(donorNode.getZoneId() != stealerNode.getZoneId()) {
xzonePartitionStoreMoves += info.getPartitionStoreMoves();
}
}
return xzonePartitionStoreMoves;
} | [
"Determines total number of partition-stores moved across zones.\n\n@return number of cross zone partition-store moves"
] | [
"Initialize current thread's JobContext using specified copy\n@param origin the original job context",
"Converts to credentials for use in Grgit.\n@return {@code null} if both username and password are {@code null},\notherwise returns credentials in Grgit format.",
"Returns all headers with the headers from the Payload\n\n@return All the headers",
"Transmits the SerialMessage to a single Z-Wave Node.\nSets the transmission options as well.\n@param serialMessage the Serial message to send.",
"Invoked periodically.",
"This method is called recursively to write a task and its child tasks\nto the JSON file.\n\n@param task task to write",
"converts a java.net.URI into a string representation with empty authority, if absent and has file scheme.",
"very big duct tape",
"The metadata cache can become huge over time. This simply flushes it periodically."
] |
public float getBoundsWidth() {
if (mSceneObject != null) {
GVRSceneObject.BoundingVolume v = mSceneObject.getBoundingVolume();
return v.maxCorner.x - v.minCorner.x;
}
return 0f;
} | [
"Gets Widget bounds width\n@return width"
] | [
"Painter the tile, by building a URL where the image can be found.\n\n@param tile\nMust be an instance of {@link InternalTile}, and must have a non-null {@link RasterUrlBuilder}.\n@return Returns a {@link InternalTile}.",
"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",
"Get the available sizes of a Photo.\n\nThe boolean toggle allows to (api-)sign the call.\n\nThis way the calling user can retrieve sizes for <b>his own</b> private photos.\n\n@param photoId\nThe photo ID\n@param sign\ntoggle to allow optionally signing the call (Authenticate)\n@return A collection of {@link Size}\n@throws FlickrException",
"Remove a key for all language versions. If a descriptor is present, the key is only removed in the descriptor.\n\n@param key the key to remove.\n@return <code>true</code> if removing was successful, <code>false</code> otherwise.",
"Create the navigation frame.\n@param outputDirectory The target directory for the generated file(s).",
"In-place scaling of a column in A\n\n@param alpha scale factor\n@param A matrix\n@param col which row in A",
"Ensures that the given collection descriptor has the collection-class property if necessary.\n\n@param collDef The collection descriptor\n@param checkLevel The current check level (this constraint is checked in basic (partly) and strict)\n@exception ConstraintException If collection-class is given for an array or if no collection-class is given but required",
"Create and serialize a WorkerStatus for a pause event.\n\n@return the JSON representation of a new WorkerStatus\n@throws IOException if there was an error serializing the WorkerStatus",
"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."
] |
public String getRejectionLogMessageId() {
String id = logMessageId;
if (id == null) {
id = getRejectionLogMessage(Collections.<String, ModelNode>emptyMap());
}
logMessageId = id;
return logMessageId;
} | [
"Returns the log message id used by this checker. This is used to group it so that all attributes failing a type of rejction\nend up in the same error message. This default implementation uses the formatted log message with an empty attribute map as the id.\n\n@return the log message id"
] | [
"Use this API to fetch auditsyslogpolicy_lbvserver_binding resources of given name .",
"Gets an iterable of all the collections for the given user.\n@param api the API connection to be used when retrieving the collections.\n@return an iterable containing info about all the collections.",
"With the QR algorithm it is possible for the found singular values to be negative. This\nmakes them all positive by multiplying it by a diagonal matrix that has",
"Calculate start dates for a yearly recurrence.\n\n@param calendar current date\n@param dates array of start dates",
"Use this API to fetch responderpolicy_binding resource of given name .",
"Starts the transition",
"Fetch a value from the Hashmap .\n\n@param firstKey\nfirst key\n@param secondKey\nsecond key\n@return the element or null.",
"Given the key, figures out which partition on the local node hosts the key.\n\n@param key\n@return",
"Use this API to fetch csvserver_appflowpolicy_binding resources of given name ."
] |
public CollectionRequest<Story> findByTask(String task) {
String path = String.format("/tasks/%s/stories", task);
return new CollectionRequest<Story>(this, Story.class, path, "GET");
} | [
"Returns the compact records for all stories on the task.\n\n@param task Globally unique identifier for the task.\n@return Request object"
] | [
"Use this API to clear bridgetable resources.",
"Load the related repositories, plugins and a promotion config associated to the buildId.\nCalled from the UI.\n\n@param buildId - The unique build id.\n@return LoadBuildsResponse e.g. list of repositories, plugins and a promotion config.",
"Obtains a Discordian zoned date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the Discordian zoned date-time, not null\n@throws DateTimeException if unable to create the date-time",
"Checks the given class descriptor for correct procedure settings.\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",
"Adds a string reference, a class reference, a method type, a module\nor a package to the constant pool of the class being build.\nDoes nothing if the constant pool already contains a similar item.\n\n@param type\na type among STR, CLASS, MTYPE, MODULE or PACKAGE\n@param value\nstring value of the reference.\n@return a new or already existing reference item.",
"Sets up Log4J to write log messages to the console. Low-priority messages\nare logged to stdout while high-priority messages go to stderr.",
"Prints to a file. If the file does not exist, rewrites the file;\ndoes not append.",
"Appends the given string encoding special HTML characters.\n\n@param out\nThe StringBuilder to write to.\n@param in\nInput String.\n@param start\nInput String starting position.\n@param end\nInput String end position.",
"Emit an enum event with parameters supplied.\n\nThis will invoke all {@link SimpleEventListener} bound to the specific\nenum value and all {@link SimpleEventListener} bound to the enum class\ngiven the listeners has the matching argument list.\n\nFor example, given the following enum definition:\n\n```java\npublic enum UserActivity {LOGIN, LOGOUT}\n```\n\nWe have the following simple event listener methods:\n\n```java\n{@literal @}OnEvent\npublic void handleUserActivity(UserActivity, User user) {...}\n\n{@literal @}OnUserActivity(UserActivity.LOGIN)\npublic void logUserLogin(User user, long timestamp) {...}\n\n{@literal @}OnUserActivity(UserActivity.LOGOUT)\npublic void logUserLogout(User user) {...}\n```\n\nThe following code will invoke `logUserLogin` method:\n\n```java\nUser user = ...;\neventBus.emit(UserActivity.LOGIN, user, System.currentTimeMills());\n```\n\nThe `handleUserActivity` is not invoked because\n\n* The method parameter `(UserActivity, User, long)` does not match the declared argument list `(UserActivity, User)`\n\nWhile the following code will invoke both `handleUserActivity` and `logUserLogout` methods:\n\n```java\nUser user = ...;\neventBus.emit(UserActivity.LOGOUT, user);\n```\n\nThe `logUserLogin` method will not be invoked because\n\n1. the method is bound to `UserActivity.LOGIN` enum value specifically, while `LOGOUT` is triggered\n2. the method has a `long timestamp` in the argument list and it is not passed to `eventBus.emit`\n\n@param event\nthe target event\n@param args\nthe arguments passed in\n@see SimpleEventListener"
] |
public static boolean isCacheSafe(Class<?> clazz, ClassLoader classLoader) {
Assert.notNull(clazz, "Class must not be null");
try {
ClassLoader target = clazz.getClassLoader();
if (target == null) {
return true;
}
ClassLoader cur = classLoader;
if (cur == target) {
return true;
}
while (cur != null) {
cur = cur.getParent();
if (cur == target) {
return true;
}
}
return false;
}
catch (SecurityException ex) {
// Probably from the system ClassLoader - let's consider it safe.
return true;
}
} | [
"Check whether the given class is cache-safe in the given context,\ni.e. whether it is loaded by the given ClassLoader or a parent of it.\n@param clazz the class to analyze\n@param classLoader the ClassLoader to potentially cache metadata in"
] | [
"Returns the screen width in pixels\n\n@param context is the context to get the resources\n@return the screen width in pixels",
"Returns the end time of the event.\n@return the end time of the event.",
"Use this API to fetch statistics of gslbservice_stats resource of given name .",
"Get path ID for a given profileId and pathName\n\n@param pathName Name of path\n@param profileId ID of profile\n@return ID of path",
"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.",
"Updates the Q matrix to take inaccount the row that was removed by only multiplying e\nlements that need to be. There is still some room for improvement here...\n@param rowIndex",
"Get the relative path.\n\n@return the relative path",
"After cluster management operations, i.e. reset quota and recover quota\nenforcement settings",
"Checks whether the given field definition is used as the primary key of a class referenced by\na reference.\n\n@param modelDef The model\n@param fieldDef The current field descriptor def\n@return The reference that uses the field or <code>null</code> if the field is not used in this way"
] |
public BoxFile.Info restoreFile(String fileID) {
URL url = RESTORE_FILE_URL_TEMPLATE.build(this.api.getBaseURL(), fileID);
BoxAPIRequest request = new BoxAPIRequest(this.api, url, "POST");
JsonObject requestJSON = new JsonObject()
.add("", "");
request.setBody(requestJSON.toString());
BoxJSONResponse response = (BoxJSONResponse) request.send();
JsonObject responseJSON = JsonObject.readFrom(response.getJSON());
BoxFile restoredFile = new BoxFile(this.api, responseJSON.get("id").asString());
return restoredFile.new Info(responseJSON);
} | [
"Restores a trashed file back to its original location.\n@param fileID the ID of the trashed file.\n@return info about the restored file."
] | [
"Adds a resource collection with execution hints.",
"Read the projects from a ConceptDraw PROJECT file as top level tasks.\n\n@param cdp ConceptDraw PROJECT file",
"Calculate the value of a caplet assuming the Black'76 model.\n\n@param forward The forward (spot).\n@param volatility The Black'76 volatility.\n@param optionMaturity The option maturity\n@param optionStrike The option strike.\n@param periodLength The period length of the underlying forward rate.\n@param discountFactor The discount factor corresponding to the payment date (option maturity + period length).\n@return Returns the value of a caplet under the Black'76 model",
"Returns a File object whose path is the expected user directory.\nDoes not create or check for existence.\n@param prefix\n@param suffix\n@param parent\n@return",
"Formats a connection string for CLI to use as it's controller connection.\n\n@return the controller string to connect CLI",
"Extracts baseline cost from the MPP file for a specific baseline.\nReturns null if no baseline cost is present, otherwise returns\na list of timephased work items.\n\n@param calendar baseline calendar\n@param normaliser normaliser associated with this data\n@param data timephased baseline work data block\n@param raw flag indicating if this data is to be treated as raw\n@return timephased work",
"add a join between two aliases\n\nTODO BRJ : This needs refactoring, it looks kind of weird\n\nno extents\nA1 -> A2\n\nextents on the right\nA1 -> A2\nA1 -> A2E0\n\nextents on the left : copy alias on right, extents point to copies\nA1 -> A2\nA1E0 -> A2C0\n\nextents on the left and right\nA1 -> A2\nA1 -> A2E0\nA1E0 -> A2C0\nA1E0 -> A2E0C0\n\n@param left\n@param leftKeys\n@param right\n@param rightKeys\n@param outer\n@param name",
"Synchronize the scroll positions of the scrollbars with the actual scroll\nposition of the content.",
"Convert a given date to a floating point date using a given reference date.\n\n@param referenceDate The reference date associated with \\( t=0 \\).\n@param date The given date to be associated with the return value \\( T \\).\n@return The value T measuring the distance of reference date and date by ACT/365 with SECONDS_PER_DAY seconds used as the smallest time unit and SECONDS_PER_DAY is a constant 365*24*60*60."
] |
private String getDateTimeString(Date value)
{
String result = null;
if (value != null)
{
Calendar cal = DateHelper.popCalendar(value);
StringBuilder sb = new StringBuilder(16);
sb.append(m_fourDigitFormat.format(cal.get(Calendar.YEAR)));
sb.append(m_twoDigitFormat.format(cal.get(Calendar.MONTH) + 1));
sb.append(m_twoDigitFormat.format(cal.get(Calendar.DAY_OF_MONTH)));
sb.append('T');
sb.append(m_twoDigitFormat.format(cal.get(Calendar.HOUR_OF_DAY)));
sb.append(m_twoDigitFormat.format(cal.get(Calendar.MINUTE)));
sb.append(m_twoDigitFormat.format(cal.get(Calendar.SECOND)));
sb.append('Z');
result = sb.toString();
DateHelper.pushCalendar(cal);
}
return result;
} | [
"Convert a Java date into a Planner date-time string.\n\n20070222T080000Z\n\n@param value Java date\n@return Planner date-time string"
] | [
"Convert a date to the String representation we use in the JSON.\n@param d the date to convert\n@return the String representation we use in the JSON.",
"Starting with the given column index, will return the first column index\nwhich contains a colour that does not match the given color.",
"Create and return a new Violation for this rule and the specified import className and alias\n@param sourceCode - the SourceCode\n@param className - the class name (as specified within the import statement)\n@param alias - the alias for the import statement\n@param violationMessage - the violation message; may be null\n@return a new Violation object",
"Helper to read an optional String value.\n@param path The XML path of the element to read.\n@return The String value stored in the XML, or <code>null</code> if the value could not be read.",
"Called when the surface is created or recreated. Avoided because this can\nbe called twice at the beginning.",
"Add a collaborator to an app.\n@param appName App name. See {@link #listApps} for a list of apps that can be used.\n@param collaborator Username of the collaborator to add. This is usually in the form of \"[email protected]\".",
"converts Map of data to json string\n\n@param data map data to converted to json\n@return {@link String}",
"Add new control at the end of control bar with specified touch listener, control label 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 label the control label\n@param listener touch listener",
"Return a new instance of the BufferedImage\n\n@return BufferedImage"
] |
public Object materializeObject(ClassDescriptor cld, Identity oid)
throws PersistenceBrokerException
{
final StatementManagerIF sm = broker.serviceStatementManager();
final SelectStatement sql = broker.serviceSqlGenerator().getPreparedSelectByPkStatement(cld);
Object result = null;
PreparedStatement stmt = null;
ResultSet rs = null;
try
{
stmt = sm.getSelectByPKStatement(cld);
if (stmt == null)
{
logger.error("getSelectByPKStatement returned a null statement");
throw new PersistenceBrokerException("getSelectByPKStatement returned a null statement");
}
/*
arminw: currently a select by PK could never be a stored procedure,
thus we can always set 'false'. Is this correct??
*/
sm.bindSelect(stmt, oid, cld, false);
rs = stmt.executeQuery();
// data available read object, else return null
ResultSetAndStatement rs_stmt = new ResultSetAndStatement(broker.serviceStatementManager(), stmt, rs, sql);
if (rs.next())
{
Map row = new HashMap();
cld.getRowReader().readObjectArrayFrom(rs_stmt, row);
result = cld.getRowReader().readObjectFrom(row);
}
// close resources
rs_stmt.close();
}
catch (PersistenceBrokerException e)
{
// release resources on exception
sm.closeResources(stmt, rs);
logger.error("PersistenceBrokerException during the execution of materializeObject: " + e.getMessage(), e);
throw e;
}
catch (SQLException e)
{
// release resources on exception
sm.closeResources(stmt, rs);
throw ExceptionHelper.generateException(e, sql.getStatement(), cld, logger, null);
}
return result;
} | [
"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."
] | [
"Obtains a local date in Ethiopic calendar system from the\nera, year-of-era and day-of-year fields.\n\n@param era the Ethiopic era, not null\n@param yearOfEra the year-of-era\n@param dayOfYear the day-of-year\n@return the Ethiopic local date, not null\n@throws DateTimeException if unable to create the date\n@throws ClassCastException if the {@code era} is not a {@code EthiopicEra}",
"Given an array of variable names, returns an Xml String\nof values.\n\n@param dataMap an map containing variable names and their corresponding values\nnames.\n@param dataMap\n@return values in Xml format",
"Calls a function script associated with this component.\nThe function is called even if the component\nis not enabled and not attached to a scene object.\n@param funcName name of script function to call.\n@param args function parameters as an array of objects.\n@return true if function was called, false if no such function\n@see org.gearvrf.script.GVRScriptFile#invokeFunction(String, Object[]) invokeFunction",
"Checks if a parameter exists. If it exists, it is left untouched. If it doesn't, it is created. Only works for parameters which key\nis unique. Must be called from within an open transaction.",
"Test a given date for being easter sunday.\n\nThe method uses the algorithms sometimes cited as Meeus,Jones, Butcher Gregorian algorithm.\nTaken from http://en.wikipedia.org/wiki/Computus\n\n@param date The date to check.\n@return True, if date is easter sunday.",
"Parses the dictionary from an InputStream.\n\n@param client The SolrClient instance object.\n@param lang The language of the dictionary.\n@param is The InputStream object.\n@param documents List to put the assembled SolrInputObjects into.\n@param closeStream boolean flag that determines whether to close the inputstream\nor not.",
"StartMain passes in the command line args here.\n\n@param args The command line arguments. If null is given then an empty\narray will be used instead.",
"This method is called to format a priority.\n\n@param value priority instance\n@return formatted priority value",
"Gets the groupby for ReportQueries of all Criteria and Sub Criteria\nthe elements are of class FieldHelper\n@return List of FieldHelper"
] |
Subsets and Splits