query
stringlengths 74
6.1k
| positive
sequencelengths 1
1
| negative
sequencelengths 9
9
|
---|---|---|
public static boolean isArrayOfUnboundedTypeVariablesOrObjects(Type[] types) {
for (Type type : types) {
if (Object.class.equals(type)) {
continue;
}
if (type instanceof TypeVariable<?>) {
Type[] bounds = ((TypeVariable<?>) type).getBounds();
if (bounds == null || bounds.length == 0 || (bounds.length == 1 && Object.class.equals(bounds[0]))) {
continue;
}
}
return false;
}
return true;
} | [
"Determines whether the given array only contains unbounded type variables or Object.class.\n\n@param types the given array of types\n@return true if and only if the given array only contains unbounded type variables or Object.class"
] | [
"Updates the text style according to a new text position\n@param bstyle the style to be updated\n@param text the text position",
"Called by spring when application context is being destroyed.",
"Create a temporary directory with the same attributes as its parent directory.\n@param dir\nthe path to directory in which to create the directory\n@param prefix\nthe prefix string to be used in generating the directory's name;\nmay be {@code null}\n@return the path to the newly created directory that did not exist before\nthis method was invoked\n@throws IOException",
"Write a priority field to the JSON file.\n\n@param fieldName field name\n@param value field value",
"Escape text to ensure valid JSON.\n\n@param value value\n@return escaped value",
"Performs the actual spell check query using Solr.\n\n@param request the spell check request\n\n@return Results of the Solr spell check of type SpellCheckResponse or null if something goes wrong.",
"Build the operation transformers.\n\n@param registry the shared resource registry\n@return the operation transformers",
"This method writes calendar data to an MSPDI file.\n\n@param project Root node of the MSPDI file",
"Returns an array of all declared fields in the given class and all\nsuper-classes."
] |
private static TimeUnit getDurationUnits(Integer value)
{
TimeUnit result = null;
if (value != null)
{
int index = value.intValue();
if (index >= 0 && index < DURATION_UNITS.length)
{
result = DURATION_UNITS[index];
}
}
if (result == null)
{
result = TimeUnit.DAYS;
}
return (result);
} | [
"Maps a duration unit value from a recurring task record in an MPX file\nto a TimeUnit instance. Defaults to days if any problems are encountered.\n\n@param value integer duration units value\n@return TimeUnit instance"
] | [
"Creates a server setup based on provided properties.\n\n@param properties the properties.\n@return the server setup, or an empty array.",
"End building the prepared script\n@param config the configuration for the script to build\n@return the new {@link LuaPreparedScript} instance",
"Add a note to a photo. The Note object bounds and text must be specified.\n\n@param photoId\nThe photo ID\n@param note\nThe Note object\n@return The updated Note object",
"Format the label text.\n\n@param scaleUnit The unit used for the scalebar.\n@param value The scale value.\n@param intervalUnit The scaled unit for the intervals.",
"Sets the target directory.",
"Rotate list of String. Used for randomize selection of received endpoints\n\n@param strings\nlist of Strings\n@return the same list in random order",
"Process a single outline code.\n\n@param parentRow outline code to task mapping table\n@throws SQLException",
"Reads basic summary details from the project properties.\n\n@param file MPX file",
"Get the names of the paths that would apply to the request\n\n@param requestUrl URL of the request\n@param requestType Type of the request: GET, POST, PUT, or DELETE as integer\n@return JSONArray of path names\n@throws Exception"
] |
protected void copyClasspathResource(File outputDirectory,
String resourceName,
String targetFileName) throws IOException
{
String resourcePath = classpathPrefix + resourceName;
InputStream resourceStream = getClass().getClassLoader().getResourceAsStream(resourcePath);
copyStream(outputDirectory, resourceStream, targetFileName);
} | [
"Copy a single named resource from the classpath to the output directory.\n@param outputDirectory The destination directory for the copied resource.\n@param resourceName The filename of the resource.\n@param targetFileName The name of the file created in {@literal outputDirectory}.\n@throws IOException If the resource cannot be copied."
] | [
"Deserializes a variable, checking whether the datatype is custom or not\n@param s\n@param variableType\n@param dataTypes\n@return",
"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...",
"Checks whether the given field definition is used as the primary key of a class referenced by\na reference.\n\n@param modelDef The model\n@param fieldDef The current field descriptor def\n@return The reference that uses the field or <code>null</code> if the field is not used in this way",
"Use this API to unset the properties of responderpolicy resource.\nProperties that need to be unset are specified in args array.",
"Use this API to fetch lbvserver resource of given name .",
"Write each predecessor for a task.\n\n@param record Task instance",
"Finds and sets up the Listeners in the given rootView.\n\n@param rootView a View to traverse looking for listeners.\n@return the list of refinement attributes found on listeners.",
"Creates a CostRateTable instance from a block of data.\n\n@param resource parent resource\n@param index cost rate table index\n@param data data block",
"Set the html as value inside the tooltip."
] |
private ModelNode createOSNode() throws OperationFailedException {
String osName = getProperty("os.name");
final ModelNode os = new ModelNode();
if (osName != null && osName.toLowerCase().contains("linux")) {
try {
os.set(GnuLinuxDistribution.discover());
} catch (IOException ex) {
throw new OperationFailedException(ex);
}
} else {
os.set(osName);
}
return os;
} | [
"Create a ModelNode representing the operating system the instance is running on.\n\n@return a ModelNode representing the operating system the instance is running on.\n@throws OperationFailedException"
] | [
"set custom response for the default profile's default client\n\n@param pathName friendly name of path\n@param customData custom response/request data\n@return true if success, false otherwise",
"Create a ModelNode representing the JVM the instance is running on.\n\n@return a ModelNode representing the JVM the instance is running on.\n@throws OperationFailedException",
"Adds a measure to the crosstab. A crosstab can have many measures. DJ will lay out one measure above\nthe other.\n\nA measure is what is shown on each intersection of a column and a row. A calculation is performed to\nall occurrences in the datasource where the column and row values matches (between elements)\n\nThe only difference between the prior methods is that this method sets \"visible\" to false\n\n@param property\n@param className\n@param title\n@return",
"Inserts a new instance but references via the outIdentifier, which is returned as part of the ExecutionResults\nThe outIdentifier can be null.\nThe entryPoint, which can also be null, specifies the entrypoint the object is inserted into.\n\n@param object\n@param outIdentifier\n@param entryPoint\n@return",
"Verifies that the received image is identical to the original one.\n@param xopOriginal\n@param xopResponse",
"Read a short int from an input stream.\n\n@param is input stream\n@return int value",
"The parameter must never be null\n\n@param queryParameters",
"Creates a code location URL from a class\n\n@param codeLocationClass the class\n@return A URL created from Class\n@throws InvalidCodeLocation if URL creation fails",
"Override the thread context ClassLoader with the environment's bean ClassLoader\nif necessary, i.e. if the bean ClassLoader is not equivalent to the thread\ncontext ClassLoader already.\n@param classLoaderToUse the actual ClassLoader to use for the thread context\n@return the original thread context ClassLoader, or {@code null} if not overridden"
] |
public static gslbservice get(nitro_service service, String servicename) throws Exception{
gslbservice obj = new gslbservice();
obj.set_servicename(servicename);
gslbservice response = (gslbservice) obj.get_resource(service);
return response;
} | [
"Use this API to fetch gslbservice resource of given name ."
] | [
"Convert raw data into Java types.\n\n@param type data type\n@param data raw data\n@return list of Java object",
"Returns the editable columns for the provided edit mode.\n@param mode the edit mode.\n@return the editable columns for the provided edit mode.",
"Returns the dot product of this vector and v1.\n\n@param v1\nright-hand vector\n@return dot product",
"Add a row to the table. We have a limited understanding of the way\nBtrieve handles outdated rows, so we use what we think is a version number\nto try to ensure that we only have the latest rows.\n\n@param primaryKeyColumnName primary key column name\n@param map Map containing row data",
"Convert one project file format to another.\n\n@param inputFile input file\n@param outputFile output file\n@throws Exception",
"Add the value to list of values to be used as part of the\nevaluation of this indicator.\n\n@param index position in the list\n@param value evaluation value",
"Returns the dimensions for the video\n@param videoFile Video file\n@return the dimensions\n@throws IOException",
"Get a TokenizerFactory that does Penn Treebank tokenization.\nThis is now the recommended factory method to use.\n\n@param factory A TokenFactory that determines what form of token is returned by the Tokenizer\n@param options A String specifying options (see the class javadoc for details)\n@param <T> The type of the tokens built by the LexedTokenFactory\n@return A TokenizerFactory that does Penn Treebank tokenization",
"Clones the given collection.\n\n@param collDef The collection descriptor\n@param prefix A prefix for the name\n@return The cloned collection"
] |
public String invokeOperation(String operationName, Map<String, String[]> parameterMap)
throws JMException, UnsupportedEncodingException {
MBeanOperationInfo operationInfo = getOperationInfo(operationName);
MBeanOperationInvoker invoker = createMBeanOperationInvoker(mBeanServer, objectName, operationInfo);
return sanitizer.escapeValue(invoker.invokeOperation(parameterMap));
} | [
"Invoke an operation on an MBean by name.\nNote that only basic data types are supported for parameter values.\n@param operationName the operation name (can be URL-encoded).\n@param parameterMap the {@link Map} of parameter names and value arrays.\n@return the returned value from the operation.\n@throws JMException Java Management Exception\n@throws UnsupportedEncodingException if the encoding is not supported."
] | [
"Retrieves the overallocated flag.\n\n@return overallocated flag",
"Scans given archive for files passing given filter, adds the results into given list.",
"Resize the key data area.\nThis function will truncate the keys if the\ninitial setting was too large.\n\n@oaran numKeys the desired number of keys",
"Returns the deployment names with the specified runtime names at the specified deploymentRootAddress.\n\n@param deploymentRootResource\n@param runtimeNames\n@return the deployment names with the specified runtime names at the specified deploymentRootAddress.",
"Extract raw table data from the input stream.\n\n@param is input stream",
"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",
"Acquire a calendar instance.\n\n@return Calendar instance",
"Abort the daemon\n\n@param error the error causing the abortion",
"get bearer token returned by IAM in JSON format"
] |
public static Boolean assertFalse(Boolean value, String message) {
if (Boolean.valueOf(value))
throw new IllegalArgumentException(message);
return value;
} | [
"Throws an IllegalArgumentException when the given value is not false.\n@param value the value to assert if false\n@param message the message to display if the value is false\n@return the value"
] | [
"Unmarshal test suite from given file.",
"Get the number of views, comments and favorites on a collection for a given date.\n\n@param date\n(Required) Stats will be returned for this date. A day according to Flickr Stats starts at midnight GMT for all users, and timestamps will\nautomatically be rounded down to the start of the day.\n@param collectionId\n(Required) The id (from the URL!) of the collection to get stats for.\n@see \"http://www.flickr.com/services/api/flickr.stats.getCollectionStats.htm\"",
"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",
"Adds the value to the Collection mapped to by the key.",
"Record the resource request queue length\n\n@param dest Destination of the socket for which resource request is\nenqueued. Will actually record if null. Otherwise will call this\non self and corresponding child with this param null.\n@param queueLength The number of entries in the \"asynchronous\" resource\nrequest queue.",
"Renders in LI tags, Wraps with UL tags optionally.",
"Links the given widget to InstantSearch according to the interfaces it implements.\n\n@param widget a widget implementing ({@link AlgoliaResultsListener} || {@link AlgoliaErrorListener} || {@link AlgoliaSearcherListener}).",
"Bounds are calculated locally, can use any filter, but slower than native.\n\n@param filter\nfilter which needs to be applied\n@return the bounds of the specified features\n@throws LayerException\noops",
"Write to a context. Uses NullWritable for key so that only value of output string is ultimately written\n\n@param cr the DataPipe to write to"
] |
protected List<Object> executeProcessors(final List<Object> processedColumns, final CellProcessor[] processors) {
Util.executeCellProcessors(processedColumns, getColumns(), processors, getLineNumber(), getRowNumber());
return processedColumns;
} | [
"Executes the supplied cell processors on the last row of CSV that was read and populates the supplied List of\nprocessed columns.\n\n@param processedColumns\nthe List to populate with processed columns\n@param processors\nthe cell processors\n@return the updated List\n@throws NullPointerException\nif processedColumns or processors is null\n@throws SuperCsvConstraintViolationException\nif a CellProcessor constraint failed\n@throws SuperCsvException\nif the wrong number of processors are supplied, or CellProcessor execution failed"
] | [
"Wrapper functions with no bounds checking are used to access matrix internals",
"Return the count of all objects found\nfor given class, using the PB-api within\nODMG - this may change in further versions.",
"Checks whether the property of the given name is allowed for the model element.\n\n@param defClass The class of the model element\n@param propertyName The name of the property\n@return <code>true</code> if the property is allowed for this type of model elements",
"Return a vector of values corresponding to a given vector of times.\n@param times A given vector of times.\n@return A vector of values corresponding to the given vector of times.",
"Use this API to add dnspolicylabel resources.",
"FastJSON does not provide the API so we have to create our own",
"main class entry point.",
"Get the bounding box for a certain tile.\n\n@param code\nThe unique tile code. Determines what tile we're talking about.\n@param maxExtent\nThe maximum extent of the grid to which this tile belongs.\n@param scale\nThe current client side scale.\n@return Returns the bounding box for the tile, expressed in the layer's coordinate system.",
"Recursively read a task, and any sub tasks.\n\n@param mpxjParent Parent for the MPXJ tasks\n@param gpTask GanttProject task"
] |
public static spilloverpolicy_stats[] get(nitro_service service) throws Exception{
spilloverpolicy_stats obj = new spilloverpolicy_stats();
spilloverpolicy_stats[] response = (spilloverpolicy_stats[])obj.stat_resources(service);
return response;
} | [
"Use this API to fetch the statistics of all spilloverpolicy_stats resources that are configured on netscaler."
] | [
"Emit information about all of suite's tests.",
"Use this API to add gslbservice.",
"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",
"2-D Double array to integer array.\n\n@param array Double array.\n@return Integer array.",
"Sets the target translator for all cells in the table.\nIt will also remove any other translator set.\nNothing will happen if the argument is null.\n@param targetTranslator translator\n@return this to allow chaining",
"Here we start a intern odmg-Transaction to hide transaction demarcation\nThis method could be invoked several times within a transaction, but only\nthe first call begin a intern odmg transaction",
"Notify listeners that the tree structure has changed.",
"This method extracts data for a single resource from a Planner file.\n\n@param plannerResource Resource data",
"Read activities."
] |
private static BindingType map2BindingType(String bindingId) {
BindingType type;
if (SOAP11_BINDING_ID.equals(bindingId)) {
type = BindingType.SOAP11;
} else if (SOAP12_BINDING_ID.equals(bindingId)) {
type = BindingType.SOAP12;
} else if (JAXRS_BINDING_ID.equals(bindingId)) {
type = BindingType.JAXRS;
} else {
type = BindingType.OTHER;
}
return type;
} | [
"Maps a bindingId to its corresponding BindingType.\n@param bindingId\n@return"
] | [
"To use main report datasource. There should be nothing else in the detail band\n@param preSorted\n@return",
"Runs the given method with the specified arguments, substituting with proxies where necessary\n@param method\n@param target proxy target\n@param args\n@return Proxy-fied result for statements, actual call result otherwise\n@throws IllegalAccessException\n@throws InvocationTargetException",
"New REST client uses new REST service",
"Registers the transformers for JBoss EAP 7.0.0.\n\n@param subsystemRegistration contains data about the subsystem registration",
"Unlink the specified reference from this object.\nMore info see OJB doc.\n\n@param obj Object with reference\n@param ord the ObjectReferenceDescriptor of the reference\n@param insert flag signals insert operation",
"Use this API to fetch auditsyslogpolicy_systemglobal_binding resources of given name .",
"Adds a listener to this collection.\n\n@param listener The listener to add",
"Sets divider padding for axis. If axis does not match the orientation, it has no effect.\n@param padding\n@param axis {@link Axis}",
"Parse currency.\n\n@param value currency value\n@return currency value"
] |
public static double blackScholesDigitalOptionRho(
double initialStockValue,
double riskFreeRate,
double volatility,
double optionMaturity,
double optionStrike)
{
if(optionMaturity <= 0.0)
{
// The Black-Scholes model does not consider it being an option
return 0.0;
}
else if(optionStrike <= 0.0) {
double rho = - optionMaturity * Math.exp(-riskFreeRate * optionMaturity);
return rho;
}
else
{
// Calculate rho
double dMinus = (Math.log(initialStockValue / optionStrike) + (riskFreeRate - 0.5 * volatility * volatility) * optionMaturity) / (volatility * Math.sqrt(optionMaturity));
double rho = - optionMaturity * Math.exp(-riskFreeRate * optionMaturity) * NormalDistribution.cumulativeDistribution(dMinus)
+ Math.sqrt(optionMaturity)/volatility * Math.exp(-riskFreeRate * optionMaturity) * Math.exp(-0.5*dMinus*dMinus) / Math.sqrt(2.0 * Math.PI);
return rho;
}
} | [
"Calculates the rho of a digital option under a Black-Scholes model\n\n@param initialStockValue The initial value of the underlying, i.e., the spot.\n@param riskFreeRate The risk free rate of the bank account numerarie.\n@param volatility The Black-Scholes volatility.\n@param optionMaturity The option maturity T.\n@param optionStrike The option strike.\n@return The rho of the digital option"
] | [
"Notification that the server process finished.",
"First looks for zeros and then performs the implicit single step in the QR Algorithm.",
"Bessel function of the first kind, of order 0.\n\n@param x Value.\n@return I0 value.",
"Registers the resource to the parent deployment resource. The model returned is that of the resource parameter.\n\n@param subsystemName the subsystem name\n@param resource the resource to be used for the subsystem on the deployment\n\n@return the model\n\n@throws java.lang.IllegalStateException if the subsystem resource already exists",
"Called internally to actually process the Iteration.",
"Returns the compact representations of all of the dependents of a task.\n\n@param task The task to get dependents on.\n@return Request object",
"Use this API to fetch authenticationtacacspolicy_authenticationvserver_binding resources of given name .",
"Retrieve the ordinal text for a given integer.\n\n@param value integer value\n@return ordinal text",
"Use this API to fetch responderpolicy resource of given name ."
] |
public void setSegmentReject(String reject) {
if (!StringUtils.hasText(reject)) {
return;
}
Integer parsedLimit = null;
try {
parsedLimit = Integer.parseInt(reject);
segmentRejectType = SegmentRejectType.ROWS;
} catch (NumberFormatException e) {
}
if (parsedLimit == null && reject.contains("%")) {
try {
parsedLimit = Integer.parseInt(reject.replace("%", "").trim());
segmentRejectType = SegmentRejectType.PERCENT;
} catch (NumberFormatException e) {
}
}
segmentRejectLimit = parsedLimit;
} | [
"Sets the segment reject as a string. This method is for convenience\nto be able to set percent reject type just by calling with '3%' and\notherwise it uses rows. All this assuming that parsing finds '%' characher\nand is able to parse a raw reject number.\n\n@param reject the new segment reject"
] | [
"The main method called from the command line.\n\n@param args the command line arguments",
"Create a counter if one is not defined already, otherwise return the existing one.\n\n@param counterName unique name for the counter\n@param initialValue initial value for the counter\n@return a {@link StrongCounter}",
"Constructs a reference of the given type to the given\nreferent. The reference is registered with the queue\nfor later purging.\n\n@param type HARD, SOFT or WEAK\n@param referent the object to refer to\n@param hash the hash code of the <I>key</I> of the mapping;\nthis number might be different from referent.hashCode() if\nthe referent represents a value and not a key",
"Links the given widget to InstantSearch according to the interfaces it implements.\n\n@param widget a widget implementing ({@link AlgoliaResultsListener} || {@link AlgoliaErrorListener} || {@link AlgoliaSearcherListener}).",
"Return the item view type used by the adapter to implement recycle mechanism.\n\n@param content to be rendered.\n@return an integer that represents the renderer inside the adapter.",
"Updates the information about this collaboration with any info fields that have been modified locally.\n\n@param info the updated info.",
"Gets the element view.\n\n@return the element view",
"Use this API to delete appfwjsoncontenttype resources of given names.",
"Transform a TMS layer description object into a raster layer info object.\n\n@param tileMap\nThe TMS layer description object.\n@return The raster layer info object as used by Geomajas."
] |
public PhotoContext getContext(String photoId, String groupId) throws FlickrException {
Map<String, Object> parameters = new HashMap<String, Object>();
parameters.put("method", METHOD_GET_CONTEXT);
parameters.put("photo_id", photoId);
parameters.put("group_id", groupId);
Response response = transport.get(transport.getPath(), parameters, apiKey, sharedSecret);
if (response.isError()) {
throw new FlickrException(response.getErrorCode(), response.getErrorMessage());
}
Collection<Element> payload = response.getPayloadCollection();
PhotoContext photoContext = new PhotoContext();
for (Element element : payload) {
String elementName = element.getTagName();
if (elementName.equals("prevphoto")) {
Photo photo = new Photo();
photo.setId(element.getAttribute("id"));
photoContext.setPreviousPhoto(photo);
} else if (elementName.equals("nextphoto")) {
Photo photo = new Photo();
photo.setId(element.getAttribute("id"));
photoContext.setNextPhoto(photo);
} else if (!elementName.equals("count")) {
_log.warn("unsupported element name: " + elementName);
}
}
return photoContext;
} | [
"Get the context for a photo in the group pool.\n\nThis method does not require authentication.\n\n@param photoId\nThe photo ID\n@param groupId\nThe group ID\n@return The PhotoContext\n@throws FlickrException"
] | [
"Checks if a given number is in the range of an integer.\n\n@param number\na number which should be in the range of an integer (positive or negative)\n\n@see java.lang.Integer#MIN_VALUE\n@see java.lang.Integer#MAX_VALUE\n\n@return number as an integer (rounding might occur)",
"Add the operation at the end of Stage MODEL if this operation has not already been registered.\n\nThis operation should be added if any of the following occur: -\n- The authorization configuration is removed from a security realm.\n- The rbac provider is changed to rbac.\n- A role is removed.\n- An include is removed from a role.\n- A management interface is removed.\n\nNote: This list only includes actions that could invalidate the configuration, actions that would not invalidate the\nconfiguration do not need this operation registering. e.g. Adding a role, if the configuration was already valid this\ncould not invalidate it.\n\n@param context - The OperationContext to use to register the step.",
"Inverts an upper or lower triangular block submatrix.\n\n@param blockLength\n@param upper Is it upper or lower triangular.\n@param T Triangular matrix that is to be inverted. Must be block aligned. Not Modified.\n@param T_inv Where the inverse is stored. This can be the same as T. Modified.\n@param temp Work space variable that is size blockLength*blockLength.",
"Function to delete the specified store from Metadata store. This involves\n\n1. Remove entry from the ConfigurationStorageEngine for STORES.\n\n2. Update the metadata cache.\n\n3. Re-create the 'stores.xml' key\n\n@param storeName specifies name of the store to be deleted.",
"Check whether we have diverged from what we would predict from the last update that was sent to a particular\ntrack position listener.\n\n@param lastUpdate the last update that was sent to the listener\n@param currentUpdate the latest update available for the same player\n\n@return {@code true }if the listener will have diverged by more than our permitted amount of slack, and so\nshould be updated",
"Set the attributes for the associated object.\n\n@param attributes attributes for associated objects\n@deprecated replaced by {@link #setAllAttributes(Map)} after introduction of nested associations",
"Use this API to fetch the statistics of all cmppolicy_stats resources that are configured on netscaler.",
"Creates SLD rules for each old style.",
"Saves the project file displayed in this panel.\n\n@param file target file\n@param type file type"
] |
@Pure
@Inline(value = "$3.union($1, $2)", imported = MapExtensions.class)
public static <K, V> Map<K, V> operator_plus(Map<K, V> left, Map<? extends K, ? extends V> right) {
return union(left, right);
} | [
"Merge the two maps.\n\n<p>\nThe replied map is a view on the given map. It means that any change\nin the original map is reflected to the result of this operation.\n</p>\n\n<p>\nIf a key exists in the left and right operands, the value in the right operand is preferred.\n</p>\n\n@param <K> type of the map keys.\n@param <V> type of the map values.\n@param left the left map.\n@param right the right map.\n@return a map with the merged contents from the two maps.\n@throws IllegalArgumentException - when a right operand key exists in the left operand.\n@since 2.15"
] | [
"Construct a pretty string documenting progress for this batch plan thus\nfar.\n\n@return pretty string documenting progress",
"Does the headset the device is docked into have a dedicated home key\n@return",
"Emit status line for an aggregated event.",
"Merges information from the resource root into this resource root\n\n@param additionalResourceRoot The root to merge",
"Shows a dialog with user information for given session.\n\n@param session to show information for",
"Check if the path to the property correspond to an association.\n\n@param targetTypeName the name of the entity containing the property\n@param pathWithoutAlias the path to the property WITHOUT aliases\n@return {@code true} if the property is an association or {@code false} otherwise",
"Handles an initial response from a PUT or PATCH operation response by polling\nthe status of the operation until the long running operation terminates.\n\n@param observable the initial observable from the PUT or PATCH operation.\n@param <T> the return type of the caller\n@param resourceType the java.lang.reflect.Type of the resource.\n@return the terminal response for the operation.\n@throws CloudException REST exception\n@throws InterruptedException interrupted exception\n@throws IOException thrown by deserialization",
"Finds an Object of the specified type.\n\n@param <T> Object type.\n@param classType The class of type T.\n@param id The document _id field.\n@param rev The document _rev field.\n@return An object of type T.\n@throws NoDocumentException If the document is not found in the database.",
"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"
] |
public static ServiceName moduleServiceName(ModuleIdentifier identifier) {
if (!identifier.getName().startsWith(MODULE_PREFIX)) {
throw ServerLogger.ROOT_LOGGER.missingModulePrefix(identifier, MODULE_PREFIX);
}
return MODULE_SERVICE_PREFIX.append(identifier.getName()).append(identifier.getSlot());
} | [
"Returns the corresponding ModuleLoadService service name for the given module.\n\n@param identifier The module identifier\n@return The service name of the ModuleLoadService service"
] | [
"Get the script for a given ID\n\n@param id ID of script\n@return Script if found, otherwise null",
"Use this API to flush cacheobject resources.",
"Returns the base URL of the print servlet.\n\n@param httpServletRequest the request",
"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",
"Try to set the value from the provided Json string.\n@param value the value to set.\n@throws Exception thrown if parsing fails.",
"Computes the null space using SVD. Slowest bust most stable way to find the solution\n\n@param A (Input) Matrix\n@param totalSingular Number of singular values\n@return Null space",
"True if deleted, false if not found.",
"For recovery from the latest consistent snapshot, we should clean up the\nold files from the previous backup set, else we will fill the disk with\nuseless log files\n\n@param backupDir",
"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."
] |
public UniqueEntityLoader buildLoader(
OuterJoinLoadable persister,
int batchSize,
LockMode lockMode,
SessionFactoryImplementor factory,
LoadQueryInfluencers influencers,
BatchableEntityLoaderBuilder innerEntityLoaderBuilder) {
if ( batchSize <= 1 ) {
// no batching
return buildNonBatchingLoader( persister, lockMode, factory, influencers, innerEntityLoaderBuilder );
}
return buildBatchingLoader( persister, batchSize, lockMode, factory, influencers, innerEntityLoaderBuilder );
} | [
"Builds a batch-fetch capable loader based on the given persister, lock-mode, etc.\n\n@param persister The entity persister\n@param batchSize The maximum number of ids to batch-fetch at once\n@param lockMode The lock mode\n@param factory The SessionFactory\n@param influencers Any influencers that should affect the built query\n@param innerEntityLoaderBuilder Builder of the entity loader receiving the subset of batches\n\n@return The loader."
] | [
"Packages of the specified classes will be scanned and found classes will be added to the set of bean classes for the synthetic bean archive.\n\n@param scanRecursively\n@param packageClasses\n@return self",
"Use this API to reset Interface.",
"Upcasts a Builder instance to the generated superclass, to allow access to private fields.\n\n<p>Reuses an existing upcast instance if one was already declared in this scope.\n\n@param code the {@link SourceBuilder} to add the declaration to\n@param datatype metadata about the user type the builder is being generated for\n@param builder the Builder instance to upcast\n@returns a variable holding the upcasted instance",
"Close the ClientRequestExecutor.",
"Returns a new iterator filtering any null references.\n\n@param unfiltered\nthe unfiltered iterator. May not be <code>null</code>.\n@return an unmodifiable iterator containing all elements of the original iterator without any <code>null</code>\nreferences. Never <code>null</code>.",
"Obtains a local date in Ethiopic calendar system from the\nera, year-of-era, month-of-year and day-of-month fields.\n\n@param era the Ethiopic era, not null\n@param yearOfEra the year-of-era\n@param month the month-of-year\n@param dayOfMonth the day-of-month\n@return the Ethiopic local date, not null\n@throws DateTimeException if unable to create the date\n@throws ClassCastException if the {@code era} is not a {@code EthiopicEra}",
"Creates the stats items.\n\n@param statsType\nthe stats type\n@return the sorted set\n@throws IOException\nSignals that an I/O exception has occurred.",
"Gets an app client by its client app id if it has been initialized; throws if none can be\nfound.\n\n@param clientAppId the client app id of the app client to get.\n@return the app client associated with the client app id.",
"Returns the accrued interest of the bond for a given time.\n\n@param time The time of interest as double.\n@param model The model under which the product is valued.\n@return The accrued interest."
] |
public static void createDotStoryFile(String scenarioName,
String srcTestRootFolder, String packagePath,
String givenDescription, String whenDescription,
String thenDescription) throws BeastException {
String[] folders = packagePath.split(".");
for (String folder : folders) {
srcTestRootFolder += "/" + folder;
}
FileWriter writer = createFileWriter(createDotStoryName(scenarioName),
packagePath, srcTestRootFolder);
try {
writer.write("Scenario: " + scenarioName + "\n");
writer.write("Given " + givenDescription + "\n");
writer.write("When " + whenDescription + "\n");
writer.write("Then " + thenDescription + "\n");
writer.close();
} catch (Exception e) {
String message = "Unable to write the .story file for the scenario "
+ scenarioName;
logger.severe(message);
logger.severe(e.getMessage());
throw new BeastException(message, e);
}
} | [
"Creates the .story file necessary for every Beast Test Case.\n\n@param scenarioName\n- The name of the scenario, with spaces\n@param srcTestRootFolder\n- The test root folder\n@param packagePath\n- The package of the BeastTestCase\n@param scenarioDescription\n- the scenario name\n@param givenDescription\n- The given description\n@param whenDescription\n- The when description\n@param thenDescription\n- The then description\n@throws BeastException"
] | [
"Use this API to save nsconfig.",
"Checks if a given number is in the range of an integer.\n\n@param number\na number which should be in the range of an integer (positive or negative)\n\n@see java.lang.Integer#MIN_VALUE\n@see java.lang.Integer#MAX_VALUE\n\n@return number as an integer (rounding might occur)",
"The Critical field indicates whether a task has any room in the schedule\nto slip, or if a task is on the critical path. The Critical field contains\nYes if the task is critical and No if the task is not critical.\n\n@return boolean",
"Parses all child Shapes recursively and adds them to the correct JSON\nObject\n\n@param childShapes\n@throws org.json.JSONException",
"Sets the current field definition derived from the current member, and optionally some attributes.\n\n@param template The template\n@param attributes The attributes of the tag\n@exception XDocletException if an error occurs\[email protected] type=\"block\"\[email protected] name=\"access\" optional=\"true\" description=\"The accessibility of the column\" values=\"readonly,readwrite\"\[email protected] name=\"attributes\" optional=\"true\" description=\"Attributes of the field as name-value pairs 'name=value',\nseparated by commas\"\[email protected] name=\"autoincrement\" optional=\"true\" description=\"Whether the field is\nauto-incremented\" values=\"none,ojb,database\"\[email protected] name=\"column\" optional=\"true\" description=\"The column for the field\"\[email protected] name=\"column-documentation\" optional=\"true\" description=\"Documentation on the column\"\[email protected] name=\"conversion\" optional=\"true\" description=\"The fully qualified name of the\nconversion for the field\"\[email protected] name=\"default-fetch\" optional=\"true\" description=\"The default-fetch setting\"\nvalues=\"true,false\"\[email protected] name=\"documentation\" optional=\"true\" description=\"Documentation on the field\"\[email protected] name=\"id\" optional=\"true\" description=\"The position of the field in the class\ndescriptor\"\[email protected] name=\"indexed\" optional=\"true\" description=\"Whether the field is indexed\"\nvalues=\"true,false\"\[email protected] name=\"jdbc-type\" optional=\"true\" description=\"The jdbc type of the column\"\[email protected] name=\"length\" optional=\"true\" description=\"The length of the column\"\[email protected] name=\"locking\" optional=\"true\" description=\"Whether the field supports locking\"\nvalues=\"true,false\"\[email protected] name=\"nullable\" optional=\"true\" description=\"Whether the field is nullable\"\nvalues=\"true,false\"\[email protected] name=\"precision\" optional=\"true\" description=\"The precision of the column\"\[email protected] name=\"primarykey\" optional=\"true\" description=\"Whether the field is a primarykey\"\nvalues=\"true,false\"\[email protected] name=\"scale\" optional=\"true\" description=\"The scale of the column\"\[email protected] name=\"sequence-name\" optional=\"true\" description=\"The name of the sequence for\nincrementing the field\"\[email protected] name=\"table\" optional=\"true\" description=\"The table of the field (not implemented\nyet)\"\[email protected] name=\"update-lock\" optional=\"true\" description=\"Can be set to false if the persistent attribute is\nused for optimistic locking AND the dbms should update the lock column itself (default is true). Can only be set for\nTIMESTAMP and INTEGER columns\" values=\"true,false\"",
"Applies the given codec registry to be used alongside the default codec registry.\n\n@param codecRegistry the codec registry to merge in.\n@return an {@link StitchObjectMapper} with the merged codec registries.",
"URL-Decodes a given string using UTF-8. No UnsupportedEncodingException to handle as it is dealt with in this\nmethod.",
"For creating regular columns\n@return",
"Retrieves state and metrics information for all nodes in the cluster.\n\n@return list of nodes in the cluster"
] |
static ModelNode createOperation(final ModelNode operationToValidate) {
PathAddress pa = PathAddress.pathAddress(operationToValidate.require(ModelDescriptionConstants.OP_ADDR));
PathAddress realmPA = null;
for (int i = pa.size() - 1; i > 0; i--) {
PathElement pe = pa.getElement(i);
if (SECURITY_REALM.equals(pe.getKey())) {
realmPA = pa.subAddress(0, i + 1);
break;
}
}
assert realmPA != null : "operationToValidate did not have an address that included a " + SECURITY_REALM;
return Util.getEmptyOperation("validate-authentication", realmPA.toModelNode());
} | [
"Creates an operations that targets this handler.\n@param operationToValidate the operation that this handler will validate\n@return the validation operation"
] | [
"Parses the date or returns null if it fails to do so.",
"all objects in list1 that are not in list2\n\n@param <T>\n@param list1\nFirst collection\n@param list2\nSecond collection\n@return The collection difference list1 - list2",
"Returns all the deployment runtime names associated with an overlay.\n\n@param context the current OperationContext.\n@param overlayAddress the address for the averlay.\n@return all the deployment runtime names associated with an overlay.",
"Overridden to skip some symbolizers.",
"Method used to write the name of the scenarios methods\n\n@param word\n@return the same word starting with lower case",
"Read metadata by populating an instance of the target class\nusing SAXParser.",
"This method retrieves a byte array 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 byte array containing required data",
"Lookup the Gallery for the specified ID.\n\n@param galleryId\nThe user profile URL\n@return The Gallery\n@throws FlickrException",
"create a HTTP POST request.\n\n@return {@link HttpConnection}"
] |
public static PropertyOrder.Builder makeOrder(String property,
PropertyOrder.Direction direction) {
return PropertyOrder.newBuilder()
.setProperty(makePropertyReference(property))
.setDirection(direction);
} | [
"Make a sort order for use in a query."
] | [
"given is at the begining, of is at the end",
"Logic for timestamp\n@param time Epoch date of creation\n@return String timestamp",
"Set RGB input range.\n\n@param inRGB Range.",
"Get the status of the upload session. It contains the number of parts that are processed so far,\nthe total number of parts required for the commit and expiration date and time of the upload session.\n@return the status.",
"Checks if the specified bytecode version string represents a JDK 1.5+ compatible\nbytecode version.\n@param bytecodeVersion the bytecode version string (1.4, 1.5, 1.6, 1.7 or 1.8)\n@return true if the bytecode version is JDK 1.5+",
"Serialize specified object to directory with specified name. Given output stream will be closed.\n\n@param obj object to serialize\n@return number of bytes written to directory",
"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",
"Read metadata by populating an instance of the target class\nusing SAXParser.",
"Returns the nested object definition with the specified name.\n\n@param name The name of the attribute of the nested object\n@return The nested object definition or <code>null</code> if there is no such nested object"
] |
public String toUriString(final java.net.URI uri) {
return this.toUriString(URI.createURI(uri.normalize().toString()));
} | [
"converts a java.net.URI into a string representation with empty authority, if absent and has file scheme."
] | [
"Assign target number of partitions per node to specific node IDs. Then,\nseparates Nodes into donorNodes and stealerNodes based on whether the\nnode needs to donate or steal primary partitions.\n\n@param nextCandidateCluster\n@param numPartitionsPerNodePerZone\n@return a Pair. First element is donorNodes, second element is\nstealerNodes. Each element in the pair is a HashMap of Node to\nInteger where the integer value is the number of partitions to\nstore.",
"Read an element which contains only a single list attribute of a given\ntype.\n@param reader the reader\n@param attributeName the attribute name, usually \"value\"\n@param type the value type class\n@param <T> the value type\n@return the value list\n@throws javax.xml.stream.XMLStreamException if an error occurs or if the\nelement does not contain the specified attribute, contains other\nattributes, or contains child elements.",
"Visit an exported package of the current module.\n\n@param packaze the qualified name of the exported package.\n@param access the access flag of the exported package,\nvalid values are among {@code ACC_SYNTHETIC} and\n{@code ACC_MANDATED}.\n@param modules the qualified names of the modules that can access to\nthe public classes of the exported package or\n<tt>null</tt>.",
"Adds OPT_U | OPT_URL 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",
"Set a Background Drawable using the appropriate Android version api call\n\n@param view\n@param drawable",
"Tells you if the expression is a null safe dereference.\n@param expression\nexpression\n@return\ntrue if is null safe dereference.",
"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",
"Add \"GROUP BY\" clause to the SQL query statement. This can be called multiple times to add additional \"GROUP BY\"\nclauses.\n\n<p>\nNOTE: Use of this means that the resulting objects may not have a valid ID column value so cannot be deleted or\nupdated.\n</p>",
"Helper method for formatting connection establishment messages.\n\n@param connectionName\nThe name of the connection\n@param host\nThe remote host\n@param connectionReason\nThe reason for establishing the connection\n@return A formatted message in the format:\n\"[<connectionName>] remote host[<host>] <connectionReason>\"\n<br/>\ne.g. [con1] remote host[123.123.123.123] connection to ECMG."
] |
private void addSubMatrixVariables(List<TokenList.Token> inputs, List<Variable> variables) {
for (int i = 0; i < inputs.size(); i++) {
TokenList.Token t = inputs.get(i);
if( t.getType() != Type.VARIABLE )
throw new ParseError("Expected variables only in sub-matrix input, not "+t.getType());
Variable v = t.getVariable();
if( v.getType() == VariableType.INTEGER_SEQUENCE || isVariableInteger(t) ) {
variables.add(v);
} else {
throw new ParseError("Expected an integer, integer sequence, or array range to define a submatrix");
}
}
} | [
"Goes through the token lists and adds all the variables which can be used to define a sub-matrix. If anything\nelse is found an excpetion is thrown"
] | [
"Generate a new check box with the provided date and check state.\n@param date date for the check box.\n@param checkState the initial check state.\n@return the created check box",
"The Baseline Start field shows the planned beginning date for a task at\nthe time you saved a baseline. Information in this field becomes available\nwhen you set a baseline.\n\n@return Date",
"Curries a procedure that takes three arguments.\n\n@param procedure\nthe original procedure. May not be <code>null</code>.\n@param argument\nthe fixed first argument of {@code procedure}.\n@return a procedure that takes two arguments. Never <code>null</code>.",
"Close the store.",
"Parser for forecast\n\n@param feed\n@return",
"Reads characters until any 'end' character is encountered, ignoring\nescape sequences.\n\n@param out\nThe StringBuilder to write to.\n@param in\nThe Input String.\n@param start\nStarting position.\n@param end\nEnd characters.\n@return The new position or -1 if no 'end' char was found.",
"Returns a factory that vends DelimitRegExIterators that reads the contents of the\ngiven Reader, splits on the specified delimiter, applies op, then returns the result.",
"Sets the content type for this ID\n\n@param pathId ID of path\n@param contentType content type value",
"Starts off a new thread to monitor this connection attempt.\n@param connectionHandle to monitor"
] |
public static void zeroTriangle( boolean upper , DMatrixRBlock A )
{
int blockLength = A.blockLength;
if( upper ) {
for( int i = 0; i < A.numRows; i += blockLength ) {
int h = Math.min(blockLength,A.numRows-i);
for( int j = i; j < A.numCols; j += blockLength ) {
int w = Math.min(blockLength,A.numCols-j);
int index = i*A.numCols + h*j;
if( j == i ) {
for( int k = 0; k < h; k++ ) {
for( int l = k+1; l < w; l++ ) {
A.data[index + w*k+l ] = 0;
}
}
} else {
for( int k = 0; k < h; k++ ) {
for( int l = 0; l < w; l++ ) {
A.data[index + w*k+l ] = 0;
}
}
}
}
}
} else {
for( int i = 0; i < A.numRows; i += blockLength ) {
int h = Math.min(blockLength,A.numRows-i);
for( int j = 0; j <= i; j += blockLength ) {
int w = Math.min(blockLength,A.numCols-j);
int index = i*A.numCols + h*j;
if( j == i ) {
for( int k = 0; k < h; k++ ) {
int z = Math.min(k,w);
for( int l = 0; l < z; l++ ) {
A.data[index + w*k+l ] = 0;
}
}
} else {
for( int k = 0; k < h; k++ ) {
for( int l = 0; l < w; l++ ) {
A.data[index + w*k+l ] = 0;
}
}
}
}
}
}
} | [
"Sets either the upper or low triangle of a matrix to zero"
] | [
"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}.",
"Inserts the specified array into the specified original array at the specified index.\n\n@param original the original array into which we want to insert another array\n@param index the index at which we want to insert the array\n@param inserted the array that we want to insert\n@return the combined array",
"Will make the thread ready to run once again after it has stopped.",
"Wait for exclusive permit during a timeout in milliseconds.\n\n@return number of acquired permits if > 0",
"Shows the given step.\n\n@param step the step",
"123.2.3.4 is 4.3.2.123.in-addr.arpa.",
"Call rollback on the underlying connection.",
"Notifies that an existing footer item is moved to another position.\n\n@param fromPosition the original position.\n@param toPosition the new position.",
"Creates the event for endpoint with specific type.\n\n@param endpoint the endpoint\n@param type the type\n@return the event"
] |
private void readCalendars()
{
Table cal = m_tables.get("CAL");
for (MapRow row : cal)
{
ProjectCalendar calendar = m_projectFile.addCalendar();
m_calendarMap.put(row.getInteger("CALENDAR_ID"), calendar);
Integer[] days =
{
row.getInteger("SUNDAY_HOURS"),
row.getInteger("MONDAY_HOURS"),
row.getInteger("TUESDAY_HOURS"),
row.getInteger("WEDNESDAY_HOURS"),
row.getInteger("THURSDAY_HOURS"),
row.getInteger("FRIDAY_HOURS"),
row.getInteger("SATURDAY_HOURS")
};
calendar.setName(row.getString("NAME"));
readHours(calendar, Day.SUNDAY, days[0]);
readHours(calendar, Day.MONDAY, days[1]);
readHours(calendar, Day.TUESDAY, days[2]);
readHours(calendar, Day.WEDNESDAY, days[3]);
readHours(calendar, Day.THURSDAY, days[4]);
readHours(calendar, Day.FRIDAY, days[5]);
readHours(calendar, Day.SATURDAY, days[6]);
int workingDaysPerWeek = 0;
for (Day day : Day.values())
{
if (calendar.isWorkingDay(day))
{
++workingDaysPerWeek;
}
}
Integer workingHours = null;
for (int index = 0; index < 7; index++)
{
if (days[index].intValue() != 0)
{
workingHours = days[index];
break;
}
}
if (workingHours != null)
{
int workingHoursPerDay = countHours(workingHours);
int minutesPerDay = workingHoursPerDay * 60;
int minutesPerWeek = minutesPerDay * workingDaysPerWeek;
int minutesPerMonth = 4 * minutesPerWeek;
int minutesPerYear = 52 * minutesPerWeek;
calendar.setMinutesPerDay(Integer.valueOf(minutesPerDay));
calendar.setMinutesPerWeek(Integer.valueOf(minutesPerWeek));
calendar.setMinutesPerMonth(Integer.valueOf(minutesPerMonth));
calendar.setMinutesPerYear(Integer.valueOf(minutesPerYear));
}
}
} | [
"Read project calendars."
] | [
"Sets the specified date attribute to the specified value.\n\n@param name name of the attribute\n@param value value of the attribute\n@since 1.9.0",
"returns whether masking with the given mask results in a valid contiguous range for this segment,\nand if it does, if it matches the range obtained when masking the given values with the same mask.\n\n@param lowerValue\n@param upperValue\n@param mask\n@return",
"Returns the default privacy level preference for the user.\n\n@see com.flickr4java.flickr.Flickr#PRIVACY_LEVEL_NO_FILTER\n@see com.flickr4java.flickr.Flickr#PRIVACY_LEVEL_PUBLIC\n@see com.flickr4java.flickr.Flickr#PRIVACY_LEVEL_FRIENDS\n@see com.flickr4java.flickr.Flickr#PRIVACY_LEVEL_FRIENDS_FAMILY\n@see com.flickr4java.flickr.Flickr#PRIVACY_LEVEL_FAMILY\n@see com.flickr4java.flickr.Flickr#PRIVACY_LEVEL_FRIENDS\n@throws FlickrException\n@return privacyLevel",
"Creates a polling state.\n\n@param response the response from Retrofit REST call that initiate the long running operation.\n@param lroOptions long running operation options.\n@param defaultRetryTimeout the long running operation retry timeout.\n@param resourceType the type of the resource the long running operation returns\n@param serializerAdapter the adapter for the Jackson object mapper\n@param <T> the result type\n@return the polling state\n@throws IOException thrown by deserialization",
"Convert Day instance to MPX day index.\n\n@param day Day instance\n@return day index",
"Get CorrelationId from message.\n\n@param message the message\n@return correlationId or null if not set",
"Returns an array with the width of the longest word per column calculated from the given table.\nDefault padding will be added per column.\nPadding for individual columns will be added if defined.\n@param rows the table rows for calculations\n@param colNumbers number of columns in the table\n@return array with width of longest word for each column, null if input table was null",
"Get top deployment unit.\n\n@param unit the current deployment unit\n@return top deployment unit",
"Registers annotations which will be considered as bean defining annotations.\n\nNOTE - If used along with {@code <trim/>} bean archives and/or with Weld configuration key\n{@code org.jboss.weld.bootstrap.vetoTypesWithoutBeanDefiningAnnotation}, these annotations will be ignored.\n\n@param annotations annotations which will be considered as Bean Defining Annotations.\n@return self"
] |
private static String getHostname() {
if (Hostname == null) {
try {
Hostname = InetAddress.getLocalHost().getHostName();
} catch (Exception e) {
Hostname = "default";
LOGGER.warn("Can not get current hostname", e);
}
}
return Hostname;
} | [
"Save current hostname and reuse it.\n\n@return hostname as String"
] | [
"Returns the response error stream, handling the case when it contains gzipped data.\n@return gzip decoded (if needed) error stream or null",
"Convert an Object to a Time.",
"Use this API to fetch all the bridgetable resources that are configured on netscaler.",
"Computes the WordNet 2.0 POS tag corresponding to the PTB POS tag s.\n\n@param s a Penn TreeBank POS tag.",
"Creates a Sink Processor\n\n@param dataSink the data sink itself\n@param parallelism the parallelism of this processor\n@param description the description for this processor\n@param taskConf the configuration for this processor\n@param system actor system\n@return the new created sink processor",
"Add a raw statement as part of the where that can be anything that the database supports. Using more structured\nmethods is recommended but this gives more control over the query and allows you to utilize database specific\nfeatures.\n\n@param rawStatement\nThe statement that we should insert into the WHERE.\n\n@param args\nOptional arguments that correspond to any ? specified in the rawStatement. Each of the arguments must\nhave either the corresponding columnName or the sql-type set. <b>WARNING,</b> you cannot use the\n{@code SelectArg(\"columnName\")} constructor since that sets the _value_, not the name. Use\n{@code new SelectArg(\"column-name\", null);}.",
"Create a new entry in the database from an object.",
"1-D Forward Discrete Cosine Transform.\n\n@param data Data.",
"Sinc function.\n\n@param x Value.\n@return Sinc of the value."
] |
private ImmutableList<Element> getNodeListForTagElement(Document dom,
CrawlElement crawlElement,
EventableConditionChecker eventableConditionChecker) {
Builder<Element> result = ImmutableList.builder();
if (crawlElement.getTagName() == null) {
return result.build();
}
EventableCondition eventableCondition =
eventableConditionChecker.getEventableCondition(crawlElement.getId());
// TODO Stefan; this part of the code should be re-factored, Hack-ed it this way to prevent
// performance problems.
ImmutableList<String> expressions = getFullXpathForGivenXpath(dom, eventableCondition);
NodeList nodeList = dom.getElementsByTagName(crawlElement.getTagName());
for (int k = 0; k < nodeList.getLength(); k++) {
Element element = (Element) nodeList.item(k);
boolean matchesXpath =
elementMatchesXpath(eventableConditionChecker, eventableCondition,
expressions, element);
LOG.debug("Element {} matches Xpath={}", DomUtils.getElementString(element),
matchesXpath);
/*
* TODO Stefan This is a possible Thread-Interleaving problem, as / isChecked can return
* false and when needed to add it can return true. / check if element is a candidate
*/
String id = element.getNodeName() + ": " + DomUtils.getAllElementAttributes(element);
if (matchesXpath && !checkedElements.isChecked(id)
&& !isExcluded(dom, element, eventableConditionChecker)) {
addElement(element, result, crawlElement);
} else {
LOG.debug("Element {} was not added", element);
}
}
return result.build();
} | [
"Returns a list of Elements form the DOM tree, matching the tag element."
] | [
"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",
"Merge the contents of the given plugin.xml into this one.",
"Iterates through the given InputStream line by line using the specified\nencoding, splitting each line using the given separator. The list of tokens\nfor each line is then passed to the given closure. Finally, the stream\nis closed.\n\n@param stream an InputStream\n@param regex the delimiting regular expression\n@param charset opens the stream with a specified charset\n@param closure a closure\n@return the last value returned by the closure\n@throws IOException if an IOException occurs.\n@throws java.util.regex.PatternSyntaxException\nif the regular expression's syntax is invalid\n@see #splitEachLine(java.io.Reader, java.lang.String, groovy.lang.Closure)\n@since 1.5.5",
"Retrieves the named calendar. This method will return\nnull if the named calendar is not located.\n\n@param calendarName name of the required calendar\n@return ProjectCalendar instance",
"Connect and register at the remote domain controller.\n\n@return connection the established connection\n@throws IOException",
"This method is used to process an MPP8 file. This is the file format\nused by Project 98.\n\n@param reader parent file reader\n@param file Parent MPX file\n@param root Root of the POI file system.\n@throws MPXJException\n@throws IOException",
"Update list of sorted services by copying it from the array and making it unmodifiable.",
"return a prepared Select Statement for the given ClassDescriptor",
"Destroys an instance of the bean\n\n@param instance The instance"
] |
private Variable createVariableInferred(TokenList.Token t0, Variable variableRight) {
Variable result;
if( t0.getType() == Type.WORD ) {
switch( variableRight.getType()) {
case MATRIX:
alias(new DMatrixRMaj(1,1),t0.getWord());
break;
case SCALAR:
if( variableRight instanceof VariableInteger) {
alias(0,t0.getWord());
} else {
alias(1.0,t0.getWord());
}
break;
case INTEGER_SEQUENCE:
alias((IntegerSequence)null,t0.getWord());
break;
default:
throw new RuntimeException("Type not supported for assignment: "+variableRight.getType());
}
result = variables.get(t0.getWord());
} else {
result = t0.getVariable();
}
return result;
} | [
"Infer the type of and create a new output variable using the results from the right side of the equation.\nIf the type is already known just return that."
] | [
"adds a FIELDDESCRIPTOR to this ClassDescriptor.\n@param fld",
"Collect the URIs of resources, that are referenced by the given description.\n@return the list of referenced URIs. Never <code>null</code>.",
"Straight conversion from an ObjectName to a PathAddress.\n\nThere may not necessarily be a Resource at this path address (if that correspond to a pattern) but it must\nmatch a model in the registry.\n\n@param domain the name of the caller's JMX domain\n@param registry the root resource for the management model\n@param name the ObjectName to convert\n\n@return the PathAddress, or {@code null} if no address matches the object name",
"Given a protobuf rebalance-partition info, converts it into our\nrebalance-partition info\n\n@param rebalanceTaskInfoMap Proto-buff version of\nRebalanceTaskInfoMap\n@return RebalanceTaskInfo object.",
"Notifies that multiple footer items are removed.\n\n@param positionStart the position.\n@param itemCount the item count.",
"Get the element at the index as a json object.\n\n@param i the index of the object to access",
"Matches the styles and adjusts the size. This needs to be\ncalled after the input is added to the DOM, so we do it in\nonLoad.",
"We have a directory. Determine if this contains a multi-file database we understand, if so\nprocess it. If it does not contain a database, test each file within the directory\nstructure to determine if it contains a file whose format we understand.\n\n@param directory directory to process\n@return ProjectFile instance if we can process anything, or null",
"Interim and final clusters ought to have same partition counts, same\nzones, and same node state. Partitions per node may of course differ.\n\n@param interimCluster\n@param finalCluster"
] |
public Collection<Group> getGroups() throws FlickrException {
GroupList<Group> groups = new GroupList<Group>();
Map<String, Object> parameters = new HashMap<String, Object>();
parameters.put("method", METHOD_GET_GROUPS);
Response response = transport.get(transport.getPath(), parameters, apiKey, sharedSecret);
if (response.isError()) {
throw new FlickrException(response.getErrorCode(), response.getErrorMessage());
}
Element groupsElement = response.getPayload();
groups.setPage(groupsElement.getAttribute("page"));
groups.setPages(groupsElement.getAttribute("pages"));
groups.setPerPage(groupsElement.getAttribute("perpage"));
groups.setTotal(groupsElement.getAttribute("total"));
NodeList groupNodes = groupsElement.getElementsByTagName("group");
for (int i = 0; i < groupNodes.getLength(); i++) {
Element groupElement = (Element) groupNodes.item(i);
Group group = new Group();
group.setId(groupElement.getAttribute("id"));
group.setName(groupElement.getAttribute("name"));
group.setAdmin("1".equals(groupElement.getAttribute("admin")));
group.setPrivacy(groupElement.getAttribute("privacy"));
group.setIconServer(groupElement.getAttribute("iconserver"));
group.setIconFarm(groupElement.getAttribute("iconfarm"));
group.setPhotoCount(groupElement.getAttribute("photos"));
groups.add(group);
}
return groups;
} | [
"Get a collection of all of the user's groups.\n\n@return A Collection of Group objects\n@throws FlickrException"
] | [
"Populate the properties indicating the source of this schedule.\n\n@param properties project properties",
"File URLs whose protocol are in these list will be processed as jars\ncontaining classes\n\n@param fileProtocols\nComma separated list of file protocols that will be considered\nas jar files and scanned",
"Constructs a valid request and passes it on to the next handler. It also\ncreates the 'Store' object corresponding to the store name specified in\nthe REST request.\n\n@param requestValidator The Validator object used to construct the\nrequest object\n@param ctx Context of the Netty channel\n@param messageEvent Message Event used to write the response / exception",
"Returns a map of all variables in scope.\n@return map of all variables in scope.",
"Return collection of path Ids in priority order\n\n@param profileId ID of profile\n@return collection of path Ids in priority order",
"Reads next frame image.",
"package scope in order to test the method",
"Checks constraints on this model.\n\n@param checkLevel The amount of checks to perform\n@throws ConstraintException If a constraint has been violated",
"Builder method for specifying the stack an app should be created on.\n@param stack Stack to create the app on.\n@return A copy of the {@link App}"
] |
private String getPropertyValue(String level, String name)
{
return getDefForLevel(level).getProperty(name);
} | [
"Returns the value of the indicated property of the current object on the specified level.\n\n@param level The level\n@param name The name of the property\n@return The property value"
] | [
"converts Map of data to json string\n\n@param data map data to converted to json\n@return {@link String}",
"Prepares a representation of the model that is easier accessible for our purposes.\n\n@param model The original model\n@return The model representation",
"Determines the field via reflection look-up.\n\n@param clazz The java class to search in\n@param fieldName The field's name\n@return The field object or <code>null</code> if no matching field was found",
"Locks the bundle descriptor.\n@throws CmsException thrown if locking fails.",
"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",
"Replies the elements of the given map except the pairs with the given keys.\n\n<p>\nThe replied map is a view on the given map. It means that any change\nin the original map is reflected to the result of this operation.\n</p>\n\n@param <K> type of the map keys.\n@param <V> type of the map values.\n@param map the map to update.\n@param keys the keys of the pairs to remove.\n@return the map with the content of the map except the pairs.\n@since 2.15",
"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",
"Method to send Request messages to a specific df_service\n\n@param df_service\nThe name of the df_service\n@param msgContent\nThe content of the message to be sent\n@return Message sent to + the name of the df_service",
"Extract calendar data."
] |
public void wireSteps( CanWire canWire ) {
for( StageState steps : stages.values() ) {
canWire.wire( steps.instance );
}
} | [
"Used for DI frameworks to inject values into stages."
] | [
"Lock the given region. Does not report failures.",
"Run the OnInvariantViolation plugins when an Invariant is violated. Invariant are checked\nwhen the state machine is updated that is when the dom is changed after a click on a\nclickable. When a invariant fails this kind of plugins are executed. Warning the session is\nnot a clone, changing the session can cause strange behaviour of Crawljax.\n\n@param invariant the failed invariants\n@param context the current {@link CrawlerContext} for this crawler.",
"Look up record by identity.",
"Get the first non-white Y point\n@param img Image in memory\n@return the trimmed y start",
"Term value.\n\n@param term\nthe term\n@return the string",
"Builder method for specifying the name of an app.\n@param name The name to give an app.\n@return A copy of the {@link App}",
"Adds a new Token to the end of the linked list",
"Convert from an internal Spring bean definition to a DTO.\n\n@param beanDefinition The internal Spring bean definition.\n@return Returns a DTO representation.",
"Returns string content of blob identified by specified blob handle. String contents cache is used.\n\n@param blobHandle blob handle\n@param txn {@linkplain Transaction} instance\n@return string content of blob identified by specified blob handle\n@throws IOException if something went wrong"
] |
@VisibleForTesting
protected static String createLabelText(
final DistanceUnit scaleUnit, final double value, final DistanceUnit intervalUnit) {
double scaledValue = scaleUnit.convertTo(value, intervalUnit);
// assume that there is no interval smaller then 0.0001
scaledValue = Math.round(scaledValue * 10000) / 10000;
String decimals = Double.toString(scaledValue).split("\\.")[1];
if (Double.valueOf(decimals) == 0) {
return Long.toString(Math.round(scaledValue));
} else {
return Double.toString(scaledValue);
}
} | [
"Format the label text.\n\n@param scaleUnit The unit used for the scalebar.\n@param value The scale value.\n@param intervalUnit The scaled unit for the intervals."
] | [
"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",
"Returns a \"clean\" version of the given filename in which spaces have\nbeen converted to dashes and all non-alphanumeric chars are underscores.",
"Checks each available roll strategy in turn, starting at the per-minute\nstrategy, next per-hour, and so on for increasing units of time until a\nmatch is found. If no match is found, the error strategy is returned.\n\n@param properties\n@return The appropriate roll strategy.",
"Execute all recorded tasks.\n\n@param context the patch context\n@param callback the finalization callback\n@throws Exception",
"Iterate and insert each of the elements of the Collection.\n\n@param objects\nThe objects to insert\n@param outIdentifier\nIdentifier to lookup the returned objects\n@param returnObject\nboolean to specify whether the inserted Collection is part of the ExecutionResults\n@param entryPoint\nOptional EntryPoint for the insertions\n@return",
"LRN cross-channel forward computation. Double parameters cast to tensor data type",
"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",
"prefetch defined relationships requires JDBC level 2.0, does not work\nwith Arrays",
"Returns the ARGB components for all pixels in this image\n\n@return an array containing an array for each ARGB components in that order."
] |
@Override
public void close() {
if (closed)
return;
closed = true;
tcpSocketConsumer.prepareToShutdown();
if (shouldSendCloseMessage)
eventLoop.addHandler(new EventHandler() {
@Override
public boolean action() throws InvalidEventHandlerException {
try {
TcpChannelHub.this.sendCloseMessage();
tcpSocketConsumer.stop();
closed = true;
if (LOG.isDebugEnabled())
Jvm.debug().on(getClass(), "closing connection to " + socketAddressSupplier);
while (clientChannel != null) {
if (LOG.isDebugEnabled())
Jvm.debug().on(getClass(), "waiting for disconnect to " + socketAddressSupplier);
}
} catch (ConnectionDroppedException e) {
throw new InvalidEventHandlerException(e);
}
// we just want this to run once
throw new InvalidEventHandlerException();
}
@NotNull
@Override
public String toString() {
return TcpChannelHub.class.getSimpleName() + "..close()";
}
});
} | [
"called when we are completed finished with using the TcpChannelHub"
] | [
"Change the currentState to the nextState if possible. The next state should already be\npresent in the graph.\n\n@param nextState the next state.\n@return true if currentState is successfully changed.",
"selects either a synchronous or an asynchronous producer, for the\nspecified broker id and calls the send API on the selected producer\nto publish the data to the specified broker partition\n\n@param ppd the producer pool request object",
"Initializes the editor states for the different modes, depending on the type of the opened file.",
"Adds a value to the list if does not already exists.\n\n@param list the list\n@param value value to add if not exists in the list",
"Print an accrue type.\n\n@param value AccrueType instance\n@return accrue type value",
"Delete the first n items from the list\n\n@param newStart the logsegment who's index smaller than newStart will be deleted.\n@return the deleted segment",
"Use this API to fetch the statistics of all authenticationvserver_stats resources that are configured on netscaler.",
"Look-up the results data for a particular test class.",
"Sets the color of the drop shadow.\n\n@param color The color of the drop shadow."
] |
private String extractNumericVersion(Collection<String> versionStrings) {
if (versionStrings == null) {
return "";
}
for (String value : versionStrings) {
String releaseValue = calculateReleaseVersion(value);
if (!releaseValue.equals(value)) {
return releaseValue;
}
}
return "";
} | [
"Try to extract a numeric version from a collection of strings.\n\n@param versionStrings Collection of string properties.\n@return The version string if exists in the collection."
] | [
"Return the list of module that uses the targeted artifact\n\n@param gavc String\n@param filters FiltersHolder\n@return List<DbModule>",
"Returns the docker version.\n\n@param serverUrl\nThe serverUrl to use.",
"Parse an extended attribute boolean value.\n\n@param value string representation\n@return boolean value",
"Get list of asynchronous operations on this node. By default, only the\npending operations are returned.\n\n@param showCompleted Show completed operations\n@return A list of operation ids.",
"Creates a random symmetric matrix. The entire matrix will be filled in, not just a triangular\nportion.\n\n@param N Number of rows and columns\n@param nz_total Number of nonzero elements in the triangular portion of the matrix\n@param min Minimum element value, inclusive\n@param max Maximum element value, inclusive\n@param rand Random number generator\n@return Randomly generated matrix",
"Create a new linear interpolated time discrete process by\nusing the time discretization of this process and the sum of this process and the given one\nas its values.\n\n@param process A given process.\n@return A new process representing the of this and the given process.\n@throws CalculationException Thrown if the given process fails to evaluate at a certain time point.",
"Removes any child object that has the given name by performing\ncase-sensitive search.\n\n@param name name of scene object to be removed.\n\n@return number of removed objects, 0 if none was found.",
"Search for the attribute \"id\" and return the value.\n\n@return the id of this element or null when not found",
"Decode the password from the given data. Will decode the data block as well.\n\n@param data encrypted data block\n@param encryptionCode encryption code\n\n@return password"
] |
public static String getURLParentDirectory(String urlString) throws IllegalArgumentException {
URL url = null;
try {
url = new URL(urlString);
} catch (MalformedURLException e) {
throw Exceptions.IllegalArgument("Malformed URL: %s", url);
}
String path = url.getPath();
int lastSlashIndex = path.lastIndexOf("/");
String directory = lastSlashIndex == -1 ? "" : path.substring(0, lastSlashIndex);
return String.format("%s://%s%s%s%s", url.getProtocol(),
url.getUserInfo() == null ? "" : url.getUserInfo() + "@",
url.getHost(),
url.getPort() == -1 ? "" : ":" + Integer.toString(url.getPort()),
directory);
} | [
"Returns the directory of the URL.\n\n@param urlString URL of the file.\n@return The directory string.\n@throws IllegalArgumentException if URL is malformed"
] | [
"Initialize the metadata cache with system store list",
"Given an array of variable names, returns a JsonObject\nof values.\n\n@param dataMap an map containing variable names and their corresponding values\nnames.\n@return a json object of values",
"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.",
"The click handler for the add button.",
"Assign float value within allowed range of [0,infinity) to initializeOnly SFFloat field named spacing.\n@param newValue",
"Use this API to restore appfwprofile resources.",
"Close it and ignore any exceptions.",
"Override this method to change the default splash screen size or\nposition.\n\nThis method will be called <em>before</em> {@link #onInit(GVRContext)\nonInit()} and before the normal render pipeline starts up. In particular,\nthis means that any {@linkplain GVRAnimation animations} will not start\nuntil the first {@link #onStep()} and normal rendering starts.\n\n@param splashScreen\nThe splash object created from\n{@link #getSplashTexture(GVRContext)},\n{@link #getSplashMesh(GVRContext)}, and\n{@link #getSplashShader(GVRContext)}.\n\n@since 1.6.4",
"This method is called if the data set has been scrolled."
] |
public double[][] getU() {
double[][] X = new double[n][n];
double[][] U = X;
for (int i = 0; i < n; i++) {
for (int j = 0; j < n; j++) {
if (i <= j) {
U[i][j] = LU[i][j];
} else {
U[i][j] = 0.0;
}
}
}
return X;
} | [
"Get the Upper triangular factor.\n\n@return U."
] | [
"Internal utility to help JNI add hit objects to the pick list. Specifically for MeshColliders with picking\nfor UV, Barycentric, and normal coordinates enabled",
"Create the index and associate it with all project models in the Application",
"Writes the entire remaining contents of the buffer to the channel. May complete in one operation, but the\ndocumentation is vague, so this keeps going until we are sure.\n\n@param buffer the data to be written\n@param channel the channel to which we want to write data\n\n@throws IOException if there is a problem writing to the channel",
"Start timing an operation with the given identifier.",
"Retrieves the project finish date. If an explicit finish date has not been\nset, this method calculates the finish date by looking for\nthe latest task finish date.\n\n@return Finish Date",
"Read the name of a table and prepare to populate it with column data.\n\n@param startIndex start of the block\n@param blockLength length of the block",
"Configure properties needed to connect to a Fluo application\n\n@param conf Job configuration\n@param config use {@link FluoConfiguration} to configure programmatically",
"This method retrieves a double of the specified type,\nbelonging to the item with the specified unique ID.\n\n@param id unique ID of entity to which this data belongs\n@param type data type identifier\n@return required double data",
"Utility method used to convert a Number into a BigInteger.\n\n@param value Number instance\n@return BigInteger instance"
] |
void sendError(HttpResponseStatus status, Throwable ex) {
String msg;
if (ex instanceof InvocationTargetException) {
msg = String.format("Exception Encountered while processing request : %s", ex.getCause().getMessage());
} else {
msg = String.format("Exception Encountered while processing request: %s", ex.getMessage());
}
// Send the status and message, followed by closing of the connection.
responder.sendString(status, msg, new DefaultHttpHeaders().set(HttpHeaderNames.CONNECTION, HttpHeaderValues.CLOSE));
if (bodyConsumer != null) {
bodyConsumerError(ex);
}
} | [
"Sends the error to responder."
] | [
"Calculates all dates of the series.\n@return all dates of the series in milliseconds.",
"Generates a toString method using concatenation or a StringBuilder.",
"Pop the record number from the front of the list, and parse it to ensure that\nit is a valid integer.\n\n@param list MPX record",
"Serializes descriptor instance to XML\n@param descriptor descriptor to be serialized\n@return xml representation of descriptor as string",
"Retrieve list of resource extended attributes.\n\n@return list of extended attributes",
"Add a clause where the ID is equal to the argument.",
"Used by Pipeline jobs only",
"123.2.3.4 is 4.3.2.123.in-addr.arpa.",
"Retrieves the members of the given type.\n\n@param memberNames Will receive the names of the members (for sorting)\n@param members Will receive the members\n@param type The type to process\n@param tagName An optional tag for filtering the types\n@param paramName The feature to be added to the Members attribute\n@param paramValue The feature to be added to the Members attribute\n@throws XDocletException If an error occurs"
] |
public int compareTo(InternalFeature o) {
if (null == o) {
return -1; // avoid NPE, put null objects at the end
}
if (null != styleDefinition && null != o.getStyleInfo()) {
if (styleDefinition.getIndex() > o.getStyleInfo().getIndex()) {
return 1;
}
if (styleDefinition.getIndex() < o.getStyleInfo().getIndex()) {
return -1;
}
}
return 0;
} | [
"This function compares style ID's between features. Features are usually sorted by style."
] | [
"Add a dependency to the graph\n\n@param dependency\n@param graph\n@param depth\n@param parentId",
"Use this API to enable the feature on Netscaler.\n@param feature feature to be enabled.\n@return status of the operation performed.\n@throws Exception Nitro exception.",
"Draw a rounded rectangular boundary.\n\n@param rect rectangle\n@param color colour\n@param linewidth line width\n@param r radius for rounded corners",
"Adjusts the day in the provided month, that it fits the specified week day.\nIf there's no match for that provided month, the next possible month is checked.\n\n@param date the date to adjust, with the correct year and month already set.",
"Remember the order of execution",
"Returns the entry associated with the given key.\n\n@param key the key of the entry to look up\n@return the entry associated with that key, or null\nif the key is not in this map",
"Registers add operation\n\n@param registration resource on which to register\n@param handler operation handler to register\n@param flags with flags\n@deprecated use {@link #registerAddOperation(org.jboss.as.controller.registry.ManagementResourceRegistration, AbstractAddStepHandler, org.jboss.as.controller.registry.OperationEntry.Flag...)}",
"Given a filesystem, path and buffer-size, read the file contents and\npresents it as a string\n\n@param fs Underlying filesystem\n@param path The file to read\n@param bufferSize The buffer size to use for reading\n@return The contents of the file as a string\n@throws IOException",
"Iterates through the given CharSequence line by line, splitting each line using\nthe given separator Pattern. The list of tokens for each line is then passed to\nthe given closure.\n\n@param self a CharSequence\n@param pattern the regular expression Pattern for the delimiter\n@param closure a closure\n@return the last value returned by the closure\n@throws java.io.IOException if an error occurs\n@since 1.8.2"
] |
public static boolean checkConfiguredInModules() {
Boolean result = m_moduleCheckCache.get();
if (result == null) {
result = Boolean.valueOf(getConfiguredTemplateMapping() != null);
m_moduleCheckCache.set(result);
}
return result.booleanValue();
} | [
"Checks if template mapper is configured in modules.\n\n@return true if the template mapper is configured in modules"
] | [
"Use this API to fetch appfwwsdl resource of given name .",
"Print a constraint type.\n\n@param value ConstraintType instance\n@return constraint type value",
"Str map to str.\n\n@param map\nthe map\n@return the string",
"generates a Meta Object Protocol method, that is used to call a non public\nmethod, or to make a call to super.\n\n@param mopCalls list of methods a mop call method should be generated for\n@param useThis true if \"this\" should be used for the naming",
"Returns an iterable containing the items in this folder sorted by name and direction.\n@param sort the field to sort by, can be set as `name`, `id`, and `date`.\n@param direction the direction to display the item results.\n@param fields the fields to retrieve.\n@return an iterable containing the items in this folder.",
"Returns timezone offset from a session instance. The offset is\nin minutes to UTC time\n\n@param session\nthe session instance\n@return the offset to UTC time in minutes",
"Sets the replace var map to single target.\n\n@param replacementVarMapList\nthe replacement var map list\n@param uniformTargetHost\nthe uniform target host\n@return the parallel task builder",
"Given a string with method or package name, creates a Class Name with no\nspaces and first letter lower case\n\n@param String\n- The name of the scenario/story. It should be in lower case.\n@returns String - The class name",
"Closes the transactor node by removing its node in Zookeeper"
] |
private void checkBindings(EnhancedAnnotation<T> annotatedAnnotation) {
Set<Annotation> bindings = annotatedAnnotation.getMetaAnnotations(Qualifier.class);
if (bindings.size() > 0) {
for (Annotation annotation : bindings) {
if (!annotation.annotationType().equals(Named.class)) {
throw MetadataLogger.LOG.qualifierOnStereotype(annotatedAnnotation);
}
}
}
} | [
"Validates the binding types"
] | [
"Use this API to unset the properties of coparameter resource.\nProperties that need to be unset are specified in args array.",
"Decomposes the matrix using the QR algorithm. Care was taken to minimize unnecessary memory copying\nand cache skipping.\n\n@param orig The matrix which is being decomposed. Not modified.\n@return true if it decomposed the matrix or false if an error was detected. This will not catch all errors.",
"Return the number of entries in the cue list that represent hot cues.\n\n@return the number of cue list entries that are hot cues",
"2-D Double array to integer array.\n\n@param array Double array.\n@return Integer array.",
"Obtains a Coptic zoned date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the Coptic zoned date-time, not null\n@throws DateTimeException if unable to create the date-time",
"Adds the given reference to the list of references that should still be\nserialized, and returns the RDF resource that will be used as a subject.\n\n@param reference\nthe reference to be serialized\n@return RDF resource that represents this reference",
"get the last segment at the moment\n\n@return the last segment",
"Returns the compact task records for all tasks with the given tag.\nTasks can have more than one tag at a time.\n\n@param tag The tag to fetch tasks from.\n@return Request object",
"Called whenever a rebalance task completes. This means one task is done\nand some number of partition stores have been migrated.\n\n@param taskId\n@param partitionStoresMigrated Number of partition stores moved by this\ncompleted task."
] |
public <TYPE> TYPE get(String key, Class<TYPE> type) {
return cache.get(key, type);
} | [
"Get the spatial object from the cache.\n\n@param key key to get object for\n@param type type of object which should be returned\n@return object for key or null if object does not exist or is a different type"
] | [
"Read task data from a PEP file.",
"Extract predecessor data.",
"Return true if this rule should be applied for the specified ClassNode, based on the\nconfiguration of this rule.\n@param classNode - the ClassNode\n@return true if this rule should be applied for the specified ClassNode",
"Use this API to update clusterinstance resources.",
"Add a clause where the ID is from an existing object.",
"Creates a timespan from a list of other timespans.\n\n@return a timespan representing the sum of all the timespans provided",
"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 sql statement used in this prepared statement together with the parameters.\n@param sql base sql statement\n@param logParams parameters to print out\n@return returns printable statement",
"Sets the value of the given variable\n\n@param name the name of the variable to set\n@param value the new value for the given variable"
] |
void buildControl(BinaryPackageControlFile packageControlFile, File[] controlFiles, List<String> conffiles, StringBuilder checksums, File output) throws IOException, ParseException {
final File dir = output.getParentFile();
if (dir != null && (!dir.exists() || !dir.isDirectory())) {
throw new IOException("Cannot write control file at '" + output.getAbsolutePath() + "'");
}
final TarArchiveOutputStream outputStream = new TarArchiveOutputStream(new GZIPOutputStream(new FileOutputStream(output)));
outputStream.setLongFileMode(TarArchiveOutputStream.LONGFILE_GNU);
boolean foundConffiles = false;
// create the final package control file out of the "control" file, copy all other files, ignore the directories
for (File file : controlFiles) {
if (file.isDirectory()) {
// warn about the misplaced directory, except for directories ignored by default (.svn, cvs, etc)
if (!isDefaultExcludes(file)) {
console.warn("Found directory '" + file + "' in the control directory. Maybe you are pointing to wrong dir?");
}
continue;
}
if ("conffiles".equals(file.getName())) {
foundConffiles = true;
}
if (CONFIGURATION_FILENAMES.contains(file.getName()) || MAINTAINER_SCRIPTS.contains(file.getName())) {
FilteredFile configurationFile = new FilteredFile(new FileInputStream(file), resolver);
configurationFile.setOpenToken(openReplaceToken);
configurationFile.setCloseToken(closeReplaceToken);
addControlEntry(file.getName(), configurationFile.toString(), outputStream);
} else if (!"control".equals(file.getName())) {
// initialize the information stream to guess the type of the file
InformationInputStream infoStream = new InformationInputStream(new FileInputStream(file));
Utils.copy(infoStream, NullOutputStream.NULL_OUTPUT_STREAM);
infoStream.close();
// fix line endings for shell scripts
InputStream in = new FileInputStream(file);
if (infoStream.isShell() && !infoStream.hasUnixLineEndings()) {
byte[] buf = Utils.toUnixLineEndings(in);
in = new ByteArrayInputStream(buf);
}
addControlEntry(file.getName(), IOUtils.toString(in), outputStream);
in.close();
}
}
if (foundConffiles) {
console.info("Found file 'conffiles' in the control directory. Skipping conffiles generation.");
} else if ((conffiles != null) && (conffiles.size() > 0)) {
addControlEntry("conffiles", createPackageConffilesFile(conffiles), outputStream);
} else {
console.info("Skipping 'conffiles' generation. No entries defined in maven/pom or ant/build.xml.");
}
if (packageControlFile == null) {
throw new FileNotFoundException("No 'control' file found in " + controlFiles.toString());
}
addControlEntry("control", packageControlFile.toString(), outputStream);
addControlEntry("md5sums", checksums.toString(), outputStream);
outputStream.close();
} | [
"Build control archive of the deb\n\n@param packageControlFile the package control file\n@param controlFiles the other control information files (maintainer scripts, etc)\n@param dataSize the size of the installed package\n@param checksums the md5 checksums of the files in the data archive\n@param output\n@return\n@throws java.io.FileNotFoundException\n@throws java.io.IOException\n@throws java.text.ParseException"
] | [
"Prepare the baseURL to make a request.\n\n@param matrixId matrixId\n@param row row\n@param col cold\n@param layerParam layerParam",
"Decodes stream data based on content encoding\n@param contentEncoding\n@param bytes\n@return String representing the stream data",
"Read the set of property files. Keys and Values are automatically validated and converted.\n\n@param resourceLoader\n@return all the properties from the weld.properties file",
"Use this API to delete dnstxtrec.",
"Get the waveform previews available for all tracks currently loaded in any player, either on the play deck, or\nin a hot cue.\n\n@return the previews associated with all current players, including for any tracks loaded in their hot cue slots\n\n@throws IllegalStateException if the WaveformFinder is not running",
"Used to add working hours to the calendar. Note that the MPX file\ndefinition allows a maximum of 7 calendar hours records to be added to\na single calendar.\n\n@param day day number\n@return new ProjectCalendarHours instance",
"Determine the enum value corresponding to the third play state found in the packet.\n\n@return the proper value",
"Add \"GROUP BY\" clause to the SQL query statement. This can be called multiple times to add additional \"GROUP BY\"\nclauses.\n\n<p>\nNOTE: Use of this means that the resulting objects may not have a valid ID column value so cannot be deleted or\nupdated.\n</p>",
"Notifies that a footer item is changed.\n\n@param position the position."
] |
private void readCalendars(Storepoint phoenixProject)
{
Calendars calendars = phoenixProject.getCalendars();
if (calendars != null)
{
for (Calendar calendar : calendars.getCalendar())
{
readCalendar(calendar);
}
ProjectCalendar defaultCalendar = m_projectFile.getCalendarByName(phoenixProject.getDefaultCalendar());
if (defaultCalendar != null)
{
m_projectFile.getProjectProperties().setDefaultCalendarName(defaultCalendar.getName());
}
}
} | [
"This method extracts calendar data from a Phoenix file.\n\n@param phoenixProject Root node of the Phoenix file"
] | [
"Closes all the producers in the pool",
"Get the auth URL, this is step two of authorization.\n\n@param oAuthRequestToken\nthe token from a {@link AuthInterface#getRequestToken} call.",
"Returns the first found autoincrement field\ndefined in this class descriptor. Use carefully\nwhen multiple autoincrement field were defined.\n@deprecated does not make sense because it's possible to\ndefine more than one autoincrement field. Alternative\nsee {@link #getAutoIncrementFields}",
"Saves the messages for all languages that were opened in the editor.\n\n@throws CmsException thrown if saving fails.",
"Renames the current base log file to the roll file name.\n\n@param from\nThe current base log file.\n@param to\nThe backup file.",
"Waits the given amount of time in seconds for a managed domain to start. A domain is considered started when each\nof the servers in the domain are started unless the server is disabled.\n\n@param client the client used to communicate with the server\n@param startupTimeout the time, in seconds, to wait for the server start\n\n@throws InterruptedException if interrupted while waiting for the server to start\n@throws RuntimeException if the process has died\n@throws TimeoutException if the timeout has been reached and the server is still not started",
"Parse work units.\n\n@param value work units value\n@return TimeUnit instance",
"Use this API to unset the properties of nsrpcnode resources.\nProperties that need to be unset are specified in args array.",
"Add a listener to be invoked when the checked button changes in this group.\n@param listener\n@param <T>\n@return"
] |
private void ensurePKsFromHierarchy(ClassDescriptorDef classDef) throws ConstraintException
{
SequencedHashMap pks = new SequencedHashMap();
for (Iterator it = classDef.getAllExtentClasses(); it.hasNext();)
{
ClassDescriptorDef subTypeDef = (ClassDescriptorDef)it.next();
ArrayList subPKs = subTypeDef.getPrimaryKeys();
// check against already present PKs
for (Iterator pkIt = subPKs.iterator(); pkIt.hasNext();)
{
FieldDescriptorDef fieldDef = (FieldDescriptorDef)pkIt.next();
FieldDescriptorDef foundPKDef = (FieldDescriptorDef)pks.get(fieldDef.getName());
if (foundPKDef != null)
{
if (!isEqual(fieldDef, foundPKDef))
{
throw new ConstraintException("Cannot pull up the declaration of the required primary key "+fieldDef.getName()+
" because its definitions in "+fieldDef.getOwner().getName()+" and "+
foundPKDef.getOwner().getName()+" differ");
}
}
else
{
pks.put(fieldDef.getName(), fieldDef);
}
}
}
ensureFields(classDef, pks.values());
} | [
"Gathers the pk fields from the hierarchy of the given class, and copies them into the class.\n\n@param classDef The root of the hierarchy\n@throws ConstraintException If there is a conflict between the pk fields"
] | [
"Add exceptions to the calendar.\n\n@param mpxjCalendar MPXJ calendar\n@param gpCalendar GanttProject calendar",
"Hide keyboard from phoneEdit field",
"Takes a date, and retrieves the next business day\n\n@param dateString the date\n@param onlyBusinessDays only business days\n@return a string containing the next business day",
"Get a timer of the given string name for the given thread. If no such\ntimer exists yet, then it will be newly created.\n\n@param timerName\nthe name of the timer\n@param todoFlags\n@param threadId\nof the thread to track, or 0 if only system clock should be\ntracked\n@return timer",
"Get a list of referring domains for a photo.\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 photoId\n(Optional) The id of the photo to get stats for. If not provided, stats for all photos 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.getPhotoDomains.html\"",
"Creates an immutable singleton instance.\n\n@param key\n@param value\n@return",
"Sets allowed values for attribute\n\n@param allowedValues values that are legal as part in this attribute\n@return a builder that can be used to continue building the attribute definition",
"Deletes the metadata on this folder associated with a specified scope and template.\n\n@param templateName the metadata template type name.\n@param scope the scope of the template (usually \"global\" or \"enterprise\").",
"Update database schema\n\n@param migrationPath path to migrations"
] |
public static double I0(double x) {
double ans;
double ax = Math.abs(x);
if (ax < 3.75) {
double y = x / 3.75;
y = y * y;
ans = 1.0 + y * (3.5156229 + y * (3.0899424 + y * (1.2067492
+ y * (0.2659732 + y * (0.360768e-1 + y * 0.45813e-2)))));
} else {
double y = 3.75 / ax;
ans = (Math.exp(ax) / Math.sqrt(ax)) * (0.39894228 + y * (0.1328592e-1
+ y * (0.225319e-2 + y * (-0.157565e-2 + y * (0.916281e-2
+ y * (-0.2057706e-1 + y * (0.2635537e-1 + y * (-0.1647633e-1
+ y * 0.392377e-2))))))));
}
return ans;
} | [
"Bessel function of the first kind, of order 0.\n\n@param x Value.\n@return I0 value."
] | [
"Mapping originator.\n\n@param originator the originator\n@return the originator type",
"Check for exceptions.\n\n@return the list",
"Add a column to be set to a value for UPDATE statements. This will generate something like columnName = 'value'\nwith the value escaped if necessary.",
"Add a new PropertyChangeListener to this node for a specific property.\nThis functionality has\nbeen borrowed from the java.beans package, though this class has\nnothing to do with a bean",
"Sets the request body to the contents of a String.\n\n<p>If the contents of the body are large, then it may be more efficient to use an {@link InputStream} instead of\na String. Using a String requires that the entire body be in memory before sending the request.</p>\n\n@param body a String containing the contents of the body.",
"Assigns this retention policy to a metadata template, optionally with certain field values.\n@param templateID the ID of the metadata template to apply to.\n@param fieldFilters optional field value filters.\n@return info about the created assignment.",
"Adds the task to the specified project, in the optional location\nspecified. If no location arguments are given, the task will be added to\nthe end of the project.\n\n`addProject` can also be used to reorder a task within a project or section that\nalready contains it.\n\nAt most one of `insert_before`, `insert_after`, or `section` should be\nspecified. Inserting into a section in an non-order-dependent way can be\ndone by specifying `section`, otherwise, to insert within a section in a\nparticular place, specify `insert_before` or `insert_after` and a task\nwithin the section to anchor the position of this task.\n\nReturns an empty data block.\n\n@param task The task to add to a project.\n@return Request object",
"Validates the wrapped value and returns a localized error message in case of invalid values.\n@return <code>null</code> if the value is valid, a suitable localized error message otherwise.",
"Create a mapping from entity names to entity ID values."
] |
protected byte[] getBytesInternal() {
byte cached[];
if(hasNoValueCache() || (cached = valueCache.lowerBytes) == null) {
valueCache.lowerBytes = cached = getBytesImpl(true);
}
return cached;
} | [
"gets the bytes, sharing the cached array and does not clone it"
] | [
"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",
"List the greetings in the specified guestbook.",
"Read task data from a Gantt Designer file.\n\n@param gantt Gantt Designer file",
"Overridden 'consume' method. Corresponding parent method will be called necessary number of times\n\n@param initialVars - a map containing the initial variables assignments\n@return the number of lines written",
"Gets an exception reporting an unexpected XML element.\n\n@param reader a reference to the stream reader.\n@return the constructed {@link javax.xml.stream.XMLStreamException}.",
"Detailed request to track additional data about PUT, GET and GET_ALL\n\n@param timeNS The time in nanoseconds that the operation took to complete\n@param numEmptyResponses For GET and GET_ALL, how many keys were no values found\n@param valueBytes Total number of bytes across all versions of values' bytes\n@param keyBytes Total number of bytes in the keys\n@param getAllAggregatedCount Total number of keys returned for getAll calls",
"Give an embedded association, creates all the nodes and relationships required to represent it.\nIt assumes that the entity node containing the association already exists in the db.\n\n@param executionEngine the {@link GraphDatabaseService} to run the query\n@param associationKey the {@link AssociationKey} identifying the association\n@param embeddedKey the {@link EntityKey} identifying the embedded component\n@return the created {@link Relationship} that represents the association",
"get the TypeArgSignature corresponding to given type\n\n@param type\n@return",
"Unloads the sound file for this source, if any."
] |
List<LogSegment> markDeletedWhile(LogSegmentFilter filter) throws IOException {
synchronized (lock) {
List<LogSegment> view = segments.getView();
List<LogSegment> deletable = new ArrayList<LogSegment>();
for (LogSegment seg : view) {
if (filter.filter(seg)) {
deletable.add(seg);
}
}
for (LogSegment seg : deletable) {
seg.setDeleted(true);
}
int numToDelete = deletable.size();
//
// if we are deleting everything, create a new empty segment
if (numToDelete == view.size()) {
if (view.get(numToDelete - 1).size() > 0) {
roll();
} else {
// If the last segment to be deleted is empty and we roll the log, the new segment will have the same
// file name. So simply reuse the last segment and reset the modified time.
view.get(numToDelete - 1).getFile().setLastModified(System.currentTimeMillis());
numToDelete -= 1;
}
}
return segments.trunc(numToDelete);
}
} | [
"Delete any log segments matching the given predicate function\n\n@throws IOException"
] | [
"Starts the compressor.",
"Check that the parameter array has exactly the right number of elements.\n\n@param parameterName\nThe name of the user-supplied parameter that we are validating\nso that the user can easily find the error in their code.\n@param actualLength\nThe actual array length\n@param expectedLength\nThe expected array length",
"Returns the field with the specified value properly formatted. Multiline\nvalues are automatically indented, and dots are added on the empty lines.\n\n<pre>\nField-Name: value\n</pre>",
"Runs a Story with the given configuration and steps.\n\n@param configuration the Configuration used to run story\n@param candidateSteps the List of CandidateSteps containing the candidate\nsteps methods\n@param story the Story to run\n@throws Throwable if failures occurred and FailureStrategy dictates it to\nbe re-thrown.",
"Checks whether the specified event name is restricted. If it is,\nthen create a pending error, and abort.\n\n@param name The event name\n@return Boolean indication whether the event name is restricted",
"Adds the dependencies typical for particular deployment types.\nThis is not accurate and doesn't cover the real needs of the project.\nBasically it's just to have \"something\" for the initial implementation.",
"Configure all UI elements in the \"ending\"-options panel.",
"Deletes all steps of scenario cases where a data table\nis generated to reduce the size of the data file.\nIn this case only the steps of the first scenario case are actually needed.",
"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."
] |
synchronized public String getPrettyProgressBar() {
StringBuilder sb = new StringBuilder();
double taskRate = numTasksCompleted / (double) totalTaskCount;
double partitionStoreRate = numPartitionStoresMigrated / (double) totalPartitionStoreCount;
long deltaTimeMs = System.currentTimeMillis() - startTimeMs;
long taskTimeRemainingMs = Long.MAX_VALUE;
if(taskRate > 0) {
taskTimeRemainingMs = (long) (deltaTimeMs * ((1.0 / taskRate) - 1.0));
}
long partitionStoreTimeRemainingMs = Long.MAX_VALUE;
if(partitionStoreRate > 0) {
partitionStoreTimeRemainingMs = (long) (deltaTimeMs * ((1.0 / partitionStoreRate) - 1.0));
}
// Title line
sb.append("Progress update on rebalancing batch " + batchId).append(Utils.NEWLINE);
// Tasks in flight update
sb.append("There are currently " + tasksInFlight.size() + " rebalance tasks executing: ")
.append(tasksInFlight)
.append(".")
.append(Utils.NEWLINE);
// Tasks completed update
sb.append("\t" + numTasksCompleted + " out of " + totalTaskCount
+ " rebalance tasks complete.")
.append(Utils.NEWLINE)
.append("\t")
.append(decimalFormatter.format(taskRate * 100.0))
.append("% done, estimate ")
.append(taskTimeRemainingMs)
.append(" ms (")
.append(TimeUnit.MILLISECONDS.toMinutes(taskTimeRemainingMs))
.append(" minutes) remaining.")
.append(Utils.NEWLINE);
// Partition-stores migrated update
sb.append("\t" + numPartitionStoresMigrated + " out of " + totalPartitionStoreCount
+ " partition-stores migrated.")
.append(Utils.NEWLINE)
.append("\t")
.append(decimalFormatter.format(partitionStoreRate * 100.0))
.append("% done, estimate ")
.append(partitionStoreTimeRemainingMs)
.append(" ms (")
.append(TimeUnit.MILLISECONDS.toMinutes(partitionStoreTimeRemainingMs))
.append(" minutes) remaining.")
.append(Utils.NEWLINE);
return sb.toString();
} | [
"Construct a pretty string documenting progress for this batch plan thus\nfar.\n\n@return pretty string documenting progress"
] | [
"Required to close the connection reading on the terminal, otherwise\nit can't be interrupted.\n\n@throws InterruptedException",
"Use this API to fetch linkset_interface_binding resources of given name .",
"Initialize the ui elements for the management part.",
"Gets Widget layout dimension\n@param axis The {@linkplain Layout.Axis axis} to obtain layout size for\n@return dimension",
"Clears the internal used cache for object materialization.",
"Answer the FieldConversions for the PkFields\n@param cld\n@return the pk FieldConversions",
"Get the present keys of all entries with a given type, checking hereby if assignable.\n\n@param type The attribute type, not null.\n@return all present keys of attributes being assignable to the type, never null.",
"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",
"Reset autoCommit state."
] |
public static byte[] domainControllerDataToByteBuffer(List<DomainControllerData> data) throws Exception {
final ByteArrayOutputStream out_stream = new ByteArrayOutputStream(512);
byte[] result;
try (DataOutputStream out = new DataOutputStream(out_stream)) {
Iterator<DomainControllerData> iter = data.iterator();
while (iter.hasNext()) {
DomainControllerData dcData = iter.next();
dcData.writeTo(out);
if (iter.hasNext()) {
S3Util.writeString(SEPARATOR, out);
}
}
result = out_stream.toByteArray();
}
return result;
} | [
"Write the domain controller data to a byte buffer.\n\n@param data the domain controller data\n@return the byte buffer\n@throws Exception"
] | [
"Cache a parse failure for this document.",
"Adds the allowed values. Override for attributes who should not use the allowed values.\n\n@param result the node to add the allowed values to\n@param validator the validator to get the allowed values from",
"Used to read the domain model when a slave host connects to the DC\n\n@param transformers the transformers for the host\n@param transformationInputs parameters for the transformation\n@param ignoredTransformationRegistry registry of resources ignored by the transformation target\n@param domainRoot the root resource for the domain resource tree\n@return a read master domain model util instance",
"Tries to stop the JLAN server and return after it is stopped, but will also return if the thread hasn't stopped after MAX_SHUTDOWN_WAIT_MILLIS.",
"Returns true if a pixel with the given color exists\n\n@param color the pixel colour to look for.\n@return true if there exists at least one pixel that has the given pixels color",
"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",
"Get the active operation.\n\n@param id the active operation id\n@return the active operation, {@code null} if if there is no registered operation",
"Close the open stream.\n\nClose the stream if it was opened before",
"Adds all direct subtypes to the given list.\n\n@param type The type for which to determine the direct subtypes\n@param subTypes The list to receive the subtypes"
] |
public ItemRequest<CustomField> update(String customField) {
String path = String.format("/custom_fields/%s", customField);
return new ItemRequest<CustomField>(this, CustomField.class, path, "PUT");
} | [
"A specific, existing custom field can be updated by making a PUT request on the URL for that custom field. Only the fields provided in the `data` block will be updated; any unspecified fields will remain unchanged\n\nWhen using this method, it is best to specify only those fields you wish to change, or else you may overwrite changes made by another user since you last retrieved the custom field.\n\nA custom field's `type` cannot be updated.\n\nAn enum custom field's `enum_options` cannot be updated with this endpoint. Instead see \"Work With Enum Options\" for information on how to update `enum_options`.\n\nReturns the complete updated custom field record.\n\n@param customField Globally unique identifier for the custom field.\n@return Request object"
] | [
"The keywords to include in the PDF metadata.\n\n@param keywords the keywords of the PDF.",
"Constructs a new FastEvent instance\n@param type the event type\n@param manager the bean manager\n@param notifier the notifier to be used for observer method resolution\n@param qualifiers the event qualifiers\n@return",
"Creates metadata on this file in the specified template type.\n\n@param typeName the metadata template type name.\n@param metadata the new metadata values.\n@return the metadata returned from the server.",
"Determines if the key replicates to the given node\n\n@param key\n@param nodeId\n@return true if the key belongs to the node as some replica",
"Use this API to fetch aaauser_aaagroup_binding resources of given name .",
"Returns the union of sets s1 and s2.",
"Read the work weeks.\n\n@param data calendar data\n@param offset current offset into data\n@param cal parent calendar",
"This utility method calculates the difference in working\ntime between two dates, given the context of a task.\n\n@param task parent task\n@param date1 first date\n@param date2 second date\n@param format required format for the resulting duration\n@return difference in working time between the two dates",
"if you want to parse an argument, you need a converter from String to Object\n\n@param commandLineOption specification of the command line options\n@param converter how to convert your String value to a castable Object"
] |
public static sslfipskey[] get(nitro_service service, String fipskeyname[]) throws Exception{
if (fipskeyname !=null && fipskeyname.length>0) {
sslfipskey response[] = new sslfipskey[fipskeyname.length];
sslfipskey obj[] = new sslfipskey[fipskeyname.length];
for (int i=0;i<fipskeyname.length;i++) {
obj[i] = new sslfipskey();
obj[i].set_fipskeyname(fipskeyname[i]);
response[i] = (sslfipskey) obj[i].get_resource(service);
}
return response;
}
return null;
} | [
"Use this API to fetch sslfipskey resources of given names ."
] | [
"Enables lifecycle callbacks for Android devices\n@param application App's Application object",
"Transforms a length according to the current transformation matrix.",
"May have to be changed to let multiple touch",
"Returns the version document of the given document, if any; returns null otherwise.\n@param document the document to get the version from.\n@return the version of the given document, if any; returns null otherwise.",
"Performs a standard bidiagonal decomposition just on the outer blocks of the provided matrix\n\n@param blockLength\n@param A\n@param gammasU",
"Dumps a single material property to stdout.\n\n@param property the property",
"Check whether the value is matched by a regular expression.\n\n@param value value\n@param regex regular expression\n@return true when value is matched",
"test, how many times the group was present in the list of groups.",
"Formats a date or a time according to the local conventions.\n\nSince ReadablePartials don't support all fields, we fill in any blanks\nneeded for formatting by using the epoch (1970-01-01T00:00:00Z).\n\nSee {@link android.text.format.DateUtils#formatDateTime} for full docs.\n\n@param context the context is required only if the time is shown\n@param time a point in time\n@param flags a bit mask of formatting options\n@return a string containing the formatted date/time."
] |
public static int rank(SingularValueDecomposition_F64 svd , double threshold ) {
int numRank=0;
double w[]= svd.getSingularValues();
int N = svd.numberOfSingularValues();
for( int j = 0; j < N; j++ ) {
if( w[j] > threshold)
numRank++;
}
return numRank;
} | [
"Extracts the rank of a matrix using a preexisting decomposition.\n\n@see #singularThreshold(SingularValueDecomposition_F64)\n\n@param svd A precomputed decomposition. Not modified.\n@param threshold Tolerance used to determine of a singular value is singular.\n@return The rank of the decomposed matrix."
] | [
"Add an object into cache by key. The key will be used in conjunction with session id if\nthere is a session instance\n\n@param key\nthe key to index the object within the cache\n@param obj\nthe object to be cached",
"Initialize; cached threadpool is safe as it is releasing resources automatically if idle",
"Helper method to find Strings of form \"all digits\" and \"digits-comma-digits\"",
"Producers returned from this method are not validated. Internal use only.",
"Use this API to fetch authenticationradiuspolicy_authenticationvserver_binding resources of given name .",
"Removes the key and its associated value from this map.\n\n@param key the key to remove\n@return the value associated with that key, or null if\nthe key was not in the map",
"Reconstructs a number that is represented by more than one byte in a network packet in little-endian order, for\nthe very few protocol values that are sent in this quirky way.\n\n@param buffer the byte array containing the packet data\n@param start the index of the first byte containing a numeric value\n@param length the number of bytes making up the value\n@return the reconstructed number",
"After obtaining a connection, perform additional tasks.\n@param handle\n@param statsObtainTime",
"Returns the earlier of two dates, handling null values. A non-null Date\nis always considered to be earlier than a null Date.\n\n@param d1 Date instance\n@param d2 Date instance\n@return Date earliest date"
] |
public Object toInternal(Attribute<?> attribute) throws GeomajasException {
if (attribute instanceof PrimitiveAttribute<?>) {
return toPrimitiveObject((PrimitiveAttribute<?>) attribute);
} else if (attribute instanceof AssociationAttribute<?>) {
return toAssociationObject((AssociationAttribute<?>) attribute);
} else {
throw new GeomajasException(ExceptionCode.CONVERSION_PROBLEM, attribute);
}
} | [
"Converts a DTO attribute into a generic attribute object.\n\n@param attribute\nThe DTO attribute.\n@return The server side attribute representation. As we don't know at this point what kind of object the\nattribute is (that's a problem for the <code>FeatureModel</code>), we return an <code>Object</code>."
] | [
"Tests that the area is valid geojson, the style ref is valid or null and the display is non-null.",
"Determine which daughter of the current parse tree is the head.\n\n@param t The parse tree to examine the daughters of.\nIf this is a leaf, <code>null</code> is returned\n@param parent The parent of t\n@return The daughter parse tree that is the head of <code>t</code>.\nReturns null for leaf nodes.\n@see Tree#percolateHeads(HeadFinder)\nfor a routine to call this and spread heads throughout a tree",
"Accessor method used to retrieve a Number instance representing the\ncontents of an individual field. If the field does not exist in the\nrecord, null is returned.\n\n@param field the index number of the field to be retrieved\n@return the value of the required field\n@throws MPXJException normally thrown when parsing fails",
"From v3_epoly.js, calculates the distance between this LatLong point and\nanother.\n\n@param end The end point to calculate the distance to.\n@return The distance, in metres, to the end point.",
"Returns a site record for the site of the given name, creating a new one\nif it does not exist yet.\n\n@param siteKey\nthe key of the site\n@return the suitable site record",
"Use this API to add nsip6 resources.",
"Calculate start dates for a monthly absolute recurrence.\n\n@param calendar current date\n@param frequency frequency\n@param dates array of start dates",
"Copy the contents of this buffer to the destination LBuffer\n@param srcOffset\n@param dest\n@param destOffset\n@param size",
"Allows this closeable to be used within the closure, ensuring that it\nis closed once the closure has been executed and before this method returns.\n\n@param self the Closeable\n@param action the closure taking the Closeable as parameter\n@return the value returned by the closure\n@throws IOException if an IOException occurs.\n@since 2.4.0"
] |
public Collection getAllObjects(Class target)
{
PersistenceBroker broker = getBroker();
Collection result;
try
{
Query q = new QueryByCriteria(target);
result = broker.getCollectionByQuery(q);
}
finally
{
if (broker != null) broker.close();
}
return result;
} | [
"Return all objects for the given class."
] | [
"Checks if a given number is in the range of a float.\n\n@param number\na number which should be in the range of a float (positive or negative)\n\n@see java.lang.Float#MIN_VALUE\n@see java.lang.Float#MAX_VALUE\n\n@return number as a float",
"Parse currency.\n\n@param value currency value\n@return currency value",
"Obtain the class of a given className\n\n@param className\n@return\n@throws Exception",
"Answer the FieldConversions for the PkFields\n@param cld\n@return the pk FieldConversions",
"Use this API to update appfwlearningsettings.",
"If the user has not specified a project ID, this method\nretrieves the ID of the first project in the file.",
"Helper function to return the minimum size of the workspace to be passed to the reduction given the input and output\ntensors",
"Use this API to add gslbservice resources.",
"Performs a put operation with the specified composite request object\n\n@param requestWrapper A composite request object containing the key and\nvalue\n@return Version of the value for the successful put"
] |
private void readHolidays()
{
for (MapRow row : m_tables.get("HOL"))
{
ProjectCalendar calendar = m_calendarMap.get(row.getInteger("CALENDAR_ID"));
if (calendar != null)
{
Date date = row.getDate("DATE");
ProjectCalendarException exception = calendar.addCalendarException(date, date);
if (row.getBoolean("ANNUAL"))
{
RecurringData recurring = new RecurringData();
recurring.setRecurrenceType(RecurrenceType.YEARLY);
recurring.setYearlyAbsoluteFromDate(date);
recurring.setStartDate(date);
exception.setRecurring(recurring);
// TODO set end date based on project end date
}
}
}
} | [
"Read holidays from the database and create calendar exceptions."
] | [
"Returns an empty Promotion details in Json\n\n@return String\n@throws IOException",
"Deploys application reading resources from specified InputStream.\n\n@param inputStream where resources are read\n@throws IOException",
"Replaces each 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 string to be substituted for each match\n@return the toString() of the CharSequence with content replaced\n@throws java.util.regex.PatternSyntaxException if the regular expression's syntax is invalid\n@see String#replaceAll(String, String)\n@since 1.8.2",
"Internal function that uses recursion to create the list",
"Write the domain controller data to an S3 file.\n\n@param data the domain controller data\n@param domainName the name of the directory in the bucket to write the S3 file to\n@throws IOException",
"Consumes a produced result. Calls every transformer in sequence, then\ncalls every dataWriter in sequence.\n\n@param initialVars a map containing the initial variables assignments\n@return the number of lines written",
"Allows testsuites to shorten the domain timeout adder",
"Returns the device push token or null\n\n@param type com.clevertap.android.sdk.PushType (FCM or GCM)\n@return String device token or null\nNOTE: on initial install calling getDevicePushToken may return null, as the device token is\nnot yet available\nImplement CleverTapAPI.DevicePushTokenRefreshListener to get a callback once the token is\navailable",
"Process schedule options from SCHEDOPTIONS. This table only seems to exist\nin XER files, not P6 databases."
] |
static void processServerConfig(final Resource root, final RequiredConfigurationHolder requiredConfigurationHolder, final IgnoredNonAffectedServerGroupsUtil.ServerConfigInfo serverConfig, final ExtensionRegistry extensionRegistry) {
final Set<String> serverGroups = requiredConfigurationHolder.serverGroups;
final Set<String> socketBindings = requiredConfigurationHolder.socketBindings;
String sbg = serverConfig.getSocketBindingGroup();
if (sbg != null && !socketBindings.contains(sbg)) {
processSocketBindingGroup(root, sbg, requiredConfigurationHolder);
}
final String groupName = serverConfig.getServerGroup();
final PathElement groupElement = PathElement.pathElement(SERVER_GROUP, groupName);
// Also check the root, since this also gets executed on the slave which may not have the server-group configured yet
if (!serverGroups.contains(groupName) && root.hasChild(groupElement)) {
final Resource serverGroup = root.getChild(groupElement);
final ModelNode groupModel = serverGroup.getModel();
serverGroups.add(groupName);
// Include the socket binding groups
if (groupModel.hasDefined(SOCKET_BINDING_GROUP)) {
final String socketBindingGroup = groupModel.get(SOCKET_BINDING_GROUP).asString();
processSocketBindingGroup(root, socketBindingGroup, requiredConfigurationHolder);
}
final String profileName = groupModel.get(PROFILE).asString();
processProfile(root, profileName, requiredConfigurationHolder, extensionRegistry);
}
} | [
"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"
] | [
"Iterate through dependencies",
"Use this API to clear Interface.",
"Reads entries from transforms.xml.\n\n@param file the XML file\n@return the transform entries read from the file\n\n@throws Exception if something goes wrong",
"This method allows a subsection of a byte array to be copied.\n\n@param data source data\n@param offset offset into the source data\n@param size length of the source data to copy\n@return new byte array containing copied data",
"Add a creatable \"post-run\" dependent for this task item.\n\n@param creatable the creatable \"post-run\" dependent.\n@return the key to be used as parameter to taskResult(string) method to retrieve created \"post-run\" dependent",
"Checks whether every property except 'preferred' is satisfied\n\n@return",
"Builds the HTML code for a select widget given a bean containing the select options\n\n@param htmlAttributes html attributes for the select widget\n@param options the bean containing the select options\n\n@return the HTML for the select box",
"The way calendars are stored in an MPP14 file means that there\ncan be forward references between the base calendar unique ID for a\nderived calendar, and the base calendar itself. To get around this,\nwe initially populate the base calendar name attribute with the\nbase calendar unique ID, and now in this method we can convert those\nID values into the correct names.\n\n@param baseCalendars list of calendars and base calendar IDs\n@param map map of calendar ID values and calendar objects",
"Ensures that the primary keys required by the given collection with indirection table are present in\nthe element class.\n\n@param modelDef The model\n@param collDef The collection\n@throws ConstraintException If there is a problem with the fitting collection (if any) or the primary keys"
] |
public static void acceptsJson(OptionParser parser) {
parser.acceptsAll(Arrays.asList(OPT_J, OPT_JSON),
"fetch key/entry by key value of json type")
.withRequiredArg()
.describedAs("key-list")
.withValuesSeparatedBy(',')
.ofType(String.class);
} | [
"Adds OPT_J | OPT_JSON 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"
] | [
"width of input section",
"Lift a Java Func3 to a Scala Function3\n\n@param f the function to lift\n\n@returns the Scala function",
"Get the first non-white X point\n@param img Image n memory\n@return the x start",
"Returns the property value read from the given JavaBean.\n\n@param bean the JavaBean to read the property from\n@param property the property to read\n\n@return the property value read from the given JavaBean",
"Use this API to delete dnstxtrec of given name.",
"Reports a given exception as a RuntimeException, since the interface does\nnot allow us to throw checked exceptions directly.\n\n@param e\nthe exception to report\n@throws RuntimeException\nin all cases",
"Get cached value that is dynamically loaded by the Acacia content editor.\n\n@param attribute the attribute to load the value to\n@return the cached value",
"Returns an iterator over the items in the trash.\n@return an iterator over the items in the trash.",
"sets the class object described by this descriptor.\n@param c the class to describe"
] |
public static IndexableTaskItem create(final FunctionalTaskItem taskItem) {
return new IndexableTaskItem() {
@Override
protected Observable<Indexable> invokeTaskAsync(TaskGroup.InvocationContext context) {
FunctionalTaskItem.Context fContext = new FunctionalTaskItem.Context(this);
fContext.setInnerContext(context);
return taskItem.call(fContext);
}
};
} | [
"Creates an IndexableTaskItem from provided FunctionalTaskItem.\n\n@param taskItem functional TaskItem\n@return IndexableTaskItem"
] | [
"Retrieve and validate the timeout value from the REST request.\n\"X_VOLD_REQUEST_TIMEOUT_MS\" is the timeout header.\n\n@return true if present, false if missing",
"Add an index on the given collection and field\n\n@param collection the collection to use for the index\n@param field the field to use for the index\n@param asc the sorting direction. <code>true</code> to sort ascending; <code>false</code> to sort descending\n@param background iff <code>true</code> the index is created in the background",
"Finish initializing.\n\n@throws GeomajasException oops",
"Sets the value if the date only should be shown.\n@param dateOnly if the date only should be shown",
"Replaces the proxy url with the correct url from the tileMap.\n\n@return correct url to TMS service",
"Creates a new subtask and adds it to the parent task. Returns the full record\nfor the newly created subtask.\n\n@param task The task to add a subtask to.\n@return Request object",
"Convenience method for getting the value of a private object field,\nwithout the stress of checked exceptions in the reflection API.\n\n@param object\nObject containing the field.\n@param fieldName\nName of the field whose value to return.",
"Checks length and compare order of field names with declared PK fields in metadata.",
"Submit a operations. Throw a run time exception if the operations is\nalready submitted\n\n@param operation The asynchronous operations to submit\n@param requestId Id of the request"
] |
private void checkReadonlyAccessForNativePKs(FieldDescriptorDef fieldDef, String checkLevel)
{
if (CHECKLEVEL_NONE.equals(checkLevel))
{
return;
}
String access = fieldDef.getProperty(PropertyHelper.OJB_PROPERTY_ACCESS);
String autoInc = fieldDef.getProperty(PropertyHelper.OJB_PROPERTY_AUTOINCREMENT);
if ("database".equals(autoInc) && !"readonly".equals(access))
{
LogHelper.warn(true,
FieldDescriptorConstraints.class,
"checkAccess",
"The field "+fieldDef.getName()+" in class "+fieldDef.getOwner().getName()+" is set to database auto-increment. Therefore the field's access is set to 'readonly'.");
fieldDef.setProperty(PropertyHelper.OJB_PROPERTY_ACCESS, "readonly");
}
} | [
"Checks that native primarykey fields have readonly access, and warns if not.\n\n@param fieldDef The field descriptor\n@param checkLevel The current check level (this constraint is checked in basic and strict)"
] | [
"Override this method to supply a custom splash screen image.\n\n@param gvrContext\nThe new {@link GVRContext}\n@return Texture to display\n\n@since 1.6.4",
"Get transformer to use.\n\n@return transformation to apply",
"Create a list of operations required to a boot a managed server.\n\n@param serverName the server name\n@param domainModel the complete domain model\n@param hostModel the local host model\n@param domainController the domain controller\n@return the list of boot operations",
"Simple, high-level API to enable or disable eye picking for this scene\nobject.\n\nThe {@linkplain #attachCollider low-level\nAPI} gives you a lot of control over eye picking, but it does involve an\nawful lot of details. This method\n(and {@link #getPickingEnabled()}) provides a simple boolean property.\nIt attaches a GVRSphereCollider to the scene object. If you want more\naccurate picking, you can use {@link #attachComponent(GVRComponent)} to attach a\nmesh collider instead. The mesh collider is more accurate but also\ncosts more to compute.\n\n@param enabled\nShould eye picking 'see' this scene object?\n\n@since 2.0.2\n@see GVRSphereCollider\n@see GVRMeshCollider",
"Retrieves the earliest start date for all assigned tasks.\n\n@return start date",
"Builds a instance of the class for a map containing the values, without specifying the handler for differences\n\n@param clazz The class to build instance\n@param values The values map\n@return The instance\n@throws InstantiationException Error instantiating\n@throws IllegalAccessException Access error\n@throws IntrospectionException Introspection error\n@throws IllegalArgumentException Argument invalid\n@throws InvocationTargetException Invalid target",
"Returns the value of an optional property, if the property is\nset. If it is not set defval is returned.",
"Creates a ServiceCall from a paging operation that returns a header response.\n\n@param first the observable to the first page\n@param next the observable to poll subsequent pages\n@param callback the client-side callback\n@param <E> the element type\n@param <V> the header object type\n@return the future based ServiceCall",
"Produces an IPv4 address from any sequence of 4 bytes in this IPv6 address.\n\n@param byteIndex the byte index to start\n@throws IndexOutOfBoundsException if the index is less than zero or bigger than 7\n@return"
] |
protected String pauseMsg() throws IOException {
final WorkerStatus status = new WorkerStatus();
status.setRunAt(new Date());
status.setPaused(isPaused());
return ObjectMapperFactory.get().writeValueAsString(status);
} | [
"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"
] | [
"remove a converted object from the pool\n\n@param converter\n@param sourceObject\n@param destinationType",
"Read remarks from a Gantt Designer file.\n\n@param gantt Gantt Designer file",
"Creates the event type.\n\n@param type the EventEnumType\n@return the event type",
"We try to convert an Object to an Array and this is not easy in Java so we need a little bit of nasty magic.\n\n@param <T> Type of elements\n@param clazz Clazz of the Objct elements\n@param obj Object\n@return Array",
"2-D Gaussian kernel.\n\n@param size Kernel size (should be odd), [3, 101].\n@return Returns 2-D Gaussian kernel of specified size.",
"Writes the JavaScript code describing the tags as Tag classes to given writer.",
"This method writes project property data to a JSON file.",
"Returns the full path of the resource file with extension.\n\n@return path of the GVRAndroidResource. May return null if the\nresource is not associated with any file",
"Save a weak reference to the resource"
] |
public void processAnonymousField(Properties attributes) throws XDocletException
{
if (!attributes.containsKey(ATTRIBUTE_NAME))
{
throw new XDocletException(Translator.getString(XDocletModulesOjbMessages.class,
XDocletModulesOjbMessages.PARAMETER_IS_REQUIRED,
new String[]{ATTRIBUTE_NAME}));
}
String name = attributes.getProperty(ATTRIBUTE_NAME);
FieldDescriptorDef fieldDef = _curClassDef.getField(name);
String attrName;
if (fieldDef == null)
{
fieldDef = new FieldDescriptorDef(name);
_curClassDef.addField(fieldDef);
}
fieldDef.setAnonymous();
LogHelper.debug(false, OjbTagsHandler.class, "processAnonymousField", " Processing anonymous field "+fieldDef.getName());
attributes.remove(ATTRIBUTE_NAME);
for (Enumeration attrNames = attributes.propertyNames(); attrNames.hasMoreElements(); )
{
attrName = (String)attrNames.nextElement();
fieldDef.setProperty(attrName, attributes.getProperty(attrName));
}
fieldDef.setProperty(PropertyHelper.OJB_PROPERTY_ACCESS, "anonymous");
} | [
"Processes an anonymous field definition specified at the class level.\n\n@param attributes The attributes of the tag\n@exception XDocletException if an error occurs\[email protected] type=\"content\"\[email protected] name=\"attributes\" optional=\"true\" description=\"Attributes of the field as name-value pairs 'name=value',\nseparated by commas\"\[email protected] name=\"autoincrement\" optional=\"true\" description=\"Whether the field is\nauto-incremented\" values=\"true,false\"\[email protected] name=\"column\" optional=\"true\" description=\"The column for the field\"\[email protected] name=\"conversion\" optional=\"true\" description=\"The fully qualified name of the\nconversion for the field\"\[email protected] name=\"default-fetch\" optional=\"true\" description=\"The default-fetch setting\"\nvalues=\"true,false\"\[email protected] name=\"documentation\" optional=\"true\" description=\"Documentation on the field\"\[email protected] name=\"id\" optional=\"true\" description=\"The position of the field in the class\ndescriptor\"\[email protected] name=\"indexed\" optional=\"true\" description=\"Whether the field is indexed\"\nvalues=\"true,false\"\[email protected] name=\"jdbc-type\" optional=\"true\" description=\"The jdbc type of the column\"\[email protected] name=\"length\" optional=\"true\" description=\"The length of the column\"\[email protected] name=\"locking\" optional=\"true\" description=\"Whether the field supports locking\"\nvalues=\"true,false\"\[email protected] name=\"name\" optional=\"false\" description=\"The name of the field\"\[email protected] name=\"nullable\" optional=\"true\" description=\"Whether the field is nullable\"\nvalues=\"true,false\"\[email protected] name=\"precision\" optional=\"true\" description=\"The precision of the column\"\[email protected] name=\"primarykey\" optional=\"true\" description=\"Whether the field is a primarykey\"\nvalues=\"true,false\"\[email protected] name=\"scale\" optional=\"true\" description=\"The scale of the column\"\[email protected] name=\"sequence-name\" optional=\"true\" description=\"The name of the sequence for\nincrementing the field\"\[email protected] name=\"table\" optional=\"true\" description=\"The table of the field (not implemented\nyet)\"\[email protected] name=\"update-lock\" optional=\"true\" description=\"Can be set to false if the persistent attribute is\nused for optimistic locking AND the dbms should update the lock column itself (default is true). Can only be set for\nTIMESTAMP and INTEGER columns\" values=\"true,false\""
] | [
"Use this API to fetch all the appfwjsoncontenttype resources that are configured on netscaler.",
"Ping route Ping the ESI routers\n\n@return ApiResponse<String>\n@throws ApiException\nIf fail to call the API, e.g. server error or cannot\ndeserialize the response body",
"Synthesize and forward a KeyEvent to the library.\n\nThis call is made from the native layer.\n\n@param code id of the button\n@param action integer representing the action taken on the button",
"Accessor method used to retrieve a Float object representing the\ncontents of an individual field. If the field does not exist in the\nrecord, null is returned.\n\n@param field the index number of the field to be retrieved\n@return the value of the required field",
"Mirrors the given bitmap",
"Delete inactive contents.",
"Converts a JSON patch path to a JSON property name.\nCurrently the metadata API only supports flat maps.\n@param path the path that designates the key. Must be prefixed with a \"/\".\n@return the JSON property name.",
"Use this API to restore appfwprofile resources.",
"Mbeans for UPDATE_ENTRIES"
] |
protected void load()
{
// properties file may be set as a System property.
// if no property is set take default name.
String fn = System.getProperty(OJB_PROPERTIES_FILE, OJB_PROPERTIES_FILE);
setFilename(fn);
super.load();
// default repository & connection descriptor file
repositoryFilename = getString("repositoryFile", OJB_METADATA_FILE);
// object cache class
objectCacheClass = getClass("ObjectCacheClass", ObjectCacheDefaultImpl.class, ObjectCache.class);
// load PersistentField Class
persistentFieldClass =
getClass("PersistentFieldClass", PersistentFieldDirectImpl.class, PersistentField.class);
// load PersistenceBroker Class
persistenceBrokerClass =
getClass("PersistenceBrokerClass", PersistenceBrokerImpl.class, PersistenceBroker.class);
// load ListProxy Class
listProxyClass = getClass("ListProxyClass", ListProxyDefaultImpl.class);
// load SetProxy Class
setProxyClass = getClass("SetProxyClass", SetProxyDefaultImpl.class);
// load CollectionProxy Class
collectionProxyClass = getClass("CollectionProxyClass", CollectionProxyDefaultImpl.class);
// load IndirectionHandler Class
indirectionHandlerClass =
getClass("IndirectionHandlerClass", IndirectionHandlerJDKImpl.class, IndirectionHandler.class);
// load ProxyFactory Class
proxyFactoryClass =
getClass("ProxyFactoryClass", ProxyFactoryJDKImpl.class, ProxyFactory.class);
// load configuration for ImplicitLocking parameter:
useImplicitLocking = getBoolean("ImplicitLocking", false);
// load configuration for LockAssociations parameter:
lockAssociationAsWrites = (getString("LockAssociations", "WRITE").equalsIgnoreCase("WRITE"));
// load OQL Collection Class
oqlCollectionClass = getClass("OqlCollectionClass", DListImpl.class, ManageableCollection.class);
// set the limit for IN-sql , -1 for no limits
sqlInLimit = getInteger("SqlInLimit", -1);
//load configuration for PB pool
maxActive = getInteger(PoolConfiguration.MAX_ACTIVE,
PoolConfiguration.DEFAULT_MAX_ACTIVE);
maxIdle = getInteger(PoolConfiguration.MAX_IDLE,
PoolConfiguration.DEFAULT_MAX_IDLE);
maxWait = getLong(PoolConfiguration.MAX_WAIT,
PoolConfiguration.DEFAULT_MAX_WAIT);
timeBetweenEvictionRunsMillis = getLong(PoolConfiguration.TIME_BETWEEN_EVICTION_RUNS_MILLIS,
PoolConfiguration.DEFAULT_TIME_BETWEEN_EVICTION_RUNS_MILLIS);
minEvictableIdleTimeMillis = getLong(PoolConfiguration.MIN_EVICTABLE_IDLE_TIME_MILLIS,
PoolConfiguration.DEFAULT_MIN_EVICTABLE_IDLE_TIME_MILLIS);
whenExhaustedAction = getByte(PoolConfiguration.WHEN_EXHAUSTED_ACTION,
PoolConfiguration.DEFAULT_WHEN_EXHAUSTED_ACTION);
useSerializedRepository = getBoolean("useSerializedRepository", false);
} | [
"Loads the configuration from file \"OBJ.properties\". If the system\nproperty \"OJB.properties\" is set, then the configuration in that file is\nloaded. Otherwise, the file \"OJB.properties\" is tried. If that is also\nunsuccessful, then the configuration is filled with default values."
] | [
"read data from channel to buffer\n\n@param channel readable channel\n@param buffer bytebuffer\n@return read size\n@throws IOException any io exception",
"Returns the list of user defined attribute names.\n\n@return the list of user defined attribute names, if there are none it returns an empty set.",
"Use this API to disable snmpalarm resources of given names.",
"Synchronize the geotools transaction with the platform transaction, if such a transaction is active.\n\n@param featureStore\n@param dataSource",
"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..",
"Add a console pipeline to the Redwood handler tree,\nprinting to stderr.\nCalling this multiple times will result in messages being printed\nmultiple times.\n@return this",
"Writes the data collected about classes to a file.",
"This configuration requires that all your tasks you submit to the system implement\nthe Groupable interface. By default, it will round robin tasks from each group\n\nTasks will be tracked internally in the system by randomly generated UUIDs\n\n@return",
"Parses the comma delimited address into model nodes.\n\n@param profileName the profile name for the domain or {@code null} if not a domain\n@param inputAddress the address.\n\n@return a collection of the address nodes."
] |
static String toFormattedString(final String iban) {
final StringBuilder ibanBuffer = new StringBuilder(iban);
final int length = ibanBuffer.length();
for (int i = 0; i < length / 4; i++) {
ibanBuffer.insert((i + 1) * 4 + i, ' ');
}
return ibanBuffer.toString().trim();
} | [
"Returns formatted version of Iban.\n\n@return A string representing formatted Iban for printing."
] | [
"Remove a bean from the context, calling the destruction callback if any.\n\n@param name bean name\n@return previous value",
"Given a string which is either the name of a predefined tab configuration or a configuration string, returns\nthe corresponding tab configuration.\n\n@param configStr a configuration string or predefined configuration name\n\n@return the gallery tab configuration",
"Add all headers in a header map.\n\n@param headers a map of headers.\n@return the interceptor instance itself.",
"Scans the given file looking for a complete zip file format end of central directory record.\n\n@param file the file\n\n@return true if a complete end of central directory record could be found\n\n@throws IOException",
"handle white spaces.",
"Filter that's either negated or normal as specified.",
"Processes the template if the property value of the current object on the specified level equals the given value.\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=\"false\" description=\"The name of the property\"\[email protected] name=\"value\" optional=\"false\" description=\"The value to check for\"\[email protected] name=\"default\" optional=\"true\" description=\"A default value to use if the property\nis not defined\"",
"Rent a car available in the last serach result\n@param intp - the command interpreter instance",
"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"
] |
public static dnstxtrec[] get(nitro_service service) throws Exception{
dnstxtrec obj = new dnstxtrec();
dnstxtrec[] response = (dnstxtrec[])obj.get_resources(service);
return response;
} | [
"Use this API to fetch all the dnstxtrec resources that are configured on netscaler."
] | [
"generate random velocities in the given range\n@return",
"Checks the second, hour, month, day, month and year are equal.",
"Builds a configuration object based on given properties.\n\n@param properties the properties.\n@return a configuration and never null.",
"Gets the addresses of the child resources under the given resource.\n\n@param context the operation context\n@param registry registry entry representing the resource\n@param resource the current resource\n@param validChildType a single child type to which the results should be limited. If {@code null} the result\nshould include all child types\n@return map where the keys are the child types and the values are a set of child names associated with a type",
"Read exactly buffer.length bytes from the stream into the buffer\n\n@param stream The stream to read from\n@param buffer The buffer to read into",
"Set the payload to the fileModel of the given instance even though the variable is not directly referencing it. This is mainly to simplify the\ncreation of the rule, when the FileModel itself is not being iterated but just a model referencing it.",
"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.",
"Scans the given file looking for a complete zip file format end of central directory record.\n\n@param file the file\n\n@return true if a complete end of central directory record could be found\n\n@throws IOException",
"It should be called when the picker is hidden"
] |
public static String getHeaders(HttpServletResponse response) {
String headerString = "";
Collection<String> headerNames = response.getHeaderNames();
for (String headerName : headerNames) {
// there may be multiple headers per header name
for (String headerValue : response.getHeaders(headerName)) {
if (headerString.length() != 0) {
headerString += "\n";
}
headerString += headerName + ": " + headerValue;
}
}
return headerString;
} | [
"Obtain newline-delimited headers from response\n\n@param response HttpServletResponse to scan\n@return newline-delimited headers"
] | [
"Attempts to insert a colon so that a value without a colon can\nbe parsed.",
"Invoke to tell listeners that an step started event processed",
"Reads all text of the XML tag and returns it as a String.\nAssumes that a '<' character has already been read.\n\n@param r The reader to read from\n@return The String representing the tag, or null if one couldn't be read\n(i.e., EOF). The returned item is a complete tag including angle\nbrackets, such as <code><TXT></code>",
"This produces a canonical string.\n\nRFC 5952 describes canonical representations.\nhttp://en.wikipedia.org/wiki/IPv6_address#Recommended_representation_as_text\nhttp://tools.ietf.org/html/rfc5952",
"Add fields to the text index configuration.\n\n@param fields the {@link TextIndex.Field} configurations to add\n@return the builder for chaining",
"Returns all program element docs that have a visibility greater or\nequal than the specified level",
"add some validation to see if this miss anything.\n\n@return true, if successful\n@throws ParallelTaskInvalidException\nthe parallel task invalid exception",
"Adds service locator properties to an endpoint reference.\n@param epr\n@param props",
"Go through all node IDs and determine which node\n\n@param cluster\n@param storeRoutingPlan\n@return"
] |
private static void bodyWithConcatenation(
SourceBuilder code,
Map<Property, PropertyCodeGenerator> generatorsByProperty,
String typename) {
code.add(" return \"%s{", typename);
String prefix = "";
for (Property property : generatorsByProperty.keySet()) {
PropertyCodeGenerator generator = generatorsByProperty.get(property);
code.add("%s%s=\" + %s + \"",
prefix, property.getName(), (Excerpt) generator::addToStringValue);
prefix = ", ";
}
code.add("}\";%n");
} | [
"Generate the body of a toString method that uses plain concatenation.\n\n<p>Conventionally, we join properties with comma separators. If all of the properties are\nalways present, this can be done with a long block of unconditional code. We could use a\nStringBuilder for this, but in fact the Java compiler will do this for us under the hood\nif we use simple string concatenation, so we use the more readable approach."
] | [
"Handles a faulted task.\n\n@param faultedEntry the entry holding faulted task\n@param throwable the reason for fault\n@param context the context object shared across all the task entries in this group during execution\n\n@return an observable represents asynchronous operation in the next stage",
"A connection to the database. Should be short-lived. No transaction active by default.\n\n@return a new open connection.",
"Checks that the modified features exist.\n\n@param classDef The class descriptor\n@param checkLevel The current check level (this constraint is checked in basic and strict)\n@exception ConstraintException If the constraint has been violated",
"Use this API to fetch systemsession resource of given name .",
"Used to read the domain model when a slave host connects to the DC\n\n@param transformers the transformers for the host\n@param transformationInputs parameters for the transformation\n@param ignoredTransformationRegistry registry of resources ignored by the transformation target\n@param domainRoot the root resource for the domain resource tree\n@return a read master domain model util instance",
"Build a request URL using a given scheme.\n\n@param scheme the scheme, either {@code http} or {@code https}\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",
"Filter unsafe or unnecessary request.\n\n@param nodeDataMapValidSource\nthe node data map valid source\n@param nodeDataMapValidSafe\nthe node data map valid safe",
"Returns the total number of weights associated with this classifier.\n\n@return number of weights",
"Injects EJBs and other EE resources.\n\n@param resourceInjectionsHierarchy\n@param beanInstance\n@param ctx"
] |
public void map(Story story, MetaFilter metaFilter) {
if (metaFilter.allow(story.getMeta())) {
boolean allowed = false;
for (Scenario scenario : story.getScenarios()) {
// scenario also inherits meta from story
Meta inherited = scenario.getMeta().inheritFrom(story.getMeta());
if (metaFilter.allow(inherited)) {
allowed = true;
break;
}
}
if (allowed) {
add(metaFilter.asString(), story);
}
}
} | [
"Maps a story if it is allowed by the meta filter\n\n@param story\nthe Story\n@param metaFilter\nthe meta filter"
] | [
"Add a source and destination.\n\n@param source Source path to be routed. Routed path can have named wild-card pattern with braces \"{}\".\n@param destination Destination of the path.",
"Converts any string into a string that is safe to use as a file name.\nThe result will only include ascii characters and numbers, and the \"-\",\"_\", and \".\" characters.",
"Clears the handler hierarchy.",
"Wrap an existing setter.",
"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",
"Returns the plugins classpath elements.",
"Add the string representation of the given object to this sequence at the given index. The given indentation will\nbe prepended to each line except the first one if the object has a multi-line string representation.\n\n@param object\nthe to-be-appended object.\n@param indentation\nthe indentation string that should be prepended. May not be <code>null</code>.\n@param index\nthe index in the list of segments.",
"The point that is the GOLDEN_SECTION along the way from a to b.\na may be less or greater than b, you find the point 60-odd percent\nof the way from a to b.\n\n@param a Interval minimum\n@param b Interval maximum\n@return The GOLDEN_SECTION along the way from a to b.",
"Convert an array of bytes into an array of ints. 4 bytes from the\ninput data map to a single int in the output data.\n@param bytes The data to read from.\n@return An array of 32-bit integers constructed from the data.\n@since 1.1"
] |
public FieldType getFieldByAlias(FieldTypeClass typeClass, String alias)
{
return m_aliasMap.get(new Pair<FieldTypeClass, String>(typeClass, alias));
} | [
"Retrieve a field from a particular entity using its alias.\n\n@param typeClass the type of entity we are interested in\n@param alias the alias\n@return the field type referred to be the alias, or null if not found"
] | [
"Convert a string to a URL and fallback to classpath resource, if not convertible.\n\n@param s\nThe string to convert.\n\n@return The URL.",
"read message from file\n\n@param readOffset offset in this channel(file);not the message offset\n@param size max data size\n@return messages sharding data with file log\n@throws IOException reading file failed",
"Each element of the second array is added to each element of the first.",
"Adds the specified list of users as members of the project. Returns the updated project record.\n\n@param project The project to add members to.\n@return Request object",
"Records the result of updating a server group.\n\n@param serverGroup the server group's name. Cannot be <code>null</code>\n@param failed <code>true</code> if the server group update failed;\n<code>false</code> if it succeeded",
"This method retrieves a Duration instance representing the amount of\nwork between two dates based on this calendar.\n\n@param startDate start date\n@param endDate end date\n@param format required duration format\n@return amount of work",
"Create an object of the given type using a constructor that matches the\nsupplied arguments and invoke the setters with the supplied variables.\n\n@param <T> the object type\n@param clazz\nthe type to create\n@param args\nthe arguments to the constructor\n@param vars\nthe named arguments for setters\n@return a new object of the given type, initialized with the given\narguments\n@throws NoSuchConstructorException\nif there is not a constructor that matches the given\narguments\n@throws AmbiguousConstructorException\nif there is more than one constructor that matches the given\narguments\n@throws ReflectiveOperationException\nif any of the reflective operations throw an exception",
"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",
"Counts additional occurrences of a property as the main property of\nstatements.\n\n@param usageStatistics\nstatistics object where count is stored\n@param property\nthe property to count\n@param count\nthe number of times to count the property"
] |
public static Statement open(String driverklass, String jdbcuri,
Properties props) {
try {
Driver driver = (Driver) ObjectUtils.instantiate(driverklass);
Connection conn = driver.connect(jdbcuri, props);
if (conn == null)
throw new DukeException("Couldn't connect to database at " +
jdbcuri);
return conn.createStatement();
} catch (SQLException e) {
throw new DukeException(e);
}
} | [
"Opens a JDBC connection with the given parameters."
] | [
"domain.xml",
"Initialize the class if this is being called with Spring.",
"Return a collection of Photo objects not in part of any sets.\n\nThis method requires authentication with 'read' permission.\n\n@param perPage\nThe per page\n@param page\nThe page\n@return The collection of Photo objects\n@throws FlickrException",
"Puts a single byte if the buffer is not yet full.\n\n@return true if the byte was put, or false if the buffer is full",
"Convert a Planner date-time value into a Java date.\n\n20070222T080000Z\n\n@param value Planner date-time\n@return Java Date instance",
"check if MessageID exists in the message, if not, only generate new MessageID for outbound message.\n@param message",
"Set the specular intensity of the light.\n\nThis designates the color of the specular reflection.\nIt is multiplied by the material specular color to derive\nthe hue of the specular reflection for that material.\nThe built-in phong shader {@link GVRPhongShader} uses a {@code vec4} uniform named\n{@code specular_intensity} to control the specular intensity.\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)",
"Try to fire a given event on the Browser.\n\n@param eventable the eventable to fire\n@return true iff the event is fired",
"Calls beforeMaterialization on all registered listeners in the reverse\norder of registration."
] |
private void addServer(CmsSiteMatcher matcher, CmsSite site) {
Map<CmsSiteMatcher, CmsSite> siteMatcherSites = new HashMap<CmsSiteMatcher, CmsSite>(m_siteMatcherSites);
siteMatcherSites.put(matcher, site);
setSiteMatcherSites(siteMatcherSites);
} | [
"Adds a new Site matcher object to the map of server names.\n\n@param matcher the SiteMatcher of the server\n@param site the site to add"
] | [
"Query a player to determine the port on which its database server is running.\n\n@param announcement the device announcement with which we detected a new player on the network.",
"Returns the texture magnification filter\n\nIf missing, defaults to {@link GL_LINEAR }\n\n@param type the texture type\n@param index the index in the texture stack\n@return the texture magnification filter",
"Tells you if the expression is true, which can be true or Boolean.TRUE.\n@param expression\nexpression\n@return\nas described",
"return a prepared Select Statement for the given ClassDescriptor",
"Obtains a local date in Ethiopic calendar system from the\nera, year-of-era and day-of-year fields.\n\n@param era the Ethiopic era, not null\n@param yearOfEra the year-of-era\n@param dayOfYear the day-of-year\n@return the Ethiopic local date, not null\n@throws DateTimeException if unable to create the date\n@throws ClassCastException if the {@code era} is not a {@code EthiopicEra}",
"Creates a pattern choice radio button and adds it where necessary.\n@param pattern the pattern that should be chosen by the button.\n@param messageKey the message key for the button's label.",
"Attaches an arbitrary object to this context.\n\n@param key they attachment key used to ensure uniqueness and used for retrieval of the value.\n@param value the value to store.\n@param <V> the value type of the attachment.\n\n@return the previous value associated with the key or {@code null} if there was no previous value.",
"Returns all the persistent id generators which potentially require the creation of an object in the schema.",
"Adds not Null criteria,\ncustomer_id is not Null\nThe attribute will NOT be translated into column name\n\n@param column The column name to be used without translation"
] |
public static void toggleStyleName(final UIObject uiObject,
final boolean toggleStyle,
final String styleName) {
if (toggleStyle) {
uiObject.addStyleName(styleName);
} else {
uiObject.removeStyleName(styleName);
}
} | [
"Toggles a style name on a ui object\n\n@param uiObject Object to toggle style on\n@param toggleStyle whether or not to toggle the style name on the object\n@param styleName Style name"
] | [
"Try to extract a numeric version from a collection of strings.\n\n@param versionStrings Collection of string properties.\n@return The version string if exists in the collection.",
"Sets the timewarp setting from a numeric string\n\n@param timewarp a numeric string containing the number of milliseconds since the epoch",
"Loads the SPI backing bean.\n\n@return the instance of MonetaryFormatsSingletonSpi to be used by this singleton.",
"Formats a date or a time range according to the local conventions.\n\nYou should ensure that start/end are in the same timezone; formatDateRange()\ndoesn't handle start/end in different timezones well.\n\nSee {@link android.text.format.DateUtils#formatDateRange} for full docs.\n\n@param context the context is required only if the time is shown\n@param start the start time\n@param end the end time\n@param flags a bit mask of options\n@return a string containing the formatted date/time range",
"Translate the given byte array into a string of 1s and 0s\n\n@param bytes The bytes to translate\n@return The string",
"Prints a report about the statistics stored in the given data object.\n\n@param usageStatistics\nthe statistics object to print\n@param entityLabel\nthe label to use to refer to this kind of entities (\"items\" or\n\"properties\")",
"Calculate the layout offset",
"Process each regex group matched substring of the given CharSequence. If the closure\nparameter takes one argument, an array with all match groups is passed to it.\nIf the closure takes as many arguments as there are match groups, then each\nparameter will be one match group.\n\n@param self the source CharSequence\n@param regex a Regex CharSequence\n@param closure a closure with one parameter or as much parameters as groups\n@return the source CharSequence\n@see #eachMatch(String, String, groovy.lang.Closure)\n@since 1.8.2",
"Request a database sends a list of UUIDs.\n\n@param count The count of UUIDs."
] |
private void modifyBeliefCount(int count){
introspector.setBeliefValue(getLocalName(), Definitions.RECEIVED_MESSAGE_COUNT, getBeliefCount()+count, null);
} | [
"Modifies the \"msgCount\" belief\n\n@param int - the number to add or remove"
] | [
"Create an info object from an authscope object.\n\n@param authscope the authscope",
"Populates the bean by mapping the processed columns to the fields of the bean.\n\n@param resultBean\nthe bean to populate\n@param nameMapping\nthe name mappings\n@return the populated bean\n@throws SuperCsvReflectionException\nif there was a reflection exception while populating the bean",
"Send a device update to all registered update listeners.\n\n@param update the device update that has just arrived",
"Bessel function of the first kind, of order 0.\n\n@param x Value.\n@return I0 value.",
"Returns whether this subnet or address has alphabetic digits when printed.\n\nNote that this method does not indicate whether any address contained within this subnet has alphabetic digits,\nonly whether the subnet itself when printed has alphabetic digits.\n\n@return whether the section has alphabetic digits when printed.",
"Converts the provided javascript object to JSON string.\n\n<p>If the object is a Map instance, it is stringified as key-value pairs, if it is a list, it is stringified as\na list, otherwise the object is merely converted to string using the {@code toString()} method.\n\n@param object the object to stringify.\n\n@return the object as a JSON string",
"Encode a path segment, escaping characters not valid for a URL.\n\n<p>The following characters are not escaped:\n\n<ul>\n<li>{@code a..z, A..Z, 0..9}\n<li>{@code . - * _}\n</ul>\n\n<p>' ' (space) is encoded as '+'.\n\n<p>All other characters (including '/') are converted to the triplet \"%xy\" where \"xy\" is the\nhex representation of the character in UTF-8.\n\n@param component a string containing text to encode.\n@return a string with all invalid URL characters escaped.",
"Reads the next \"word from the request, comprising all characters up to the next SPACE.\nCharacters are tested by the supplied CharacterValidator, and an exception is thrown\nif invalid characters are encountered.",
"Upload file and set odo overrides and configuration of odo\n\n@param fileName File containing configuration\n@param odoImport Import odo configuration in addition to overrides\n@return If upload was successful"
] |
public Duration getStartVariance()
{
Duration variance = (Duration) getCachedValue(AssignmentField.START_VARIANCE);
if (variance == null)
{
TimeUnit format = getParentFile().getProjectProperties().getDefaultDurationUnits();
variance = DateHelper.getVariance(getTask(), getBaselineStart(), getStart(), format);
set(AssignmentField.START_VARIANCE, variance);
}
return (variance);
} | [
"Calculate the start variance.\n\n@return start variance"
] | [
"calculate and set position to menu items",
"Recover log up to the last complete entry. Truncate off any bytes from any incomplete\nmessages written\n\n@throws IOException any exception",
"Emit a string event with parameters.\n\nThis will invoke all {@link SimpleEventListener} bound to the specified\nstring value given the listeners has the matching argument list.\n\nFor example, suppose we have the following simple event listener methods:\n\n```java\n{@literal @}On(\"USER-LOGIN\")\npublic void logUserLogin(User user, long timestamp) {...}\n\n{@literal @}On(\"USER-LOGIN\")\npublic void checkDuplicateLoginAttempts(User user, Object... args) {...}\n\n{@literal @}On(\"USER-LOGIN\")\npublic void foo(User user) {...}\n```\n\nThe following code will invoke `logUserLogin` and `checkDuplicateLoginAttempts` methods:\n\n```java\nUser user = ...;\neventBus.emit(\"USER-LOGIN\", user, System.currentTimeMills());\n```\n\nThe `foo(User)` will not invoked because:\n\n* The parameter list `(User, long)` does not match the declared argument list `(User)`.\nHere the `String` in the parameter list is taken out because it is used to indicate\nthe event, instead of being passing through to the event handler method.\n* The method `checkDuplicateLoginAttempts(User, Object ...)` will be invoked because\nit declares a varargs typed arguments, meaning it matches any parameters passed in.\n\n@param event\nthe target event\n@param args\nthe arguments passed in\n@see SimpleEventListener",
"Process the graphical indicator criteria for a single column.\n\n@param type field type\n@return indicator criteria data",
"Creates the given directory. Fails if it already exists.",
"common utility method for adding a statement to a record",
"Initialize the style generators for the messages table.",
"Close the open stream.\n\nClose the stream if it was opened before",
"Retrieves the amount of time represented by a calendar exception\nbefore or after an intersection point.\n\n@param exception calendar exception\n@param date intersection time\n@param after true to report time after intersection, false to report time before\n@return length of time in milliseconds"
] |
private static long scanForLocSig(FileChannel channel) throws IOException {
channel.position(0);
ByteBuffer bb = getByteBuffer(CHUNK_SIZE);
long end = channel.size();
while (channel.position() <= end) {
read(bb, channel);
int bufferPos = 0;
while (bufferPos <= bb.limit() - SIG_PATTERN_LENGTH) {
// Following is based on the Boyer Moore algorithm but simplified to reflect
// a) the size of the pattern is static
// b) the pattern is static and has no repeating bytes
int patternPos;
for (patternPos = SIG_PATTERN_LENGTH - 1;
patternPos >= 0 && LOCSIG_PATTERN[patternPos] == bb.get(bufferPos + patternPos);
--patternPos) {
// empty loop while bytes match
}
// Outer switch gives same results as checking the "good suffix array" in the Boyer Moore algorithm
switch (patternPos) {
case -1: {
// Pattern matched. Confirm is this is the start of a valid local file record
long startLocRecord = channel.position() - bb.limit() + bufferPos;
long currentPos = channel.position();
if (validateLocalFileRecord(channel, startLocRecord, -1)) {
return startLocRecord;
}
// Restore position in case it shifted
channel.position(currentPos);
// wasn't a valid local file record; continue scan
bufferPos += 4;
break;
}
case 3: {
// No bytes matched; the common case.
// With our pattern, this is the only case where the Boyer Moore algorithm's "bad char array" may
// produce a shift greater than the "good suffix array" (which would shift 1 byte)
int idx = bb.get(bufferPos + patternPos) - Byte.MIN_VALUE;
bufferPos += LOC_BAD_BYTE_SKIP[idx];
break;
}
default:
// 1 or more bytes matched
bufferPos += 4;
}
}
}
return -1;
} | [
"Boyer Moore scan that proceeds forwards from the end of the file looking for the first LOCSIG"
] | [
"Return the basis functions for the regression suitable for this product.\n\n@param fixingDate The condition time.\n@param model The model\n@return The basis functions for the regression suitable for this product.\n@throws net.finmath.exception.CalculationException Thrown if the valuation fails, specific cause may be available via the <code>cause()</code> method.",
"Update a variable name with a date if the variable is detected as being a date.\n\n@param variableName the variable name.\n@param date the date to replace the value with if the variable is a date variable.",
"Returns the directory of the URL.\n\n@param urlString URL of the file.\n@return The directory string.\n@throws IllegalArgumentException if URL is malformed",
"Handles the response of the SendData request.\n@param incomingMessage the response message to process.",
"Answer the orderBy of all Criteria and Sub Criteria\nthe elements are of class Criteria.FieldHelper\n@return List",
"used by Error template",
"Extracts the rank of a matrix using a preexisting decomposition.\n\n@see #singularThreshold(SingularValueDecomposition_F64)\n\n@param svd A precomputed decomposition. Not modified.\n@param threshold Tolerance used to determine of a singular value is singular.\n@return The rank of the decomposed matrix.",
"Removes an Object from the cache.",
"Writes references that have been added recently. Auxiliary triples that\nare generated for serializing snaks in references will be written right\nafterwards. This will also trigger any other auxiliary triples to be\nwritten that the snak converter object may have buffered.\n\n@throws RDFHandlerException\nif there was a problem writing the restrictions"
] |
public Object remove(String name) {
Bean bean = beans.get(name);
if (null != bean) {
beans.remove(name);
bean.destructionCallback.run();
return bean.object;
}
return null;
} | [
"Remove a bean from the context, calling the destruction callback if any.\n\n@param name bean name\n@return previous value"
] | [
"Deletes this BoxStoragePolicyAssignment.",
"Blocking function which completes the migration of one store\n\n@param storeName The name of the store\n@param adminClient Admin client used to initiate the copying of data\n@param stealInfo The steal information\n@param isReadOnlyStore Boolean indicating that this is a read-only store",
"Moves the request line reader to end of the line, checking that no non-space\ncharacter are found.\n\n@throws ProtocolException If more non-space tokens are found in this line,\nor the end-of-file is reached.",
"Get a default style. If null a simple black line style will be returned.\n\n@param geometryType the name of the geometry type (point, line, polygon)",
"Check if values in the column \"property\" are written to the bundle descriptor.\n@param property the property id of the table column.\n@return a flag, indicating if values of the table column are stored to the bundle descriptor.",
"Adds a metadata classification to the specified file.\n\n@param classificationType the metadata classification type.\n@return the metadata classification type added to the file.",
"Format a calendar instance that is parseable from JavaScript, according to ISO-8601.\n\n@param cal the calendar to format to a JSON string\n@return a formatted date in the form of a string",
"Use this API to fetch all the sslservice resources that are configured on netscaler.\nThis uses sslservice_args which is a way to provide additional arguments while fetching the resources.",
"Use this API to kill systemsession."
] |
public PhotoList<Photo> getUntagged(int perPage, int page) throws FlickrException {
Map<String, Object> parameters = new HashMap<String, Object>();
parameters.put("method", METHOD_GET_UNTAGGED);
if (perPage > 0) {
parameters.put("per_page", Integer.toString(perPage));
}
if (page > 0) {
parameters.put("page", Integer.toString(page));
}
Response response = transport.get(transport.getPath(), parameters, apiKey, sharedSecret);
if (response.isError()) {
throw new FlickrException(response.getErrorCode(), response.getErrorMessage());
}
Element photosElement = response.getPayload();
PhotoList<Photo> photos = PhotoUtils.createPhotoList(photosElement);
return photos;
} | [
"Get the collection of untagged photos.\n\nThis method requires authentication with 'read' permission.\n\n@param perPage\n@param page\n@return A Collection of Photos\n@throws FlickrException"
] | [
"Use this API to fetch appfwprofile_csrftag_binding resources of given name .",
"Start the rendering of the scalebar.",
"Return the available format ids.",
"Generate the global CSS style for the whole document.\n@return the CSS code used in the generated document header",
"Starts the ephemeral node and waits for it to be created\n\n@param node Node to start\n@param maxWaitSec Maximum time in seconds to wait",
"Initialize the connection with the specified properties in OJB\nconfiguration files and platform depended properties.\nInvoke this method after a NEW connection is created, not if re-using from pool.\n\n@see org.apache.ojb.broker.platforms.PlatformFactory\n@see org.apache.ojb.broker.platforms.Platform",
"Curries a function that takes two arguments.\n\n@param function\nthe original function. May not be <code>null</code>.\n@param argument\nthe fixed first argument of {@code function}.\n@return a function that takes one argument. Never <code>null</code>.",
"Gets the value of the resourceRequestCriterion property.\n\n<p>\nThis accessor method returns a reference to the live list,\nnot a snapshot. Therefore any modification you make to the\nreturned list will be present inside the JAXB object.\nThis is why there is not a <CODE>set</CODE> method for the resourceRequestCriterion property.\n\n<p>\nFor example, to add a new item, do as follows:\n<pre>\ngetResourceRequestCriterion().add(newItem);\n</pre>\n\n\n<p>\nObjects of the following type(s) are allowed in the list\n{@link ResourceRequestType.ResourceRequestCriterion }",
"Moves a calendar to the last named day of the month.\n\n@param calendar current date"
] |
public static boolean isPassivatingScope(Bean<?> bean, BeanManagerImpl manager) {
if (bean == null) {
return false;
} else {
return manager.getServices().get(MetaAnnotationStore.class).getScopeModel(bean.getScope()).isPassivating();
}
} | [
"Indicates if a bean's scope type is passivating\n\n@param bean The bean to inspect\n@return True if the scope is passivating, false otherwise"
] | [
"Returns true if this Bytes object equals another. This method checks it's arguments.\n\n@since 1.2.0",
"Makes this pose the inverse of the input pose.\n@param src pose to invert.",
"Deletes an individual alias\n\n@param alias\nthe alias to delete",
"Returns a flag, indicating if search should be performed using a wildcard if the empty query is given.\n@return A flag, indicating if search should be performed using a wildcard if the empty query is given.",
"Writes the JavaScript code describing the tags as Tag classes to given writer.",
"Use this API to unset the properties of responderpolicy resource.\nProperties that need to be unset are specified in args array.",
"Sets currency symbol.\n\n@param symbol currency symbol",
"Runs through the log removing segments older than a certain age\n\n@throws IOException",
"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"
] |
public LBuffer slice(long from, long to) {
if(from > to)
throw new IllegalArgumentException(String.format("invalid range %,d to %,d", from, to));
long size = to - from;
LBuffer b = new LBuffer(size);
copyTo(from, b, 0, size);
return b;
} | [
"Extract a slice [from, to) of this buffer. This methods creates a copy of the specified region.\n@param from\n@param to\n@return"
] | [
"Bessel function of the second kind, of order 0.\n\n@param x Value.\n@return Y0 value.",
"After cluster management operations, i.e. reset quota and recover quota\nenforcement settings",
"Static factory method to build a JSON Patch out of a JSON representation.\n\n@param node the JSON representation of the generated JSON Patch\n@return a JSON Patch\n@throws IOException input is not a valid JSON patch\n@throws NullPointerException input is null",
"Rollback to the specified push version\n\n@param rollbackToDir The version directory to rollback to",
"Use this API to fetch vlan_nsip6_binding resources of given name .",
"Searches for a sequence of integers\n\nexample:\n1 2 3 4 6 7 -3",
"Register an active operation with a specific operation id.\n\n@param id the operation id\n@param attachment the shared attachment\n@param callback the completed callback\n@return the created active operation\n\n@throws java.lang.IllegalStateException if an operation with the same id is already registered",
"If the HttpRequest is valid and handled it will be sent upstream, if it cannot be invoked\nthe response will be written back immediately.",
"Calculate standart deviation.\n@param values Values.\n@param mean Mean.\n@return Standart deviation."
] |
public float getPositionY(int vertex) {
if (!hasPositions()) {
throw new IllegalStateException("mesh has no positions");
}
checkVertexIndexBounds(vertex);
return m_vertices.getFloat((vertex * 3 + 1) * SIZEOF_FLOAT);
} | [
"Returns the y-coordinate of a vertex position.\n\n@param vertex the vertex index\n@return the y coordinate"
] | [
"This may cost twice what it would in the original Map because we have to find\nthe original value for this key.\n\n@param key key with which the specified value is to be associated.\n@param value value to be associated with the specified key.\n@return previous value associated with specified key, or <tt>null</tt>\nif there was no mapping for key. A <tt>null</tt> return can\nalso indicate that the map previously associated <tt>null</tt>\nwith the specified key, if the implementation supports\n<tt>null</tt> values.",
"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",
"Executes the API action \"wbsetaliases\" for the given parameters.\n\n@param id\nthe id of the entity to be edited; if used, the site and title\nparameters must be null\n@param site\nwhen selecting an entity by title, the site key for the title,\ne.g., \"enwiki\"; if used, title must also be given but id must\nbe null\n@param title\nstring used to select an entity by title; if used, site must\nalso be given but id must be null\n@param newEntity\nused for creating a new entity of a given type; the value\nindicates the intended entity type; possible values include\n\"item\" and \"property\"; if used, the parameters id, site, and\ntitle must be null\n@param language\nthe language code for the label\n@param add\nthe values of the aliases to add. They will be merged with the\nexisting aliases. This parameter cannot be used in conjunction\nwith \"set\".\n@param remove\nthe values of the aliases to remove. Other aliases will be retained.\nThis parameter cannot be used in conjunction with \"set\".\n@param set\nthe values of the aliases to set. This will erase any existing\naliases in this language and replace them by the given list.\n@param bot\nif true, edits will be flagged as \"bot edits\" provided that\nthe logged in user is in the bot group; for regular users, the\nflag will just be ignored\n@param baserevid\nthe revision of the data that the edit refers to or 0 if this\nshould not be submitted; when used, the site will ensure that\nno edit has happened since this revision to detect edit\nconflicts; it is recommended to use this whenever in all\noperations where the outcome depends on the state of the\nonline data\n@param summary\nsummary for the edit; will be prepended by an automatically\ngenerated comment; the length limit of the autocomment\ntogether with the summary is 260 characters: everything above\nthat limit will be cut off\n@return the JSON response from the API\n@throws IOException\nif there was an IO problem. such as missing network\nconnection\n@throws MediaWikiApiErrorException\nif the API returns an error\n@throws IOException\n@throws MediaWikiApiErrorException",
"Fetch the next event from a given stream\n@return the next event\n@throws IOException any io exception that could occur",
"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",
"Use this API to update csparameter.",
"Tells you if the date part of a datetime is in a certain time range.",
"Returns the y-coordinate of a vertex normal.\n\n@param vertex the vertex index\n@return the y coordinate",
"Returns the total number of elements which are true.\n@return number of elements which are set to true"
] |
public ModelNode registerDeploymentSubsystemResource(final String subsystemName, final Resource resource) {
assert subsystemName != null : "The subsystemName cannot be null";
assert resource != null : "The resource cannot be null";
return registerDeploymentSubResource(subsystemName, PathAddress.EMPTY_ADDRESS, resource);
} | [
"Registers the resource to the parent deployment resource. The model returned is that of the resource parameter.\n\n@param subsystemName the subsystem name\n@param resource the resource to be used for the subsystem on the deployment\n\n@return the model\n\n@throws java.lang.IllegalStateException if the subsystem resource already exists"
] | [
"Returns the latest change events for a given namespace.\n\n@param namespace the namespace to get events for.\n@return the latest change events for a given namespace.",
"Called when app's singleton registry has been initialized",
"Use this API to fetch all the dnspolicylabel resources that are configured on netscaler.",
"Adds a tag to a task. Returns an empty data block.\n\n@param task The task to add a tag to.\n@return Request object",
"Dump the contents of a row from an MPD file.\n\n@param row row data",
"Looks up a variable given its name. If none is found then return null.",
"Returns true if the activity is a milestone.\n\n@param activity Phoenix activity\n@return true if the activity is a milestone",
"Add a '<=' clause so the column must be less-than or equals-to the value.",
"Write exceptions in the format used by MSPDI files prior to Project 2007.\n\n@param dayList list of calendar days\n@param exceptions list of exceptions"
] |
@Override
public void close() {
// unregister MBeans
if(stats != null) {
try {
if(this.jmxEnabled)
JmxUtils.unregisterMbean(getAggregateMetricName());
} catch(Exception e) {}
stats.close();
}
factory.close();
queuedPool.close();
} | [
"Permanently close the ClientRequestExecutor pool. Resources subsequently\nchecked in will be destroyed."
] | [
"Dump the contents of a row from an MPD file.\n\n@param row row data",
"Retrieves the content of the filename. Also reads from JAR Searches for the resource in the\nroot folder in the jar\n\n@param fileName Filename.\n@return The contents of the file.\n@throws IOException On error.",
"Creates a pattern choice radio button and adds it where necessary.\n@param pattern the pattern that should be chosen by the button.\n@param messageKey the message key for the button's label.",
"Save page to log\n\n@return address of this page after save",
"Returns whether the given host matches this one. For hosts to match, they must represent the same addresses or have the same host names.\nHosts are not resolved when matching. Also, hosts must have the same port and service. They must have the same masks if they are host names.\nEven if two hosts are invalid, they match if they have the same invalid string.\n\n@param host\n@return",
"Use this API to fetch onlinkipv6prefix resources of given names .",
"Retrieve a calendar exception which applies to this date.\n\n@param date target date\n@return calendar exception, or null if none match this date",
"Set value for given object field.\n\n@param object object to be updated\n@param field field name\n@param value field value\n\n@throws NoSuchMethodException if property writer is not available\n@throws InvocationTargetException if property writer throws an exception\n@throws IllegalAccessException if property writer is inaccessible",
"Sets the proxy class to be used.\n@param newProxyClass java.lang.Class"
] |
public static void checkDirectory(File directory) {
if (!(directory.exists() || directory.mkdirs())) {
throw new ReportGenerationException(
String.format("Can't create data directory <%s>", directory.getAbsolutePath())
);
}
} | [
"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"
] | [
"Starts the compressor.",
"Use this API to delete clusterinstance of given name.",
"Use this API to fetch a vpnglobal_vpnnexthopserver_binding resources.",
"Returns new boolean matrix with true or false values selected with equal probability.\n\n@param numRow Number of rows in the new matrix.\n@param numCol Number of columns in the new matrix.\n@param rand Random number generator used to fill the matrix.\n@return The randomly generated matrix.",
"Returns a new iterable filtering any null references.\n\n@param unfiltered\nthe unfiltered iterable. May not be <code>null</code>.\n@return an unmodifiable iterable containing all elements of the original iterable without any <code>null</code> references. Never <code>null</code>.",
"Creates a copy with verbose mode enabled.\n\n@param serverSetups the server setups.\n@return copies of server setups with verbose mode enabled.",
"Count the number of non-zero elements in R",
"Use this API to fetch statistics of nslimitidentifier_stats resource of given name .",
"Prepares a representation of the model that is easier accessible for our purposes.\n\n@param model The original model\n@return The model representation"
] |
private JSONObject getARP(final Context context) {
try {
final String nameSpaceKey = getNamespaceARPKey();
if (nameSpaceKey == null) return null;
final SharedPreferences prefs = StorageHelper.getPreferences(context, nameSpaceKey);
final Map<String, ?> all = prefs.getAll();
final Iterator<? extends Map.Entry<String, ?>> iter = all.entrySet().iterator();
while (iter.hasNext()) {
final Map.Entry<String, ?> kv = iter.next();
final Object o = kv.getValue();
if (o instanceof Number && ((Number) o).intValue() == -1) {
iter.remove();
}
}
final JSONObject ret = new JSONObject(all);
getConfigLogger().verbose(getAccountId(), "Fetched ARP for namespace key: " + nameSpaceKey + " values: " + all.toString());
return ret;
} catch (Throwable t) {
getConfigLogger().verbose(getAccountId(), "Failed to construct ARP object", t);
return null;
}
} | [
"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."
] | [
"This method retrieves a String of the specified type,\nbelonging to the item with the specified unique ID.\n\n@param id unique ID of entity to which this data belongs\n@param type data type identifier\n@return string containing required data",
"Parses the input stream to read the header\n\n@param input data input to read from\n@return the parsed protocol header\n@throws IOException",
"Returns the name of this alias if path has been added\nto the aliased portions of attributePath\n\n@param path the path to test for inclusion in the alias",
"Resizes the array that represents this bit vector.\n\n@param newArraySize\nnew array size",
"Generates a set of excluded method names.\n\n@param methodNames method names\n@return set of method names",
"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.",
"Remove script for a given ID\n\n@param id ID of script\n@throws Exception exception",
"Creates a new RDF serializer based on the current configuration of this\nobject.\n\n@return the newly created RDF serializer\n@throws IOException\nif there were problems opening the output files",
"Use this API to add nsacl6 resources."
] |
public static final void getByteArray(byte[] data, int offset, int size, byte[] buffer, int bufferOffset)
{
System.arraycopy(data, offset, buffer, bufferOffset, size);
} | [
"This method extracts a portion of a byte array and writes it into\nanother byte array.\n\n@param data Source data\n@param offset Offset into source data\n@param size Required size to be extracted from the source data\n@param buffer Destination buffer\n@param bufferOffset Offset into destination buffer"
] | [
"Injects bound fields\n\n@param instance The instance to inject into",
"returns true if a job was queued within a timeout",
"This method returns the value of the product using a Black-Scholes model for the swap rate with the Hunt-Kennedy convexity adjustment.\nThe model is determined by a discount factor curve and a swap rate volatility.\n\n@param forwardCurve The forward curve from which the swap rate is calculated. The discount curve, associated with this forward curve is used for discounting this option.\n@param swaprateVolatility The volatility of the log-swaprate.\n@return Value of this product",
"Get the seconds difference",
"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",
"Deletes this BoxStoragePolicyAssignment.",
"Sets the day of the month that matches the condition, i.e., the day of month of the 2nd Saturday.\nIf the day does not exist in the current month, the last possible date is set, i.e.,\ninstead of the fifth Saturday, the fourth is chosen.\n\n@param date date that has the correct year and month already set.\n@param week the number of the week to choose.",
"Retrieves state and metrics information for individual channel.\n\n@param name channel name\n@return channel information",
"Calculates Tangent value of the complex number.\n\n@param z1 A ComplexNumber instance.\n@return Returns new ComplexNumber instance containing the Tangent value of the specified complex number."
] |
public Entry<T>[] entries() {
@SuppressWarnings("unchecked")
Entry<T>[] entries = new Entry[size];
int idx = 0;
for (Entry entry : table) {
while (entry != null) {
entries[idx++] = entry;
entry = entry.next;
}
}
return entries;
} | [
"Returns all entries in no particular order."
] | [
"Places a disabled marker file in the directory of the specified version.\n\n@param version to disable\n@throws PersistenceFailureException if the marker file could not be created (can happen if\nthe storage system has become read-only or is otherwise\ninaccessible).",
"Adds new holes to the polygon.\n\n@param holes holes, must be contained in the exterior ring and must not overlap or\nintersect another hole\n@return this for chaining",
"Add \"GROUP BY\" clause to the SQL query statement. This can be called multiple times to add additional \"GROUP BY\"\nclauses.\n\n<p>\nNOTE: Use of this means that the resulting objects may not have a valid ID column value so cannot be deleted or\nupdated.\n</p>",
"Extract raw table data from the input stream.\n\n@param is input stream",
"Extracts the value of this bit flag from the supplied byte array\nand sets the value in the supplied container.\n\n@param container container\n@param data byte array",
"Computes the eigenvalues of a 2 by 2 matrix using a faster but more prone to errors method. This\nis the typical method.",
"Gets a SerialMessage with the MULTI INSTANCE GET command.\nReturns the number of instances for this command class.\n@param the command class to return the number of instances for.\n@return the serial message.",
"Reads the entity hosting the association from the datastore and applies any property changes from the server\nside.",
"Finds an Object of the specified type.\n\n@param <T> Object type.\n@param classType The class of type T.\n@param id The document _id field.\n@param rev The document _rev field.\n@return An object of type T.\n@throws NoDocumentException If the document is not found in the database."
] |
public void addPieSlice(PieModel _Slice) {
highlightSlice(_Slice);
mPieData.add(_Slice);
mTotalValue += _Slice.getValue();
onDataChanged();
} | [
"Adds a new Pie Slice to the PieChart. After inserting and calculation of the highlighting color\na complete recalculation is initiated.\n\n@param _Slice The newly added PieSlice."
] | [
"Search for rectangles which have the same width and x position, and\nwhich join together vertically and merge them together to reduce the\nnumber of rectangles needed to describe a symbol.",
"Returns the screen width in pixels\n\n@param context is the context to get the resources\n@return the screen width in pixels",
"Clean up the environment object for the given storage engine",
"Updates the existing cluster such that we remove partitions mentioned\nfrom the stealer node and add them to the donor node\n\n@param currentCluster Existing cluster metadata. Both stealer and donor\nnode should already exist in this metadata\n@param stealerNodeId Id of node for which we are stealing the partitions\n@param donatedPartitions List of partitions we are moving\n@return Updated cluster metadata",
"Looks up the EJB in the container and executes the method on it\n\n@param self the proxy instance.\n@param method the overridden method declared in the super class or\ninterface.\n@param proceed the forwarder method for invoking the overridden method. It\nis null if the overridden method is abstract or declared in the\ninterface.\n@param args an array of objects containing the values of the arguments\npassed in the method invocation on the proxy instance. If a\nparameter type is a primitive type, the type of the array\nelement is a wrapper class.\n@return the resulting value of the method invocation.\n@throws Throwable if the method invocation fails.",
"Request a scoped transactional token for a particular resource.\n@param accessToken application access token.\n@param scope scope of transactional token.\n@param resource resource transactional token has access to.\n@return a BoxAPIConnection which can be used to perform transactional requests.",
"Encodes the given source into an encoded String using the rules specified\nby the given component and with the given options.\n@param source the source string\n@param encoding the encoding of the source string\n@param type the URI component for the source\n@return the encoded URI\n@throws IllegalArgumentException when the given uri parameter is not a valid URI",
"Determine if a CharSequence can be parsed as a BigDecimal.\n\n@param self a CharSequence\n@return true if the CharSequence can be parsed\n@see #isBigDecimal(String)\n@since 1.8.2",
"A map of the header key value pairs. Keys are strings and values are either list of strings or a\nstring.\n\n@param headers the header map"
] |
public void stopDrag() {
mPhysicsDragger.stopDrag();
mPhysicsContext.runOnPhysicsThread(new Runnable() {
@Override
public void run() {
if (mRigidBodyDragMe != null) {
NativePhysics3DWorld.stopDrag(getNative());
mRigidBodyDragMe = null;
}
}
});
} | [
"Stop the drag action."
] | [
"Returns a new ObjectPool for the specified connection descriptor.\nOverride this method to setup your own pool.\n@param jcd the connection descriptor for which to set up the pool\n@return a newly created object pool",
"Emit information about a single suite and all of its tests.",
"Returns the complete record for a single status update.\n\n@param projectStatus The project status update to get.\n@return Request object",
"Search one prototype using the prototype index which is equals to the view type. This method\nhas to be implemented because prototypes member is declared with Collection and that interface\ndoesn't allow the client code to get one element by index.\n\n@param prototypeIndex used to search.\n@return prototype renderer.",
"Handles week day changes.\n@param event the change event.",
"Decomposes the provided matrix and stores the result in the same matrix.\n\n@param A Matrix that is to be decomposed. Modified.\n@return If it succeeded or not.",
"Whether the given grid dialect implements the specified facet or not.\n\n@param gridDialect the dialect of interest\n@param facetType the dialect facet type of interest\n@return {@code true} in case the given dialect implements the specified facet, {@code false} otherwise",
"Set a variable in the top variables layer to given \"collection\" of the vertex frames. Can't be reassigned -\nthrows on attempt to reassign.",
"Get a discount curve from the model, if not existing create a discount curve.\n\n@param discountCurveName The name of the discount curve to create.\n@return The discount factor curve associated with the given name."
] |
public final void notifyFooterItemChanged(int position) {
if (position < 0 || position >= footerItemCount) {
throw new IndexOutOfBoundsException("The given position " + position
+ " is not within the position bounds for footer items [0 - "
+ (footerItemCount - 1) + "].");
}
notifyItemChanged(position + headerItemCount + contentItemCount);
} | [
"Notifies that a footer item is changed.\n\n@param position the position."
] | [
"Checks if ranges contain the uid\n\n@param idRanges the id ranges\n@param uid the uid\n@return true, if ranges contain given uid",
"Returns a client model from a ResultSet\n\n@param result resultset containing client information\n@return Client or null\n@throws Exception exception",
"Use this API to fetch service_dospolicy_binding resources of given name .",
"Get a list of referrers from a given domain to a user's photostream.\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 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.getPhotostreamReferrers.html\"",
"Deploys application reading resources from specified InputStream.\n\n@param inputStream where resources are read\n@throws IOException",
"Resolves a conflict between a synchronized document's local and remote state. The resolution\nwill result in either the document being desynchronized or being replaced with some resolved\nstate based on the conflict resolver specified for the document. Uses the last uncommitted\nlocal event as the local state.\n\n@param nsConfig the namespace synchronization config of the namespace where the document\nlives.\n@param docConfig the configuration of the document that describes the resolver and current\nstate.\n@param remoteEvent the remote change event that is conflicting.",
"This method allows a subsection of a byte array to be copied.\n\n@param data source data\n@param offset offset into the source data\n@param size length of the source data to copy\n@return new byte array containing copied data",
"Create a field map for enterprise custom fields.\n\n@param props props data\n@param c target class",
"Generating the input vertices is quite complex. Therefore there are multiple methods that handles the input vertices\nbased on the attribute specified in specific order. This method generates all the vertices if there is no other way how to handle\nthe input."
] |
public ArrayList<Duration> segmentBaselineWork(ProjectFile file, List<TimephasedWork> work, TimescaleUnits rangeUnits, ArrayList<DateRange> dateList)
{
return segmentWork(file.getBaselineCalendar(), work, rangeUnits, dateList);
} | [
"This is the main entry point used to convert the internal representation\nof timephased baseline work into an external form which can\nbe displayed to the user.\n\n@param file parent project file\n@param work timephased resource assignment data\n@param rangeUnits timescale units\n@param dateList timescale date ranges\n@return list of durations, one per timescale date range"
] | [
"Runs a Story with the given configuration and steps, applying the given\nmeta filter, and staring from given state.\n\n@param configuration the Configuration used to run story\n@param candidateSteps the List of CandidateSteps containing the candidate\nsteps methods\n@param story the Story to run\n@param filter the Filter to apply to the story Meta\n@param beforeStories the State before running any of the stories, if not\n<code>null</code>\n@throws Throwable if failures occurred and FailureStrategy dictates it to\nbe re-thrown.",
"get the getter method corresponding to given property",
"Add the given pair to a given map for obtaining a new map.\n\n<p>\nThe replied map is a view on the given map. It means that any change\nin the original map is reflected to the result of this operation.\n</p>\n\n<p>\nEven if the key of the right operand exists in the left operand, the value in the right operand is preferred.\n</p>\n\n@param <K> type of the map keys.\n@param <V> type of the map values.\n@param left the map to consider.\n@param right the entry (key, value) to add into the map.\n@return an immutable map with the content of the map and with the given entry.\n@throws IllegalArgumentException - when the right operand key exists in the left operand.\n@since 2.15",
"Create a list out of the items in the Iterable.\n\n@param <T>\nThe type of items in the Iterable.\n@param items\nThe items to be made into a list.\n@return A list consisting of the items of the Iterable, in the same order.",
"Send JSON representation of given data object to all connections tagged with all give tag labels\n@param data the data object\n@param labels the tag labels",
"Recursively write tasks.\n\n@param tasks list of tasks\n@throws IOException",
"Parses a String email address to an IMAP address string.",
"Alternate version of autoGeneratedKeys.\n@param sql\n@param autoGeneratedKeys\n@return cache key to use.",
"Use this API to fetch all the tmsessionparameter resources that are configured on netscaler."
] |
private void writeClassData() {
try (PrintStream out = new PrintStream(openResultFileOuputStream(
resultDirectory, "classes.json"))) {
out.println("{");
// Add direct subclass information:
for (Entry<Integer, ClassRecord> classEntry : this.classRecords
.entrySet()) {
if (classEntry.getValue().subclassCount == 0
&& classEntry.getValue().itemCount == 0) {
continue;
}
for (Integer superClass : classEntry.getValue().directSuperClasses) {
this.classRecords.get(superClass).nonemptyDirectSubclasses
.add(classEntry.getKey().toString());
}
}
int count = 0;
int countNoLabel = 0;
for (Entry<Integer, ClassRecord> classEntry : this.classRecords
.entrySet()) {
if (classEntry.getValue().subclassCount == 0
&& classEntry.getValue().itemCount == 0) {
continue;
}
if (classEntry.getValue().label == null) {
countNoLabel++;
}
if (count > 0) {
out.println(",");
}
out.print("\"" + classEntry.getKey() + "\":");
mapper.writeValue(out, classEntry.getValue());
count++;
}
out.println("\n}");
System.out.println(" Serialized information for " + count
+ " class items.");
System.out.println(" -- class items with missing label: "
+ countNoLabel);
} catch (IOException e) {
e.printStackTrace();
}
} | [
"Writes all data that was collected about classes to a json file."
] | [
"Get the inactive overlay directories.\n\n@return the inactive overlay directories",
"Create content assist proposals and pass them to the given acceptor.",
"Set RGB input range.\n\n@param inRGB Range.",
"Fetch the next event from a given stream\n@return the next event\n@throws IOException any io exception that could occur",
"This method is called to alert project listeners to the fact that\na resource has been written to a project file.\n\n@param resource resource instance",
"Send a track metadata update announcement to all registered listeners.",
"All the sub-level attributes.\n\n@param name the attribute name.\n@param attribute the attribute.",
"Creates an element that represents a single positioned box containing the specified text string.\n@param data the text string to be contained in the created box.\n@return the resulting DOM element",
"Use this API to fetch all the linkset resources that are configured on netscaler."
] |
public T mapRow(ResultSet rs) throws SQLException {
Map<String, Object> map = new HashMap<String, Object>();
ResultSetMetaData metadata = rs.getMetaData();
for (int i = 1; i <= metadata.getColumnCount(); ++i) {
String label = metadata.getColumnLabel(i);
final Object value;
// calling getObject on a BLOB/CLOB produces weird results
switch (metadata.getColumnType(i)) {
case Types.BLOB:
value = rs.getBytes(i);
break;
case Types.CLOB:
value = rs.getString(i);
break;
default:
value = rs.getObject(i);
}
// don't use table name extractor because we don't want aliased table name
boolean overwrite = this.tableName != null && this.tableName.equals(metadata.getTableName(i));
String tableName = TABLE_NAME_EXTRACTOR.getTableName(metadata, i);
if (tableName != null && !tableName.isEmpty()) {
String qualifiedName = tableName + "." + metadata.getColumnName(i);
add(map, qualifiedName, value, overwrite);
}
add(map, label, value, overwrite);
}
return objectMapper.convertValue(map, type);
} | [
"Map a single ResultSet row to a T instance.\n\n@throws SQLException"
] | [
"Reads Phoenix resource assignments.\n\n@param mpxjResource MPXJ resource\n@param res Phoenix resource",
"Sets an attribute in the main section of the manifest to a list.\nThe list elements will be joined with a single whitespace character.\n\n@param name the attribute's name\n@param values 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.",
"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",
"Update an object in the database to change its id to the newId parameter.",
"Search for the attribute \"id\" and return the value.\n\n@return the id of this element or null when not found",
"Return the count of all objects found\nfor given class, using the PB-api within\nODMG - this may change in further versions.",
"Adds a variable to the end of the token list\n@param variable Variable which is to be added\n@return The new Token created around variable",
"Writes the data collected about properties to a file.",
"Sets the underlying write timeout in milliseconds.\nA value of 0 specifies an infinite timeout.\n@see okhttp3.OkHttpClient.Builder#writeTimeout(long, TimeUnit)"
] |
private void populateDateTimeSettings(Record record, ProjectProperties properties)
{
properties.setDateOrder(record.getDateOrder(0));
properties.setTimeFormat(record.getTimeFormat(1));
Date time = getTimeFromInteger(record.getInteger(2));
if (time != null)
{
properties.setDefaultStartTime(time);
}
Character c = record.getCharacter(3);
if (c != null)
{
properties.setDateSeparator(c.charValue());
}
c = record.getCharacter(4);
if (c != null)
{
properties.setTimeSeparator(c.charValue());
}
properties.setAMText(record.getString(5));
properties.setPMText(record.getString(6));
properties.setDateFormat(record.getDateFormat(7));
properties.setBarTextDateFormat(record.getDateFormat(8));
} | [
"Populates date time settings.\n\n@param record MPX record\n@param properties project properties"
] | [
"Parses the given XML doc to extract the properties and return them into a java.util.Properties.\n@param doc to parse\n@param sectionName which section to extract\n@return Properties map",
"Write the field to the specified channel.\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",
"Mapping message info.\n\n@param messageInfo the message info\n@return the message info type",
"Write the config to the writer.",
"Read an optional boolean value form a JSON value.\n@param val the JSON value that should represent the boolean.\n@return the boolean from the JSON or null if reading the boolean fails.",
"Dumps the contents of a structured block made up from a header\nand fixed sized records.\n\n@param headerSize header zie\n@param blockSize block size\n@param data data block",
"Initial setup of the service worker registration.",
"Sets the delegate of the service, that gets notified of the\nstatus of message delivery.\n\nNote: This option has no effect when using non-blocking\nconnections.",
"Sets a quota for a users.\n\n@param user the user.\n@param quota the quota."
] |
public static final Priority parsePriority(BigInteger priority)
{
return (priority == null ? null : Priority.getInstance(priority.intValue()));
} | [
"Parse priority.\n\n\n@param priority priority value\n@return Priority instance"
] | [
"Use this API to delete dnstxtrec resources.",
"Import user from file.",
"For the DC to check whether an operation should be ignored on the slave, if the slave is set up to ignore config not relevant to it\n\n@param domainResource the domain root resource\n@param serverConfigs the server configs the slave is known to have\n@param pathAddress the address of the operation to check if should be ignored or not",
"Print a timestamp value.\n\n@param value time value\n@return time value",
"Validate ipv4 address with regular expression\n\n@param ip\naddress for validation\n\n@return true valid ip address, false invalid ip address",
"Get a timer of the given string name for the given thread. If no such\ntimer exists yet, then it will be newly created.\n\n@param timerName\nthe name of the timer\n@param todoFlags\n@param threadId\nof the thread to track, or 0 if only system clock should be\ntracked\n@return timer",
"Get the bounding box for a certain tile.\n\n@param code\nThe unique tile code. Determines what tile we're talking about.\n@param maxExtent\nThe maximum extent of the grid to which this tile belongs.\n@param scale\nThe current client side scale.\n@return Returns the bounding box for the tile, expressed in the layer's coordinate system.",
"Creates a favorite widget for a favorite entry.\n\n@param entry the favorite entry\n@return the favorite widget\n\n@throws CmsException if something goes wrong",
"Convert an Object of type Class to an Object."
] |
public void recordResourceRequestQueueLength(SocketDestination dest, int queueLength) {
if(dest != null) {
getOrCreateNodeStats(dest).recordResourceRequestQueueLength(null, queueLength);
recordResourceRequestQueueLength(null, queueLength);
} else {
this.resourceRequestQueueLengthHistogram.insert(queueLength);
checkMonitoringInterval();
}
} | [
"Record the resource request queue length\n\n@param dest Destination of the socket for which resource request is\nenqueued. Will actually record if null. Otherwise will call this\non self and corresponding child with this param null.\n@param queueLength The number of entries in the \"asynchronous\" resource\nrequest queue."
] | [
"Performs DBSCAN cluster analysis.\n\n@param points the points to cluster\n@return the list of clusters\n@throws NullArgumentException if the data points are null",
"Uploads files from the given file input fields.<p<\n\n@param fields the set of names of fields containing the files to upload\n@param filenameCallback the callback to call with the resulting map from field names to file paths\n@param errorCallback the callback to call with an error message",
"This method takes the textual version of a constraint name\nand returns an appropriate class instance. Note that unrecognised\nvalues are treated as \"As Soon As Possible\" constraints.\n\n@param locale target locale\n@param type text version of the constraint type\n@return ConstraintType instance",
"Set cached value for the attribute. Used for dynamically loaded values in the Acacia content editor.\n\n@param attribute the attribute for which the value should be cached\n@param value the value to cache",
"Reads a string of single byte characters from the input array.\nThis method assumes that the string finishes either at the\nend of the array, or when char zero is encountered.\nReading begins at the supplied offset into the array.\n\n@param data byte array of data\n@param offset offset into the array\n@return string value",
"Use this API to fetch the statistics of all nspbr6_stats resources that are configured on netscaler.",
"Parse duration time units.\n\nNote that we don't differentiate between confirmed and unconfirmed\ndurations. Unrecognised duration types are default the supplied default value.\n\n@param value BigInteger value\n@param defaultValue if value is null, use this value as the result\n@return Duration units",
"Deletes and publishes resources with ID conflicts.\n\n@param cms the CMS context to use\n@param module the module\n@param conflictingIds the conflicting ids\n@throws CmsException if something goes wrong\n@throws Exception if something goes wrong",
"Get the minutes difference"
] |
private Set<T> findMatching(R resolvable) {
Set<T> result = new HashSet<T>();
for (T bean : getAllBeans(resolvable)) {
if (matches(resolvable, bean)) {
result.add(bean);
}
}
return result;
} | [
"Gets the matching beans for binding criteria from a list of beans\n\n@param resolvable the resolvable\n@return A set of filtered beans"
] | [
"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",
"Write a long attribute.\n\n@param name attribute name\n@param value attribute value",
"Clones the given collection.\n\n@param collDef The collection descriptor\n@param prefix A prefix for the name\n@return The cloned collection",
"Clone a widget info map considering what may be copied to the client.\n\n@param widgetInfo widget info map\n@return cloned copy including only records which are not {@link ServerSideOnlyInfo}",
"Compose src onto dst using the alpha of sel to interpolate between the two.\nI can't think of a way to do this using AlphaComposite.\n@param src the source raster\n@param dst the destination raster\n@param sel the mask raster",
"Read in the configuration properties.",
"Generates the routing Java source code",
"Computes the null space using QR decomposition. This is much faster than using SVD\n@param A (Input) Matrix\n@param totalSingular Number of singular values\n@return Null space",
"Creates a text box with the given parent and text node assigned.\n@param contblock The parent node (and the containing block in the same time)\n@param n The corresponding text node in the DOM tree.\n@return The new text box."
] |
private static void processTaskFilter(ProjectFile project, Filter filter)
{
for (Task task : project.getTasks())
{
if (filter.evaluate(task, null))
{
System.out.println(task.getID() + "," + task.getUniqueID() + "," + task.getName());
}
}
} | [
"Apply a filter to the list of all tasks, and show the results.\n\n@param project project file\n@param filter filter"
] | [
"Execute a partitioned query using an index and a query selector.\n\nOnly available in partitioned databases. To verify a database is partitioned call\n{@link Database#info()} and check that {@link DbInfo.Props#getPartitioned()} returns\n{@code true}.\n\n<p>Example usage:</p>\n<pre>\n{@code\n// Query database partition 'Coppola'.\nQueryResult<Movie> movies = db.query(\"Coppola\", new QueryBuilder(and(\ngt(\"Movie_year\", 1960),\neq(\"Person_name\", \"Al Pacino\"))).\nfields(\"Movie_name\", \"Movie_year\").\nbuild(), Movie.class);\n}\n</pre>\n\n@param partitionKey Database partition to query.\n@param query String representation of a JSON object describing criteria used to\nselect documents.\n@param classOfT The class of Java objects to be returned in the {@code docs} field of\nresult.\n@param <T> The type of the Java object to be returned in the {@code docs} field of\nresult.\n@return A {@link QueryResult} object, containing the documents matching the query\nin the {@code docs} field.\n@see com.cloudant.client.api.Database#query(String, Class)",
"Release the connection back to the pool.\n\n@throws SQLException Never really thrown",
"Look for a style in the named styles provided in the configuration.\n\n@param styleName the name of the style to look for.",
"Use this API to fetch nstrafficdomain_binding resource of given name .",
"Use this API to add vpath.",
"Performs a HTTP PUT request, saves an attachment.\n\n@return {@link Response}",
"This method searches in the Component Management Service, so given an\nagent name returns its IExternalAccess\n\n@param agent_name\nThe name of the agent in the platform\n@return The IComponentIdentifier of the agent in the platform",
"Return the most appropriate log type. This should _never_ return null.",
"Sets the queue.\n\n@param queue the new queue"
] |
private List<String> getMavenModules(MavenModuleSetBuild mavenBuild) throws IOException, InterruptedException {
FilePath pathToModuleRoot = mavenBuild.getModuleRoot();
FilePath pathToPom = new FilePath(pathToModuleRoot, mavenBuild.getProject().getRootPOM(null));
return pathToPom.act(new MavenModulesExtractor());
} | [
"Retrieve from the parent pom the path to the modules of the project"
] | [
"Removes file from your assembly.\n\n@param name field name of the file to remove.",
"Returns details of a previously-requested Organization export.\n\n@param organizationExport Globally unique identifier for the Organization export.\n@return Request object",
"Convert an ObjectBank to corresponding collection of data features and\nlabels.\n\n@return A List of pairs, one for each document, where the first element is\nan int[][][] representing the data and the second element is an\nint[] representing the labels.",
"Adds the basic sentence.\n\n@param s the s\n@throws ParseException the parse exception",
"This method will return a list of installed identities for which\nthe corresponding .conf file exists under .installation directory.\nThe list will also include the default identity even if the .conf\nfile has not been created for it.",
"compares two java files",
"Updates the story and returns the full record for the updated story.\nOnly comment stories can have their text updated, and only comment stories and\nattachment stories can be pinned. Only one of `text` and `html_text` can be specified.\n\n@param story Globally unique identifier for the story.\n@return Request object",
"Executes all event manipulating handler and writes the event with persist\nhandler.\n\n@param events the events",
"Creates a new GridLines instance.\n\n@param data data block\n@param offset offset into data block\n@return new GridLines instance"
] |
public ClassificationModel attachLink(ClassificationModel classificationModel, LinkModel linkModel)
{
for (LinkModel existing : classificationModel.getLinks())
{
if (StringUtils.equals(existing.getLink(), linkModel.getLink()))
{
return classificationModel;
}
}
classificationModel.addLink(linkModel);
return classificationModel;
} | [
"Attach the given link to the classification, while checking for duplicates."
] | [
"In the 2.0 xsd the vault is in an external file, which has no namespace, using the output of the vault tool.\n\n@param f the file containing the external vault configuration as generated by the vault tool\n@return the vault config",
"Destroys all resource requests in requestQueue.\n\n@param requestQueue The queue for which all resource requests are to be\ndestroyed.",
"Send a fader start command to all registered listeners.\n\n@param playersToStart contains the device numbers of all players that should start playing\n@param playersToStop contains the device numbers of all players that should stop playing",
"Updates the gatewayDirection attributes of all gateways.\n@param def",
"Return a string that ensures that no line is longer then 512 characters\nand lines are broken according to manifest specification.\n\n@param input The buffer containing the content that should be made safe\n@param newline The string to use to create newlines (usually \"\\n\" or\n\"\\r\\n\")\n@return The string with no longer lines then 512, ready to be read again\nby {@link MergeableManifest2}.",
"Set the named roles which may be defined.\n\n@param roles map with roles, keys are the values for {@link #rolesAttribute}, probably DN values\n@since 1.10.0",
"Checks the widget by index\n@param checkableIndex The index is in the range from 0 to size -1, where size is the number of\nCheckable widgets in the group. It does not take into account any\nnon-Checkable widgets added to the group widget.\n@return {@code True} if {@code checkableWidget} is a child of this {@code CheckableGroup} and\nwas not already checked; {@code false} otherwise.",
"Gets the time warp.\n\n@return the time warp",
"Can be overridden if you want to replace or supplement the debug handling for responses.\n\n@param responseCode\n@param inputStream"
] |
PathAddress toPathAddress(final ObjectName name) {
return ObjectNameAddressUtil.toPathAddress(rootObjectInstance.getObjectName(), getRootResourceAndRegistration().getRegistration(), name);
} | [
"Convert an ObjectName to a PathAddress.\n\nPatterns are supported: there may not be a resource at the returned PathAddress but a resource model <strong>MUST</strong>\nmust be registered."
] | [
"Notification that boot has completed successfully and the configuration history should be updated",
"This handler will be triggered when search is finish",
"This method processes any extended attributes associated with a task.\n\n@param xml MSPDI task instance\n@param mpx MPX task instance",
"Convert event type.\n\n@param eventType the event type\n@return the event enum type",
"calculate distance of two points\n\n@param a\n@param b\n@return",
"Parse a string representation of a Boolean value.\n\n@param value string representation\n@return Boolean value",
"Parses a duration and returns the corresponding number of milliseconds.\n\nDurations consist of a space-separated list of components of the form {number}{time unit},\nfor example 1d 5m. The available units are d (days), h (hours), m (months), s (seconds), ms (milliseconds).<p>\n\n@param durationStr the duration string\n@param defaultValue the default value to return in case the pattern does not match\n@return the corresponding number of milliseconds",
"Calculate standart deviation.\n@param values Values.\n@param mean Mean.\n@return Standart deviation.",
"Gets the current Stack. If the stack is not set, a new empty instance is created and set.\n@return"
] |
private static ClassLoader getParentCl()
{
try
{
Method m = ClassLoader.class.getMethod("getPlatformClassLoader");
return (ClassLoader) m.invoke(null);
}
catch (NoSuchMethodException e)
{
// Java < 9, just use the bootstrap CL.
return null;
}
catch (Exception e)
{
throw new JqmInitError("Could not fetch Platform Class Loader", e);
}
} | [
"A helper - in Java 9, the extension CL was renamed to platform CL and hosts all the JDK classes. Before 9, it was useless and we used\nbootstrap CL instead.\n\n@return the base CL to use."
] | [
"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",
"Assign target number of partitions per node to specific node IDs. Then,\nseparates Nodes into donorNodes and stealerNodes based on whether the\nnode needs to donate or steal primary partitions.\n\n@param nextCandidateCluster\n@param numPartitionsPerNodePerZone\n@return a Pair. First element is donorNodes, second element is\nstealerNodes. Each element in the pair is a HashMap of Node to\nInteger where the integer value is the number of partitions to\nstore.",
"Sets the scale value in pixel per map unit.\n\n@param pixelPerUnit\nthe scale value (pix/map unit)",
"Add tasks to the tree.\n\n@param parentNode parent tree node\n@param parent parent task container",
"Use this API to add nspbr6.",
"Use this API to unset the properties of rnatparam resource.\nProperties that need to be unset are specified in args array.",
"This method writes task data to a JSON file.\nNote that we write the task hierarchy in order to make rebuilding the hierarchy easier.",
"returns array with all allowed values\n@return allowed values",
"Logout the current session. After calling this method,\nthe session will be cleared"
] |
public static java.sql.Time newTime() {
return new java.sql.Time(System.currentTimeMillis() % DAY_MILLIS);
} | [
"Create a new Time, with no date component."
] | [
"Sets the HTML entity translator.\nIt will also remove any other translator set.\nNothing will happen if the argument is null.\n@param htmlElementTranslator translator",
"returns null if no device is found.",
"Insert entity object. The caller must first initialize the primary key\nfield.",
"If the workspace for your project _is_ an organization, you must also\nsupply a `team` to share the project with.\n\nReturns the full record of the newly created project.\n\n@param workspace The workspace or organization to create the project in.\n@return Request object",
"Returns an immutable view of a given map.",
"Fetches the contents of a file representation with asset path and writes them to the provided output stream.\n@see <a href=https://developer.box.com/reference#section-x-rep-hints-header>X-Rep-Hints Header</a>\n@param representationHint the X-Rep-Hints query for the representation to fetch.\n@param assetPath the path of the asset for representations containing multiple files.\n@param output the output stream to write the contents to.",
"Get the minutes difference",
"A specific, existing tag can be deleted by making a DELETE request\non the URL for that tag.\n\nReturns an empty data record.\n\n@param tag The tag to delete.\n@return Request object",
"Connect sync.\n\n@param configuration the protocol configuration\n@return the connection\n@throws IOException"
] |
public void refreshCredentials() {
if (this.credsProvider == null)
return;
try {
AlibabaCloudCredentials creds = this.credsProvider.getCredentials();
this.accessKeyID = creds.getAccessKeyId();
this.accessKeySecret = creds.getAccessKeySecret();
if (creds instanceof BasicSessionCredentials) {
this.securityToken = ((BasicSessionCredentials) creds).getSessionToken();
}
} catch (Exception e) {
e.printStackTrace();
}
} | [
"refresh credentials if CredentialProvider set"
] | [
"Session connect generate channel.\n\n@param session\nthe session\n@return the channel\n@throws JSchException\nthe j sch exception",
"Creates a random matrix where all elements are zero but diagonal elements. Diagonal elements\nrandomly drawn from a uniform distribution from min to max, inclusive.\n\n@param numRows Number of rows in the returned matrix..\n@param numCols Number of columns in the returned matrix.\n@param min Minimum value of a diagonal element.\n@param max Maximum value of a diagonal element.\n@param rand Random number generator.\n@return A random diagonal matrix.",
"Load a cube map texture asynchronously.\n\nThis is the implementation of\n{@link GVRAssetLoader#loadCubemapTexture(GVRAndroidResource)} - it will\nusually be more convenient (and more efficient) to call that directly.\n\n@param gvrContext\nThe GVRF context\n@param textureCache\nTexture cache - may be {@code null}\n@param resource\nA steam containing a zip file which contains six bitmaps. The\nsix bitmaps correspond to +x, -x, +y, -y, +z, and -z faces of\nthe cube map texture respectively. The default names of the\nsix images are \"posx.png\", \"negx.png\", \"posy.png\", \"negx.png\",\n\"posz.png\", and \"negz.png\", which can be changed by calling\n{@link GVRCubemapImage#setFaceNames(String[])}.\n@param priority\nThis request's priority. Please see the notes on asynchronous\npriorities in the <a href=\"package-summary.html#async\">package\ndescription</a>.\n@return A {@link Future} that you can pass to methods like\n{@link GVRShaderData#setMainTexture(Future)}",
"Executes the supplied cell processors on the last row of CSV that was read and populates the supplied List of\nprocessed columns.\n\n@param processedColumns\nthe List to populate with processed columns\n@param processors\nthe cell processors\n@return the updated List\n@throws NullPointerException\nif processedColumns or processors is null\n@throws SuperCsvConstraintViolationException\nif a CellProcessor constraint failed\n@throws SuperCsvException\nif the wrong number of processors are supplied, or CellProcessor execution failed",
"Verify the given job types are all valid.\n\n@param jobTypes the given job types\n@throws IllegalArgumentException if any of the job types are invalid\n@see #checkJobType(String, Class)",
"Finds the last entry of the address list and returns it as a property.\n\n@param address the address to get the last part of\n\n@return the last part of the address\n\n@throws IllegalArgumentException if the address is not of type {@link ModelType#LIST} or is empty",
"This method is called to format a task type.\n\n@param value task type value\n@return formatted task type",
"Scans a set of classes for both ReaderListeners and Swagger annotations. All found listeners will\nbe instantiated before any of the classes are scanned for Swagger annotations - so they can be invoked\naccordingly.\n\n@param classes a set of classes to scan\n@return the generated Swagger definition",
"don't run on main thread"
] |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.