query
stringlengths 74
6.1k
| positive
sequencelengths 1
1
| negative
sequencelengths 9
9
|
---|---|---|
public ItemRequest<Tag> createInWorkspace(String workspace) {
String path = String.format("/workspaces/%s/tags", workspace);
return new ItemRequest<Tag>(this, Tag.class, path, "POST");
} | [
"Creates a new tag in a workspace or organization.\n\nEvery tag is required to be created in a specific workspace or\norganization, and this cannot be changed once set. Note that you can use\nthe `workspace` parameter regardless of whether or not it is an\norganization.\n\nReturns the full record of the newly created tag.\n\n@param workspace The workspace or organization to create the tag in.\n@return Request object"
] | [
"Finish configuration.",
"Adds OPT_Z | OPT_ZONE option to OptionParser, with one argument.\n\n@param parser OptionParser to be modified\n@param required Tells if this option is required or optional",
"Emit information about all of suite's tests.",
"Set virtual host so the server can direct the request. Value is the host header if it is set, otherwise\nuse the hostname from the original request.\n\n@param httpMethodProxyRequest\n@param httpServletRequest",
"Parse an extended attribute value.\n\n@param file parent file\n@param mpx parent entity\n@param value string value\n@param mpxFieldID field ID\n@param durationFormat duration format associated with the extended attribute",
"Returns a new instance of the given class using the constructor with the specified parameter.\n\n@param target The class to instantiate\n@param type The types of the single parameter of the constructor\n@param arg The argument\n@return The instance",
"Checks the given class descriptor.\n\n@param classDef The class descriptor\n@param checkLevel The amount of checks to perform\n@exception ConstraintException If a constraint has been violated",
"Not implemented.\n@param point1 Point1\n@param point2 Point2\n@return Throws an exception.",
"Add tables to the tree.\n\n@param parentNode parent tree node\n@param file tables container"
] |
private <T> T readIntoBean(final T bean, final String[] nameMapping, final CellProcessor[] processors)
throws IOException {
if( readRow() ) {
if( nameMapping.length != length() ) {
throw new IllegalArgumentException(String.format(
"the nameMapping array and the number of columns read "
+ "should be the same size (nameMapping length = %d, columns = %d)", nameMapping.length,
length()));
}
if( processors == null ) {
processedColumns.clear();
processedColumns.addAll(getColumns());
} else {
executeProcessors(processedColumns, processors);
}
return populateBean(bean, nameMapping);
}
return null; // EOF
} | [
"Reads a row of a CSV file and populates the bean, using the supplied name mapping to map column values to the\nappropriate fields. If processors are supplied then they are used, otherwise the raw String values will be used.\n\n@param bean\nthe bean to populate\n@param nameMapping\nthe name mapping array\n@param processors\nthe (optional) cell processors\n@return the populated bean, or null if EOF was reached\n@throws IllegalArgumentException\nif nameMapping.length != number of CSV columns read\n@throws IOException\nif an I/O error occurred\n@throws NullPointerException\nif bean or nameMapping are null\n@throws SuperCsvConstraintViolationException\nif a CellProcessor constraint failed\n@throws SuperCsvException\nif there was a general exception while reading/processing\n@throws SuperCsvReflectionException\nif there was an reflection exception while mapping the values to the bean"
] | [
"Use this API to fetch all the dnsnsecrec resources that are configured on netscaler.",
"This procedure sets permissions to the given file to not allow everybody to read it.\n\nOnly when underlying OS allows the change.\n\n@param file File to set permissions",
"Check whether the URL start with one of the given prefixes.\n\n@param uri URI\n@param patterns possible prefixes\n@return true when URL starts with one of the prefixes",
"Determines if the version should be incremented based on the module resources' modification dates.\n\n@param cms the CMS context\n@return true if the version number should be incremented\n\n@throws CmsException if something goes wrong",
"Suite prologue.",
"Set a knot blend type.\n@param n the knot index\n@param type the knot blend type\n@see #getKnotBlend",
"Unescape and unquote the path. Ready for translation.",
"Use this API to update sslparameter.",
"Get a reader implementation class to perform API calls with while specifying\nan explicit page size for paginated API calls. This gets translated to a per_page=\nparameter on API requests. Note that Canvas does not guarantee it will honor this page size request.\nThere is an explicit maximum page size on the server side which could change. The default page size\nis 10 which can be limiting when, for example, trying to get all users in a 800 person course.\n@param type Interface type you wish to get an implementation for\n@param oauthToken An OAuth token to use for authentication when making API calls\n@param paginationPageSize Requested pagination page size\n@param <T> The reader type to request an instance of\n@return An instance of the requested reader class"
] |
public void setTargetBytecode(String version) {
if (CompilerConfiguration.PRE_JDK5.equals(version) || CompilerConfiguration.POST_JDK5.equals(version)) {
this.targetBytecode = version;
}
} | [
"Sets the bytecode compatibility mode\n\n@param version the bytecode compatibility mode"
] | [
"Return a key to identify the connection descriptor.",
"Handle slop for nodes that are no longer part of the cluster. It may not\nalways be the case. For example, shrinking a zone or deleting a store.",
"Invokes the exit logger if and only if no ExitLogger was previously invoked.\n@param logger the logger. Cannot be {@code null}",
"Set ViewPort visibility of the object.\n\n@see ViewPortVisibility\n@param viewportVisibility\nThe ViewPort visibility of the object.\n@return {@code true} if the ViewPort visibility was changed, {@code false} if it\nwasn't.",
"Compares this value with the specified object for order. Returns a negative\ninteger, zero, or a positive integer as this value is less than, equal to, or\ngreater than the specified value.\n@param other Another Rational value.\n@return A negative integer, zero, or a positive integer as this value is less\nthan, equal to, or greater than the specified value.",
"overridden in ipv6 to handle zone",
"Create a single node representing an embedded element.\n\n@param executionEngine the {@link GraphDatabaseService} used to run the query\n@param columnValues the values in {@link org.hibernate.ogm.model.key.spi.EntityKey#getColumnValues()}\n@return the corresponding node;",
"Sets the bounds of a UIObject, moving and sizing to match the\nbounds specified. Currently used for the itemhover and useful\nfor other absolutely positioned elements.",
"Use this API to fetch bridgegroup_vlan_binding resources of given name ."
] |
private void addProperties(final PropertyDescriptor[] _properties) throws ColumnBuilderException, ClassNotFoundException {
for (final PropertyDescriptor property : _properties) {
if (isValidProperty(property)) {
addColumn(getColumnTitle(property), property.getName(), property.getPropertyType().getName(), getColumnWidth(property));
}
}
setUseFullPageWidth(true);
} | [
"Adds columns for the specified properties.\n@param _properties the array of <code>PropertyDescriptor</code>s to be added.\n@throws ColumnBuilderException if an error occurs.\n@throws ClassNotFoundException if an error occurs."
] | [
"Pass a model object and return a SoyMapData if a model object happens\nto be a SoyMapData.\n\nAn implementation will also check if a passed in object is a Map and return\na SoyMapData wrapping that map",
"Use this API to disable Interface of given name.",
"Adds a procedure definition to this class descriptor.\n\n@param procDef The procedure definition",
"Returns a pretty printed string of nodes that host specific \"hot\"\npartitions, where hot is defined as following a contiguous run of\npartitions of some length in another zone.\n\n@param cluster The cluster to analyze\n@param hotContiguityCutoff cutoff below which a contiguous run is not\nhot.\n@return pretty string of hot partitions",
"Generate a unique ID across the cluster\n@return generated ID",
"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.",
"Gets the current instance of plugin manager\n\n@return PluginManager",
"Check that the parameter string is not null or empty\n\n@param value\nString value to be checked.\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@throws IllegalArgumentException\nIf the key is null or empty.",
"Creates an association row representing the given entry and adds it to the association managed by the given\npersister."
] |
public static lbvserver_stats get(nitro_service service, String name) throws Exception{
lbvserver_stats obj = new lbvserver_stats();
obj.set_name(name);
lbvserver_stats response = (lbvserver_stats) obj.stat_resource(service);
return response;
} | [
"Use this API to fetch statistics of lbvserver_stats resource of given name ."
] | [
"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",
"Updates the indices in the index buffer from a Java char array.\nAll of the entries of the input char array are copied into\nthe storage for the index buffer. The new indices must be the\nsame size as the old indices - the index buffer size cannot be changed.\n@param data char array containing the new values\n@throws IllegalArgumentException if char array is wrong size",
"Use this API to fetch the statistics of all cmppolicylabel_stats resources that are configured on netscaler.",
"Parses the list of query items for the query facet.\n@param queryFacetObject JSON object representing the node with the query facet.\n@return list of query options\n@throws JSONException if the list cannot be parsed.",
"returns controller if a new device is found",
"Parses whole value as list attribute\n@deprecated in favour of using {@link AttributeParser attribute parser}\n@param value String with \",\" separated string elements\n@param operation operation to with this list elements are added\n@param reader xml reader from where reading is be done\n@throws XMLStreamException if {@code value} is not valid",
"Returns an English label for a given datatype.\n\n@param datatype\nthe datatype to label\n@return the label",
"Use this API to add clusternodegroup.",
"Gets constructors with given annotation type\n\n@param annotationType The annotation type to match\n@return A set of abstracted constructors with given annotation type. If\nthe constructors set is empty, initialize it first. Returns an\nempty set if there are no matches.\n@see org.jboss.weld.annotated.enhanced.EnhancedAnnotatedType#getEnhancedConstructors(Class)"
] |
public static void validateObserverMethod(ObserverMethod<?> observerMethod, BeanManager beanManager, ObserverMethod<?> originalObserverMethod) {
Set<Annotation> qualifiers = observerMethod.getObservedQualifiers();
if (observerMethod.getBeanClass() == null) {
throw EventLogger.LOG.observerMethodsMethodReturnsNull("getBeanClass", observerMethod);
}
if (observerMethod.getObservedType() == null) {
throw EventLogger.LOG.observerMethodsMethodReturnsNull("getObservedType", observerMethod);
}
Bindings.validateQualifiers(qualifiers, beanManager, observerMethod, "ObserverMethod.getObservedQualifiers");
if (observerMethod.getReception() == null) {
throw EventLogger.LOG.observerMethodsMethodReturnsNull("getReception", observerMethod);
}
if (observerMethod.getTransactionPhase() == null) {
throw EventLogger.LOG.observerMethodsMethodReturnsNull("getTransactionPhase", observerMethod);
}
if (originalObserverMethod != null && (!observerMethod.getBeanClass().equals(originalObserverMethod.getBeanClass()))) {
throw EventLogger.LOG.beanClassMismatch(originalObserverMethod, observerMethod);
}
if (!(observerMethod instanceof SyntheticObserverMethod) && !hasNotifyOverriden(observerMethod.getClass(), observerMethod)) {
throw EventLogger.LOG.notifyMethodNotImplemented(observerMethod);
}
} | [
"Validates given external observer method.\n\n@param observerMethod the given observer method\n@param beanManager\n@param originalObserverMethod observer method replaced by given observer method (this parameter is optional)"
] | [
"1.5 and on, 2.0 and on, 3.0 and on.",
"Get a list of referrers from a given domain to a photoset.\n\n@param date\n(Required) Stats will be returned for this date. A day according to Flickr Stats starts at midnight GMT for all users, and timestamps will\nautomatically be rounded down to the start of the day.\n@param domain\n(Required) The domain to return referrers for. This should be a hostname (eg: \"flickr.com\") with no protocol or pathname.\n@param photosetId\n(Optional) The id of the photoset to get stats for. If not provided, stats for all sets will be returned.\n@param perPage\n(Optional) Number of domains 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@see \"http://www.flickr.com/services/api/flickr.stats.getPhotosetReferrers.html\"",
"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.",
"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.",
"Sets an attribute in a non-main section of the manifest.\n\n@param section the section's name\n@param name the attribute's name\n@param value the attribute's value\n@return {@code this}\n@throws IllegalStateException if entries have been added or the JAR has been written prior to calling this methods.",
"Propagate onTouchStart events to listeners\n@param hit collision object",
"Use this API to update nsspparams.",
"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.",
"Adds the HIBC prefix and check digit to the specified data, returning the resultant data string.\n\n@see <a href=\"https://sourceforge.net/p/zint/code/ci/master/tree/backend/library.c\">Corresponding Zint code</a>"
] |
public static int getJSONColor(final JSONObject json, String elementName) throws JSONException {
Object raw = json.get(elementName);
return convertJSONColor(raw);
} | [
"Gets a color formatted as an integer with ARGB ordering.\n\n@param json {@link JSONObject} to get the color from\n@param elementName Name of the color element\n@return An ARGB formatted integer\n@throws JSONException"
] | [
"Converts a boolean array containing the pixel data in BINARY mode to an\ninteger array with the pixel data in RGB mode.\n\n@param binaryArray pixel binary data\n@return pixel integer data in RGB mode.",
"Inits the ws client.\n\n@param context the context\n@throws Exception the exception",
"Returns true if the given dump file type contains page revisions and\nfalse if it does not. Dumps that do not contain pages are for auxiliary\ninformation such as linked sites.\n\n@param dumpContentType\nthe type of dump\n@return true if the dumpfile contains revisions\n@throws IllegalArgumentException\nif the given dump file type is not known",
"Adds a command class to the list of supported command classes by this\nendpoint. Does nothing if command class is already added.\n@param commandClass the command class instance to add.",
"Initializes communication with the Z-Wave controller stick.",
"Creates a cube with each face as a separate mesh using a different texture.\nThe meshes will share a common vertex array but will have separate index buffers.\n@param gvrContext context to use for creating cube\n@param facingOut true for outward normals, false for inward normals\n@param vertexDesc string describing which vertex components are desired\n@param textureList list of 6 textures, one for each face",
"Return an input stream to read the data from the named table.\n\n@param name table name\n@return InputStream instance\n@throws IOException",
"Process the deployment root for the manifest.\n\n@param phaseContext the deployment unit context\n@throws DeploymentUnitProcessingException",
"Gets the info for a running build\n\n@param appName See {@link #listApps} for a list of apps that can be used.\n@param buildId the unique identifier of the build"
] |
public int sharedSegments(Triangle t2) {
int counter = 0;
if(a.equals(t2.a)) {
counter++;
}
if(a.equals(t2.b)) {
counter++;
}
if(a.equals(t2.c)) {
counter++;
}
if(b.equals(t2.a)) {
counter++;
}
if(b.equals(t2.b)) {
counter++;
}
if(b.equals(t2.c)) {
counter++;
}
if(c.equals(t2.a)) {
counter++;
}
if(c.equals(t2.b)) {
counter++;
}
if(c.equals(t2.c)) {
counter++;
}
return counter;
} | [
"checks if the 2 triangles shares a segment\n@author Doron Ganel & Eyal Roth(2009)\n@param t2 - a second triangle\n@return boolean"
] | [
"Retrieves a specific range of child items in this folder.\n\n@param offset the index of the first child item to retrieve.\n@param limit the maximum number of children to retrieve after the offset.\n@param fields the fields to retrieve.\n@return a partial collection containing the specified range of child items.",
"Returns the class of datatype URI that best characterizes the range of\nthe given property based on its datatype.\n\n@param propertyIdValue\nthe property for which to get a range\n@return the range URI or null if the datatype could not be identified.",
"Returns an entry with the given proposal and the prefix from the context, or null if the proposal is not valid.",
"Validates the deployment.\n\n@param isDomain {@code true} if this is a domain server, otherwise {@code false}\n\n@throws MojoDeploymentException if the deployment is invalid",
"Receive some bytes from the player we are requesting metadata from.\n\n@param is the input stream associated with the player metadata socket.\n@return the bytes read.\n\n@throws IOException if there is a problem reading the response",
"Sets a new value for a given key. an older value is overwritten.\n@param key a non null key\n@param value the new value",
"Performs an implicit double step given the set of two imaginary eigenvalues provided.\nSince one eigenvalue is the complex conjugate of the other only one set of real and imaginary\nnumbers is needed.\n\n@param x1 upper index of submatrix.\n@param x2 lower index of submatrix.\n@param real Real component of each of the eigenvalues.\n@param img Imaginary component of one of the eigenvalues.",
"Adds an additional alias to the constructed document.\n\n@param text\nthe text of the alias\n@param languageCode\nthe language code of the alias\n@return builder object to continue construction",
"Returns only the leaf categories of the wrapped categories.\n\nThe method assumes that categories are ordered in the list, i.e., parents are directly followed by their children.\n\nNOTE: In the complete category tree a leaf of the wrapped tree part may not be a leaf.\n\n@return only the leaf categories of the wrapped categories."
] |
public String toStringByValue() {
IntArrayList theKeys = new IntArrayList();
keysSortedByValue(theKeys);
StringBuffer buf = new StringBuffer();
buf.append("[");
int maxIndex = theKeys.size() - 1;
for (int i = 0; i <= maxIndex; i++) {
int key = theKeys.get(i);
buf.append(String.valueOf(key));
buf.append("->");
buf.append(String.valueOf(get(key)));
if (i < maxIndex) buf.append(", ");
}
buf.append("]");
return buf.toString();
} | [
"Returns a string representation of the receiver, containing\nthe String representation of each key-value pair, sorted ascending by value."
] | [
"Returns a Pair constructed from X and Y. Convenience method; the\ncompiler will disambiguate the classes used for you so that you\ndon't have to write out potentially long class names.",
"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",
"Copy the contents of the given String to the given output Writer.\nCloses the writer when done.\n@param in the String to copy from\n@param out the Writer to copy to\n@throws IOException in case of I/O errors",
"caching is not supported for this method",
"Convert an object to a collection.\n\n@param mapper the object mapper\n@param source the source object\n@param targetCollectionType the target collection type\n@param targetElementType the target collection element type\n@return collection",
"Iterate through a set of bit field flags and set the value for each one\nin the supplied container.\n\n@param flags bit field flags\n@param container field container\n@param data source data",
"Read custom property definitions for tasks.\n\n@param gpTasks GanttProject tasks",
"Get an SQL condition to match this address section representation\n\n@param builder\n@param columnName\n@return the condition",
"Use this API to fetch all the ntpserver resources that are configured on netscaler."
] |
public static sslcertkey_crldistribution_binding[] get(nitro_service service, String certkey) throws Exception{
sslcertkey_crldistribution_binding obj = new sslcertkey_crldistribution_binding();
obj.set_certkey(certkey);
sslcertkey_crldistribution_binding response[] = (sslcertkey_crldistribution_binding[]) obj.get_resources(service);
return response;
} | [
"Use this API to fetch sslcertkey_crldistribution_binding resources of given name ."
] | [
"This method extracts resource data from an MSPDI file.\n\n@param project Root node of the MSPDI file\n@param calendarMap Map of calendar UIDs to names",
"Only meant to be called once\n\n@throws Exception exception",
"This method allows us to peek into the OLE compound document to extract the file format.\nThis allows the UniversalProjectReader to determine if this is an MPP file, or if\nit is another type of OLE compound document.\n\n@param fs POIFSFileSystem instance\n@return file format name\n@throws IOException",
"Closes off this connection pool.",
"Apply the remote read domain model result.\n\n@param result the domain model result\n@return whether it was applied successfully or not",
"Adds to this set all of the elements in the specified members array\n@param members the members to add\n@return the number of members actually added",
"Test for convergence by seeing if the element with the largest change\nis smaller than the tolerance. In some test cases it alternated between\nthe + and - values of the eigen vector. When this happens it seems to have \"converged\"\nto a non-dominant eigen vector. At least in the case I looked at. I haven't devoted\na lot of time into this issue...",
"Use this API to fetch all the locationfile resources that are configured on netscaler.",
"Utility function that fetches quota types."
] |
private static InterestRateSwapLegProductDescriptor getSwapLegProductDescriptor(Element leg, String forwardCurveName, String discountCurveName,
DayCountConvention daycountConvention) {
boolean isFixed = leg.getElementsByTagName("interestType").item(0).getTextContent().equalsIgnoreCase("FIX");
ArrayList<Period> periods = new ArrayList<>();
ArrayList<Double> notionalsList = new ArrayList<>();
ArrayList<Double> rates = new ArrayList<>();
//extracting data for each period
NodeList periodsXML = leg.getElementsByTagName("incomePayment");
for(int periodIndex = 0; periodIndex < periodsXML.getLength(); periodIndex++) {
Element periodXML = (Element) periodsXML.item(periodIndex);
LocalDate startDate = LocalDate.parse(periodXML.getElementsByTagName("startDate").item(0).getTextContent());
LocalDate endDate = LocalDate.parse(periodXML.getElementsByTagName("endDate").item(0).getTextContent());
LocalDate fixingDate = startDate;
LocalDate paymentDate = LocalDate.parse(periodXML.getElementsByTagName("payDate").item(0).getTextContent());
if(! isFixed) {
fixingDate = LocalDate.parse(periodXML.getElementsByTagName("fixingDate").item(0).getTextContent());
}
periods.add(new Period(fixingDate, paymentDate, startDate, endDate));
double notional = Double.parseDouble(periodXML.getElementsByTagName("nominal").item(0).getTextContent());
notionalsList.add(new Double(notional));
if(isFixed) {
double fixedRate = Double.parseDouble(periodXML.getElementsByTagName("fixedRate").item(0).getTextContent());
rates.add(new Double(fixedRate));
} else {
rates.add(new Double(0));
}
}
ScheduleDescriptor schedule = new ScheduleDescriptor(periods, daycountConvention);
double[] notionals = notionalsList.stream().mapToDouble(Double::doubleValue).toArray();
double[] spreads = rates.stream().mapToDouble(Double::doubleValue).toArray();
return new InterestRateSwapLegProductDescriptor(forwardCurveName, discountCurveName, schedule, notionals, spreads, false);
} | [
"Construct an InterestRateSwapLegProductDescriptor from a node in a FIPXML file.\n\n@param leg The node containing the leg.\n@param forwardCurveName Forward curve name form outside the node.\n@param discountCurveName Discount curve name form outside the node.\n@param daycountConvention Daycount convention from outside the node.\n@return Descriptor of the swap leg."
] | [
"Read properties from the raw header data.\n\n@param stream input stream",
"Returns the response error stream, handling the case when it contains gzipped data.\n@return gzip decoded (if needed) error stream or null",
"delete of files more than 1 day old",
"Use this API to fetch cachecontentgroup resource of given name .",
"Writes the message to the specified channel, for example when creating metadata cache files.\n\n@param channel the channel to which it should be written\n\n@throws IOException if there is a problem writing to the channel",
"Add a Comparator to the end of the chain using the provided sort order.\n@param comparator the Comparator to add to the end of the chain\n@param ascending the sort order: ascending (true) or descending (false)",
"Obtain the master partition for a given key\n\n@param key\n@return master partition id",
"Locates a task within a child task container which matches the supplied UUID.\n\n@param parent child task container\n@param uuid required UUID\n@return Task instance or null if the task is not found",
"Update the currency format.\n\n@param properties project properties\n@param decimalSeparator decimal separator\n@param thousandsSeparator thousands separator"
] |
public static base_response update(nitro_service client, rnatparam resource) throws Exception {
rnatparam updateresource = new rnatparam();
updateresource.tcpproxy = resource.tcpproxy;
return updateresource.update_resource(client);
} | [
"Use this API to update rnatparam."
] | [
"Get the Operation metadata for a single operation on an MBean by name.\n@param operationName the Operation name (can be URL-encoded).\n@return the {@link MBeanOperationInfo} for the operation.\n@throws OperationNotFoundException Method was not found\n@throws UnsupportedEncodingException if the encoding is not supported.",
"Creates a field map for tasks.\n\n@param props props data",
"Polls the next ParsedWord from the stack.\n\n@return next ParsedWord",
"set custom response or request for a profile's default client, ensures profile and path are enabled\n\n@param profileName profileName to modift, default client is used\n@param pathName friendly name of path\n@param isResponse true if response, false for request\n@param customData custom response/request data\n@return true if success, false otherwise",
"Adds a Statement.\n\n@param rank\nrank of the statement\n@param subject\nrdf resource that refers to the statement",
"Print a resource type.\n\n@param value ResourceType instance\n@return resource type value",
"Checks to see if the rows of the provided matrix are linearly independent.\n\n@param A Matrix whose rows are being tested for linear independence.\n@return true if linearly independent and false otherwise.",
"Returns the formula for the percentage\n@param group\n@param type\n@return",
"Loads a PDF document and creates a DOM tree from it.\n@param doc the source document\n@return a DOM Document representing the DOM tree\n@throws IOException"
] |
static boolean uninstall() {
boolean uninstalled = false;
synchronized (lock) {
if (locationCollectionClient != null) {
locationCollectionClient.locationEngineController.onDestroy();
locationCollectionClient.settingsChangeHandlerThread.quit();
locationCollectionClient.sharedPreferences.unregisterOnSharedPreferenceChangeListener(locationCollectionClient);
locationCollectionClient = null;
uninstalled = true;
}
}
return uninstalled;
} | [
"Uninstall current location collection client.\n\n@return true if uninstall was successful"
] | [
"Test for equality.\n@param obj1 the first object\n@param obj2 the second object\n@return true if both are null or the two objects are equal",
"Return true only if the node has the named annotation\n@param node - the AST Node to check\n@param name - the name of the annotation\n@return true only if the node has the named annotation",
"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",
"Validates this string is a valid address, and if not, throws an exception with a descriptive message indicating why it is not.\n@throws AddressStringException",
"Load a properties file from a file path\n\n@param gradlePropertiesFilePath The file path where the gradle.properties is located.\n@return The loaded properties.\n@throws IOException In case an error occurs while reading the properties file, this exception is thrown.",
"A simple helper method that creates a pool of connections to Redis using\nthe supplied configurations.\n\n@param jesqueConfig the config used to create the pooled Jedis connections\n@param poolConfig the config used to create the pool\n@return a configured Pool of Jedis connections",
"Transfer the ownership of an application to another user.\n@param appName App name. See {@link #listApps} for a list of apps that can be used.\n@param to Username of the person to transfer the app to. This is usually in the form of \"[email protected]\".",
"Rewrites the file passed to 'this' constructor so that the actual line numbers match the recipe passed to 'this'\nconstructor.",
"Pool configuration.\n@param props\n@throws HibernateException"
] |
public static String formatTimeISO8601(TimeValue value) {
StringBuilder builder = new StringBuilder();
DecimalFormat yearForm = new DecimalFormat(FORMAT_YEAR);
DecimalFormat timeForm = new DecimalFormat(FORMAT_OTHER);
if (value.getYear() > 0) {
builder.append("+");
}
builder.append(yearForm.format(value.getYear()));
builder.append("-");
builder.append(timeForm.format(value.getMonth()));
builder.append("-");
builder.append(timeForm.format(value.getDay()));
builder.append("T");
builder.append(timeForm.format(value.getHour()));
builder.append(":");
builder.append(timeForm.format(value.getMinute()));
builder.append(":");
builder.append(timeForm.format(value.getSecond()));
builder.append("Z");
return builder.toString();
} | [
"Returns a representation of the date from the value attributes as ISO\n8601 encoding.\n\n@param value\n@return ISO 8601 value (String)"
] | [
"Returns the formula for the percentage\n@param group\n@param type\n@return",
"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.",
"Reads a \"flags\" argument from the request.",
"Rotate the specified photo. The only allowed values for degrees are 90, 180 and 270.\n\n@param photoId\nThe photo ID\n@param degrees\nThe degrees to rotate (90, 170 or 270)",
"Specifies the angle of the effect.\n\n@param angle the angle of the effect.\n@angle",
"Handles incoming Application Update Request.\n@param incomingMessage the request message to process.",
"Called after creating the first connection. The adapter should create its caches and do all initialization it requires. Most\nimportantly, the SQL query cache should be created.\n\n@param cnx\nan open ready to use connection to the database.",
"Determines run length for each 'initial' partition ID. Note that a\ncontiguous run may \"wrap around\" the end of the ring.\n\n@param cluster\n@param zoneId\n@return map of initial partition Id to length of contiguous run of\npartition IDs within the same zone..",
"Use this API to update tmtrafficaction."
] |
protected void ensureDJStyles() {
//first of all, register all parent styles if any
for (Style style : getReport().getStyles().values()) {
addStyleToDesign(style);
}
Style defaultDetailStyle = getReport().getOptions().getDefaultDetailStyle();
Style defaultHeaderStyle = getReport().getOptions().getDefaultHeaderStyle();
for (AbstractColumn column : report.getColumns()) {
if (column.getStyle() == null)
column.setStyle(defaultDetailStyle);
if (column.getHeaderStyle() == null)
column.setHeaderStyle(defaultHeaderStyle);
}
} | [
"Sets a default style for every element that doesn't have one\n\n@throws JRException"
] | [
"creates a point array of all dockers and add it to the current shape\n@param modelJSON\n@param current\n@throws org.json.JSONException",
"Syncronously creates a Renderscript context if none exists.\nCreating a Renderscript context takes about 20 ms in Nexus 5\n\n@return",
"A factory method for users that need to report success without actually running any analysis. The returned\nresult will be successful, but will not contain the actual configurations of extensions.\n\n@return a \"fake\" successful analysis result",
"Here we specify the configuration, starting from default MostUsefulConfiguration, and changing only what is needed",
"Checks if there's exactly one option that exists among all opts.\n\n@param options OptionSet to checked\n@param opts List of options to be checked\n@throws VoldemortException",
"Updates all inverse associations managed by a given entity.",
"Utility method to convert a String to an Integer, and\nhandles null values.\n\n@param value string representation of an integer\n@return int value",
"Add a '>=' clause so the column must be greater-than or equals-to the value.",
"Use this API to update gslbservice resources."
] |
public static base_response delete(nitro_service client, String ciphergroupname) throws Exception {
sslcipher deleteresource = new sslcipher();
deleteresource.ciphergroupname = ciphergroupname;
return deleteresource.delete_resource(client);
} | [
"Use this API to delete sslcipher of given name."
] | [
"Set a callback to handle any exceptions in the chain of execution.\n\n@param callback\nInstance of {@link ErrorCallback}.\n@return Reference to the {@code ExecutionChain}\n@throws IllegalStateException\nif the chain of execution has already been {@link #execute()\nstarted}.",
"Escape a value to be HTML friendly.\n@param value the Object value.\n@return the HTML-escaped String, or <null> if the value is null.",
"Remove any overrides for an endpoint on the default profile, client\n\n@param pathValue path (endpoint) value\n@param requestType path request type. \"GET\", \"POST\", etc\n@return true if success, false otherwise",
"Checks if two claims are equivalent in the sense that they have the same\nmain snak and the same qualifiers, but possibly in a different order.\n\n@param claim1\n@param claim2\n@return true if claims are equivalent",
"Check if the property is part of the identifier of the entity.\n\n@param persister the {@link OgmEntityPersister} of the entity with the property\n@param namesWithoutAlias the path to the property with all the aliases resolved\n@return {@code true} if the property is part of the id, {@code false} otherwise.",
"This method writes data for an individual calendar to a PM XML file.\n\n@param mpxj ProjectCalander instance",
"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.",
"prefix length in this section is ignored when converting to MAC",
"Use this API to fetch all the dnssuffix resources that are configured on netscaler."
] |
public Set<Method> findAnnotatedMethods(String scanBase, Class<? extends Annotation> annotationClass) {
Set<BeanDefinition> filteredComponents = findCandidateBeans(scanBase, annotationClass);
return extractAnnotatedMethods(filteredComponents, annotationClass);
} | [
"Find all methods on classes under scanBase that are annotated with annotationClass.\n\n@param scanBase Package to scan recursively, in dot notation (ie: org.jrugged...)\n@param annotationClass Class of the annotation to search for\n@return Set<Method> The set of all @{java.lang.reflect.Method}s having the annotation"
] | [
"Convert a key-version-nodeSet information to string\n\n@param key The key\n@param versionMap mapping versions to set of PrefixNodes\n@param storeName store's name\n@param partitionId partition scanned\n@return a string that describe the information passed in",
"Cache key calculation.\n@param sql\n@param resultSetType\n@param resultSetConcurrency\n@return cache key",
"Parses the configuration node and provides a pipeline configuration without any extensions marked for loading.\nThe configuration node is supposed to conform to the pipeline configuration JSON schema.\n\n<p>The caller is supposed to use the methods from the builder to add/find extension classes that will be used in\nthe analysis.\n\n<p>Note that the returned pipeline configuration might not contain all the extensions available in\nthe classloader depending on the include/exclude filters in the configuration.\n\n@param json the configuration node\n@return a pipeline configuration parsed from the configuration\n@see Builder#build()",
"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",
"Validate JUnit4 presence in a concrete version.",
"Sets the specified double attribute to the specified value.\n\n@param name name of the attribute\n@param value value of the attribute\n@since 1.9.0",
"Create a new queued pool using the defaults for key of type K, request of\ntype R, and value of Type V.\n\n@param factory The factory that creates objects\n@return The created pool",
"20130512 Converts the sdsm string generated above to Date format.\n\n@param str\nthe str\n@return the date from concise str",
"Notifies that an existing footer item is moved to another position.\n\n@param fromPosition the original position.\n@param toPosition the new position."
] |
public static base_response unset(nitro_service client, cmpparameter resource, String[] args) throws Exception{
cmpparameter unsetresource = new cmpparameter();
return unsetresource.unset_resource(client,args);
} | [
"Use this API to unset the properties of cmpparameter resource.\nProperties that need to be unset are specified in args array."
] | [
"Construct a Access Token from a Flickr Response.\n\n@param response",
"Use this API to fetch vpnvserver_vpnsessionpolicy_binding resources of given name .",
"Compute the location of the generated file from the given trace file.",
"Use this API to fetch statistics of service_stats resource of given name .",
"Returns an input stream that applies the required decompression to the\ngiven input stream.\n\n@param inputStream\nthe input stream with the (possibly compressed) data\n@param compressionType\nthe kind of compression\n@return an input stream with decompressed data\n@throws IOException\nif there was a problem creating the decompression streams",
"Resolve an operation transformer entry.\n\n@param address the address\n@param operationName the operation name\n@param placeholderResolver a placeholder resolver used to resolve children of a placeholder registration\n@return the transformer entry",
"Parse the JSON string and return the object. The string is expected to be the JSON print data from the\nclient.\n\n@param spec the JSON formatted string.\n@return The encapsulated JSON object",
"Given a year, month, and day, find the number of occurrences of that day in the month\n\n@param year the year\n@param month the month\n@param day the day\n@return the number of occurrences of the day in the month",
"Pushes a class type onto the stack from the string representation This can\nalso handle primitives\n\n@param b the bytecode\n@param classType the type descriptor for the class or primitive to push.\nThis will accept both the java.lang.Object form and the\nLjava/lang/Object; form"
] |
public int[] getTenors(int moneynessBP, int maturityInMonths) {
try {
List<Integer> ret = new ArrayList<>();
for(int tenor : getGridNodesPerMoneyness().get(moneynessBP)[1]) {
if(containsEntryFor(maturityInMonths, tenor, moneynessBP)) {
ret.add(tenor);
}
}
return ret.stream().mapToInt(Integer::intValue).toArray();
} catch (NullPointerException e) {
return new int[0];
}
} | [
"Return all valid tenors for a given moneyness and maturity.\n\n@param moneynessBP The moneyness in bp for which to get the tenors.\n@param maturityInMonths The maturities in months for which to get the tenors.\n@return The tenors in months."
] | [
"Gets the list of failed invocations that has been collected by this collector.\n\n@return The failed invocations.",
"Creates a triangular matrix where the amount of fill is randomly selected too.\n\n@param upper true for upper triangular and false for lower\n@param N number of rows and columns\ner * @param minFill minimum fill fraction\n@param maxFill maximum fill fraction\n@param rand random number generator\n@return Random matrix",
"Do post exam of child inside the layout after it has been positioned in parent\n@param dataIndex data index",
"Returns true if\n- includeTags is not empty and tag is in includeTags\n- includeTags is empty and tag is not in excludeTags\n@param tags Hint tags\n@param includeTags Include tags\n@param excludeTags Exclude tags\n@return has tag match",
"Returns the default jdbc type for the given java type.\n\n@param javaType The qualified java type\n@return The default jdbc type",
"Used to map from a var data key to a field type. Note this\nis designed for diagnostic use only, and uses an inefficient search.\n\n@param key var data key\n@return field type",
"Obtain collection of headers to remove\n\n@return\n@throws Exception",
"Write 'properties' map to given log in given level - with pipe separator between each entry\nWrite exception stack trace to 'logger' in 'error' level, if not empty\n@param logger\n@param level - of logging",
"Re-reads the given entity, refreshing any properties updated on the server-side during insert or update."
] |
private ProjectFile handleSQLiteFile(InputStream stream) throws Exception
{
File file = InputStreamHelper.writeStreamToTempFile(stream, ".sqlite");
try
{
Class.forName("org.sqlite.JDBC");
String url = "jdbc:sqlite:" + file.getCanonicalPath();
Set<String> tableNames = populateTableNames(url);
if (tableNames.contains("EXCEPTIONN"))
{
return readProjectFile(new AstaDatabaseFileReader(), file);
}
if (tableNames.contains("PROJWBS"))
{
Connection connection = null;
try
{
Properties props = new Properties();
props.setProperty("date_string_format", "yyyy-MM-dd HH:mm:ss");
connection = DriverManager.getConnection(url, props);
PrimaveraDatabaseReader reader = new PrimaveraDatabaseReader();
reader.setConnection(connection);
addListeners(reader);
return reader.read();
}
finally
{
if (connection != null)
{
connection.close();
}
}
}
if (tableNames.contains("ZSCHEDULEITEM"))
{
return readProjectFile(new MerlinReader(), file);
}
return null;
}
finally
{
FileHelper.deleteQuietly(file);
}
} | [
"We have identified that we have a SQLite file. This could be a Primavera Project database\nor an Asta database. Open the database and use the table names present to determine\nwhich type this is.\n\n@param stream schedule data\n@return ProjectFile instance"
] | [
"Add server redirect to a profile, using current active ServerGroup\n\n@param region region\n@param srcUrl source URL\n@param destUrl destination URL\n@param hostHeader host header\n@param profileId profile ID\n@return ID of added ServerRedirect\n@throws Exception exception",
"Creates dependency on management executor.\n\n@param builder the builder\n@param injector the injector\n@param <T> the parameter type\n@return service builder instance\n@deprecated Use {@link #requireServerExecutor(ServiceBuilder)} instead. This method will be removed in the future.",
"Set the locking values\n@param cld\n@param obj\n@param oldLockingValues",
"Get info for a given topic reply\n\n@param topicId\nUnique identifier of a topic for a given group {@link Topic}.\n@param replyId\nUnique identifier of a reply for a given topic {@link Reply}.\n@return A group topic\n@throws FlickrException\n@see <a href=\"http://www.flickr.com/services/api/flickr.groups.discuss.replies.getInfo.html\">API Documentation</a>",
"Constructs a list of items with given separators.\n\n@param sql\nStringBuilder to which the constructed string will be\nappended.\n@param list\nList of objects (usually strings) to join.\n@param init\nString to be added to the start of the list, before any of the\nitems.\n@param sep\nSeparator string to be added between items in the list.",
"Use this API to delete sslfipskey resources of given names.",
"Loads the asset referenced by the file name\nunder the owner of this component.\nIf this component was constructed to replace the scene with\nthe asset, the scene will contain only the owner of this\ncomponent upon return. Otherwise, the loaded asset is a\nchild of this component's owner.\n\nLoading the asset is performed in a separate thread.\nThis function returns before the asset has finished loading.\nIAssetEvents are emitted to the event listener on the context.\n\n@param scene scene to add the model to, null is permissible\n@return always true",
"This produces a shorter string for the address that uses the canonical representation but not using leading zeroes.\n\nEach address has a unique compressed string.",
"Set the names of six images in the zip file. The default names of the six\nimages are \"posx.png\", \"negx.png\", \"posy.png\", \"negx.png\", \"posz.png\",\nand \"negz.png\". If the names of the six images in the zip file are\ndifferent to the default ones, this function must be called before load\nthe zip file.\n\n@param nameArray\nAn array containing six strings which are names of images\ncorresponding to +x, -x, +y, -y, +z, and -z faces of the cube\nmap texture respectively."
] |
public ReportWriter getReportWriter(final JasperPrint _jasperPrint, final String _format, final Map<JRExporterParameter,Object> _parameters) {
final JRExporter exporter = FormatInfoRegistry.getInstance().getExporter(_format);
exporter.setParameters(_parameters);
if (_jasperPrint.getPages().size() > PAGES_THRESHHOLD) {
return new FileReportWriter(_jasperPrint, exporter);
} else {
return new MemoryReportWriter(_jasperPrint, exporter);
}
} | [
"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"
] | [
"Returns the tags that were root in the definition files. These serve as entry point shortcuts when browsing the graph. We could reduce this to\njust fewer as the root tags may be connected through parents=\"...\".",
"Performs all actions that have been configured.",
"characters callback.",
"Maps a bindingId to its corresponding BindingType.\n@param bindingId\n@return",
"We have received notification that a device is no longer on the network, so clear out its artwork.\n\n@param announcement the packet which reported the device’s disappearance",
"Converts a number of bytes to a human-readable string\n@param bytes the bytes\n@return the human-readable string",
"Delete a module\n\n@param moduleId String",
"Decompiles the given .class file and creates the specified output source file.\n\n@param classFilePath the .class file to be decompiled.\n@param outputDir The directory where decompiled .java files will be placed.",
"Returns a list of Elements form the DOM tree, matching the tag element."
] |
public static void writeCorrelationId(Message message, String correlationId) {
Map<String, List<String>> headers = getOrCreateProtocolHeader(message);
headers.put(CORRELATIONID_HTTP_HEADER_NAME, Collections.singletonList(correlationId));
if (LOG.isLoggable(Level.FINE)) {
LOG.fine("HTTP header '" + CORRELATIONID_HTTP_HEADER_NAME + "' set to: " + correlationId);
}
} | [
"Write correlation id.\n\n@param message the message\n@param correlationId the correlation id"
] | [
"Get the element at the index as an integer.\n\n@param i the index of the element to access",
"Gets id of a property and creates the new one if necessary.\n\n@param txn transaction\n@param propertyName name of the property.\n@param allowCreate if set to true and if there is no property named as propertyName,\ncreate the new id for the propertyName.\n@return < 0 if there is no such property and create=false, else id of the property",
"Use this API to fetch all the route6 resources that are configured on netscaler.",
"Hides the original Java-style method name using an attribute\nwhich should be respected by Visual Studio, the creates a new\nwrapper method using a .Net style method name.\n\nNote that this does not work for VB as it is case insensitive. Even\nthough Visual Studio won't show you the Java-style method name,\nthe VB compiler sees both and thinks they are the same... which\ncauses it to fail.\n\n@param writer output stream\n@param aClass class being processed\n@param methodSet set of methods which have been processed.\n@throws XMLStreamException",
"Use this API to fetch all the vridparam resources that are configured on netscaler.",
"Uploads a new file to this folder with custom upload parameters.\n\n@param uploadParams the custom upload parameters.\n@return the uploaded file's info.",
"Perform construction with custom thread pool size.",
"Set the model used by the right table.\n\n@param model table model",
"Merge the contents of the given plugin.xml into this one."
] |
public void setColorRange(int firstIndex, int lastIndex, int color) {
for (int i = firstIndex; i <= lastIndex; i++)
map[i] = color;
} | [
"Set a range of the colormap to a single color.\n@param firstIndex the position of the first color\n@param lastIndex the position of the second color\n@param color the color"
] | [
"Get the information for a specified photoset.\n\nThis method does not require authentication.\n\n@param photosetId\nThe photoset ID\n@return The Photoset\n@throws FlickrException",
"Don't use input, it's match values might have been reset in the\nloop that looks for the first possible match.\n\n@param pairIndex TODO\n@param result TODO\n@return TODO",
"Generate a sql where-clause matching the contraints defined by the array of fields\n\n@param columns array containing all columns used in WHERE clause",
"This creates a new audit log file with default permissions.\n\n@param file File to create",
"Get the multicast socket address.\n\n@return the multicast address",
"Use this API to fetch csvserver_cachepolicy_binding resources of given name .",
"Classify the tokens in a String. Each sentence becomes a separate document.\nDoesn't override default readerAndWriter.\n\n@param str\nA String with tokens in one or more sentences of text to be\nclassified.\n@return {@link List} of classified sentences (each a List of something that\nextends {@link CoreMap}).",
"Read the project data and return a ProjectFile instance.\n\n@return ProjectFile instance",
"Configure all UI elements in the exceptions panel."
] |
public static <T> void checkAbstractMethods(Set<Type> decoratedTypes, EnhancedAnnotatedType<T> type, BeanManagerImpl beanManager) {
if (decoratedTypes == null) {
decoratedTypes = new HashSet<Type>(type.getInterfaceClosure());
decoratedTypes.remove(Serializable.class);
}
Set<MethodSignature> signatures = new HashSet<MethodSignature>();
for (Type decoratedType : decoratedTypes) {
for (EnhancedAnnotatedMethod<?, ?> method : ClassTransformer.instance(beanManager)
.getEnhancedAnnotatedType(Reflections.getRawType(decoratedType), beanManager.getId()).getEnhancedMethods()) {
signatures.add(method.getSignature());
}
}
for (EnhancedAnnotatedMethod<?, ?> method : type.getEnhancedMethods()) {
if (Reflections.isAbstract(((AnnotatedMethod<?>) method).getJavaMember())) {
MethodSignature methodSignature = method.getSignature();
if (!signatures.contains(methodSignature)) {
throw BeanLogger.LOG.abstractMethodMustMatchDecoratedType(method, Formats.formatAsStackTraceElement(method.getJavaMember()));
}
}
}
} | [
"Check all abstract methods are declared by the decorated types.\n\n@param type\n@param beanManager\n@param delegateType\n@throws DefinitionException If any of the abstract methods is not declared by the decorated types"
] | [
"Removes the specified type from the frame.",
"Write the domain controller's data to an output stream.\n\n@param outstream the output stream\n@throws Exception",
"Mark a PersistenceBroker as preferred choice for current Thread\n\n@param key The PBKey the broker is associated to\n@param broker The PersistenceBroker to mark as current",
"Returns requested content types or default content type if none found.\n\n@return Requested content types or default content type if none found.",
"Returns iterable with all assignments of this retention policy.\n@param limit the limit of entries per response. The default value is 100.\n@param fields the fields to retrieve.\n@return an iterable containing all assignments.",
"Examine the given model node, resolving any expressions found within, including within child nodes.\n\n@param node the node\n@return a node with all expressions resolved\n@throws OperationFailedException if an expression cannot be resolved",
"Adds OPT_N | OPT_NODE option to OptionParser, with multiple arguments.\n\n@param parser OptionParser to be modified\n@param required Tells if this option is required or optional",
"Convert an object to a set.\n\n@param mapper the object mapper\n@param source the source object\n@param targetElementType the target set element type\n@return set",
"Send an error to the client with a message.\n\n@param httpServletResponse the response to send the error to.\n@param message the message to send\n@param code the error code"
] |
public void setFirstOccurence(int min, int max) throws ParseException {
if (fullCondition == null) {
if ((min < 0) || (min > max) || (max < 1)) {
throw new ParseException("Illegal number {" + min + "," + max + "}");
}
if (min == 0) {
firstOptional = true;
}
firstMinimumOccurence = Math.max(1, min);
firstMaximumOccurence = max;
} else {
throw new ParseException("fullCondition already generated");
}
} | [
"Sets the first occurence.\n\n@param min the min\n@param max the max\n@throws ParseException the parse exception"
] | [
"Package-protected method used to initiate operation execution.\n@return the result action",
"Extract schema of the key field",
"Get the minutes difference",
"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}",
"Determines if the queue identified by the given key is used.\n\n@param jedis\nconnection to Redis\n@param key\nthe key that identifies a queue\n@return true if the key is used, false otherwise",
"Calculates a checksum for the specified buffer.\n@param buffer the buffer to calculate.\n@return the checksum value.",
"Validates for non-conflicting roles",
"Read the file header data.\n\n@param is input stream",
"Adds each of the specified followers to the task, if they are not already\nfollowing. Returns the complete, updated record for the affected task.\n\n@param task The task to add followers to.\n@return Request object"
] |
public <T> DiffNode compare(final T working, final T base)
{
dispatcher.resetInstanceMemory();
try
{
return dispatcher.dispatch(DiffNode.ROOT, Instances.of(working, base), RootAccessor.getInstance());
}
finally
{
dispatcher.clearInstanceMemory();
}
} | [
"Recursively inspects the given objects and returns a node representing their differences. Both objects\nhave be have the same type.\n\n@param working This object will be treated as the successor of the `base` object.\n@param base This object will be treated as the predecessor of the <code>working</code> object.\n@return A node representing the differences between the given objects."
] | [
"note, this just logs an error and doesn't throw as its only used to remove old configuration files, and shouldn't stop boot",
"Check, if all values used for calculating the series for a specific pattern are valid.\n@return <code>null</code> if the pattern is valid, a suitable error message otherwise.",
"Binds a script bundle to scene graph rooted at a scene object.\n@param scriptBundle\nThe {@code GVRScriptBundle} object containing script binding information.\n@param rootSceneObject\nThe root of the scene object tree to which the scripts are bound.\n@throws IOException if script bundle file cannot be read.\n@throws GVRScriptException if a script processing error occurs.",
"This method writes assignment data to a JSON file.",
"Get a collection of methods declared on this object by method name.\n\n@param name the name of the method\n@return the (possibly empty) collection of methods with the given name",
"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",
"Configure all UI elements in the exceptions panel.",
"Increases the maximum size of the data array so that it can store sparse data up to 'length'. The class\nparameter nz_length is not modified by this function call.\n\n@param arrayLength Desired maximum length of sparse data\n@param preserveValue If true the old values will be copied into the new arrays. If false that step will be skipped.",
"Reads data sets from a passed reader.\n\n@param reader\ndata sets source\n@param recover\nmax number of errors reading process will try to recover from.\nSet to 0 to fail immediately\n@throws IOException\nif reader can't read underlying stream\n@throws InvalidDataSetException\nif invalid/undefined data set is encountered"
] |
public static long count(nitro_service service, String id) throws Exception{
linkset_interface_binding obj = new linkset_interface_binding();
obj.set_id(id);
options option = new options();
option.set_count(true);
linkset_interface_binding response[] = (linkset_interface_binding[]) obj.get_resources(service,option);
if (response != null) {
return response[0].__count;
}
return 0;
} | [
"Use this API to count linkset_interface_binding resources configued on NetScaler."
] | [
"Compare two integers, accounting for null values.\n\n@param n1 integer value\n@param n2 integer value\n@return comparison result",
"Constructs and sets the layout parameters to have some gravity.\n\n@param gravity the gravity of the Crouton\n@return <code>this</code>, for chaining.\n@see android.view.Gravity",
"1.0 version of parser is different at simple mapperParser",
"Add the dependencies if the deployment contains a service activator loader entry.\n@param phaseContext the deployment unit context\n@throws DeploymentUnitProcessingException",
"Removes the duplicate node list.\n\n@param list\nthe list\n@return the int",
"Retrieves a string value from the property data.\n\n@param type Type identifier\n@return string value",
"Return the list of corporate GroupId prefix configured for an organization.\n\n@param organizationId String Organization name\n@return Response A list of corporate groupId prefix in HTML or JSON",
"Use this API to unset the properties of vridparam resource.\nProperties that need to be unset are specified in args array.",
"Get a property as a float or throw an exception.\n\n@param key the property name"
] |
private void lockAndRegisterReferences(ClassDescriptor cld, Object sourceObject, int lockMode, List registeredObjects) throws LockNotGrantedException
{
if (implicitLocking)
{
Iterator i = cld.getObjectReferenceDescriptors(true).iterator();
while (i.hasNext())
{
ObjectReferenceDescriptor rds = (ObjectReferenceDescriptor) i.next();
Object refObj = rds.getPersistentField().get(sourceObject);
if (refObj != null)
{
boolean isProxy = ProxyHelper.isProxy(refObj);
RuntimeObject rt = isProxy ? new RuntimeObject(refObj, this, false) : new RuntimeObject(refObj, this);
if (!registrationList.contains(rt.getIdentity()))
{
lockAndRegister(rt, lockMode, registeredObjects);
}
}
}
}
} | [
"we only use the registrationList map if the object is not a proxy. During the\nreference locking, we will materialize objects and they will enter the registered for\nlock map."
] | [
"Lookup an object instance from JNDI context.\n\n@param jndiName JNDI lookup name\n@return Matching object or <em>null</em> if none found.",
"Returns the specified process time out in milliseconds.\n\n@return The process time out in milliseconds.",
"Write a relation list field to the JSON file.\n\n@param fieldName field name\n@param value field value",
"Has to be called when the scenario is finished in order to execute after methods.",
"A simple helper method that creates a pool of connections to Redis using\nthe supplied configurations.\n\n@param jesqueConfig the config used to create the pooled Jedis connections\n@param poolConfig the config used to create the pool\n@return a configured Pool of Jedis connections",
"Logs a message for a case where the value of a property does not fit to\nits declared datatype.\n\n@param propertyIdValue\nthe property that was used\n@param datatype\nthe declared type of the property\n@param valueType\na string to denote the type of value",
"Return true if the DeclarationExpression represents a 'final' variable declaration.\n\nNOTE: THIS IS A WORKAROUND.\n\nThere does not seem to be an easy way to determine whether the 'final' modifier has been\nspecified for a variable declaration. Return true if the 'final' is present before the variable name.",
"Unlinks a set of dependents from this task.\n\n@param task The task to remove dependents from.\n@return Request object",
"Joins the given ints using the given separator into a single string.\n\n@return the joined string or an empty string if the int array is null"
] |
public ItemRequest<Section> findById(String section) {
String path = String.format("/sections/%s", section);
return new ItemRequest<Section>(this, Section.class, path, "GET");
} | [
"Returns the complete record for a single section.\n\n@param section The section to get.\n@return Request object"
] | [
"Diagnostic method used to dump known field map data.\n\n@param props props block containing field map data",
"Use this API to restore appfwprofile.",
"Splits up value into multiple versioned values\n\n@param value\n@return\n@throws IOException",
"You can register styles object for later reference them directly. Parent\nstyles should be registered this way\n\n@param style\n@return\n@throws DJBuilderException",
"This produces a string with no compressed segments and all segments of full length,\nwhich is 4 characters for IPv6 segments and 3 characters for IPv4 segments.",
"Gets information about this collaboration.\n\n@return info about this collaboration.",
"Cleans the object key.\n\n@param name Name of the object key\n@return The {@link ValidationResult} object containing the object,\nand the error code(if any)",
"Returns the value of the identified field as a Date.\nTime fields returned from an FQL query are expressed in terms of seconds since midnight, January 1, 1970 UTC.\n@param fieldName the name of the field\n@return the value of the field as a Date\n@throws FqlException if the field's value cannot be expressed as a long value from which a Date object can be constructed.",
"Writes the value key to the serialized characteristic\n\n@param builder The JSON builder to add the value to\n@param value The value to add"
] |
public static void closeWithWarning(Closeable c) {
if (c != null) {
try {
c.close();
} catch (IOException e) {
LOG.warning("Caught exception during close(): " + e);
}
}
} | [
"Close the Closeable. Logging a warning if any problems occur.\n\n@param c the thing to close"
] | [
"Flattens an option into its value or else null, which is not great but is usually more convenient in Java.\n@param option Optional value -- either Some(T) or None\n@param <T> Any type\n@return The value inside the option, or else null",
"Use this API to fetch snmpuser resource of given name .",
"Print duration in thousandths of minutes.\n\n@param duration Duration instance\n@return duration in thousandths of minutes",
"Use this API to unset the properties of nsdiameter resource.\nProperties that need to be unset are specified in args array.",
"Register child resources associated with this resource.\n\n@param resourceRegistration a {@link org.jboss.as.controller.registry.ManagementResourceRegistration} created from this definition",
"Renders in LI tags, Wraps with UL tags optionally.",
"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)",
"Searches for pairs of parentheses and processes blocks inside of them. Embedded parentheses are handled\nwith no problem. On output only a single token should be in tokens.\n@param tokens List of parsed tokens\n@param sequence Sequence of operators",
"Examins the structure of A for QR decomposition\n@param A matrix which is to be decomposed\n@return true if the solution is valid or false if the decomposition can't be performed (i.e. requires column pivots)"
] |
private void checkForUnknownVariables(TokenList tokens) {
TokenList.Token t = tokens.getFirst();
while( t != null ) {
if( t.getType() == Type.WORD )
throw new ParseError("Unknown variable on right side. "+t.getWord());
t = t.next;
}
} | [
"Examines the list of variables for any unknown variables and throws an exception if one is found"
] | [
"Reads an HTML snippet with the given name.\n\n@return the HTML data",
"Get the domain controller data from the given byte buffer.\n\n@param buffer the byte buffer\n@return the domain controller data\n@throws Exception",
"This filter permit to return an image sized exactly as requested wherever is its ratio by\nfilling with chosen color the missing parts. Usually used with \"fit-in\" or \"adaptive-fit-in\"\n\n@param color integer representation of color.",
"The ARP is additional request parameters, which must be sent once\nreceived after any HTTP call. This is sort of a proxy for cookies.\n\n@return A JSON object containing the ARP key/values. Can be null.",
"Encodes the given URI port with the given encoding.\n@param port the port to be encoded\n@param encoding the character encoding to encode to\n@return the encoded port\n@throws UnsupportedEncodingException when the given encoding parameter is not supported",
"Use this API to update bridgetable.",
"Start and configure GreenMail using given properties.\n\n@param properties the properties such as System.getProperties()",
"Disables all the overrides for a specific profile\n\n@param model\n@param profileID\n@param clientUUID\n@return",
"Makes object obj persistent in the underlying persistence system.\nE.G. by INSERT INTO ... or UPDATE ... in an RDBMS.\nThe ObjectModification parameter can be used to determine whether INSERT or update is to be used.\nThis functionality is typically called from transaction managers, that\ntrack which objects have to be stored. If the object is an unmaterialized\nproxy the method return immediately."
] |
private Duration getDuration(TimeUnit units, Double duration)
{
Duration result = null;
if (duration != null)
{
double durationValue = duration.doubleValue() * 100.0;
switch (units)
{
case MINUTES:
{
durationValue *= MINUTES_PER_DAY;
break;
}
case HOURS:
{
durationValue *= HOURS_PER_DAY;
break;
}
case DAYS:
{
durationValue *= 3.0;
break;
}
case WEEKS:
{
durationValue *= 0.6;
break;
}
case MONTHS:
{
durationValue *= 0.15;
break;
}
default:
{
throw new IllegalArgumentException("Unsupported time units " + units);
}
}
durationValue = Math.round(durationValue) / 100.0;
result = Duration.getInstance(durationValue, units);
}
return result;
} | [
"Read a duration.\n\n@param units duration units\n@param duration duration value\n@return Duration instance"
] | [
"Gets information about all of the group memberships for this group.\nDoes not support paging.\n@return a collection of information about the group memberships for this group.",
"Get the collection of contacts for the calling user.\n\n@return The Collection of Contact objects",
"Main entry point used to determine the format used to write\ncalendar exceptions.\n\n@param calendar parent calendar\n@param dayList list of calendar days\n@param exceptions list of exceptions",
"Support the subscript operator for GString.\n\n@param text a GString\n@param index the index of the Character to get\n@return the Character at the given index\n@since 2.3.7",
"Add exceptions to the calendar.\n\n@param mpxjCalendar MPXJ calendar\n@param gpCalendar GanttProject calendar",
"Recursively update parent task dates.\n\n@param parentTask parent task",
"Read an optional int value form a JSON value.\n@param val the JSON value that should represent the int.\n@return the int from the JSON or 0 reading the int fails.",
"Gracefully stop the engine",
"Removes a tag from the resource.\n@param key the key of the tag to remove\n@return the next stage of the definition/update"
] |
private Set<File> findThriftFiles() throws IOException, MojoExecutionException {
final File thriftSourceRoot = getThriftSourceRoot();
Set<File> thriftFiles = new HashSet<File>();
if (thriftSourceRoot != null && thriftSourceRoot.exists()) {
thriftFiles.addAll(findThriftFilesInDirectory(thriftSourceRoot));
}
getLog().info("finding thrift files in dependencies");
extractFilesFromDependencies(findThriftDependencies(), getResourcesOutputDirectory());
if (buildExtractedThrift && getResourcesOutputDirectory().exists()) {
thriftFiles.addAll(findThriftFilesInDirectory(getResourcesOutputDirectory()));
}
getLog().info("finding thrift files in referenced (reactor) projects");
thriftFiles.addAll(getReferencedThriftFiles());
return thriftFiles;
} | [
"build a complete set of local files, files from referenced projects, and dependencies."
] | [
"Update an object in the database to change its id to the newId parameter.",
"Get the unique set of declared methods on the leaf class and all superclasses. Leaf\nclass methods are included first and while traversing the superclass hierarchy any methods found\nwith signatures matching a method already included are filtered out.",
"Gets the path used for the results of XSLT Transforms.",
"Read an individual GanttProject resource assignment.\n\n@param gpAllocation GanttProject resource assignment.",
"Returns the length of the message in bytes as it is encoded on the wire.\n\nApple require the message to be of length 255 bytes or less.\n\n@return length of encoded message in bytes",
"The entity instance is already in the session cache\n\nCopied from Loader#instanceAlreadyLoaded",
"Walk through the object graph of the specified delete object. Was used for\nrecursive object graph walk.",
"Get the property name from the expression.\n\n@param expression expression\n@return property name",
"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 boolean preHandle(HttpServletRequest request,
HttpServletResponse response, Object handler) throws Exception {
String queryString = request.getQueryString() == null ? "" : request.getQueryString();
if (ConfigurationService.getInstance().isValid()
|| request.getServletPath().startsWith("/configuration")
|| request.getServletPath().startsWith("/resources")
|| queryString.contains("requestFromConfiguration=true")) {
return true;
} else {
response.sendRedirect("configuration");
return false;
}
} | [
"This will check to see if certain configuration values exist from the ConfigurationService\nIf not then it redirects to the configuration screen"
] | [
"Unescape and unquote the path. Ready for translation.",
"Caches the results of radix to the given power.\n\n@param radix\n@param power\n@return",
"note that for read from file, this will just load all to memory. not fit\nif need to read a very large file. However for getting the host name.\nnormally it is fine.\n\nfor reading large file, should use iostream.\n\n@param sourcePath\nthe source path\n@param sourceType\nthe source type\n@return the content from path\n@throws IOException\nSignals that an I/O exception has occurred.",
"Sets all dates in the list.\n@param dates the dates to set\n@param checked flag, indicating if all should be checked or unchecked.",
"List the indexes in the database. The returned object allows for listing indexes by type.\n\n@return indexes object with methods for getting indexes of a particular type",
"Use this API to fetch all the nsspparams resources that are configured on netscaler.",
"Sets the bean store\n\n@param beanStore The bean store",
"Sets the max min.\n\n@param n the new max min",
"Read the header data for a single file.\n\n@param header header data\n@return SynchroTable instance"
] |
public NamespacesList<Namespace> getNamespaces(String predicate, int perPage, int page) throws FlickrException {
Map<String, Object> parameters = new HashMap<String, Object>();
NamespacesList<Namespace> nsList = new NamespacesList<Namespace>();
parameters.put("method", METHOD_GET_NAMESPACES);
if (predicate != null) {
parameters.put("predicate", predicate);
}
if (perPage > 0) {
parameters.put("per_page", "" + perPage);
}
if (page > 0) {
parameters.put("page", "" + page);
}
Response response = transportAPI.get(transportAPI.getPath(), parameters, apiKey, sharedSecret);
if (response.isError()) {
throw new FlickrException(response.getErrorCode(), response.getErrorMessage());
}
Element nsElement = response.getPayload();
NodeList nsNodes = nsElement.getElementsByTagName("namespace");
nsList.setPage("1");
nsList.setPages("1");
nsList.setPerPage("" + nsNodes.getLength());
nsList.setTotal("" + nsNodes.getLength());
for (int i = 0; i < nsNodes.getLength(); i++) {
Element element = (Element) nsNodes.item(i);
nsList.add(parseNamespace(element));
}
return nsList;
} | [
"Return a list of unique namespaces, optionally limited by a given predicate, in alphabetical order.\n\nThis method does not require authentication.\n\n@param predicate\n@param perPage\n@param page\n@return NamespacesList\n@throws FlickrException"
] | [
"Read arguments from a file. Newline delimited, UTF-8 encoded. No fanciness to\navoid dependencies.",
"Obtains a Julian zoned date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the Julian zoned date-time, not null\n@throws DateTimeException if unable to create the date-time",
"Add roles for given role parent item.\n\n@param ouItem group parent item",
"Returns the perma link for the given resource and optional detail content.<p<\n\n@param cms the CMS context to use\n@param resourceName the page to generate the perma link for\n@param detailContentId the structure id of the detail content (may be null)\n\n@return the perma link",
"orientation state factory method",
"Disable certificate verification.\n\n@throws KeyManagementException\nthe key management exception\n@throws NoSuchAlgorithmException\nthe no such algorithm exception",
"Use this API to fetch csvserver_appflowpolicy_binding resources of given name .",
"Sets a listener to inform when the user closes the SearchView.\n\n@param listener the listener to call when the user closes the SearchView.",
"Writes a resource assignment to a PM XML file.\n\n@param mpxj MPXJ ResourceAssignment instance"
] |
public void addCell(TableLayoutCell cell) {
GridBagConstraints constraints = cell.getConstraints();
constraints.insets = new Insets(cellpadding, cellpadding, cellpadding, cellpadding);
add(cell.getComponent(), constraints);
} | [
"Adds a new cell to the current grid\n@param cell the td component"
] | [
"Resolve the subsystem versions.\n\n@param extensions the extensions to install\n@return the subsystem versions",
"Makes http GET request.\n@param url url to makes request to\n@param params data to add to params field\n@return {@link okhttp3.Response}\n@throws RequestException\n@throws LocalOperationException",
"Find container env.\n\n@param ctx the container context\n@param dump the exception dump\n@return valid container or null",
"Shows the given step.\n\n@param step the step",
"Returns a set of the distinct colours used in this image.\n\n@return the set of distinct Colors",
"This produces a string with no compressed segments and all segments of full length,\nwhich is 4 characters for IPv6 segments and 3 characters for IPv4 segments.",
"Invert by solving for against an identity matrix.\n\n@param A_inv Where the inverted matrix saved. Modified.",
"given the groupId, and 2 string arrays, adds the name-responses pair to the table_override\n\n@param groupId ID of group\n@param methodName name of method\n@param className name of class\n@throws Exception exception",
"Constructs a camera rig with cameras attached. An owner scene object is automatically\ncreated for the camera rig.\n\nDo not try to change the owner object of the camera rig - not supported currently and will\nlead to native crashes."
] |
public static String makeAsciiTable(Object[][] table, Object[] rowLabels, Object[] colLabels, int padLeft, int padRight, boolean tsv) {
StringBuilder buff = new StringBuilder();
// top row
buff.append(makeAsciiTableCell("", padLeft, padRight, tsv)); // the top left cell
for (int j = 0; j < table[0].length; j++) { // assume table is a rectangular matrix
buff.append(makeAsciiTableCell(colLabels[j], padLeft, padRight, (j != table[0].length - 1) && tsv));
}
buff.append('\n');
// all other rows
for (int i = 0; i < table.length; i++) {
// one row
buff.append(makeAsciiTableCell(rowLabels[i], padLeft, padRight, tsv));
for (int j = 0; j < table[i].length; j++) {
buff.append(makeAsciiTableCell(table[i][j], padLeft, padRight, (j != table[0].length - 1) && tsv));
}
buff.append('\n');
}
return buff.toString();
} | [
"Returns an text table containing the matrix of Strings passed in.\nThe first dimension of the matrix should represent the rows, and the\nsecond dimension the columns."
] | [
"Checks if the DPI value is already set for GeoServer.",
"Obtains a Coptic local date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the Coptic local date-time, not null\n@throws DateTimeException if unable to create the date-time",
"Notify listeners that the tree structure has changed.",
"Escape a value to be HTML friendly.\n@param value the Object value.\n@return the HTML-escaped String, or <null> if the value is null.",
"Set the week of month.\n@param weekOfMonthStr the week of month to set.",
"Divides the elements at the specified column by 'val'. Takes in account\nleading zeros and one.",
"Always returns the original proxy object that was serialized.\n\n@return the proxy object\n@throws java.io.ObjectStreamException",
"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",
"Check if zone count policy is satisfied\n\n@return whether zone is satisfied"
] |
public static LinearSolverDense<DMatrixRMaj> general(int numRows , int numCols ) {
if( numRows == numCols )
return linear(numRows);
else
return leastSquares(numRows,numCols);
} | [
"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."
] | [
"Plots the MSD curve with the trajectory t and adds the fitted model for directed motion above.\n@param t\n@param lagMin Minimum timelag (e.g. 1,2,3..) lagMin*timelag = elapsed time in seconds\n@param lagMax lagMax Maximum timelag (e.g. 1,2,3..) lagMax*timelag = elapsed time in seconds\n@param timelag Elapsed time between two frames.\n@param diffusionCoefficient Diffusion coefficient\n@param velocity velocity of the active transport",
"Generate and return the list of statements to create a database table and any associated features.",
"Update environment variables to an app.\n@param appName App name. See {@link #listApps} for a list of apps that can be used.\n@param config Key/Value pairs of environment variables.",
"Use this API to unset the properties of nsip6 resource.\nProperties that need to be unset are specified in args array.",
"send object to client and serialize it using JSON\n\n@param objectToSend the object to send\n@param cb the callback after sending the message",
"Determines run length for each 'initial' partition ID. Note that a\ncontiguous run may \"wrap around\" the end of the ring.\n\n@param cluster\n@param zoneId\n@return map of initial partition Id to length of contiguous run of\npartition IDs within the same zone..",
"Given a particular key, first converts its to the storage format and then\ndetermines which chunk it belongs to\n\n@param key Byte array of keys\n@return Chunk id\n@throws IllegalStateException if unable to find the chunk id for the given key",
"Perform the given work with a Jedis connection from the given pool.\n\n@param pool the resource pool\n@param work the work to perform\n@param <V> the result type\n@return the result of the given work\n@throws Exception if something went wrong",
"This method returns the value random variable of the product within the specified model,\nevaluated at a given evalutationTime.\nCash-flows prior evaluationTime are not considered.\n\n@param evaluationTime The time on which this products value should be observed.\n@param model The model used to price the product.\n@return The random variable representing the value of the product discounted to evaluation time.\n@throws net.finmath.exception.CalculationException Thrown if the valuation fails, specific cause may be available via the <code>cause()</code> method."
] |
@PreDestroy
public final void shutdown() {
this.timer.shutdownNow();
this.executor.shutdownNow();
if (this.cleanUpTimer != null) {
this.cleanUpTimer.shutdownNow();
}
} | [
"Called by spring when application context is being destroyed."
] | [
"Adds api doc roots from a link. The folder reffered by the link should contain a package-list\nfile that will be parsed in order to add api doc roots to this configuration\n@param packageListUrl",
"Add a \"post-run\" dependent for this model.\n\n@param dependent the \"post-run\" dependent.\n@return key to be used as parameter to taskResult(string) method to retrieve result of root\ntask in the given dependent task group",
"Convert JsonString to Object of Clazz\n\n@param json\n@param clazz\n@return Object of Clazz",
"Returns the classDescriptor.\n\n@return ClassDescriptor",
"Appends a String to the string representation of this number.\n\n@param value a Number\n@param right a String\n@return a String\n@since 1.0",
"Replaces the first substring of this CharSequence that matches the given\nregular expression with the given replacement.\n\n@param self a CharSequence\n@param regex the capturing regex\n@param replacement the CharSequence to be substituted for each match\n@return a CharSequence with replaced content\n@throws java.util.regex.PatternSyntaxException if the regular expression's syntax is invalid\n@see String#replaceFirst(String, String)\n@since 1.8.2",
"Flushes this output stream and forces any buffered output bytes to be written out to the stream. If propagate is\ntrue, the wrapped stream will also be flushed.\n\n@param propagate\nboolean flag to indicate whether the wrapped OutputStream should also be flushed.\n@throws IOException\nif an I/O error occurs.",
"Release all memory addresses taken by this allocator.\nBe careful in using this method, since all of the memory addresses become invalid.",
"This method calls the index state. It should be called once per crawl in order to setup the\ncrawl.\n\n@return The initial state."
] |
static synchronized LogContext configureLogContext(final File logDir, final File configDir, final String defaultLogFileName, final CommandContext ctx) {
final LogContext embeddedLogContext = Holder.LOG_CONTEXT;
final Path bootLog = logDir.toPath().resolve(Paths.get(defaultLogFileName));
final Path loggingProperties = configDir.toPath().resolve(Paths.get("logging.properties"));
if (Files.exists(loggingProperties)) {
WildFlySecurityManager.setPropertyPrivileged("org.jboss.boot.log.file", bootLog.toAbsolutePath().toString());
try (final InputStream in = Files.newInputStream(loggingProperties)) {
// Attempt to get the configurator from the root logger
Configurator configurator = embeddedLogContext.getAttachment("", Configurator.ATTACHMENT_KEY);
if (configurator == null) {
configurator = new PropertyConfigurator(embeddedLogContext);
final Configurator existing = embeddedLogContext.getLogger("").attachIfAbsent(Configurator.ATTACHMENT_KEY, configurator);
if (existing != null) {
configurator = existing;
}
}
configurator.configure(in);
} catch (IOException e) {
ctx.printLine(String.format("Unable to configure logging from configuration file %s. Reason: %s", loggingProperties, e.getLocalizedMessage()));
}
}
return embeddedLogContext;
} | [
"Configures the log context for the server and returns the configured log context.\n\n@param logDir the logging directory, from jboss.server|domain.log.dir standalone default {@code $JBOSS_HOME/standalone/log}\n@param configDir the configuration directory from jboss.server|domain.config.dir, standalone default {@code $JBOSS_HOME/standalone/configuration}\n@param defaultLogFileName the name of the log file to pass to {@code org.jboss.boot.log.file}\n@param ctx the command context used to report errors to\n\n@return the configured log context"
] | [
"Apply the AAD algorithm to this very variable\n\nNOTE: in this case it is indeed correct to assume that the output dimension is \"one\"\nmeaning that there is only one {@link RandomVariableUniqueVariable} as an output.\n\n@return gradient for the built up function",
"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",
"Returns the value that has to be set for the dynamic attribute.\n\n@param file the file where the current content is stored\n@param value the content value that is represented by the attribute\n@param attributeName the attribute's name\n@param editedLocalEntity the entities that where edited last\n@return the value that has to be set for the dynamic attribute.",
"Processes the template for the comma-separated value pairs in an attribute of the current object on the specified level.\n\n@param template The template\n@param attributes The attributes of the tag\n@exception XDocletException if an error occurs\[email protected] type=\"block\"\[email protected] name=\"level\" optional=\"false\" description=\"The level for the current object\"\nvalues=\"class,field,reference,collection\"\[email protected] name=\"name\" optional=\"true\" description=\"The name of the attribute containg attributes (defaults to 'attributes')\"\[email protected] name=\"default-right\" optional=\"true\" description=\"The default right value if none is given (defaults to empty value)\"",
"Get the FieldDescriptors of the extent based on the FieldDescriptors of the parent.",
"Rollback the last applied patch.\n\n@param contentPolicy the content policy\n@param resetConfiguration whether to reset the configuration\n@param modification the installation modification\n@return the patching result\n@throws PatchingException",
"Loads the asset referenced by the file name\nunder the owner of this component.\nIf this component was constructed to replace the scene with\nthe asset, the main scene of the current context\nwill contain only the owner of this\ncomponent upon return. Otherwise, the loaded asset is a\nchild of this component's owner.\n\nLoading the asset is performed in a separate thread.\nThis function returns before the asset has finished loading.\nIAssetEvents are emitted to the input event handler and\nto any event listener on the context.\n\n@param handler\nIAssetEvents handler to process asset loading events",
"Returns the index of a key in the set.\n\n@param key The key to search for.\n@return Returns the index of the key if it exists, else a negative integer.",
"Adds a parameter to the MIMEType.\n\n@param name name of parameter\n@param value value of parameter\n@return returns a new instance with the parameter set"
] |
public static void unsetCurrentPersistenceBroker(PBKey key, PersistenceBrokerInternal broker)
throws PBFactoryException
{
HashMap map = (HashMap) currentBrokerMap.get();
WeakHashMap set = null;
if(map != null)
{
set = (WeakHashMap) map.get(key);
if(set != null)
{
set.remove(broker);
if(set.isEmpty())
{
map.remove(key);
}
}
if(map.isEmpty())
{
currentBrokerMap.set(null);
synchronized(lock) {
loadedHMs.remove(map);
}
}
}
} | [
"Unmark a PersistenceBroker as preferred choice for current Thread\n\n@param key The PBKey the broker is associated to\n@param broker The PersistenceBroker to unmark"
] | [
"Return the map bounds rotated with the set rotation. The bounds are adapted to rounding changes of the\nsize of the set paint area.\n\n@return Rotated bounds.",
"set custom response for profile's default client\n\n@param profileName profileName to modify\n@param pathName friendly name of path\n@param customData custom request data\n@return true if success, false otherwise",
"The MapReduce framework should operate sequentially, so thread safety shouldn't be a problem.",
"Converts a time represented as an integer to a Date instance.\n\n@param time integer time\n@return Date instance",
"This function is intended to detect the subset of IOException which are not\nconsidered recoverable, in which case we want to bubble up the exception, instead\nof retrying.\n\n@throws VoldemortException",
"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",
"Allows testsuites to shorten the domain timeout adder",
"A property tied to the map, updated when the idle state event is fired.\n\n@return",
"Handles the change of a value in the current translation.\n@param propertyId the property id of the column where the value has changed."
] |
public Where<T, ID> idEq(ID id) throws SQLException {
if (idColumnName == null) {
throw new SQLException("Object has no id column specified");
}
addClause(new SimpleComparison(idColumnName, idFieldType, id, SimpleComparison.EQUAL_TO_OPERATION));
return this;
} | [
"Add a clause where the ID is equal to the argument."
] | [
"Emit an enum event with parameters and force all listener to be called synchronously.\n\n@param event\nthe target event\n@param args\nthe arguments passed in\n@see #emit(Enum, Object...)",
"Used to load a classifier stored as a resource inside a jar file. THIS\nFUNCTION WILL ONLY WORK IF THE CODE WAS LOADED FROM A JAR FILE WHICH HAS A\nSERIALIZED CLASSIFIER STORED INSIDE IT.\n\n@param resourceName\nName of clasifier resource inside the jar file.\n@return A CRFClassifier stored in the jar file",
"Read an exception day for a calendar.\n\n@param mpxjCalendar ProjectCalendar instance\n@param day ConceptDraw PROJECT exception day",
"Use this API to fetch sslfipskey resources of given names .",
"Decide which donor node to steal from. This is a policy implementation.\nI.e., in the future, additional policies could be considered. At that\ntime, this method should be overridden in a sub-class, or a policy object\nought to implement this algorithm.\n\nCurrent policy:\n\n1) If possible, a stealer node that is the zone n-ary in the finalCluster\nsteals from the zone n-ary in the currentCluster in the same zone.\n\n2) If there are no partition-stores to steal in the same zone (i.e., this\nis the \"zone expansion\" use case), then a differnt policy must be used.\nThe stealer node that is the zone n-ary in the finalCluster determines\nwhich pre-existing zone in the currentCluster hosts the primary partition\nid for the partition-store. The stealer then steals the zone n-ary from\nthat pre-existing zone.\n\nThis policy avoids unnecessary cross-zone moves and distributes the load\nof cross-zone moves approximately-uniformly across pre-existing zones.\n\nOther policies to consider:\n\n- For zone expansion, steal all partition-stores from one specific\npre-existing zone.\n\n- Replace heuristic to approximately uniformly distribute load among\nexisting zones to something more concrete (i.e. track steals from each\npre-existing zone and forcibly balance them).\n\n- Select a single donor for all replicas in a new zone. This will require\ndonor-based rebalancing to be run (at least for this specific part of the\nplan). This would reduce the number of donor-side scans of data. (But\nstill send replication factor copies over the WAN.) This would require\napparatus in the RebalanceController to work.\n\n- Set up some sort of chain-replication in which a single stealer in the\nnew zone steals some replica from a pre-exising zone, and then other\nn-aries in the new zone steal from the single cross-zone stealer in the\nzone. This would require apparatus in the RebalanceController to work.\n\n@param currentSRP\n@param finalSRP\n@param stealerZoneId\n@param stealerNodeId\n@param stealerPartitionId\n@return the node id of the donor for this partition Id.",
"Locate a feature in the file by match a byte pattern.\n\n@param patterns patterns to match\n@param bufferIndex start index\n@return true if the bytes at the position match a pattern",
"Finish initialization of state object.\n\n@param geoService geo service\n@param converterService converter service\n@throws GeomajasException oops",
"Updates the database. Never call this during normal operations, upgrade is a user-controlled operation.",
"Get the inactive history directories.\n\n@return the inactive history"
] |
private void writeBooleanField(String fieldName, Object value) throws IOException
{
boolean val = ((Boolean) value).booleanValue();
if (val)
{
m_writer.writeNameValuePair(fieldName, val);
}
} | [
"Write a boolean field to the JSON file.\n\n@param fieldName field name\n@param value field value"
] | [
"Gets a list of registered docker images from the images cache, if it has been\nregistered to the cache for a specific build-info ID and if a docker manifest has been captured for it\nby the build-info proxy.\nAdditionally, the methods also removes the returned images from the cache.\n@param buildInfoId\n@return",
"Creates a Set out of the given keys\n\n@param <K> the key type\n@param keys\nthe keys\n@return a Set containing the given keys",
"Returns a color for a given absolute number that is to be shown on the\nmap.\n\n@param value\n@return",
"Convert this path address to its model node representation.\n\n@return the model node list of properties",
"Converts a string representation of an integer into an Integer object.\nSilently ignores any parse exceptions and returns null.\n\n@param value String representation of an integer\n@return Integer instance",
"Use this API to fetch all the gslbservice resources that are configured on netscaler.",
"Set the groups assigned to a path\n\n@param groups group IDs to set\n@param pathId ID of path",
"Use this API to fetch systemsession resources of given names .",
"Post-configure retreival of server engine."
] |
public IndexDescriptorDef getIndexDescriptor(String name)
{
IndexDescriptorDef indexDef = null;
for (Iterator it = _indexDescriptors.iterator(); it.hasNext(); )
{
indexDef = (IndexDescriptorDef)it.next();
if (indexDef.getName().equals(name))
{
return indexDef;
}
}
return null;
} | [
"Returns the index descriptor definition of the given name if it exists.\n\n@param name The name of the index\n@return The index descriptor definition or <code>null</code> if there is no such index"
] | [
"Load all string recognize.",
"This method processes any extended attributes associated with a task.\n\n@param xml MSPDI task instance\n@param mpx MPX task instance",
"Parse a list of objects from a JsonParser.\n\n@param jsonParser The JsonParser, preconfigured to be at the START_ARRAY token.",
"Enable a custom response\n\n@param custom custom response\n@param path_id path ID of the response\n@param client_uuid client UUID\n@throws Exception exception",
"Read resource assignment data from a PEP file.",
"Set the end type as derived from other values.",
"Adds a new task to this file. The task can have an optional message to include, and a due date.\n\n@param action the action the task assignee will be prompted to do.\n@param message an optional message to include with the task.\n@param dueAt the day at which this task is due.\n@return information about the newly added task.",
"Returns a String summarizing overall accuracy that will print nicely.",
"Isn't there a method for this in GeoTools?\n\n@param crs\nCRS string in the form of 'EPSG:<srid>'.\n@return SRID as integer."
] |
@Override
public synchronized long skip(final long length) throws IOException {
final long skip = super.skip(length);
this.count += skip;
return skip;
} | [
"Skips the stream over the specified number of bytes, adding the skipped\namount to the count.\n\n@param length the number of bytes to skip\n@return the actual number of bytes skipped\n@throws java.io.IOException if an I/O error occurs\n@see java.io.InputStream#skip(long)"
] | [
"Checks to see if the matrix is symmetric to within tolerance.\n\n@param A Matrix being tested. Not modified.\n@param tol Tolerance that defines how similar two values must be to be considered identical\n@return true if symmetric or false if not",
"Return the content from an URL in byte array\n\n@param stringUrl URL to get\n@return byte array\n@throws IOException I/O error happened",
"Update the value of an embedded node property.\n\n@param executionEngine the {@link GraphDatabaseService} used to run the query\n@param keyValues the columns representing the identifier in the entity owning the embedded\n@param embeddedColumn the column on the embedded node (dot-separated properties)\n@param value the new value for the property",
"List details of all calendars in the file.\n\n@param file ProjectFile instance",
"Use this API to fetch wisite_binding resource of given name .",
"A comment.\n\n@param args the parameters",
"Decide whether failure should trigger a rollback.\n\n@param cause\nthe cause of the failure, or {@code null} if failure is not\nthe result of catching a throwable\n@return the result action",
"Helper to read an optional Boolean value.\n@param path The XML path of the element to read.\n@return The Boolean value stored in the XML, or <code>null</code> if the value could not be read.",
"Refresh's this connection's access token using its refresh token.\n@throws IllegalStateException if this connection's access token cannot be refreshed."
] |
protected String getExtraSolrParams() {
try {
return m_configObject.getString(JSON_KEY_EXTRASOLRPARAMS);
} catch (JSONException e) {
if (null == m_baseConfig) {
if (LOG.isInfoEnabled()) {
LOG.info(Messages.get().getBundle().key(Messages.LOG_NO_EXTRA_PARAMETERS_0), e);
}
return "";
} else {
return m_baseConfig.getGeneralConfig().getExtraSolrParams();
}
}
} | [
"Returns the configured extra parameters that should be given to Solr, or the empty string if no parameters are configured.\n@return The configured extra parameters that should be given to Solr, or the empty string if no parameters are configured."
] | [
"Gets the Kumar-Johnson divergence.\n\n@param p P vector.\n@param q Q vector.\n@return The Kumar-Johnson divergence between p and q.",
"Parses chroot section of Zookeeper connection string\n\n@param zookeepers Zookeeper connection string\n@return Returns root path or \"/\" if none found",
"Get the seconds difference",
"Returns the Java executable command.\n\n@param javaHome the java home directory or {@code null} to use the default\n\n@return the java command to use",
"Return a list of Flickr supported blogging services.\n\nThis method does not require authentication.\n\n@return List of Services\n@throws FlickrException",
"Add \"ORDER BY\" clause to the SQL query statement. This can be called multiple times to add additional \"ORDER BY\"\nclauses. Ones earlier are applied first.",
"Refresh children using read-resource operation.",
"Use this API to delete gslbservice of given name.",
"Use this API to fetch all the lbsipparameters resources that are configured on netscaler."
] |
private void init(final List<DbLicense> licenses) {
licensesRegexp.clear();
for (final DbLicense license : licenses) {
if (license.getRegexp() == null ||
license.getRegexp().isEmpty()) {
licensesRegexp.put(license.getName(), license);
} else {
licensesRegexp.put(license.getRegexp(), license);
}
}
} | [
"Init the licenses cache\n\n@param licenses"
] | [
"Access an attribute.\n\n@param type the attribute's type, not {@code null}\n@param key the attribute's key, not {@code null}\n@return the attribute value, or {@code null}.",
"Build a valid datastore URL.",
"Get a unique reference to a media slot on the network from which tracks can be loaded.\n\n@param player the player in which the slot is found\n@param slot the specific type of the slot\n\n@return the instance that will always represent the specified slot\n\n@throws NullPointerException if {@code slot} is {@code null}",
"Filter out interceptors and decorators which are also enabled globally.\n\n@param enabledClasses\n@param globallyEnabledClasses\n@param logMessageCallback\n@param deployment\n@return the filtered list",
"Plots the MSD curve for trajectory t\n@param t Trajectory to calculate the msd curve\n@param lagMin Minimum timelag (e.g. 1,2,3..) lagMin*timelag = elapsed time in seconds\n@param lagMax Maximum timelag (e.g. 1,2,3..) lagMax*timelag = elapsed time in seconds\n@param msdeval Evaluates the mean squared displacment",
"Determines whether the specified permission is permitted.\n\n@param permission\n@return <tt>false<tt> if the specified permission is not permitted, based on the current security policy; <tt>true<tt> otherwise",
"Generates an artifact regarding the parameters.\n\n<P> <b>WARNING:</b> The parameters grId/arId/version should be filled!!! Only classifier and type are not mandatory.\n\n@param groupId String\n@param artifactId String\n@param version String\n@param classifier String\n@param type String\n@param extension String\n@return Artifact",
"Simple info message for status\n\n@param tag Message to print out at start of info message",
"handle case where Instant is outside the bounds of OffsetDateTime"
] |
public String getLinkCopyText(JSONObject jsonObject){
if(jsonObject == null) return "";
try {
JSONObject copyObject = jsonObject.has("copyText") ? jsonObject.getJSONObject("copyText") : null;
if(copyObject != null){
return copyObject.has("text") ? copyObject.getString("text") : "";
}else{
return "";
}
} catch (JSONException e) {
Logger.v("Unable to get Link Text with JSON - "+e.getLocalizedMessage());
return "";
}
} | [
"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"
] | [
"Disconnects from the serial interface and stops\nsend and receive threads.",
"Ask the specified player for a Folder menu for exploring its raw filesystem.\nThis is a request for unanalyzed items, so we do a typed menu request.\n\n@param slotReference the player and slot for which the menu is desired\n@param sortOrder the order in which responses should be sorted, 0 for default, see Section 6.11.1 of the\n<a href=\"https://github.com/Deep-Symmetry/dysentery/blob/master/doc/Analysis.pdf\">Packet Analysis\ndocument</a> for details\n@param folderId identifies the folder whose contents should be listed, use -1 to get the root folder\n\n@return the entries in the folder menu\n\n@throws Exception if there is a problem obtaining the menu",
"This method takes a calendar of MPXJ library type, then returns a String of the\ngeneral working days USACE format. For example, the regular 5-day work week is\nNYYYYYN\n\nIf you get Fridays off work, then the String becomes NYYYYNN\n\n@param input ProjectCalendar instance\n@return work days string",
"Get an InputStream for the original image. Callers must close the stream upon completion.\n\n@deprecated\n@see PhotosInterface#getImageAsStream(Photo, int)\n@return The InputStream\n@throws IOException",
"Sets the alias using a userAlias object.\n@param userAlias The alias to set",
"Converts the results to CSV data.\n\n@return the CSV data",
"Gets the property and casts to the appropriate type\n\n@param <T>\n@param key The property name\n@param type The property type\n@return The value of the property",
"Rebuild logging systems with updated mode\n@param newMode log mode",
"Register the given Converter objects with the given target ConverterRegistry.\n@param converters the converter objects: implementing {@link Converter},\n{@link ConverterFactory}, or {@link GenericConverter}\n@param registry the target registry"
] |
protected void bindHelper(GVRScriptBundle scriptBundle, GVRSceneObject rootSceneObject, int bindMask)
throws IOException, GVRScriptException
{
for (GVRScriptBindingEntry entry : scriptBundle.file.binding) {
GVRAndroidResource rc;
if (entry.volumeType == null || entry.volumeType.isEmpty()) {
rc = scriptBundle.volume.openResource(entry.script);
} else {
GVRResourceVolume.VolumeType volumeType = GVRResourceVolume.VolumeType.fromString(entry.volumeType);
if (volumeType == null) {
throw new GVRScriptException(String.format("Volume type %s is not recognized, script=%s",
entry.volumeType, entry.script));
}
rc = new GVRResourceVolume(mGvrContext, volumeType).openResource(entry.script);
}
GVRScriptFile scriptFile = (GVRScriptFile)loadScript(rc, entry.language);
String targetName = entry.target;
if (targetName.startsWith(TARGET_PREFIX)) {
TargetResolver resolver = sBuiltinTargetMap.get(targetName);
IScriptable target = resolver.getTarget(mGvrContext, targetName);
// Apply mask
boolean toBind = false;
if ((bindMask & BIND_MASK_GVRSCRIPT) != 0 && targetName.equalsIgnoreCase(TARGET_GVRMAIN)) {
toBind = true;
}
if ((bindMask & BIND_MASK_GVRACTIVITY) != 0 && targetName.equalsIgnoreCase(TARGET_GVRAPPLICATION)) {
toBind = true;
}
if (toBind) {
attachScriptFile(target, scriptFile);
}
} else {
if ((bindMask & BIND_MASK_SCENE_OBJECTS) != 0) {
if (targetName.equals(rootSceneObject.getName())) {
attachScriptFile(rootSceneObject, scriptFile);
}
// Search in children
GVRSceneObject[] sceneObjects = rootSceneObject.getSceneObjectsByName(targetName);
if (sceneObjects != null) {
for (GVRSceneObject sceneObject : sceneObjects) {
GVRScriptBehavior b = new GVRScriptBehavior(sceneObject.getGVRContext());
b.setScriptFile(scriptFile);
sceneObject.attachComponent(b);
}
}
}
}
}
} | [
"Helper function to bind script bundler to various targets"
] | [
"Create an image of the proper size to hold a new waveform preview image and draw it.",
"Finds edges based to a specific object reference descriptor and\nadds them to the edge map.\n@param vertex the object envelope vertex holding the object reference\n@param rds the object reference descriptor",
"Get a property as a double or throw an exception.\n\n@param key the property name",
"Reads the bundle descriptor, sets m_desc and m_descContent.\n@throws CmsXmlException thrown when unmarshalling fails.\n@throws CmsException thrown when reading the resource fails or several bundle descriptors for the bundle exist.",
"Adds the given service provider factory to the set of\nproviders for the service.\n\n@param serviceName\nThe fully qualified name of the service interface.\n@param factory\nA factory for creating a specific type of service\nprovider. May be <tt>null</tt> in which case this\nmethod does nothing.\n@throws IllegalArgumentException if serviceName is <tt>null</tt>",
"return null if the operation has no params to validate",
"Set the occurrences. If the String is invalid, the occurrences will be set to \"-1\" to cause server-side validation to fail.\n@param occurrences the interval to set.",
"Answer true if an Iterator for a Table is already available\n@param aTable\n@return",
"Use this API to add snmpuser resources."
] |
private void doExecute(Connection conn) throws SQLException
{
PreparedStatement stmt;
int size;
size = _methods.size();
if ( size == 0 )
{
return;
}
stmt = conn.prepareStatement(_sql);
try
{
m_platform.afterStatementCreate(stmt);
}
catch ( PlatformException e )
{
if ( e.getCause() instanceof SQLException )
{
throw (SQLException)e.getCause();
}
else
{
throw new SQLException(e.getMessage());
}
}
try
{
m_platform.beforeBatch(stmt);
}
catch ( PlatformException e )
{
if ( e.getCause() instanceof SQLException )
{
throw (SQLException)e.getCause();
}
else
{
throw new SQLException(e.getMessage());
}
}
try
{
for ( int i = 0; i < size; i++ )
{
Method method = (Method) _methods.get(i);
try
{
if ( method.equals(ADD_BATCH) )
{
/**
* we invoke on the platform and pass the stmt as an arg.
*/
m_platform.addBatch(stmt);
}
else
{
method.invoke(stmt, (Object[]) _params.get(i));
}
}
catch (IllegalArgumentException ex)
{
StringBuffer buffer = generateExceptionMessage(i, stmt, ex);
throw new SQLException(buffer.toString());
}
catch ( IllegalAccessException ex )
{
StringBuffer buffer = generateExceptionMessage(i, stmt, ex);
throw new SQLException(buffer.toString());
}
catch ( InvocationTargetException ex )
{
Throwable th = ex.getTargetException();
if ( th == null )
{
th = ex;
}
if ( th instanceof SQLException )
{
throw ((SQLException) th);
}
else
{
throw new SQLException(th.toString());
}
}
catch (PlatformException e)
{
throw new SQLException(e.toString());
}
}
try
{
/**
* this will call the platform specific call
*/
m_platform.executeBatch(stmt);
}
catch ( PlatformException e )
{
if ( e.getCause() instanceof SQLException )
{
throw (SQLException)e.getCause();
}
else
{
throw new SQLException(e.getMessage());
}
}
}
finally
{
stmt.close();
_methods.clear();
_params.clear();
}
} | [
"This method performs database modification at the very and of transaction."
] | [
"Set a proxy with authentication for REST-requests.\n\n@param proxyHost\n@param proxyPort\n@param username\n@param password",
"Iterates through the range of prefixes in this range instance using the given prefix length.\n\n@param prefixLength\n@return",
"Obtains a Discordian local date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the Discordian local date-time, not null\n@throws DateTimeException if unable to create the date-time",
"Reads the NTriples file from the reader, pushing statements into\nthe handler.",
"If directory doesn't exists try to create it.\n\n@param directory given directory to check\n@throws ReportGenerationException if can't create specified directory",
"Calculate the units percent complete.\n\n@param row task data\n@return percent complete",
"Retrieve the number of minutes per year for this calendar.\n\n@return minutes per year",
"converts a java.net.URI into a string representation with empty authority, if absent and has file scheme.",
"Select a List of characters from a CharSequence using a Collection\nto identify the indices to be selected.\n\n@param self a CharSequence\n@param indices a Collection of indices\n@return a String consisting of the characters at the given indices\n@since 1.0"
] |
public void parseVersion( String version )
{
DefaultVersioning artifactVersion = new DefaultVersioning( version );
getLog().debug( "Parsed Version" );
getLog().debug( " major: " + artifactVersion.getMajor() );
getLog().debug( " minor: " + artifactVersion.getMinor() );
getLog().debug( " incremental: " + artifactVersion.getPatch() );
getLog().debug( " buildnumber: " + artifactVersion.getBuildNumber() );
getLog().debug( " qualifier: " + artifactVersion.getQualifier() );
defineVersionProperty( "majorVersion", artifactVersion.getMajor() );
defineVersionProperty( "minorVersion", artifactVersion.getMinor() );
defineVersionProperty( "incrementalVersion", artifactVersion.getPatch() );
defineVersionProperty( "buildNumber", artifactVersion.getBuildNumber() );
defineVersionProperty( "nextMajorVersion", artifactVersion.getMajor() + 1 );
defineVersionProperty( "nextMinorVersion", artifactVersion.getMinor() + 1 );
defineVersionProperty( "nextIncrementalVersion", artifactVersion.getPatch() + 1 );
defineVersionProperty( "nextBuildNumber", artifactVersion.getBuildNumber() + 1 );
defineFormattedVersionProperty( "majorVersion", String.format( formatMajor, artifactVersion.getMajor() ) );
defineFormattedVersionProperty( "minorVersion", String.format( formatMinor, artifactVersion.getMinor() ) );
defineFormattedVersionProperty( "incrementalVersion", String.format( formatIncremental, artifactVersion.getPatch() ) );
defineFormattedVersionProperty( "buildNumber", String.format( formatBuildNumber, artifactVersion.getBuildNumber() ));
defineFormattedVersionProperty( "nextMajorVersion", String.format( formatMajor, artifactVersion.getMajor() + 1 ));
defineFormattedVersionProperty( "nextMinorVersion", String.format( formatMinor, artifactVersion.getMinor() + 1 ));
defineFormattedVersionProperty( "nextIncrementalVersion", String.format( formatIncremental, artifactVersion.getPatch() + 1 ));
defineFormattedVersionProperty( "nextBuildNumber", String.format( formatBuildNumber, artifactVersion.getBuildNumber() + 1 ));
String osgi = artifactVersion.getAsOSGiVersion();
String qualifier = artifactVersion.getQualifier();
String qualifierQuestion = "";
if ( qualifier == null )
{
qualifier = "";
} else {
qualifierQuestion = qualifierPrefix;
}
defineVersionProperty( "qualifier", qualifier );
defineVersionProperty( "qualifier?", qualifierQuestion + qualifier );
defineVersionProperty( "osgiVersion", osgi );
} | [
"Parse a version String and add the components to a properties object.\n\n@param version the version to parse"
] | [
"Retrieve the configuration of the named template.\n\n@param name the template name;",
"Determines whether or not two axially aligned bounding boxes in\nthe same coordinate space intersect.\n@param bv1 first bounding volume to test.\n@param bv2 second bounding volume to test.\n@return true if the boxes intersect, false if not.",
"Creates new legal hold policy assignment.\n@param api the API connection to be used by the resource.\n@param policyID ID of policy to create assignment for.\n@param resourceType type of target resource. Can be 'file_version', 'file', 'folder', or 'user'.\n@param resourceID ID of the target resource.\n@return info about created legal hold policy assignment.",
"Use this API to fetch the statistics of all gslbservice_stats resources that are configured on netscaler.",
"Parses the result and returns the failure description. If the result was successful, an empty string is\nreturned.\n\n@param result the result of executing an operation\n\n@return the failure message or an empty string",
"Process a compilation unit already parsed and build.",
"Return true if the expression is a constructor call on any of the named classes, with any number of parameters.\n@param expression - the expression\n@param classNames - the possible List of class names\n@return as described",
"Try to set the value from the provided Json string.\n@param value the value to set.\n@throws Exception thrown if parsing fails.",
"Generates a download id for the request and adds the download request to the download request queue for the dispatchers pool to act on immediately.\n\n@param request\n@return downloadId"
] |
public Schedule generateSchedule(LocalDate referenceDate, LocalDate startDate, LocalDate endDate) {
return ScheduleGenerator.createScheduleFromConventions(referenceDate, startDate, endDate, getFrequency(), getDaycountConvention(),
getShortPeriodConvention(), getDateRollConvention(), getBusinessdayCalendar(), getFixingOffsetDays(), getPaymentOffsetDays(), isUseEndOfMonth());
} | [
"Generate a schedule for the given start and end date.\n\n@param referenceDate The reference date (corresponds to \\( t = 0 \\).\n@param startDate The start date.\n@param endDate The end date.\n@return The schedule"
] | [
"Parses the configuration node and provides a pipeline configuration without any extensions marked for loading.\nThe configuration node is supposed to conform to the pipeline configuration JSON schema.\n\n<p>The caller is supposed to use the methods from the builder to add/find extension classes that will be used in\nthe analysis.\n\n<p>Note that the returned pipeline configuration might not contain all the extensions available in\nthe classloader depending on the include/exclude filters in the configuration.\n\n@param json the configuration node\n@return a pipeline configuration parsed from the configuration\n@see Builder#build()",
"Sets the set of site filters based on the given string.\n\n@param filters\ncomma-separates list of site keys, or \"-\" to filter all site\nlinks",
"Swaps two specified partitions.\n\nPair-wase partition swapping may be more prone to local minima than\nlarger perturbations. Could consider \"swapping\" a list of\n<nodeId/partitionId>. This would allow a few nodes to be identified\n(random # btw 2-5?) and then \"swapped\" (shuffled? rotated?).\n\n@return modified cluster metadata.",
"Get image Id from imageTag using DockerBuildInfoHelper client.\n\n@param imageTag\n@param host\n@return",
"Returns a new client id for the profileIdentifier\n\n@param model\n@param profileIdentifier\n@return json with a new client_id\n@throws Exception",
"Select item by it's position\n\n@param position int value of item position to select\n@param invokeListeners boolean value for invoking listeners",
"Write the configuration to a buffered writer.",
"Set dates with the provided check states.\n@param datesWithCheckInfo the dates to set, accompanied with the check state to set.",
"Get the ActivityInterface.\n\n@return The ActivityInterface"
] |
public static boolean canUseAsDelayedQueue(final Jedis jedis, final String key) {
final String type = jedis.type(key);
return (ZSET.equalsIgnoreCase(type) || NONE.equalsIgnoreCase(type));
} | [
"Determines if the queue identified by the given key can be used as a delayed queue.\n\n@param jedis\nconnection to Redis\n@param key\nthe key that identifies a queue\n@return true if the key already is a delayed queue or is not currently used, false otherwise"
] | [
"Returns the link for the given workplace resource.\n\nThis should only be used for resources under /system or /shared.<p<\n\n@param cms the current OpenCms user context\n@param resourceName the resource to generate the online link for\n@param forceSecure forces the secure server prefix\n\n@return the link for the given resource",
"Adds a symbol to the end of the token list\n@param symbol Symbol which is to be added\n@return The new Token created around symbol",
"Converts an MPXJ Duration instance into the string representation\nof a Planner duration.\n\nPlanner represents durations as a number of seconds in its\nfile format, however it displays durations as days and hours,\nand seems to assume that a working day is 8 hours.\n\n@param value string representation of a duration\n@return Duration instance",
"The transaction will be executed. While it is running, any semantic state change\nin the given resource will be ignored and the cache will not be cleared.",
"Send a waveform detail update announcement to all registered listeners.\n\n@param player the player whose waveform detail has changed\n@param detail the new waveform detail, if any",
"This method lists task predecessor and successor relationships.\n\n@param file project file",
"Make all elements of a String array lower case.\n@param strings string array, may contain null item but can't be null\n@return array containing all provided elements lower case",
"Adds OPT_N | OPT_NODE option to OptionParser, with one argument.\n\n@param parser OptionParser to be modified\n@param required Tells if this option is required or optional",
"Check that each emitted notification is properly described by its source."
] |
public static GlobalParameter create(DbConn cnx, String key, String value)
{
QueryResult r = cnx.runUpdate("globalprm_insert", key, value);
GlobalParameter res = new GlobalParameter();
res.id = r.getGeneratedId();
res.key = key;
res.value = value;
return res;
} | [
"Create a new GP entry in the database. No commit performed."
] | [
"Compares current cluster with final cluster. Uses pertinent store defs\nfor each cluster to determine if a node that hosts a zone-primary in the\ncurrent cluster will no longer host any zone-nary in the final cluster.\nThis check is the precondition for a server returning an invalid metadata\nexception to a client on a normal-case put or get. Normal-case being that\nthe zone-primary receives the pseudo-master put or the get operation.\n\n@param currentCluster\n@param currentStoreDefs\n@param finalCluster\n@param finalStoreDefs\n@return pretty-printed string documenting invalid metadata rates for each\nzone.",
"Decode a code from the stream s using huffman table h. Return the symbol or\na negative value if there is an error. If all of the lengths are zero, i.e.\nan empty code, or if the code is incomplete and an invalid code is received,\nthen -9 is returned after reading MAXBITS bits.\n\nFormat notes:\n\n- The codes as stored in the compressed data are bit-reversed relative to\na simple integer ordering of codes of the same lengths. Hence below the\nbits are pulled from the compressed data one at a time and used to\nbuild the code value reversed from what is in the stream in order to\npermit simple integer comparisons for decoding.\n\n- The first code for the shortest length is all ones. Subsequent codes of\nthe same length are simply integer decrements of the previous code. When\nmoving up a length, a one bit is appended to the code. For a complete\ncode, the last code of the longest length will be all zeros. To support\nthis ordering, the bits pulled during decoding are inverted to apply the\nmore \"natural\" ordering starting with all zeros and incrementing.\n\n@param h Huffman table\n@return status code",
"Use this API to fetch auditnslogpolicy_vpnvserver_binding resources of given name .",
"Save current hostname and reuse it.\n\n@return hostname as String",
"Utility method to read a percentage value.\n\n@param data data block\n@param offset offset into data block\n@return percentage value",
"Calls the provided closure for a \"page\" of rows from the table represented by this DataSet.\nA page is defined as starting at a 1-based offset, and containing a maximum number of rows.\n\n@param offset the 1-based offset for the first row to be processed\n@param maxRows the maximum number of rows to be processed\n@param closure called for each row with a GroovyResultSet\n@throws SQLException if a database access error occurs\n@see groovy.sql.Sql#eachRow(String, java.util.List, int, int, groovy.lang.Closure)",
"Determines the encoding block groups for the specified data.",
"Unmark a PersistenceBroker as preferred choice for current Thread\n\n@param key The PBKey the broker is associated to\n@param broker The PersistenceBroker to unmark",
"Counts the coordinates stored in a single statement for the relevant\nproperty, if they are actually given and valid.\n\n@param statement\n@param itemDocument"
] |
public static List<Representation> parseRepresentations(JsonObject jsonObject) {
List<Representation> representations = new ArrayList<Representation>();
for (JsonValue representationJson : jsonObject.get("entries").asArray()) {
Representation representation = new Representation(representationJson.asObject());
representations.add(representation);
}
return representations;
} | [
"Parse representations from a file object response.\n@param jsonObject representations json object in get response for /files/file-id?fields=representations\n@return list of representations"
] | [
"Sets the top padding character for all cells in the table.\n@param paddingTopChar new padding character, ignored if null\n@return this to allow chaining",
"Loads a classifier from the file specified. If the file's name ends in .gz,\nuses a GZIPInputStream, else uses a regular FileInputStream. This method\ncloses the File when done.\n\n@param file\nLoads a classifier from this file.\n@param props\nProperties in this object will be used to overwrite those\nspecified in the serialized classifier\n\n@throws IOException\nIf there are problems accessing the input stream\n@throws ClassCastException\nIf there are problems interpreting the serialized data\n@throws ClassNotFoundException\nIf there are problems interpreting the serialized data",
"Set the permissions for the photo.\n\nThis method requires authentication with 'write' permission.\n\n@param photoId\nThe photo ID\n@param permissions\nThe permissions object\n@throws FlickrException",
"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.",
"Determine the target type for the generic return type of the given method,\nwhere formal type variables are declared on the given class.\n@param method the method to introspect\n@param clazz the class to resolve type variables against\n@return the corresponding generic parameter or return type\n@see #resolveReturnTypeForGenericMethod",
"Write the configuration to a buffered writer.",
"Generates a schedule based on some meta data. The schedule generation\nconsiders short periods.\n\n@param referenceDate The date which is used in the schedule to internally convert dates to doubles, i.e., the date where t=0.\n@param startDate The start date of the first period.\n@param frequency The frequency.\n@param maturity The end date of the last period.\n@param daycountConvention The daycount convention.\n@param shortPeriodConvention If short period exists, have it first or last.\n@param dateRollConvention Adjustment to be applied to the all dates.\n@param businessdayCalendar Businessday calendar (holiday calendar) to be used for date roll adjustment.\n@param fixingOffsetDays Number of business days to be added to period start to get the fixing date.\n@param paymentOffsetDays Number of business days to be added to period end to get the payment date.\n@return The corresponding schedule\n@deprecated Will be removed in version 2.3",
"Validates that we only have allowable filters.\n\n<p>Note that equality and ancestor filters are allowed, however they may result in\ninefficient sharding.",
"when divisionPrefixLen is null, isAutoSubnets has no effect"
] |
public boolean isEmbeddedProperty(String targetTypeName, List<String> namesWithoutAlias) {
OgmEntityPersister persister = getPersister( targetTypeName );
Type propertyType = persister.getPropertyType( namesWithoutAlias.get( 0 ) );
if ( propertyType.isComponentType() ) {
// Embedded
return true;
}
else if ( propertyType.isAssociationType() ) {
Joinable associatedJoinable = ( (AssociationType) propertyType ).getAssociatedJoinable( persister.getFactory() );
if ( associatedJoinable.isCollection() ) {
OgmCollectionPersister collectionPersister = (OgmCollectionPersister) associatedJoinable;
return collectionPersister.getType().isComponentType();
}
}
return false;
} | [
"Checks if the path leads to an embedded property or association.\n\n@param targetTypeName the entity with the property\n@param namesWithoutAlias the path to the property with all the aliases resolved\n@return {@code true} if the property is an embedded, {@code false} otherwise."
] | [
"check max size of each message\n@param maxMessageSize the max size for each message",
"Creates builder for passed path element\n\n@param elementName name of xml element that is used as decorator\n@return PersistentResourceXMLBuilder\n@deprecated decorator element support is currently considered as preview\n@since 4.0",
"Returns all categories that are direct children of the current main category.\n\n@return all categories that are direct children of the current main category.",
"Look-up the results data for a particular test class.",
"Returns a single parent of the given tag. If there are multiple parents, throws a WindupException.",
"Ensures that generate-table-info is set to false if generate-repository-info is set to false.\n\n@param classDef The class descriptor\n@param checkLevel The current check level (this constraint is checked in all levels)",
"checks if there is a writelock for transaction tx on object obj.\nReturns true if so, else false.",
"Gets the filename from a path or URL.\n@param path or url.\n@return the file name.",
"Submits the configured template to Transloadit.\n\n@return {@link Response}\n@throws RequestException if request to transloadit server fails.\n@throws LocalOperationException if something goes wrong while running non-http operations."
] |
public static void popShell() {
ArrayList<CmsShell> shells = SHELL_STACK.get();
if (shells.size() > 0) {
shells.remove(shells.size() - 1);
}
} | [
"Removes top of thread-local shell stack."
] | [
"Reads the current properties for a language. If not already done, the properties are read from the respective file.\n@param locale the locale for which the localization should be returned.\n@return the properties.\n@throws IOException thrown if reading the properties from a file fails.\n@throws CmsException thrown if reading the properties from a file fails.",
"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",
"Append field with quotes and escape characters added, if required.\n\n@return this",
"Modify the tranform's current rotation in quaternion terms, around a\npivot other than the origin.\n\n@param w\n'W' component of the quaternion.\n@param x\n'X' component of the quaternion.\n@param y\n'Y' component of the quaternion.\n@param z\n'Z' component of the quaternion.\n@param pivotX\n'X' component of the pivot's location.\n@param pivotY\n'Y' component of the pivot's location.\n@param pivotZ\n'Z' component of the pivot's location.",
"Returns the corresponding mac section, or null if this address section does not correspond to a mac section.\nIf this address section has a prefix length it is ignored.\n\n@param extended\n@return",
"Executes the query and returns the factory found, if there is only one factory.\nIf multiple factories match the query, one is selected.\n\n@param query the factory query, not null.\n@return the factory found, or null.",
"Set the diffuse light intensity.\n\nThis designates the color of the diffuse reflection.\nIt is multiplied by the material diffuse color to derive\nthe hue of the diffuse reflection for that material.\nThe built-in phong shader {@link GVRPhongShader} uses a {@code vec4} uniform named\n{@code diffuse_intensity} to control the intensity of diffuse light reflected.\n\n@param r red component (0 to 1)\n@param g green component (0 to 1)\n@param b blue component (0 to 1)\n@param a alpha component (0 to 1)",
"scroll only once",
"Return all levels of moneyness for which data exists.\nMoneyness is returned as actual difference strike - par swap rate.\n\n@return The levels of moneyness as difference of strike to par swap rate."
] |
public Task add()
{
Task task = new Task(m_projectFile, (Task) null);
add(task);
m_projectFile.getChildTasks().add(task);
return task;
} | [
"Add a task to the project.\n\n@return new task instance"
] | [
"Add the declarationSRef to the DeclarationsManager.\nCalculate the matching of the Declaration with the DeclarationFilter of the\nLinker.\n\n@param declarationSRef the ServiceReference<D> of the Declaration",
"B tensor is ignored for CUDNN_OP_TENSOR_SQRT, CUDNN_OP_TENSOR_NOT.",
"Handles the response of the getVersion request.\n@param incomingMessage the response message to process.",
"Creates a sorted list that contains the items of the given iterable. The resulting list is sorted according to\nthe order induced by the specified comparator.\n\n@param iterable\nthe items to be sorted. May not be <code>null</code>.\n@param comparator\nthe comparator to be used. May be <code>null</code> to indicate that the natural ordering of the\nelements should be used.\n@return a sorted list as a shallow copy of the given iterable.\n@see Collections#sort(List, Comparator)\n@see #sort(Iterable)\n@see #sortBy(Iterable, org.eclipse.xtext.xbase.lib.Functions.Function1)\n@see ListExtensions#sortInplace(List, Comparator)\n@since 2.7",
"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",
"Populates a ProjectCalendarWeek instance from Asta work pattern data.\n\n@param week target ProjectCalendarWeek instance\n@param workPatternID target work pattern ID\n@param workPatternMap work pattern data\n@param timeEntryMap time entry map\n@param exceptionTypeMap exception type map",
"Use this API to update nsacl6 resources.",
"Adds a submodule to the module.\n\n<P>\nINFO: If the module is promoted, all added submodule will be promoted.\n\n@param submodule Module",
"Will spawn a thread for each type in rootEntities, they will all re-join\non endAllSignal when finished.\n\n@param backend\n\n@throws InterruptedException\nif interrupted while waiting for endAllSignal."
] |
public static final List<String> listProjectNames(File directory)
{
List<String> result = new ArrayList<String>();
File[] files = directory.listFiles(new FilenameFilter()
{
@Override public boolean accept(File dir, String name)
{
return name.toUpperCase().endsWith("STR.P3");
}
});
if (files != null)
{
for (File file : files)
{
String fileName = file.getName();
String prefix = fileName.substring(0, fileName.length() - 6);
result.add(prefix);
}
}
Collections.sort(result);
return result;
} | [
"Retrieve a list of the available P3 project names from a directory.\n\n@param directory directory containing P3 files\n@return list of project names"
] | [
"Checks if the provided license is valid and could be stored into the database\n\n@param license the license to test\n@throws WebApplicationException if the data is corrupted",
"Use this API to add snmpmanager resources.",
"Determine if the buffer, when expressed as text, matches a fingerprint regular expression.\n\n@param buffer bytes from file\n@param fingerprint fingerprint regular expression\n@return true if the file matches the fingerprint",
"Sets the values of this vector to those of v1.\n\n@param v1\nvector whose values are copied",
"Use this API to fetch lbmonitor_binding resource of given name .",
"add a Component to this Worker. After the call dragging is enabled for this\nComponent.\n@param c the Component to register",
"Determine which type of percent complete is used on on this task,\nand calculate the required value.\n\n@param row task data\n@return percent complete value",
"end class SAXErrorHandler",
"Add an object into cache by key with expiration time specified\n\n@param key\nthe key to index the object within the cache\n@param obj\nthe object to be cached\n@param expiration\nthe seconds after which the object will be evicted from the cache"
] |
public void endRecord_() {
// this is where we actually update the link database. basically,
// all we need to do is to retract those links which weren't seen
// this time around, and that can be done via assertLink, since it
// can override existing links.
// get all the existing links
Collection<Link> oldlinks = linkdb.getAllLinksFor(getIdentity(current));
// build a hashmap so we can look up corresponding old links from
// new links
if (oldlinks != null) {
Map<String, Link> oldmap = new HashMap(oldlinks.size());
for (Link l : oldlinks)
oldmap.put(makeKey(l), l);
// removing all the links we found this time around from the set of
// old links. any links remaining after this will be stale, and need
// to be retracted
for (Link newl : new ArrayList<Link>(curlinks)) {
String key = makeKey(newl);
Link oldl = oldmap.get(key);
if (oldl == null)
continue;
if (oldl.overrides(newl))
// previous information overrides this link, so ignore
curlinks.remove(newl);
else if (sameAs(oldl, newl)) {
// there's no new information here, so just ignore this
curlinks.remove(newl);
oldmap.remove(key); // we don't want to retract the old one
} else
// the link is out of date, but will be overwritten, so remove
oldmap.remove(key);
}
// all the inferred links left in oldmap are now old links we
// didn't find on this pass. there is no longer any evidence
// supporting them, and so we can retract them.
for (Link oldl : oldmap.values())
if (oldl.getStatus() == LinkStatus.INFERRED) {
oldl.retract(); // changes to retracted, updates timestamp
curlinks.add(oldl);
}
}
// okay, now we write it all to the database
for (Link l : curlinks)
linkdb.assertLink(l);
} | [
"this method is called from the event methods"
] | [
"Returns iterable with all enterprise assignments of this retention policy.\n@param limit the limit of entries per response. The default value is 100.\n@param fields the fields to retrieve.\n@return an iterable containing all enterprise assignments.",
"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.\"",
"The entity instance is not in the session cache\n\nCopied from Loader#instanceNotYetLoaded",
"Compute 2-dimensional Perlin noise.\n@param x the x coordinate\n@param y the y coordinate\n@return noise value at (x,y)",
"Returns a color for a given absolute number that is to be shown on the\nmap.\n\n@param value\n@return",
"Checks the id value.\n\n@param fieldDef The field descriptor\n@param checkLevel The current check level (this constraint is checked in basic and strict)\n@exception ConstraintException If the constraint has been violated",
"Throws an IllegalStateException when the given value is not null.\n@return the value",
"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.",
"Inits the ws client.\n\n@param context the context\n@throws Exception the exception"
] |
public void startup() {
if (config.getEnableZookeeper()) {
serverRegister.registerBrokerInZk();
for (String topic : getAllTopics()) {
serverRegister.processTask(new TopicTask(TopicTask.TaskType.CREATE, topic));
}
startupLatch.countDown();
}
logger.debug("Starting log flusher every {} ms with the following overrides {}", config.getFlushSchedulerThreadRate(), logFlushIntervalMap);
logFlusherScheduler.scheduleWithRate(new Runnable() {
public void run() {
flushAllLogs(false);
}
}, config.getFlushSchedulerThreadRate(), config.getFlushSchedulerThreadRate());
} | [
"Register this broker in ZK for the first time."
] | [
"Creates a remove operation.\n\n@param address the address for the operation\n@param recursive {@code true} if the remove should be recursive, otherwise {@code false}\n\n@return the operation",
"Converts a byte array to a hexadecimal string representation\n@param bb the byte array to convert\n@return string the string representation",
"Returns the result of the performed spellcheck formatted in JSON.\n\n@param request The CmsSpellcheckingRequest.\n@return JSONObject that contains the result of the performed spellcheck.",
"List app dynos for an app\n\n@param appName See {@link #listApps} for a list of apps that can be used.",
"This method works as the one above, adding some properties to the message\n\n@param agent_name\nThe id of the agents that receive the message\n@param msgtype\n@param message_content\nThe content of the message\n@param properties\nto be added to the message\n@param connector\nThe connector to get the external access",
"Returns the list of colliders attached to scene objects that are\nvisible from the viewpoint of the camera.\n\n<p>\nThis method is thread safe because it guarantees that only\none thread at a time is picking against particular scene graph,\nand it extracts the hit data during within its synchronized block. You\ncan then examine the return list without worrying about another thread\ncorrupting your hit data.\n\nThe hit location returned is the world position of the scene object center.\n\n@param scene\nThe {@link GVRScene} with all the objects to be tested.\n\n@return A list of {@link org.gearvrf.GVRPicker.GVRPickedObject}, sorted by distance from the\ncamera rig. Each {@link org.gearvrf.GVRPicker.GVRPickedObject} contains the scene object\nwhich owns the {@link GVRCollider} along with the hit\nlocation and distance from the camera.\n\n@since 1.6.6",
"except for the ones that make the content appear under the system bars.",
"This will check to see if certain configuration values exist from the ConfigurationService\nIf not then it redirects to the configuration screen",
"Counts the number of documents in the collection.\n\n@return a task containing the number of documents in the collection"
] |
private void digestInteger(MessageDigest digest, int value) {
byte[] valueBytes = new byte[4];
Util.numberToBytes(value, valueBytes, 0, 4);
digest.update(valueBytes);
} | [
"Helper method to add a Java integer value to a message digest.\n\n@param digest the message digest being built\n@param value the integer whose bytes should be included in the digest"
] | [
"Determines the prefix of an accessor method based on an accessor method name.\n\n@param methodName\nan accessor method name\n@return the resulting prefix",
"Singleton of MetaClassRegistry.\n\n@param includeExtension\n@return the registry",
"Obtains a International Fixed local date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the International Fixed local date-time, not null\n@throws DateTimeException if unable to create the date-time",
"Pops the top of the stack of active elements if the current position in the call stack corresponds to the one\nthat pushed the active elements.\n\n<p>This method does not do any type checks, so take care to retrieve the elements with the same types used to push\nto them onto the stack.\n\n@param <T> the type of the elements\n\n@return the active elements or null if the current call stack did not push any active elements onto the stack",
"Add an URL to the given classloader\n\n@param loader ClassLoader\n@param url URL to add\n@throws IOException I/O Error\n@throws InvocationTargetException Invocation Error\n@throws IllegalArgumentException Illegal Argument\n@throws IllegalAccessException Illegal Access\n@throws SecurityException Security Constraint\n@throws NoSuchMethodException Method not found",
"Creates a curator built using Application's zookeeper connection string. Root path will start\nat Fluo application chroot.",
"Stops this progress bar.",
"Counts the amount of 'ch' at the start of this line optionally ignoring\nspaces.\n\n@param ch\nThe char to count.\n@param allowSpaces\nWhether to allow spaces or not\n@return Number of characters found.\n@since 0.12",
"Get a setted section knowing his title\n\nN.B. this search only into section list and bottom section list.\n@param title is the title of the section\n@return the section with title or null if the section is not founded"
] |
public static int[] Unique(int[] values) {
HashSet<Integer> lst = new HashSet<Integer>();
for (int i = 0; i < values.length; i++) {
lst.add(values[i]);
}
int[] v = new int[lst.size()];
Iterator<Integer> it = lst.iterator();
for (int i = 0; i < v.length; i++) {
v[i] = it.next();
}
return v;
} | [
"Get unique values form the array.\n\n@param values Array of values.\n@return Unique values."
] | [
"Returns the primary message codewords for mode 2.\n\n@param postcode the postal code\n@param country the country code\n@param service the service code\n@return the primary message, as codewords",
"Get prototype name.\n\n@return prototype name",
"domain.xml",
"Caches the given object using the given Identity as key\n\n@param oid The Identity key\n@param obj The object o cache",
"Set the color at \"index\" to \"color\". Entries are interpolated linearly from\nthe existing entries at \"firstIndex\" and \"lastIndex\" to the new entry.\nfirstIndex < index < lastIndex must hold.\n@param index the position to set\n@param firstIndex the position of the first color from which to interpolate\n@param lastIndex the position of the second color from which to interpolate\n@param color the color to set",
"Call the Coverage Task.",
"Set a custom response for this path\n\n@param pathName name of path\n@param customResponse value of custom response\n@return true if success, false otherwise\n@throws Exception exception",
"Calculate the Hamming distance between two hashes\n\n@param h1\n@param h2\n@return",
"Stop a timer of the given string name for the current thread. If no such\ntimer exists, -1 will be returned. Otherwise the return value is the CPU\ntime that was measured.\n\n@param timerName\nthe name of the timer\n@param todoFlags\n@return CPU time if timer existed and was running, and -1 otherwise"
] |
private static JSONObject parseStencilSet(StencilSet stencilSet) throws JSONException {
if (stencilSet != null) {
JSONObject stencilSetObject = new JSONObject();
stencilSetObject.put("url",
stencilSet.getUrl().toString());
stencilSetObject.put("namespace",
stencilSet.getNamespace().toString());
return stencilSetObject;
}
return new JSONObject();
} | [
"Delivers the correct JSON Object for the Stencilset\n\n@param stencilSet\n@throws org.json.JSONException"
] | [
"Retrieve the date range at the specified index.\nThe index is zero based, and this method will return\nnull if the requested date range does not exist.\n\n@param index range index\n@return date range instance",
"Read activity code types and values.\n\n@param types activity code type data\n@param typeValues activity code value data\n@param assignments activity code task assignments",
"Get the remote address.\n\n@return the remote address, {@code null} if not available",
"Removes obsolete elements from names and shared elements.\n\n@param names Shared element names.\n@param sharedElements Shared elements.\n@param elementsToRemove The elements that should be removed.",
"Copied from original SeleniumProxyHandler\nChanged SslRelay to SslListener and getSslRelayOrCreateNew to getSslRelayOrCreateNewOdo\nNo other changes to the function\n\n@param pathInContext\n@param pathParams\n@param request\n@param response\n@throws HttpException\n@throws IOException",
"Old REST client uses old REST service",
"Write a comma to the output stream if required.",
"Use this API to add sslaction.",
"Closes the Netty Channel and releases all resources"
] |
protected Patch createProcessedPatch(final Patch original) {
// Process elements
final List<PatchElement> elements = new ArrayList<PatchElement>();
// Process layers
for (final PatchEntry entry : getLayers()) {
final PatchElement element = createPatchElement(entry, entry.element.getId(), entry.modifications);
elements.add(element);
}
// Process add-ons
for (final PatchEntry entry : getAddOns()) {
final PatchElement element = createPatchElement(entry, entry.element.getId(), entry.modifications);
elements.add(element);
}
// Swap the patch element modifications, keep the identity ones since we don't need to fix the misc modifications
return new PatchImpl(original.getPatchId(), original.getDescription(), original.getLink(), original.getIdentity(), elements, identityEntry.modifications);
} | [
"Create a patch representing what we actually processed. This may contain some fixed content hashes for removed\nmodules.\n\n@param original the original\n@return the processed patch"
] | [
"Register the given common classes with the ClassUtils cache.",
"Check if the an operation is done or not.\n\n@param requestId Id of the request\n@param remove Whether remove the request out of the list if it is done.\n@return True if request is complete, false otherwise",
"A convenience method for creating an immutable list.\n\n@param self a Set\n@return an immutable Set\n@see java.util.Collections#unmodifiableSet(java.util.Set)\n@since 1.0",
"Set the degrees of rotation. Value will be set to -1, if not available.\n\n@param rotation",
"Return the index associated to the Renderer.\n\n@param renderer used to search in the prototypes collection.\n@return the prototype index associated to the renderer passed as argument.",
"This constructs and returns the request object for the producer pool\n\n@param topic the topic to which the data should be published\n@param bidPid the broker id and partition id\n@param data the data to be published\n@return producer data of builder",
"generate a prepared DELETE-Statement for the Class\ndescribed by cld.\n@param cld the ClassDescriptor",
"request token from GCM",
"Assigned action code"
] |
private void handleSerialApiGetInitDataResponse(
SerialMessage incomingMessage) {
logger.debug(String.format("Got MessageSerialApiGetInitData response."));
this.isConnected = true;
int nodeBytes = incomingMessage.getMessagePayloadByte(2);
if (nodeBytes != NODE_BYTES) {
logger.error("Invalid number of node bytes = {}", nodeBytes);
return;
}
int nodeId = 1;
// loop bytes
for (int i = 3;i < 3 + nodeBytes;i++) {
int incomingByte = incomingMessage.getMessagePayloadByte(i);
// loop bits in byte
for (int j=0;j<8;j++) {
int b1 = incomingByte & (int)Math.pow(2.0D, j);
int b2 = (int)Math.pow(2.0D, j);
if (b1 == b2) {
logger.info(String.format("Found node id = %d", nodeId));
// Place nodes in the local ZWave Controller
this.zwaveNodes.put(nodeId, new ZWaveNode(this.homeId, nodeId, this));
this.getNode(nodeId).advanceNodeStage();
}
nodeId++;
}
}
logger.info("------------Number of Nodes Found Registered to ZWave Controller------------");
logger.info(String.format("# Nodes = %d", this.zwaveNodes.size()));
logger.info("----------------------------------------------------------------------------");
// Advance node stage for the first node.
} | [
"Handles the response of the SerialApiGetInitData request.\n@param incomingMlivessage the response message to process."
] | [
"Render a zero Double as null.\n\n@param value double value\n@return null if the double value is zero",
"seeks to a particular month\n\n@param direction the direction to seek: two possibilities\n'<' go backward\n'>' go forward\n\n@param seekAmount the amount to seek. Must be guaranteed to parse as an integer\n\n@param month the month to seek to. Must be guaranteed to parse as an integer\nbetween 1 and 12",
"Reads Logical Screen Descriptor.",
"Returns the cost rate table index for this assignment.\n\n@return cost rate table index",
"Provides lookup of elements by non-namespaced name.\n\n@param name the name or shortcut key for nodes of interest\n@return the nodes of interest which match name",
"Retrieve a boolean value.\n\n@param name column name\n@return boolean value",
"Handling out responce.\n\n@param message\nthe message\n@throws Fault\nthe fault",
"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",
"Calculate Median value.\n@param values Values.\n@return Median."
] |
public static boolean decomposeSafe(DecompositionInterface<ZMatrixRMaj> decomposition, ZMatrixRMaj a) {
if( decomposition.inputModified() ) {
a = a.copy();
}
return decomposition.decompose(a);
} | [
"Decomposes the input matrix 'a' and makes sure it isn't modified."
] | [
"Get the list of active tasks from the server.\n\n@return List of tasks\n@see <a href=\"https://console.bluemix.net/docs/services/Cloudant/api/active_tasks.html\">\nActive tasks</a>",
"Read correlation id from message.\n\n@param message the message\n@return the CorrelationId as string",
"Handles incoming Serial Messages. Serial messages can either be messages\nthat are a response to our own requests, or the stick asking us information.\n@param incomingMessage the incoming message to process.",
"Reports that a node is resolved hence other nodes depends on it can consume it.\n\n@param completed the node ready to be consumed",
"Returns the full record for a single team.\n\n@param team Globally unique identifier for the team.\n@return Request object",
"Handles the response of the SendData request.\n@param incomingMessage the response message to process.",
"Run through all maps and remove any references that have been null'd out by the GC.",
"returns a sorted array of fields",
"Remove any protocol-level headers from the remote server's response that\ndo not apply to the new response we are sending.\n\n@param response"
] |
private String getRowLineBuf(int colCount, List<Integer> colMaxLenList, String[][] data) {
S.Buffer rowBuilder = S.buffer();
int colWidth;
for (int i = 0 ; i < colCount ; i ++) {
colWidth = colMaxLenList.get(i) + 3;
for (int j = 0; j < colWidth ; j ++) {
if (j==0) {
rowBuilder.append("+");
} else if ((i+1 == colCount && j+1 == colWidth)) {//for last column close the border
rowBuilder.append("-+");
} else {
rowBuilder.append("-");
}
}
}
return rowBuilder.append("\n").toString();
} | [
"Each string item rendering requires the border and a space on both sides.\n\n12 3 12 3 12 34\n+----- +-------- +------+\nabc venkat last\n\n@param colCount\n@param colMaxLenList\n@param data\n@return"
] | [
"Sets the specified float attribute to the specified value.\n\n@param name name of the attribute\n@param value value of the attribute\n@since 1.9.0",
"Wrap an existing setter.",
"Processes the template for all columns of the current table index.\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\"",
"Detects if the current browser is a Sony Mylo device.\n@return detection of a Sony Mylo device",
"Returns true if the ASTNode is a declaration of a closure, either as a declaration\nor a field.\n@param expression\nthe target expression\n@return\nas described",
"Gets the name of the vertex attribute containing the texture\ncoordinates for the named texture.\n\n@param texName name of texture\n@return name of texture coordinate vertex attribute",
"Parse a list of objects from a JsonParser.\n\n@param jsonParser The JsonParser, preconfigured to be at the START_ARRAY token.",
"Get minimum gray value in the image.\n\n@param fastBitmap Image to be processed.\n@param startX Initial X axis coordinate.\n@param startY Initial Y axis coordinate.\n@param width Width.\n@param height Height.\n@return Minimum gray.",
"Use this API to fetch authenticationvserver_authenticationradiuspolicy_binding resources of given name ."
] |
@SuppressWarnings({"unused", "WeakerAccess"})
public static void changeCredentials(String accountID, String token, String region) {
if(defaultConfig != null){
Logger.i("CleverTap SDK already initialized with accountID:"+defaultConfig.getAccountId()
+" and token:"+defaultConfig.getAccountToken()+". Cannot change credentials to "
+ accountID + " and " + token);
return;
}
ManifestInfo.changeCredentials(accountID,token,region);
} | [
"This method is used to change the credentials of CleverTap account Id, token and region programmatically\n@param accountID CleverTap Account Id\n@param token CleverTap Account Token\n@param region Clever Tap Account Region"
] | [
"adds a value to the list\n\n@param value the value",
"Return the content from an URL in byte array\n\n@param stringUrl URL to get\n@return byte array\n@throws IOException I/O error happened",
"Adds an index to the table for the given index descriptor.\n\n@param indexDescDef The index descriptor\n@param tableDef The table",
"crates a StencilSet object and add it to the current diagram\n@param modelJSON\n@param current\n@throws org.json.JSONException",
"Creates or returns the instance of the helper class.\n\n@param inputSpecification the input specification.\n@param formFillMode if random data should be used on the input fields.\n@return The singleton instance.",
"Await a state.\n\n@param expected the expected state\n@return {@code true} if the state was reached, {@code false} otherwise",
"Sends a text message using given server setup for SMTP.\n\n@param to the to address.\n@param from the from address.\n@param subject the subject.\n@param msg the test message.\n@param setup the SMTP setup.",
"Performs a transpose across block sub-matrices. Reduces\nthe number of cache misses on larger matrices.\n\n*NOTE* If this is beneficial is highly dependent on the computer it is run on. e.g:\n- Q6600 Almost twice as fast as standard.\n- Pentium-M Same speed and some times a bit slower than standard.\n\n@param A Original matrix. Not modified.\n@param A_tran Transposed matrix. Modified.\n@param blockLength Length of a block.",
"Returns the port as configured by the system variables, fallback is the default port value\n\n@param portIdentifier - SYS_*_PORT defined in Constants\n@return"
] |
@Override
public void onLoadFinished(final Loader<SortedList<T>> loader,
final SortedList<T> data) {
isLoading = false;
mCheckedItems.clear();
mCheckedVisibleViewHolders.clear();
mFiles = data;
mAdapter.setList(data);
if (mCurrentDirView != null) {
mCurrentDirView.setText(getFullPath(mCurrentPath));
}
// Stop loading now to avoid a refresh clearing the user's selections
getLoaderManager().destroyLoader( 0 );
} | [
"Called when a previously created loader has finished its load.\n\n@param loader The Loader that has finished.\n@param data The data generated by the Loader."
] | [
"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",
"Returns the screen width in pixels\n\n@param context is the context to get the resources\n@return the screen width in pixels",
"Remove the report directory.",
"Updates the indices in the index buffer from a Java IntBuffer.\nAll of the entries of the input int buffer are copied into\nthe storage for the index buffer. The new indices must be the\nsame size as the old indices - the index buffer size cannot be changed.\n@param data char array containing the new values\n@throws IllegalArgumentException if int buffer is wrong size",
"Turn json string into map\n\n@param json\n@return",
"Get the OAuth request token - this is step one of authorization.\n\n@param callbackUrl\noptional callback URL - required for web auth flow, will be set to \"oob\" if not specified.\n@return the {@link OAuth1RequestToken}, store this for when the user returns from the Flickr website.",
"Use this API to add authenticationradiusaction resources.",
"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.",
"Creates a new ServerDetails object for resolver, this will take URL and name from the deployer ServerDetails as a default behaviour"
] |
public void ifDoesntHaveMemberTag(String template, Properties attributes) throws XDocletException
{
boolean result = false;
if (getCurrentField() != null) {
if (!hasTag(attributes, FOR_FIELD)) {
result = true;
generate(template);
}
}
else if (getCurrentMethod() != null) {
if (!hasTag(attributes, FOR_METHOD)) {
result = true;
generate(template);
}
}
if (!result) {
String error = attributes.getProperty("error");
if (error != null) {
getEngine().print(error);
}
}
} | [
"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.\""
] | [
"very big duct tape",
"Handles the response of the SendData request.\n@param incomingMessage the response message to process.",
"Returns an java object read from the specified ResultSet column.",
"Function to perform backward activation",
"Build a standard-format UDP packet for sending to port 50001 or 50002 in the protocol.\n\n@param type the type of packet to create.\n@param deviceName the 0x14 (twenty) bytes of the device name to send in the packet.\n@param payload the remaining bytes which come after the device name.\n@return the packet to send.",
"Extract the parent WBS from a WBS.\n\n@param wbs current WBS\n@return parent WBS",
"Main render algorithm based on render the video thumbnail, render the title, render the marker\nand the label.",
"Processes one of the menu responses that jointly constitute the track metadata, updating our\nfields accordingly.\n\n@param item the menu response to be considered",
"This method allows a predecessor relationship to be added to this\ntask instance.\n\n@param targetTask the predecessor task\n@param type relation type\n@param lag relation lag\n@return relationship"
] |
public void setRGB(int red, int green, int blue) throws Exception {
CmsColor color = new CmsColor();
color.setRGB(red, green, blue);
m_red = red;
m_green = green;
m_blue = blue;
m_hue = color.getHue();
m_saturation = color.getSaturation();
m_brightness = color.getValue();
m_tbRed.setText(Integer.toString(m_red));
m_tbGreen.setText(Integer.toString(m_green));
m_tbBlue.setText(Integer.toString(m_blue));
m_tbHue.setText(Integer.toString(m_hue));
m_tbSaturation.setText(Integer.toString(m_saturation));
m_tbBrightness.setText(Integer.toString(m_brightness));
m_tbHexColor.setText(color.getHex());
setPreview(color.getHex());
updateSliders();
} | [
"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."
] | [
"Retrieves the amount of work on a given day, and\nreturns it in the specified format.\n\n@param date target date\n@param format required format\n@return work duration",
"Answer the orderBy of all Criteria and Sub Criteria\nthe elements are of class Criteria.FieldHelper\n@return List",
"Indicates if the type is a simple Web Bean\n\n@param clazz The type to inspect\n@return True if simple Web Bean, false otherwise",
"Retrieve the set of start dates represented by this recurrence data.\n\n@return array of start dates",
"Given a particular key, first converts its to the storage format and then\ndetermines which chunk it belongs to\n\n@param key Byte array of keys\n@return Chunk id\n@throws IllegalStateException if unable to find the chunk id for the given key",
"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",
"Checks if the DPI value is already set for GeoServer.",
"Modifier method to set the unique ID of this calendar.\n\n@param uniqueID unique identifier",
"The specified interface must not contain methods, that changes the state of this object itself.\n\n@param code\nsource code of an interface which describes how to generate the <i>immutable</i>\n@param settings\nsettings to generate code\n@return generated source code as string in a result wrapper"
] |
public static String plus(Number value, String right) {
return DefaultGroovyMethods.toString(value) + right;
} | [
"Appends a String to the string representation of this number.\n\n@param value a Number\n@param right a String\n@return a String\n@since 1.0"
] | [
"Notifies that a content item is inserted.\n\n@param position the position of the content item.",
"Reports that a node is faulted.\n\n@param faulted the node faulted\n@param throwable the reason for fault",
"This function wires up a SSL Listener with the cyber villians root CA and cert with the correct CNAME for the request\n\n@param host\n@param listener",
"Get the VCS revision from the Jenkins build environment. The search will one of \"SVN_REVISION\", \"GIT_COMMIT\",\n\"P4_CHANGELIST\" in the environment.\n\n@param env Th Jenkins build environment.\n@return The vcs revision for supported VCS",
"Get the upload parameters.\n@return",
"Auto re-initialize external resourced\nif resources have been already released.",
"This method is called to format a task type.\n\n@param value task type value\n@return formatted task type",
"Returns the mode in the Collection. If the Collection has multiple modes, this method picks one\narbitrarily.",
"The main conversion method.\n@param image A BufferedImage containing the image that needs to be converted\n@param favicon When ico is true it will convert ico file into 16 x 16 size\n@return A string containing the ASCII version of the original image."
] |
protected boolean executeOperation(final TransactionalProtocolClient.TransactionalOperationListener<ServerOperation> listener, TransactionalProtocolClient client, final ServerIdentity identity, final ModelNode operation, final OperationResultTransformer transformer) {
if(client == null) {
return false;
}
final OperationMessageHandler messageHandler = new DelegatingMessageHandler(context);
final OperationAttachments operationAttachments = new DelegatingOperationAttachments(context);
final ServerOperation serverOperation = new ServerOperation(identity, operation, messageHandler, operationAttachments, transformer);
try {
DomainControllerLogger.HOST_CONTROLLER_LOGGER.tracef("Sending %s to %s", operation, identity);
final Future<OperationResponse> result = client.execute(listener, serverOperation);
recordExecutedRequest(new ExecutedServerRequest(identity, result, transformer));
} catch (IOException e) {
final TransactionalProtocolClient.PreparedOperation<ServerOperation> result = BlockingQueueOperationListener.FailedOperation.create(serverOperation, e);
listener.operationPrepared(result);
recordExecutedRequest(new ExecutedServerRequest(identity, result.getFinalResult(), transformer));
}
return true;
} | [
"Execute the operation.\n\n@param listener the transactional operation listener\n@param client the transactional protocol client\n@param identity the server identity\n@param operation the operation\n@param transformer the operation result transformer\n@return whether the operation was executed"
] | [
"Method used to update fields with values received from API.\n@param jsonObject JSON-encoded info about File Version object.",
"Gets the index of a ExpandableWrapper within the helper item list based on\nthe index of the ExpandableWrapper.\n\n@param parentPosition The index of the parent in the list of parents\n@return The index of the parent in the merged list of children and parents",
"Set the repeat type.\n\nIn the default {@linkplain GVRRepeatMode#ONCE run-once} mode, animations\nrun once, ignoring the {@linkplain #getRepeatCount() repeat count.} In\n{@linkplain GVRRepeatMode#PINGPONG ping pong} and\n{@linkplain GVRRepeatMode#REPEATED repeated} modes, animations do honor\nthe repeat count, which {@linkplain #DEFAULT_REPEAT_COUNT defaults} to 2.\n\n@param repeatMode\nOne of the {@link GVRRepeatMode} constants\n@return {@code this}, so you can chain setProperty() calls.\n@throws IllegalArgumentException\nIf {@code repetitionType} is not one of the\n{@link GVRRepeatMode} constants",
"EAP 7.0",
"Places a new value at the end of the existing value array, increasing the field length accordingly.\n@param newValue - the 2 floats making the new SFVec2f appended to the MFVec2f array list",
"Calls the specified Stitch function, and decodes the response into an instance of the specified\ntype. The response will be decoded using the codec registry given.\n\n@param name the name of the Stitch function to call.\n@param args the arguments to pass to the Stitch function.\n@param requestTimeout the number of milliseconds the client should wait for a response from the\nserver before failing with an error.\n@param resultClass the class that the Stitch response should be decoded as.\n@param <T> the type into which the Stitch response will be decoded.\n@param codecRegistry the codec registry that will be used to encode/decode the function call.\n@return the decoded value.",
"Will wait a maximum of 1 minute for each node to response with their result. If an error occurs on any\nmember, we will always attempt to continue execution and collect as many results as possible.\n\n@param execSvc\n@param members\n@param callable\n@return",
"Compares the two comma-separated lists.\n\n@param list1 The first list\n@param list2 The second list\n@return <code>true</code> if the lists are equal",
"Obtain collection of Parameters from request\n\n@param dataArray request parameters\n@return Map of parameters\n@throws Exception exception"
] |
public static Class<?> resolveReturnTypeArgument(Method method, Class<?> genericIfc) {
Assert.notNull(method, "method must not be null");
Type returnType = method.getReturnType();
Type genericReturnType = method.getGenericReturnType();
if (returnType.equals(genericIfc)) {
if (genericReturnType instanceof ParameterizedType) {
ParameterizedType targetType = (ParameterizedType) genericReturnType;
Type[] actualTypeArguments = targetType.getActualTypeArguments();
Type typeArg = actualTypeArguments[0];
if (!(typeArg instanceof WildcardType)) {
return (Class<?>) typeArg;
}
}
else {
return null;
}
}
return resolveTypeArgument((Class<?>) returnType, genericIfc);
} | [
"Resolve the single type argument of the given generic interface against the given\ntarget method which is assumed to return the given interface or an implementation\nof it.\n@param method the target method to check the return type of\n@param genericIfc the generic interface or superclass to resolve the type argument from\n@return the resolved parameter type of the method return type, or {@code null}\nif not resolvable or if the single argument is of type {@link WildcardType}."
] | [
"Removes a set of calendar hours from the day to which they\nare currently attached.\n\n@param hours calendar hours instance",
"Parse the given file to obtains a Properties object.\n\n@param file\n@return a properties object containing all the properties present in the file.\n@throws InvalidDeclarationFileException",
"Vend a SessionVar with the default value",
"Read the data for all of the tables we're interested in.\n\n@param tables list of all available tables\n@param is input stream",
"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",
"Use this API to add route6 resources.",
"Retains only beans which are enabled.\n\n@param beans The mutable set of beans to filter\n@param beanManager The bean manager\n@return a mutable set of enabled beans",
"Set OAuth 1 authentication credentials for the replication target\n\n@param consumerSecret client secret\n@param consumerKey client identifier\n@param tokenSecret OAuth server token secret\n@param token OAuth server issued token\n@return this Replication instance to set more options or trigger the replication",
"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"
] |
public static Result get(XmlFileModel key)
{
String cacheKey = getKey(key);
Result result = null;
CacheDocument reference = map.get(cacheKey);
if (reference == null)
return new Result(false, null);
if (reference.parseFailure)
return new Result(true, null);
Document document = reference.getDocument();
if (document == null)
LOG.info("Cache miss on XML document: " + cacheKey);
return new Result(false, document);
} | [
"Retrieve the currently cached value for the given document."
] | [
"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",
"Retrieves the monthly or yearly relative day of the week.\n\n@return day of the week",
"Adds the given entity to the inverse associations it manages.",
"Sets the specified boolean attribute to the specified value.\n\n@param name name of the attribute\n@param value value of the attribute\n@since 1.9.0",
"Add a line symbolizer definition to the rule.\n\n@param styleJson The old style.",
"Returns the index of the first invalid character of the zone, or -1 if the zone is valid\n\n@param sequence\n@return",
"Creates a new row representing a rule.\n@param type the type for the rule row, must not be null nor {@link TableRowType#CONTENT} nor {@link TableRowType#UNKNOWN}\n@param style the style for the rule row, must not be null nor {@link TableRowStyle#UNKNOWN}\n@return a new row representing a rule\n@throws {@link NullPointerException} if type or style where null\n@throws {@link IllegalStateException} if type or style where unknown or if type was {@link TableRowType#CONTENT}",
"Generate a module graph regarding the filters\n\n@param moduleId String\n@return AbstractGraph",
"Add tasks to the tree.\n\n@param parentNode parent tree node\n@param parent parent task container"
] |
public void setOnKeyboardDone(final IntlPhoneInputListener listener) {
mPhoneEdit.setOnEditorActionListener(new TextView.OnEditorActionListener() {
@Override
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
if (actionId == EditorInfo.IME_ACTION_DONE) {
listener.done(IntlPhoneInput.this, isValid());
}
return false;
}
});
} | [
"Set keyboard done listener to detect when the user click \"DONE\" on his keyboard\n\n@param listener IntlPhoneInputListener"
] | [
"Determines whether the given list contains a descriptor with the same name.\n\n@param defs The list to search\n@param obj The object that is searched for\n@return <code>true</code> if the list contains a descriptor with the same name",
"Create a directory at the given path if it does not exist yet.\n\n@param path\nthe path to the directory\n@throws IOException\nif it was not possible to create a directory at the given\npath",
"Add a '>' clause so the column must be greater-than the value.",
"Returns the target locales.\n\n@return the target locales, never null.",
"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",
"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 delete sslcipher resources of given names.",
"Retrieve the calendar used internally for timephased baseline calculation.\n\n@return baseline calendar",
"This method prints plan information of an agent through its external\naccess. It can be used to check the correct behaviour of the agent.\n\n@param agent_name\nThe name of the agent\n@param connector\nThe connector to get the external access\n@return plans the IPlan[] with all the information, so the tester can\nlook for information"
] |
public static TransactionalProtocolClient.Operation wrap(final ModelNode operation, final OperationMessageHandler messageHandler, final OperationAttachments attachments) {
return new TransactionalOperationImpl(operation, messageHandler, attachments);
} | [
"Wrap an operation's parameters in a simple encapsulating object\n@param operation the operation\n@param messageHandler the message handler\n@param attachments the attachments\n@return the encapsulating object"
] | [
"This is a service method that takes care of putting al the target values in a single array.\n@return",
"Use this API to fetch linkset_interface_binding resources of given name .",
"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",
"Set the weekdays at which the event should take place.\n@param weekDays the weekdays at which the event should take place.",
"Use this API to update sslocspresponder resources.",
"Creates an element that represents a single page.\n@return the resulting DOM element",
"Sets an attribute in the main section of the manifest.\n\n@param name the attribute's name\n@param value the attribute's value\n@return {@code this}\n@throws IllegalStateException if entries have been added or the JAR has been written prior to calling this methods.",
"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",
"Curries a procedure that takes one argument.\n\n@param procedure\nthe original procedure. May not be <code>null</code>.\n@param argument\nthe fixed argument.\n@return a procedure that takes no arguments. Never <code>null</code>."
] |
public static Shell createConsoleShell(String prompt, String appName, Object mainHandler) {
return createConsoleShell(prompt, appName, mainHandler, new EmptyMultiMap<String, Object>());
} | [
"Facade method for operating the Shell.\n\nRun the obtained Shell with commandLoop().\n\n@see org.gearvrf.debug.cli.Shell#Shell(org.gearvrf.debug.cli.Shell.Settings, org.gearvrf.debug.cli.CommandTable, java.util.List)\n\n@param prompt Prompt to be displayed\n@param appName The app name string\n@param mainHandler Command handler\n@return Shell that can be either further customized or run directly by calling commandLoop()."
] | [
"Returns an Object array of all FK field values of the specified object.\nIf the specified object is an unmaterialized Proxy, it will be materialized\nto read the FK values.\n\n@throws MetadataException if an error occours while accessing ForeingKey values on obj",
"Returns a configured transformer to write XML.\n\n@return the XML configured transformer\n@throws SpinXmlElementException if no new transformer can be created",
"Add a photo to the user's favorites.\n\n@param photoId\nThe photo ID\n@throws FlickrException",
"Get the auth URL, this is step two of authorization.\n\n@param oAuthRequestToken\nthe token from a {@link AuthInterface#getRequestToken} call.",
"Gets a single byte return or -1 if no data is available.",
"Extract schema of the value field",
"Adds position noise to the trajectories\n@param t\n@param sd\n@return trajectory with position noise",
"Parse request parameters and files.\n@param request\n@param response",
"Populate a sorted list of custom fields to ensure that these fields\nare written to the file in a consistent order."
] |
private void addCheckBox(Date date, boolean checkState) {
CmsCheckBox cb = generateCheckBox(date, checkState);
m_checkBoxes.add(cb);
reInitLayoutElements();
} | [
"Add a new check box.\n@param date the date for the check box\n@param checkState the initial check state."
] | [
"Generates new individual particle radius based on min and max radius setting.\n\n@return new particle radius",
"Creates a Bytes object by copying the data of the CharSequence and encoding it using UTF-8.",
"Build the query to perform a batched read get orderBy settings from CollectionDescriptor\n\n@param ids Collection containing all identities of objects of the ONE side",
"Get a property as a int or null.\n\n@param key the property name",
"Transform the given object into an array of bytes\n\n@param object The object to be serialized\n@return The bytes created from serializing the object",
"Creates the string mappings.\n\n@param mtasTokenIdFactory\nthe mtas token id factory\n@param level\nthe level\n@param stringValue\nthe string value\n@param offsetStart\nthe offset start\n@param offsetEnd\nthe offset end\n@param position\nthe position\n@throws IOException\nSignals that an I/O exception has occurred.",
"Multiple of gradient windwos per masc relation of x y\n\n@return int[]",
"Checks constraints on this model.\n\n@param checkLevel The amount of checks to perform\n@throws ConstraintException If a constraint has been violated",
"Converts days of the week into a bit field.\n\n@param data recurring data\n@return bit field"
] |
public static void calculatePointDiff(Point2D _P1, Point2D _P2, Point2D _Result, float _Multiplier) {
float diffX = _P2.getX() - _P1.getX();
float diffY = _P2.getY() - _P1.getY();
_Result.setX(_P1.getX() + (diffX * _Multiplier));
_Result.setY(_P1.getY() + (diffY * _Multiplier));
} | [
"Calculates the middle point between two points and multiplies its coordinates with the given\nsmoothness _Mulitplier.\n@param _P1 First point\n@param _P2 Second point\n@param _Result Resulting point\n@param _Multiplier Smoothness multiplier"
] | [
"Set the values of a set of knots.\n@param x the knot positions\n@param y the knot colors\n@param types the knot types\n@param offset the first knot to set\n@param count the number of knots",
"Mbeans for FETCH_KEYS",
"Post boolean flag \"DO_NOT_USE\" to an artifact\n\n@param gavc\n@param doNotUse\n@param user\n@param password\n@throws GrapesCommunicationException",
"return a prepared Select Statement for the given ClassDescriptor",
"Creates a new connection from the data source that the connection descriptor\nrepresents. If the connection descriptor does not directly contain the data source\nthen a JNDI lookup is performed to retrieve the data source.\n\n@param jcd The connection descriptor\n@return A connection instance\n@throws LookupException if we can't get a connection from the datasource either due to a\nnaming exception, a failed sanity check, or a SQLException.",
"Populates a calendar instance.\n\n@param record MPX record\n@param calendar calendar instance\n@param isBaseCalendar true if this is a base calendar",
"Returns first enum constant found..\n\n@param styleName Space-separated list of styles\n@param enumClass Type of enum\n@param defaultValue Default value of no match was found\n@return First enum constant found or default value",
"Calculates directory size as total size of all its files, recursively.\n\n@param self a file object\n@return directory size (length)\n@since 2.1\n\n@throws IOException if File object specified does not exist\n@throws IllegalArgumentException if the provided File object does not represent a directory",
"Resolve the single type argument of the given generic interface against the given\ntarget method which is assumed to return the given interface or an implementation\nof it.\n@param method the target method to check the return type of\n@param genericIfc the generic interface or superclass to resolve the type argument from\n@return the resolved parameter type of the method return type, or {@code null}\nif not resolvable or if the single argument is of type {@link WildcardType}."
] |
public static base_response unset(nitro_service client, nstimeout resource, String[] args) throws Exception{
nstimeout unsetresource = new nstimeout();
return unsetresource.unset_resource(client,args);
} | [
"Use this API to unset the properties of nstimeout resource.\nProperties that need to be unset are specified in args array."
] | [
"Use this API to fetch vpnsessionaction resource of given name .",
"Waits for a job V3 to complete\n\n@param cloudFoundryClient the client to use to request job status\n@param completionTimeout the amount of time to wait for the job to complete.\n@param jobId the id of the job\n@return {@code onComplete} once job has completed",
"Returns a new macro resolver that loads message keys from the workplace bundle in the user setting's language.\n@param cms the CmsObject.\n@return a new macro resolver with messages from the workplace bundle in the current users locale.",
"find the middle point of two intersect points in circle,only one point will be correct\n\n@param center\n@param a\n@param b\n@param area\n@param radius\n@return",
"Determines the mutator method name based on a field name.\n\n@param fieldName\na field name\n@return the resulting method name",
"Initializes the persistence strategy to be used when accessing the datastore. In particular, all the required\ncaches will be configured and initialized.\n\n@param cacheMappingType the {@link org.hibernate.ogm.datastore.keyvalue.options.CacheMappingType} to be used\n@param entityTypes meta-data of all the entity types registered with the current session factory\n@param associationTypes meta-data of all the association types registered with the current session factory\n@param idSourceTypes meta-data of all the id source types registered with the current session factory\n@param namespaces from the database currently in use",
"Get a unique reference to the media slot on the network from which the specified data was loaded.\n\n@param dataReference the data whose media slot is of interest\n\n@return the instance that will always represent the slot associated with the specified data",
"Gets an overrideID for a class name, method name\n\n@param className name of class\n@param methodName name of method\n@return override ID of method",
"Returns a PreparedStatementCreator that returns a count of the rows that\nthis creator would return.\n\n@param dialect\nDatabase dialect."
] |
public static ExecutorService newSingleThreadDaemonExecutor() {
return Executors.newSingleThreadExecutor(r -> {
Thread t = Executors.defaultThreadFactory().newThread(r);
t.setDaemon(true);
return t;
});
} | [
"Creates an Executor that is based on daemon threads.\nThis allows the program to quit without explicitly\ncalling shutdown on the pool\n\n@return the newly created single-threaded Executor"
] | [
"Read resource data.",
"Optionally specify the variable name to use for the output of this condition",
"Read a single resource assignment.\n\n@param resource MPXJ resource\n@param assignment Phoenix assignment",
"Adds OPT_N | OPT_NODE option to OptionParser, with multiple arguments.\n\n@param parser OptionParser to be modified\n@param required Tells if this option is required or optional",
"Look-up the results data for a particular test class.",
"Generate a VideoCollection with random data obtained form VIDEO_INFO map. You don't need o\ncreate your own AdapteeCollections. Review ListAdapteeCollection if needed.\n\n@param videoCount size of the collection.\n@return VideoCollection generated.",
"Harvest any values that may have been returned during the execution\nof a procedure.\n\n@param proc the procedure descriptor that provides info about the procedure\nthat was invoked.\n@param obj the object that was persisted\n@param stmt the statement that was used to persist the object.\n\n@throws PersistenceBrokerSQLException if a problem occurs.",
"Configure all UI elements in the exceptions panel.",
"Merge two maps of configuration properties. If the original contains a mapping for the same key, the new mapping is ignored.\n\n@param original\n@param toMerge"
] |
private void queryDatabaseMetaData()
{
ResultSet rs = null;
try
{
Set<String> tables = new HashSet<String>();
DatabaseMetaData dmd = m_connection.getMetaData();
rs = dmd.getTables(null, null, null, null);
while (rs.next())
{
tables.add(rs.getString("TABLE_NAME"));
}
m_hasResourceBaselines = tables.contains("MSP_RESOURCE_BASELINES");
m_hasTaskBaselines = tables.contains("MSP_TASK_BASELINES");
m_hasAssignmentBaselines = tables.contains("MSP_ASSIGNMENT_BASELINES");
}
catch (Exception ex)
{
// Ignore errors when reading meta data
}
finally
{
if (rs != null)
{
try
{
rs.close();
}
catch (SQLException ex)
{
// Ignore errors when closing result set
}
rs = null;
}
}
} | [
"Queries database meta data to check for the existence of\nspecific tables."
] | [
"Checks if the provided artifactQuery is valid\n\n@param artifactQuery ArtifactQuery\n@throws WebApplicationException if the data is corrupted",
"Returns all tags that designate this tag. E.g., for \"tesla-model3\", this would return \"car\", \"vehicle\", \"vendor-tesla\" etc.",
"Creates a slice for directly a raw memory address. This is\ninherently unsafe as it may be used to access arbitrary memory.\n\n@param address the raw memory address base\n@param size the size of the slice\n@return the unsafe slice",
"Creates Accumulo connector given FluoConfiguration",
"Throw IllegalStateException if key is not present in map.\n@param key the key to expect.\n@param map the map to search.\n@throws IllegalArgumentException if key is not in map.",
"Send message to all connections tagged with all given tags\n@param message the message\n@param labels the tag labels",
"Check if information model entity referenced by archetype\nhas right name or type",
"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?",
"Use this API to flush cachecontentgroup resources."
] |
public void onDrawFrame(float frameTime)
{
if (isEnabled() && (mScene != null) && mPickEventLock.tryLock())
{
// Don't call if we are in the middle of processing another pick
try
{
doPick();
}
finally
{
mPickEventLock.unlock();
}
}
} | [
"Called every frame if the picker is enabled\nto generate pick events.\n@param frameTime starting time of the current frame"
] | [
"Transform the given bytes into an object.\n\n@param bytes The bytes to construct the object from\n@return The object constructed",
"Print all relations for a given's class's tag\n@param tagname the tag containing the given relation\n@param from the source class\n@param edgetype the dot edge specification",
"Internal initialization.\n@throws ParserConfigurationException",
"Helper method to add a parameter without having to create it explicitely. The created parameter should be persisted afterwards.\n\n@param key\nname of the parameter to add\n@param value\nvalue of the parameter to create\n@return the newly created parameter",
"Creates the event for endpoint with specific type.\n\n@param endpoint the endpoint\n@param type the type\n@return the event",
"Checks whether the compilation has been canceled and reports the given progress to the compiler progress.",
"Write a message to the console.\n\n@param pattern\nA {@link String#format(String, Object...)} pattern\n@param parameters\nOptional parameters to plug into the pattern",
"Tells you if the expression is the false expression, either literal or constant.\n@param expression\nexpression\n@return\nas described",
"Returns the bundle jar classpath element."
] |
public synchronized static void registerImagOnAgents(Launcher launcher, final String imageTag,
final String host, final String targetRepo, final ArrayListMultimap<String, String> artifactsProps,
final int buildInfoId) throws IOException, InterruptedException {
// Master
final String imageId = getImageIdFromAgent(launcher, imageTag, host);
registerImage(imageId, imageTag, targetRepo, artifactsProps, buildInfoId);
// Agents
List<Node> nodes = Jenkins.getInstance().getNodes();
for (Node node : nodes) {
if (node == null || node.getChannel() == null) {
continue;
}
try {
node.getChannel().call(new MasterToSlaveCallable<Boolean, IOException>() {
public Boolean call() throws IOException {
registerImage(imageId, imageTag, targetRepo, artifactsProps, buildInfoId);
return true;
}
});
} catch (Exception e) {
launcher.getListener().getLogger().println("Could not register docker image " + imageTag +
" on Jenkins node '" + node.getDisplayName() + "' due to: " + e.getMessage() +
" This could be because this node is now offline."
);
}
}
} | [
"Registers an image to be captured by the build-info proxy.\n\n@param imageTag\n@param host\n@param targetRepo\n@param buildInfoId\n@throws IOException\n@throws InterruptedException"
] | [
"Runs the currently entered query and displays the results.",
"Only one boolean param should be true at a time for this function to return the proper results\n\n@param hostName\n@param enable\n@param disable\n@param remove\n@param isEnabled\n@param exists\n@return\n@throws Exception",
"Checks the foreignkeys of all references in the model.\n\n@param modelDef The model\n@param checkLevel The current check level (this constraint is checked in basic and strict)\n@exception ConstraintException If the value for foreignkey is invalid",
"Use this API to update nsspparams.",
"Removes file from your assembly.\n\n@param name field name of the file to remove.",
"Gets the '.disabled' file for a given version of this store. That file may or may not\nexist.\n\n@param version of the store for which to get the '.disabled' file.\n@return an instance of {@link File} pointing to the '.disabled' file.\n@throws PersistenceFailureException if the requested version cannot be found.",
"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",
"Returns a string to resolve apostrophe issue in xpath\n\n@param text\n@return the apostrophe resolved xpath value string",
"If the resource has ordered child types, those child types will be stored in the attachment. If there are no\nordered child types, this method is a no-op.\n\n@param resourceAddress the address of the resource\n@param resource the resource which may or may not have ordered children."
] |
public static void printDocumentation() {
System.out
.println("********************************************************************");
System.out.println("*** Wikidata Toolkit: GenderRatioProcessor");
System.out.println("*** ");
System.out
.println("*** This program will download and process dumps from Wikidata.");
System.out
.println("*** It will compute the numbers of articles about humans across");
System.out
.println("*** Wikimedia projects, and in particular it will count the articles");
System.out
.println("*** for each sex/gender. Results will be stored in a CSV file.");
System.out.println("*** See source code for further details.");
System.out
.println("********************************************************************");
} | [
"Prints some basic documentation about this program."
] | [
"Use this API to save cacheobject resources.",
"Remove a named object",
"Updates the gatewayDirection attributes of all gateways.\n@param def",
"Set the repeat count of an override at ordinal index\n\n@param pathName Path name\n@param methodName Fully qualified method name\n@param ordinal 1-based index of the override within the overrides of type methodName\n@param repeatCount new repeat count to set\n@return true if success, false otherwise",
"Returns the list of nodes which match the expression xpathExpr in the Document dom.\n\n@param dom the Document to search in\n@param xpathExpr the xpath query\n@return the list of nodes which match the query\n@throws XPathExpressionException On error.",
"Set whether we should obtain color versions of waveforms and previews when they are available. This will only\naffect waveforms loaded after the setting has been changed. If this changes the setting, and we were running,\nstop and restart in order to flush and reload the correct waveform versions.\n\n@param preferColor if {@code true}, the full-color versions of waveforms will be requested, if {@code false}\nonly the older blue versions will be retrieved",
"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",
"Checks the query-customizer setting of the given collection descriptor.\n\n@param collDef The collection descriptor\n@param checkLevel The current check level (this constraint is only checked in strict)\n@exception ConstraintException If the constraint has been violated",
"Read configuration from zookeeper"
] |
@Override
public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception {
try {
if (exceptionRaised.get()) {
return;
}
if (!(msg instanceof HttpRequest)) {
// If there is no methodInfo, it means the request was already rejected.
// What we received here is just residue of the request, which can be ignored.
if (methodInfo != null) {
ReferenceCountUtil.retain(msg);
ctx.fireChannelRead(msg);
}
return;
}
HttpRequest request = (HttpRequest) msg;
BasicHttpResponder responder = new BasicHttpResponder(ctx.channel(), sslEnabled);
// Reset the methodInfo for the incoming request error handling
methodInfo = null;
methodInfo = prepareHandleMethod(request, responder, ctx);
if (methodInfo != null) {
ReferenceCountUtil.retain(msg);
ctx.fireChannelRead(msg);
} else {
if (!responder.isResponded()) {
// If not yet responded, just respond with a not found and close the connection
HttpResponse response = new DefaultFullHttpResponse(HttpVersion.HTTP_1_1, HttpResponseStatus.NOT_FOUND);
HttpUtil.setContentLength(response, 0);
HttpUtil.setKeepAlive(response, false);
ctx.channel().writeAndFlush(response).addListener(ChannelFutureListener.CLOSE);
} else {
// If already responded, just close the connection
ctx.channel().close();
}
}
} finally {
ReferenceCountUtil.release(msg);
}
} | [
"If the HttpRequest is valid and handled it will be sent upstream, if it cannot be invoked\nthe response will be written back immediately."
] | [
"Gets a first data set value.\n\n@param dataSet\nIIM record and dataset code (See constants in {@link IIM})\n@return data set value\n@throws SerializationException\nif value can't be deserialized from binary representation",
"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",
"Validate arguments and state.",
"Create a new connection manager, based on an existing connection.\n\n@param connection the existing connection\n@param openHandler a connection open handler\n@return the connected manager",
"Attach a component to this scene object.\n\nEach scene object has a list of components that may\nbe attached to it. Only one component of a particular type\ncan be attached. Components are retrieved based on their type.\n\n@return true if component is attached, false if a component of that class is already attached.\n@param component component to attach.\n@see GVRSceneObject#detachComponent(long)\n@see GVRSceneObject#getComponent(long)",
"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",
"Starts off a new thread to monitor this connection attempt.\n@param connectionHandle to monitor",
"if you don't have an argument, choose the value that is going to be inserted into the map instead\n\n@param commandLineOption specification of the command line options\n@param value the value that is going to be inserted into the map instead of the argument",
"Recursively descend through the hierarchy creating tasks.\n\n@param parent parent task\n@param parentName parent name\n@param rows rows to add as tasks to this parent"
] |
public static int getLineCount(String str) {
if (null == str || str.isEmpty()) {
return 0;
}
int count = 1;
for (char c : str.toCharArray()) {
if ('\n' == c) {
count++;
}
}
return count;
} | [
"Counts the number of lines.\n\n@param str the input string\n@return Returns the number of lines terminated by '\\n' in string"
] | [
"Use this API to unset the properties of sslservice resource.\nProperties that need to be unset are specified in args array.",
"Takes a model and an SCXMLFrontier and decomposes the Frontier into a Map of Strings to Strings\nThese strings can be sent over a network to get a Frontier past a 'gap'\n\n@param frontier the Frontier\n@param modelText the model\n@return the map of strings representing a decomposition",
"helper function to convert strings to bytes as needed.\n\n@param key\n@param value",
"Ensure that the given connection is established.\n\n@param jedis\na connection to Redis\n@return true if the supplied connection was already connected",
"Creates the operation to add a resource.\n\n@param address the address of the operation to add.\n@param properties the properties to set for the resource.\n\n@return the operation.",
"Update the state of the picker. If it has an owner, the picker\nwill use that object to derive its position and orientation.\nThe \"active\" state of this controller is used to indicate touch.\nThe cursor position is updated after picking.",
"Get the collection of public contacts for the specified user ID.\n\nThis method does not require authentication.\n\n@param userId\nThe user ID\n@return The Collection of Contact objects\n@throws FlickrException",
"Searches for cases where a minus sign means negative operator. That happens when there is a minus\nsign with a variable to its right and no variable to its left\n\nExample:\na = - b * c",
"Walk through the object graph of the specified delete object. Was used for\nrecursive object graph walk."
] |
@Deprecated
public static URL buildUrl(String host, int port, String path, Map<String, String> parameters) throws MalformedURLException {
return buildUrl("http", port, path, parameters);
} | [
"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) }"
] | [
"Arbitrarily resolve the inconsistency by choosing the first object if\nthere is one.\n\n@param values The list of objects\n@return A single value, if one exists, taken from the input list.",
"Return a list of segments where each segment is either the content of a line in the given text or a line-break\naccording to the configured delimiter. Existing line-breaks in the text will be replaced by this's\ninstances delimiter.\n\n@param text\nthe to-be-splitted text. May be <code>null</code>.\n@return a list of segments. Is never <code>null</code>.",
"Read flow id.\n\n@param message the message\n@return flow id from the message",
"Issue the database statements to create the table associated with a table configuration.\n\n@param connectionSource\nconnectionSource Associated connection source.\n@param tableConfig\nHand or spring wired table configuration. If null then the class must have {@link DatabaseField}\nannotations.\n@return The number of statements executed to do so.",
"Determine the relevant pieces of configuration which need to be included when processing the domain model.\n\n@param root the resource root\n@param requiredConfigurationHolder the resolution context\n@param serverConfig the server config\n@param extensionRegistry the extension registry",
"Answer the search class.\nThis is the class of the example object or\nthe class represented by Identity.\n@return Class",
"a small static helper to set the text color to a textView null save\n\n@param colorHolder\n@param textView\n@param colorDefault",
"Converts a string representation of an integer into an Integer object.\nSilently ignores any parse exceptions and returns null.\n\n@param value String representation of an integer\n@return Integer instance",
"Here we specify the configuration, starting from default MostUsefulConfiguration, and changing only what is needed"
] |
public void reset( int N ) {
this.N = N;
this.diag = null;
this.off = null;
if( splits.length < N ) {
splits = new int[N];
}
numSplits = 0;
x1 = 0;
x2 = N-1;
steps = numExceptional = lastExceptional = 0;
this.Q = null;
} | [
"Sets the size of the matrix being decomposed, declares new memory if needed,\nand sets all helper functions to their initial value."
] | [
"Build the crosstab. Throws LayoutException if anything is wrong\n@return",
"Serialize this `AppDescriptor` and output byte array\n\n@return\nserialize this `AppDescriptor` into byte array",
"Gets the crouton's layout parameters, constructing a default if necessary.\n\n@return the layout parameters",
"Use this API to delete dnspolicylabel of given name.",
"Returns a description a block of work, or \"exit\" if no more blocks exist\n\n@param name the assigned name of the consumer requesting a block of work\n@return a description a block of work, or \"exit\" if no more blocks exist",
"Method is called by spring and verifies that there is only one plugin per URI scheme.",
"Use this API to fetch csvserver_copolicy_binding resources of given name .",
"Get the last modified time for a set of files.",
"High-accuracy Normal cumulative distribution function.\n\n@param x Value.\n@return Result."
] |
private static OkHttpClient getUnsafeOkHttpClient() {
try {
// Create a trust manager that does not validate certificate chains
final TrustManager[] trustAllCerts = new TrustManager[] {
new X509TrustManager() {
@Override
public void checkClientTrusted(java.security.cert.X509Certificate[] chain, String authType) throws CertificateException {
}
@Override
public void checkServerTrusted(java.security.cert.X509Certificate[] chain, String authType) throws CertificateException {
}
@Override
public java.security.cert.X509Certificate[] getAcceptedIssuers() {
return null;
}
}
};
// Install the all-trusting trust manager
final SSLContext sslContext = SSLContext.getInstance("SSL");
sslContext.init(null, trustAllCerts, new java.security.SecureRandom());
// Create an ssl socket factory with our all-trusting manager
final SSLSocketFactory sslSocketFactory = sslContext.getSocketFactory();
OkHttpClient okHttpClient = new OkHttpClient();
okHttpClient.setSslSocketFactory(sslSocketFactory);
okHttpClient.setHostnameVerifier(new HostnameVerifier() {
@Override
public boolean verify(String hostname, SSLSession session) {
return true;
}
});
return okHttpClient;
} catch (Exception e) {
throw new RuntimeException(e);
}
} | [
"Returns a OkHttpClient that ignores SSL cert errors\n@return"
] | [
"Checks for duplicate elements. A is sorted\n@param A Matrix to be tested.\n@return true if duplicates or false if false duplicates",
"Set the dither matrix.\n@param matrix the dither matrix\n@see #getMatrix",
"Finds the most recent dump of the given type that is actually available.\n\n@param dumpContentType\nthe type of the dump to look for\n@return most recent main dump or null if no such dump exists",
"Calculates the local translation and rotation for a bone.\nAssumes WorldRot and WorldPos have been calculated for the bone.",
"Prepare a parallel PING Task.\n\n@return the parallel task builder",
"Return the List of VariableExpression objects referenced by the specified DeclarationExpression.\n@param declarationExpression - the DeclarationExpression\n@return the List of VariableExpression objects",
"Prepare a parallel HTTP DELETE Task.\n\n@param url\nthe UrlPostfix: e.g. in http://localhost:8080/index.html.,the url is \"/index.html\"\n@return the parallel task builder",
"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).",
"Set the depth of the cursor.\nThis is the length of the ray from the origin\nto the cursor.\n@param depth default cursor depth"
] |
public void registerCollectionSizeGauge(
CollectionSizeGauge collectionSizeGauge) {
String name = createMetricName(LocalTaskExecutorService.class,
"queue-size");
metrics.register(name, collectionSizeGauge);
} | [
"Calling this twice will not actually overwrite the gauge\n\n@param collectionSizeGauge"
] | [
"This method retrieves the calendar hours for the specified day.\nNote that if this is a derived calendar, then this method\nwill refer to the base calendar where no hours are specified\nin the derived calendar.\n\n@param day Day instance\n@return calendar hours",
"Sets name, status, start time and title to specified step\n\n@param step which will be changed",
"Evalutes AND and OR operators.\n\n@param container data context\n@param promptValues responses to prompts\n@return operator result",
"This method lists all resources defined in the file.\n\n@param file MPX file",
"Inserts a String value into the mapping of the underlying Bundle, replacing any existing value\nfor the given key. Either key or value may be null.\n\n@param key a String, or null\n@param value a String, or null\n@return this bundler instance to chain method calls",
"Populate a milestone from a Row instance.\n\n@param row Row instance\n@param task Task instance",
"Send message to all connections of a certain user\n\n@param message the message to be sent\n@param username the username\n@return this context",
"Sets the max min.\n\n@param n the new max min",
"Parse units.\n\n@param value units value\n@return units value"
] |
public static void addLazyDefinitions(SourceBuilder code) {
Set<Declaration> defined = new HashSet<>();
// Definitions may lazily declare new names; ensure we add them all
List<Declaration> declarations =
code.scope().keysOfType(Declaration.class).stream().sorted().collect(toList());
while (!defined.containsAll(declarations)) {
for (Declaration declaration : declarations) {
if (defined.add(declaration)) {
code.add(code.scope().get(declaration).definition);
}
}
declarations = code.scope().keysOfType(Declaration.class).stream().sorted().collect(toList());
}
} | [
"Finds all lazily-declared classes and methods and adds their definitions to the source."
] | [
"Use this API to fetch all the vpath resources that are configured on netscaler.",
"This method extracts assignment data from an MSPDI file.\n\n@param project Root node of the MSPDI file",
"Join N sets.",
"Adds OPT_P | OPT_PARTITION option to OptionParser, with multiple\narguments.\n\n@param parser OptionParser to be modified\n@param required Tells if this option is required or optional",
"Sets the jdbc connection to use.\n\n@param jcd The connection to use\n@throws PlatformException If the target database cannot be handled with torque",
"Converts a gwt Date in the timezone of the current browser to a time in\nUTC.\n\n@return A Long corresponding to the number of milliseconds since January\n1, 1970, 00:00:00 GMT or null if the specified Date is null.",
"Walk project references recursively, adding thrift files to the provided list.",
"Execute a redirected request\n\n@param stringStatusCode\n@param httpMethodProxyRequest\n@param httpServletRequest\n@param httpServletResponse\n@throws Exception",
"Retrieve and validate the key from the REST request.\n\n@return true if present, false if missing"
] |
private void setHint() {
if (mPhoneEdit != null && mSelectedCountry != null && mSelectedCountry.getIso() != null) {
Phonenumber.PhoneNumber phoneNumber = mPhoneUtil.getExampleNumberForType(mSelectedCountry.getIso(), PhoneNumberUtil.PhoneNumberType.MOBILE);
if (phoneNumber != null) {
mPhoneEdit.setHint(mPhoneUtil.format(phoneNumber, PhoneNumberUtil.PhoneNumberFormat.NATIONAL));
}
}
} | [
"Set hint number for country"
] | [
"Check that the scope type is allowed by the stereotypes on the bean and\nthe bean type",
"Draw a rectangle's interior with this color.\n\n@param rect rectangle\n@param color colour",
"Processes changes on aliases, updating the planned state of the item.\n\n@param addAliases\naliases that should be added to the document\n@param deleteAliases\naliases that should be removed from the document",
"Gets the URL of the service with the given name that has been created during the current session.\n\n@param name to return its URL\n@return URL of the service.",
"try to find the first none null table name for the given class-descriptor.\nIf cld has extent classes, all of these cld's searched for the first none null\ntable name.",
"Returns data tree structured as Transloadit expects it.\n\n@param data\n@return {@link Map}\n@throws LocalOperationException",
"Gets axis dimension\n@param axis Axis. It might be either {@link Layout.Axis#X X} or\n{@link Layout.Axis#Y Y} or {@link Layout.Axis#Z Z}\n@return axis dimension",
"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.",
"Retrieves the configured message by property key\n@param key The key in the file\n@return The associated value in case the key is found in the message bundle file. If\nno such key is defined, the returned value would be the key itself."
] |
private void processProjectID()
{
if (m_projectID == null)
{
List<Row> rows = getRows("project", null, null);
if (!rows.isEmpty())
{
Row row = rows.get(0);
m_projectID = row.getInteger("proj_id");
}
}
} | [
"If the user has not specified a project ID, this method\nretrieves the ID of the first project in the file."
] | [
"Derive a calendar for a resource.\n\n@param parentCalendarID calendar from which resource calendar is derived\n@return new calendar for a resource",
"Use this API to delete sslcipher of given name.",
"returns an Array with an Identities PK VALUES\n@throws PersistenceBrokerException if there is an erros accessing o field values",
"Retrieves the yearly absolute date.\n\n@param data recurrence data\n@return yearly absolute date",
"Returns a source excerpt of a JavaDoc link to a method on this type.",
"Sets the jdbc connection to use.\n\n@param jcd The connection to use\n@throws PlatformException If the target database cannot be handled with torque",
"Read data from the table. Return a reference to the current\ninstance to allow method chaining.\n\n@return reader instance",
"Delete with retry.\n\n@param file\n@return <tt>true</tt> if the file was successfully deleted.",
"Helper to format term updates as expected by the Wikibase API\n@param updates\nplanned updates for the type of term\n@return map ready to be serialized as JSON by Jackson"
] |
private String stripLineBreaks(String text, String replacement)
{
if (text.indexOf('\r') != -1 || text.indexOf('\n') != -1)
{
StringBuilder sb = new StringBuilder(text);
int index;
while ((index = sb.indexOf("\r\n")) != -1)
{
sb.replace(index, index + 2, replacement);
}
while ((index = sb.indexOf("\n\r")) != -1)
{
sb.replace(index, index + 2, replacement);
}
while ((index = sb.indexOf("\r")) != -1)
{
sb.replace(index, index + 1, replacement);
}
while ((index = sb.indexOf("\n")) != -1)
{
sb.replace(index, index + 1, replacement);
}
text = sb.toString();
}
return (text);
} | [
"This method removes line breaks from a piece of text, and replaces\nthem with the supplied text.\n\n@param text source text\n@param replacement line break replacement text\n@return text with line breaks removed."
] | [
"Signal that all threads have run to completion, and the multithreaded\nenvironment is over.\n@param check The name of the thread group passed to startThreads()",
"Returns the name of the bone.\n\n@return the name",
"Get the log if exists or return null\n\n@param topic topic name\n@param partition partition index\n@return a log for the topic or null if not exist",
"Color waveforms are represented by a series of sixteen bit integers into which color and height information are\npacked. This function returns the integer corresponding to a particular half-frame in the waveform.\n\n@param waveBytes the raw data making up the waveform\n@param segment the index of hte half-frame of interest\n\n@return the sixteen-bit number encoding the height and RGB values of that segment",
"Use this API to fetch snmpalarm resources of given names .",
"Use this API to fetch nd6ravariables resource of given name .",
"Compares two columns given by their names.\n\n@param objA The name of the first column\n@param objB The name of the second column\n@return\n@see java.util.Comparator#compare(java.lang.Object, java.lang.Object)",
"Calculated the numeraire relative value of an underlying swap leg.\n\n@param model The Monte Carlo model.\n@param legSchedule The schedule of the leg.\n@param paysFloat If true a floating rate is payed.\n@param swaprate The swaprate. May be 0.0 for pure floating leg.\n@param notional The notional.\n@return The sum of the numeraire relative cash flows.\n@throws CalculationException Thrown if underlying model failed to calculate stochastic process.",
"Stop listening for beats."
] |
protected void propagateOnTouch(GVRPickedObject hit)
{
if (mEventOptions.contains(EventOptions.SEND_TOUCH_EVENTS))
{
GVREventManager eventManager = getGVRContext().getEventManager();
GVRSceneObject hitObject = hit.getHitObject();
if (mEventOptions.contains(EventOptions.SEND_TO_LISTENERS))
{
eventManager.sendEvent(this, ITouchEvents.class, "onTouchStart", hitObject, hit);
}
if (mEventOptions.contains(EventOptions.SEND_TO_HIT_OBJECT))
{
eventManager.sendEvent(hitObject, ITouchEvents.class, "onTouchStart", hitObject, hit);
}
if (mEventOptions.contains(EventOptions.SEND_TO_SCENE) && (mScene != null))
{
eventManager.sendEvent(mScene, ITouchEvents.class, "onTouchStart", hitObject, hit);
}
}
} | [
"Propagate onTouchStart events to listeners\n@param hit collision object"
] | [
"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",
"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.",
"try to find the first none null table name for the given class-descriptor.\nIf cld has extent classes, all of these cld's searched for the first none null\ntable name.",
"Shortcut for mapping the output of an arbitrary observable to one returning an instance of a specific type, using the IO scheduler.\n@param fromObservable the source observable\n@param toValue the value to emit to the observer\n@param <T> the type of the value to emit\n@return an observable emitting the specified value",
"Given a partition ID, determine which replica of this partition is hosted by the\ncurrent node, if any.\n\nNote: This is an implementation detail of the READONLY_V2 naming scheme, and should\nnot be used outside of that scope.\n\n@param partitionId for which we want to know the replica type\n@return the requested partition's replica type (which ranges from 0 to replication\nfactor -1) if the partition is hosted on the current node, or -1 if the\nrequested partition is not hosted on this node.",
"Creates a \"delta clone\" of this Map, where only the differences are\nrepresented.",
"Handle click on \"Add\" button.\n@param e the click event.",
"Gets a SerialMessage with the MULTI CHANNEL CAPABILITY GET command.\nGets the capabilities for a specific endpoint.\n@param the number of the endpoint to get the\n@return the serial message.",
"Inverts the value of the bit at the specified index.\n@param index The bit to flip (0 is the least-significant bit).\n@throws IndexOutOfBoundsException If the specified index is not a bit\nposition in this bit string."
] |
private static Interval parseStartExtended(CharSequence startStr, CharSequence endStr) {
Instant start = Instant.parse(startStr);
if (endStr.length() > 0) {
char c = endStr.charAt(0);
if (c == 'P' || c == 'p') {
PeriodDuration amount = PeriodDuration.parse(endStr);
// addition of PeriodDuration only supported by OffsetDateTime,
// but to make that work need to move point being added to closer to EPOCH
long move = start.isBefore(Instant.EPOCH) ? 1000 * 86400 : -1000 * 86400;
Instant end = start.plusSeconds(move).atOffset(ZoneOffset.UTC).plus(amount).toInstant().minusSeconds(move);
return Interval.of(start, end);
}
}
// infer offset from start if not specified by end
return parseEndDateTime(start, ZoneOffset.UTC, endStr);
} | [
"handle case where Instant is outside the bounds of OffsetDateTime"
] | [
"Called just before the thread finishes, regardless of status, to take any necessary action on\nthe downloaded file with mDownloadedCacheSize file.\n\n@param forceClean - It will delete downloaded cache, Even streaming is enabled, If user intentionally cancelled.",
"Submit a command to the server.\n\n@param command The CLI command\n@return The DMR response as a ModelNode\n@throws CommandFormatException\n@throws IOException",
"Gets the proper modulus operation.\n\n@param x Integer.\n@param m Modulo.\n@return Modulus.",
"Select the default currency properties from the database.\n\n@param currencyID default currency ID",
"called by timer thread",
"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",
"Return the authorization URL which is used to perform the authorization_code based OAuth2 flow.\n@param clientID the client ID to use with the connection.\n@param redirectUri the URL to which Box redirects the browser when authentication completes.\n@param state the text string that you choose.\nBox sends the same string to your redirect URL when authentication is complete.\n@param scopes this optional parameter identifies the Box scopes available\nto the application once it's authenticated.\n@return the authorization URL",
"Ask the specified player for a Folder menu for exploring its raw filesystem.\nThis is a request for unanalyzed items, so we do a typed menu request.\n\n@param slotReference the player and slot for which the menu is desired\n@param sortOrder the order in which responses should be sorted, 0 for default, see Section 6.11.1 of the\n<a href=\"https://github.com/Deep-Symmetry/dysentery/blob/master/doc/Analysis.pdf\">Packet Analysis\ndocument</a> for details\n@param folderId identifies the folder whose contents should be listed, use -1 to get the root folder\n\n@return the entries in the folder menu\n\n@throws Exception if there is a problem obtaining the menu",
"Returns a new analysis context builder that extracts the information about the available extensions from\nthe provided Revapi instance.\n\n<p>The extensions have to be known so that both old and new style of configuration can be usefully worked with.\n\n@param revapi the revapi instance to read the available extensions from\n@return a new analysis context builder"
] |
public void create(final DbProduct dbProduct) {
if(repositoryHandler.getProduct(dbProduct.getName()) != null){
throw new WebApplicationException(Response.status(Response.Status.CONFLICT).entity("Product already exist!").build());
}
repositoryHandler.store(dbProduct);
} | [
"Creates a new Product in Grapes database\n\n@param dbProduct DbProduct"
] | [
"Sign in a connection to the registry by key.\n\nNote multiple connections can be attached to the same key\n\n@param key\nthe key\n@param connection\nthe websocket connection\n@see #register(String, WebSocketConnection)",
"Rotate root widget to make it facing to the front of the scene",
"Extracts value from map if given value is null.\n@param value current value\n@param props properties to extract value from\n@param key property name to extract\n@return initial value or value extracted from map",
"Upload a photo from a byte-array.\n\n@param data\nThe photo data as a byte array\n@param metaData\nThe meta data\n@return photoId or ticketId\n@throws FlickrException",
"Read the table from the file and populate the supplied Table instance.\n\n@param file database file\n@param table Table instance",
"Use this API to fetch authenticationvserver_authenticationlocalpolicy_binding resources of given name .",
"Extracts the postal code, country code and service code from the primary data and returns the corresponding primary message\ncodewords.\n\n@return the primary message codewords",
"Write correlation id to message.\n\n@param message the message\n@param correlationId the correlation id",
"Kicks off an animation that will result in the pointer being centered in the\npie slice of the currently selected item."
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.