query
stringlengths 74
6.1k
| positive
sequencelengths 1
1
| negative
sequencelengths 9
9
|
---|---|---|
public static void acceptsZone(OptionParser parser) {
parser.acceptsAll(Arrays.asList(OPT_Z, OPT_ZONE), "zone id")
.withRequiredArg()
.describedAs("zone-id")
.ofType(Integer.class);
} | [
"Adds OPT_Z | OPT_ZONE option to OptionParser, with one argument.\n\n@param parser OptionParser to be modified\n@param required Tells if this option is required or optional"
] | [
"Finish initializing the service.",
"Formats event output by key, usually equal to the method name.\n\n@param key the event key\n@param defaultPattern the default pattern to return if a custom pattern\nis not found\n@param args the args used to format output\n@return A formatted event output",
"This method returns the value of the product under the specified model and other information in a key-value map.\n\n@param evaluationTime The time on which this products value should be observed.\n@param model A model used to evaluate the product.\n@return The values of the product.\n@throws net.finmath.exception.CalculationException Thrown if the valuation fails, specific cause may be available via the <code>cause()</code> method.",
"read messages beginning from offset\n\n@param offset next message offset\n@param length the max package size\n@return a MessageSet object with length data or empty\n@see MessageSet#Empty\n@throws IOException any exception",
"Vend a SessionVar with the function to create the default value",
"Get all the handlers at a specific address.\n\n@param address the address\n@param inherited true to include the inherited operations\n@return the handlers",
"Write the standard set of day types.\n\n@param calendars parent collection of calendars",
"Flush output streams.",
"Fetch all relevant attributes from the backing store and copy instances which are not present in the local bean store."
] |
@Override
public DiscordianDate date(int prolepticYear, int month, int dayOfMonth) {
return DiscordianDate.of(prolepticYear, month, dayOfMonth);
} | [
"Obtains a local date in Discordian calendar system from the\nproleptic-year, month-of-year and day-of-month fields.\n\n@param prolepticYear the proleptic-year\n@param month the month-of-year\n@param dayOfMonth the day-of-month\n@return the Discordian local date, not null\n@throws DateTimeException if unable to create the date"
] | [
"Helper method for getting the current parameter values from a list of annotated parameters.\n\n@param parameters The list of annotated parameter to look up\n@param manager The Bean manager\n@return The object array of looked up values",
"Determine how many forked JVMs to use.",
"Release a connection by placing the connection back in the pool.\n@param connectionHandle Connection being released.\n@throws SQLException",
"Returns whether the values of this division grouping contain the prefix block for the given prefix length\n\n@param prefixLength\n@return",
"calculate the difference of the two maps, so we know what was added, removed & updated\n@param left\n@param right\n@param onlyOnLeft\n@param onlyOnRight\n@param updated",
"Adds a new step to the list of steps.\n\n@param name Name of the step to add.\n@param robot The name of the robot ot use with the step.\n@param options extra options required for the step.",
"Transforms a config file with an XSLT transform.\n\n@param name file name of the config file\n@param transform file name of the XSLT file\n\n@throws Exception if something goes wrong",
"Create the function. Be sure to handle all possible input types and combinations correctly and provide\nmeaningful error messages. The output matrix should be resized to fit the inputs.",
"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"
] |
public void add(ServiceReference<D> declarationSRef) {
D declaration = getDeclaration(declarationSRef);
boolean matchFilter = declarationFilter.matches(declaration.getMetadata());
declarations.put(declarationSRef, matchFilter);
} | [
"Add the declarationSRef to the DeclarationsManager.\nCalculate the matching of the Declaration with the DeclarationFilter of the\nLinker.\n\n@param declarationSRef the ServiceReference<D> of the Declaration"
] | [
"Returns the configured sort options, or the empty list if no such options are configured.\n@return The configured sort options, or the empty list if no such options are configured.",
"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",
"Gets information about a trashed folder.\n@param folderID the ID of the trashed folder.\n@return info about the trashed folder.",
"Writes the data collected about properties to a file.",
"Adds position noise to the trajectories\n@param t\n@param sd\n@return trajectory with position noise",
"Get list of Jobs from a queue.\n\n@param jedis\n@param queueName\n@param jobOffset\n@param jobCount\n@return",
"Handles newlines by removing them and add new rows instead",
"Handles an incoming request message.\nAn incoming request message is a message initiated by a node or the controller.\n@param incomingMessage the incoming message to process.",
"Checks the given class descriptor for correct object cache setting.\n\n@param classDef The class descriptor\n@param checkLevel The current check level (this constraint is only checked in strict)\n@exception ConstraintException If the constraint has been violated"
] |
protected String getUserDefinedFieldName(String field) {
int index = field.indexOf('-');
char letter = getUserDefinedFieldLetter();
for (int i = 0; i < index; ++i) {
if (field.charAt(i) == letter) {
return field.substring(index + 1);
}
}
return null;
} | [
"Returns the user defined field without its prefix.\n\n@param field the name of the user defined field\n@return the user defined field without the prefix, or null if the fields\ndoesn't apply to this control file.\n@since 1.1"
] | [
"Create a new connection manager, based on an existing connection.\n\n@param connection the existing connection\n@param openHandler a connection open handler\n@return the connected manager",
"Scans all Forge addons for files accepted by given filter.",
"todo remove, here only for binary compatibility of elytron subsystem, drop once it is in.",
"Use this API to fetch all the gslbservice resources that are configured on netscaler.",
"Term value.\n\n@param term\nthe term\n@return the string",
"Merge this ExecutionStatistics with all the statistics created within the child threads. All the child threads had to be created using Windup-specific\nThreadFactory in order to contain a reference to the parent thread.",
"Convert from Hadoop Text to Bytes",
"Loads the Configuration from the properties file.\n\nLoads the properties file, or uses defaults on failure.\n\n@see org.apache.ojb.broker.util.configuration.impl.ConfigurationAbstractImpl#setFilename(java.lang.String)",
"Sets the options contained in the DJCrosstab to the JRDesignCrosstab.\nAlso fits the correct width"
] |
public static int ptb2Text(Reader ptbText, Writer w) throws IOException {
int numTokens = 0;
PTB2TextLexer lexer = new PTB2TextLexer(ptbText);
for (String token; (token = lexer.next()) != null; ) {
numTokens++;
w.write(token);
}
return numTokens;
} | [
"Writes a presentable version of the given PTB-tokenized text.\nPTB tokenization splits up punctuation and does various other things\nthat makes simply joining the tokens with spaces look bad. So join\nthe tokens with space and run it through this method to produce nice\nlooking text. It's not perfect, but it works pretty well."
] | [
"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",
"Apply a filter to the list of all resources, and show the results.\n\n@param project project file\n@param filter filter",
"Classify the tokens in a String. Each sentence becomes a separate document.\n\n@param str\nA String with tokens in one or more sentences of text to be\nclassified.\n@return {@link List} of classified sentences (each a List of something that\nextends {@link CoreMap}).",
"Populates a relation list.\n\n@param task parent task\n@param field target task field\n@param data MPX relation list data",
"Create an error image.\n\n@param area The size of the image",
"Use this API to fetch sslcertkey resource of given name .",
"Count the number of non-zero elements in V",
"Returns the compact project status update records for all updates on the project.\n\n@param project The project to find status updates for.\n@return Request object",
"Use this API to fetch filterpolicy_binding resource of given name ."
] |
protected void _format(EObject obj, IFormattableDocument document) {
for (EObject child : obj.eContents())
document.format(child);
} | [
"Fall-back for types that are not handled by a subclasse's dispatch method."
] | [
"Helper method to check if log4j is already configured",
"Use this API to add nspbr6 resources.",
"Parses an RgbaColor from a hexadecimal value.\n\n@return returns the parsed color",
"This method extracts project properties from a GanttProject file.\n\n@param ganttProject GanttProject file",
"Puts value at given column\n\n@param value Will be encoded using UTF-8",
"Returns a list ordered from the highest priority to the lowest.",
"Addes the current member as a nested object.\n\n@param template The template\n@param attributes The attributes of the tag\n@exception XDocletException If an error occurs\[email protected] type=\"content\"",
"Set the property on the given object to the new value.\n\n@param object on which to set the property\n@param newValue the new value of the property\n@throws RuntimeException if the property could not be set",
"Returns the body of the request. This method is used to read posted JSON data.\n\n@param request The request.\n\n@return String representation of the request's body.\n\n@throws IOException in case reading the request fails"
] |
private int getInt(List<byte[]> blocks)
{
int result;
if (blocks.isEmpty() == false)
{
byte[] data = blocks.remove(0);
result = MPPUtility.getInt(data, 0);
}
else
{
result = 0;
}
return (result);
} | [
"Internal method used to retrieve a integer from an\nembedded data block.\n\n@param blocks list of data blocks\n@return int value"
] | [
"URLDecode a string\n@param s\n@return",
"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",
"Use this API to disable snmpalarm of given name.",
"Converts this update description to its document representation as it would appear in a\nMongoDB Change Event.\n\n@return the update description document as it would appear in a change event",
"Converts the paged list.\n\n@param uList the resource list to convert from\n@return the converted list",
"This method is used to automatically generate a value\nfor the WBS field of this task.\n\n@param parent Parent Task",
"Adds this vector to v1 and places the result in this vector.\n\n@param v1\nright-hand vector",
"return a HashMap with all properties, name as key, value as value\n@return the properties",
"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"
] |
public static long randomLongBetween(long min, long max) {
Random rand = new Random();
return min + (long) (rand.nextDouble() * (max - min));
} | [
"Returns a long between interval\n@param min Minimum value\n@param max Maximum value\n@return long number"
] | [
"Get a list of all active server mappings defined for current profile\n\n@return Collection of ServerRedirects",
"Retrieves the monthly or yearly relative day of the week.\n\n@return day of the week",
"Set the degrees of rotation. Value will be set to -1, if not available.\n\n@param rotation",
"Creates a style definition used for pages.\n@return The page style definition.",
"Returns a client object for a clientId\n\n@param clientId ID of client to return\n@return Client or null\n@throws Exception exception",
"Print a timestamp value.\n\n@param value time value\n@return time value",
"Callback from the worker when it terminates",
"Make a composite filter from the given sub-filters using AND to combine filters.",
"Adds steps types from given injector and recursively its parent\n\n@param injector the current Inject\n@param types the List of steps types"
] |
public final void setDefaultStyle(final Map<String, Style> defaultStyle) {
this.defaultStyle = new HashMap<>(defaultStyle.size());
for (Map.Entry<String, Style> entry: defaultStyle.entrySet()) {
String normalizedName = GEOMETRY_NAME_ALIASES.get(entry.getKey().toLowerCase());
if (normalizedName == null) {
normalizedName = entry.getKey().toLowerCase();
}
this.defaultStyle.put(normalizedName, entry.getValue());
}
} | [
"Set the default styles. the case of the keys are not important. The retrieval will be case\ninsensitive.\n\n@param defaultStyle the mapping from geometry type name (point, polygon, etc...) to the style\nto use for that type."
] | [
"Main render algorithm based on render the video thumbnail, render the title, render the marker\nand the label.",
"Use this API to update bridgetable.",
"Build data model for serialization.",
"Returns the compact task records for all tasks with the given tag.\n\n@param tag The tag in which to search for tasks.\n@return Request object",
"Returns the value of the specified matrix element. Performs a bounds check to make sure\nthe requested element is part of the matrix.\n\n@param row The row of the element.\n@param col The column of the element.\n@return The value of the element.",
"Assembles the exception message when the value received by a CellProcessor isn't of the correct type.\n\n@param expectedType\nthe expected type\n@param actualValue\nthe value received by the CellProcessor\n@return the message\n@throws NullPointerException\nif expectedType is null",
"Release a connection by placing the connection back in the pool.\n@param connectionHandle Connection being released.\n@throws SQLException",
"Removes the specified objects.\n\n@param collection The collection to remove.",
"Return the lines of a CharSequence as a List of String.\n\n@param self a CharSequence object\n@return a list of lines\n@throws java.io.IOException if an error occurs\n@since 1.8.2"
] |
public GVRAnimator start(int animIndex)
{
if ((animIndex < 0) || (animIndex >= mAnimations.size()))
{
throw new IndexOutOfBoundsException("Animation index out of bounds");
}
GVRAnimator anim = mAnimations.get(animIndex);
start(anim);
return anim;
} | [
"Starts the animation with the given index.\n@param animIndex 0-based index of {@link GVRAnimator} to start;\n@see GVRAvatar#stop()\n@see #start(String)"
] | [
"Fetch the outermost Hashmap as a TwoDHashMap.\n\n@param firstKey\nfirst key\n@return the the innermost hashmap",
"Use this API to fetch authenticationtacacspolicy_systemglobal_binding resources of given name .",
"Removes a filter from this project file.\n\n@param filterName The name of the filter",
"Extract definition records from the table and divide into groups.",
"Turns a series of strings into their corresponding license entities\nby using regular expressions\n\n@param licStrings The list of license strings\n@return A set of license entities",
"Deals with the case where we have had to map a task ID to a new value.\n\n@param id task ID from database\n@return mapped task ID",
"This is the code that needs to be executed before either eye is drawn.\n\n@return Current time, from {@link GVRTime#getCurrentTime()}",
"Build a Dataset from some data.\n\n@param oldData This {@link Dataset} represents data for which we which to\nsome features, specifically those features not in the {@link edu.stanford.nlp.util.Index}\ngoodFeatures.\n@param goodFeatures An {@link edu.stanford.nlp.util.Index} of features we wish to retain.\n@return A new {@link Dataset} wheres each datapoint contains only features\nwhich were in goodFeatures.",
"Get the element as a boolean.\n\n@param i the index of the element to access"
] |
@Value("${locator.strategy}")
public void setDefaultLocatorSelectionStrategy(String defaultLocatorSelectionStrategy) {
this.defaultLocatorSelectionStrategy = defaultLocatorSelectionStrategy;
if (LOG.isLoggable(Level.FINE)) {
LOG.log(Level.FINE, "Default strategy " + defaultLocatorSelectionStrategy
+ " was set for LocatorClientRegistrar.");
}
} | [
"If the String argument defaultLocatorSelectionStrategy is as key in the map representing the locatorSelectionStrategies, the\ncorresponding strategy is selected and set as default strategy, else both the selected strategy and the default strategy remain\nunchanged.\n@param defaultLocatorSelectionStrategy"
] | [
"The range of velocities that a particle generated from this emitter can have.\n@param minV Minimum velocity that a particle can have\n@param maxV Maximum velocity that a particle can have",
"Gets information about a trashed folder that's limited to a list of specified fields.\n@param folderID the ID of the trashed folder.\n@param fields the fields to retrieve.\n@return info about the trashed folder containing only the specified fields.",
"This method retrieves an integer 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 integer data",
"Read an int from the byte array starting at the given offset\n\n@param bytes The byte array to read from\n@param offset The offset to start reading at\n@return The int read",
"Update counters and call hooks.\n@param handle connection handle.",
"Create a hazard curve from given times and given discount factors using default interpolation and extrapolation methods.\n\n@param name The name of this hazard curve.\n@param times Array of times as doubles.\n@param givenSurvivalProbabilities Array of corresponding survival probabilities.\n@return A new discount factor object.",
"Mark the given child resource as the post run dependent of the parent of this collection.\n\n@param childResource the child resource",
"Use this API to fetch statistics of nspbr6_stats resource of given name .",
"Returns all program element docs that have a visibility greater or\nequal than the specified level"
] |
public void flipBit(int index)
{
assertValidIndex(index);
int word = index / WORD_LENGTH;
int offset = index % WORD_LENGTH;
data[word] ^= (1 << offset);
} | [
"Inverts the value of the bit at the specified index.\n@param index The bit to flip (0 is the least-significant bit).\n@throws IndexOutOfBoundsException If the specified index is not a bit\nposition in this bit string."
] | [
"Return true only if the node has the named annotation\n@param node - the AST Node to check\n@param name - the name of the annotation\n@return true only if the node has the named annotation",
"Returns the ordered Map value of the field.\n\n@return the ordered Map value of the field. It returns a reference of the value.\n@throws IllegalArgumentException if the value cannot be converted to ordered Map.",
"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",
"Reads the header data from a block.\n\n@param buffer block data\n@param offset current offset into block data\n@param postHeaderSkipBytes bytes to skip after reading the header\n@return current BlockHeader instance",
"Get the Operation metadata for an MBean by name.\n@return the {@link Map} of {@link String} operation names to {@link MBeanOperationInfo} values.",
"Handles retrieval of primitive char type.\n\n@param field required field\n@param defaultValue default value if field is missing\n@return char value",
"Use this API to fetch all the nsrpcnode resources that are configured on netscaler.",
"Register custom filter types especially for serializer of specification json file",
"User-initiated commands use this method.\n\n@param command The CLI command\n@return A Response object containing the command line, DMR request, and DMR response\n@throws CommandFormatException\n@throws IOException"
] |
public static Index index(String keyspace, String table, String name) {
return new Index(table, name).keyspace(keyspace);
} | [
"Returns a new index creation statement using the session's keyspace.\n\n@param keyspace the keyspace name\n@param table the table name\n@param name the index name\n@return a new index creation statement"
] | [
"get target hosts from line by line.\n\n@param sourcePath\nthe source path\n@param sourceType\nthe source type\n@return the list\n@throws TargetHostsLoadException\nthe target hosts load exception",
"Somewhat ad-hoc list of only greek letters that bio people use, partly\nto avoid false positives on short ones.\n@param s String to check for Greek\n@return true iff there is a greek lette embedded somewhere in the String",
"Adds OPT_U | OPT_URL 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",
"Parses command-line and gets read-only metadata.\n\n@param args Command-line input\n@param printHelp Tells whether to print help only or execute command\nactually\n@throws IOException",
"get the key name to use in log from the logging keys map",
"Generic string joining function.\n@param strings Strings to be joined\n@param fixCase does it need to fix word case\n@param withChar char to join strings with.\n@return joined-string",
"Sorts the given array into sorted order using the given comparator.\n\n@param self the array to be sorted\n@param comparator a Comparator used for the comparison\n@return the sorted array\n@since 1.5.5",
"Returns a list of bindings where provided queue is the destination.\n\n@param vhost vhost of the exchange\n@param queue destination queue name\n@return list of bindings",
"Sorts the row indices in ascending order.\n@param sorter (Optional) Used to sort rows. If null a new instance will be declared internally."
] |
private void addAssignments(MpxjTreeNode parentNode, ProjectFile file)
{
for (ResourceAssignment assignment : file.getResourceAssignments())
{
final ResourceAssignment a = assignment;
MpxjTreeNode childNode = new MpxjTreeNode(a)
{
@Override public String toString()
{
Resource resource = a.getResource();
String resourceName = resource == null ? "(unknown resource)" : resource.getName();
Task task = a.getTask();
String taskName = task == null ? "(unknown task)" : task.getName();
return resourceName + "->" + taskName;
}
};
parentNode.add(childNode);
}
} | [
"Add assignments to the tree.\n\n@param parentNode parent tree node\n@param file assignments container"
] | [
"Use this API to delete dnssuffix of given name.",
"Gets the actual type arguments of a Type\n\n@param type The type to examine\n@return The type arguments",
"Sets the occurence.\n\n@param min the min\n@param max the max\n@throws ParseException the parse exception",
"Creates a resource key with id defined as enumeration value name and bundle specified by given class.\n@param clazz the class owning the bundle\n@param value enumeration value used to define key id\n@return the resource key",
"Set the menu view from a layout resource.\n\n@param layoutResId Resource ID to be inflated.",
"Convenience method for setting 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 to set.\n@param value\nValue to which to set the field.",
"Used to get PB, when no tx is running.",
"Use this API to add gslbservice resources.",
"Add a single header key-value pair. If one with the name already exists,\nit gets replaced.\n\n@param name the name of the header.\n@param value the value of the header.\n@return the interceptor instance itself."
] |
public static String getFailureDescriptionAsString(final ModelNode result) {
if (isSuccessfulOutcome(result)) {
return "";
}
final String msg;
if (result.hasDefined(ClientConstants.FAILURE_DESCRIPTION)) {
if (result.hasDefined(ClientConstants.OP)) {
msg = String.format("Operation '%s' at address '%s' failed: %s", result.get(ClientConstants.OP), result.get(ClientConstants.OP_ADDR), result
.get(ClientConstants.FAILURE_DESCRIPTION));
} else {
msg = String.format("Operation failed: %s", result.get(ClientConstants.FAILURE_DESCRIPTION));
}
} else {
msg = String.format("An unexpected response was found checking the deployment. Result: %s", result);
}
return msg;
} | [
"Parses the result and returns the failure description. If the result was successful, an empty string is\nreturned.\n\n@param result the result of executing an operation\n\n@return the failure message or an empty string"
] | [
"Returns an MBeanServer with the specified name\n\n@param name\n@return",
"It's enough to just set the disabled attribute on the\nelement, but we want to also add a \"disabled\" class so that we can\nstyle it.\n\nAt some point we'll just be able to use .button:disabled,\nbut that doesn't work in IE8-",
"Use this API to fetch lbvserver_filterpolicy_binding resources of given name .",
"Retrieve a Double from an input stream.\n\n@param is input stream\n@return Double instance",
"Calculate the finish variance.\n\n@return finish variance",
"Ask the specified player for an Artist menu.\n\n@param slotReference the player and slot for which the menu is desired\n@param sortOrder the order in which responses should be sorted, 0 for default, see Section 6.11.1 of the\n<a href=\"https://github.com/Deep-Symmetry/dysentery/blob/master/doc/Analysis.pdf\">Packet Analysis\ndocument</a> for details\n\n@return the entries in the artist menu\n\n@throws Exception if there is a problem obtaining the menu",
"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",
"Make a list value containing the specified values.",
"Attempt to reconnect to Redis.\n\n@param jedis\nthe connection to Redis\n@param reconAttempts\nnumber of times to attempt to reconnect before giving up\n@param reconnectSleepTime\ntime in milliseconds to wait between attempts\n@return true if reconnection was successful"
] |
public synchronized int skip(int count) {
if (count > available) {
count = available;
}
idxGet = (idxGet + count) % capacity;
available -= count;
return count;
} | [
"Skips the given count of bytes, but at most the currently available count.\n\n@return number of bytes actually skipped from this buffer (0 if no bytes are available)"
] | [
"Reads color table as 256 RGB integer values.\n\n@param ncolors int number of colors to read.\n@return int array containing 256 colors (packed ARGB with full alpha).",
"Cancel the pause operation",
"A property tied to the map, updated when the idle state event is fired.\n\n@return",
"Returns a collection view of this map's values.\n\n@return a collection view of this map's values.",
"Gets a single byte return or -1 if no data is available.",
"This method performs database modification at the very and of transaction.",
"Retrieve a work field.\n\n@param type field type\n@return Duration instance",
"make a copy of the criteria\n@param includeGroupBy if true\n@param includeOrderBy if ture\n@param includePrefetchedRelationships if true\n@return a copy of the criteria",
"Process an MPP file to make it anonymous.\n\n@param input input file name\n@param output output file name\n@throws Exception"
] |
public Integer next() {
for(int i = currentIndex; i < t.size(); i++){
if(i+timelag>=t.size()){
return null;
}
if((t.get(i) != null) && (t.get(i+timelag) != null)){
if(overlap){
currentIndex = i+1;
}
else{
currentIndex = i+timelag;
}
return i;
}
}
return null;
} | [
"Give next index i where i and i+timelag is valid"
] | [
"Add server redirect to a profile, using current active ServerGroup\n\n@param region region\n@param srcUrl source URL\n@param destUrl destination URL\n@param hostHeader host header\n@param profileId profile ID\n@return ID of added ServerRedirect\n@throws Exception exception",
"Whether this association contains no rows.\n\n@return {@code true} if this association contains no rows, {@code false} otherwise",
"Returns a string representation of map of chunk id to number of chunks\n\n@return String of map of chunk id to number of chunks",
"Get the list of all nodes and the list of active nodes in the cluster.\n\n@return Membership object encapsulating lists of all nodes and the cluster nodes\n@see <a\nhref=\"https://console.bluemix.net/docs/services/Cloudant/api/advanced.html#-get-_membership-\">\n_membership</a>",
"Builds the data structures that show the effects of the plan by server group",
"Parses a String comprised of 0 or more comma-delimited key=value pairs.\n\n@param s the string to parse\n@return the Map of parsed key value pairs",
"Adds BETWEEN criteria,\ncustomer_id between 1 and 10\n\n@param attribute The field name to be used\n@param value1 The lower boundary\n@param value2 The upper boundary",
"Read a two byte integer.\n\n@param data byte array\n@param offset offset into array\n@return integer value",
"Checks the status of one or more asynchronous photo upload tickets. This method does not require authentication.\n\n@param tickets\na set of ticket ids (Strings) or {@link Ticket} objects containing ids\n@return a list of {@link Ticket} objects.\n@throws FlickrException"
] |
private MetadataManager initOJB()
{
try
{
if (_ojbPropertiesFile == null)
{
_ojbPropertiesFile = new File("OJB.properties");
if (!_ojbPropertiesFile.exists())
{
throw new BuildException("Could not find OJB.properties, please specify it via the ojbpropertiesfile attribute");
}
}
else
{
if (!_ojbPropertiesFile.exists())
{
throw new BuildException("Could not load the specified OJB properties file "+_ojbPropertiesFile);
}
log("Using properties file "+_ojbPropertiesFile.getAbsolutePath(), Project.MSG_INFO);
System.setProperty("OJB.properties", _ojbPropertiesFile.getAbsolutePath());
}
MetadataManager metadataManager = MetadataManager.getInstance();
RepositoryPersistor persistor = new RepositoryPersistor();
if (_repositoryFile != null)
{
if (!_repositoryFile.exists())
{
throw new BuildException("Could not load the specified repository file "+_repositoryFile);
}
log("Loading repository file "+_repositoryFile.getAbsolutePath(), Project.MSG_INFO);
// this will load the info from the specified repository file
// and merge it with the existing info (if it has been loaded)
metadataManager.mergeConnectionRepository(persistor.readConnectionRepository(_repositoryFile.getAbsolutePath()));
metadataManager.mergeDescriptorRepository(persistor.readDescriptorRepository(_repositoryFile.getAbsolutePath()));
}
else if (metadataManager.connectionRepository().getAllDescriptor().isEmpty() &&
metadataManager.getGlobalRepository().getDescriptorTable().isEmpty())
{
// Seems nothing was loaded, probably because we're not starting in the directory
// that the properties file is in, and the repository file path is relative
// So lets try to resolve this path and load the repository info manually
Properties props = new Properties();
props.load(new FileInputStream(_ojbPropertiesFile));
String repositoryPath = props.getProperty("repositoryFile", "repository.xml");
File repositoryFile = new File(repositoryPath);
if (!repositoryFile.exists())
{
repositoryFile = new File(_ojbPropertiesFile.getParentFile(), repositoryPath);
}
metadataManager.mergeConnectionRepository(persistor.readConnectionRepository(repositoryFile.getAbsolutePath()));
metadataManager.mergeDescriptorRepository(persistor.readDescriptorRepository(repositoryFile.getAbsolutePath()));
}
// we might have to determine the default pb key ourselves
if (metadataManager.getDefaultPBKey() == null)
{
for (Iterator it = metadataManager.connectionRepository().getAllDescriptor().iterator(); it.hasNext();)
{
JdbcConnectionDescriptor descriptor = (JdbcConnectionDescriptor)it.next();
if (descriptor.isDefaultConnection())
{
metadataManager.setDefaultPBKey(new PBKey(descriptor.getJcdAlias(), descriptor.getUserName(), descriptor.getPassWord()));
break;
}
}
}
return metadataManager;
}
catch (Exception ex)
{
if (ex instanceof BuildException)
{
throw (BuildException)ex;
}
else
{
throw new BuildException(ex);
}
}
} | [
"Initializes OJB for the purposes of this task.\n\n@return The metadata manager used by OJB"
] | [
"Re-Tag the websocket connection hold by this context with label specified.\nThis method will remove all previous tags on the websocket connection and then\ntag it with the new label.\n@param label the label.\n@return this websocket conext.",
"Handles incoming Application Update Request.\n@param incomingMessage the request message to process.",
"RReturns the entity type of the id like \"item\" or \"property\"\n\n@param id\nthe identifier of the entity, such as \"Q42\"\n@throws IllegalArgumentException\nif the id is invalid",
"Print a duration represented by an arbitrary fraction of minutes.\n\n@param duration Duration instance\n@param factor required factor\n@return duration represented as an arbitrary fraction of minutes",
"Applies this patch to a JSON value.\n\n@param node the value to apply the patch to\n@return the patched JSON value\n@throws JsonPatchException failed to apply patch\n@throws NullPointerException input is null",
"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)",
"Returns a list of files in given addon passing given filter.",
"Check if a column is part of the row key columns.\n\n@param column the name of the column to check\n@return true if the column is one of the row key columns, false otherwise",
"Method indicating whether a day is a working or non-working day.\n\n@param day required day\n@return true if this is a working day"
] |
public static Mono<Void> waitForCompletion(CloudFoundryClient cloudFoundryClient, Duration completionTimeout, String jobId) {
return requestJobV3(cloudFoundryClient, jobId)
.filter(job -> JobState.PROCESSING != job.getState())
.repeatWhenEmpty(exponentialBackOff(Duration.ofSeconds(1), Duration.ofSeconds(15), completionTimeout))
.filter(job -> JobState.FAILED == job.getState())
.flatMap(JobUtils::getError);
} | [
"Waits for a job V3 to complete\n\n@param cloudFoundryClient the client to use to request job status\n@param completionTimeout the amount of time to wait for the job to complete.\n@param jobId the id of the job\n@return {@code onComplete} once job has completed"
] | [
"Read data from the table. Return a reference to the current\ninstance to allow method chaining.\n\n@return reader instance",
"Adds a member to this group with the specified role.\n@param user the member to be added to this group.\n@param role the role of the user in this group. Can be null to assign the default role.\n@return info about the new group membership.",
"Connect and register at the remote domain controller.\n\n@return connection the established connection\n@throws IOException",
"Copies just the upper or lower triangular portion of a matrix.\n\n@param src Matrix being copied. Not modified.\n@param dst Where just a triangle from src is copied. If null a new one will be created. Modified.\n@param upper If the upper or lower triangle should be copied.\n@return The copied matrix.",
"Frees the temporary LOBs when an exception is raised in the application\nor when the LOBs are no longer needed. If the LOBs are not freed, the\nspace used by these LOBs are not reclaimed.\n@param clob CLOB-wrapper to free or null\n@param blob BLOB-wrapper to free or null",
"Provides lookup of elements by non-namespaced name.\n\n@param name the name or shortcut key for nodes of interest\n@return the nodes of interest which match name",
"Visits a parameter of this method.\n\n@param name\nparameter name or null if none is provided.\n@param access\nthe parameter's access flags, only <tt>ACC_FINAL</tt>,\n<tt>ACC_SYNTHETIC</tt> or/and <tt>ACC_MANDATED</tt> are\nallowed (see {@link Opcodes}).",
"Reads a data block and adds it to the list of blocks.\n\n@param text RTF data\n@param offset current offset\n@param length next block length\n@param blocks list of blocks\n@return next offset",
"Generates a unique signature for an annotated type. Members without\nannotations are omitted to reduce the length of the signature\n\n@param <X>\n@param annotatedType\n@return hash of a signature for a concrete annotated type"
] |
public boolean matches(HostName host) {
if(this == host) {
return true;
}
if(isValid()) {
if(host.isValid()) {
if(isAddressString()) {
return host.isAddressString()
&& asAddressString().equals(host.asAddressString())
&& Objects.equals(getPort(), host.getPort())
&& Objects.equals(getService(), host.getService());
}
if(host.isAddressString()) {
return false;
}
String thisHost = parsedHost.getHost();
String otherHost = host.parsedHost.getHost();
if(!thisHost.equals(otherHost)) {
return false;
}
return Objects.equals(parsedHost.getEquivalentPrefixLength(), host.parsedHost.getEquivalentPrefixLength()) &&
Objects.equals(parsedHost.getMask(), host.parsedHost.getMask()) &&
Objects.equals(parsedHost.getPort(), host.parsedHost.getPort()) &&
Objects.equals(parsedHost.getService(), host.parsedHost.getService());
}
return false;
}
return !host.isValid() && toString().equals(host.toString());
} | [
"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"
] | [
"Retrieves a byte value from the property data.\n\n@param type Type identifier\n@return byte value",
"Get a System property by its name.\n\n@param name the name of the wanted System property.\n@return the System property value - null if it is not defined.",
"Create a WebMBeanAdaptor for a specified MBean name.\n@param mBeanName the MBean name (can be URL-encoded).\n@param encoding the string encoding to be used (i.e. UTF-8)\n@return the created WebMBeanAdaptor.\n@throws JMException Java Management Exception\n@throws UnsupportedEncodingException if the encoding is not supported.",
"Use this API to delete snmpmanager.",
"Prepares Artifactory server either from serverID or from ArtifactoryServer.\n\n@param artifactoryServerID\n@param pipelineServer\n@return",
"The sniffing Loggers are some special Loggers, whose level will be set to TRACE forcedly.\n@param logger",
"Use this API to add cachepolicylabel.",
"Finds the Widget in hierarchy\n@param name Name of the child to find\n@return The named child {@link Widget} or {@code null} if not found.",
"Add additional source types"
] |
public static PipelineConfiguration.Builder parse(ModelNode json) {
ModelNode analyzerIncludeNode = json.get("analyzers").get("include");
ModelNode analyzerExcludeNode = json.get("analyzers").get("exclude");
ModelNode filterIncludeNode = json.get("filters").get("include");
ModelNode filterExcludeNode = json.get("filters").get("exclude");
ModelNode transformIncludeNode = json.get("transforms").get("include");
ModelNode transformExcludeNode = json.get("transforms").get("exclude");
ModelNode reporterIncludeNode = json.get("reporters").get("include");
ModelNode reporterExcludeNode = json.get("reporters").get("exclude");
return builder()
.withTransformationBlocks(json.get("transformBlocks"))
.withAnalyzerExtensionIdsInclude(asStringList(analyzerIncludeNode))
.withAnalyzerExtensionIdsExclude(asStringList(analyzerExcludeNode))
.withFilterExtensionIdsInclude(asStringList(filterIncludeNode))
.withFilterExtensionIdsExclude(asStringList(filterExcludeNode))
.withTransformExtensionIdsInclude(asStringList(transformIncludeNode))
.withTransformExtensionIdsExclude(asStringList(transformExcludeNode))
.withReporterExtensionIdsInclude(asStringList(reporterIncludeNode))
.withReporterExtensionIdsExclude(asStringList(reporterExcludeNode));
} | [
"Parses the configuration node and provides a pipeline configuration without any extensions marked for loading.\nThe configuration node is supposed to conform to the pipeline configuration JSON schema.\n\n<p>The caller is supposed to use the methods from the builder to add/find extension classes that will be used in\nthe analysis.\n\n<p>Note that the returned pipeline configuration might not contain all the extensions available in\nthe classloader depending on the include/exclude filters in the configuration.\n\n@param json the configuration node\n@return a pipeline configuration parsed from the configuration\n@see Builder#build()"
] | [
"Used for DI frameworks to inject values into stages.",
"Validates the return value\n\n@param instance The instance to validate",
"Run through the map and remove any references that have been null'd out by the GC.",
"Records that there is media mounted in a particular media player slot, updating listeners if this is a change.\nAlso send a query to the player requesting details about the media mounted in that slot, if we don't already\nhave that information.\n\n@param slot the slot in which media is mounted",
"Get logs for an app by specifying additional parameters.\n@param logRequest See {LogRequestBuilder}\n@return log stream response",
"Process schedule options from SCHEDOPTIONS. This table only seems to exist\nin XER files, not P6 databases.",
"Get the relative path of an application\n\n@param root the root to relativize against\n@param path the path to relativize\n@return the relative path",
"Returns true if a Map literal that contains only entries where both key and value are constants.\n@param expression - any expression",
"Returns a module\n\n@param moduleId String\n@return DbModule"
] |
public synchronized Message menuRequestTyped(Message.KnownType requestType, Message.MenuIdentifier targetMenu,
CdjStatus.TrackSourceSlot slot, CdjStatus.TrackType trackType, Field... arguments)
throws IOException {
if (!menuLock.isHeldByCurrentThread()) {
throw new IllegalStateException("renderMenuItems() cannot be called without first successfully calling tryLockingForMenuOperation()");
}
Field[] combinedArguments = new Field[arguments.length + 1];
combinedArguments[0] = buildRMST(targetMenu, slot, trackType);
System.arraycopy(arguments, 0, combinedArguments, 1, arguments.length);
final Message response = simpleRequest(requestType, Message.KnownType.MENU_AVAILABLE, combinedArguments);
final NumberField reportedRequestType = (NumberField)response.arguments.get(0);
if (reportedRequestType.getValue() != requestType.protocolValue) {
throw new IOException("Menu request did not return result for same type as request; sent type: " +
requestType.protocolValue + ", received type: " + reportedRequestType.getValue() +
", response: " + response);
}
return response;
} | [
"Send a request for a menu that we will retrieve items from in subsequent requests, when the request must reflect\nthe actual type of track being asked about.\n\n@param requestType identifies what kind of menu request to send\n@param targetMenu the destination for the response to this query\n@param slot the media library of interest for this query\n@param trackType the type of track for which metadata is being requested, since this affects the request format\n@param arguments the additional arguments needed, if any, to complete the request\n\n@return the {@link Message.KnownType#MENU_AVAILABLE} response reporting how many items are available in the menu\n\n@throws IOException if there is a problem communicating, or if the requested menu is not available\n@throws IllegalStateException if {@link #tryLockingForMenuOperations(long, TimeUnit)} was not called successfully\nbefore attempting this call"
] | [
"Find the node corresponding to an entity.\n\n@param executionEngine the {@link GraphDatabaseService} used to run the query\n@param columnValues the values in {@link org.hibernate.ogm.model.key.spi.EntityKey#getColumnValues()}\n@return the corresponding node",
"Replies to this comment with another message.\n@param message the message for the reply.\n@return info about the newly created reply comment.",
"Use this API to enable nsfeature.",
"Fills in the element with the InputValues for input\n\n@param element the node element\n@param input the input data",
"Executes a batch plan.\n\n@param batchId Used as the ID of the batch plan. This allows related\ntasks on client- & server-side to pretty print messages in a\nmanner that debugging can track specific batch plans across the\ncluster.\n@param batchPlan The batch plan...",
"Serialize a parameterized object to an OutputStream.\n\n@param object The object to serialize.\n@param parameterizedType The ParameterizedType describing the object. Ex: LoganSquare.serialize(object, new ParameterizedType<MyModel<OtherModel>>() { }, os);\n@param os The OutputStream being written to.",
"Used to determine if multiple cost rates apply to this assignment.\n\n@return true if multiple cost rates apply to this assignment",
"Creates a decorator bean\n\n@param <T> The type\n@param clazz The class\n@param beanManager the current manager\n@return a Bean",
"Retrieve a child record by name.\n\n@param key child record name\n@return child record"
] |
public void postDoNotUseArtifact(final String gavc, final Boolean doNotUse, final String user, final String password) throws GrapesCommunicationException, AuthenticationException {
final Client client = getClient(user, password);
final WebResource resource = client.resource(serverURL).path(RequestUtils.getDoNotUseArtifact(gavc));
final ClientResponse response = resource.queryParam(ServerAPI.DO_NOT_USE, doNotUse.toString())
.accept(MediaType.APPLICATION_JSON).post(ClientResponse.class);
client.destroy();
if(ClientResponse.Status.OK.getStatusCode() != response.getStatus()){
final String message = "Failed to post do not use artifact";
if(LOG.isErrorEnabled()) {
LOG.error(String.format(HTTP_STATUS_TEMPLATE_MSG, message, response.getStatus()));
}
throw new GrapesCommunicationException(message, response.getStatus());
}
} | [
"Post boolean flag \"DO_NOT_USE\" to an artifact\n\n@param gavc\n@param doNotUse\n@param user\n@param password\n@throws GrapesCommunicationException"
] | [
"Tells you if the expression is true, which can be true or Boolean.TRUE.\n@param expression\nexpression\n@return\nas described",
"Get the Upper triangular factor.\n\n@return U.",
"Extracts a duration from a JAXBElement instance.\n\n@param duration duration expressed in hours\n@return duration instance",
"Reads a single byte from the input stream.",
"Use this API to update rnatparam.",
"create a HashMap form the json properties and add it to the shape\n@param modelJSON\n@param current\n@throws org.json.JSONException",
"Requests the waveform preview for a specific track ID, given a connection to a player that has already been\nset up.\n\n@param rekordboxId the track whose waveform preview is desired\n@param slot identifies the media slot we are querying\n@param client the dbserver client that is communicating with the appropriate player\n\n@return the retrieved waveform preview, or {@code null} if none was available\n@throws IOException if there is a communication problem",
"Store some state on this request context associated with the specified interceptor instance.\nUsed where a single interceptor instance needs to associate state with each HTTP request.\n\n@param interceptor the interceptor instance\n@param stateName the key to store the state object under\n@param stateObjectToStore the state object to store\n@param <T> the type of the state object to store\n@see #getState(HttpConnectionInterceptor, String, Class)\n@since 2.6.0",
"Scan all the class path and look for all classes that have the Format\nAnnotations."
] |
private double getConstraint(double x1, double x2)
{
double c1,c2,h;
c1 = -x1*x1-x2*x2+1+0.1*Math.cos(16*Math.atan(x1/x2));
c2 = (x1-0.5)*(x1-0.5)+(x2-0.5)*(x2-0.5)-0.5;
if(c1>c2)
h = (c1>0)?c1:0;
else
h = (c2>0)?c2:0;
return h;
} | [
"use the design parameters to compute the constraint equation to get the value"
] | [
"Mark a given element as checked to prevent duplicate work. A elements is only added when it\nis not already in the set of checked elements.\n\n@param element the element that is checked\n@return true if !contains(element.uniqueString)",
"Returns whether the values of this division grouping contain the prefix block for the given prefix length\n\n@param prefixLength\n@return",
"Creates the operation to add a resource.\n\n@param address the address of the operation to add.\n@param properties the properties to set for the resource.\n\n@return the operation.",
"Converts the given list of a type to paged list of a different type.\n\n@param list the list to convert to paged list\n@param mapper the mapper to map type in input list to output list\n@param <OutT> the type of items in output paged list\n@param <InT> the type of items in input paged list\n@return the paged list",
"This method is called to alert project listeners to the fact that\na relation has been read from a project file.\n\n@param relation relation instance",
"Handles the response of the SerialApiGetInitData request.\n@param incomingMlivessage the response message to process.",
"Create a ModelNode representing the CPU the instance is running on.\n\n@return a ModelNode representing the CPU the instance is running on.\n@throws OperationFailedException",
"Executed read-resource-description and returns access-control info.\nReturns null in case there was any kind of problem.\n\n@param client\n@param address\n@return",
"Plots the MSD curve with the trajectory t and adds the fitted model for directed motion above.\n@param t\n@param lagMin Minimum timelag (e.g. 1,2,3..) lagMin*timelag = elapsed time in seconds\n@param lagMax lagMax Maximum timelag (e.g. 1,2,3..) lagMax*timelag = elapsed time in seconds\n@param timelag Elapsed time between two frames.\n@param diffusionCoefficient Diffusion coefficient\n@param velocity velocity of the active transport"
] |
public void add(ServiceReference<S> declarationBinderRef) throws InvalidFilterException {
BinderDescriptor binderDescriptor = new BinderDescriptor(declarationBinderRef);
declarationBinders.put(declarationBinderRef, binderDescriptor);
} | [
"Add the declarationBinderRef to the ImportersManager, create the corresponding.\nBinderDescriptor.\n\n@param declarationBinderRef the ServiceReference<DeclarationBinder> of the DeclarationBinder\n@throws InvalidFilterException"
] | [
"To be used with AutoText class constants ALIGMENT_LEFT, ALIGMENT_CENTER and ALIGMENT_RIGHT\n@param aligment\n@return",
"Converts a boolean array containing the pixel data in BINARY mode to an\ninteger array with the pixel data in RGB mode.\n\n@param binaryArray pixel binary data\n@return pixel integer data in RGB mode.",
"Remove a custom field setting on the project.\n\n@param project The project to associate the custom field with\n@return Request object",
"Adds a procedure argument definition to this class descriptor.\n\n@param argDef The procedure argument definition",
"Organises the data from Asta into a hierarchy and converts this into tasks.\n\n@param bars bar data\n@param expandedTasks expanded task data\n@param tasks task data\n@param milestones milestone data",
"Update the context session to mark a user logged in\n\n@param userIdentifier\nthe user identifier, could be either userId or username",
"Term value.\n\n@param term\nthe term\n@return the string",
"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.",
"Given a year, month, and day, find the number of occurrences of that day in the month\n\n@param year the year\n@param month the month\n@param day the day\n@return the number of occurrences of the day in the month"
] |
public void scrollOnce() {
PagerAdapter adapter = getAdapter();
int currentItem = getCurrentItem();
int totalCount;
if (adapter == null || (totalCount = adapter.getCount()) <= 1) {
return;
}
int nextItem = (direction == LEFT) ? --currentItem : ++currentItem;
if (nextItem < 0) {
if (isCycle) {
setCurrentItem(totalCount - 1, isBorderAnimation);
}
} else if (nextItem == totalCount) {
if (isCycle) {
setCurrentItem(0, isBorderAnimation);
}
} else {
setCurrentItem(nextItem, true);
}
} | [
"scroll only once"
] | [
"Use this API to disable clusterinstance of given name.",
"Populates a Map instance representing the IDs and names of\nprojects available in the current file.\n\n@param is input stream used to read XER file\n@return Map instance containing ID and name pairs\n@throws MPXJException",
"Implementation of FNV-1a hash algorithm.\n@see <a href=\"https://en.wikipedia.org/wiki/Fowler%E2%80%93Noll%E2%80%93Vo_hash_function\">\nttps://en.wikipedia.org/wiki/Fowler%E2%80%93Noll%E2%80%93Vo_hash_function</a>\n@param doc the document to hash\n@return",
"returns an Array with an Objects PK VALUES, with any java-to-sql\nFieldConversion applied. If the Object is a Proxy or a VirtualProxy NO\nconversion is necessary.\n\n@param objectOrProxy\n@return Object[]\n@throws PersistenceBrokerException",
"Truncated power function.\n\n@param value Value.\n@param degree Degree.\n@return Result.",
"Print an accrue type.\n\n@param value AccrueType instance\n@return accrue type value",
"Reads a single schema file.\n\n@param reader The schema reader\n@param schemaFile The schema file\n@return The model",
"Use this API to update filterhtmlinjectionparameter.",
"Pass a model object and return a SoyMapData if a model object happens\nto be a SoyMapData.\n\nAn implementation will also check if a passed in object is a Map and return\na SoyMapData wrapping that map"
] |
public static final FieldType getInstance(int fieldID)
{
FieldType result;
int prefix = fieldID & 0xFFFF0000;
int index = fieldID & 0x0000FFFF;
switch (prefix)
{
case MPPTaskField.TASK_FIELD_BASE:
{
result = MPPTaskField.getInstance(index);
if (result == null)
{
result = getPlaceholder(TaskField.class, index);
}
break;
}
case MPPResourceField.RESOURCE_FIELD_BASE:
{
result = MPPResourceField.getInstance(index);
if (result == null)
{
result = getPlaceholder(ResourceField.class, index);
}
break;
}
case MPPAssignmentField.ASSIGNMENT_FIELD_BASE:
{
result = MPPAssignmentField.getInstance(index);
if (result == null)
{
result = getPlaceholder(AssignmentField.class, index);
}
break;
}
case MPPConstraintField.CONSTRAINT_FIELD_BASE:
{
result = MPPConstraintField.getInstance(index);
if (result == null)
{
result = getPlaceholder(ConstraintField.class, index);
}
break;
}
default:
{
result = getPlaceholder(null, index);
break;
}
}
return result;
} | [
"Retrieve a FieldType instance based on an ID value from\nan MPP9 or MPP12 file.\n\n@param fieldID field ID\n@return FieldType instance"
] | [
"Returns an identity matrix",
"Produces an IPv4 address section from any sequence of bytes in this IPv6 address section\n\n@param startIndex the byte index in this section to start from\n@param endIndex the byte index in this section to end at\n@throws IndexOutOfBoundsException\n@return\n\n@see #getEmbeddedIPv4AddressSection()\n@see #getMixedAddressSection()",
"Print the visibility adornment of element e prefixed by\nany stereotypes",
"Alternative entry point allowing an MPP file to be read from\na user-supplied POI file stream.\n\n@param fs POI file stream\n@return ProjectFile instance\n@throws MPXJException",
"Read a task from a ConceptDraw PROJECT file.\n\n@param projectIdentifier parent project identifier\n@param map outline number to task map\n@param task ConceptDraw PROJECT task",
"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",
"Look up record by identity.",
"look for zero after country code, and remove if present",
"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"
] |
public void handleChange(Object propertyId) {
try {
lockOnChange(propertyId);
} catch (CmsException e) {
LOG.debug(e);
}
if (isDescriptorProperty(propertyId)) {
m_descriptorHasChanges = true;
}
if (isBundleProperty(propertyId)) {
m_changedTranslations.add(getLocale());
}
} | [
"Handles the change of a value in the current translation.\n@param propertyId the property id of the column where the value has changed."
] | [
"Delete a module\n\n@param moduleId String",
"Validate the JtsLayer.\n\n@param name mvt layer name\n@param geometries geometries in the tile\n@throws IllegalArgumentException when {@code name} or {@code geometries} are null",
"Retrieve a UUID in the form required by Primavera PMXML.\n\n@param guid UUID instance\n@return formatted UUID",
"Add authentication information for the given host\n@param host the host\n@param credentials the credentials\n@param authScheme the scheme for preemptive authentication (should be\n<code>null</code> if adding authentication for a proxy server)\n@param context the context in which the authentication information\nshould be saved",
"Replies to this comment with another message.\n@param message the message for the reply.\n@return info about the newly created reply comment.",
"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",
"Send a master changed announcement to all registered master listeners.\n\n@param update the message announcing the new tempo master",
"Use this API to fetch vpnclientlessaccesspolicy resource of given name .",
"This method is called when double quotes are found as part of\na value. The quotes are escaped by adding a second quote character\nand the entire value is quoted.\n\n@param value text containing quote characters\n@return escaped and quoted text"
] |
private Properties parseFile(File file) throws InvalidDeclarationFileException {
Properties properties = new Properties();
InputStream is = null;
try {
is = new FileInputStream(file);
properties.load(is);
} catch (Exception e) {
throw new InvalidDeclarationFileException(String.format("Error reading declaration file %s", file.getAbsoluteFile()), e);
} finally {
if (is != null) {
try {
is.close();
} catch (IOException e) {
LOG.error("IOException thrown while trying to close the declaration file.", e);
}
}
}
if (!properties.containsKey(Constants.ID)) {
throw new InvalidDeclarationFileException(String.format("File %s is not a correct declaration, needs to contains an id property", file.getAbsoluteFile()));
}
return properties;
} | [
"Parse the given file to obtains a Properties object.\n\n@param file\n@return a properties object containing all the properties present in the file.\n@throws InvalidDeclarationFileException"
] | [
"Updates the style of the field label according to the field value if the\nfield value is empty - null or \"\" - removes the label 'active' style else\nwill add the 'active' style to the field label.",
"Use this API to fetch sslvserver_sslcipher_binding resources of given name .",
"Process the graphical indicator criteria for a single column.\n\n@param type field type\n@return indicator criteria data",
"decides which icon to apply or hide this view\n\n@param imageHolder\n@param imageView\n@param iconColor\n@param tint",
"Copy the settings from another calendar to this calendar.\n\n@param cal calendar data source",
"Checks anonymous fields.\n\n@param fieldDef The field descriptor\n@param checkLevel The current check level (this constraint is checked in basic and strict)\n@exception ConstraintException If the constraint has been violated",
"Convert a Java date into a Planner time.\n\n0800\n\n@param value Java Date instance\n@return Planner time value",
"Read a list of sub projects.\n\n@param data byte array\n@param uniqueIDOffset offset of unique ID\n@param filePathOffset offset of file path\n@param fileNameOffset offset of file name\n@param subprojectIndex index of the subproject, used to calculate unique id offset",
"Apply filter to an image.\n\n@param source FastBitmap"
] |
public static final double getDouble(String value)
{
return (value == null || value.length() == 0 ? 0 : Double.parseDouble(value));
} | [
"This method retrieves a double value from a String instance.\nIt returns zero by default if a null value or an empty string is supplied.\n\n@param value string representation of a double\n@return double value"
] | [
"Upgrade the lock on the given object to the given lock mode. The call has\nno effect if the object's current lock is already at or above that level of\nlock mode.\n\n@param obj object to acquire a lock on.\n@param lockMode lock mode to acquire. The lock modes\nare <code>READ</code> , <code>UPGRADE</code> , and <code>WRITE</code> .\n\n@exception LockNotGrantedException Description of Exception",
"Log a byte array as a hex dump.\n\n@param data byte array",
"Make a copy.",
"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.",
"Render json.\n\n@param o\nthe o\n@return the string",
"Clear out our DAO caches.",
"A final cluster ought to be a super set of current cluster. I.e.,\nexisting node IDs ought to map to same server, but partition layout can\nhave changed and there may exist new nodes.\n\n@param currentCluster\n@param finalCluster",
"Return total number of connections created in all partitions.\n\n@return number of created connections",
"FastJSON does not provide the API so we have to create our own"
] |
void setDayOfMonth(String day) {
final int i = CmsSerialDateUtil.toIntWithDefault(day, -1);
if (m_model.getDayOfMonth() != i) {
removeExceptionsOnChange(new Command() {
public void execute() {
m_model.setDayOfMonth(i);
onValueChange();
}
});
}
} | [
"Sets the day of the month.\n@param day the day to set."
] | [
"Sets up Log4J to write log messages to the console. Low-priority messages\nare logged to stdout while high-priority messages go to stderr.",
"Returns true if \"file\" is a subfile or subdirectory of \"dir\".\n\nFor example with the directory /path/to/a, the following return values would occur:\n\n/path/to/a/foo.txt - true /path/to/a/bar/zoo/boo/team.txt - true /path/to/b/foo.txt - false",
"Sets the top padding for all cells in the table.\n@param paddingTop new padding, ignored if smaller than 0\n@return this to allow chaining",
"The main method. See the class documentation.",
"Utility method used to round a double to the given precision.\n\n@param value value to truncate\n@param precision Number of decimals to round to.\n@return double value",
"Detect and apply waves, now or when the widget is attached.\n\n@param widget target widget to ensure is attached first",
"Pre API 11, this does an alpha animation.\n\n@param progress",
"Tests whether the two field descriptors are equal, i.e. have same name, same column\nand same jdbc-type.\n\n@param first The first field\n@param second The second field\n@return <code>true</code> if they are equal",
"Use this API to fetch csvserver_copolicy_binding resources of given name ."
] |
public static <T extends HasWord> TokenizerFactory<T> factory(LexedTokenFactory<T> factory, String options) {
return new PTBTokenizerFactory<T>(factory, options);
} | [
"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"
] | [
"Moves the cursor to the given row number in the iterator. If the row\nnumber is positive, the cursor moves to the given row number with\nrespect to the beginning of the iterator. The first row is row 1, the\nsecond is row 2, and so on.\n\n@param row the row to move to in this iterator, by absolute number",
"Register a new DropPasteWorkerInterface.\n@param worker The new worker",
"Create a random video.\n\n@return random video.",
"Creates new metadata template.\n@param api the API connection to be used.\n@param scope the scope of the object.\n@param templateKey a unique identifier for the template.\n@param displayName the display name of the field.\n@param hidden whether this template is hidden in the UI.\n@param fields the ordered set of fields for the template\n@return the metadata template returned from the server.",
"Size of a queue.\n\n@param jedis\n@param queueName\n@return",
"Process an MPP file to make it anonymous.\n\n@param input input file name\n@param output output file name\n@throws Exception",
"Parse a filter expression.\n\n@param filter the filter expression\n@return compiled nodes",
"Delete a photo from flickr.\n\nThis method requires authentication with 'delete' permission.\n\n@param photoId\n@throws FlickrException",
"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."
] |
public Object getBean(String name) {
Bean bean = beans.get(name);
if (null == bean) {
return null;
}
return bean.object;
} | [
"Get a bean value from the context.\n\n@param name bean name\n@return bean value or null"
] | [
"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",
"Parse one resource to a shape object and add it to the shapes array\n@param shapes\n@param flatJSON\n@param resourceId\n@throws org.json.JSONException",
"Transfer the data from the inputStream to the outputStream. Then close both streams.",
"Returns all model classes registered on this datasource\n\n@return model classes talk to this datasource",
"Start the chain of execution running.\n\n@throws IllegalStateException\nif the chain of execution has already been started.",
"Compares the two comma-separated lists.\n\n@param list1 The first list\n@param list2 The second list\n@return <code>true</code> if the lists are equal",
"This method extracts calendar data from a Phoenix file.\n\n@param phoenixProject Root node of the Phoenix file",
"Use this API to unset the properties of lbsipparameters resource.\nProperties that need to be unset are specified in args array.",
"Use this API to fetch the statistics of all servicegroup_stats resources that are configured on netscaler."
] |
private double convertTenor(int maturityInMonths, int tenorInMonths) {
Schedule schedule = fixMetaSchedule.generateSchedule(referenceDate, maturityInMonths, tenorInMonths);
return schedule.getPayment(schedule.getNumberOfPeriods()-1);
} | [
"Convert tenor given as offset in months to year fraction.\n\n@param maturityInMonths The maturity as offset in months.\n@param tenorInMonths The tenor as offset in months.\n@return THe tenor as year fraction."
] | [
"Processes a stencilset template file\n@throws IOException",
"Create servlet deployment.\n\nCan be overridden with custom servlet deployment. e.g. exact resources listing in restricted env like GAE\n\n@param context the servlet context\n@param bootstrap the bootstrap\n@return new servlet deployment",
"Returns the full record for the given webhook.\n\n@param webhook The webhook to get.\n@return Request object",
"Queries the running container and attempts to lookup the information from the running container.\n\n@param client the client used to execute the management operation\n\n@return the container description\n\n@throws IOException if an error occurs while executing the management operation\n@throws OperationExecutionException if the operation used to query the container fails",
"Reports a dependency of this node has been faulted.\n\n@param dependencyKey the id of the dependency node\n@param throwable the reason for unsuccessful resolution",
"Determines the feature state\n\n@param context the template context\n@param tag the tag\n@param attributeName the attribute name\n@param attributeValue the attribute value\n@param defaultState the default state if the expression evaluates to null\n@return the feature state",
"Creates a block matrix the same size as A_inv, inverts the matrix and copies the results back\nonto A_inv.\n\n@param A_inv Where the inverted matrix saved. Modified.",
"Obtain matching paths for a request\n\n@param overrideType type of override\n@param client Client\n@param profile Profile\n@param uri URI\n@param requestType type of request\n@param pathTest If true this will also match disabled paths\n@return Collection of matching endpoints\n@throws Exception exception",
"Returns the total count of partitions across all stores.\n\n@return returns the total count of partitions across all stores."
] |
public Point measureImage(Resources resources) {
BitmapFactory.Options justBoundsOptions = new BitmapFactory.Options();
justBoundsOptions.inJustDecodeBounds = true;
if (bitmap != null) {
return new Point(bitmap.getWidth(), bitmap.getHeight());
} else if (resId != null) {
BitmapFactory.decodeResource(resources, resId, justBoundsOptions);
float scale = (float) justBoundsOptions.inTargetDensity / justBoundsOptions.inDensity;
return new Point((int) (justBoundsOptions.outWidth * scale + 0.5f), (int) (justBoundsOptions.outHeight * scale + 0.5f));
} else if (fileToBitmap != null) {
BitmapFactory.decodeFile(fileToBitmap.getAbsolutePath(), justBoundsOptions);
} else if (inputStream != null) {
BitmapFactory.decodeStream(inputStream, null, justBoundsOptions);
try {
inputStream.reset();
} catch (IOException ignored) {
}
} else if (view != null) {
return new Point(view.getWidth(), view.getHeight());
}
return new Point(justBoundsOptions.outWidth, justBoundsOptions.outHeight);
} | [
"If the not a bitmap itself, this will read the file's meta data.\n\n@param resources {@link android.content.Context#getResources()}\n@return Point where x = width and y = height"
] | [
"Check whether the given is is matched by one of the include expressions.\n\n@param id id to check\n@param includes list of include regular expressions\n@return true when id is included",
"Converts the search results from CmsSearchResource to CmsSearchResourceBean.\n@param searchResults The collection of search results to transform.",
"Register custom filter types especially for serializer of specification json file",
"Find the path to use .\nUses java annotations first and if not found, uses kubernetes annotations on the service object.\n\n@param service\nThe target service.\n@param qualifiers\nThe set of qualifiers.\n\n@return Returns the resolved path of '/' as a fallback.",
"Creates a spin wrapper for a data input. The data format of the\ninput is assumed to be XML.\n\n@param input the input to wrap\n@return the spin wrapper for the input\n\n@throws IllegalArgumentException in case an argument of illegal type is provided (such as 'null')",
"Set RGB input range.\n\n@param inRGB Range.",
"Restores a trashed file to a new location with a new name.\n@param fileID the ID of the trashed file.\n@param newName an optional new name to give the file. This can be null to use the file's original name.\n@param newParentID an optional new parent ID for the file. This can be null to use the file's original\nparent.\n@return info about the restored file.",
"Adds a security property to be passed to the server.\n\n@param key the property key\n@param value the property value\n\n@return the builder",
"If the column name is a dotted column, returns the first part.\nReturns null otherwise.\n\n@param column the column that might have a prefix\n@return the first part of the prefix of the column or {@code null} if the column does not have a prefix."
] |
public void BuildInteractiveObjectFromAnchor(Sensor anchorSensor, String anchorDestination) {
InteractiveObject interactiveObject = new InteractiveObject();
interactiveObject.setSensor(anchorSensor, anchorDestination);
interactiveObjects.add(interactiveObject);
} | [
"BuildInteractiveObjectFromAnchor is a special type of interactive object in that it does not get\nbuilt using ROUTE's.\n\n@param anchorSensor is the Sensor that describes the sensor set to an Anchor\n@param anchorDestination is either another Viewpoint, url to a web site or another x3d scene"
] | [
"Creates a curator built using Application's zookeeper connection string. Root path will start\nat Fluo application chroot.",
"Caches the given object using the given Identity as key\n\n@param oid The Identity key\n@param obj The object o cache",
"This method is used to extract the resource hyperlink attributes\nfrom a block of data and call the appropriate modifier methods\nto configure the specified task object.\n\n@param resource resource instance\n@param data hyperlink data block",
"This method is called to alert project listeners to the fact that\na calendar has been read from a project file.\n\n@param calendar calendar instance",
"Rebuild logging systems with updated mode\n@param newMode log mode",
"Use this API to restore appfwprofile resources.",
"Writes an untagged OK response, with the supplied response code,\nand an optional message.\n\n@param responseCode The response code, included in [].\n@param message The message to follow the []",
"All the attributes needed either by the processors for each datasource row or by the jasper template.\n\n@param attributes the attributes.",
"Delete a server group by id\n\n@param id server group ID"
] |
public void sort(ChildTaskContainer container)
{
// Do we have any tasks?
List<Task> tasks = container.getChildTasks();
if (!tasks.isEmpty())
{
for (Task task : tasks)
{
//
// Sort child activities
//
sort(task);
//
// Sort Order:
// 1. Activities come first
// 2. WBS come last
// 3. Activities ordered by activity ID
// 4. WBS ordered by ID
//
Collections.sort(tasks, new Comparator<Task>()
{
@Override public int compare(Task t1, Task t2)
{
boolean t1IsWbs = m_wbsTasks.contains(t1);
boolean t2IsWbs = m_wbsTasks.contains(t2);
// Both are WBS
if (t1IsWbs && t2IsWbs)
{
return t1.getID().compareTo(t2.getID());
}
// Both are activities
if (!t1IsWbs && !t2IsWbs)
{
String activityID1 = (String) t1.getCurrentValue(m_activityIDField);
String activityID2 = (String) t2.getCurrentValue(m_activityIDField);
if (activityID1 == null || activityID2 == null)
{
return (activityID1 == null && activityID2 == null ? 0 : (activityID1 == null ? 1 : -1));
}
return activityID1.compareTo(activityID2);
}
// One activity one WBS
return t1IsWbs ? 1 : -1;
}
});
}
}
} | [
"Recursively sort the supplied child tasks.\n\n@param container child tasks"
] | [
"Write the work weeks associated with this calendar.\n\n@param xmlCalendar XML calendar instance\n@param mpxjCalendar MPXJ calendar instance",
"Swaps two specified partitions.\n\nPair-wase partition swapping may be more prone to local minima than\nlarger perturbations. Could consider \"swapping\" a list of\n<nodeId/partitionId>. This would allow a few nodes to be identified\n(random # btw 2-5?) and then \"swapped\" (shuffled? rotated?).\n\n@return modified cluster metadata.",
"Create the index and associate it with all project models in the Application",
"Removes top of thread-local shell stack.",
"Sets maintenance mode for the given app\n\n@param appName See {@link #listApps} for a list of apps that can be used.\n@param enable true to enable; false to disable",
"Handle a simple ping request.\n\n@param channel the channel\n@param header the protocol header\n@throws IOException for any error",
"Creates a scenario with 3 different steps classes.\n\nTo share state between the different steps instances use the\n{@link com.tngtech.jgiven.annotation.ScenarioState} annotation\n\n@param givenClass the Given steps class\n@param whenClass the When steps class\n@param thenClass the Then steps class\n@return the new scenario",
"Set ViewPort visibility of the object.\n\n@see ViewPortVisibility\n@param viewportVisibility\nThe ViewPort visibility of the object.\n@return {@code true} if the ViewPort visibility was changed, {@code false} if it\nwasn't.",
"Generate an ordered set of column definitions from an ordered set of column names.\n\n@param columns column definitions\n@param order column names\n@return ordered set of column definitions"
] |
void setPatternDefaultValues(Date startDate) {
if ((m_patternDefaultValues == null) || !Objects.equals(m_patternDefaultValues.getDate(), startDate)) {
m_patternDefaultValues = new PatternDefaultValues(startDate);
}
} | [
"Sets the default pattern values dependent on the provided start date.\n@param startDate the date, the default values are determined with."
] | [
"Use this API to create sslfipskey.",
"Gets the listener classes to which dispatching should be prevented while\nthis event is being dispatched.\n\n@return The listener classes marked to prevent.\n@see #preventCascade(Class)",
"Abort and close the transaction.\nCalling abort abandons all persistent object modifications and releases the\nassociated locks.\nIf transaction is not in progress a TransactionNotInProgressException is thrown",
"Gets information about all of the group memberships for this user.\nDoes not support paging.\n\n<p>Note: This method is only available to enterprise admins.</p>\n\n@return a collection of information about the group memberships for this user.",
"Use this API to fetch all the cmppolicylabel resources that are configured on netscaler.",
"Serialize the object JSON. When an error occures return a string with the given error.",
"Recursively builds the VFS entry bean for the quick filtering function in the folder tab.<p<\n\n@param resource the resource\n@param childMap map from parent to child resources\n@param filterMatches the resources matching the filter\n@param parentPaths root paths of resources which are not leaves\n@param isRoot true if this the root node\n\n@return the VFS entry bean for the client\n\n@throws CmsException if something goes wrong",
"Create a Map composed of the entries of the first map minus the\nentries of the given map.\n\n@param self a map object\n@param removeMe the entries to remove from the map\n@return the resulting map\n@since 1.7.4",
"add a FK column pointing to the item Class"
] |
public static base_response enable(nitro_service client, String acl6name) throws Exception {
nsacl6 enableresource = new nsacl6();
enableresource.acl6name = acl6name;
return enableresource.perform_operation(client,"enable");
} | [
"Use this API to enable nsacl6 of given name."
] | [
"Creates the \"Add key\" button.\n@return the \"Add key\" button.",
"combines all the lists in a collection to a single list",
"Called when a ParentViewHolder has triggered a collapse for it's parent\n\n@param flatParentPosition the position of the parent that is calling to be collapsed",
"Filters a list of rows from the named table. If a column name and a value\nare supplied, then use this to filter the rows. If no column name is\nsupplied, then return all rows.\n\n@param tableName table name\n@param columnName filter column name\n@param id filter column value\n@return filtered list of rows",
"Utility function to get the current text.",
"prefix length in this section is ignored when converting to MAC",
"If the column name is a dotted column, returns the first part.\nReturns null otherwise.\n\n@param column the column that might have a prefix\n@return the first part of the prefix of the column or {@code null} if the column does not have a prefix.",
"Set the order in which sets are returned for the user.\n\nThis method requires authentication with 'write' permission.\n\n@param photosetIds\nAn array of Ids\n@throws FlickrException",
"Writes the results of the processing to a CSV file."
] |
public static final void deleteQuietly(File file)
{
if (file != null)
{
if (file.isDirectory())
{
File[] children = file.listFiles();
if (children != null)
{
for (File child : children)
{
deleteQuietly(child);
}
}
}
file.delete();
}
} | [
"Delete a file ignoring failures.\n\n@param file file to delete"
] | [
"Use the jgrapht cycle checker to detect any cycles in the provided dependency graph.",
"Sets the ProjectCalendar instance from which this calendar is derived.\n\n@param calendar base calendar instance",
"Remove a bean from the context, calling the destruction callback if any.\n\n@param name bean name\n@return previous value",
"Use this API to fetch wisite_accessmethod_binding resources of given name .",
"Create all the links possible between the DeclarationBinder and all the ImportDeclaration matching the.\nImportDeclarationFilter of the Linker.\n\n@param declarationBinderRef the ServiceReference<DeclarationBinder> of the DeclarationBinder",
"Analyzes a failure thrown connecting to the master for causes that indicate\nsome problem not likely to be resolved by immediately retrying. If found,\nthrows an exception highlighting the underlying cause. If the cause is not\none of the ones understood by this method, the method returns normally.\n\n@throws org.jboss.as.domain.controller.SlaveRegistrationException if the remote HC rejected the request\n@throws IllegalStateException for other failures understood by this method",
"Removes the given value to the set.\n\n@return true if the value was actually removed",
"Start the host controller services.\n\n@throws Exception",
"Serializes Number value and writes it into specified buffer."
] |
public static String copyToString(InputStream in, Charset charset) throws IOException {
Assert.notNull(in, "No InputStream specified");
StringBuilder out = new StringBuilder();
InputStreamReader reader = new InputStreamReader(in, charset);
char[] buffer = new char[BUFFER_SIZE];
int bytesRead = -1;
while ((bytesRead = reader.read(buffer)) != -1) {
out.append(buffer, 0, bytesRead);
}
return out.toString();
} | [
"Copy the contents of the given InputStream into a String.\nLeaves the stream open when done.\n@param in the InputStream to copy from\n@return the String that has been copied to\n@throws IOException in case of I/O errors"
] | [
"Returns the start position of the indicator.\n\n@return The start position of the indicator.",
"Use this API to fetch a vpnglobal_intranetip_binding resources.",
"Determines total number of partition-stores moved across zones.\n\n@return number of cross zone partition-store moves",
"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",
"Checks whether the given class maps to a different table but also has the given collection.\n\n@param origCollDef The original collection to search for\n@param origTableDef The original table\n@param classDef The class descriptor to test\n@return <code>true</code> if the class maps to a different table and has the collection",
"Use this API to flush nssimpleacl.",
"Capture stdout and route them through Redwood\n@return this",
"Use this API to delete nssimpleacl.",
"This method tells you if a ClassNode implements or extends a certain class.\n@param node\nthe node\n@param target\nthe class\n@return\ntrue if the class node 'is a' target"
] |
public void bootstrap() throws Exception {
final HostRunningModeControl runningModeControl = environment.getRunningModeControl();
final ControlledProcessState processState = new ControlledProcessState(true);
shutdownHook.setControlledProcessState(processState);
ServiceTarget target = serviceContainer.subTarget();
ControlledProcessStateService controlledProcessStateService = ControlledProcessStateService.addService(target, processState).getValue();
RunningStateJmx.registerMBean(controlledProcessStateService, null, runningModeControl, false);
final HostControllerService hcs = new HostControllerService(environment, runningModeControl, authCode, processState);
target.addService(HostControllerService.HC_SERVICE_NAME, hcs).install();
} | [
"Start the host controller services.\n\n@throws Exception"
] | [
"Convert the Phoenix representation of a finish date time into a Date instance.\n\n@param value Phoenix date time\n@return Date instance",
"Finds to a given point p the point on the spline with minimum distance.\n@param p Point where the nearest distance is searched for\n@param nPointsPerSegment Number of interpolation points between two support points\n@return Point spline which has the minimum distance to p",
"Rollback to the specified push version\n\n@param rollbackToDir The version directory to rollback to",
"Set the week of month.\n@param weekOfMonthStr the week of month to set.",
"adds a value to the list\n\n@param value the value",
"Creates a new resource.\n@param cmsObject The CmsObject of the current request context.\n@param newLink A string, specifying where which new content should be created.\n@param locale The locale for which the\n@param sitePath site path of the currently edited content.\n@param modelFileName not used.\n@param mode optional creation mode\n@param postCreateHandler optional class name of an {@link I_CmsCollectorPostCreateHandler} which is invoked after the content has been created.\nThe fully qualified class name can be followed by a \"|\" symbol and a handler specific configuration string.\n@return The site-path of the newly created resource.",
"Active inverter colors",
"Computes the d and H parameters.\n\nd = J'*(f(x)-y) <--- that's also the gradient\nH = J'*J",
"Enables or disabled shadow casting for a direct light.\nEnabling shadows attaches a GVRShadowMap component to the\nGVRSceneObject which owns the light and provides the\ncomponent with an orthographic camera for shadow casting.\n@param enableFlag true to enable shadow casting, false to disable"
] |
public static Span exact(CharSequence row) {
Objects.requireNonNull(row);
return exact(Bytes.of(row));
} | [
"Creates a Span that covers an exact row. String parameters will be encoded as UTF-8"
] | [
"Returns tag formatted as an HTTP tag string.\n\n@return The formatted HTTP tag string.\n\n@see <a\nhref=\"http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.11\">HTTP\nEntity Tags</a>",
"Update a feature object in the Hibernate session.\n\n@param feature feature object\n@throws LayerException oops",
"Creates the container for a bundle with descriptor.\n@return the container for a bundle with descriptor.\n@throws IOException thrown if reading the bundle fails.\n@throws CmsException thrown if reading the bundle fails.",
"Sets either the upper or low triangle of a matrix to zero",
"Returns a source excerpt of a JavaDoc link to a method on this type.",
"Runs a Story with the given configuration and steps, applying the given\nmeta filter.\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@throws Throwable if failures occurred and FailureStrategy dictates it to\nbe re-thrown.",
"Return tabular data\n@param labels Labels array\n@param data Data bidimensional array\n@param padding Total space between fields\n@return String",
"Prepare a parallel HTTP OPTION Task.\n\n@param url\nthe UrlPostfix: e.g. in http://localhost:8080/index.html.,the url is \"/index.html\"\n@return the parallel task builder",
"Starts processor thread."
] |
public CustomHeadersInterceptor addHeader(String name, String value) {
if (!this.headers.containsKey(name)) {
this.headers.put(name, new ArrayList<String>());
}
this.headers.get(name).add(value);
return this;
} | [
"Add a single header key-value pair. If one with the name already exists,\nboth stay in the header map.\n\n@param name the name of the header.\n@param value the value of the header.\n@return the interceptor instance itself."
] | [
"Gets the effects of this action.\n\n@return the effects. Will not be {@code null}",
"Deletes a vertex from this list.",
"Checks to see if a valid deployment parameter has been defined.\n\n@param operation the operation to check.\n\n@return {@code true} of the parameter is valid, otherwise {@code false}.",
"Remove the given pair from a given map for obtaining a new map.\n\n<p>\nIf the given key is inside the map, but is not mapped to the given value, the\nmap will not be changed.\n</p>\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 left the map to consider.\n@param right the entry (key, value) to remove from 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",
"Cancels all the pending & running requests and releases all the dispatchers.",
"Use this API to fetch all the autoscaleaction resources that are configured on netscaler.",
"Get the vector of regression coefficients.\n\n@param value The random variable to regress.\n@return The vector of regression coefficients.",
"Builds IMAP envelope String from pre-parsed data.",
"Starts the HTTP service.\n\n@throws Exception if the service failed to started"
] |
public ModelNode buildExecutableRequest(CommandContext ctx) throws Exception {
try {
for (FailureDescProvider h : providers) {
effectiveProviders.add(h);
}
// In case some key-store needs to be persisted
for (String ks : ksToStore) {
composite.get(Util.STEPS).add(ElytronUtil.storeKeyStore(ctx, ks));
effectiveProviders.add(new FailureDescProvider() {
@Override
public String stepFailedDescription() {
return "Storing the key-store " + ksToStore;
}
});
}
// Final steps
for (int i = 0; i < finalSteps.size(); i++) {
composite.get(Util.STEPS).add(finalSteps.get(i));
effectiveProviders.add(finalProviders.get(i));
}
return composite;
} catch (Exception ex) {
try {
failureOccured(ctx, null);
} catch (Exception ex2) {
ex.addSuppressed(ex2);
}
throw ex;
}
} | [
"Sort and order steps to avoid unwanted generation"
] | [
"Use this API to update nsacl6 resources.",
"Get a patch entry for either a layer or add-on.\n\n@param name the layer name\n@param addOn whether the target is an add-on\n@return the patch entry, {@code null} if it there is no such layer",
"Gets the effects of this action.\n\n@return the effects. Will not be {@code null}",
"Convert the value to requested quoting convention.\nConversion involving receiver premium assumes zero wide collar.\n\n@param value The value to convert.\n@param key The key of the value.\n@param toConvention The convention to convert to.\n@param toDisplacement The displacement to be used, if converting to log normal implied volatility.\n@param fromConvention The current convention of the value.\n@param fromDisplacement The current displacement.\n@param model The model for context.\n\n@return The converted value.",
"Returns a JSONObject keyed with the lastId retrieved and a value of a JSONArray of the retrieved JSONObject events\n\n@param table the table to read from\n@return JSONObject containing the max row ID and a JSONArray of the JSONObject events or null",
"Returns the number of days from the given weekday to the next weekday the event should occur.\n@param weekDay the current weekday.\n@return the number of days to the next weekday an event could occur.",
"Try to delegate the responsibility of sending slops to master\n\n@param node The node that slop should eventually be pushed to\n@return true if master accept the responsibility; false if master does\nnot accept",
"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.",
"The Baseline Duration field shows the original span of time planned\nto complete a task.\n\n@return - duration string"
] |
protected static boolean createLoggingAction(final Logger logger, final Logger auditor, final TransactionLogger instance) {
TransactionLogger oldInstance = getInstance();
if (oldInstance == null || oldInstance.finished) {
if(loggingKeys == null) {
synchronized (TransactionLogger.class) {
if (loggingKeys == null) {
logger.info("Initializing 'LoggingKeysHandler' class");
loggingKeys = new LoggingKeysHandler(keysPropStream);
}
}
}
initInstance(instance, logger, auditor);
setInstance(instance);
return true;
}
return false; // Really not sure it can happen - since we arrive here in a new thread of transaction I think it's ThreadLocal should be empty. But leaving this code just in case...
} | [
"Create new logging action\nThis method check if there is an old instance for this thread-local\nIf not - Initialize new instance and set it as this thread-local's instance\n@param logger\n@param auditor\n@param instance\n@return whether new instance was set to thread-local"
] | [
"Gets the progress from response.\n\n@param myResponse\nthe my response\n@return the progress from response",
"Create an info object from an authscope object.\n\n@param authscope the authscope",
"Create a directory at the given path if it does not exist yet.\n\n@param path\nthe path to the directory\n@throws IOException\nif it was not possible to create a directory at the given\npath",
"Helper to read an optional Integer value.\n@param path The XML path of the element to read.\n@return The Integer value stored in the XML, or <code>null</code> if the value could not be read.",
"Build a request URL.\n\n@param host\nThe host\n@param port\nThe port\n@param path\nThe path\n@param parameters\nThe parameters\n@return The URL\n@throws MalformedURLException\n@deprecated use {@link #buildSecureUrl(java.lang.String, int, java.lang.String, java.util.Map) }",
"Reads baseline values for the current resource.\n\n@param xmlResource MSPDI resource instance\n@param mpxjResource MPXJ resource instance",
"Waits the given amount of time in seconds for a standalone server to start.\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",
"Returns the single abstract method of a class node, if it is a SAM type, or null otherwise.\n@param type a type for which to search for a single abstract method\n@return the method node if type is a SAM type, null otherwise",
"Given a DocumentVersionInfo, returns a BSON document representing the next version. This means\nand incremented version count for a non-empty version, or a fresh version document for an\nempty version.\n@return a BsonDocument representing a synchronization version"
] |
public Object get(IConverter converter, Object sourceObject,
TypeReference<?> destinationType) {
return convertedObjects.get(new ConvertedObjectsKey(converter,
sourceObject, destinationType));
} | [
"get the converted object corresponding to sourceObject as converted to\ndestination type by converter\n\n@param converter\n@param sourceObject\n@param destinationType\n@return"
] | [
"Converts string to UUID and returns it, or null if the conversion is not possible.\n\n@param uuid the potential UUID string\n@return the UUID, or null if conversion is not possible",
"Adds a \"Post Run\" task to the collection.\n\n@param taskItem the \"Post Run\" task",
"Get container for principal.\n\n@param cms cmsobject\n@param list of principals\n@param captionID caption id\n@param descID description id\n@param iconID icon id\n@param ouID ou id\n@param icon icon\n@param iconList iconlist\n@return indexedcontainer",
"Adjusts beforeIndex to account for the possibility that the given widget is\nalready a child of this panel.\n\n@param child the widget that might be an existing child\n@param beforeIndex the index at which it will be added to this panel\n@return the modified index",
"Extent aware Delete by Query\n@param query\n@param cld\n@throws PersistenceBrokerException",
"Log modified request\n\n@param httpMethodProxyRequest\n@param httpServletResponse\n@param history",
"Multiplies all positions with a factor v\n@param v Multiplication factor",
"Creates a new indirection handler instance.\n\n@param brokerKey The associated {@link PBKey}.\n@param id The subject's ids\n@return The new instance",
"Returns a compact representation of all of the stories on the task.\n\n@param task The task containing the stories to get.\n@return Request object"
] |
public void addEmailStats(final InternetAddress[] recipients, final boolean storageUsed) {
this.storageUsed = storageUsed;
for (InternetAddress recipient: recipients) {
emailDests.add(recipient.getAddress());
}
} | [
"Add statistics about sent emails.\n\n@param recipients The list of recipients.\n@param storageUsed If a remote storage was used."
] | [
"Use this API to fetch snmpuser resource of given name .",
"Returns the value associated with the given key, if any.\n\n@return the value associated with the given key, or <Code>null</Code>\nif the key maps to no value",
"Extract the generic return type from the given method.\n@param method the method to check the return type for\n@param source the source class/interface defining the generic parameter types\n@param typeIndex the index of the type (e.g. 0 for Collections,\n0 for Map keys, 1 for Map values)\n@param nestingLevel the nesting level of the target type\n@return the generic type, or {@code null} if none",
"Create the Grid Point style.",
"Adds an index to the table for the given index descriptor.\n\n@param indexDescDef The index descriptor\n@param tableDef The table",
"Returns the name under which this dump file. This is the name used online\nand also locally when downloading the file.\n\n@param dumpContentType\nthe type of the dump\n@param projectName\nthe project name, e.g. \"wikidatawiki\"\n@param dateStamp\nthe date of the dump in format YYYYMMDD\n@return file name string",
"Creates a Resque backtrace from a Throwable's stack trace. Includes\ncauses.\n\n@param t\nthe Exception to use\n@return a list of strings that represent how the exception's stacktrace\nappears.",
"Use this API to fetch all the sslaction resources that are configured on netscaler.",
"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 void visitParameter(String name, int access) {
if (mv != null) {
mv.visitParameter(name, access);
}
} | [
"Visits a parameter of this method.\n\n@param name\nparameter name or null if none is provided.\n@param access\nthe parameter's access flags, only <tt>ACC_FINAL</tt>,\n<tt>ACC_SYNTHETIC</tt> or/and <tt>ACC_MANDATED</tt> are\nallowed (see {@link Opcodes})."
] | [
"Load the view port execution.\n\n@param then callback when the view port is detected.\n@param fallback fallback when no view port detected or failure to detect the given\n{@link Boundary} (using {@link #propagateFallback(boolean)})",
"This method takes the textual version of an accrue type name\nand populates the class instance appropriately. Note that unrecognised\nvalues are treated as \"Prorated\".\n\n@param type text version of the accrue type\n@param locale target locale\n@return AccrueType class instance",
"This method is used to change the credentials of CleverTap account Id and token programmatically\n@param accountID CleverTap Account Id\n@param token CleverTap Account Token",
"Write a set of fields from a field container to a JSON file.\n@param objectName name of the object, or null if no name required\n@param container field container\n@param fields fields to write",
"Appends the String representation of the given operand to this CharSequence.\n\n@param left a CharSequence\n@param value any Object\n@return the original toString() of the CharSequence with the object appended\n@since 1.8.2",
"Convert a field value to something suitable to be stored in the database.",
"Get the collection of public contacts for the specified user ID.\n\nThis method does not require authentication.\n\n@param userId\nThe user ID\n@return The Collection of Contact objects\n@throws FlickrException",
"The timeout which we block for when a resource is not available\n\n@param timeout The timeout\n@param unit The units of the timeout",
"This method retrieves all security permissions contained within the specified node.\n\n@param context the {@link OperationContext} used to resolve the permission attributes.\n@param node the {@link ModelNode} that might contain security permissions metadata.\n@return a {@link List} containing the retrieved permissions. They are wrapped as {@link PermissionFactory} instances.\n@throws OperationFailedException if an error occurs while retrieving the security permissions."
] |
private void sendEvents(final List<Event> events) {
if (null != handlers) {
for (EventHandler current : handlers) {
for (Event event : events) {
current.handleEvent(event);
}
}
}
LOG.info("Put events(" + events.size() + ") to Monitoring Server.");
try {
if (sendToEventadmin) {
EventAdminPublisher.publish(events);
} else {
monitoringServiceClient.putEvents(events);
}
} catch (MonitoringException e) {
throw e;
} catch (Exception e) {
throw new MonitoringException("002",
"Unknown error while execute put events to Monitoring Server", e);
}
} | [
"Sends the events to monitoring service client.\n\n@param events the events"
] | [
"Determine the enum value corresponding to the third play state found in the packet.\n\n@return the proper value",
"Do not call directly.\n@deprecated",
"Utility function that fetches partitions.\n\n@param adminClient An instance of AdminClient points to given cluster\n@return all partitions on cluster",
"parse when there are two date-times",
"This method writes task data to a Planner file.\n\n@throws JAXBException on xml creation errors",
"Returns an MBeanServer with the specified name\n\n@param name\n@return",
"Meant to execute assertions in tests only\n@return a read-only view of the map containing the relations between entities",
"Generates the body of a toString method that uses a StringBuilder.\n\n<p>Conventionally, we join properties with comma separators. If all of the properties are\noptional, we have no choice but to track the separators at runtime, but if any of them will\nalways be present, we can actually do the hard work at compile time. Specifically, we can pick\nthe first such and output it without a comma; any property before it will have a comma\n<em>appended</em>, and any property after it will have a comma <em>prepended</em>. This gives\nus the right number of commas in the right places in all circumstances.\n\n<p>As well as keeping track of whether we are <b>prepending commas</b> yet (initially false),\nwe also keep track of whether we have just finished an if-then block for an optional property,\nor if we are in the <b>middle of an append chain</b>, and if so, whether we are in the\n<b>middle of a string literal</b>. This lets us output the fewest literals and statements,\nmuch as a mildly compulsive programmer would when writing the same code.",
"The parameter 'project' is not used at the moment, but will be used once schema and plugin support lands."
] |
public static SPIProvider getInstance()
{
if (me == null)
{
final ClassLoader cl = ClassLoaderProvider.getDefaultProvider().getServerIntegrationClassLoader();
me = SPIProviderResolver.getInstance(cl).getProvider();
}
return me;
} | [
"Gets the a singleton reference to the SPIProvider returned by the SPIProviderResolver\nretrieved using the default server integration classloader.\n\n@return this class instance"
] | [
"Populates a resource.\n\n@param resource resource instance\n@param record MPX record\n@throws MPXJException",
"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.",
"Return a list of place IDs for a query string.\n\nThe flickr.places.find method is not a geocoder. It will round \"up\" to the nearest place type to which place IDs apply. For example, if you pass it a\nstreet level address it will return the city that contains the address rather than the street, or building, itself.\n\n<p>\nThis method does not require authentication.\n</p>\n\n@param query\n@return PlacesList\n@throws FlickrException",
"Starts all streams.",
"Gets the final transform of the bone.\n\n@return the 4x4 matrix representing the final transform of the\nbone during animation, which comprises bind pose and skeletal\ntransform at the current time of the animation.",
"Groups the current element according to the value\n\n@param answer the map containing the results\n@param element the element to be placed\n@param value the value according to which the element will be placed\n@since 1.5.0",
"Read the given number of bytes into a long\n\n@param bytes The byte array to read from\n@param offset The offset at which to begin reading\n@param numBytes The number of bytes to read\n@return The long value read",
"Log a free-form warning\n@param message the warning message. Cannot be {@code null}",
"Create a Deliverable inside the database that will track a file created by a JobInstance Must be called from inside a transaction\n\n@param path\nFilePath (relative to a root directory - cf. Node)\n@param originalFileName\nFileName\n@param fileFamily\nFile family (may be null). E.g.: \"daily report\"\n@param jobId\nJob Instance ID\n@param cnx\nthe DbConn to use."
] |
static Resource getOrCreateSubDeployment(final String deploymentName, final DeploymentUnit parent) {
final Resource root = parent.getAttachment(DEPLOYMENT_RESOURCE);
return getOrCreate(root, PathElement.pathElement(SUBDEPLOYMENT, deploymentName));
} | [
"Gets or creates the a resource for the sub-deployment on the parent deployments resource.\n\n@param deploymentName the name of the deployment\n@param parent the parent deployment used to find the parent resource\n\n@return the already registered resource or a newly created resource"
] | [
"Convert an Object to a Timestamp.",
"Checks if Docker Machine is installed by running docker-machine and inspect the result.\n\n@param cliPathExec\nlocation of docker-machine or null if it is on PATH.\n\n@return true if it is installed, false otherwise.",
"Prepare a parallel PING Task.\n\n@return the parallel task builder",
"Obtains a Symmetry454 zoned date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the Symmetry454 zoned date-time, not null\n@throws DateTimeException if unable to create the date-time",
"Closing will only skip to the end of this fixed length input stream and\nnot call the parent's close method.\n@throws IOException if an I/O error occurs while closing stream",
"Read a text file resource into a single string\n\n@param context\nA non-null Android Context\n@param resourceId\nAn Android resource id\n@return The contents, or null on error.",
"Add a method to the enabled response overrides for a path\n\n@param pathName name of path\n@param methodName name of method\n@return true if success, false otherwise",
"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",
"Helper method to abstract out the common logic from the various users methods.\n\n@param api the API connection to be used when retrieving the users.\n@param filterTerm The filter term to lookup users by (login for external, login or name for managed)\n@param userType The type of users we want to search with this request.\nValid values are 'managed' (enterprise users), 'external' or 'all'\n@param externalAppUserId the external app user id that has been set for an app user\n@param fields the fields to retrieve. Leave this out for the standard fields.\n@return An iterator over the selected users."
] |
private static CharSequence convertReverseDNSIPv4(String str, int suffixStartIndex) throws AddressStringException {
StringBuilder builder = new StringBuilder(suffixStartIndex);
int segCount = 0;
int j = suffixStartIndex;
for(int i = suffixStartIndex - 1; i > 0; i--) {
char c1 = str.charAt(i);
if(c1 == IPv4Address.SEGMENT_SEPARATOR) {
if(j - i <= 1) {
throw new AddressStringException(str, i);
}
for(int k = i + 1; k < j; k++) {
builder.append(str.charAt(k));
}
builder.append(c1);
j = i;
segCount++;
}
}
for(int k = 0; k < j; k++) {
builder.append(str.charAt(k));
}
if(segCount + 1 != IPv4Address.SEGMENT_COUNT) {
throw new AddressStringException(str, 0);
}
return builder;
} | [
"123.2.3.4 is 4.3.2.123.in-addr.arpa."
] | [
"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",
"Find and validate manifest.json file in Artifactory for the current image.\nSince provided imageTag differs between reverse-proxy and proxy-less configuration, try to build the correct manifest path.\n@param server\n@param dependenciesClient\n@param listener\n@return\n@throws IOException",
"Pause the current entry point, and invoke the provided listener when all current requests have finished.\n\nIf individual control point tracking is not enabled then the listener will be invoked straight away\n\n@param requestCountListener The listener to invoke",
"symbol for filling padding position in output",
"Use this API to fetch a vpnglobal_auditnslogpolicy_binding resources.",
"Load a classifier from the specified InputStream. The classifier is\nreinitialized from the flags serialized in the classifier. This does not\nclose the InputStream.\n\n@param in\nThe InputStream to load the serialized classifier from\n@param props\nThis Properties object will be used to update the\nSeqClassifierFlags which are read from the serialized classifier\n\n@throws IOException\nIf there are problems accessing the input stream\n@throws ClassCastException\nIf there are problems interpreting the serialized data\n@throws ClassNotFoundException\nIf there are problems interpreting the serialized data",
"Get content for URL only\n\n@param stringUrl URL to get content\n@return the content\n@throws IOException I/O error happened",
"Verify that the given queues are all valid.\n\n@param queues the given queues",
"Establish a new master tempo, and if it is a change from the existing one, report it to the listeners.\n\n@param newTempo the newly reported master tempo."
] |
@Nullable
@SuppressWarnings("unchecked")
protected <T extends JavaElement> ActiveElements<T> popIfActive() {
return (ActiveElements<T>) (!activations.isEmpty() && activations.peek().depth == depth ? activations.pop() :
null);
} | [
"Pops the top of the stack of active elements if the current position in the call stack corresponds to the one\nthat pushed the active elements.\n\n<p>This method does not do any type checks, so take care to retrieve the elements with the same types used to push\nto them onto the stack.\n\n@param <T> the type of the elements\n\n@return the active elements or null if the current call stack did not push any active elements onto the stack"
] | [
"Adds a data set with date-time value to IIM file.\n\n@param ds\ndata set id (see constants in IIM class)\n@param date\ndate to set. Null values are silently ignored.\n@throws SerializationException\nif value can't be serialized by data set's serializer\n@throws InvalidDataSetException\nif data set isn't defined",
"Map Synchro constraints to MPXJ constraints.\n\n@param task task\n@param row Synchro constraint data",
"Converts any path into something that can be placed in an Android directory.\n\nTraverses any subdirectories and flattens it all into a single filename. Also\ngets rid of commonly seen illegal characters in tz identifiers, and lower cases\nthe entire thing.\n\n@param path the path to convert\n@return a flat path with no directories (and lower-cased)",
"Use this API to fetch crvserver_policymap_binding resources of given name .",
"Calculate where within the beat grid array the information for the specified beat can be found.\nYes, this is a super simple calculation; the main point of the method is to provide a nice exception\nwhen the beat is out of bounds.\n\n@param beatNumber the beat desired\n\n@return the offset of the start of our cache arrays for information about that beat",
"Sets the right padding character for all cells in the table.\n@param paddingRightChar new padding character, ignored if null\n@return this to allow chaining",
"You should use the server's time here. Otherwise you might get unexpected results.\n\nThe typical use case is:\n\n\n<pre>\nHTTPResponse response = ....\nHTTPRequest request = createRequest();\nrequest = request.conditionals(new Conditionals().ifModifiedSince(response.getLastModified());\n</pre>\n\n@param time the time to check.\n@return the conditionals with the If-Modified-Since date set.",
"Read a long int from an input stream.\n\n@param is input stream\n@return long value",
"Closes any registered stream entries that have not yet been consumed"
] |
public void selectTab() {
for (Widget child : getChildren()) {
if (child instanceof HasHref) {
String href = ((HasHref) child).getHref();
if (parent != null && !href.isEmpty()) {
parent.selectTab(href.replaceAll("[^a-zA-Z\\d\\s:]", ""));
parent.reload();
break;
}
}
}
} | [
"Select this tab item."
] | [
"Trim and append a file separator to the string",
"Get the nearest scale.\n\n@param zoomLevels the list of Zoom Levels.\n@param tolerance the tolerance to use when considering if two values are equal. For example if\n12.0 == 12.001. The tolerance is a percentage.\n@param zoomLevelSnapStrategy the strategy to use for snapping to the nearest zoom level.\n@param geodetic snap to geodetic scales.\n@param paintArea the paint area of the map.\n@param dpi the DPI.",
"Navigate to this address in the given model node.\n\n@param model the model node\n@param create {@code true} to create the last part of the node if it does not exist\n@return the submodel\n@throws NoSuchElementException if the model contains no such element\n\n@deprecated manipulating a deep DMR node tree via PathAddress is no longer how the management layer works\ninternally, so this method has become legacy cruft. Management operation handlers\nshould obtain a {@link org.jboss.as.controller.registry.Resource Resource} from the\n{@link org.jboss.as.controller.OperationContext#readResource(PathAddress) OperationContext}\nand use the {@code Resource} API to access child resources",
"Add a dependency task group for this model.\n\n@param dependency the dependency.\n@return key to be used as parameter to taskResult(string) method to retrieve result of root\ntask in the given dependency task group",
"Establish a new master tempo, and if it is a change from the existing one, report it to the listeners.\n\n@param newTempo the newly reported master tempo.",
"Called when a previously created loader has finished its load.\n\n@param loader The Loader that has finished.\n@param data The data generated by the Loader.",
"Generate a PageMetadata object for the page represented by the specified pagination token.\n\n@param paginationToken opaque pagination token\n@param initialParameters the initial view query parameters (i.e. for the page 1 request).\n@param <K> the view key type\n@param <V> the view value type\n@return PageMetadata object for the given page",
"Initializes OJB for the purposes of this task.\n\n@return The metadata manager used by OJB",
"Template method responsible for file compression checks, file creation, and\ndelegation to specific strategy implementations.\n\n@param backupFile\nThe file to be compressed.\n@param properties\nThe appender's configuration."
] |
public void generateReport(List<XmlSuite> xmlSuites,
List<ISuite> suites,
String outputDirectoryName)
{
removeEmptyDirectories(new File(outputDirectoryName));
boolean useFrames = System.getProperty(FRAMES_PROPERTY, "true").equals("true");
boolean onlyFailures = System.getProperty(ONLY_FAILURES_PROPERTY, "false").equals("true");
File outputDirectory = new File(outputDirectoryName, REPORT_DIRECTORY);
outputDirectory.mkdirs();
try
{
if (useFrames)
{
createFrameset(outputDirectory);
}
createOverview(suites, outputDirectory, !useFrames, onlyFailures);
createSuiteList(suites, outputDirectory, onlyFailures);
createGroups(suites, outputDirectory);
createResults(suites, outputDirectory, onlyFailures);
createLog(outputDirectory, onlyFailures);
copyResources(outputDirectory);
}
catch (Exception ex)
{
throw new ReportNGException("Failed generating HTML report.", ex);
}
} | [
"Generates a set of HTML files that contain data about the outcome of\nthe specified test suites.\n@param suites Data about the test runs.\n@param outputDirectoryName The directory in which to create the report."
] | [
"Get all backup data\n\n@param model\n@return\n@throws Exception",
"Gets the default configuration for Freemarker within Windup.",
"Adjusts all links in the target folder that point to the source folder\nso that they are kept \"relative\" in the target folder where possible.\n\nIf a link is found from the target folder to the source folder,\nthen the target folder is checked if a target of the same name\nis found also \"relative\" inside the target Folder, and if so,\nthe link is changed to that \"relative\" target. This is mainly used to keep\nrelative links inside a copied folder structure intact.\n\nExample: Image we have folder /folderA/ that contains files\n/folderA/x1 and /folderA/y1. x1 has a link to y1 and y1 to x1.\nNow someone copies /folderA/ to /folderB/. So we end up with\n/folderB/x2 and /folderB/y2. Because of the link mechanism in OpenCms,\nx2 will have a link to y1 and y2 to x1. By using this method,\nthe links from x2 to y1 will be replaced by a link x2 to y2,\nand y2 to x1 with y2 to x2.\n\nLink replacement works for links in XML files as well as relation only\ntype links.\n\n@param sourceFolder the source folder\n@param targetFolder the target folder\n\n@throws CmsException if something goes wrong",
"Converts an object to an XML file.\n\n@param object The object to convert.\n@param fileName The filename where to save it to.\n@throws FileNotFoundException On error.",
"Encode a path in a manner suitable for a GET request\n@param in The path to encode, eg \"a/document\"\n@return The encoded path eg \"a%2Fdocument\"",
"delete topic never used\n\n@param topic topic name\n@param password password\n@return number of partitions deleted\n@throws IOException if an I/O error",
"Create a new instance for the specified host and encryption key.\n\n@see #create(String)",
"Use this API to fetch all the snmpoption resources that are configured on netscaler.",
"Retrieve any resource field aliases defined in the MPP file.\n\n@param map index to field map\n@param data resource field name alias data"
] |
public static void Backward(double[] data) {
double[] result = new double[data.length];
double sum;
double scale = Math.sqrt(2.0 / data.length);
for (int t = 0; t < data.length; t++) {
sum = 0;
for (int j = 0; j < data.length; j++) {
double cos = Math.cos(((2 * t + 1) * j * Math.PI) / (2 * data.length));
sum += alpha(j) * data[j] * cos;
}
result[t] = scale * sum;
}
for (int i = 0; i < data.length; i++) {
data[i] = result[i];
}
} | [
"1-D Backward Discrete Cosine Transform.\n\n@param data Data."
] | [
"Gets the current Stack. If the stack is not set, a new empty instance is created and set.\n@return",
"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",
"Attaches meta info about the current state of the device to an event.\nTypically, this meta is added only to the ping event.",
"Constructs a Google APIs HTTP client with the associated credentials.",
"Specify the time out of the session established at the server. The\nsession is kept alive by requests sent by this client object. If the\nsession is idle for a period of time that would timeout the session, the\nclient will send a PING request to keep the session alive.\n\n@param timeout timeout in milliseconds, must be greater than zero and less\nthan 60000.",
"Get interfaces implemented by clazz\n\n@param clazz\n@return",
"Loads a PDF document and creates a DOM tree from it.\n@param doc the source document\n@return a DOM Document representing the DOM tree\n@throws IOException",
"Fetches the HttpMethod from annotations and returns String representation of HttpMethod.\nReturn emptyString if not present.\n\n@param method Method handling the http request.\n@return String representation of HttpMethod from annotations or emptyString as a default.",
"Reads and returns the mediator URN from the JSON content.\n\n@see #RegistrationConfig(String)"
] |
public static Pointer mmap(long len, int prot, int flags, int fildes, long off)
throws IOException {
// we don't really have a need to change the recommended pointer.
Pointer addr = new Pointer(0);
Pointer result = Delegate.mmap(addr,
new NativeLong(len),
prot,
flags,
fildes,
new NativeLong(off));
if(Pointer.nativeValue(result) == -1) {
if(logger.isDebugEnabled())
logger.debug(errno.strerror());
throw new IOException("mmap failed: " + errno.strerror());
}
return result;
} | [
"Map the given region of the given file descriptor into memory.\nReturns a Pointer to the newly mapped memory throws an\nIOException on error."
] | [
"Creates a new instance with the given key and value.\nMay be used instead of the constructor for convenience reasons.\n\n@param k\nthe key. May be <code>null</code>.\n@param v\nthe value. May be <code>null</code>.\n@return a newly created pair. Never <code>null</code>.\n@since 2.3",
"An efficient method for exchanging data between two bit strings. Both bit strings must\nbe long enough that they contain the full length of the specified substring.\n@param other The bitstring with which this bitstring should swap bits.\n@param start The start position for the substrings to be exchanged. All bit\nindices are big-endian, which means position 0 is the rightmost bit.\n@param length The number of contiguous bits to swap.",
"Should the URI explicitly not be cached.\n\n@param requestUri request URI\n@return true when caching is prohibited",
"Checks the given collection descriptor.\n\n@param collDef The collection descriptor\n@param checkLevel The amount of checks to perform\n@exception ConstraintException If a constraint has been violated",
"Recursively descend through the hierarchy creating tasks.\n\n@param parent parent task\n@param parentName parent name\n@param rows rows to add as tasks to this parent",
"Returns the adapter position of the Child associated with this ChildViewHolder\n\n@return The adapter position of the Child if it still exists in the adapter.\nRecyclerView.NO_POSITION if item has been removed from the adapter,\nRecyclerView.Adapter.notifyDataSetChanged() has been called after the last\nlayout pass or the ViewHolder has already been recycled.",
"Add a polygon symbolizer definition to the rule.\n\n@param styleJson The old style.",
"convenience factory method for the most usual case.",
"Option check, forwards options to the standard doclet, if that one refuses them,\nthey are sent to UmlGraph"
] |
public void setColor(int n, int color) {
int firstColor = map[0];
int lastColor = map[256-1];
if (n > 0)
for (int i = 0; i < n; i++)
map[i] = ImageMath.mixColors((float)i/n, firstColor, color);
if (n < 256-1)
for (int i = n; i < 256; i++)
map[i] = ImageMath.mixColors((float)(i-n)/(256-n), color, lastColor);
} | [
"Set a knot color.\n@param n the knot index\n@param color the color"
] | [
"Escapes control characters with a preceding backslash.\nOptionally encodes special chars as unicode escape sequence.\nThe resulting string is safe to be put into a Java string literal between\nthe quotes.",
"waits for all async mutations that were added before this was called to be flushed. Does not\nwait for async mutations added after call.",
"Answer a List of InCriteria based on values, each InCriteria\ncontains only inLimit values\n@param attribute\n@param values\n@param negative\n@param inLimit the maximum number of values for IN (-1 for no limit)\n@return List of InCriteria",
"Use this API to expire cacheobject resources.",
"Finds or creates a ResourceStorageLoadable for the given resource.\nClients should first call shouldLoadFromStorage to check whether there exists a storage version\nof the given resource.\n\n@return an IResourceStorageLoadable",
"Gets an element of the matrix.\n\n@param row\nthe row\n@param col\nthe column\n@return the element at the given position",
"Restore backup data\n\n@param fileData - json file with restore data\n@return\n@throws Exception",
"create partitions in the broker\n\n@param topic topic name\n@param partitionNum partition numbers\n@param enlarge enlarge partition number if broker configuration has\nsetted\n@return partition number in the broker\n@throws IOException if an I/O error occurs",
"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"
] |
private String getResourceField(int key)
{
String result = null;
if (key > 0 && key < m_resourceNames.length)
{
result = m_resourceNames[key];
}
return (result);
} | [
"Given a resource field number, this method returns the resource field name.\n\n@param key resource field number\n@return resource field name"
] | [
"Updates the properties of a tag. Only the fields provided in the `data`\nblock will be updated; any unspecified fields will remain unchanged.\n\nWhen using this method, it is best to specify only those fields you wish\nto change, or else you may overwrite changes made by another user since\nyou last retrieved the task.\n\nReturns the complete updated tag record.\n\n@param tag The tag to update.\n@return Request object",
"Extract a list of exception assignments.\n\n@param exceptionData string representation of exception assignments\n@return list of exception assignment rows",
"Check whether the media seems to have changed since a saved version of it was used. We ignore changes in\nfree space because those probably just reflect history entries being added.\n\n@param originalMedia the media details when information about it was saved\n\n@return true if there have been detectable significant changes to the media since it was saved\n\n@throws IllegalArgumentException if the {@link #hashKey()} values of the media detail objects differ",
"Checks the day, month and year are equal.",
"Creates a converter function that converts value using a constructor that accepts a single String argument.\n\n@return A converter function or {@code null} if the given type doesn't have a public constructor that accepts\na single String argument.",
"Load a system library from a stream. Copies the library to a temp file\nand loads from there.\n\n@param libname name of the library (just used in constructing the library name)\n@param is InputStream pointing to the library",
"Write throwable as attachment.\n\n@param throwable to write\n@param title title of attachment\n@return Created {@link ru.yandex.qatools.allure.model.Attachment}",
"Gets or creates id of the entity type.\n\n@param entityType entity type name.\n@param allowCreate if set to true and if there is no entity type like entityType,\ncreate the new id for the entityType.\n@return entity type id.",
"Checks to make sure that pseudo scoped beans (i.e. @Dependent scoped beans) have no circular dependencies."
] |
@Override
public boolean check(EmbeddedBrowser browser) {
String js =
"try{ if(" + expression + "){return '1';}else{" + "return '0';}}catch(e){"
+ " return '0';}";
try {
Object object = browser.executeJavaScript(js);
if (object == null) {
return false;
}
return object.toString().equals("1");
} catch (CrawljaxException e) {
// Exception is caught, check failed so return false;
return false;
}
} | [
"Check invariant.\n\n@param browser The browser.\n@return Whether the condition is satisfied or <code>false</code> when it it isn't or a\n{@link CrawljaxException} occurs."
] | [
"Gets the JsonObject representation of the given field object.\n@param field represents a template field\n@return the json object",
"Use this API to add nsip6.",
"Commit all written data to the physical disk\n\n@throws IOException any io exception",
"Get an array of property ids.\n\nNot all property ids need be returned. Those properties\nwhose ids are not returned are considered non-enumerable.\n\n@return an array of Objects. Each entry in the array is either\na java.lang.String or a java.lang.Number",
"Specify the proxy and the authentication parameters to be used\nto establish the connections to Apple Servers.\n\n<p>Read the <a href=\"http://java.sun.com/javase/6/docs/technotes/guides/net/proxies.html\">\nJava Networking and Proxies</a> guide to understand the\nproxies complexity.\n\n@param proxy the proxy object to be used to create connections\n@param proxyUsername a String object representing the username of the proxy server\n@param proxyPassword a String object representing the password of the proxy server\n@return this",
"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",
"Sends the error to responder.",
"Add a user by ID to the list of people to notify when the retention period is ending.\n@param userID The ID of the user to add to the list.",
"This method is very similar to addMainHandler, except ShellFactory\nwill pass all handlers registered with this method to all this shell's subshells.\n\n@see org.gearvrf.debug.cli.Shell#addMainHandler(java.lang.Object, java.lang.String)\n\n@param handler Object which should be registered as handler.\n@param prefix Prefix that should be prepended to all handler's command names."
] |
@Override
public SuggestionsInterface getSuggestionsInterface() {
if (suggestionsInterface == null) {
suggestionsInterface = new SuggestionsInterface(apiKey, sharedSecret, transport);
}
return suggestionsInterface;
} | [
"Get the SuggestionsInterface.\n\n@return The SuggestionsInterface"
] | [
"Returns the y-coordinate of a vertex bitangent.\n\n@param vertex the vertex index\n@return the y coordinate",
"Returns an array of non-empty ids from the given list of ids or values.\n\n@param idsOrValues\nlist of ids and/or values\n@return array of non-empty ids",
"Returns all headers with the headers from the Payload\n\n@return All the headers",
"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\"",
"Checks if class is on class path\n@param className of the class to check.\n@return true if class in on class path, false otherwise.",
"Returns the name of the class to be instantiated.\n@param rs the Resultset\n@return null if the column is not available",
"Gets the actual key - will create a new row with the max key of table if it\ndoes not exist.\n@param field\n@return\n@throws SequenceManagerException",
"Print a date.\n\n@param value Date instance\n@return string representation of a date",
"Callback for constant meta class update change"
] |
public static java.util.Date getDateTime(Object value) {
try {
return toDateTime(value);
} catch (ParseException pe) {
pe.printStackTrace();
return null;
}
} | [
"Convert an Object to a DateTime, without an Exception"
] | [
"Schedules the task with a fixed delay period and an initialDelay period. This functions\nlike the normal java Timer.\n@param task\n@param initialDelay\n@param fixedDelay",
"Filter unsafe or unnecessary request.\n\n@param nodeDataMapValidSource\nthe node data map valid source\n@param nodeDataMapValidSafe\nthe node data map valid safe",
"Creates a map between a work pattern ID and a list of time entry rows.\n\n@param rows time entry rows\n@return time entry map",
"Set the buttons span text.",
"Initializes context size.\n\n@param rectangle rectangle",
"Returns status message.\n\n@param user CmsUser\n@param disabled boolean\n@param newUser boolean\n@return String",
"Trim the trailing spaces.\n\n@param line",
"Delete a comment as the currently authenticated user.\n\nThis method requires authentication with 'write' permission.\n\n@param commentId\nThe id of the comment to delete.\n@throws FlickrException",
"Sets the specified float attribute to the specified value.\n\n@param name name of the attribute\n@param value value of the attribute\n@since 1.9.0"
] |
private void useSearchService() throws Exception {
System.out.println("Searching...");
WebClient wc = WebClient.create("http://localhost:" + port + "/services/personservice/search");
WebClient.getConfig(wc).getHttpConduit().getClient().setReceiveTimeout(10000000L);
wc.accept(MediaType.APPLICATION_XML);
// Moves to "/services/personservice/search"
wc.path("person");
SearchConditionBuilder builder = SearchConditionBuilder.instance();
System.out.println("Find people with the name Fred or Lorraine:");
String query = builder.is("name").equalTo("Fred").or()
.is("name").equalTo("Lorraine")
.query();
findPersons(wc, query);
System.out.println("Find all people who are no more than 30 years old");
query = builder.is("age").lessOrEqualTo(30)
.query();
findPersons(wc, query);
System.out.println("Find all people who are older than 28 and whose father name is John");
query = builder.is("age").greaterThan(28)
.and("fatherName").equalTo("John")
.query();
findPersons(wc, query);
System.out.println("Find all people who have children with name Fred");
query = builder.is("childName").equalTo("Fred")
.query();
findPersons(wc, query);
//Moves to "/services/personservice/personinfo"
wc.reset().accept(MediaType.APPLICATION_XML);
wc.path("personinfo");
System.out.println("Find all people younger than 40 using JPA2 Tuples");
query = builder.is("age").lessThan(40).query();
// Use URI path component to capture the query expression
wc.path(query);
Collection<? extends PersonInfo> personInfos = wc.getCollection(PersonInfo.class);
for (PersonInfo pi : personInfos) {
System.out.println("ID : " + pi.getId());
}
wc.close();
} | [
"SearchService is a service which shares the information about Persons with the PersonService.\nIt lets users search for individual people using simple or complex search expressions.\nThe interaction with this service also verifies that the JAX-RS server is capable of supporting multiple\nroot resource classes"
] | [
"Make a timestamp value given a date.",
"This produces a string with no compressed segments and all segments of full length,\nwhich is 3 characters for IPv4 segments.",
"Returns the parent of this path or null if this path is the root path.\n\n@return the parent of this path or null if this path is the root path.",
"Return the list of actions on the tuple.\nInherently deduplicated operations\n\n@return the operations to execute on the Tuple",
"Use this API to unset the properties of bridgetable resource.\nProperties that need to be unset are specified in args array.",
"Notifies that multiple content items are changed.\n\n@param positionStart the position.\n@param itemCount the item count.",
"This takes into account scrolling and will be in absolute\ncoordinates where the top left corner of the page is 0,0 but\nthe viewport may be scrolled to something else.",
"gets a class from the class cache. This cache contains only classes loaded through\nthis class loader or an InnerLoader instance. If no class is stored for a\nspecific name, then the method should return null.\n\n@param name of the class\n@return the class stored for the given name\n@see #removeClassCacheEntry(String)\n@see #setClassCacheEntry(Class)\n@see #clearCache()",
"Returns the single abstract method of a class node, if it is a SAM type, or null otherwise.\n@param type a type for which to search for a single abstract method\n@return the method node if type is a SAM type, null otherwise"
] |
public static Object buildNewObjectInstance(ClassDescriptor cld)
{
Object result = null;
// If either the factory class and/or factory method is null,
// just follow the normal code path and create via constructor
if ((cld.getFactoryClass() == null) || (cld.getFactoryMethod() == null))
{
try
{
// 1. create an empty Object (persistent classes need a public default constructor)
Constructor con = cld.getZeroArgumentConstructor();
if(con == null)
{
throw new ClassNotPersistenceCapableException(
"A zero argument constructor was not provided! Class was '" + cld.getClassNameOfObject() + "'");
}
result = ConstructorHelper.instantiate(con);
}
catch (InstantiationException e)
{
throw new ClassNotPersistenceCapableException(
"Can't instantiate class '" + cld.getClassNameOfObject()+"'");
}
}
else
{
try
{
// 1. create an empty Object by calling the no-parms factory method
Method method = cld.getFactoryMethod();
if (Modifier.isStatic(method.getModifiers()))
{
// method is static so call it directly
result = method.invoke(null, null);
}
else
{
// method is not static, so create an object of the factory first
// note that this requires a public no-parameter (default) constructor
Object factoryInstance = cld.getFactoryClass().newInstance();
result = method.invoke(factoryInstance, null);
}
}
catch (Exception ex)
{
throw new PersistenceBrokerException("Unable to build object instance of class '"
+ cld.getClassNameOfObject() + "' from factory:" + cld.getFactoryClass()
+ "." + cld.getFactoryMethod(), ex);
}
}
return result;
} | [
"Builds a new instance for the class represented by the given class descriptor.\n\n@param cld The class descriptor\n@return The instance"
] | [
"Add an URL to the given classloader\n\n@param loader ClassLoader\n@param url URL to add\n@throws IOException I/O Error\n@throws InvocationTargetException Invocation Error\n@throws IllegalArgumentException Illegal Argument\n@throws IllegalAccessException Illegal Access\n@throws SecurityException Security Constraint\n@throws NoSuchMethodException Method not found",
"Initialises JMX stuff.\n@param doRegister if true, perform registration, if false unregister",
"is ready to service requests",
"All tests completed.",
"Use this API to unset the properties of ipv6 resource.\nProperties that need to be unset are specified in args array.",
"Creates an observable that emits the given item after the specified time in milliseconds.\n\n@param event the event to emit\n@param milliseconds the delay in milliseconds\n@param <T> the type of event\n@return delayed observable",
"Collection of JRVariable\n\n@param variables\n@return",
"2-D Forward Discrete Cosine Transform.\n\n@param data Data.",
"Picks out a File from `thriftFiles` corresponding to a given artifact ID\nand file name. Returns null if `artifactId` and `fileName` do not map to a\nthrift file path.\n\n@parameter artifactId The artifact ID of which to look up the path\n@parameter fileName the name of the thrift file for which to extract a path\n@parameter thriftFiles The set of Thrift files in which to lookup the\nartifact ID.\n@return The path of the directory containing Thrift files for the given\nartifact ID. null if artifact ID not found."
] |
public static ModelMBeanOperationInfo[] extractOperationInfo(Object object) {
ArrayList<ModelMBeanOperationInfo> infos = new ArrayList<ModelMBeanOperationInfo>();
for(Method m: object.getClass().getMethods()) {
JmxOperation jmxOperation = m.getAnnotation(JmxOperation.class);
JmxGetter jmxGetter = m.getAnnotation(JmxGetter.class);
JmxSetter jmxSetter = m.getAnnotation(JmxSetter.class);
if(jmxOperation != null || jmxGetter != null || jmxSetter != null) {
String description = "";
int visibility = 1;
int impact = MBeanOperationInfo.UNKNOWN;
if(jmxOperation != null) {
description = jmxOperation.description();
impact = jmxOperation.impact();
} else if(jmxGetter != null) {
description = jmxGetter.description();
impact = MBeanOperationInfo.INFO;
visibility = 4;
} else if(jmxSetter != null) {
description = jmxSetter.description();
impact = MBeanOperationInfo.ACTION;
visibility = 4;
}
ModelMBeanOperationInfo info = new ModelMBeanOperationInfo(m.getName(),
description,
extractParameterInfo(m),
m.getReturnType()
.getName(), impact);
info.getDescriptor().setField("visibility", Integer.toString(visibility));
infos.add(info);
}
}
return infos.toArray(new ModelMBeanOperationInfo[infos.size()]);
} | [
"Extract all operations and attributes from the given object that have\nbeen annotated with the Jmx annotation. Operations are all methods that\nare marked with the JmxOperation annotation.\n\n@param object The object to process\n@return An array of operations taken from the object"
] | [
"Add a BETWEEN clause so the column must be between the low and high parameters.",
"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.",
"Converts the bytes that make up an internet address into the corresponding integer value to make\nit easier to perform bit-masking operations on them.\n\n@param address an address whose integer equivalent is desired\n\n@return the integer corresponding to that address",
"Rename a key for all languages.\n@param oldKey the key to rename\n@param newKey the new key name\n@return <code>true</code> if renaming was successful, <code>false</code> otherwise.",
"Use this API to rename a nsacl6 resource.",
"Utility method to remove ampersands embedded in names.\n\n@param name name text\n@return name text without embedded ampersands",
"Sign in a connection to the registry by key.\n\nNote multiple connections can be attached to the same key\n\n@param key\nthe key\n@param connection\nthe websocket connection\n@see #register(String, WebSocketConnection)",
"Inject members into this instance and register the services afterwards.\n@see #getGuiceModule()\n@see #registerInRegistry(boolean)\n@since 2.1",
"Removes the given service provider factory from the set of\nproviders for the service.\n\n@param serviceName\nThe fully qualified name of the service interface.\n@param factory\nA factory for creating a specific type of service\nprovider. May be <tt>null</tt> in which case this\nmethod does nothing.\n@throws IllegalArgumentException if serviceName is <tt>null</tt>"
] |
public static int getNavigationBarHeight(Context context) {
Resources resources = context.getResources();
int id = resources.getIdentifier(context.getResources().getConfiguration().orientation == Configuration.ORIENTATION_PORTRAIT ? "navigation_bar_height" : "navigation_bar_height_landscape", "dimen", "android");
if (id > 0) {
return resources.getDimensionPixelSize(id);
}
return 0;
} | [
"helper to calculate the navigationBar height\n\n@param context\n@return"
] | [
"Lookup the group for the specified URL.\n\n@param url\nThe url\n@return The group\n@throws FlickrException",
"Use this API to fetch lbvserver_filterpolicy_binding resources of given name .",
"For running queries embebed in the report design\n\n@param dr\n@param layoutManager\n@param con\n@param _parameters\n@return\n@throws JRException",
"Isn't there a method for this in GeoTools?\n\n@param crs\nCRS string in the form of 'EPSG:<srid>'.\n@return SRID as integer.",
"Read all configuration files.\n@return the list with all available configurations",
"If a given x is into an interval of the partition, this method returns the reference point of the corresponding interval.\nIf the given x is not contained in any interval of the partition, this method returns x.\n\n@param x The point of interest.\n@return The discretized value.",
"Create a new DateTime. To the last second. This will not create any\nextra-millis-seconds, which may cause bugs when writing to stores such as\ndatabases that round milli-seconds up and down.",
"Do the search, called as a \"page action\"",
"Updates the image information."
] |
private void mapText(String oldText, Map<String, String> replacements)
{
char c2 = 0;
if (oldText != null && oldText.length() != 0 && !replacements.containsKey(oldText))
{
StringBuilder newText = new StringBuilder(oldText.length());
for (int loop = 0; loop < oldText.length(); loop++)
{
char c = oldText.charAt(loop);
if (Character.isUpperCase(c))
{
newText.append('X');
}
else
{
if (Character.isLowerCase(c))
{
newText.append('x');
}
else
{
if (Character.isDigit(c))
{
newText.append('0');
}
else
{
if (Character.isLetter(c))
{
// Handle other codepages etc. If possible find a way to
// maintain the same code page as original.
// E.g. replace with a character from the same alphabet.
// This 'should' work for most cases
if (c2 == 0)
{
c2 = c;
}
newText.append(c2);
}
else
{
newText.append(c);
}
}
}
}
}
replacements.put(oldText, newText.toString());
}
} | [
"Converts plan text into anonymous text. Preserves upper case, lower case,\npunctuation, whitespace and digits while making the text unreadable.\n\n@param oldText text to replace\n@param replacements map of find/replace pairs"
] | [
"Create an IPv6 mixed address using the given ipv6 segments and using this address for the embedded IPv4 segments\n\n@param segs\n@return",
"Return the number of rows affected.",
"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",
"Creates and returns a GVRSceneObject with the specified mesh attributes.\n\n@param vertices the vertex positions of that make up the mesh. (x1, y1, z1, x2, y2, z2, ...)\n@param velocities the velocity attributes for each vertex. (vx1, vy1, vz1, vx2, vy2, vz2...)\n@param particleTimeStamps the spawning times of each vertex. (t1, 0, t2, 0, t3, 0 ..)\n\n@return The GVRSceneObject with this mesh.",
"If the not a bitmap itself, this will read the file's meta data.\n\n@param resources {@link android.content.Context#getResources()}\n@return Point where x = width and y = height",
"Set new list data set\n@param list new data set",
"Creates the \"Add key\" button.\n@return the \"Add key\" button.",
"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.",
"Use this API to unset the properties of nsconfig resource.\nProperties that need to be unset are specified in args array."
] |
public void addDependency(final ProcessorGraphNode node) {
Assert.isTrue(node != this, "A processor can't depends on himself");
this.dependencies.add(node);
node.addRequirement(this);
} | [
"Add a dependency to this node.\n\n@param node the dependency to add."
] | [
"Optionally specify the variable name to use for the output of this condition",
"Replaces an existing metadata value.\n@param path the path that designates the key. Must be prefixed with a \"/\".\n@param value the value.\n@return this metadata object.",
"2-D Integer array to double array.\n\n@param array Integer array.\n@return Double array.",
"Use this API to fetch statistics of nspbr6_stats resource of given name .",
"Get the response headers for URL\n\n@param stringUrl URL to use\n@return headers HTTP Headers\n@throws IOException I/O error happened",
"Removes bean from scope.\n\n@param name bean name\n@return previous value",
"Carry out any post-processing required to tidy up\nthe data read from the database.",
"Generate node data map.\n\n@param task\nthe job info",
"This returns a string from decimal digit smallestDigit to decimal digit\nbiggest digit. Smallest digit is labeled 1, and the limits are\ninclusive."
] |
@SuppressWarnings("unchecked")
public void setHeaders(final Map<String, Object> headers) {
this.headers.clear();
for (Map.Entry<String, Object> entry: headers.entrySet()) {
if (entry.getValue() instanceof List) {
List value = (List) entry.getValue();
// verify they are all strings
for (Object o: value) {
Assert.isTrue(o instanceof String, o + " is not a string it is a: '" +
o.getClass() + "'");
}
this.headers.put(entry.getKey(), (List<String>) entry.getValue());
} else if (entry.getValue() instanceof String) {
final List<String> value = Collections.singletonList((String) entry.getValue());
this.headers.put(entry.getKey(), value);
} else {
throw new IllegalArgumentException("Only strings and list of strings may be headers");
}
}
} | [
"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"
] | [
"This method allows us to peek into the OLE compound document to extract the file format.\nThis allows the UniversalProjectReader to determine if this is an MPP file, or if\nit is another type of OLE compound document.\n\n@param fs POIFSFileSystem instance\n@return file format name\n@throws IOException",
"convert filename to clean filename",
"Merges the item from the resultLocaleValues into the corresponding item of the localeValues.\n@param item the item to merge\n@param localeValues the values where the item gets merged into\n@param resultLocaleValues the values where the item to merge is read from\n@return the modified localeValues with the merged item",
"Use this API to delete dnssuffix resources of given names.",
"select a use case.",
"Applies the > operator to each element in A. Results are stored in a boolean matrix.\n\n@param A Input matrx\n@param value value each element is compared against\n@param output (Optional) Storage for results. Can be null. Is reshaped.\n@return Boolean matrix with results",
"Used for DI frameworks to inject values into stages.",
"Use this API to fetch authenticationvserver_auditnslogpolicy_binding resources of given name .",
"Creates the container for a bundle without descriptor.\n@return the container for a bundle without descriptor.\n@throws IOException thrown if reading the bundle fails.\n@throws CmsException thrown if reading the bundle fails."
] |
protected static String createDotStoryName(String scenarioName) {
String[] words = scenarioName.trim().split(" ");
String result = "";
for (int i = 0; i < words.length; i++) {
String word1 = words[i];
String word2 = word1.toLowerCase();
if (!word1.equals(word2)) {
String finalWord = "";
for (int j = 0; j < word1.length(); j++) {
if (i != 0) {
char c = word1.charAt(j);
if (Character.isUpperCase(c)) {
if (j==0) {
finalWord += Character.toLowerCase(c);
} else {
finalWord += "_" + Character.toLowerCase(c);
}
} else {
finalWord += c;
}
} else {
finalWord = word2;
break;
}
}
result += finalWord;
} else {
result += word2;
}
// I don't add the '_' to the last word.
if (!(i == words.length - 1))
result += "_";
}
return result;
} | [
"Creates the name of the .story file to be wrote with the testcase. The\nname of the scenario must be given with spaces.\n\n@param scenarioName\n- The scenario name, with spaces\n@return the .story file name."
] | [
"Obtain the IDs of profile and path as Identifiers\n\n@param profileIdentifier actual ID or friendly name of profile\n@param pathIdentifier actual ID or friendly name of path\n@return\n@throws Exception",
"Old REST client uses old REST service",
"Read the values from the output object and write them to the values object.\n\n@param output the output object from a processor\n@param processor the processor the output if from\n@param values the object for sharing values between processors",
"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",
"Returns the count of all inbox messages for the user\n@return int - count of all inbox messages",
"Cleanup function to remove all allocated listeners",
"Insert entity object. The caller must first initialize the primary key\nfield.",
"Set the values of a set of knots.\n@param x the knot positions\n@param y the knot colors\n@param types the knot types\n@param offset the first knot to set\n@param count the number of knots",
"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."
] |
@SuppressWarnings("unchecked")
public Map<BsonValue, ChangeEvent<BsonDocument>> getEvents() {
nsLock.readLock().lock();
final Map<BsonValue, ChangeEvent<BsonDocument>> events;
try {
events = new HashMap<>(this.events);
} finally {
nsLock.readLock().unlock();
}
nsLock.writeLock().lock();
try {
this.events.clear();
return events;
} finally {
nsLock.writeLock().unlock();
}
} | [
"Returns the latest change events, and clears them from the change stream listener.\n\n@return the latest change events."
] | [
"prefix length in this section is ignored when converting to MAC",
"Adds a \"Post Run\" task to the collection.\n\n@param taskItem the \"Post Run\" task",
"Obtain a connection asynchronously by queueing a request to obtain a connection in a separate thread.\n\nUse as follows:<p>\nFuture<Connection> result = pool.getAsyncConnection();<p>\n... do something else in your application here ...<p>\nConnection connection = result.get(); // get the connection<p>\n\n@return A Future task returning a connection.",
"parse json text to specified class\n\n@param jsonRtn\n@param jsonRtnClazz\n@return",
"Returns script view\n\n@param model\n@return\n@throws Exception",
"Generates a comment regarding the parameters.\n\n@param entityId - id of the commented entity\n@param entityType - type of the entity\n@param action - the action performed by the user\n@param commentedText - comment text\n@param user - comment left by\n@param date - date comment was created\n@return - comment entity",
"Create a SVG graphic with the give dimensions.\n\n@param size The size of the SVG graphic.",
"Process class properties.\n\n@param writer output stream\n@param methodSet set of methods processed\n@param aClass class being processed\n@throws IntrospectionException\n@throws XMLStreamException",
"Write a string attribute.\n\n@param name attribute name\n@param value attribute value"
] |
@Pure
public static <T> Iterator<T> filterNull(Iterator<T> unfiltered) {
return Iterators.filter(unfiltered, Predicates.notNull());
} | [
"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>."
] | [
"default visibility for unit test",
"Determine if a task field contains data.\n\n@param task task instance\n@param field target field\n@return true if the field contains data",
"Retrieve the number of minutes per month for this calendar.\n\n@return minutes per month",
"Creates an upper triangular matrix whose values are selected from a uniform distribution. If hessenberg\nis greater than zero then a hessenberg matrix of the specified degree is created instead.\n\n@param dimen Number of rows and columns in the matrix..\n@param hessenberg 0 for triangular matrix and > 0 for hessenberg matrix.\n@param min minimum value an element can be.\n@param max maximum value an element can be.\n@param rand random number generator used.\n@return The randomly generated matrix.",
"Goes through all the RO Stores in the plan and swaps it\n\n@param swappedStoreNames Names of stores already swapped\n@param useSwappedStoreNames Swap only the previously swapped stores (\nHappens during error )",
"Returns IMAP formatted String of MessageFlags for named user",
"Get the literal value for an expression.\n\n@param expression expression\n@return literal value",
"Returns the master mode's editor state for editing a bundle with descriptor.\n@return the master mode's editor state for editing a bundle with descriptor.",
"Gets the final transform of the bone.\n\n@return the 4x4 matrix representing the final transform of the\nbone during animation, which comprises bind pose and skeletal\ntransform at the current time of the animation."
] |
public void editMeta(String photosetId, String title, String description) throws FlickrException {
Map<String, Object> parameters = new HashMap<String, Object>();
parameters.put("method", METHOD_EDIT_META);
parameters.put("photoset_id", photosetId);
parameters.put("title", title);
if (description != null) {
parameters.put("description", description);
}
Response response = transportAPI.post(transportAPI.getPath(), parameters, apiKey, sharedSecret);
if (response.isError()) {
throw new FlickrException(response.getErrorCode(), response.getErrorMessage());
}
} | [
"Modify the meta-data for a photoset.\n\n@param photosetId\nThe photoset ID\n@param title\nA new title\n@param description\nA new description (can be null)\n@throws FlickrException"
] | [
"Use this API to reset Interface resources.",
"this method looks up the appropriate JDOClass for a given persistent Class.\nIt uses the JDOModel to perfom this lookup.\n@param c the persistent Class\n@return the JDOCLass object",
"Saves the current translations from the container to the respective localization.",
"Creates a build\n\n@param appName See {@link #listApps} for a list of apps that can be used.\n@param build the build information",
"Load all string recognize.",
"Sends all events to the web service. Events will be transformed with mapper before sending.\n\n@param events the events",
"Inserts a new instance but references via the outIdentifier, which is returned as part of the ExecutionResults\n\n@param object\n@param outIdentifier\n@return",
"Accessor method to retrieve an accrue type instance.\n\n@param field the index number of the field to be retrieved\n@return the value of the required field",
"Calculates the local translation and rotation for a bone.\nAssumes WorldRot and WorldPos have been calculated for the bone."
] |
@Pure
public static <K, V> Pair<K, V> of(K k, V v) {
return new Pair<K, V>(k, v);
} | [
"Creates a new instance with the given key and value.\nMay be used instead of the constructor for convenience reasons.\n\n@param k\nthe key. May be <code>null</code>.\n@param v\nthe value. May be <code>null</code>.\n@return a newly created pair. Never <code>null</code>.\n@since 2.3"
] | [
"Parses the given Reader for PmdRuleSets.\n\n@return The extracted PmdRuleSet - empty in case of problems, never null.",
"Populate the model with the object's properties.\n\n@param object object whose properties we're displaying\n@param excludedMethods method names to exclude",
"Loads a CRF classifier from an InputStream, and returns it. This method\ndoes not buffer the InputStream, so you should have buffered it before\ncalling this method.\n\n@param in\nInputStream to load classifier from\n@return The CRF classifier\n\n@throws IOException\nIf there are problems accessing the input stream\n@throws ClassCastException\nIf there are problems interpreting the serialized data\n@throws ClassNotFoundException\nIf there are problems interpreting the serialized data",
"Divides the elements at the specified column by 'val'. Takes in account\nleading zeros and one.",
"Generates the specified number of random resource names with the same prefix.\n@param prefix the prefix to be used if possible\n@param maxLen the maximum length for the random generated name\n@param count the number of names to generate\n@return random names",
"Gets a list of any comments on this file.\n\n@return a list of comments on this file.",
"Send a mount update announcement to all registered listeners, and see if we can auto-attach a media cache file.\n\n@param slot the slot in which media has been mounted or unmounted\n@param mounted will be {@code true} if there is now media mounted in the specified slot",
"Check if the specified sql-string is a stored procedure\nor not.\n@param sql The sql query to check\n@return <em>True</em> if the query is a stored procedure, else <em>false</em> is returned.",
"Sorts the row indices in ascending order.\n@param sorter (Optional) Used to sort rows. If null a new instance will be declared internally."
] |
private List<Object> doQuery(
SharedSessionContractImplementor session,
QueryParameters qp,
OgmLoadingContext ogmLoadingContext,
boolean returnProxies) {
//TODO support lock timeout
int entitySpan = entityPersisters.length;
final List<Object> hydratedObjects = entitySpan == 0 ? null : new ArrayList<Object>( entitySpan * 10 );
//TODO yuk! Is there a cleaner way to access the id?
final Serializable id;
// see if we use batching first
// then look for direct id
// then for a tuple based result set we could extract the id
// otherwise that's a collection so we use the collection key
boolean loadSeveralIds = loadSeveralIds( qp );
boolean isCollectionLoader;
if ( loadSeveralIds ) {
// need to be set to null otherwise the optionalId has precedence
// and is used for all tuples regardless of their actual ids
id = null;
isCollectionLoader = false;
}
else if ( qp.getOptionalId() != null ) {
id = qp.getOptionalId();
isCollectionLoader = false;
}
else if ( ogmLoadingContext.hasResultSet() ) {
// extract the ids from the tuples directly
id = null;
isCollectionLoader = false;
}
else {
id = qp.getCollectionKeys()[0];
isCollectionLoader = true;
}
TupleAsMapResultSet resultset = getResultSet( id, qp, ogmLoadingContext, session );
//Todo implement lockmode
//final LockMode[] lockModesArray = getLockModes( queryParameters.getLockOptions() );
//FIXME should we use subselects as it's closer to this process??
//TODO is resultset a good marker, or should it be an ad-hoc marker??
//It likely all depends on what resultset ends up being
handleEmptyCollections( qp.getCollectionKeys(), resultset, session );
final org.hibernate.engine.spi.EntityKey[] keys = new org.hibernate.engine.spi.EntityKey[entitySpan];
//for each element in resultset
//TODO should we collect List<Object> as result? Not necessary today
Object result = null;
List<Object> results = new ArrayList<Object>();
if ( isCollectionLoader ) {
preLoadBatchFetchingQueue( session, resultset );
}
try {
while ( resultset.next() ) {
result = getRowFromResultSet(
resultset,
session,
qp,
ogmLoadingContext,
//lockmodeArray,
id,
hydratedObjects,
keys,
returnProxies );
results.add( result );
}
//TODO collect subselect result key
}
catch ( SQLException e ) {
//never happens this is not a regular ResultSet
}
//end of for each element in resultset
initializeEntitiesAndCollections( hydratedObjects, resultset, session, qp.isReadOnly( session ) );
//TODO create subselects
return results;
} | [
"Execute the physical query and initialize the various entities and collections\n\n@param session the session\n@param qp the query parameters\n@param ogmLoadingContext the loading context\n@param returnProxies when {@code true}, get an existing proxy for each collection element (if there is one)\n@return the result of the query"
] | [
"Returns a licenses regarding its Id and a fake on if no license exist with such an Id\n\n@param licenseId String\n@return License",
"Handles the response of the SerialApiGetInitData request.\n@param incomingMlivessage the response message to process.",
"Get the maximum width and height of the labels.\n\n@param settings Parameters for rendering the scalebar.",
"Use this API to fetch authorizationpolicylabel_binding resource of given name .",
"Set the query parameter values overriding all existing query values for\nthe same parameter. If no values are given, the query parameter is removed.\n@param name the query parameter name\n@param values the query parameter values\n@return this UriComponentsBuilder",
"Use this API to fetch sslcertkey_crldistribution_binding resources of given name .",
"a helper method to enable the keyboardUtil for a specific activity\nor disable it. note this will cause some frame drops because of the\nlistener.\n\n@param activity\n@param enable",
"Retrieves list of inbox messages based on given userId\n@param userId String userid\n@return ArrayList of {@link CTMessageDAO}",
"Returns true if the activity is a milestone.\n\n@param activity Phoenix activity\n@return true if the activity is a milestone"
] |
public float getBoundsDepth() {
if (mSceneObject != null) {
GVRSceneObject.BoundingVolume v = mSceneObject.getBoundingVolume();
return v.maxCorner.z - v.minCorner.z;
}
return 0f;
} | [
"Gets Widget bounds depth\n@return depth"
] | [
"Returns the site path for the edited bundle file.\n\n@return the site path for the edited bundle file.",
"Checks the preconditions for creating a new RequireSubStr processor with a List of Strings.\n\n@param requiredSubStrings\nthe required substrings\n@throws NullPointerException\nif requiredSubStrings or one of its elements is null\n@throws IllegalArgumentException\nif requiredSubStrings is empty",
"Add a polygon symbolizer definition to the rule.\n\n@param styleJson The old style.",
"Mark the top level deployment as being a JPA deployment. If the deployment is not a top level deployment the parent is\nmarked instead",
"Parse a date time value.\n\n@param value String representation\n@return Date instance",
"GetJob helper - String predicates are all created the same way, so this factors some code.",
"Implements getAll by delegating to get.",
"Group results by the specified field.\n\n@param fieldName by which to group results\n@param isNumber whether field isNumeric.\n@return this for additional parameter setting or to query",
"Adds custom header to request\n\n@param key\n@param value"
] |
@Override
public boolean parseAndValidateRequest() {
boolean result = false;
if(!super.parseAndValidateRequest() || !hasVectorClock(this.isVectorClockOptional)
|| !hasContentLength() || !hasContentType()) {
result = false;
} else {
result = true;
}
return result;
} | [
"Validations specific to PUT"
] | [
"Create a document that parses the tile's featureFragment, using GraphicsWriter classes.\n\n@param writer\nwriter\n@return document\n@throws RenderException\noops",
"Handles the response of the SerialApiGetInitData request.\n@param incomingMlivessage the response message to process.",
"Retrieves basic meta data from the result set.\n\n@throws SQLException",
"Checks whether every property except 'preferred' is satisfied\n\n@return",
"Get a list of topics from a group.\n\n@param groupId\nUnique identifier of a group returns a list of topics for a given group {@link Group}.\n@param perPage\nNumber of records per page.\n@param page\nResult-section.\n@return A group topic list\n@throws FlickrException\n@see <a href=\"http://www.flickr.com/services/api/flickr.groups.discuss.topics.getList.html\">API Documentation</a>",
"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",
"Returns the simple name of the builder class that should be generated for the given type.\n\n<p>This is simply the {@link #BUILDER_SIMPLE_NAME_TEMPLATE} with the original type name\nsubstituted in. (If the original type is nested, its enclosing classes will be included,\nseparated with underscores, to ensure uniqueness.)",
"handle case where Instant is outside the bounds of OffsetDateTime",
"Resolve an operation transformer entry.\n\n@param address the address\n@param operationName the operation name\n@param placeholderResolver a placeholder resolver used to resolve children of a placeholder registration\n@return the transformer entry"
] |
private static void readAndAddDocumentsFromStream(
final SolrClient client,
final String lang,
final InputStream is,
final List<SolrInputDocument> documents,
final boolean closeStream) {
final BufferedReader br = new BufferedReader(new InputStreamReader(is));
try {
String line = br.readLine();
while (null != line) {
final SolrInputDocument document = new SolrInputDocument();
// Each field is named after the schema "entry_xx" where xx denotes
// the two digit language code. See the file spellcheck/conf/schema.xml.
document.addField("entry_" + lang, line);
documents.add(document);
// Prevent OutOfMemoryExceptions ...
if (documents.size() >= MAX_LIST_SIZE) {
addDocuments(client, documents, false);
documents.clear();
}
line = br.readLine();
}
} catch (IOException e) {
LOG.error("Could not read spellcheck dictionary from input stream.");
} catch (SolrServerException e) {
LOG.error("Error while adding documents to Solr server. ");
} finally {
try {
if (closeStream) {
br.close();
}
} catch (Exception e) {
// Nothing to do here anymore ....
}
}
} | [
"Parses the dictionary from an InputStream.\n\n@param client The SolrClient instance object.\n@param lang The language of the dictionary.\n@param is The InputStream object.\n@param documents List to put the assembled SolrInputObjects into.\n@param closeStream boolean flag that determines whether to close the inputstream\nor not."
] | [
"The default User-Agent header. Override this method to override the user agent.\n\n@return the user agent string.",
"Process start.\n\n@param endpoint the endpoint\n@param eventType the event type",
"Load physics information for the current avatar\n@param filename name of physics file\n@param scene scene the avatar is part of\n@throws IOException if physics file cannot be parsed",
"Adds methods requiring special implementations rather than just\ndelegation.\n\n@param proxyClassType the Javassist class description for the proxy type",
"Populate a task from a Row instance.\n\n@param row Row instance\n@param task Task instance",
"Determines how many primary partitions each node within each zone should\nhave. The list of integers returned per zone is the same length as the\nnumber of nodes in that zone.\n\n@param nextCandidateCluster\n@param targetPartitionsPerZone\n@return A map of zoneId to list of target number of partitions per node\nwithin zone.",
"Use this API to add sslocspresponder resources.",
"Return a String of length a minimum of totalChars characters by\npadding the input String str at the right end with spaces.\nIf str is already longer\nthan totalChars, it is returned unchanged.",
"the 1st request from the manager."
] |
public String getEditedFilePath() {
switch (getBundleType()) {
case DESCRIPTOR:
return m_cms.getSitePath(m_desc);
case PROPERTY:
return null != m_lockedBundleFiles.get(getLocale())
? m_cms.getSitePath(m_lockedBundleFiles.get(getLocale()).getFile())
: m_cms.getSitePath(m_resource);
case XML:
return m_cms.getSitePath(m_resource);
default:
throw new IllegalArgumentException();
}
} | [
"Returns the site path for the edited bundle file.\n\n@return the site path for the edited bundle file."
] | [
"if you don't have an argument, choose the value that is going to be inserted into the map instead\n\n@param commandLineOption specification of the command line options\n@param value the value that is going to be inserted into the map instead of the argument",
"Initialize elements from the duration panel.",
"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",
"Use this API to fetch sslvserver_sslcertkey_binding resources of given name .",
"Flattens an option into its value or else null, which is not great but is usually more convenient in Java.\n@param option Optional value -- either Some(T) or None\n@param <T> Any type\n@return The value inside the option, or else null",
"Remove a DropPasteWorker from the helper.\n@param worker the worker that should be removed",
"Add an additional SSExtension\n@param ssExt the ssextension to set",
"Returns the compact representations of all of the dependencies of a task.\n\n@param task The task to get dependencies on.\n@return Request object",
"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\""
] |
public void buttonClick(View v) {
switch (v.getId()) {
case R.id.show:
showAppMsg();
break;
case R.id.cancel_all:
AppMsg.cancelAll(this);
break;
default:
return;
}
} | [
"Button onClick listener.\n\n@param v"
] | [
"Copy all of the mappings from the specified map to this one, replacing\nany mappings with the same keys.\n\n@param in the map whose mappings are to be copied",
"retrieve a single reference- or collection attribute\nof a persistent instance.\n@param pInstance the persistent instance\n@param pAttributeName the name of the Attribute to load",
"Logs an error message for unhandled exception thrown from the target method.\n\n@param joinPoint - the joint point cut that contains information about the target\n@param throwable - the cause of the exception from the target method invocation",
"Use this API to fetch all the systemsession resources that are configured on netscaler.",
"A package of the specified class 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 packageClass\n@return self",
"Returns a matrix of StatisticsMatrix type so that SimpleMatrix functions create matrices\nof the correct type.",
"Backup all xml files in a given directory.\n\n@param source the source directory\n@param target the target directory\n@throws IOException for any error",
"Consumes the version field from the given input and raises an exception if the record is in a newer version,\nwritten by a newer version of Hibernate OGM.\n\n@param input the input to read from\n@param supportedVersion the type version supported by this version of OGM\n@param externalizedType the type to be unmarshalled\n\n@throws IOException if an error occurs while reading the input",
"Set the parent from which this week is derived.\n\n@param parent parent week"
] |
public T update(T entity) throws RowNotFoundException, OptimisticLockException {
if (!hasPrimaryKey(entity)) {
throw new RuntimeException(String.format("Tried to update entity of type %s without a primary key", entity
.getClass().getSimpleName()));
}
UpdateCreator update = new UpdateCreator(table);
update.whereEquals(idColumn.getColumnName(), getPrimaryKey(entity));
if (versionColumn != null) {
update.set(versionColumn.getColumnName() + " = " + versionColumn.getColumnName() + " + 1");
update.whereEquals(versionColumn.getColumnName(), getVersion(entity));
}
for (Column column : columns) {
if (!column.isReadOnly()) {
update.setValue(column.getColumnName(), getFieldValueAsColumn(entity, column));
}
}
int rows = new JdbcTemplate(ormConfig.getDataSource()).update(update);
if (rows == 1) {
if (versionColumn != null) {
ReflectionUtils.setFieldValue(entity, versionColumn.getFieldName(), getVersion(entity) + 1);
}
return entity;
} else if (rows > 1) {
throw new RuntimeException(
String.format("Updating table %s with id %s updated %d rows. There must be a mapping problem. Is column %s really the primary key?",
table, getPrimaryKey(entity), rows, idColumn));
} else {
//
// Updated zero rows. This could be because our ID is wrong, or
// because our object is out-of date. Let's try querying just by ID.
//
SelectCreator selectById = new SelectCreator()
.column("count(*)")
.from(table)
.whereEquals(idColumn.getColumnName(), getPrimaryKey(entity));
rows = new JdbcTemplate(ormConfig.getDataSource()).query(selectById, new ResultSetExtractor<Integer>() {
@Override
public Integer extractData(ResultSet rs) throws SQLException, DataAccessException {
rs.next();
return rs.getInt(1);
}
});
if (rows == 0) {
throw new RowNotFoundException(table, getPrimaryKey(entity));
} else {
throw new OptimisticLockException(table, getPrimaryKey(entity));
}
}
} | [
"Updates value of entity in the table."
] | [
"Convenience routine to move to the next iterator if needed.\n@return true if the iterator is changed, false if no changes.",
"Sets the target hosts from line by line text.\n\n@param sourcePath\nthe source path\n@param sourceType\nthe source type\n@return the parallel task builder\n@throws TargetHostsLoadException\nthe target hosts load exception",
"Adds the index input to list.\n\n@param name the name\n@param in the in\n@param postingsFormatName the postings format name\n@return the string\n@throws IOException Signals that an I/O exception has occurred.",
"Do not call this method outside of activity!!!",
"Returns the cost rate table index for this assignment.\n\n@return cost rate table index",
"Begin writing a named object attribute.\n\n@param name attribute name",
"Set the duration option.\n@param value the duration option to set ({@link EndType} as string).",
"List of releases for an app.\n@param appName App name. See {@link #listApps} for a list of apps that can be used.\n@return a list of releases",
"Return the numeraire at a given time.\nThe numeraire is provided for interpolated points. If requested on points which are not\npart of the tenor discretization, the numeraire uses a linear interpolation of the reciprocal\nvalue. See ISBN 0470047224 for details.\n\n@param time Time time <i>t</i> for which the numeraire should be returned <i>N(t)</i>.\n@return The numeraire at the specified time as <code>RandomVariableFromDoubleArray</code>\n@throws net.finmath.exception.CalculationException Thrown if the valuation fails, specific cause may be available via the <code>cause()</code> method."
] |
public void dumpKnownFieldMaps(Props props)
{
//for (int key=131092; key < 131098; key++)
for (int key = 50331668; key < 50331674; key++)
{
byte[] fieldMapData = props.getByteArray(Integer.valueOf(key));
if (fieldMapData != null)
{
System.out.println("KEY: " + key);
createFieldMap(fieldMapData);
System.out.println(toString());
clear();
}
}
} | [
"Diagnostic method used to dump known field map data.\n\n@param props props block containing field map data"
] | [
"Remove write.lock file in the data directory to ensure the index is unlocked.\n@param dataDir the data directory of the Solr index that should be unlocked.",
"Get the signatures that have been computed for all tracks currently loaded in any player for which we have\nbeen able to obtain all necessary metadata.\n\n@return the signatures that uniquely identify the tracks loaded in each player\n\n@throws IllegalStateException if the SignatureFinder is not running",
"Creates a tar file entry with defaults parameters.\n@param fileName the entry name\n@return file entry with reasonable defaults",
"Process TestCaseFinishedEvent. Add steps and attachments from\ntop step from stepStorage to current testCase, then remove testCase\nand step from stores. Also remove attachments matches removeAttachments\nconfig.\n\n@param event to process",
"Calling EventProducerInterceptor in case of logging faults.\n\n@param exchange\nthe message exchange\n@param reqFid\nthe FlowId\n\n@throws Fault\nthe fault",
"Loads a CRF classifier from an InputStream, and returns it. This method\ndoes not buffer the InputStream, so you should have buffered it before\ncalling this method.\n\n@param in\nInputStream to load classifier from\n@return The CRF classifier\n\n@throws IOException\nIf there are problems accessing the input stream\n@throws ClassCastException\nIf there are problems interpreting the serialized data\n@throws ClassNotFoundException\nIf there are problems interpreting the serialized data",
"Creates a descriptor for the currently edited message bundle.\n@return <code>true</code> if the descriptor could be created, <code>false</code> otherwise.",
"Removes an Object from the cache.",
"Get permissions for who may view geo data for a photo.\n\nThis method requires authentication with 'read' permission.\n\n@param photoId\nreqired photo id, not null\n@return the permissions\n@throws FlickrException\nif photo id is invalid, if photo has no geodata or if any other error has been reported in the response."
] |
public static String resourceTypeFromResourceId(String id) {
return (id != null) ? ResourceId.fromString(id).resourceType() : null;
} | [
"Extract resource type from a resource ID string.\n@param id the resource ID string\n@return the resource type"
] | [
"Gets the groupby for ReportQueries of all Criteria and Sub Criteria\nthe elements are of class FieldHelper\n@return List of FieldHelper",
"Retrieve a duration in the form required by Primavera.\n\n@param duration Duration instance\n@return formatted duration",
"Returns all the URL that should be inside the classpath. This includes the jar itself if any.\n\n@throws JqmPayloadException",
"Gets the progress.\n\n@return the progress",
"Get a list of topics from a group.\n\n@param groupId\nUnique identifier of a group returns a list of topics for a given group {@link Group}.\n@param perPage\nNumber of records per page.\n@param page\nResult-section.\n@return A group topic list\n@throws FlickrException\n@see <a href=\"http://www.flickr.com/services/api/flickr.groups.discuss.topics.getList.html\">API Documentation</a>",
"Adds, eventually merging, a direction for the specified relation type\n@param relationType\n@param direction",
"Producers returned from this method are not validated. Internal use only.",
"Prepare a parallel HTTP OPTION Task.\n\n@param url\nthe UrlPostfix: e.g. in http://localhost:8080/index.html.,the url is \"/index.html\"\n@return the parallel task builder",
"Creates a descriptor for the currently edited message bundle.\n@return <code>true</code> if the descriptor could be created, <code>false</code> otherwise."
] |
public Boolean getBoolean(int field, String falseText)
{
Boolean result;
if ((field < m_fields.length) && (m_fields[field].length() != 0))
{
result = ((m_fields[field].equalsIgnoreCase(falseText) == true) ? Boolean.FALSE : Boolean.TRUE);
}
else
{
result = null;
}
return (result);
} | [
"Accessor method to retrieve a Boolean instance.\n\n@param field the index number of the field to be retrieved\n@param falseText locale specific text representing false\n@return the value of the required field"
] | [
"Convert a collection of objects to a JSON array with the string representations of that objects.\n@param collection the collection of objects.\n@return the JSON array with the string representations.",
"Converts this address to a prefix length\n\n@return the prefix of the indicated IP type represented by this address or null if this address is valid but cannot be represented by a network prefix length\n@throws AddressStringException if the address is invalid",
"Given a resource field name, this method returns the resource field number.\n\n@param field resource field name\n@return resource field number",
"set custom request 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",
"Get the OAuth request token - this is step one of authorization.\n\n@param callbackUrl\noptional callback URL - required for web auth flow, will be set to \"oob\" if not specified.\n@return the {@link OAuth1RequestToken}, store this for when the user returns from the Flickr website.",
"Pads the given String to the left with the given character to ensure that\nit's at least totalChars long.",
"This method is called to format a currency value.\n\n@param value numeric value\n@return currency value",
"Returns a licenses regarding its Id and a fake on if no license exist with such an Id\n\n@param licenseId String\n@return License",
"Prepare a parallel TCP Task.\n\n@param command\nthe command\n@return the parallel task builder"
] |
public static int[] Concatenate(int[] array, int[] array2) {
int[] all = new int[array.length + array2.length];
int idx = 0;
//First array
for (int i = 0; i < array.length; i++)
all[idx++] = array[i];
//Second array
for (int i = 0; i < array2.length; i++)
all[idx++] = array2[i];
return all;
} | [
"Concatenate the arrays.\n\n@param array First array.\n@param array2 Second array.\n@return Concatenate between first and second array."
] | [
"Get the authentication for a specific token.\n\n@param token token\n@return authentication if any",
"Print the parameters of the parameterized type t",
"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",
"Unregister the mbean with the given name\n\n@param server The server to unregister from\n@param name The name of the mbean to unregister",
"Use this API to update nspbr6 resources.",
"Internal initialization.\n@throws ParserConfigurationException",
"get an AdminClient from the cache if exists, if not create new one\nand return it. This method is non-blocking.\n\nAll AdminClient returned from checkout, once after the completion of\nusage must be returned to the pool by calling checkin. If not,\nthere will be leak of AdminClients (connections, threads and file handles).\n\n@return AdminClient",
"Creates a code location URL from a file path\n\n@param filePath the file path\n@return A URL created from File\n@throws InvalidCodeLocation if URL creation fails",
"get children nodes name\n\n@param zkClient zkClient\n@param path full path\n@return children nodes name or null while path not exist"
] |
public void show() {
if (!(container instanceof RootPanel)) {
if (!(container instanceof MaterialDialog)) {
container.getElement().getStyle().setPosition(Style.Position.RELATIVE);
}
div.getElement().getStyle().setPosition(Style.Position.ABSOLUTE);
}
if (scrollDisabled) {
RootPanel.get().getElement().getStyle().setOverflow(Style.Overflow.HIDDEN);
}
if (type == LoaderType.CIRCULAR) {
div.setStyleName(CssName.VALIGN_WRAPPER + " " + CssName.LOADER_WRAPPER);
div.add(preLoader);
} else if (type == LoaderType.PROGRESS) {
div.setStyleName(CssName.VALIGN_WRAPPER + " " + CssName.PROGRESS_WRAPPER);
progress.getElement().getStyle().setProperty("margin", "auto");
div.add(progress);
}
container.add(div);
} | [
"Shows the Loader component"
] | [
"Find the user by their email address.\n\nThis method does not require authentication.\n\n@param email\nThe email address\n@return The User\n@throws FlickrException",
"Calculates directory size as total size of all its files, recursively.\n\n@param self a file object\n@return directory size (length)\n@since 2.1\n\n@throws IOException if File object specified does not exist\n@throws IllegalArgumentException if the provided File object does not represent a directory",
"Transforms root paths to site paths.\n\n@return lazy map from root paths to site paths.\n\n@see CmsRequestContext#removeSiteRoot(String)",
"Restores a trashed folder back to its original location.\n@param folderID the ID of the trashed folder.\n@return info about the restored folder.",
"Records the result of updating a server.\n\n@param server the id of the server. Cannot be <code>null</code>\n@param response the result of the updates",
"Get a property as an long or throw an exception.\n\n@param key the property name",
"Remove the set of partitions from the node provided\n\n@param node The node from which we're removing the partitions\n@param donatedPartitions The list of partitions to remove\n@return The new node without the partitions",
"Retrieves the index of a cost rate table entry active on a given date.\n\n@param date target date\n@return cost rate table entry index",
"Should only called on a column that is being set to null.\n\nReturns the most outer embeddable containing {@code column} that is entirely null.\nReturn null otherwise i.e. not embeddable.\n\nThe implementation lazily compute the embeddable state and caches it.\nThe idea behind the lazy computation is that only some columns will be set to null\nand only in some situations.\nThe idea behind caching is that an embeddable contains several columns, no need to recompute its state."
] |
private static long daysBetween(Date date1, Date date2) {
long diff;
if (date2.after(date1)) {
diff = date2.getTime() - date1.getTime();
} else {
diff = date1.getTime() - date2.getTime();
}
return diff / (24 * 60 * 60 * 1000);
} | [
"Naive implementation of the difference in days between two dates"
] | [
"Use this API to fetch all the vlan resources that are configured on netscaler.",
"Gets the date time str standard.\n\n@param d\nthe d\n@return the date time str standard",
"Produces all tuples of size n chosen from a list of variable names\n\n@param variables the list of variable names to make tuples of\n@param nWise the size of the desired tuples\n@return all tuples of size nWise",
"Compute pose of skeleton at the given time from the animation channels.\n@param timeInSec animation time in seconds.",
"Set the specific device class of the node.\n@param specificDeviceClass the specificDeviceClass to set\n@exception IllegalArgumentException thrown when the specific device class does not match\nthe generic device class.",
"Returns all scripts\n\n@param model\n@param type - optional to specify type of script to return\n@return\n@throws Exception",
"Transmits the SerialMessage to a single Z-Wave Node.\nSets the transmission options as well.\n@param serialMessage the Serial message to send.",
"Creates a new row with content with given cell context and a normal row style.\n@param content the content for the row, each member of the array represents the content for a cell in the row, must not be null but can contain null members\n@return a new row with content\n@throws {@link NullPointerException} if content was null",
"Create and serialize a WorkerStatus.\n\n@param queue the queue the Job came from\n@param job the Job currently being processed\n@return the JSON representation of a new WorkerStatus\n@throws IOException if there was an error serializing the WorkerStatus"
] |
public static Calendar popCalendar()
{
Calendar result;
Deque<Calendar> calendars = CALENDARS.get();
if (calendars.isEmpty())
{
result = Calendar.getInstance();
}
else
{
result = calendars.pop();
}
return result;
} | [
"Acquire a calendar instance.\n\n@return Calendar instance"
] | [
"Add new control at the end of control bar with specified touch listener and resource.\nSize of control bar is updated based on new number of controls.\n@param name name of the control to remove\n@param resId the control face\n@param listener touch listener",
"remove drag support from the given Component.\n@param c the Component to remove",
"Returns true if the input is a vector\n@param a A matrix or vector\n@return true if it's a vector. Column or row.",
"Throw IllegalStateException if key is not present in map.\n@param key the key to expect.\n@param map the map to search.\n@throws IllegalArgumentException if key is not in map.",
"Utility function that gives list of values from list of value-pair\nstrings.\n\n@param valuePairs List of value-pair strings\n@param delim Delimiter that separates the value pair\n@returns The list of values; empty if no value-pair is present, The even\nelements are the first ones of the value pair, and the odd\nelements are the second ones. For example, if the list of\nvalue-pair is [\"cluster.xml=file1\", \"stores.xml=file2\"], and the\npair delimiter is '=', we will then have the list of values in\nreturn: [\"cluster.xml\", \"file1\", \"stores.xml\", \"file2\"].",
"Constraint that ensures that the field has a column property. If none is specified, then\nthe name of the field is used.\n\n@param fieldDef The field descriptor\n@param checkLevel The current check level (this constraint is checked in all levels)",
"Recursively builds the VFS entry bean for the quick filtering function in the folder tab.<p<\n\n@param resource the resource\n@param childMap map from parent to child resources\n@param filterMatches the resources matching the filter\n@param parentPaths root paths of resources which are not leaves\n@param isRoot true if this the root node\n\n@return the VFS entry bean for the client\n\n@throws CmsException if something goes wrong",
"Process UDFs for a specific object.\n\n@param mpxj field container\n@param udfs UDF values",
"Pops the top event off the current event stack. This action has to be\nperformed immediately after the event has been dispatched to all\nlisteners.\n\n@param <L> Type of the listener.\n@param expected The Event which is expected at the top of the stack.\n@see #pushEvent(Event)"
] |
public int delete(DatabaseConnection databaseConnection, T data, ObjectCache objectCache) throws SQLException {
if (mappedDelete == null) {
mappedDelete = MappedDelete.build(dao, tableInfo);
}
int result = mappedDelete.delete(databaseConnection, data, objectCache);
if (dao != null && !localIsInBatchMode.get()) {
dao.notifyChanges();
}
return result;
} | [
"Delete an object from the database."
] | [
"Creates a Bytes object by copying the value of the given String with a given charset",
"Add a IN clause so the column must be equal-to one of the objects from the list passed in.",
"Updates the polling state from a DELETE or POST operation.\n\n@param response the response from Retrofit REST call\n@throws IOException thrown by deserialization",
"Writes batch of data to the source\n@param batch\n@throws InterruptedException",
"Factory method, validates the given triplet year, month and dayOfMonth.\n\n@param prolepticYear the International fixed proleptic-year\n@param month the International fixed month, from 1 to 13\n@param dayOfMonth the International fixed day-of-month, from 1 to 28 (29 for Leap Day or Year Day)\n@return the International fixed date\n@throws DateTimeException if the date is invalid",
"Scans the jar file and returns the paths that match the includes and excludes.\n\n@return A List of paths\n@throws An IllegalStateException when an I/O error occurs in reading the jar file.",
"Animate de-selection of visible views and clear\nselected set.",
"Adds special accessors for private constants so that inner classes can retrieve them.",
"Find container env.\n\n@param ctx the container context\n@param dump the exception dump\n@return valid container or null"
] |
private void registerProxyCreator(Node source,
BeanDefinitionHolder holder,
ParserContext context) {
String beanName = holder.getBeanName();
String proxyName = beanName + "Proxy";
String interceptorName = beanName + "PerformanceMonitorInterceptor";
BeanDefinitionBuilder initializer =
BeanDefinitionBuilder.rootBeanDefinition(BeanNameAutoProxyCreator.class);
initializer.addPropertyValue("beanNames", beanName);
initializer.addPropertyValue("interceptorNames", interceptorName);
BeanDefinitionRegistry registry = context.getRegistry();
registry.registerBeanDefinition(proxyName, initializer.getBeanDefinition());
} | [
"Registers a BeanNameAutoProxyCreator class that wraps the bean being\nmonitored. The proxy is associated with the PerformanceMonitorInterceptor\nfor the bean, which is created when parsing the methods attribute from\nthe springconfiguration xml file.\n\n@param source An Attribute node from the spring configuration\n@param holder A container for the beans I will create\n@param context the context currently parsing my spring config"
] | [
"Update the underlying buffer using the integer\n\n@param number number to be stored in checksum buffer",
"Method indicating whether a day is a working or non-working day.\n\n@param day required day\n@return true if this is a working day",
"Whether the address has the well-known prefix for IPv4 translatable addresses as in rfc 6052 and 6144\n@return",
"Parse a macro defintion.\n\n\"macro NAME( var0 , var1 ) = 5+var0+var1'",
"Determine the target type for the generic return type of the given method,\nwhere formal type variables are declared on the given class.\n@param method the method to introspect\n@param clazz the class to resolve type variables against\n@return the corresponding generic parameter or return type\n@see #resolveReturnTypeForGenericMethod",
"Build and return a string version of the query. If you change the where or make other calls you will need to\nre-call this method to re-prepare the query for execution.",
"Replace bad xml charactes in given array by space\n\n@param cbuf buffer to replace in\n@param off Offset from which to start reading characters\n@param len Number of characters to be replaced",
"This method maps the currency symbol position from the\nrepresentation used in the MPP file to the representation\nused by MPX.\n\n@param value MPP symbol position\n@return MPX symbol position",
"Closing will only skip to the end of this fixed length input stream and\nnot call the parent's close method.\n@throws IOException if an I/O error occurs while closing stream"
] |
protected boolean waitForJobs() throws InterruptedException {
final Pair<Long, Job> peekPair;
try (Guard ignored = timeQueue.lock()) {
peekPair = timeQueue.peekPair();
}
if (peekPair == null) {
awake.acquire();
return true;
}
final long timeout = Long.MAX_VALUE - peekPair.getFirst() - System.currentTimeMillis();
if (timeout < 0) {
return false;
}
return awake.tryAcquire(timeout, TimeUnit.MILLISECONDS);
} | [
"returns true if a job was queued within a timeout"
] | [
"caching is not supported for this method",
"On host controller reload, remove a not running server registered in the process controller declared as down.",
"Returns a portion of the Bytes object\n\n@param start index of subsequence start (inclusive)\n@param end index of subsequence end (exclusive)",
"Fetches the HttpMethod from annotations and returns String representation of HttpMethod.\nReturn emptyString if not present.\n\n@param method Method handling the http request.\n@return String representation of HttpMethod from annotations or emptyString as a default.",
"Add a date with a certain check state.\n@param date the date to add.\n@param checkState the check state.",
"This static method calculated the rho of a call option under a Black-Scholes model\n\n@param initialStockValue The initial value of the underlying, i.e., the spot.\n@param riskFreeRate The risk free rate of the bank account numerarie.\n@param volatility The Black-Scholes volatility.\n@param optionMaturity The option maturity T.\n@param optionStrike The option strike.\n@return The rho of the option",
"This is the profiles page. this is the 'regular' page when the url is typed in",
"Handle a completed request producing an optional response",
"Calculates the length of the next block of RTF data.\n\n@param text RTF data\n@param offset current offset into this data\n@return block length"
] |
public static BoxRetentionPolicy.Info createIndefinitePolicy(BoxAPIConnection api, String name) {
return createRetentionPolicy(api, name, TYPE_INDEFINITE, 0, ACTION_REMOVE_RETENTION);
} | [
"Used to create a new indefinite retention policy.\n@param api the API connection to be used by the created user.\n@param name the name of the retention policy.\n@return the created retention policy's info."
] | [
"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.",
"Retrieves a string value from the property data.\n\n@param type Type identifier\n@return string value",
"Use this API to disable vserver of given name.",
"Gets the name for the getter for this property\n\n@return The name of the property. The name is \"get\"+ the capitalized propertyName\nor, in the case of boolean values, \"is\" + the capitalized propertyName",
"Load assertion from the provided json or throw exception if not possible.\n\n@param encodedAssertion the assertion as it was encoded in JSON.",
"Adds columns for the specified properties.\n@param _properties the array of <code>PropertyDescriptor</code>s to be added.\n@throws ColumnBuilderException if an error occurs.\n@throws ClassNotFoundException if an error occurs.",
"Watches specified IDs in a collection.\n@param ids the ids to watch.\n@return the stream of change events.",
"Sets the ssh password.\n\n@param password\nthe password\n@return the parallel task builder",
"Get the QNames of the port components to be declared\nin the namespaces\n\n@return collection of QNames"
] |
public Integer getNodesPartitionIdForKey(int nodeId, final byte[] key) {
// this is all the partitions the key replicates to.
List<Integer> partitionIds = getReplicatingPartitionList(key);
for(Integer partitionId: partitionIds) {
// check which of the replicating partitions belongs to the node in
// question
if(getNodeIdForPartitionId(partitionId) == nodeId) {
return partitionId;
}
}
return null;
} | [
"Determines the partition ID that replicates the key on the given node.\n\n@param nodeId of the node\n@param key to look up.\n@return partitionId if found, otherwise null."
] | [
"Emit an event object with parameters.\n\nThis will invoke all {@link SimpleEventListener} bound to the event object\nclass given the listeners has the matching argument list.\n\nIf there is no parameter passed in, i.e. `args.length == 0`, then it will\nalso invoke all the {@link ActEventListener} bound to the event class.\n\nFor example, suppose we have the following Event defined:\n\n```java\npublic class UserActivityEvent extends ActEvent<User> {\npublic UserActivityEvent(User user) {super(user);}\n}\n```\n\nAnd we have the following event handler defined:\n\n```java\n{@literal @}OnEvent\npublic void logUserLogin(UserActivityEvent event, long timestamp) {...}\n\n{@literal @}OnEvent\npublic void checkDuplicateLoginAttempts(UserActivityEvent, Object... args) {...}\n\n{@literal @}OnEvent\npublic void foo(UserActivityEvent event) {...}\n```\n\nThe following code will invoke `logUserLogin` and `checkDuplicateLoginAttempts` methods:\n\n```java\nUser user = ...;\neventBus.emit(new UserActivityEvent(user), System.currentTimeMills());\n```\n\nThe `foo(UserActivityEvent)` will not invoked because:\n\n* The parameter list `(UserActivityEvent, long)` does not match the declared\nargument list `(UserActivityEvent)`. Here the `String` in the parameter\nlist is taken out because it is used to indicate the event, instead of being\npassing through to the event handler method.\n* The method `checkDuplicateLoginAttempts(UserActivityEvent, Object ...)` will\nbe invoked because it declares a varargs typed arguments, meaning it matches\nany parameters passed in.\n\n@param event\nthe target event\n@param args\nthe arguments passed in\n@see SimpleEventListener",
"Returns the text value of all of the elements in the collection.\n\n@return the text value of all the elements in the collection or null",
"Converts a value to the appropriate type.\n\n@param type target type\n@param value input value\n@return output value",
"Receive some bytes from the player we are requesting metadata from.\n\n@param is the input stream associated with the player metadata socket.\n@return the bytes read.\n\n@throws IOException if there is a problem reading the response",
"Gets the Correlation distance between two points.\n\n@param p A point in space.\n@param q A point in space.\n@return The Correlation distance between x and y.",
"This method performs a series of permissions checks given a directory and properties file path.\n\n1 - Check whether the parent directory dirPath has proper execute and read permissions\n2 - Check whether properties file path is readable and writable\n\nIf either of the permissions checks fail, update validFilePermissions and filePermissionsProblemPath\nappropriately.",
"Converts the passed list of inners to unmodifiable map of impls.\n@param innerList list of the inners.\n@return map of the impls",
"Switches from a sparse to dense matrix",
"Reload a managed server.\n\n@param permit the controller permit\n@return whether the state was changed successfully or not"
] |
public GroovyConstructorDoc[] constructors() {
Collections.sort(constructors);
return constructors.toArray(new GroovyConstructorDoc[constructors.size()]);
} | [
"returns a sorted array of constructors"
] | [
"Adds OPT_P | OPT_PARTITION option to OptionParser, with multiple\narguments.\n\n@param parser OptionParser to be modified\n@param required Tells if this option is required or optional",
"Update the list of buildpacks installed on an app\n\n@param appName See {@link #listApps} for a list of apps that can be used.\n@param buildpacks the new list of buildpack names or URLs.",
"Retrieve the default aliases to be applied to MPXJ task and resource fields.\n\n@return map of aliases",
"Deletes a user from an enterprise account.\n@param notifyUser whether or not to send an email notification to the user that their account has been deleted.\n@param force whether or not this user should be deleted even if they still own files.",
"Convert from Hadoop Text to Bytes",
"Create a table model from an object's properties.\n\n@param object target object\n@param excludedMethods method names to exclude\n@return table model",
"Send a media details response to all registered listeners.\n\n@param details the response that has just arrived",
"this method looks up the appropriate JDOClass for a given persistent Class.\nIt uses the JDOModel to perfom this lookup.\n@param c the persistent Class\n@return the JDOCLass object",
"Recovers the state of synchronization for a namespace in case a system failure happened.\nThe goal is to revert the namespace to a known, good state. This method itself is resilient\nto failures, since it doesn't delete any documents from the undo collection until the\ncollection is in the desired state with respect to those documents."
] |
public void forAllCollectionDefinitions(String template, Properties attributes) throws XDocletException
{
for (Iterator it = _curClassDef.getCollections(); it.hasNext(); )
{
_curCollectionDef = (CollectionDescriptorDef)it.next();
if (!isFeatureIgnored(LEVEL_COLLECTION) &&
!_curCollectionDef.getBooleanProperty(PropertyHelper.OJB_PROPERTY_IGNORE, false))
{
generate(template);
}
}
_curCollectionDef = null;
} | [
"Processes the template for all collection definitions of the current class definition.\n\n@param template The template\n@param attributes The attributes of the tag\n@exception XDocletException if an error occurs\[email protected] type=\"block\""
] | [
"Queries the running container and attempts to lookup the information from the running container.\n\n@param client the client used to execute the management operation\n\n@return the container description\n\n@throws IOException if an error occurs while executing the management operation\n@throws OperationExecutionException if the operation used to query the container fails",
"Resets the resend counter and possibly resets the\nnode stage to DONE when previous initialization was\ncomplete.",
"Initializes OJB for the purposes of this task.\n\n@return The metadata manager used by OJB",
"Inits the ws client.\n\n@param context the context\n@throws Exception the exception",
"Retrieve a FieldType instance based on an ID value from\nan MPP9 or MPP12 file.\n\n@param fieldID field ID\n@return FieldType instance",
"Modify a misc file.\n\n@param name the file name\n@param path the relative path\n@param existingHash the existing hash\n@param newHash the new hash of the modified content\n@param isDirectory whether the file is a directory or not\n@return the builder",
"Checks if the given operator code is a valid one.\n\n@param operatorCode an operator code to evaluate\n@throws IllegalStateException if operatorCode is not a known operator code.",
"Remove all existing subscriptions",
"Read an optional string value form a JSON value.\n@param val the JSON value that should represent the string.\n@return the string from the JSON or null if reading the string fails."
] |
public static base_response flush(nitro_service client, cachecontentgroup resource) throws Exception {
cachecontentgroup flushresource = new cachecontentgroup();
flushresource.name = resource.name;
flushresource.query = resource.query;
flushresource.host = resource.host;
flushresource.selectorvalue = resource.selectorvalue;
flushresource.force = resource.force;
return flushresource.perform_operation(client,"flush");
} | [
"Use this API to flush cachecontentgroup."
] | [
"Internal method that adds a metadata provider to the set associated with a particular hash key, creating the\nset if needed.\n\n@param key the hashKey identifying the media for which this provider can offer metadata (or the empty string if\nit can offer metadata for all media)\n@param provider the metadata provider to be added to the active set",
"Init the headers of the table regarding the filters\n\n@return String[]",
"Return the value of field in the data argument if it is not the default value for the class. If it is the default\nthen null is returned.",
"Function to filter files based on defined rules.",
"Start a print.\n\n@param jobId the job ID\n@param specJson the client json request.\n@param out the stream to write to.",
"Modify a module.\n\n@param moduleName the module name\n@param slot the module slot\n@param existingHash the existing hash\n@param newHash the new hash of the modified content\n@return the builder",
"Reads color table as 256 RGB integer values.\n\n@param ncolors int number of colors to read.\n@return int array containing 256 colors (packed ARGB with full alpha).",
"Use this API to enable nsacl6 of given name.",
"Reads a single schema file.\n\n@param reader The schema reader\n@param schemaFile The schema file\n@return The model"
] |
public static base_response add(nitro_service client, appfwjsoncontenttype resource) throws Exception {
appfwjsoncontenttype addresource = new appfwjsoncontenttype();
addresource.jsoncontenttypevalue = resource.jsoncontenttypevalue;
addresource.isregex = resource.isregex;
return addresource.add_resource(client);
} | [
"Use this API to add appfwjsoncontenttype."
] | [
"Extract calendar data from the file.\n\n@throws SQLException",
"Retrieve configuration details for a given custom field.\n\n@param field required custom field\n@return configuration detail",
"Prints some basic documentation about this program.",
"Helper method to add a parameter without having to create it explicitely. The created parameter should be persisted afterwards.\n\n@param key\nname of the parameter to add\n@param value\nvalue of the parameter to create\n@return the newly created parameter",
"to avoid creation of unmaterializable proxies",
"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",
"Builds a configuration object based on given properties.\n\n@param properties the properties.\n@return a configuration and never null.",
"Request the artwork with a particular artwork ID, given a connection to a player that has already been set up.\n\n@param artworkId identifies the album art to retrieve\n@param slot the slot identifier from which the associated track was loaded\n@param trackType the kind of track that owns the artwork\n@param client the dbserver client that is communicating with the appropriate player\n\n@return the track's artwork, or null if none is available\n\n@throws IOException if there is a problem communicating with the player",
"This is a very ugly workaround to get the method arguments from the JUnit 5 context via reflection."
] |
protected void createNewFile(final File file) {
try {
file.createNewFile();
setFileNotWorldReadablePermissions(file);
} catch (IOException e){
throw new RuntimeException(e);
}
} | [
"This creates a new audit log file with default permissions.\n\n@param file File to create"
] | [
"set the insetsFrameLayout to display the content in fullscreen\nunder the statusBar and navigationBar\n\n@param fullscreen",
"get the default profile\n\n@return representation of default profile\n@throws Exception exception",
"Merge this ExecutionStatistics with all the statistics created within the child threads. All the child threads had to be created using Windup-specific\nThreadFactory in order to contain a reference to the parent thread.",
"Append the text at the end of the File, using a specified encoding.\n\n@param file a File\n@param text the text to append at the end of the File\n@param charset the charset used\n@throws IOException if an IOException occurs.\n@since 1.0",
"Find all methods on classes under scanBase that are annotated with annotationClass.\n\n@param scanBase Package to scan recursively, in dot notation (ie: org.jrugged...)\n@param annotationClass Class of the annotation to search for\n@return Set<Method> The set of all @{java.lang.reflect.Method}s having the annotation",
"Close the connection atomically.\n\n@return true if state changed to closed; false if nothing changed.",
"Use this API to fetch appfwjsoncontenttype resource of given name .",
"Send post request.\n\n@param url the url\n@param customHeaders the customHeaders\n@param params the params\n@return the string\n@throws IOException the io exception",
"Use this API to fetch all the dospolicy resources that are configured on netscaler."
] |
public void rollback()
{
try
{
Iterator iter = mvOrderOfIds.iterator();
while(iter.hasNext())
{
ObjectEnvelope mod = (ObjectEnvelope) mhtObjectEnvelopes.get(iter.next());
if(log.isDebugEnabled())
log.debug("rollback: " + mod);
// if the Object has been modified by transaction, mark object as dirty
if(mod.hasChanged(transaction.getBroker()))
{
mod.setModificationState(mod.getModificationState().markDirty());
}
mod.getModificationState().rollback(mod);
}
}
finally
{
needsCommit = false;
}
afterWriteCleanup();
} | [
"perform rollback on all tx-states"
] | [
"Returns new instance of OptionalValue with given value\n@param value wrapped object\n@param <T> type of the wrapped object\n@return given object wrapped in OptionalValue",
"The file we are working with has a byte order mark. Skip this and try again to read the file.\n\n@param stream schedule data\n@param length length of the byte order mark\n@param charset charset indicated by byte order mark\n@return ProjectFile instance",
"A factory method for users that need to report success without actually running any analysis. The returned\nresult will be successful, but will not contain the actual configurations of extensions.\n\n@return a \"fake\" successful analysis result",
"Configs created by this ConfigBuilder will have the given Redis hostname.\n\n@param host the Redis hostname\n@return this ConfigBuilder",
"Retrieve list of task extended attributes.\n\n@return list of extended attributes",
"Checks attributes for rejection\n\n@param rejectedAttributes gathers information about failed attributes\n@param attributeValue the attribute value",
"Generates timephased costs from the assignment's cost value. Used for Cost type Resources.\n\n@return timephased cost",
"This method returns the value of the product under the specified model and other information in a key-value map.\n\n@param evaluationTime The time on which this products value should be observed.\n@param model A model used to evaluate the product.\n@return The values of the product.\n@throws net.finmath.exception.CalculationException Thrown if the valuation fails, specific cause may be available via the <code>cause()</code> method.",
"Open the store with the version directory specified. If null is specified\nwe open the directory with the maximum version\n\n@param versionDir Version Directory to open. If null, we open the max\nversioned / latest directory"
] |
Subsets and Splits