query
stringlengths 74
6.1k
| positive
sequencelengths 1
1
| negative
sequencelengths 9
9
|
---|---|---|
public static base_response add(nitro_service client, tmtrafficaction resource) throws Exception {
tmtrafficaction addresource = new tmtrafficaction();
addresource.name = resource.name;
addresource.apptimeout = resource.apptimeout;
addresource.sso = resource.sso;
addresource.formssoaction = resource.formssoaction;
addresource.persistentcookie = resource.persistentcookie;
addresource.initiatelogout = resource.initiatelogout;
addresource.kcdaccount = resource.kcdaccount;
addresource.samlssoprofile = resource.samlssoprofile;
return addresource.add_resource(client);
} | [
"Use this API to add tmtrafficaction."
] | [
"Reset the combination generator.",
"Gets the element view.\n\n@return the element view",
"Sets the scale vector of the keyframe.",
"EAP 7.1",
"Whether the specified JavaBeans property exists on the given type or not.\n\n@param clazz the type of interest\n@param property the JavaBeans property name\n@param elementType the element type to check, must be either {@link ElementType#FIELD} or\n{@link ElementType#METHOD}.\n@return {@code true} if the specified property exists, {@code false} otherwise",
"Appends the query part for the facet to the query string.\n@param query The current query string.\n@param name The name of the facet parameter, e.g. \"limit\", \"order\", ....\n@param value The value to set for the parameter specified by name.",
"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",
"Transforms a length according to the current transformation matrix.",
"Create a smaller array from an existing one.\n\n@param strings an array containing element of type {@link String}\n@param begin the starting position of the sub-array\n@param length the number of element to consider\n@return a new array continaining only the selected elements"
] |
private InputStream prepareInputStream(InputStream stream) throws IOException
{
InputStream result;
BufferedInputStream bis = new BufferedInputStream(stream);
readHeaderProperties(bis);
if (isCompressed())
{
result = new InflaterInputStream(bis);
}
else
{
result = bis;
}
return result;
} | [
"If the file is compressed, handle this so that the stream is ready to read.\n\n@param stream input stream\n@return uncompressed input stream"
] | [
"waits for all async mutations that were added before this was called to be flushed. Does not\nwait for async mutations added after call.",
"Sets the submatrix of W up give Y is already configured and if it is being cached or not.",
"Return a logger associated with a particular class name.",
"Obtains a International Fixed local date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the International Fixed local date-time, not null\n@throws DateTimeException if unable to create the date-time",
"Return the count of all objects found\nfor given class, using the PB-api within\nODMG - this may change in further versions.",
"Add a '>=' clause so the column must be greater-than or equals-to the value.",
"Returns the parsed story from the given text\n\n@param configuration the Configuration used to run story\n@param storyAsText the story text\n@param storyId the story Id, which will be returned as story path\n@return The parsed Story",
"Send JSON representation of given data object to all connections of a user\n@param data the data object\n@param username the username",
"Returns the compact records for all users that are members of the team.\n\n@param team Globally unique identifier for the team.\n@return Request object"
] |
public static void writeUTF(@NotNull final OutputStream stream, @NotNull final String str) throws IOException {
try (DataOutputStream dataStream = new DataOutputStream(stream)) {
int len = str.length();
if (len < SINGLE_UTF_CHUNK_SIZE) {
dataStream.writeUTF(str);
} else {
int startIndex = 0;
int endIndex;
do {
endIndex = startIndex + SINGLE_UTF_CHUNK_SIZE;
if (endIndex > len) {
endIndex = len;
}
dataStream.writeUTF(str.substring(startIndex, endIndex));
startIndex += SINGLE_UTF_CHUNK_SIZE;
} while (endIndex < len);
}
}
} | [
"Writes long strings to output stream as several chunks.\n\n@param stream stream to write to.\n@param str string to be written.\n@throws IOException if something went wrong"
] | [
"Sets the category display options that affect how the category selection dialog is shown.\n\n@param displayCategoriesByRepository if true, the categories are shown separated by repository.\n@param displayCategorySelectionCollapsed if true, the selection dialog opens showing only the top-level categories\n(or the various repositories) in collapsed state.",
"Compute the CRC32 of the segment of the byte array given by the\nspecificed size and offset\n\n@param bytes The bytes to checksum\n@param offset the offset at which to begin checksumming\n@param size the number of bytes to checksum\n@return The CRC32",
"Query zipcode from Yahoo to find associated WOEID",
"Join the Collection of Strings using the specified delimiter.\n\n@param s\nThe String collection\n@param delimiter\nThe delimiter String\n@return The joined String",
"Helper method for variance calculations.\n@return The sum of the squares of the differences between\neach value and the arithmetic mean.\n@throws EmptyDataSetException If the data set is empty.",
"Add a new check box.\n@param date the date for the check box\n@param checkState the initial check state.",
"Use this API to update systemcollectionparam.",
"Determines if a mouse event is inside a box.",
"Convert a field value to something suitable to be stored in the database."
] |
public void addNamespace(final MongoNamespace namespace) {
this.instanceLock.writeLock().lock();
try {
if (this.nsStreamers.containsKey(namespace)) {
return;
}
final NamespaceChangeStreamListener streamer =
new NamespaceChangeStreamListener(
namespace,
instanceConfig.getNamespaceConfig(namespace),
service,
networkMonitor,
authMonitor,
getLockForNamespace(namespace));
this.nsStreamers.put(namespace, streamer);
} finally {
this.instanceLock.writeLock().unlock();
}
} | [
"Requests that the given namespace be started listening to for change events.\n\n@param namespace the namespace to listen for change events on."
] | [
"Shutdown each AHC client in the map.",
"Gets the default configuration for Freemarker within Windup.",
"Hide multiple channels. All other channels will be unaffected.\n@param channels The channels to hide",
"Returns all the deployment runtime names associated with an overlay accross all server groups.\n\n@param context the current OperationContext.\n@param overlay the name of the overlay.\n@return all the deployment runtime names associated with an overlay accross all server groups.",
"Updates an existing enum option. Enum custom fields require at least one enabled enum option.\n\nReturns the full record of the updated enum option.\n\n@param enumOption Globally unique identifier for the enum option.\n@return Request object",
"Checks if is single position prefix.\n\n@param fieldInfo\nthe field info\n@param prefix\nthe prefix\n@return true, if is single position prefix\n@throws IOException\nSignals that an I/O exception has occurred.",
"Assign FK values and store entries in indirection table\nfor all objects referenced by given object.\n\n@param obj real object with 1:n reference\n@param cod {@link CollectionDescriptor} of referenced 1:n objects\n@param insert flag signal insert operation, false signals update operation",
"Obtains a British Cutover zoned date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the British Cutover zoned date-time, not null\n@throws DateTimeException if unable to create the date-time",
"Converts a number of bytes to a human-readable string\n@param bytes the bytes\n@return the human-readable string"
] |
@Deprecated
public static RemoteProxyController create(final ManagementChannelHandler channelAssociation, final PathAddress pathAddress, final ProxyOperationAddressTranslator addressTranslator) {
final TransactionalProtocolClient client = TransactionalProtocolHandlers.createClient(channelAssociation);
// the remote proxy
return create(client, pathAddress, addressTranslator, ModelVersion.CURRENT);
} | [
"Creates a new remote proxy controller using an existing channel.\n\n@param channelAssociation the channel association\n@param pathAddress the address within the model of the created proxy controller\n@param addressTranslator the translator to use translating the address for the remote proxy\n@return the proxy controller\n\n@deprecated only present for test case use"
] | [
"Generate the body of a toString method that uses plain concatenation.\n\n<p>Conventionally, we join properties with comma separators. If all of the properties are\nalways present, this can be done with a long block of unconditional code. We could use a\nStringBuilder for this, but in fact the Java compiler will do this for us under the hood\nif we use simple string concatenation, so we use the more readable approach.",
"Send a database announcement to all registered listeners.\n\n@param slot the media slot whose database availability has changed\n@param database the database whose relevance has changed\n@param available if {@code} true, the database is newly available, otherwise it is no longer relevant",
"This method writes predecessor data to a Planner file.\nWe have to deal with a slight anomaly in this method that is introduced\nby the MPX file format. It would be possible for someone to create an\nMPX file with both the predecessor list and the unique ID predecessor\nlist populated... which means that we must process both and avoid adding\nduplicate predecessors. Also interesting to note is that MSP98 populates\nthe predecessor list, not the unique ID predecessor list, as you might\nexpect.\n\n@param mpxjTask MPXJ task instance\n@param plannerTask planner task instance",
"Removes a corporate groupId from an Organisation\n\n@param organizationId String\n@param corporateGroupId String",
"Check that each emitted notification is properly described by its source.",
"Runs a query that returns a single int.",
"Sets the value of the setting with the specified key.\n\n@param key name of the setting\n@param value the setting value\n@return this {@code EnvironmentConfig} instance",
"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",
"Sets the monitoring service.\n\n@param monitoringService the new monitoring service"
] |
protected long getUniqueLong(FieldDescriptor field) throws SequenceManagerException
{
long result;
// lookup sequence name
String sequenceName = calculateSequenceName(field);
try
{
result = buildNextSequence(field.getClassDescriptor(), sequenceName);
}
catch (Throwable e)
{
// maybe the sequence was not created
try
{
log.info("Create DB sequence key '"+sequenceName+"'");
createSequence(field.getClassDescriptor(), sequenceName);
}
catch (Exception e1)
{
throw new SequenceManagerException(
SystemUtils.LINE_SEPARATOR +
"Could not grab next id, failed with " + SystemUtils.LINE_SEPARATOR +
e.getMessage() + SystemUtils.LINE_SEPARATOR +
"Creation of new sequence failed with " +
SystemUtils.LINE_SEPARATOR + e1.getMessage() + SystemUtils.LINE_SEPARATOR
, e1);
}
try
{
result = buildNextSequence(field.getClassDescriptor(), sequenceName);
}
catch (Throwable e1)
{
throw new SequenceManagerException("Could not grab next id, sequence seems to exist", e);
}
}
return result;
} | [
"returns a unique long value for class clazz and field fieldName.\nthe returned number is unique accross all tables in the extent of clazz."
] | [
"Parses the field facet configurations.\n@param fieldFacetObject The JSON sub-node with the field facet configurations.\n@return The field facet configurations.",
"This method writes data for a single task to a Planner file.\n\n@param mpxjTask MPXJ Task instance\n@param taskList list of child tasks for current parent",
"Helper to read a mandatory String value.\n@param path The XML path of the element to read.\n@return The String value stored in the XML.\n@throws Exception thrown if the value could not be read.",
"Concatenate the arrays.\n\n@param array First array.\n@param array2 Second array.\n@return Concatenate between first and second array.",
"Non-supported in JadeAgentIntrospector",
"Process schedule options from SCHEDOPTIONS. This table only seems to exist\nin XER files, not P6 databases.",
"Instruct a query to use a specific index.\n@param designDocument Design document to use.\n@param indexName Index name to use.\n@return {@code QueryBuilder} object for method chaining.",
"See if a simple sequence can be used to extract the array. A simple extent is a continuous block from\na min to max index\n\n@return true if it is a simple range or false if not",
"called by timer thread"
] |
public static String getPropertyName(String name) {
if(name != null && (name.startsWith("get") || name.startsWith("set"))) {
StringBuilder b = new StringBuilder(name);
b.delete(0, 3);
b.setCharAt(0, Character.toLowerCase(b.charAt(0)));
return b.toString();
} else {
return name;
}
} | [
"Get the property name of a method name. For example the property name of\nsetSomeValue would be someValue. Names not beginning with set or get are\nnot changed.\n\n@param name The name to process\n@return The property name"
] | [
"Use this API to fetch sslcipher resources of given names .",
"Issue the database statements to drop the table associated with a table configuration.\n\n<p>\n<b>WARNING:</b> This is [obviously] very destructive and is unrecoverable.\n</p>\n\n@param connectionSource\nAssociated connection source.\n@param tableConfig\nHand or spring wired table configuration. If null then the class must have {@link DatabaseField}\nannotations.\n@param ignoreErrors\nIf set to true then try each statement regardless of {@link SQLException} thrown previously.\n@return The number of statements executed to do so.",
"Curries a function that takes one argument.\n\n@param function\nthe original function. May not be <code>null</code>.\n@param argument\nthe fixed argument.\n@return a function that takes no arguments. Never <code>null</code>.",
"Helper method that searches an object array for the occurence of a\nspecific object based on reference equality\n@param searchFor the object to search for\n@param searchIn the array to search in\n@return true if the object is found, otherwise false",
"Call the Coverage Task.",
"Delete a record.\n\n@param referenceId the reference ID.",
"Use this API to export application.",
"Poll for the next N waiting jobs in line.\n\n@param size maximum amount of jobs to poll for\n@return up to \"size\" jobs",
"Notification that the server process finished."
] |
public static base_response delete(nitro_service client, Long clid) throws Exception {
clusterinstance deleteresource = new clusterinstance();
deleteresource.clid = clid;
return deleteresource.delete_resource(client);
} | [
"Use this API to delete clusterinstance of given name."
] | [
"Convert a layer type to a geometry class.\n\n@param layerType\nlayer type\n@return JTS class",
"Creates an encryptor for queryable text strings that uses standard password-based encryption. Uses a shared, or\nconstant 16 byte initialization vector so encrypting the same data results in the same encryption result. This is\ndone to allow encrypted data to be queried against. Encrypted text is hex-encoded.\n\n@param password the password used to generate the encryptor's secret key; should not be shared\n@param salt a hex-encoded, random, site-global salt value to use to generate the secret key",
"Maps a story if it is allowed by the meta filter\n\n@param story\nthe Story\n@param metaFilter\nthe meta filter",
"Use this API to fetch all the dnsaaaarec resources that are configured on netscaler.\nThis uses dnsaaaarec_args which is a way to provide additional arguments while fetching the resources.",
"Closes the server socket.",
"Get a property as a string or defaultValue.\n\n@param key the property name\n@param defaultValue the default value",
"Obtains a string from a PDF value\n@param value the PDF value of the String, Integer or Float type\n@return the corresponging string value",
"Look up the database server port reported by a given player. You should not use this port directly; instead\nask this class for a session to use while you communicate with the database.\n\n@param player the player number of interest\n\n@return the port number on which its database server is running, or -1 if unknown\n\n@throws IllegalStateException if not running",
"Write the domain controller data to a byte buffer.\n\n@param data the domain controller data\n@return the byte buffer\n@throws Exception"
] |
public static String format(ImageFormat format) {
if (format == null) {
throw new IllegalArgumentException("You must specify an image format.");
}
return FILTER_FORMAT + "(" + format.value + ")";
} | [
"Specify the output format of the image.\n\n@see ImageFormat"
] | [
"Adds an additional alias to the constructed document.\n\n@param text\nthe text of the alias\n@param languageCode\nthe language code of the alias\n@return builder object to continue construction",
"Determine whether the calling thread is the GL thread.\n\n@return {@code True} if called from the GL thread, {@code false} if\ncalled from another thread.",
"Adds a boolean refinement for the next queries.\n\n@param attribute the attribute to refine on.\n@param value the value to refine with.\n@return this {@link Searcher} for chaining.",
"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",
"That is, of size 6, which become 8, since HashMaps are powers of 2. Still, it's half the size",
"Fall-back for types that are not handled by a subclasse's dispatch method.",
"Apply the remote read domain model result.\n\n@param result the domain model result\n@return whether it was applied successfully or not",
"Wraps a StatisticsMatrix around 'm'. Does NOT create a copy of 'm' but saves a reference\nto it.",
"Creates needed textfields for general label in footer groups.\n@param djgroup\n@param jgroup"
] |
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"
] | [
"Launch Navigation Service residing in the navigation module",
"Use this API to apply nspbr6 resources.",
"Swap the current version folder for a new one\n\n@param newStoreDirectory The path to the new version directory",
"Read a long int from a byte array.\n\n@param data byte array\n@param offset start offset\n@return long value",
"Returns a handle to the pool. Useful to obtain a handle to the\nstatistics for example.\n@return pool",
"Sets the max min.\n\n@param n the new max min",
"Converts a parameter map to the parameter string.\n@param parameters the parameter map.\n@return the parameter string.",
"Visit an open package of the current module.\n\n@param packaze the qualified name of the opened package.\n@param access the access flag of the opened package,\nvalid values are among {@code ACC_SYNTHETIC} and\n{@code ACC_MANDATED}.\n@param modules the qualified names of the modules that can use deep\nreflection to the classes of the open package or\n<tt>null</tt>.",
"Use this API to fetch a rewriteglobal_binding resource ."
] |
public static base_responses update(nitro_service client, systemuser resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
systemuser updateresources[] = new systemuser[resources.length];
for (int i=0;i<resources.length;i++){
updateresources[i] = new systemuser();
updateresources[i].username = resources[i].username;
updateresources[i].password = resources[i].password;
updateresources[i].externalauth = resources[i].externalauth;
updateresources[i].promptstring = resources[i].promptstring;
updateresources[i].timeout = resources[i].timeout;
}
result = update_bulk_request(client, updateresources);
}
return result;
} | [
"Use this API to update systemuser resources."
] | [
"alert, prompt, and confirm behave as if the OK button is always clicked.",
"Answer the SQL-Clause for a BetweenCriteria\n\n@param alias\n@param pathInfo\n@param c BetweenCriteria\n@param buf",
"Removes the key and its associated value from this map.\n\n@param key the key to remove\n@return the value associated with that key, or null if\nthe key was not in the map",
"Generates a JSON patch for transforming the source node into the target node.\n\n@param source the node to be patched\n@param target the expected result after applying the patch\n@param replaceMode the replace mode to be used\n@return the patch as a {@link JsonPatch}",
"Resolve the disposal method for the given producer method. Any resolved\nbeans will be marked as such for the purpose of validating that all\ndisposal methods are used. For internal use.\n\n@param types the types\n@param qualifiers The binding types to match\n@param declaringBean declaring bean\n@return The set of matching disposal methods",
"Write a string field to the JSON file.\n\n@param fieldName field name\n@param value field value",
"Helper method fro providers to fire hotkey event in a separate thread\n\n@param hotKey hotkey to fire",
"Process field aliases.",
"Remove a DropPasteWorker from the helper.\n@param worker the worker that should be removed"
] |
public static base_response add(nitro_service client, cachepolicylabel resource) throws Exception {
cachepolicylabel addresource = new cachepolicylabel();
addresource.labelname = resource.labelname;
addresource.evaluates = resource.evaluates;
return addresource.add_resource(client);
} | [
"Use this API to add cachepolicylabel."
] | [
"Replaces the first substring of this CharSequence that matches the given\nregular expression with the given replacement.\n\n@param self a CharSequence\n@param regex the capturing regex\n@param replacement the CharSequence to be substituted for each match\n@return a CharSequence with replaced content\n@throws java.util.regex.PatternSyntaxException if the regular expression's syntax is invalid\n@see String#replaceFirst(String, String)\n@since 1.8.2",
"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",
"Filter out interceptors and decorators which are also enabled globally.\n\n@param enabledClasses\n@param globallyEnabledClasses\n@param logMessageCallback\n@param deployment\n@return the filtered list",
"Requests that the given namespace stopped being listened to for change events.\n\n@param namespace the namespace to stop listening for change events on.",
"Call when you are done with the client\n\n@throws Exception",
"Converts to credentials for use in Grgit.\n@return {@code null} if both username and password are {@code null},\notherwise returns credentials in Grgit format.",
"checks if the triangle is not re-entrant",
"Get a property as a boolean or throw exception.\n\n@param key the property name",
"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"
] |
@ArgumentsChecked
@Throws(IllegalNullArgumentException.class)
public static byte checkByte(@Nonnull final Number number) {
Check.notNull(number, "number");
if (!isInByteRange(number)) {
throw new IllegalNumberRangeException(number.toString(), BYTE_MIN, BYTE_MAX);
}
return number.byteValue();
} | [
"Checks if a given number is in the range of a byte.\n\n@param number\na number which should be in the range of a byte (positive or negative)\n\n@see java.lang.Byte#MIN_VALUE\n@see java.lang.Byte#MAX_VALUE\n\n@return number as a byte (rounding might occur)"
] | [
"get the TypeArgSignature corresponding to given type\n\n@param type\n@return",
"Serialize a parameterized object to a JSON String.\n\n@param object The object to serialize.\n@param parameterizedType The ParameterizedType describing the object. Ex: LoganSquare.serialize(object, new ParameterizedType<MyModel<OtherModel>>() { });",
"Evalutes AND and OR operators.\n\n@param container data context\n@param promptValues responses to prompts\n@return operator result",
"Read a text stream into a single string.\n\n@param inputStream\nStream containing text. Will be closed on exit.\n@return The contents, or null on error.",
"Log a trace message.",
"Create a Collection Proxy for a given query.\n\n@param brokerKey The key of the persistence broker\n@param query The query\n@param collectionClass The class to build the proxy for\n@return The collection proxy",
"Append this message to the message set\n@param messages message to append\n@return the written size and first offset\n@throws IOException file write exception",
"Sets the left padding for all cells in the row.\n@param paddingLeft new padding, ignored if smaller than 0\n@return this to allow chaining",
"Returns the start of this resource assignment.\n\n@return start date"
] |
synchronized boolean deleteMessageForId(String messageId, String userId){
if(messageId == null || userId == null) return false;
final String tName = Table.INBOX_MESSAGES.getName();
try {
final SQLiteDatabase db = dbHelper.getWritableDatabase();
db.delete(tName, _ID + " = ? AND " + USER_ID + " = ?", new String[]{messageId,userId});
return true;
} catch (final SQLiteException e) {
getConfigLogger().verbose("Error removing stale records from " + tName, e);
return false;
} finally {
dbHelper.close();
}
} | [
"Deletes the inbox message for given messageId\n@param messageId String messageId\n@return boolean value based on success of operation"
] | [
"Reads a single day for a calendar.\n\n@param mpxjCalendar ProjectCalendar instance\n@param day ConceptDraw PROJECT week day",
"Retrieve the most recent storepoint.\n\n@param phoenixProject project data\n@return Storepoint instance",
"Perform a module dependency graph of the target and return the graph as a JSON\n\n@param moduleName\n@param moduleVersion\n@param uriInfo\n@return Response",
"Updates event definitions for all throwing events.\n@param def Definitions",
"Reports that a node is faulted.\n\n@param faulted the node faulted\n@param throwable the reason for fault",
"Set the InputStream of request body data, of known length, to be sent to the server.\n\n@param input InputStream of request body data to be sent to the server\n@param inputLength Length of request body data to be sent to the server, in bytes\n@return an {@link HttpConnection} for method chaining\n@deprecated Use {@link #setRequestBody(InputStreamGenerator, long)}",
"Use this API to fetch all the gslbrunningconfig resources that are configured on netscaler.",
"Initialize new instance\n@param instance\n@param logger\n@param auditor",
"Returns an attribute's list value from a non-main section of this JAR's manifest.\nThe attributes string value will be split on whitespace into the returned list.\nThe returned list may be safely modified.\n\n@param section the manifest's section\n@param name the attribute's name"
] |
public static List<String> getDefaultConversionProviderChain(){
List<String> defaultChain = getMonetaryConversionsSpi()
.getDefaultProviderChain();
Objects.requireNonNull(defaultChain, "No default provider chain provided by SPI: " +
getMonetaryConversionsSpi().getClass().getName());
return defaultChain;
} | [
"Get the default provider used.\n\n@return the default provider, never {@code null}."
] | [
"Called when app's singleton registry has been initialized",
"Attach a script file to a scriptable target.\n\n@param target The scriptable target.\n@param scriptFile The script file object.",
"Retrieve the fixed data offset for a specific field.\n\n@param type field type\n@return offset",
"Return the available format ids.",
"Internal initialization.\n@throws ParserConfigurationException",
"Specify the class represented by this `ClassNode` extends\na class with the name specified\n@param name the name of the parent class\n@return this `ClassNode` instance",
"Dumps the partition IDs per node in terms of zone n-ary type.\n\n@param cluster\n@param storeRoutingPlan\n@return pretty printed string of detailed zone n-ary type.",
"Add a calendar day node.\n\n@param parentNode parent node\n@param calendar ProjectCalendar instance\n@param day calendar day",
"Term value.\n\n@param term\nthe term\n@return the string"
] |
public static void acceptsUrlMultiple(OptionParser parser) {
parser.acceptsAll(Arrays.asList(OPT_U, OPT_URL), "coordinator bootstrap urls")
.withRequiredArg()
.describedAs("url-list")
.withValuesSeparatedBy(',')
.ofType(String.class);
} | [
"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"
] | [
"Use this API to fetch sslcertkey resources of given names .",
"Sets the indirection handler class.\n\n@param indirectionHandlerClass The class for indirection handlers",
"Propagate onNoPick events to listeners\n@param picker GVRPicker which generated the event",
"Adds an array of groupby fieldNames for ReportQueries.\n@param fieldNames The groupby to set\n@deprecated use QueryByCriteria#addGroupBy",
"Matrix inverse for symmetric positive definite matrices. For small matrices an unrolled\ncholesky is used. Otherwise a standard decomposition.\n\n@see UnrolledCholesky_DDRM\n@see LinearSolverFactory_DDRM#chol(int)\n\n@param mat (Input) SPD matrix\n@param result (Output) Inverted matrix.\n@return true if it could invert the matrix false if it could not.",
"With this impl, it only returns the same credentials once. Otherwise it's possible that a loop will occur.\nWhen server returns status code 401, the HTTP client provides the same credentials forever.\nSince we create a new HTTP client for every request, we can handle it this way.",
"Checks the query-customizer setting of the given collection descriptor.\n\n@param collDef The collection descriptor\n@param checkLevel The current check level (this constraint is only checked in strict)\n@exception ConstraintException If the constraint has been violated",
"Maps a story if it is allowed by the meta filter\n\n@param story\nthe Story\n@param metaFilter\nthe meta filter",
"get the key name to use in log from the logging keys map"
] |
public int findAnimation(GVRAnimation findme)
{
int index = 0;
for (GVRAnimation anim : mAnimations)
{
if (anim == findme)
{
return index;
}
++index;
}
return -1;
} | [
"Find the index of this animation if it is in this animator.\n\n@param findme {@link GVRAnimation} to find.\n@returns 0 based index of animation or -1 if not found\n@see GVRAnimator#addAnimation(GVRAnimation)"
] | [
"Adds a type to collection with inheriting base type properties.\n\n@param type the type definition to add\n\n@return true if the type definition was added",
"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",
"Examins the structure of A for QR decomposition\n@param A matrix which is to be decomposed\n@return true if the solution is valid or false if the decomposition can't be performed (i.e. requires column pivots)",
"Declares a shovel.\n\n@param vhost virtual host where to declare the shovel\n@param info Shovel info.",
"Adds the complex number with a scalar value.\n\n@param z1 Complex Number.\n@param scalar Scalar value.\n@return Returns new ComplexNumber instance containing the add of specified complex number with scalar value.",
"Removes and returns a random element from the set.\n@return the removed element, or <code>null</code> when the key does not exist.",
"Use this API to fetch a vpnglobal_vpnnexthopserver_binding resources.",
"Creates the event for endpoint with specific type.\n\n@param endpoint the endpoint\n@param type the type\n@return the event",
"Filter out interceptors and decorators which are also enabled globally.\n\n@param enabledClasses\n@param globallyEnabledClasses\n@param logMessageCallback\n@param deployment\n@return the filtered list"
] |
private static BufferedImage scale(BufferedImage imageToScale, int dWidth, int dHeight, double fWidth, double fHeight) {
BufferedImage dbi = null;
// Needed to create a new BufferedImage object
int imageType = imageToScale.getType();
if (imageToScale != null) {
dbi = new BufferedImage(dWidth, dHeight, imageType);
Graphics2D g = dbi.createGraphics();
AffineTransform at = AffineTransform.getScaleInstance(fWidth, fHeight);
g.drawRenderedImage(imageToScale, at);
}
return dbi;
} | [
"Image scale method\n@param imageToScale The image to be scaled\n@param dWidth Desired width, the new image object is created to this size\n@param dHeight Desired height, the new image object is created to this size\n@param fWidth What to multiply the width by. value < 1 scales down, and value > one scales up\n@param fHeight What to multiply the height by. value < 1 scales down, and value > one scales up\n@return A scaled image"
] | [
"Retrieves and validates the content type from the REST requests\n\n@return true if has content type.",
"Given a field node, checks if we are calling a private field from an inner class.",
"Calculate the value of a digital caplet assuming the Black'76 model.\n\n@param forward The forward (spot).\n@param volatility The Black'76 volatility.\n@param periodLength The period length of the underlying forward rate.\n@param discountFactor The discount factor corresponding to the payment date (option maturity + period length).\n@param optionMaturity The option maturity\n@param optionStrike The option strike.\n@return Returns the price of a digital caplet under the Black'76 model",
"Locate the no arg constructor for the class.",
"Determines if the queue identified by the given key is a regular queue.\n\n@param jedis\nconnection to Redis\n@param key\nthe key that identifies a queue\n@return true if the key identifies a regular queue, false otherwise",
"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",
"Print all relations for a given's class's tag\n@param tagname the tag containing the given relation\n@param from the source class\n@param edgetype the dot edge specification",
"Animate de-selection of visible views and clear\nselected set.",
"In the case where the prefix sits at a segment boundary, and the prefix sequence is null - null - 0, this changes to prefix sequence of null - x - 0, where x is segment bit length.\n\nNote: We allow both [null, null, 0] and [null, x, 0] where x is segment length. However, to avoid inconsistencies when doing segment replacements,\nand when getting subsections, in the calling constructor we normalize [null, null, 0] to become [null, x, 0].\nWe need to support [null, x, 0] so that we can create subsections and full addresses ending with [null, x] where x is bit length.\nSo we defer to that when constructing addresses and sections.\nAlso note that in our append/appendNetowrk/insert/replace we have special handling for cases like inserting [null] into [null, 8, 0] at index 2.\nThe straight replace would give [null, 8, null, 0] which is wrong.\nIn that code we end up with [null, null, 8, 0] by doing a special trick:\nWe remove the end of [null, 8, 0] and do an append [null, 0] and we'd remove prefix from [null, 8] to get [null, null] and then we'd do another append to get [null, null, null, 0]\nThe final step is this normalization here that gives [null, null, 8, 0]\n\nHowever, when users construct AddressDivisionGrouping or IPAddressDivisionGrouping, either one is allowed: [null, null, 0] and [null, x, 0].\nSince those objects cannot be further subdivided with getSection/getNetworkSection/getHostSection or grown with appended/inserted/replaced,\nthere are no inconsistencies introduced, we are simply more user-friendly.\nAlso note that normalization of AddressDivisionGrouping or IPAddressDivisionGrouping is really not possible without the address creator objects we use for addresses and sections,\nthat allow us to recreate new segments of the correct type.\n\n@param sectionPrefixBits\n@param segments\n@param segmentBitCount\n@param segmentByteCount\n@param segProducer"
] |
private Table getTable(String name)
{
Table table = m_tables.get(name);
if (table == null)
{
table = EMPTY_TABLE;
}
return table;
} | [
"Retrieve a table by name.\n\n@param name table name\n@return Table instance"
] | [
"Retrieves or if necessary, creates a user alias to be used\nby a child criteria\n@param attribute The alias to set",
"Executes the sequence of operations",
"Create a new custom field setting on the project.\n\n@param project The project to associate the custom field with\n@return Request object",
"Creates a style definition used for pages.\n@return The page style definition.",
"return either the first space or the first nbsp",
"Detect numbers using comma as a decimal separator and replace with period.\n\n@param value original numeric value\n@return corrected numeric value",
"A disposer method is bound to a producer if the producer is assignable to the disposed parameter.\n\n@param enhancedDisposedParameter\n@return the set of required qualifiers for the given disposed parameter",
"Convert a GanttProject task relationship type into an MPXJ RelationType instance.\n\n@param gpType GanttProject task relation type\n@return RelationType instance",
"Adds listeners and reads from a stream.\n\n@param reader reader for file type\n@param stream schedule data\n@return ProjectFile instance"
] |
@Override
public InstalledIdentity getInstalledIdentity(String productName, String productVersion) throws PatchingException {
final String defaultIdentityName = defaultIdentity.getIdentity().getName();
if(productName == null) {
productName = defaultIdentityName;
}
final File productConf = new File(installedImage.getInstallationMetadata(), productName + Constants.DOT_CONF);
final String recordedProductVersion;
if(!productConf.exists()) {
recordedProductVersion = null;
} else {
final Properties props = loadProductConf(productConf);
recordedProductVersion = props.getProperty(Constants.CURRENT_VERSION);
}
if(defaultIdentityName.equals(productName)) {
if(recordedProductVersion != null && !recordedProductVersion.equals(defaultIdentity.getIdentity().getVersion())) {
// this means the patching history indicates that the current version is different from the one specified in the server's version module,
// which could happen in case:
// - the last applied CP didn't include the new version module or
// - the version module version included in the last CP didn't match the version specified in the CP's metadata, or
// - the version module was updated from a one-off, or
// - the patching history was edited somehow
// In any case, here I decided to rely on the patching history.
defaultIdentity = loadIdentity(productName, recordedProductVersion);
}
if(productVersion != null && !defaultIdentity.getIdentity().getVersion().equals(productVersion)) {
throw new PatchingException(PatchLogger.ROOT_LOGGER.productVersionDidNotMatchInstalled(
productName, productVersion, defaultIdentity.getIdentity().getVersion()));
}
return defaultIdentity;
}
if(recordedProductVersion != null && !Constants.UNKNOWN.equals(recordedProductVersion)) {
if(productVersion != null) {
if (!productVersion.equals(recordedProductVersion)) {
throw new PatchingException(PatchLogger.ROOT_LOGGER.productVersionDidNotMatchInstalled(productName, productVersion, recordedProductVersion));
}
} else {
productVersion = recordedProductVersion;
}
}
return loadIdentity(productName, productVersion);
} | [
"This method returns the installed identity with the requested name and version.\nIf the product name is null, the default identity will be returned.\n\nIf the product name was recognized and the requested version was not null,\nthe version comparison will take place. If the version of the currently installed product\ndoesn't match the requested one, the exception will be thrown.\nIf the requested version is null, the currently installed identity with the requested name\nwill be returned.\n\nIf the product name was not recognized among the registered ones, a new installed identity\nwith the requested name will be created and returned. (This is because the patching system\nis not aware of how many and what the patching streams there are expected).\n\n@param productName\n@param productVersion\n@return\n@throws PatchingException"
] | [
"Build a String representation of given arguments.",
"called per frame of animation to update the camera position",
"Append the text at the end of the Path.\n\n@param self a Path\n@param text the text to append at the end of the Path\n@throws java.io.IOException if an IOException occurs.\n@since 2.3.0",
"Use this API to Shutdown shutdown.",
"performs an INSERT operation against RDBMS.\n@param obj The Object to be inserted as a row of the underlying table.\n@param cld ClassDescriptor providing mapping information.",
"Figure out, based on how much time has elapsed since we received an update, and the playback position,\nspeed, and direction at the time of that update, where the player will be now.\n\n@param update the most recent update received from a player\n@param currentTimestamp the nanosecond timestamp representing when we want to interpolate the track's position\n\n@return the playback position we believe that player has reached now",
"used for encoding url path segment",
"creates a bounds object with both point parsed from the json and set it\nto the current shape\n@param modelJSON\n@param current\n@throws org.json.JSONException",
"Login the user and redirect back to original URL. If no\noriginal URL found then redirect to `defaultLandingUrl`.\n\n@param userIdentifier\nthe user identifier, could be either userId or username\n@param defaultLandingUrl\nthe URL to be redirected if original URL not found"
] |
@Override
public Response toResponse(ErrorDto e)
{
// String type = headers.getContentType() == null ? MediaType.APPLICATION_JSON : headers.getContentType();
return Response.status(e.httpStatus).entity(e).type(MediaType.APPLICATION_JSON).build();
} | [
"private HttpServletResponse headers;"
] | [
"Triggers a replication request.",
"Returns the full record for a single team.\n\n@param team Globally unique identifier for the team.\n@return Request object",
"return a HashMap with all properties, name as key, value as value\n@return the properties",
"Searches the set of imports to find a matching import by type name.\n\n@param typeName\nname of type (qualified or simple name allowed)\n@return found import or {@code null}",
"Mirrors the given bitmap",
"Initialize the fat client for the given store.\n\n1. Updates the coordinatorMetadata 2.Gets the new store configs from the\nconfig file 3.Creates a new @SocketStoreClientFactory 4. Subsequently\ncaches the @StoreClient obtained from the factory.\n\n\nThis is synchronized because if Coordinator Admin is already doing some\nchange we want the AsyncMetadataVersionManager to wait.\n\n@param storeName",
"trim \"act.\" from conf keys",
"Determines run length for each 'initial' partition ID. Note that a\ncontiguous run may \"wrap around\" the end of the ring.\n\n@param cluster\n@param zoneId\n@return map of initial partition Id to length of contiguous run of\npartition IDs within the same zone..",
"Returns a List of all of the values in the Map whose key matches an entry in the nameMapping array.\n\n@param map\nthe map\n@param nameMapping\nthe keys of the Map values to add to the List\n@return a List of all of the values in the Map whose key matches an entry in the nameMapping array\n@throws NullPointerException\nif map or nameMapping is null"
] |
static BsonDocument getDocumentVersionDoc(final BsonDocument document) {
if (document == null || !document.containsKey(DOCUMENT_VERSION_FIELD)) {
return null;
}
return document.getDocument(DOCUMENT_VERSION_FIELD, null);
} | [
"Returns the version document of the given document, if any; returns null otherwise.\n@param document the document to get the version from.\n@return the version of the given document, if any; returns null otherwise."
] | [
"Deletes the schema of an existing metadata template.\n\n@param api the API connection to be used\n@param scope the scope of the object\n@param template Unique identifier of the template",
"Returns the default output for functions without configured JSPs.\n\n@param request the current request\n@return the default HTML output",
"Returns all program element docs that have a visibility greater or\nequal than the specified level",
"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()",
"persist decorator and than continue to children without touching the model",
"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",
"Looks for sequences of integer lists and combine them into one big sequence",
"Reads an HTML snippet with the given name.\n\n@return the HTML data",
"Use this API to fetch the statistics of all cmppolicy_stats resources that are configured on netscaler."
] |
public SyntaxException getSyntaxError(int index) {
SyntaxException exception = null;
Message message = getError(index);
if (message != null && message instanceof SyntaxErrorMessage) {
exception = ((SyntaxErrorMessage) message).getCause();
}
return exception;
} | [
"Convenience routine to return the specified error's\nunderlying SyntaxException, or null if it isn't one."
] | [
"Indicates whether or not an event ID is a duplicate.\n\n<p>This method can be overridden by a subclass in order to provide custom de-duping logic.</p>\n\n@param eventID the event ID.\n@return true if the event is a duplicate; otherwise false.",
"Called recursively to renumber child task IDs.\n\n@param parentTask parent task instance\n@param currentID current task ID\n@return updated current task ID",
"Connect and register at the remote domain controller.\n\n@return connection the established connection\n@throws IOException",
"Record a prepare operation timeout.\n\n@param failedOperation the prepared operation",
"Tests an observer method to see if it is transactional.\n\n@param observer The observer method\n@return true if the observer method is annotated as transactional",
"Consumer is required to do any privilege checks before getting here\n\n@param request a {@link HttpServletRequest} which may contain forced groups parameters from URL, Header or Cookie.\n@return a map of test names to bucket values specified by the request. Returns an empty {@link Map} if nothing was specified",
"An extension point so we can control how the query gets executed.\nThis exists for testing purposes, not because we believe it will\nactually be used for real.",
"Use this API to fetch all the autoscaleprofile resources that are configured on netscaler.",
"Get an extent aware RsIterator based on the Query\n\n@param query\n@param cld\n@param factory the Factory for the RsIterator\n@return OJBIterator"
] |
private void handleIncomingRequestMessage(SerialMessage incomingMessage) {
logger.debug("Message type = REQUEST");
switch (incomingMessage.getMessageClass()) {
case ApplicationCommandHandler:
handleApplicationCommandRequest(incomingMessage);
break;
case SendData:
handleSendDataRequest(incomingMessage);
break;
case ApplicationUpdate:
handleApplicationUpdateRequest(incomingMessage);
break;
default:
logger.warn(String.format("TODO: Implement processing of Request Message = %s (0x%02X)",
incomingMessage.getMessageClass().getLabel(),
incomingMessage.getMessageClass().getKey()));
break;
}
} | [
"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."
] | [
"Calculates all dates of the series.\n@return all dates of the series in milliseconds.",
"Discard the changes.",
"Print an extended attribute value.\n\n@param writer parent MSPDIWriter instance\n@param value attribute value\n@param type type of the value being passed\n@return string representation",
"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",
"Use this API to fetch aaauser_vpntrafficpolicy_binding resources of given name .",
"Get prototype name.\n\n@return prototype name",
"Creates the HikariCP configuration based on the configuration of a pool defined in opencms.properties.\n\n@param config the configuration object with the properties\n@param key the pool name (without the opencms prefix)\n\n@return the HikariCP configuration for the pool",
"Computes the inverse permutation vector\n\n@param original Original permutation vector\n@param inverse It's inverse",
"Creates a collaboration whitelist for a Box User with a given ID.\n@param api the API connection to be used by the collaboration whitelist.\n@param userID the ID of the Box User to add to the collaboration whitelist.\n@return information about the collaboration whitelist created for user."
] |
public static void applyToOr(ColorHolder colorHolder, TextView textView, ColorStateList colorDefault) {
if (colorHolder != null && textView != null) {
colorHolder.applyToOr(textView, colorDefault);
} else if (textView != null) {
textView.setTextColor(colorDefault);
}
} | [
"a small static helper to set the text color to a textView null save\n\n@param colorHolder\n@param textView\n@param colorDefault"
] | [
"Write a list of custom field attributes.",
"Invoke an HTTP GET request on a remote host. You must close the InputStream after you are done with.\n\n@param path The request path\n@param parameters The parameters (collection of Parameter objects)\n@return The Response",
"Get the Upper triangular factor.\n\n@return U.",
"Use this API to update snmpmanager.",
"Make a WMS getLayer request and return the image read from the server.\n\n@param wmsLayerParam the wms request parameters\n@param commonURI the uri to use for the requests (excepting parameters of course.)\n@param imageSize the size of the image to request\n@param dpi the dpi of the image to request\n@param angle the angle of the image to request\n@param bounds the area and projection of the request on the world.",
"This method takes the textual version of a relation type\nand returns an appropriate class instance. Note that unrecognised\nvalues will cause this method to return null.\n\n@param locale target locale\n@param type text version of the relation type\n@return RelationType instance",
"Close the ClientRequestExecutor.",
"Parses command-line and removes metadata related to rebalancing.\n\n@param args Command-line input\n@param printHelp Tells whether to print help only or execute command\nactually\n@throws IOException",
"Configures a RequestBuilder to send an RPC request.\n\n@param <T> return type for the AsyncCallback\n@param responseReader instance used to read the return value of the\ninvocation\n@param requestData payload that encodes the addressing and arguments of the\nRPC call\n@param callback callback handler\n\n@return a RequestBuilder object that is ready to have its\n{@link RequestBuilder#send()} method invoked."
] |
private Bpmn2Resource unmarshall(JsonParser parser,
String preProcessingData) throws IOException {
try {
parser.nextToken(); // open the object
ResourceSet rSet = new ResourceSetImpl();
rSet.getResourceFactoryRegistry().getExtensionToFactoryMap().put("bpmn2",
new JBPMBpmn2ResourceFactoryImpl());
Bpmn2Resource bpmn2 = (Bpmn2Resource) rSet.createResource(URI.createURI("virtual.bpmn2"));
rSet.getResources().add(bpmn2);
_currentResource = bpmn2;
if (preProcessingData == null || preProcessingData.length() < 1) {
preProcessingData = "ReadOnlyService";
}
// do the unmarshalling now:
Definitions def = (Definitions) unmarshallItem(parser,
preProcessingData);
def.setExporter(exporterName);
def.setExporterVersion(exporterVersion);
revisitUserTasks(def);
revisitServiceTasks(def);
revisitMessages(def);
revisitCatchEvents(def);
revisitThrowEvents(def);
revisitLanes(def);
revisitSubProcessItemDefs(def);
revisitArtifacts(def);
revisitGroups(def);
revisitTaskAssociations(def);
revisitTaskIoSpecification(def);
revisitSendReceiveTasks(def);
reconnectFlows();
revisitGateways(def);
revisitCatchEventsConvertToBoundary(def);
revisitBoundaryEventsPositions(def);
createDiagram(def);
updateIDs(def);
revisitDataObjects(def);
revisitAssociationsIoSpec(def);
revisitWsdlImports(def);
revisitMultiInstanceTasks(def);
addSimulation(def);
revisitItemDefinitions(def);
revisitProcessDoc(def);
revisitDI(def);
revisitSignalRef(def);
orderDiagramElements(def);
// return def;
_currentResource.getContents().add(def);
return _currentResource;
} catch (Exception e) {
_logger.error(e.getMessage());
return _currentResource;
} finally {
parser.close();
_objMap.clear();
_idMap.clear();
_outgoingFlows.clear();
_sequenceFlowTargets.clear();
_bounds.clear();
_currentResource = null;
}
} | [
"Start unmarshalling using the parser.\n@param parser\n@param preProcessingData\n@return the root element of a bpmn2 document.\n@throws java.io.IOException"
] | [
"Sets the class loader to be used on serialization operations, for data\nstored in the specified fqn and child nodes. Note that if another class\nloader is set for a specific child node tree, the cache will use instead\nthat class loader.\n\n@param regionFqn\n@param classLoader",
"Extracts the data for a single file from the input stream and writes\nit to a target directory.\n\n@param stream input stream\n@param dir target directory",
"Close it and ignore any exceptions.",
"Returns the classpath for executable jar.",
"Read properties from the active profiles.\n\nGoes through all active profiles (in the order the\nprofiles are defined in settings.xml) and extracts\nthe desired properties (if present). The prefix is\nused when looking up properties in the profile but\nnot in the returned map.\n\n@param prefix The prefix to use or null if no prefix should be used\n@param properties The properties to read\n\n@return A map containing the values for the properties that were found",
"Returns the constructor of the indirection handler class.\n\n@return The constructor for indirection handlers",
"For recovery from the latest consistent snapshot, we should clean up the\nold files from the previous backup set, else we will fill the disk with\nuseless log files\n\n@param backupDir",
"Parse a map of objects from a JsonParser.\n\n@param jsonParser The JsonParser, preconfigured to be at the START_ARRAY token.",
"Examins the structure of A for QR decomposition\n@param A matrix which is to be decomposed\n@return true if the solution is valid or false if the decomposition can't be performed (i.e. requires column pivots)"
] |
public void assignField(ConnectionSource connectionSource, Object data, Object val, boolean parentObject,
ObjectCache objectCache) throws SQLException {
if (logger.isLevelEnabled(Level.TRACE)) {
logger.trace("assiging from data {}, val {}: {}", (data == null ? "null" : data.getClass()),
(val == null ? "null" : val.getClass()), val);
}
// if this is a foreign object then val is the foreign object's id val
if (foreignRefField != null && val != null) {
// get the current field value which is the foreign-id
Object foreignRef = extractJavaFieldValue(data);
/*
* See if we don't need to create a new foreign object. If we are refreshing and the id field has not
* changed then there is no need to create a new foreign object and maybe lose previously refreshed field
* information.
*/
if (foreignRef != null && foreignRef.equals(val)) {
return;
}
// awhitlock: raised as OrmLite issue: bug #122
Object cachedVal;
ObjectCache foreignCache = foreignDao.getObjectCache();
if (foreignCache == null) {
cachedVal = null;
} else {
cachedVal = foreignCache.get(getType(), val);
}
if (cachedVal != null) {
val = cachedVal;
} else if (!parentObject) {
// the value we are to assign to our field is now the foreign object itself
val = createForeignObject(connectionSource, val, objectCache);
}
}
if (fieldSetMethod == null) {
try {
field.set(data, val);
} catch (IllegalArgumentException e) {
if (val == null) {
throw SqlExceptionUtil.create("Could not assign object '" + val + "' to field " + this, e);
} else {
throw SqlExceptionUtil.create(
"Could not assign object '" + val + "' of type " + val.getClass() + " to field " + this, e);
}
} catch (IllegalAccessException e) {
throw SqlExceptionUtil.create(
"Could not assign object '" + val + "' of type " + val.getClass() + "' to field " + this, e);
}
} else {
try {
fieldSetMethod.invoke(data, val);
} catch (Exception e) {
throw SqlExceptionUtil
.create("Could not call " + fieldSetMethod + " on object with '" + val + "' for " + this, e);
}
}
} | [
"Assign to the data object the val corresponding to the fieldType."
] | [
"Reverses a sequence of elements.\n@param array Array containing the sequence\n@param first Beginning of the range\n@param last One past the end of the range\n@exception ArrayIndexOutOfBoundsException If the range\nis invalid.",
"Adds all edges for a given object envelope vertex. All edges are\nadded to the edgeList map.\n@param vertex the Vertex object to find edges for",
"Delivers the correct JSON Object for the stencilId\n\n@param stencilId\n@throws org.json.JSONException",
"Use this API to fetch tmtrafficpolicy_tmglobal_binding resources of given name .",
"Operations to do after all subthreads finished their work on index\n\n@param backend",
"Validates a String to be a valid name to be used in MongoDB for a collection name.\n\n@param collectionName",
"Factory method that builds the appropriate matcher for @match tags",
"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",
"Populates default settings.\n\n@param record MPX record\n@param properties project properties\n@throws MPXJException"
] |
public void credentialsMigration(T overrider, Class overriderClass) {
try {
deployerMigration(overrider, overriderClass);
resolverMigration(overrider, overriderClass);
} catch (NoSuchFieldException | IllegalAccessException | IOException e) {
converterErrors.add(getConversionErrorMessage(overrider, e));
}
} | [
"Migrate to Jenkins \"Credentials\" plugin from the old credential implementation"
] | [
"Locates the services in the context classloader of the current thread.\n\n@param serviceType the type of the services to locate\n@param <X> the type of the service\n@return the service type loader",
"The main method. See the class documentation.",
"Computes A-B\n\n@param listA\n@param listB\n@return",
"Inserts a CharSequence array value into the mapping of the underlying Bundle, replacing any\nexisting value for the given key. Either key or value may be null.\n\n@param key a String, or null\n@param value a CharSequence array object, or null\n@return this bundler instance to chain method calls",
"Set the offsets in the compressed data area for each mip-map level.\n@param offsets array of offsets",
"This function interprets the arguments of the main function. By doing\nthis it will set flags for the dump generation. See in the help text for\nmore specific information about the options.\n\n@param args\narray of arguments from the main function.\n@return list of {@link DumpProcessingOutputAction}",
"Read a text file from assets into a single string\n\n@param context\nA non-null Android Context\n@param asset\nThe asset file to read\n@return The contents or null on error.",
"Gets the element view.\n\n@return the element view",
"Searches the variables layers, top to bottom, for given name, and returns if found; null otherwise.\n\nIf maxDepth is set to {@link Variables#SEARCH_ALL_LAYERS}, then search all layers."
] |
private static JSONObject parseStencil(String stencilId) throws JSONException {
JSONObject stencilObject = new JSONObject();
stencilObject.put("id",
stencilId.toString());
return stencilObject;
} | [
"Delivers the correct JSON Object for the stencilId\n\n@param stencilId\n@throws org.json.JSONException"
] | [
"Convert a Java date into a Planner date.\n\n20070222\n\n@param value Java Date instance\n@return Planner date",
"GetJob helper - String predicates are all created the same way, so this factors some code.",
"Concatenates of list of Bytes objects to create a byte array\n\n@param listOfBytes Bytes objects to concatenate\n@return Bytes",
"Recursively add indirect subclasses to a class record.\n\n@param directSuperClass\nthe superclass to add (together with its own superclasses)\n@param subClassRecord\nthe subclass to add to",
"Read arguments from a file. Newline delimited, UTF-8 encoded. No fanciness to\navoid dependencies.",
"Write exceptions into the format used by MSPDI files from\nProject 2007 onwards.\n\n@param calendar parent calendar\n@param exceptions list of exceptions",
"Set the attributes for this template.\n\n@param attributes the attribute map",
"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",
"Read in lines and execute them.\n\n@param reader the reader from which to get the groovy source to exec\n@param out the outputstream to use\n@throws java.io.IOException if something goes wrong"
] |
public static String getStatementUri(Statement statement) {
int i = statement.getStatementId().indexOf('$') + 1;
return PREFIX_WIKIDATA_STATEMENT
+ statement.getSubject().getId() + "-"
+ statement.getStatementId().substring(i);
} | [
"Get the URI for the given statement.\n\n@param statement\nthe statement for which to create a URI\n@return the URI"
] | [
"Plots the MSD curve for trajectory t.\n@param t List of trajectories\n@param lagMin Minimum timelag (e.g. 1,2,3..) lagMin*timelag = elapsed time in seconds\n@param lagMax Maximum timelag (e.g. 1,2,3..) lagMax*timelag = elapsed time in seconds",
"Stops the background data synchronization thread and releases the local client.",
"Sets the day of the month.\n@param day the day to set.",
"Computes the mean or average of all the elements.\n\n@return mean",
"Check that the parameter string is not null or empty\n\n@param value\nString value to be checked.\n@param parameterName\nThe name of the user-supplied parameter that we are validating\nso that the user can easily find the error in their code.\n@throws IllegalArgumentException\nIf the key is null or empty.",
"The list of device types on which this application can run.",
"Put a value if and only if the map has not changed since the given snapshot was taken. If the put fails,\nit is the caller's responsibility to retry.\n\n@param instance the instance with the map field\n@param key the key\n@param value the value\n@param snapshot the map snapshot\n@return {@code false} if the snapshot is out of date and we could not update, {@code true} if the put succeeded",
"Creates a ProjectCalendar instance from the Asta data.\n\n@param calendarRow basic calendar data\n@param workPatternMap work pattern map\n@param workPatternAssignmentMap work pattern assignment map\n@param exceptionAssignmentMap exception assignment map\n@param timeEntryMap time entry map\n@param exceptionTypeMap exception type map",
"Remove all references to a groupId\n\n@param groupIdToRemove ID of group"
] |
public String toStringByValue() {
IntArrayList theKeys = new IntArrayList();
keysSortedByValue(theKeys);
StringBuffer buf = new StringBuffer();
buf.append("[");
int maxIndex = theKeys.size() - 1;
for (int i = 0; i <= maxIndex; i++) {
int key = theKeys.get(i);
buf.append(String.valueOf(key));
buf.append("->");
buf.append(String.valueOf(get(key)));
if (i < maxIndex) buf.append(", ");
}
buf.append("]");
return buf.toString();
} | [
"Returns a string representation of the receiver, containing\nthe String representation of each key-value pair, sorted ascending by value."
] | [
"if you want to convert some string to an object, you have an argument to parse",
"Unmark a PersistenceBroker as preferred choice for current Thread\n\n@param key The PBKey the broker is associated to\n@param broker The PersistenceBroker to unmark",
"Sets an attribute in the main section of the manifest.\n\n@param name the attribute's name\n@param value the attribute's value\n@return {@code this}\n@throws IllegalStateException if entries have been added or the JAR has been written prior to calling this methods.",
"Extracts a flat set of interception bindings from a given set of interceptor bindings.\n\n@param addTopLevelInterceptorBindings add top level interceptor bindings to the result set.\n@param addInheritedInterceptorBindings add inherited level interceptor bindings to the result set.\n@return",
"Sets the right padding character for all cells in the row.\n@param paddingRightChar new padding character, ignored if null\n@return this to allow chaining",
"Use this API to add appfwjsoncontenttype.",
"Create an error image should an error occur while fetching a WMS map.\n\n@param width image width\n@param height image height\n@param e exception\n@return error image\n@throws java.io.IOException oops",
"Restores a saved connection state into this BoxAPIConnection.\n\n@see #save\n@param state the saved state that was created with {@link #save}.",
"Establish a new tempo master, and if it is a change from the existing one, report it to the listeners.\n\n@param newMaster the packet which caused the change of masters, or {@code null} if there is now no master."
] |
private static StackTraceElement getStackTrace() {
StackTraceElement[] stack = Thread.currentThread().getStackTrace();
int i = 2; // we can skip the first two (first is getStackTrace(), second is this method)
while (i < stack.length) {
boolean isLoggingClass = false;
for (String loggingClass : loggingClasses) {
String className = stack[i].getClassName();
if (className.startsWith(loggingClass)) {
isLoggingClass = true;
break;
}
}
if (!isLoggingClass) {
break;
}
i += 1;
}
// if we didn't find anything, keep last element (probably shouldn't happen, but could if people add too many logging classes)
if (i >= stack.length) {
i = stack.length - 1;
}
return stack[i];
} | [
"Get the current stack trace element, skipping anything from known logging classes.\n@return The current stack trace for this thread"
] | [
"Read an optional int value form a JSON value.\n@param val the JSON value that should represent the int.\n@return the int from the JSON or 0 reading the int fails.",
"Save a weak reference to the resource",
"Send a get artifacts request\n\n@param hasLicense\n@return list of artifact\n@throws GrapesCommunicationException",
"Returns the associated SQL WHERE statement.",
"Returns the target locales.\n\n@return the target locales, never null.",
"Declaration of the variable within a block",
"Captures System.out and System.err and redirects them\nto Redwood logging.\n@param captureOut True is System.out should be captured\n@param captureErr True if System.err should be captured",
"Emit a event object with parameters and force all listeners to be called asynchronously.\n\n@param event\nthe target event\n@param args\nthe arguments passed in\n@see #emit(EventObject, Object...)",
"For a given activity, retrieve a map of the activity code values which have been assigned to it.\n\n@param activity target activity\n@return map of activity code value UUIDs"
] |
public static base_response clear(nitro_service client, route6 resource) throws Exception {
route6 clearresource = new route6();
clearresource.routetype = resource.routetype;
return clearresource.perform_operation(client,"clear");
} | [
"Use this API to clear route6."
] | [
"Use this API to fetch all the systemsession resources that are configured on netscaler.",
"Loads configuration from InputStream. Later loads have lower priority.\n\n@param in InputStream to load from\n@since 1.2.0",
"Copy a patch element\n\n@param entry the patch entry\n@param patchId the patch id for the element\n@param modifications the element modifications\n@return the new patch element",
"Return overall per token accuracy",
"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",
"Delivers the correct JSON Object for the Stencilset\n\n@param stencilSet\n@throws org.json.JSONException",
"Request the list of all tracks in the specified slot, given a dbserver connection to a player that has already\nbeen set up.\n\n@param slot identifies the media slot we are querying\n@param client the dbserver client that is communicating with the appropriate player\n\n@return the retrieved track list entry items\n\n@throws IOException if there is a communication problem\n@throws InterruptedException if the thread is interrupted while trying to lock the client for menu operations\n@throws TimeoutException if we are unable to lock the client for menu operations",
"Compute pose of skeleton at the given time from the animation channels.\n@param timeInSec animation time in seconds.",
"Get the FieldDescriptors of the extent based on the FieldDescriptors of the parent."
] |
public static vpnglobal_auditnslogpolicy_binding[] get(nitro_service service) throws Exception{
vpnglobal_auditnslogpolicy_binding obj = new vpnglobal_auditnslogpolicy_binding();
vpnglobal_auditnslogpolicy_binding response[] = (vpnglobal_auditnslogpolicy_binding[]) obj.get_resources(service);
return response;
} | [
"Use this API to fetch a vpnglobal_auditnslogpolicy_binding resources."
] | [
"Calculates the LatLong position of the end point of a line the specified\ndistance from this LatLong, along the provided bearing, where North is 0,\nEast is 90 etc.\n\n@param bearing The bearing, in degrees, with North as 0, East as 90 etc.\n@param distance The distance in metres.\n@return A new LatLong indicating the end point.",
"Delete an artifact in the Grapes server\n\n@param gavc\n@throws GrapesCommunicationException\n@throws javax.naming.AuthenticationException",
"Read all resource assignments from a GanttProject project.\n\n@param gpProject GanttProject project",
"Log a info message with a throwable.",
"Converts the given CharSequence into a List of Strings of one character.\n\n@param self a CharSequence\n@return a List of characters (a 1-character String)\n@see #toSet(String)\n@since 1.8.2",
"Extract child task data.\n\n@param task MPXJ task\n@param row Synchro task data",
"Inserts a marshalled endpoint reference to a given DOM tree rooted by parent.\n@param wsAddr\n@param parent\n@throws ServiceLocatorException",
"This filter changes the amount of color in each of the three channels.\n\n@param r The amount of redness in the picture. Can range from -100 to 100 in percentage.\n@param g The amount of greenness in the picture. Can range from -100 to 100 in percentage.\n@param b The amount of blueness in the picture. Can range from -100 to 100 in percentage.\n@throws IllegalArgumentException if {@code r}, {@code g}, or {@code b} are outside of bounds.",
"Fling the content\n\n@param velocityX The initial velocity in the X direction. Positive numbers mean that the\nfinger/cursor is moving to the left on the screen, which means we want to\nscroll towards the beginning.\n@param velocityY The initial velocity in the Y direction. Positive numbers mean that the\nfinger/cursor is moving down the screen, which means we want to scroll\ntowards the top.\n@param velocityZ TODO: Z-scrolling is currently not supported\n@return"
] |
@SuppressWarnings({"unused", "WeakerAccess"})
public void pushNotificationViewedEvent(Bundle extras){
if (extras == null || extras.isEmpty() || extras.get(Constants.NOTIFICATION_TAG) == null) {
getConfigLogger().debug(getAccountId(), "Push notification: " + (extras == null ? "NULL" : extras.toString()) + " not from CleverTap - will not process Notification Viewed event.");
return;
}
if (!extras.containsKey(Constants.NOTIFICATION_ID_TAG) || (extras.getString(Constants.NOTIFICATION_ID_TAG) == null)) {
getConfigLogger().debug(getAccountId(), "Push notification ID Tag is null, not processing Notification Viewed event for: " + extras.toString());
return;
}
// Check for dupe notification views; if same notficationdId within specified time interval (2 secs) don't process
boolean isDuplicate = checkDuplicateNotificationIds(extras, notificationViewedIdTagMap, Constants.NOTIFICATION_VIEWED_ID_TAG_INTERVAL);
if (isDuplicate) {
getConfigLogger().debug(getAccountId(), "Already processed Notification Viewed event for " + extras.toString() + ", dropping duplicate.");
return;
}
JSONObject event = new JSONObject();
try {
JSONObject notif = getWzrkFields(extras);
event.put("evtName", Constants.NOTIFICATION_VIEWED_EVENT_NAME);
event.put("evtData", notif);
} catch (Throwable ignored) {
//no-op
}
queueEvent(context, event, Constants.RAISED_EVENT);
} | [
"Pushes the Notification Viewed event to CleverTap.\n\n@param extras The {@link Bundle} object that contains the\nnotification details"
] | [
"Create an index of base font numbers and their associated base\nfont instances.\n@param data property data",
"Read configuration from zookeeper",
"Formats the supplied value using the specified DateTimeFormat.\n\n@return \"\" if the value is null",
"Find the animation associated with this avatar with the given name.\n@param name name of animation to look for\n@return {@link GVRAnimator} animation found or null if none with that name",
"Sort and order steps to avoid unwanted generation",
"This method writes calendar data to a Planner file.\n\n@throws JAXBException on xml creation errors",
"Search for a publisher of the given type in a project and return it, or null if it is not found.\n\n@return The publisher",
"Returns a list of the compact representation of all of the custom fields in a workspace.\n\n@param workspace The workspace or organization to find custom field definitions in.\n@return Request object",
"Given a list of typedDependencies, returns true if the node \"node\" is the\ngovernor of a conj relation with a dependent which is not a preposition\n\n@param node\nA node in this GrammaticalStructure\n@param list\nA list of typedDependencies\n@return true If node is the governor of a conj relation in the list with\nthe dep not being a preposition"
] |
private void processUDF(UDFTypeType udf)
{
FieldTypeClass fieldType = FIELD_TYPE_MAP.get(udf.getSubjectArea());
if (fieldType != null)
{
UserFieldDataType dataType = UserFieldDataType.getInstanceFromXmlName(udf.getDataType());
String name = udf.getTitle();
FieldType field = addUserDefinedField(fieldType, dataType, name);
if (field != null)
{
m_fieldTypeMap.put(udf.getObjectId(), field);
}
}
} | [
"Process an individual UDF.\n\n@param udf UDF definition"
] | [
"Matches an array value if it contains all the elements of the argument array\n@param rhs The arguments\n@return PredicateExpression: $all rhs",
"Performs all actions that have been configured.",
"Retrieve list of assignment extended attributes.\n\n@return list of extended attributes",
"Convenience method which allows all projects in the database to\nbe read in a single operation.\n\n@return list of ProjectFile instances\n@throws MPXJException",
"Set the current playback position. This method can only be used in situations where the component is\ntied to a single player, and therefore always has a single playback position.\n\nWill cause part of the component to be redrawn if the position has\nchanged. This will be quickly overruled if a player is being monitored, but\ncan be used in other contexts.\n\n@param milliseconds how far into the track has been played\n\n@see #setPlaybackState",
"Returns the constructor of the indirection handler class.\n\n@return The constructor for indirection handlers",
"Tells you if the expression is a null safe dereference.\n@param expression\nexpression\n@return\ntrue if is null safe dereference.",
"Append this message to the message set\n@param messages message to append\n@return the written size and first offset\n@throws IOException file write exception",
"Initializes the set of report implementation."
] |
private String formatCurrency(Number value)
{
return (value == null ? null : m_formats.getCurrencyFormat().format(value));
} | [
"This method is called to format a currency value.\n\n@param value numeric value\n@return currency value"
] | [
"The main method called from the command line.\n\n@param args the command line arguments",
"Retrieves the work variance.\n\n@return work variance",
"Convert the Primavera string representation of a UUID into a Java UUID instance.\n\n@param value Primavera UUID\n@return Java UUID instance",
"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.",
"Handles the response of the getVersion request.\n@param incomingMessage the response message to process.",
"Use this API to export application.",
"Set the dates for the specified photo.\n\nThis method requires authentication with 'write' permission.\n\n@param photoId\nThe photo ID\n@param datePosted\nThe date the photo was posted or null\n@param dateTaken\nThe date the photo was taken or null\n@param dateTakenGranularity\nThe granularity of the taken date or null\n@throws FlickrException",
"Ensures that no more than maxContiguousPartitionsPerZone partitions are\ncontiguous within a single zone.\n\nMoves the necessary partitions to break up contiguous runs from each zone\nto some other random zone/node. There is some chance that such random\nmoves could result in contiguous partitions in other zones.\n\n@param nextCandidateCluster cluster metadata\n@param maxContiguousPartitionsPerZone See RebalanceCLI.\n@return Return updated cluster metadata.",
"Parse a percent complete value.\n\n@param value sting representation of a percent complete value.\n@return Double instance"
] |
public void updateIntegerBelief(String name, int value) {
introspector.storeBeliefValue(this, name, getIntegerBelief(name) + value);
} | [
"Updates the given integer belief\nadding the given integer\nnewBelief = previousBelief + givenValue\n\n@param String - the belief name\n@param the value to add"
] | [
"Scans a path on the filesystem for resources inside the given classpath location.\n\n@param location The system-independent location on the classpath.\n@param locationUri The system-specific physical location URI.\n@return a sorted set containing all the resources inside the given location\n@throws IOException if an error accessing the filesystem happens",
"Gets the uuid from response.\n\n@param myResponse\nthe my response\n@return the uuid from response",
"Stop listening for beats.",
"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",
"Encodes the given URI scheme with the given encoding.\n@param scheme the scheme to be encoded\n@param encoding the character encoding to encode to\n@return the encoded scheme\n@throws UnsupportedEncodingException when the given encoding parameter is not supported",
"Returns first enum constant found..\n\n@param styleName Space-separated list of styles\n@param enumClass Type of enum\n@param defaultValue Default value of no match was found\n@return First enum constant found or default value",
"Get the photos for the specified group pool, optionally filtering by taf.\n\nThis method does not require authentication.\n\n@see com.flickr4java.flickr.photos.Extras\n@param groupId\nThe group ID\n@param userId\nThe user ID (may be null)\n@param tags\nThe optional tags (may be null)\n@param extras\nSet of extra-attributes to include (may be null)\n@param perPage\nThe number of photos per page (0 to ignore)\n@param page\nThe page offset (0 to ignore)\n@return A Collection of Photo objects\n@throws FlickrException",
"Sets the occurence.\n\n@param min the min\n@param max the max\n@throws ParseException the parse exception",
"Use this API to fetch lbvserver_scpolicy_binding resources of given name ."
] |
private void readCostRateTables(Resource resource, Rates rates)
{
if (rates == null)
{
CostRateTable table = new CostRateTable();
table.add(CostRateTableEntry.DEFAULT_ENTRY);
resource.setCostRateTable(0, table);
table = new CostRateTable();
table.add(CostRateTableEntry.DEFAULT_ENTRY);
resource.setCostRateTable(1, table);
table = new CostRateTable();
table.add(CostRateTableEntry.DEFAULT_ENTRY);
resource.setCostRateTable(2, table);
table = new CostRateTable();
table.add(CostRateTableEntry.DEFAULT_ENTRY);
resource.setCostRateTable(3, table);
table = new CostRateTable();
table.add(CostRateTableEntry.DEFAULT_ENTRY);
resource.setCostRateTable(4, table);
}
else
{
Set<CostRateTable> tables = new HashSet<CostRateTable>();
for (net.sf.mpxj.mspdi.schema.Project.Resources.Resource.Rates.Rate rate : rates.getRate())
{
Rate standardRate = DatatypeConverter.parseRate(rate.getStandardRate());
TimeUnit standardRateFormat = DatatypeConverter.parseTimeUnit(rate.getStandardRateFormat());
Rate overtimeRate = DatatypeConverter.parseRate(rate.getOvertimeRate());
TimeUnit overtimeRateFormat = DatatypeConverter.parseTimeUnit(rate.getOvertimeRateFormat());
Double costPerUse = DatatypeConverter.parseCurrency(rate.getCostPerUse());
Date endDate = rate.getRatesTo();
CostRateTableEntry entry = new CostRateTableEntry(standardRate, standardRateFormat, overtimeRate, overtimeRateFormat, costPerUse, endDate);
int tableIndex = rate.getRateTable().intValue();
CostRateTable table = resource.getCostRateTable(tableIndex);
if (table == null)
{
table = new CostRateTable();
resource.setCostRateTable(tableIndex, table);
}
table.add(entry);
tables.add(table);
}
for (CostRateTable table : tables)
{
Collections.sort(table);
}
}
} | [
"Reads the cost rate tables from the file.\n\n@param resource parent resource\n@param rates XML cot rate tables"
] | [
"Here we specify the configuration, starting from default MostUsefulConfiguration, and changing only what is needed",
"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.",
"Returns the name of the current member which is the name in the case of a field, or the property name for an\naccessor method.\n\n@return The member name\n@exception XDocletException if an error occurs",
"Get the bone index for the given scene object.\n\n@param bone GVRSceneObject bone to search for\n@return bone index or -1 for root bone.\n@see #getParentBoneIndex",
"Returns the JSON String representation of the payload\naccording to Apple APNS specification\n\n@return the String representation as expected by Apple",
"Creates the button for converting an XML bundle in a property bundle.\n@return the created button.",
"Writes the object to the specified document, optionally creating a child\nelement. The object in this case should be a point.\n\n@param o the object (of type Point).\n@param document the document to write to.\n@param asChild create child element if true.\n@throws RenderException",
"Part of the endOfRun process that needs the database. May be deferred if the database is not available.",
"Ensures that every path starts and ends with a slash character.\n\n@param scriptPath the scriptPath that needs to be normalized\n@return a path with leading and trailing slash"
] |
public static <K, V> QueuedKeyedResourcePool<K, V> create(ResourceFactory<K, V> factory) {
return create(factory, new ResourcePoolConfig());
} | [
"Create a new queued pool using the defaults for key of type K, request of\ntype R, and value of Type V.\n\n@param factory The factory that creates objects\n@return The created pool"
] | [
"Read resource data from a PEP file.",
"Moves our current playback position to the specified beat; this will be reflected in any status and beat packets\nthat we are sending. An incoming value less than one will jump us to the first beat.\n\n@param beat the beat that we should pretend to be playing",
"Determine the enum value corresponding to the track type found in the packet.\n\n@return the proper value",
"page breaks should be near the bottom of the band, this method used while adding subreports\nwhich has the \"start on new page\" option.\n@param band",
"Helper to read a mandatory String value.\n@param path The XML path of the element to read.\n@return The String value stored in the XML.\n@throws Exception thrown if the value could not be read.",
"Parses the equation and compiles it into a sequence which can be executed later on\n@param equation String in simple equation format.\n@param assignment if true an assignment is expected and an exception if thrown if there is non\n@param debug if true it will print out debugging information\n@return Sequence of operations on the variables",
"Get an extent aware RsIterator based on the Query\n\n@param query\n@param cld\n@param factory the Factory for the RsIterator\n@return OJBIterator",
"Naive implementation of the difference in days between two dates",
"Loads the script from a text string.\n@param scriptText text string containing script to execute.\n@param language language (\"js\" or \"lua\")"
] |
public static Map<FieldType, String> getDefaultResourceFieldMap()
{
Map<FieldType, String> map = new LinkedHashMap<FieldType, String>();
map.put(ResourceField.UNIQUE_ID, "rsrc_id");
map.put(ResourceField.GUID, "guid");
map.put(ResourceField.NAME, "rsrc_name");
map.put(ResourceField.CODE, "employee_code");
map.put(ResourceField.EMAIL_ADDRESS, "email_addr");
map.put(ResourceField.NOTES, "rsrc_notes");
map.put(ResourceField.CREATED, "create_date");
map.put(ResourceField.TYPE, "rsrc_type");
map.put(ResourceField.INITIALS, "rsrc_short_name");
map.put(ResourceField.PARENT_ID, "parent_rsrc_id");
return map;
} | [
"Retrieve the default mapping between MPXJ resource fields and Primavera resource field names.\n\n@return mapping"
] | [
"Sends a normal HTTP response containing the serialization information in\na XML format",
"Calculate the starting content offset based on the layout orientation and Gravity\n@param totalSize total size occupied by the content",
"Call the onQueryExecuteTimeLimitExceeded hook if necessary\n@param sql sql statement that took too long\n@param queryStartTime time when query was started.",
"Adds a Statement.\n\n@param rank\nrank of the statement\n@param subject\nrdf resource that refers to the statement",
"Return tabular data\n@param labels Labels array\n@param data Data bidimensional array\n@param padding Total space between fields\n@return String",
"Extract where the destination is reshaped to match the extracted region\n@param src The original matrix which is to be copied. Not modified.\n@param srcX0 Start column.\n@param srcX1 Stop column+1.\n@param srcY0 Start row.\n@param srcY1 Stop row+1.\n@param dst Where the submatrix are stored. Modified.",
"Gets an exception reporting an unexpected XML element.\n\n@param reader a reference to the stream reader.\n@return the constructed {@link javax.xml.stream.XMLStreamException}.",
"Obtains a Ethiopic local date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the Ethiopic local date-time, not null\n@throws DateTimeException if unable to create the date-time",
"Gets the filename from a path or URL.\n@param path or url.\n@return the file name."
] |
@SuppressWarnings("unchecked")
protected String addPostRunDependent(Creatable<? extends Indexable> creatable) {
TaskGroup.HasTaskGroup dependency = (TaskGroup.HasTaskGroup) creatable;
return this.addPostRunDependent(dependency);
} | [
"Add a creatable \"post-run\" dependent for this task item.\n\n@param creatable the creatable \"post-run\" dependent.\n@return the key to be used as parameter to taskResult(string) method to retrieve created \"post-run\" dependent"
] | [
"Wraps a linear solver of any type with a safe solver the ensures inputs are not modified",
"Resumes a given entry point type;\n\n@param entryPoint The entry point",
"Use the jgrapht cycle checker to detect any cycles in the provided dependency graph.",
"Obtains a local date in Symmetry454 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 Symmetry454 local date, not null\n@throws DateTimeException if unable to create the date",
"Creates an empty block style definition.\n@return",
"Fetches the current online data for the given item, and adds numerical\nlabels if necessary.\n\n@param itemIdValue\nthe id of the document to inspect",
"Register a loader with the 'sniffer'.\n\n'Factory loaders' are pre-registered. To load a format we don't support,\ncreate a {@link GVRCompressedTextureLoader} descendant. Then, before\ntrying to load any files in that format, create an instance and call\n{@link #register()}:\n\n<pre>\n\nnew MyCompressedFormat().register();\n</pre>",
"Should be called after new data is inserted. Will be automatically called, when the view dimensions\nhas changed.\n\nCalculates the start- and end-angles for every PieSlice.",
"Returns the index of the eigenvalue which has the largest magnitude.\n\n@return index of the largest magnitude eigen value."
] |
public static void showChannels(Object... channels){
// TODO this could share more code with the other show/hide(Only)Channels methods
for(LogRecordHandler handler : handlers){
if(handler instanceof VisibilityHandler){
VisibilityHandler visHandler = (VisibilityHandler) handler;
for (Object channel : channels) {
visHandler.alsoShow(channel);
}
}
}
} | [
"Show multiple channels. All other channels will be unaffected.\n@param channels The channels to show"
] | [
"Adds a class entry to this JAR.\n\n@param clazz the class to add to the JAR.\n@return {@code this}",
"This method is called to alert project listeners to the fact that\na resource assignment has been read from a project file.\n\n@param resourceAssignment resourceAssignment instance",
"Attachments are only structurally different if one step has an inline attachment\nand the other step either has no inline attachment or the inline attachment is\ndifferent.",
"Use this API to update nsconfig.",
"This method extracts project properties from a GanttProject file.\n\n@param ganttProject GanttProject file",
"Adds a port that serves the HTTP requests. If unspecified, cleartext HTTP on port 36462 is used.\n\n@param localAddress the TCP/IP load address to bind\n@param protocol {@link SessionProtocol#HTTP} or {@link SessionProtocol#HTTPS}",
"Enables a dark shadow for this CircularImageView.\nIf the radius is set to 0, the shadow is removed.\n@param radius Radius for the shadow to extend to.\n@param dx Horizontal shadow offset.\n@param dy Vertical shadow offset.\n@param color The color of the shadow to apply.",
"Adds an additional description to the constructed document.\n\n@param text\nthe text of the description\n@param languageCode\nthe language code of the description\n@return builder object to continue construction",
"Checks the given field descriptor.\n\n@param fieldDef The field descriptor\n@param checkLevel The amount of checks to perform\n@exception ConstraintException If a constraint has been violated"
] |
public static AbstractBuild<?, ?> getRootBuild(AbstractBuild<?, ?> currentBuild) {
AbstractBuild<?, ?> rootBuild = null;
AbstractBuild<?, ?> parentBuild = getUpstreamBuild(currentBuild);
while (parentBuild != null) {
if (isPassIdentifiedDownstream(parentBuild)) {
rootBuild = parentBuild;
}
parentBuild = getUpstreamBuild(parentBuild);
}
if (rootBuild == null && isPassIdentifiedDownstream(currentBuild)) {
return currentBuild;
}
return rootBuild;
} | [
"Get the root build which triggered the current build. The build root is considered to be the one furthest one\naway from the current build which has the isPassIdentifiedDownstream active, if no parent build exists, check\nthat the current build needs an upstream identifier, if it does return it.\n\n@param currentBuild The current build.\n@return The root build with isPassIdentifiedDownstream active. Null if no upstream or non is found."
] | [
"Returns a unique file name\n@param baseFileName the requested base name for the file\n@param extension the requested extension for the file\n@param cleanBaseFileName specify if the <code>baseFileName</code> has to be cleaned before being used (i.e. 'jboss-web' should not be cleaned to avoid '-' to become '_')\n@param ancestorFolders specify the ancestor folders for the file (if there's no ancestor folder, just pass 'null' value)\n@return a String representing the unique file generated",
"The main conversion method.\n@param image A BufferedImage containing the image that needs to be converted\n@param favicon When ico is true it will convert ico file into 16 x 16 size\n@return A string containing the ASCII version of the original image.",
"Render the scalebar.\n\n@param mapContext The context of the map for which the scalebar is created.\n@param scalebarParams The scalebar parameters.\n@param tempFolder The directory in which the graphic file is created.\n@param template The template that containts the scalebar processor",
"Sets the request body to the contents of a String.\n\n<p>If the contents of the body are large, then it may be more efficient to use an {@link InputStream} instead of\na String. Using a String requires that the entire body be in memory before sending the request.</p>\n\n@param body a String containing the contents of the body.",
"Use this API to fetch the statistics of all cmppolicylabel_stats resources that are configured on netscaler.",
"Generate a set of datetime patterns to accommodate variations in MPX files.\n\n@param datePattern date pattern element\n@param timePatterns time patterns\n@return datetime patterns",
"Returns the WDTK datatype IRI for the property datatype as represented by\nthe given JSON datatype string.\n\n@param jsonDatatype\nthe JSON datatype string; case-sensitive\n@throws IllegalArgumentException\nif the given datatype string is not known",
"Process each regex group matched substring of the given CharSequence. If the closure\nparameter takes one argument, an array with all match groups is passed to it.\nIf the closure takes as many arguments as there are match groups, then each\nparameter will be one match group.\n\n@param self the source CharSequence\n@param regex a Regex CharSequence\n@param closure a closure with one parameter or as much parameters as groups\n@return the source CharSequence\n@see #eachMatch(String, String, groovy.lang.Closure)\n@since 1.8.2",
"Return the inverse cumulative distribution function at x.\n\n@param x Argument\n@return Inverse cumulative distribution function at x."
] |
public static base_response update(nitro_service client, nd6ravariables resource) throws Exception {
nd6ravariables updateresource = new nd6ravariables();
updateresource.vlan = resource.vlan;
updateresource.ceaserouteradv = resource.ceaserouteradv;
updateresource.sendrouteradv = resource.sendrouteradv;
updateresource.srclinklayeraddroption = resource.srclinklayeraddroption;
updateresource.onlyunicastrtadvresponse = resource.onlyunicastrtadvresponse;
updateresource.managedaddrconfig = resource.managedaddrconfig;
updateresource.otheraddrconfig = resource.otheraddrconfig;
updateresource.currhoplimit = resource.currhoplimit;
updateresource.maxrtadvinterval = resource.maxrtadvinterval;
updateresource.minrtadvinterval = resource.minrtadvinterval;
updateresource.linkmtu = resource.linkmtu;
updateresource.reachabletime = resource.reachabletime;
updateresource.retranstime = resource.retranstime;
updateresource.defaultlifetime = resource.defaultlifetime;
return updateresource.update_resource(client);
} | [
"Use this API to update nd6ravariables."
] | [
"Creates the adapter for the target database.",
"Returns the parameter key of the facet with the given name.\n@param facet the facet's name.\n@return the parameter key for the facet.",
"Sets the scale vector of the keyframe.",
"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",
"Validate that the configuration is valid.\n\n@return any validation errors.",
"Shifts are performed based upon singular values computed previously. If it does not converge\nusing one of those singular values it uses a Wilkinson shift instead.",
"Returns the right string representation of the effort level based on given number of points.",
"Mark a PersistenceBroker as preferred choice for current Thread\n\n@param key The PBKey the broker is associated to\n@param broker The PersistenceBroker to mark as current",
"Logout the current session. After calling this method,\nthe session will be cleared"
] |
public void removeCustomOverride(int path_id, String client_uuid) throws Exception {
updateRequestResponseTables("custom_response", "", getProfileIdFromPathID(path_id), client_uuid, path_id);
} | [
"Remove custom overrides\n\n@param path_id ID of path containing custom override\n@param client_uuid UUID of the client\n@throws Exception exception"
] | [
"Returns a new instance of the given class using the constructor with the specified parameter.\n\n@param target The class to instantiate\n@param type The types of the single parameter of the constructor\n@param arg The argument\n@return The instance",
"Generates and writes the sql for inserting the currently contained data objects.\n\n@param model The database model\n@param platform The platform\n@param writer The output stream",
"Return true if the processor of the node has previously been executed.\n\n@param processorGraphNode the node to test.",
"Creates a new deployment for the URL. The target server will require access to the URL.\n\n@param url the URL representing the content\n\n@return the deployment",
"Reads the XER file table and row structure ready for processing.\n\n@param is input stream\n@throws MPXJException",
"Converts a tab delimited string into an object with given fields\nRequires the object has public access for the specified fields\n\n@param objClass Class of object to be created\n@param str string to convert\n@param delimiterPattern delimiter\n@param fieldNames fieldnames\n@param <T> type to return\n@return Object created from string",
"Use this API to update sslocspresponder.",
"Print currency.\n\n@param value currency value\n@return currency value",
"Set the map attribute.\n\n@param name the attribute name\n@param attribute the attribute"
] |
private Date getTime(String value) throws MPXJException
{
try
{
Number hours = m_twoDigitFormat.parse(value.substring(0, 2));
Number minutes = m_twoDigitFormat.parse(value.substring(2, 4));
Calendar cal = DateHelper.popCalendar();
cal.set(Calendar.HOUR_OF_DAY, hours.intValue());
cal.set(Calendar.MINUTE, minutes.intValue());
cal.set(Calendar.SECOND, 0);
cal.set(Calendar.MILLISECOND, 0);
Date result = cal.getTime();
DateHelper.pushCalendar(cal);
return result;
}
catch (ParseException ex)
{
throw new MPXJException("Failed to parse time " + value, ex);
}
} | [
"Convert a Planner time into a Java date.\n\n0800\n\n@param value Planner time\n@return Java Date instance"
] | [
"Read project calendars.",
"This method displays the resource assignments for each resource. This time\nrather than just iterating through the list of all assignments in\nthe file, we extract the assignments on a resource-by-resource basis.\n\n@param file MPX file",
"Prints a debug log message that details the time taken for the Http\nrequest to be parsed by the coordinator\n\n@param operationType\n@param receivedTimeInMs",
"Remove a collaborator from an app.\n@param appName App name. See {@link #listApps} for a list of apps that can be used.\n@param collaborator See {@link #listCollaborators} for collaborators that can be removed from the app.",
"Sets the specified boolean attribute to the specified value.\n\n@param name name of the attribute\n@param value value of the attribute\n@since 1.9.0",
"Checks if the specified bytecode version string represents a JDK 1.5+ compatible\nbytecode version.\n@param bytecodeVersion the bytecode version string (1.4, 1.5, 1.6, 1.7 or 1.8)\n@return true if the bytecode version is JDK 1.5+",
"Computes the eigenvalue of the provided tridiagonal matrix. Note that only the upper portion\nneeds to be tridiagonal. The bottom diagonal is assumed to be the same as the top.\n\n@param sideLength Number of rows and columns in the input matrix.\n@param diag Diagonal elements from tridiagonal matrix. Modified.\n@param off Off diagonal elements from tridiagonal matrix. Modified.\n@return true if it succeeds and false if it fails.",
"Use this API to update appfwlearningsettings.",
"Disable all overrides for a specified path\n\n@param pathID ID of path containing overrides\n@param clientUUID UUID of client"
] |
public SourceBuilder add(String fmt, Object... args) {
TemplateApplier.withParams(args).onText(source::append).onParam(this::add).parse(fmt);
return this;
} | [
"Appends formatted text to the source.\n\n<p>Formatting supports {@code %s} and {@code %n$s}. Most args are converted according to their\n{@link Object#toString()} method, except that:<ul>\n<li> {@link Package} and {@link PackageElement} instances use their fully-qualified names\n(no \"package \" prefix).\n<li> {@link Class}, {@link TypeElement}, {@link DeclaredType} and {@link QualifiedName}\ninstances use their qualified names where necessary, or shorter versions if a suitable\nimport line can be added.\n<li> {@link Excerpt} instances have {@link Excerpt#addTo(SourceBuilder)} called.\n</ul>"
] | [
"Creates a player wrapper for the Android MediaPlayer.",
"Specialized version of readValue just for reading map keys, because the StdDeserializer methods like\n_parseIntPrimitive blow up when the current JsonToken is FIELD_NAME",
"Appends a line separator node that will only be effective if the current line contains non-whitespace text.\n\n@return the given parent node",
"Put a spatial object in the cache and index it.\n\n@param key key for object\n@param object object itself\n@param envelope envelope for object",
"Determines whether the given documentation part contains the specified tag with the given parameter having the\ngiven value.\n\n@param doc The documentation part\n@param tagName The tag to be searched for\n@param paramName The parameter that the tag is required to have\n@param paramValue The value of the parameter\n@return boolean Whether the documentation part has the tag and parameter",
"Creates a slice for directly a raw memory address. This is\ninherently unsafe as it may be used to access arbitrary memory.\nThe slice will hold the specified object reference to prevent the\ngarbage collector from freeing it while it is in use by the slice.\n\n@param address the raw memory address base\n@param size the size of the slice\n@param reference the object reference\n@return the unsafe slice",
"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",
"Returns the smallest prefix length possible such that this address division grouping includes the block of addresses for that prefix.\n\n@return the prefix length",
"Process calendar hours and exception data from the database.\n\n@param calendars all calendars for the project"
] |
public static final Bytes of(ByteBuffer bb) {
Objects.requireNonNull(bb);
if (bb.remaining() == 0) {
return EMPTY;
}
byte[] data;
if (bb.hasArray()) {
data = Arrays.copyOfRange(bb.array(), bb.position() + bb.arrayOffset(),
bb.limit() + bb.arrayOffset());
} else {
data = new byte[bb.remaining()];
// duplicate so that it does not change position
bb.duplicate().get(data);
}
return new Bytes(data);
} | [
"Creates a Bytes object by copying the data of the given ByteBuffer.\n\n@param bb Data will be read from this ByteBuffer in such a way that its position is not\nchanged."
] | [
"Renders in LI tags, Wraps with UL tags optionally.",
"Use this API to fetch filtered set of appqoepolicy resources.\nset the filter parameter values in filtervalue object.",
"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.",
"adds the qualified names to the require-bundle attribute, if not already\npresent.\n\n@param bundles - passing parameterized bundled (e.g. versions, etc.) is\nnot supported",
"Rotate root widget to make it facing to the front of the scene",
"Specify the artifact configuration to be searched for\n@param artifact configured artifact object\n@return",
"Send an album art update announcement to all registered listeners.",
"Get image parent ID from imageID on the current agent.\n\n@param imageID\n@return",
"Iterate RMI Targets Map and remove entries loaded by protected ClassLoader"
] |
private final boolean matchChildBlock(int bufferIndex)
{
//
// Match the pattern we see at the start of the child block
//
int index = 0;
for (byte b : CHILD_BLOCK_PATTERN)
{
if (b != m_buffer[bufferIndex + index])
{
return false;
}
++index;
}
//
// The first step will produce false positives. To handle this, we should find
// the name of the block next, and check to ensure that the length
// of the name makes sense.
//
int nameLength = FastTrackUtility.getInt(m_buffer, bufferIndex + index);
// System.out.println("Name length: " + nameLength);
//
// if (nameLength > 0 && nameLength < 100)
// {
// String name = new String(m_buffer, bufferIndex+index+4, nameLength, CharsetHelper.UTF16LE);
// System.out.println("Name: " + name);
// }
return nameLength > 0 && nameLength < 100;
} | [
"Locate a child block by byte pattern and validate by\nchecking the length of the string we are expecting\nto follow the pattern.\n\n@param bufferIndex start index\n@return true if a child block starts at this point"
] | [
"Used for unit tests only.\n\nFIXME: Refactor test code with dependency injection or scope restrictions so this function is not public.\n\n@deprecated Do not use for production code, use {@link #fetch(String, String, voldemort.server.protocol.admin.AsyncOperationStatus, String, long, voldemort.store.metadata.MetadataStore, Long diskQuotaSizeInKB)} instead.",
"Within a single zone, swaps one random partition on one random node with\nanother random partition on different random node.\n\n@param nextCandidateCluster\n@param zoneId Zone ID within which to shuffle partitions\n@return updated cluster",
"Maps this iterable from the source document type to the target document type.\n\n@param mapper a function that maps from the source to the target document type\n@param <U> the target document type\n@return an iterable which maps T to U",
"Describe the model as a list of resources with their address and model, which\nthe HC can directly apply to create the model. Although the format might appear\nsimilar as the operations generated at boot-time this description is only useful\nto create the resource tree and cannot be used to invoke any operation.\n\n@param rootAddress the address of the root resource being described\n@param resource the root resource\n@return the list of resources",
"Returns the full path of the resource file with extension.\n\n@return path of the GVRAndroidResource. May return null if the\nresource is not associated with any file",
"Asynchronous call that begins execution of the task\nand returns immediately.",
"Get logs for an app by specifying additional parameters.\n@param logRequest See {LogRequestBuilder}\n@return log stream response",
"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.",
"Read the given source byte array, then overwrite this buffer's contents\n\n@param src source byte array\n@param srcOffset offset in source byte array to read from\n@param destOffset offset in this buffer to read to\n@param length max number of bytes to read\n@return the number of bytes read"
] |
public static Set<Map<String, Object>> setify(ObjectMapper mapper, Object source) {
return (Set<Map<String, Object>>) collectify(mapper, source, Set.class);
} | [
"Convert an object to a set of maps.\n\n@param mapper the object mapper\n@param source the source object\n@return set"
] | [
"Generates the build-info module for this docker image.\nAdditionally. this method tags the deployed docker layers with properties,\nsuch as build.name, build.number and custom properties defined in the Jenkins build.\n@param build\n@param listener\n@param config\n@param buildName\n@param buildNumber\n@param timestamp\n@return\n@throws IOException",
"Creates a server setup based on provided properties.\n\n@param properties the properties.\n@return the server setup, or an empty array.",
"Redirect URL to the specified profile ID\n\n@param model\n@param profileId\n@return\n@throws Exception",
"This implementation will probably be slower than the metadata\nobject copy, but this was easier to implement.\n@see org.apache.ojb.otm.copy.ObjectCopyStrategy#copy(Object)",
"Use this API to delete nsip6 resources of given names.",
"Use this API to add dnstxtrec.",
"Perform the module promotion\n\n@param moduleId String",
"Compares two avro strings which contains multiple store configs\n\n@param configAvro1\n@param configAvro2\n@return true if two config avro strings have same content",
"Return the authorization URL which is used to perform the authorization_code based OAuth2 flow.\n@param clientID the client ID to use with the connection.\n@param redirectUri the URL to which Box redirects the browser when authentication completes.\n@param state the text string that you choose.\nBox sends the same string to your redirect URL when authentication is complete.\n@param scopes this optional parameter identifies the Box scopes available\nto the application once it's authenticated.\n@return the authorization URL"
] |
public ItemRequest<Task> removeFollowers(String task) {
String path = String.format("/tasks/%s/removeFollowers", task);
return new ItemRequest<Task>(this, Task.class, path, "POST");
} | [
"Removes each of the specified followers from the task if they are\nfollowing. Returns the complete, updated record for the affected task.\n\n@param task The task to remove followers from.\n@return Request object"
] | [
"Returns the portion of the field name after the last dot, as field names\nmay actually be paths.",
"Pre API 11, this does an alpha animation.\n\n@param progress",
"Use this API to export application.",
"Use this API to fetch all the gslbservice resources that are configured on netscaler.",
"All address strings are comparable. If two address strings are invalid, their strings are compared.\nOtherwise, address strings are compared according to which type or version of string, and then within each type or version\nthey are compared using the comparison rules for addresses.\n\n@param other\n@return",
"Add a single exception to a calendar.\n\n@param mpxjCalendar MPXJ calendar\n@param date calendar exception",
"Return all valid tenors for a given moneyness and maturity.\nUses the payment times of the fix schedule to determine fractions.\n\n@param moneyness The moneyness as actual offset from par swap rate for which to get the maturities.\n@param maturity The maturities as year fraction from the reference date.\n@return The tenors as year fraction from reference date.",
"Returns the compact task records for all tasks within the given project,\nordered by their priority within the project.\n\n@param projectId The project in which to search for tasks.\n@return Request object",
"Gen error response.\n\n@param t\nthe t\n@return the response on single request"
] |
private static String getBindingId(Server server) {
Endpoint ep = server.getEndpoint();
BindingInfo bi = ep.getBinding().getBindingInfo();
return bi.getBindingId();
} | [
"Extracts the bindingId from a Server.\n@param server\n@return"
] | [
"Converts an image in BINARY mode to RGB mode\n\n@param img image\n@return new MarvinImage instance in RGB mode",
"Converts any string into a string that is safe to use as a file name.\nThe result will only include ascii characters and numbers, and the \"-\",\"_\", and \".\" characters.",
"For a cert we have generated, return the private key.\n@param cert\n@return\n@throws CertificateEncodingException\n@throws KeyStoreException\n@throws UnrecoverableKeyException\n@throws NoSuchAlgorithmException",
"Stops and clears all transitions",
"Builds the HTML code for a select widget given a bean containing the select options\n\n@param htmlAttributes html attributes for the select widget\n@param options the bean containing the select options\n\n@return the HTML for the select box",
"Convert the Values using the FieldConversion.sqlToJava\n@param fcs\n@param values",
"Singleton of MetaClassRegistry.\n\n@param includeExtension\n@return the registry",
"Replace known tags in the current data values with actual values as appropriate\n\n@param cr a reference to DataPipe from which to read the current map",
"The main method. See the class documentation."
] |
public void fillRectangle(Rectangle rect, Color color) {
template.saveState();
setFill(color);
template.rectangle(origX + rect.getLeft(), origY + rect.getBottom(), rect.getWidth(), rect.getHeight());
template.fill();
template.restoreState();
} | [
"Draw a rectangle's interior with this color.\n\n@param rect rectangle\n@param color colour"
] | [
"Read ClassDescriptors from the given repository file.\n@see #mergeDescriptorRepository",
"Exception handler if we are unable to parse a json value into a java representation\n\n@param expectedType Name of the expected Type\n@param type Type of the json node\n@return SpinJsonDataFormatException",
"Searches the set of imports to find a matching import by type name.\n\n@param typeName\nname of type (qualified or simple name allowed)\n@return found import or {@code null}",
"Converts the List to PagedList.\n@param list list to be converted in to paged list\n@param <InnerT> the wrapper inner type\n@return the Paged list for the inner type.",
"Handle interval change.\n@param event the change event.",
"Add an order on the given column\n\n@param columnName the name of the column\n@param ascending whether the sorting is ascending or descending",
"Builds a instance of the class for a map containing the values, without specifying the handler for differences\n\n@param clazz The class to build instance\n@param values The values map\n@return The instance\n@throws InstantiationException Error instantiating\n@throws IllegalAccessException Access error\n@throws IntrospectionException Introspection error\n@throws IllegalArgumentException Argument invalid\n@throws InvocationTargetException Invalid target",
"Read a single calendar exception.\n\n@param bc parent calendar\n@param exception exception data",
"Process a file.\n\n@param file the file to be processed\n@param mode the patching mode\n@throws IOException"
] |
public List<MaterialSection> getSectionList() {
List<MaterialSection> list = new LinkedList<>();
for(MaterialSection section : sectionList)
list.add(section);
for(MaterialSection section : bottomSectionList)
list.add(section);
return list;
} | [
"Get the section list\n\nN.B. The section list contains the bottom sections\n@return the list of sections setted"
] | [
"Checks if the required option exists.\n\n@param options OptionSet to checked\n@param opt Required option to check\n@throws VoldemortException",
"Find the style filter that must be applied to this feature.\n\n@param feature\nfeature to find the style for\n@param styles\nstyle filters to select from\n@return a style filter",
"Finds binding for a type in the given injector and, if not found,\nrecurses to its parent\n\n@param injector\nthe current Injector\n@param type\nthe Class representing the type\n@return A boolean flag, <code>true</code> if binding found",
"Use this API to update clusternodegroup resources.",
"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",
"Use this API to fetch all the nsfeature resources that are configured on netscaler.",
"Puts a message in the wake-up queue of this node to send the message on wake-up.\n@param serialMessage the message to put in the wake-up queue.",
"Check the document field's type\nand object\n@param lhs The field to check\n@param rhs The type\n@return Expression: lhs $type rhs",
"generate random velocities in the given range\n@return"
] |
public static final Number parseUnits(Number value)
{
return (value == null ? null : NumberHelper.getDouble(value.doubleValue() * 100));
} | [
"Parse units.\n\n@param value units value\n@return units value"
] | [
"Use this API to delete snmpmanager.",
"Sets the maximum time to wait before a call to getConnection is timed out.\n\nSetting this to zero is similar to setting it to Long.MAX_VALUE\n\n@param connectionTimeout\n@param timeUnit the unit of the connectionTimeout argument",
"returns the total count of objects in the GeneralizedCounter.",
"Attaches meta info about the current state of the device to an event.\nTypically, this meta is added only to the ping event.",
"Compress a directory into a zip file\n\n@param dir Directory\n@param zipFile ZIP file to create\n@throws IOException I/O Error",
"Flush output streams.",
"Returns a string that should be used as a label for the given property.\n\n@param propertyIdValue\nthe property to label\n@return the label",
"Use this API to update responderpolicy.",
"Obtain parameters from query\n\n@param query query to scan\n@return Map of parameters"
] |
@Override
public RandomVariable getValue(double evaluationTime, AssetModelMonteCarloSimulationModel model) throws CalculationException {
if(exerciseMethod == ExerciseMethod.UPPER_BOUND_METHOD) {
// Find optimal lambda
GoldenSectionSearch optimizer = new GoldenSectionSearch(-1.0, 1.0);
while(!optimizer.isDone()) {
double lambda = optimizer.getNextPoint();
double value = this.getValues(evaluationTime, model, lambda).getAverage();
optimizer.setValue(value);
}
return getValues(evaluationTime, model, optimizer.getBestPoint());
}
else {
return getValues(evaluationTime, model, 0.0);
}
} | [
"This method returns the value random variable of the product within the specified model,\nevaluated at a given evalutationTime.\nCash-flows prior evaluationTime are not considered.\n\n@param evaluationTime The time on which this products value should be observed.\n@param model The model used to price the product.\n@return The random variable representing the value of the product discounted to evaluation time.\n@throws net.finmath.exception.CalculationException Thrown if the valuation fails, specific cause may be available via the <code>cause()</code> method."
] | [
"Generated the report.",
"Send a request to another handler internal to the server, getting back the response body and response code.\n\n@param request request to send to another handler.\n@return {@link InternalHttpResponse} containing the response code and body.",
"This method finds the start of the next working period.\n\n@param cal current Calendar instance",
"Run the configured crawl. This method blocks until the crawl is done.\n\n@return the CrawlSession once the crawl is done.",
"Tests correctness. Try\nfrom=1000, to=10000\nfrom=200, to=1000\nfrom=16, to=1000\nfrom=1000, to=Integer.MAX_VALUE",
"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",
"This is a convenience method used to add a default set of calendar\nhours to a calendar.\n\n@param day Day for which to add default hours for",
"Read recurring data for a calendar exception.\n\n@param bce MPXJ calendar exception\n@param exception XML calendar exception",
"Adds a function to the end of the token list\n@param function Function which is to be added\n@return The new Token created around function"
] |
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."
] | [
"Generates an organization regarding the parameters.\n\n@param name String\n@return Organization",
"Deletes all outgoing links of specified entity.\n\n@param entity the entity.",
"Use this API to delete nsacl6 resources of given names.",
"Reads data from the SP file.\n\n@return Project File instance",
"Add a dependency to the module.\n\n@param dependency Dependency",
"Log a fatal message.",
"Run through the map and remove any references that have been null'd out by the GC.",
"Classify the contents of a file.\n\n@param filename\nContains the sentence(s) to be classified.\n@return {@link List} of classified List of IN.",
"Converts a string from ISO-8559-1 encoding to UTF-8.\n@param value ISO-8559-1 value\n@return UTF-8 value"
] |
public ProjectFile read(POIFSFileSystem fs) throws MPXJException
{
try
{
ProjectFile projectFile = new ProjectFile();
ProjectConfig config = projectFile.getProjectConfig();
config.setAutoTaskID(false);
config.setAutoTaskUniqueID(false);
config.setAutoResourceID(false);
config.setAutoResourceUniqueID(false);
config.setAutoOutlineLevel(false);
config.setAutoOutlineNumber(false);
config.setAutoWBS(false);
config.setAutoCalendarUniqueID(false);
config.setAutoAssignmentUniqueID(false);
projectFile.getEventManager().addProjectListeners(m_projectListeners);
//
// Open the file system and retrieve the root directory
//
DirectoryEntry root = fs.getRoot();
//
// Retrieve the CompObj data, validate the file format and process
//
CompObj compObj = new CompObj(new DocumentInputStream((DocumentEntry) root.getEntry("\1CompObj")));
ProjectProperties projectProperties = projectFile.getProjectProperties();
projectProperties.setFullApplicationName(compObj.getApplicationName());
projectProperties.setApplicationVersion(compObj.getApplicationVersion());
String format = compObj.getFileFormat();
Class<? extends MPPVariantReader> readerClass = FILE_CLASS_MAP.get(format);
if (readerClass == null)
{
throw new MPXJException(MPXJException.INVALID_FILE + ": " + format);
}
MPPVariantReader reader = readerClass.newInstance();
reader.process(this, projectFile, root);
//
// Update the internal structure. We'll take this opportunity to
// generate outline numbers for the tasks as they don't appear to
// be present in the MPP file.
//
config.setAutoOutlineNumber(true);
projectFile.updateStructure();
config.setAutoOutlineNumber(false);
//
// Perform post-processing to set the summary flag and clean
// up any instances where a task has an empty splits list.
//
for (Task task : projectFile.getTasks())
{
task.setSummary(task.hasChildTasks());
List<DateRange> splits = task.getSplits();
if (splits != null && splits.isEmpty())
{
task.setSplits(null);
}
validationRelations(task);
}
//
// Ensure that the unique ID counters are correct
//
config.updateUniqueCounters();
//
// Add some analytics
//
String projectFilePath = projectFile.getProjectProperties().getProjectFilePath();
if (projectFilePath != null && projectFilePath.startsWith("<>\\"))
{
projectProperties.setFileApplication("Microsoft Project Server");
}
else
{
projectProperties.setFileApplication("Microsoft");
}
projectProperties.setFileType("MPP");
return (projectFile);
}
catch (IOException ex)
{
throw new MPXJException(MPXJException.READ_ERROR, ex);
}
catch (IllegalAccessException ex)
{
throw new MPXJException(MPXJException.READ_ERROR, ex);
}
catch (InstantiationException ex)
{
throw new MPXJException(MPXJException.READ_ERROR, ex);
}
} | [
"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"
] | [
"Stop the drag action.",
"Assigns retention policy with givenID to folder or enterprise.\n@param api the API connection to be used by the created assignment.\n@param policyID id of the assigned retention policy.\n@param assignTo object representing folder or enterprise to assign policy to.\n@return info about created assignment.",
"Replaces the first substring of this CharSequence that matches the given\nregular expression with the given replacement.\n\n@param self a CharSequence\n@param regex the capturing regex\n@param replacement the CharSequence to be substituted for each match\n@return a CharSequence with replaced content\n@throws java.util.regex.PatternSyntaxException if the regular expression's syntax is invalid\n@see String#replaceFirst(String, String)\n@since 1.8.2",
"Gets the index of a ExpandableWrapper within the helper item list based on\nthe index of the ExpandableWrapper.\n\n@param parentPosition The index of the parent in the list of parents\n@return The index of the parent in the merged list of children and parents",
"Initializes OJB for the purposes of this task.\n\n@return The metadata manager used by OJB",
"Determine whether the given property matches this element.\nA property matches this element when property name and this key are equal,\nvalues are equal or this element value is a wildcard.\n@param property the property to check\n@return {@code true} if the property matches",
"slave=true",
"Creates a text box with the given parent and text node assigned.\n@param contblock The parent node (and the containing block in the same time)\n@param n The corresponding text node in the DOM tree.\n@return The new text box.",
"Set the value for a floating point 4x4 matrix.\n@param key name of uniform to set.\n@see #getFloatVec(String)"
] |
protected void convertSearchResults(final Collection<CmsSearchResource> searchResults) {
m_foundResources = new ArrayList<I_CmsSearchResourceBean>();
for (final CmsSearchResource searchResult : searchResults) {
m_foundResources.add(new CmsSearchResourceBean(searchResult, m_cmsObject));
}
} | [
"Converts the search results from CmsSearchResource to CmsSearchResourceBean.\n@param searchResults The collection of search results to transform."
] | [
"Returns the default privacy level for geographic information attached to the user's photos.\n\n@return privacy-level\n@throws FlickrException\n@see com.flickr4java.flickr.Flickr#PRIVACY_LEVEL_NO_FILTER\n@see com.flickr4java.flickr.Flickr#PRIVACY_LEVEL_PUBLIC\n@see com.flickr4java.flickr.Flickr#PRIVACY_LEVEL_FRIENDS\n@see com.flickr4java.flickr.Flickr#PRIVACY_LEVEL_FAMILY\n@see com.flickr4java.flickr.Flickr#PRIVACY_LEVEL_FRIENDS_FAMILY\n@see com.flickr4java.flickr.Flickr#PRIVACY_LEVEL_PRIVATE",
"Sets the whole day flag.\n@param isWholeDay flag, indicating if the event lasts whole days.",
"Allows testsuites to shorten the domain timeout adder",
"Stores the gathered usage statistics about term uses by language to a CSV\nfile.\n\n@param usageStatistics\nthe statistics to store\n@param fileName\nthe name of the file to use",
"Applies the matrices computed from the scene object's\nlinked to the skeleton bones to the current pose.\n@see #applyPose(GVRPose, int)\n@see #setPose(GVRPose)",
"Checks the preconditions for creating a new ParseDateTimeAbstract processor with date format and locale.\n\n@param dateFormat\nthe date format to use\n@param locale\nthe Locale used to parse the date\n@throws NullPointerException\nif dateFormat or locale is null",
"Shrinks the alert message body so that the resulting payload\nmessage fits within the passed expected payload length.\n\nThis method performs best-effort approach, and its behavior\nis unspecified when handling alerts where the payload\nwithout body is already longer than the permitted size, or\nif the break occurs within word.\n\n@param payloadLength the expected max size of the payload\n@param postfix for the truncated body, e.g. \"...\"\n@return this",
"Indicates whether or not an event ID is a duplicate.\n\n<p>This method can be overridden by a subclass in order to provide custom de-duping logic.</p>\n\n@param eventID the event ID.\n@return true if the event is a duplicate; otherwise false.",
"Provide array of String results from inputOutput MFString field named url.\n@array saved in valueDestination"
] |
protected void validateResultsDirectories() {
for (String result : results) {
if (Files.notExists(Paths.get(result))) {
throw new AllureCommandException(String.format("Report directory <%s> not found.", result));
}
}
} | [
"Throws an exception if at least one results directory is missing."
] | [
"Get a list of path transformers for a given address.\n\n@param address the path address\n@param placeholderResolver a placeholder resolver used to resolve children of a placeholder registration\n@return a list of path transformations",
"Create button message key.\n\n@param gallery name\n@return Button message key as String",
"Sets the protocol.\n@param protocol The protocol to be set.",
"Compute a Catmull-Rom spline for RGB values, but with variable knot spacing.\n@param x the input parameter\n@param numKnots the number of knots in the spline\n@param xknots the array of knot x values\n@param yknots the array of knot y values\n@return the spline value",
"Set the current playback position. This method can only be used in situations where the component is\ntied to a single player, and therefore always has a single playback position.\n\nWill cause part of the component to be redrawn if the position has\nchanged. This will be quickly overruled if a player is being monitored, but\ncan be used in other contexts.\n\n@param milliseconds how far into the track has been played\n\n@see #setPlaybackState",
"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.",
"Process the given batch of files and pass the results back to the listener as each file is processed.",
"Return a key to identify the connection descriptor.",
"Creates the actual path to the xml file of the module."
] |
public List<BuildpackInstallation> listBuildpackInstallations(String appName) {
return connection.execute(new BuildpackInstallationList(appName), apiKey);
} | [
"Lists the buildpacks installed on an app\n\n@param appName See {@link #listApps} for a list of apps that can be used."
] | [
"Returns requested content types or default content type if none found.\n\n@return Requested content types or default content type if none found.",
"Retrieves the registar linked to the bus.\nCreates a new registar is not present.\n\n@param bus\n@return",
"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",
"Creates needed textfields for general label in footer groups.\n@param djgroup\n@param jgroup",
"create a broker with given broker info\n\n@param id broker id\n@param brokerInfoString broker info format: <b>creatorId:host:port:autocreated</b>\n@return broker instance with connection config\n@see #getZKString()",
"Create a new path\n\n@param pathName friendly name of path\n@param pathValue path value or regex\n@param requestType path request type. \"GET\", \"POST\", etc",
"Handle an end time change.\n@param event the change event.",
"Use this API to fetch ipset_nsip6_binding resources of given name .",
"Refactor the method into public CXF utility and reuse it from CXF instead copy&paste"
] |
public int getVertices(double[] coords) {
for (int i = 0; i < numVertices; i++) {
Point3d pnt = pointBuffer[vertexPointIndices[i]].pnt;
coords[i * 3 + 0] = pnt.x;
coords[i * 3 + 1] = pnt.y;
coords[i * 3 + 2] = pnt.z;
}
return numVertices;
} | [
"Returns the coordinates of the vertex points of this hull.\n\n@param coords\nreturns the x, y, z coordinates of each vertex. This length of\nthis array must be at least three times the number of\nvertices.\n@return the number of vertices\n@see QuickHull3D#getVertices()\n@see QuickHull3D#getFaces()"
] | [
"to do with XmlId value being strictly of type 'String'",
"Use this API to export sslfipskey.",
"Get HttpResourceModel which matches the HttpMethod of the request.\n\n@param routableDestinations List of ResourceModels.\n@param targetHttpMethod HttpMethod.\n@param requestUri request URI.\n@return RoutableDestination that matches httpMethod that needs to be handled. null if there are no matches.",
"Generates a toString method using concatenation or a StringBuilder.",
"Try to set the value from the provided Json string.\n@param value the value to set.\n@throws Exception thrown if parsing fails.",
"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)",
"remove the user profile with id from the db.",
"Sets up internal data structures and creates a copy of the input matrix.\n\n@param A The input matrix. Not modified.",
"Encodes the given URI fragment with the given encoding.\n@param fragment the fragment to be encoded\n@param encoding the character encoding to encode to\n@return the encoded fragment\n@throws UnsupportedEncodingException when the given encoding parameter is not supported"
] |
public static String readUntilTag(Reader r) throws IOException {
if (!r.ready()) {
return "";
}
StringBuilder b = new StringBuilder();
int c = r.read();
while (c >= 0 && c != '<') {
b.append((char) c);
c = r.read();
}
return b.toString();
} | [
"Reads all text up to next XML tag and returns it as a String.\n\n@return the String of the text read, which may be empty."
] | [
"Computes the inner product of A times A and stores the results in B. The inner product is symmetric and this\nfunction will only store the lower triangle. The value of the upper triangular matrix is undefined.\n\n<p>B = A<sup>T</sup>*A</sup>\n\n@param A (Input) Matrix\n@param B (Output) Storage for output.",
"Prints a few aspects of the TreebankLanguagePack, just for debugging.",
"Sets top and bottom padding for all cells in the row.\n@param padding new padding for top and bottom, ignored if smaller than 0\n@return this to allow chaining",
"Wrap a simple attribute def as list.\n\n@param def the attribute definition\n@return the list attribute def",
"Determine if the start of the buffer matches a fingerprint byte array.\n\n@param buffer bytes from file\n@param fingerprint fingerprint bytes\n@return true if the file matches the fingerprint",
"Determines if the queue identified by the given key can be used as a delayed queue.\n\n@param jedis\nconnection to Redis\n@param key\nthe key that identifies a queue\n@return true if the key already is a delayed queue or is not currently used, false otherwise",
"Get layer style by name.\n\n@param name layer style name\n@return layer style",
"Resets the helper's state.\n\n@return this {@link Searcher} for chaining.",
"Compute the location of the generated file from the given trace file."
] |
@Deprecated
public InputStream getOriginalAsStream() throws IOException, FlickrException {
if (originalFormat != null) {
return getOriginalImageAsStream("_o." + originalFormat);
}
return getOriginalImageAsStream(DEFAULT_ORIGINAL_IMAGE_SUFFIX);
} | [
"Get an InputStream for the original image. Callers must close the stream upon completion.\n\n@deprecated\n@see PhotosInterface#getImageAsStream(Photo, int)\n@return The InputStream\n@throws IOException"
] | [
"Converts a TimeUnit instance to an integer value suitable for\nwriting to an MPX file.\n\n@param recurrence RecurringTask instance\n@return integer value",
"Use this API to add ntpserver.",
"Returns the compact project records for all projects in the workspace.\n\n@param workspace The workspace or organization to find projects in.\n@return Request object",
"Get all parameter keys.\n@return a set of parameter keys",
"Transforms a list of Integer objects to an array of primitive int values.\n\n@param integers\n@return",
"Given a date represented by a Date instance, set the time\ncomponent of the date based on the hours and minutes of the\ntime supplied by the Date instance.\n\n@param date Date instance representing the date\n@param canonicalTime Date instance representing the time of day\n@return new Date instance with the required time set",
"Close off the connection.\n\n@throws SQLException",
"Creates a field map for assignments.\n\n@param props props data",
"Use this API to fetch rewritepolicylabel_rewritepolicy_binding resources of given name ."
] |
public void setRequestType(int pathId, Integer requestType) {
if (requestType == null) {
requestType = Constants.REQUEST_TYPE_GET;
}
PreparedStatement statement = null;
try (Connection sqlConnection = sqlService.getConnection()) {
statement = sqlConnection.prepareStatement(
"UPDATE " + Constants.DB_TABLE_PATH +
" SET " + Constants.PATH_PROFILE_REQUEST_TYPE + " = ?" +
" WHERE " + Constants.GENERIC_ID + " = ?"
);
statement.setInt(1, requestType);
statement.setInt(2, pathId);
statement.executeUpdate();
} catch (SQLException e) {
e.printStackTrace();
} finally {
try {
if (statement != null) {
statement.close();
}
} catch (Exception e) {
}
}
} | [
"Sets the request type for this ID. Defaults to GET\n\n@param pathId ID of path\n@param requestType type of request to service"
] | [
"Verify that the given queues are all valid.\n\n@param queues the given queues",
"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.",
"Convert from a DTO to an internal Spring bean definition.\n\n@param beanDefinitionDto The DTO object.\n@return Returns a Spring bean definition.",
"Try to get the line number associated with the given member.\n\nThe reflection API does not expose such an info and so we need to analyse the bytecode. Unfortunately, it seems there is no way to get this kind of\ninformation for fields. Moreover, the <code>LineNumberTable</code> attribute is just optional, i.e. the compiler is not required to store this\ninformation at all. See also <a href=\"http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html#jvms-4.1\">Java Virtual Machine Specification</a>\n\nImplementation note: it wouldn't be appropriate to add a bytecode scanning dependency just for this functionality, therefore Apache BCEL included in\nOracle JDK 1.5+ and OpenJDK 1.6+ is used. Other JVMs should not crash as we only use it if it's on the classpath and by means of reflection calls.\n\n@param member\n@param resourceLoader\n@return the line number or 0 if it's not possible to find it",
"Returns an unmodifiable view of the specified multi-value map.\n\n@param map the map for which an unmodifiable view is to be returned.\n@return an unmodifiable view of the specified multi-value map.",
"Gets an exception reporting an unexpected XML element.\n\n@param reader a reference to the stream reader.\n@return the constructed {@link javax.xml.stream.XMLStreamException}.",
"Provisions a new app user in an enterprise using Box Developer Edition.\n@param api the API connection to be used by the created user.\n@param name the name of the user.\n@return the created user's info.",
"This produces a string with no compressed segments and all segments of full length,\nwhich is 3 characters for IPv4 segments.",
"Save map to file\n@param map Map to save\n@param file File to save\n@throws IOException I/O error"
] |
public PhotoList<Photo> searchInterestingness(SearchParameters params, int perPage, int page) throws FlickrException {
PhotoList<Photo> photos = new PhotoList<Photo>();
Map<String, Object> parameters = new HashMap<String, Object>();
parameters.put("method", METHOD_GET_INTERESTINGNESS);
parameters.putAll(params.getAsParameters());
if (perPage > 0) {
parameters.put("per_page", Integer.toString(perPage));
}
if (page > 0) {
parameters.put("page", Integer.toString(page));
}
Response response = transport.get(transport.getPath(), parameters, apiKey, sharedSecret);
if (response.isError()) {
throw new FlickrException(response.getErrorCode(), response.getErrorMessage());
}
Element photosElement = response.getPayload();
photos.setPage(photosElement.getAttribute("page"));
photos.setPages(photosElement.getAttribute("pages"));
photos.setPerPage(photosElement.getAttribute("perpage"));
photos.setTotal(photosElement.getAttribute("total"));
NodeList photoNodes = photosElement.getElementsByTagName("photo");
for (int i = 0; i < photoNodes.getLength(); i++) {
Element photoElement = (Element) photoNodes.item(i);
Photo photo = new Photo();
photo.setId(photoElement.getAttribute("id"));
User owner = new User();
owner.setId(photoElement.getAttribute("owner"));
photo.setOwner(owner);
photo.setSecret(photoElement.getAttribute("secret"));
photo.setServer(photoElement.getAttribute("server"));
photo.setFarm(photoElement.getAttribute("farm"));
photo.setTitle(photoElement.getAttribute("title"));
photo.setPublicFlag("1".equals(photoElement.getAttribute("ispublic")));
photo.setFriendFlag("1".equals(photoElement.getAttribute("isfriend")));
photo.setFamilyFlag("1".equals(photoElement.getAttribute("isfamily")));
photos.add(photo);
}
return photos;
} | [
"Search for interesting photos using the Flickr Interestingness algorithm.\n\n@param params\nAny search parameters\n@param perPage\nNumber of items per page\n@param page\nThe page to start on\n@return A PhotoList\n@throws FlickrException"
] | [
"Sets a property on this Javascript object for which the value is a\nJavascript object itself.\n\n@param propertyName The name of the property.\n@param propertyValue The value of the property.",
"Transforms user name and icon size into the rfs image path.\n\n@param name the user name\n@param size IconSize to get icon for\n\n@return the path",
"Return the list of galleries created by a user. Sorted from newest to oldest.\n\n@param userId\nThe user you want to check for\n@param perPage\nNumber of galleries per page\n@param page\nThe page number\n@return gallery\n@throws FlickrException\n\n@see <a hrerf=\"http://www.flickr.com/services/api/flickr.galleries.getList.html\">flickr.galleries.getList</a>",
"Adds all fields declared directly in the object's class to the output\n@return this",
"Get components list for current instance\n@return components",
"Create a HashSet with the given initial values.\n\n@param values The values\n@param <T> The type.",
"Set the view frustum to pick against from the field of view, aspect\nratio and near, far clip planes. The viewpoint of the frustum\nis the center of the scene object the picker is attached to.\nThe view direction is the forward direction of that scene object.\nThe frustum will pick what a camera attached to the scene object\nwith that view frustum would see. If the frustum is not attached\nto a scene object, it defaults to the view frustum of the main camera of the scene.\n\n@param fovy vertical field of view in degrees\n@param aspect aspect ratio (width / height)",
"Generate an opaque pagination token from the supplied PageMetadata.\n\n@param pageMetadata page metadata of the page for which the token should be generated\n@return opaque pagination token",
"Updates the indices in the index buffer from a Java int array.\nAll of the entries of the input int array are copied into\nthe storage for the index buffer. The new indices must be the\nsame size as the old indices - the index buffer size cannot be changed.\n@param data char array containing the new values\n@throws IllegalArgumentException if int array is wrong size"
] |
protected static PatchElement createRollbackElement(final PatchEntry entry) {
final PatchElement patchElement = entry.element;
final String patchId;
final Patch.PatchType patchType = patchElement.getProvider().getPatchType();
if (patchType == Patch.PatchType.CUMULATIVE) {
patchId = entry.getCumulativePatchID();
} else {
patchId = patchElement.getId();
}
return createPatchElement(entry, patchId, entry.rollbackActions);
} | [
"Create a patch element for the rollback patch.\n\n@param entry the entry\n@return the new patch element"
] | [
"Update the value of an embedded node property.\n\n@param executionEngine the {@link GraphDatabaseService} used to run the query\n@param keyValues the columns representing the identifier in the entity owning the embedded\n@param embeddedColumn the column on the embedded node (dot-separated properties)\n@param value the new value for the property",
"Use this API to add spilloverpolicy.",
"Writes one or more String columns as a line to the CsvWriter.\n\n@param columns\nthe columns to write\n@throws IllegalArgumentException\nif columns.length == 0\n@throws IOException\nIf an I/O error occurs\n@throws NullPointerException\nif columns is null",
"Retrieves an existing resource assignment if one is present,\nto prevent duplicate resource assignments being added.\n\n@param resource resource to test for\n@return existing resource assignment",
"Attach a component to this scene object.\n\nEach scene object has a list of components that may\nbe attached to it. Only one component of a particular type\ncan be attached. Components are retrieved based on their type.\n\n@return true if component is attached, false if a component of that class is already attached.\n@param component component to attach.\n@see GVRSceneObject#detachComponent(long)\n@see GVRSceneObject#getComponent(long)",
"Use this API to fetch all the transformpolicylabel resources that are configured on netscaler.",
"Changes the volume of an existing sound.\n@param volume volume value. Should range from 0 (mute) to 1 (max)",
"Returns a CmsSolrQuery representation of this class.\n@param cms the openCms object.\n@return CmsSolrQuery representation of this class.",
"Classify stdin by documents seperated by 3 blank line\n@param readerWriter\n@return boolean reached end of IO\n@throws IOException"
] |
public void writeTo(Writer destination) {
Element eltRuleset = new Element("ruleset");
addAttribute(eltRuleset, "name", name);
addChild(eltRuleset, "description", description);
for (PmdRule pmdRule : rules) {
Element eltRule = new Element("rule");
addAttribute(eltRule, "ref", pmdRule.getRef());
addAttribute(eltRule, "class", pmdRule.getClazz());
addAttribute(eltRule, "message", pmdRule.getMessage());
addAttribute(eltRule, "name", pmdRule.getName());
addAttribute(eltRule, "language", pmdRule.getLanguage());
addChild(eltRule, "priority", String.valueOf(pmdRule.getPriority()));
if (pmdRule.hasProperties()) {
Element ruleProperties = processRuleProperties(pmdRule);
if (ruleProperties.getContentSize() > 0) {
eltRule.addContent(ruleProperties);
}
}
eltRuleset.addContent(eltRule);
}
XMLOutputter serializer = new XMLOutputter(Format.getPrettyFormat());
try {
serializer.output(new Document(eltRuleset), destination);
} catch (IOException e) {
throw new IllegalStateException("An exception occurred while serializing PmdRuleSet.", e);
}
} | [
"Serializes this RuleSet in an XML document.\n\n@param destination The writer to which the XML document shall be written."
] | [
"Returns an input stream that applies the required decompression to the\ngiven input stream.\n\n@param inputStream\nthe input stream with the (possibly compressed) data\n@param compressionType\nthe kind of compression\n@return an input stream with decompressed data\n@throws IOException\nif there was a problem creating the decompression streams",
"Converts an image in RGB mode to BINARY mode\n\n@param img image\n@param threshold grays cale threshold\n@return new MarvinImage instance in BINARY mode",
"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.",
"Sets the current reference definition derived from the current member, and optionally some attributes.\n\n@param template The template\n@param attributes The attributes of the tag\n@exception XDocletException If an error occurs\[email protected] type=\"block\"\[email protected] name=\"attributes\" optional=\"true\" description=\"Attributes of the reference as name-value pairs 'name=value',\nseparated by commas\"\[email protected] name=\"auto-delete\" optional=\"true\" description=\"Whether to automatically delete the\nreferenced object on object deletion\"\[email protected] name=\"auto-retrieve\" optional=\"true\" description=\"Whether to automatically retrieve\nthe referenced object\"\[email protected] name=\"auto-update\" optional=\"true\" description=\"Whether to automatically update the\nreferenced object\"\[email protected] name=\"class-ref\" optional=\"true\" description=\"The fully qualified name of the class\nowning the referenced field\"\[email protected] name=\"database-foreignkey\" optional=\"true\" description=\"Whether a database foreignkey shall be created\"\nvalues=\"true,false\"\[email protected] name=\"documentation\" optional=\"true\" description=\"Documentation on the reference\"\[email protected] name=\"foreignkey\" optional=\"true\" description=\"The fields in the current type used for\nimplementing the reference\"\[email protected] name=\"otm-dependent\" optional=\"true\" description=\"Whether the reference is dependent on otm\"\[email protected] name=\"proxy\" optional=\"true\" description=\"Whether to use a proxy for the reference\"\[email protected] name=\"proxy-prefetching-limit\" optional=\"true\" description=\"Specifies the amount of objects to prefetch\"\[email protected] name=\"refresh\" optional=\"true\" description=\"Whether to automatically refresh the\nreference\"\[email protected] name=\"remote-foreignkey\" optional=\"true\" description=\"The fields in the referenced type\ncorresponding to the local fields (is only used for the table definition)\"",
"Returns true if the string is a valid Java full qualified class name.\n\n@param str the string to be examined\n@return true if str is a valid Java Fqcn",
"Read an optional boolean value form a JSON value.\n@param val the JSON value that should represent the boolean.\n@return the boolean from the JSON or null if reading the boolean fails.",
"Retrieve all References\n\n@param newObj the instance to be loaded or refreshed\n@param cld the ClassDescriptor of the instance\n@param forced if set to true loading is forced even if cld differs.",
"Try to fire a given event on the Browser.\n\n@param eventable the eventable to fire\n@return true iff the event is fired",
"Adds each forbidden substring, checking that it's not null.\n\n@param forbiddenSubStrings\nthe forbidden substrings\n@throws NullPointerException\nif a forbidden substring is null"
] |
public void setEnterpriseText(int index, String value)
{
set(selectField(AssignmentFieldLists.ENTERPRISE_TEXT, index), value);
} | [
"Set an enterprise text value.\n\n@param index text index (1-40)\n@param value text value"
] | [
"Handle value change event on the individual dates list.\n@param event the change event.",
"Attachments are only structurally different if one step has an inline attachment\nand the other step either has no inline attachment or the inline attachment is\ndifferent.",
"Shuts down a standalone server.\n\n@param client the client used to communicate with the server\n@param timeout the graceful shutdown timeout, a value of {@code -1} will wait indefinitely and a value of\n{@code 0} will not attempt a graceful shutdown\n\n@throws IOException if an error occurs communicating with the server",
"Get all views from the list content\n@return list of views currently visible",
"Extract the parent WBS from a WBS.\n\n@param wbs current WBS\n@return parent WBS",
"Returns all the retention policies with specified filters.\n@param name a name to filter the retention policies by. A trailing partial match search is performed.\nSet to null if no name filtering is required.\n@param type a policy type to filter the retention policies by. Set to null if no type filtering is required.\n@param userID a user id to filter the retention policies by. Set to null if no type filtering is required.\n@param limit the limit of items per single response. The default value is 100.\n@param api the API connection to be used by the resource.\n@param fields the fields to retrieve.\n@return an iterable with all the retention policies met search conditions.",
"Adds a filter definition to this project file.\n\n@param filter filter definition",
"Use this API to delete appfwlearningdata resources.",
"Search for the second entry in the second database. Use this method for databases configured with no duplicates.\n\n@param second second key (value for first).\n@return null if no entry found, otherwise the value."
] |
public double[] getMoneynessAsOffsets() {
DoubleStream moneyness = getGridNodesPerMoneyness().keySet().stream().mapToDouble(Integer::doubleValue);
if(quotingConvention == QuotingConvention.PAYERVOLATILITYLOGNORMAL) {
moneyness = moneyness.map(new DoubleUnaryOperator() {
@Override
public double applyAsDouble(double x) {
return x * 0.01;
}
});
} else if(quotingConvention == QuotingConvention.RECEIVERPRICE) {
moneyness = moneyness.map(new DoubleUnaryOperator() {
@Override
public double applyAsDouble(double x) {
return - x * 0.0001;
}
});
} else {
moneyness = moneyness.map(new DoubleUnaryOperator() {
@Override
public double applyAsDouble(double x) {
return x * 0.0001;
}
});
}
return moneyness.toArray();
} | [
"Return all levels of moneyness for which data exists.\nMoneyness is returned as actual difference strike - par swap rate.\n\n@return The levels of moneyness as difference of strike to par swap rate."
] | [
"Template-and-Hook method for generating the url required by the jdbc driver\nto allow for modifying an existing database.",
"Returns the name of the current member which is the name in the case of a field, or the property name for an\naccessor method.\n\n@return The member name\n@exception XDocletException if an error occurs",
"Returns the map from resourcetype names to default timestamp modes.\n@return the map from resourcetype names to default timestamp modes.",
"Loops through all resource roots that have been made available transitively via Class-Path entries, and\nadds them to the list of roots to be processed.",
"Retrieves the cost rate table entry active on a given date.\n\n@param date target date\n@return cost rate table entry",
"Starts the loading process and creates a timer that sets of the callback after a given tiime if it hasn't already been triggered.\n\n@param timeout number of milliseconds after which the callback should be called if it hasn't already been",
"get the default profile\n\n@return representation of default profile\n@throws Exception exception",
"Samples a batch of indices in the range [0, numExamples) without replacement.",
"Samples with replacement from a collection\n\n@param c\nThe collection to be sampled from\n@param n\nThe number of samples to take\n@return a new collection with the sample"
] |
public boolean contains(String column) {
for ( String columnName : columnNames ) {
if ( columnName.equals( column ) ) {
return true;
}
}
return false;
} | [
"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"
] | [
"Returns the getter method for field on an object.\n\n@param object\nthe object\n@param fieldName\nthe field name\n@return the getter associated with the field on the object\n@throws NullPointerException\nif object or fieldName is null\n@throws SuperCsvReflectionException\nif the getter doesn't exist or is not visible",
"Use this API to reset appfwlearningdata.",
"Check if the print has not been asked to stop taking new jobs.\n\n@return true if it's OK to take new jobs.",
"Sets the right padding character for all cells in the row.\n@param paddingRightChar new padding character, ignored if null\n@return this to allow chaining",
"Run the OnInvariantViolation plugins when an Invariant is violated. Invariant are checked\nwhen the state machine is updated that is when the dom is changed after a click on a\nclickable. When a invariant fails this kind of plugins are executed. Warning the session is\nnot a clone, changing the session can cause strange behaviour of Crawljax.\n\n@param invariant the failed invariants\n@param context the current {@link CrawlerContext} for this crawler.",
"Removes a named property from the object.\n\nIf the property is not found, no action is taken.\n\n@param name the name of the property",
"Writes this IIMFile to writer.\n\n@param writer\nwriter to write to\n@throws IOException\nif file can't be written to",
"Create a new server group for a profile\n\n@param model\n@param profileId\n@return\n@throws Exception",
"Use this API to count linkset_interface_binding resources configued on NetScaler."
] |
@Override
public final double getDouble(final String key) {
Double result = optDouble(key);
if (result == null) {
throw new ObjectMissingException(this, key);
}
return result;
} | [
"Get a property as a double or throw an exception.\n\n@param key the property name"
] | [
"Use the universal project reader to open the file.\nThrow an exception if we can't determine the file type.\n\n@param inputFile file name\n@return ProjectFile instance",
"List all the environment variables for an app.\n@param appName App name. See {@link #listApps} for a list of apps that can be used.\n@return map of config vars",
"Emit a string event with parameters and force all listener to be called synchronously.\n\n@param event\nthe target event\n@param args\nthe arguments passed in\n@see #emit(String, Object...)",
"Fixed length fancy formatting for doubles. If possible decimal notation is used. If all the significant digits\ncan't be shown then it will switch to exponential notation. If not all the space is needed then it will\nbe filled in to ensure it has the specified length.\n\n@param value value being formatted\n@param format default format before exponential\n@param length Maximum number of characters it can take.\n@param significant Number of significant decimal digits to show at a minimum.\n@return formatted string",
"Use this API to disable nsfeature.",
"When we execute a single statement we only need the corresponding Row with the result.\n\n@param results a list of {@link StatementResult}\n@return the result of a single query",
"Processes one of the menu responses that jointly constitute the track metadata, updating our\nfields accordingly.\n\n@param item the menu response to be considered",
"Use this API to delete gslbsite of given name.",
"Estimate excluded volume fraction by monte carlo method\n@return excluded volume fraction"
] |
public synchronized Object[] getIds() {
String[] keys = getAllKeys();
int size = keys.length + indexedProps.size();
Object[] res = new Object[size];
System.arraycopy(keys, 0, res, 0, keys.length);
int i = keys.length;
// now add all indexed properties
for (Object index : indexedProps.keySet()) {
res[i++] = index;
}
return res;
} | [
"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"
] | [
"Set a friendly name for a client\n\n@param profileId profileId of the client\n@param clientUUID UUID of the client\n@param friendlyName friendly name of the client\n@return return Client object or null\n@throws Exception exception",
"Ensure that a tool object is valid for creation. The API requires certain fields to be filled out.\nThrows an IllegalArgumentException if the conditions are not met.\n@param tool The external tool object we are trying to create",
"Unlocks a file.",
"Returns true if the query result has at least one row.",
"Get the server redirects belonging to a server group\n\n@param profileId ID of profile\n@param serverGroupId ID of server group\n@return Collection of ServerRedirect for a server group",
"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",
"Use this API to save nsconfig.",
"Visits a method instruction. A method instruction is an instruction that\ninvokes a method.\n\n@param opcode\nthe opcode of the type instruction to be visited. This opcode\nis either INVOKEVIRTUAL, INVOKESPECIAL, INVOKESTATIC or\nINVOKEINTERFACE.\n@param owner\nthe internal name of the method's owner class (see\n{@link Type#getInternalName() getInternalName}).\n@param name\nthe method's name.\n@param desc\nthe method's descriptor (see {@link Type Type}).\n@param itf\nif the method's owner class is an interface.",
"Return true if the two connections seem to one one connection under the covers."
] |
@Override
public String getText() {
String retType = AstToTextHelper.getClassText(returnType);
String exceptionTypes = AstToTextHelper.getThrowsClauseText(exceptions);
String parms = AstToTextHelper.getParametersText(parameters);
return AstToTextHelper.getModifiersText(modifiers) + " " + retType + " " + name + "(" + parms + ") " + exceptionTypes + " { ... }";
} | [
"Provides a nicely formatted string of the method definition. For simplicity, generic types on some of the elements\nare not displayed.\n@return\nstring form of node with some generic elements suppressed"
] | [
"Attempts shared acquisition with a max wait time.\n@param permit - the permit Integer for this operation. May not be {@code null}.\n@param timeout - the time value to wait for acquiring the lock\n@param unit - See {@code TimeUnit} for valid values\n@return {@code boolean} true on success.",
"Populate a resource assignment.\n\n@param record MPX record\n@param assignment resource assignment\n@throws MPXJException",
"Scroll to the next page. To process the scrolling by pages LayoutScroller must be constructed\nwith a pageSize greater than zero.\n@return the new current item after the scrolling processed.",
"Writes data to delegate stream if it has been set.\n\n@param data the data to write",
"Performs the transformation.\n\n@return True if the file was modified.",
"Switches to the next tab.",
"Parse an extended attribute date value.\n\n@param value string representation\n@return date value",
"Extracts a set of interceptor bindings from a collection of annotations.\n@param beanManager\n@param annotations\n@return",
"Load the InstalledIdentity configuration based on the module.path\n\n@param installedImage the installed image\n@param productConfig the product config\n@param moduleRoots the module roots\n@param bundleRoots the bundle roots\n@return the available layers\n@throws IOException"
] |
public String getDependencyJsonModel() throws IOException {
final Artifact artifact = DataModelFactory.createArtifact("","","","","","","");
return JsonUtils.serialize(DataModelFactory.createDependency(artifact, Scope.COMPILE));
} | [
"Returns an empty model of a Dependency in Json\n\n@return String\n@throws IOException"
] | [
"Construct new path by replacing file directory part. No\nfiles are actually modified.\n@param file path to move\n@param target new path directory",
"Abort the daemon\n\n@param error the error causing the abortion",
"Use this API to flush nssimpleacl.",
"Visit this and all child nodes.\n\n@param visitor The visitor to use.",
"Makes object obj persistent in the underlying persistence system.\nE.G. by INSERT INTO ... or UPDATE ... in an RDBMS.\nThe ObjectModification parameter can be used to determine whether INSERT or update is to be used.\nThis functionality is typically called from transaction managers, that\ntrack which objects have to be stored. If the object is an unmaterialized\nproxy the method return immediately.",
"Adds title and subtitle to the TitleBand when it applies.\nIf title is not present then subtitle will be ignored",
"Create a new Date. To the last day.",
"Creates the server bootstrap.",
"Use this API to fetch statistics of appfwprofile_stats resource of given name ."
] |
private void readHeader(InputStream is) throws IOException
{
byte[] header = new byte[20];
is.read(header);
m_offset += 20;
SynchroLogger.log("HEADER", header);
} | [
"Read the file header data.\n\n@param is input stream"
] | [
"Retrieve a finish date.\n\n@param data byte array\n@param offset offset into byte array\n@return finish date",
"Convenience method dispatches this object to the source appender, which\nwill result in the custom message being appended to the new file.\n\n@param message\nThe custom logging message to be appended.",
"Use this API to disable Interface of given name.",
"Used by the slave host when creating the host info dmr sent across to the DC during the registration process\n\n@param ignoreUnaffectedServerGroups whether the slave host is set up to ignore config for server groups it does not have servers for\n@param hostModel the resource containing the host model\n@param model the dmr sent across to theDC\n@return the modified dmr",
"This method extracts task data from an MSPDI file.\n\n@param project Root node of the MSPDI file",
"Returns the value of the identified field as a Date.\nTime fields returned from an FQL query are expressed in terms of seconds since midnight, January 1, 1970 UTC.\n@param fieldName the name of the field\n@return the value of the field as a Date\n@throws FqlException if the field's value cannot be expressed as a long value from which a Date object can be constructed.",
"Read an optional Date value form a JSON value.\n@param val the JSON value that should represent the Date as long value in a string.\n@return the Date from the JSON or null if reading the date fails.",
"Performs a transpose across block sub-matrices. Reduces\nthe number of cache misses on larger matrices.\n\n*NOTE* If this is beneficial is highly dependent on the computer it is run on. e.g:\n- Q6600 Almost twice as fast as standard.\n- Pentium-M Same speed and some times a bit slower than standard.\n\n@param A Original matrix. Not modified.\n@param A_tran Transposed matrix. Modified.\n@param blockLength Length of a block.",
"Checks if a parameter exists. If it exists, it is updated. If it doesn't, it is created. Only works for parameters which key is\nunique. Will create a transaction on the given entity manager."
] |
public static void startAndWait(PersistentNode node, int maxWaitSec) {
node.start();
int waitTime = 0;
try {
while (node.waitForInitialCreate(1, TimeUnit.SECONDS) == false) {
waitTime += 1;
log.info("Waited " + waitTime + " sec for ephemeral node to be created");
if (waitTime > maxWaitSec) {
throw new IllegalStateException("Failed to create ephemeral node");
}
}
} catch (InterruptedException e) {
throw new IllegalStateException(e);
}
} | [
"Starts the ephemeral node and waits for it to be created\n\n@param node Node to start\n@param maxWaitSec Maximum time in seconds to wait"
] | [
"Get a property as a object or throw exception.\n\n@param key the property name",
"Retrieve all References\n\n@param newObj the instance to be loaded or refreshed\n@param cld the ClassDescriptor of the instance\n@param forced if set to true loading is forced even if cld differs.",
"Post-configure retreival of server engine.",
"Returns the names of the involved fields when post processing.\n\n@return the names of the involved fields",
"Use this API to fetch lbvserver_cachepolicy_binding resources of given name .",
"This method allows nested tasks to be added, with the WBS being\ncompleted automatically.\n\n@return new task",
"Creates a project shared with the given team.\n\nReturns the full record of the newly created project.\n\n@param team The team to create the project in.\n@return Request object",
"Load the avatar base model\n@param avatarResource resource with avatar model",
"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"
] |
public InputStream getStream(String url, RasterLayer layer) throws IOException {
if (layer instanceof ProxyLayerSupport) {
ProxyLayerSupport proxyLayer = (ProxyLayerSupport) layer;
if (proxyLayer.isUseCache() && null != cacheManagerService) {
Object cachedObject = cacheManagerService.get(proxyLayer, CacheCategory.RASTER, url);
if (null != cachedObject) {
testRecorder.record(TEST_RECORDER_GROUP, TEST_RECORDER_GET_FROM_CACHE);
return new ByteArrayInputStream((byte[]) cachedObject);
} else {
testRecorder.record(TEST_RECORDER_GROUP, TEST_RECORDER_PUT_IN_CACHE);
InputStream stream = super.getStream(url, proxyLayer);
ByteArrayOutputStream os = new ByteArrayOutputStream();
int b;
while ((b = stream.read()) >= 0) {
os.write(b);
}
cacheManagerService.put(proxyLayer, CacheCategory.RASTER, url, os.toByteArray(),
getLayerEnvelope(proxyLayer));
return new ByteArrayInputStream((byte[]) os.toByteArray());
}
}
}
return super.getStream(url, layer);
} | [
"Get the contents from the request URL.\n\n@param url URL to get the response from\n@param layer the raster layer\n@return {@link InputStream} with the content\n@throws IOException cannot get content"
] | [
"Adds title and subtitle to the TitleBand when it applies.\nIf title is not present then subtitle will be ignored",
"Prints a report about the statistics stored in the given data object.\n\n@param usageStatistics\nthe statistics object to print\n@param entityLabel\nthe label to use to refer to this kind of entities (\"items\" or\n\"properties\")",
"Use this API to delete snmpmanager.",
"Used by Pipeline jobs only",
"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",
"Use this API to fetch all the rnatparam resources that are configured on netscaler.",
"Convert a Identification to a By used in WebDriver Drivers.\n\n@return the correct By specification of the current Identification.",
"Read calendar data from a PEP file.",
"Returns a set of the distinct colours used in this image.\n\n@return the set of distinct Colors"
] |
private RgbaColor withHsl(int index, float value) {
float[] HSL = convertToHsl();
HSL[index] = value;
return RgbaColor.fromHsl(HSL);
} | [
"Returns a new color with a new value of the specified HSL\ncomponent."
] | [
"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",
"Apply the matching client UUID for the request\n\n@param httpServletRequest\n@param history",
"Build the tree of joins for the given criteria",
"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 recursive helper function to actually do the type-safe checking\nof assignability.",
"Re-reads the given entity, refreshing any properties updated on the server-side during insert or update.",
"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.",
"Cancels all requests still waiting for a response.\n\n@return this {@link Searcher} for chaining.",
"Loads the asset referenced by the file name\nunder the owner of this component.\nIf this component was constructed to replace the scene with\nthe asset, the scene will contain only the owner of this\ncomponent upon return. Otherwise, the loaded asset is a\nchild of this component's owner.\n\nLoading the asset is performed in a separate thread.\nThis function returns before the asset has finished loading.\nIAssetEvents are emitted to the event listener on the context.\n\n@param scene scene to add the model to, null is permissible\n@return always true"
] |
private InputStream runSparqlQuery(String query) throws IOException {
try {
String queryString = "query=" + URLEncoder.encode(query, "UTF-8")
+ "&format=json";
URL url = new URL("https://query.wikidata.org/sparql?"
+ queryString);
HttpURLConnection connection = (HttpURLConnection) url
.openConnection();
connection.setRequestMethod("GET");
return connection.getInputStream();
} catch (UnsupportedEncodingException | MalformedURLException e) {
throw new RuntimeException(e.getMessage(), e);
}
} | [
"Executes a given SPARQL query and returns a stream with the result in\nJSON format.\n\n@param query\n@return\n@throws IOException"
] | [
"Returns a raw handle to the SQLite database connection. Do not close!\n@param context A context, which is used to (when needed) set up a connection to the database\n@return The single, unique connection to the database, as is (also) used by our Cupboard instance",
"Creates a field map for relations.\n\n@param props props data",
"Check if values in the column \"property\" are written to the bundle descriptor.\n@param property the property id of the table column.\n@return a flag, indicating if values of the table column are stored to the bundle descriptor.",
"Ensures that the given collection descriptor has the collection-class property if necessary.\n\n@param collDef The collection descriptor\n@param checkLevel The current check level (this constraint is checked in basic (partly) and strict)\n@exception ConstraintException If collection-class is given for an array or if no collection-class is given but required",
"Register the DAO with the cache. This will allow folks to build a DAO externally and then register so it can be\nused internally as necessary.\n\n<p>\n<b>NOTE:</b> By default this registers the DAO to be associated with the class that it uses. If you need to\nregister multiple dao's that use different {@link DatabaseTableConfig}s then you should use\n{@link #registerDaoWithTableConfig(ConnectionSource, Dao)}.\n</p>\n\n<p>\n<b>NOTE:</b> You should maybe use the {@link DatabaseTable#daoClass()} and have the DaoManager construct the DAO\nif possible.\n</p>",
"Set the payload to the fileModel of the given instance even though the variable is not directly referencing it. This is mainly to simplify the\ncreation of the rule, when the FileModel itself is not being iterated but just a model referencing it.",
"Calculate the first argument raised to the power of the second.\nThis method only supports non-negative powers.\n@param value The number to be raised.\n@param power The exponent (must be positive).\n@return {@code value} raised to {@code power}.",
"A convenience method for creating an immutable sorted set.\n\n@param self a SortedSet\n@return an immutable SortedSet\n@see java.util.Collections#unmodifiableSortedSet(java.util.SortedSet)\n@since 1.0",
"The entity instance is not in the session cache\n\nCopied from Loader#instanceNotYetLoaded"
] |
public static void checkOperatorIsValid(int operatorCode) {
switch (operatorCode) {
case OPERATOR_LT:
case OPERATOR_LE:
case OPERATOR_EQ:
case OPERATOR_NE:
case OPERATOR_GE:
case OPERATOR_GT:
case OPERATOR_UNKNOWN:
return;
default:
throw new IllegalStateException(String.format(Locale.US, ERROR_INVALID_CODE, operatorCode));
}
} | [
"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."
] | [
"Returns a TypeConverter for a given class.\n\n@param cls The class for which the TypeConverter should be fetched.",
"Returns an unmodifiable set containing the given elements.\n\n@param ts the elements from which to create a set\n@param <T> the type of the element in the set\n@return an unmodifiable set containing the given elements or {@code null} in case the given element array is\n{@code null}.",
"Use this API to add nsacl6.",
"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",
"Find the earliest start time of the specified methods.\n@param methods A list of test methods.\n@return The earliest start time.",
"Sets the Base Calendar field indicates which calendar is the base calendar\nfor a resource calendar. The list includes the three built-in calendars,\nas well as any new base calendars you have created in the Change Working\nTime dialog box.\n\n@param val calendar name",
"Read all of the fields information from the configuration file.",
"Creates SLD rules for each old style.",
"Prints the data for a single class to the given stream. This will be a\nsingle line in CSV.\n\n@param out\nthe output to write to\n@param classRecord\nthe class record to write\n@param entityIdValue\nthe item id that this class record belongs to"
] |
private Set<QualifierInstance> getRequiredQualifiers(EnhancedAnnotatedParameter<?, ? super X> enhancedDisposedParameter) {
Set<Annotation> disposedParameterQualifiers = enhancedDisposedParameter.getMetaAnnotations(Qualifier.class);
if (disposedParameterQualifiers.isEmpty()) {
disposedParameterQualifiers = Collections.<Annotation> singleton(Default.Literal.INSTANCE);
}
return beanManager.getServices().get(MetaAnnotationStore.class).getQualifierInstances(disposedParameterQualifiers);
} | [
"A disposer method is bound to a producer if the producer is assignable to the disposed parameter.\n\n@param enhancedDisposedParameter\n@return the set of required qualifiers for the given disposed parameter"
] | [
"Returns an iterable containing the items in this folder and specifies which child fields to retrieve from the\nAPI.\n\n@param fields the fields to retrieve.\n@return an iterable containing the items in this folder.",
"Remove all the existing links of the DeclarationBinder.\n\n@param declarationBinderRef the ServiceReference<DeclarationBinder> of the DeclarationBinder",
"Send an event to other applications\n\n@param context context in which to send the broadcast\n@param event event to send",
"Read relation data.",
"This method extracts resource data from a Phoenix file.\n\n@param phoenixProject parent node for resources",
"Remove any device announcements that are so old that the device seems to have gone away.",
"Retrieve timephased baseline work. Note that index 0 represents \"Baseline\",\nindex 1 represents \"Baseline1\" and so on.\n\n@param index baseline index\n@return timephased work, or null if no baseline is present",
"Adds custom header to request\n\n@param key\n@param value",
"If X == null then the solution is written into B. Otherwise the solution is copied\nfrom B into X."
] |
@Override
public ProxyAuthenticationMethod getMethod() {
switch (authenticationMethod) {
case BASIC:
return ProxyAuthenticationMethod.BASIC;
case DIGEST:
return ProxyAuthenticationMethod.DIGEST;
case URL:
return ProxyAuthenticationMethod.URL;
default:
return null;
}
} | [
"Get the authentication method to use.\n\n@return authentication method"
] | [
"Reads outline code custom field values and populates container.",
"Read JdbcConnectionDescriptors from the given repository file.\n\n@see #mergeConnectionRepository",
"Print the class's operations m",
"Returns 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.\n\n@param ptbText A String in PTB3-escaped form\n@return An approximation to the original String",
"Validates a favorite entry.\n\n<p>If the favorite entry references a resource or project that can't be read, this will return false.\n\n@param entry the favorite entry\n@return the",
"Inserts the currently contained data objects into the database.\n\n@param platform The (connected) database platform for inserting data\n@param model The database model\n@param batchSize The batch size; use 1 for not using batch mode",
"Accesses a property from the DB configuration for the selected DB.\n\n@param name the name of the property\n@return the value of the property",
"Marshal the assertion as a JSON object.\n\n@param assertion the assertion to marshal",
"Utility method used to convert an arbitrary Number into an Integer.\n\n@param value Number instance\n@return Integer instance"
] |
public void addChannel(String boneName, GVRAnimationChannel channel)
{
int boneId = mSkeleton.getBoneIndex(boneName);
if (boneId >= 0)
{
mBoneChannels[boneId] = channel;
mSkeleton.setBoneOptions(boneId, GVRSkeleton.BONE_ANIMATE);
Log.d("BONE", "Adding animation channel %d %s ", boneId, boneName);
}
} | [
"Add a channel to the animation to animate the named bone.\n@param boneName name of bone to animate.\n@param channel The animation channel."
] | [
"MOVED INSIDE ExpressionUtils\n\nprotected JRDesignExpression getExpressionForConditionalStyle(ConditionalStyle condition, String columExpression) {\nString fieldsMap = \"((\"+DJDefaultScriptlet.class.getName() + \")$P{REPORT_SCRIPTLET}).getCurrentFields()\";\nString parametersMap = \"((\"+DJDefaultScriptlet.class.getName() + \")$P{REPORT_SCRIPTLET}).getCurrentParams()\";\nString variablesMap = \"((\"+DJDefaultScriptlet.class.getName() + \")$P{REPORT_SCRIPTLET}).getCurrentVariables()\";\n\nString evalMethodParams = fieldsMap +\", \" + variablesMap + \", \" + parametersMap + \", \" + columExpression;\n\nString text = \"((\"+ConditionStyleExpression.class.getName()+\")$P{\" + JRParameter.REPORT_PARAMETERS_MAP + \"}.get(\\\"\"+condition.getName()+\"\\\")).\"+CustomExpression.EVAL_METHOD_NAME+\"(\"+evalMethodParams+\")\";\nJRDesignExpression expression = new JRDesignExpression();\nexpression.setValueClass(Boolean.class);\nexpression.setText(text);\nreturn expression;\n}",
"This method searches in the Component Management Service, so given an\nagent name returns its IExternalAccess\n\n@param agent_name\nThe name of the agent in the platform\n@return The IComponentIdentifier of the agent in the platform",
"Obtains a Ethiopic local date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the Ethiopic local date-time, not null\n@throws DateTimeException if unable to create the date-time",
"Verify JUnit presence and version.",
"Send Identify Node message to the controller.\n@param nodeId the nodeId of the node to identify\n@throws SerialInterfaceException when timing out or getting an invalid response.",
"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",
"Finds the most recent dump of the given type that is actually available.\n\n@param dumpContentType\nthe type of the dump to look for\n@return most recent main dump or null if no such dump exists",
"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",
"Use this API to update autoscaleaction resources."
] |
public static int compare(double a, double b, double delta) {
if (equals(a, b, delta)) {
return 0;
}
return Double.compare(a, b);
} | [
"Compares two double values up to some delta.\n\n@param a\n@param b\n@param delta\n@return The value 0 if a equals b, a value greater than 0 if if a > b, and a value less than 0 if a < b."
] | [
"Parses a record containing hours and add them to a container.\n\n@param ranges hours container\n@param hoursRecord hours record",
"Configures the player whose current track waveforms and status will automatically be reflected. Whenever a new\ntrack is loaded on that player, the waveform and metadata will be updated, and the current playback position and\nstate of the player will be reflected by the component.\n\n@param player the player number to monitor, or zero if monitoring should stop",
"Creates a scatter query from the given user query\n\n@param query the user's query.\n@param numSplits the number of splits to create.",
"This function looks for files with the \"wrong\" replica type in their name, and\nif it finds any, renames them.\n\nThose files may have ended up on this server either because:\n- 1. We restored them from another server, where they were named according to\nanother replica type. Or,\n- 2. The {@link voldemort.store.readonly.mr.azkaban.VoldemortBuildAndPushJob}\nand the {@link voldemort.store.readonly.fetcher.HdfsFetcher} are\noperating in 'build.primary.replicas.only' mode, so they only ever built\nand fetched replica 0 of any given file.\n\nNote: This is an implementation detail of the READONLY_V2 naming scheme, and should\nnot be used outside of that scope.\n\n@param masterPartitionId partition ID of the \"primary replica\"\n@param correctReplicaType replica number which should be found on the current\nnode for the provided masterPartitionId.",
"Get photos from the user's contacts.\n\nThis method requires authentication with 'read' permission.\n\n@param count\nThe number of photos to return\n@param justFriends\nSet to true to only show friends photos\n@param singlePhoto\nSet to true to get a single photo\n@param includeSelf\nSet to true to include self\n@return The Collection of photos\n@throws FlickrException",
"Inserts a Parcelable value into the mapping of the underlying Bundle, replacing any existing\nvalue for the given key. Either key or value may be null.\n\n@param key a String, or null\n@param value a Parcelable object, or null\n@return this bundler instance to chain method calls",
"Add the list with given bundles to the \"Import-Package\" main attribute.\n\n@param importedPackages The list of all packages to add.",
"Sets the position of a UIObject",
"Show only the given channel.\n@param channels The channels to show"
] |
public static base_response add(nitro_service client, sslocspresponder resource) throws Exception {
sslocspresponder addresource = new sslocspresponder();
addresource.name = resource.name;
addresource.url = resource.url;
addresource.cache = resource.cache;
addresource.cachetimeout = resource.cachetimeout;
addresource.batchingdepth = resource.batchingdepth;
addresource.batchingdelay = resource.batchingdelay;
addresource.resptimeout = resource.resptimeout;
addresource.respondercert = resource.respondercert;
addresource.trustresponder = resource.trustresponder;
addresource.producedattimeskew = resource.producedattimeskew;
addresource.signingcert = resource.signingcert;
addresource.usenonce = resource.usenonce;
addresource.insertclientcert = resource.insertclientcert;
return addresource.add_resource(client);
} | [
"Use this API to add sslocspresponder."
] | [
"Return the Payload attached to the current active bucket for |test|.\nAlways returns a payload so the client doesn't crash on a malformed\ntest definition.\n\n@param testName test name\n@return pay load attached to the current active bucket\n@deprecated Use {@link #getPayload(String, Bucket)} instead",
"Returns an iterable containing the items in this folder sorted by name and direction.\n@param sort the field to sort by, can be set as `name`, `id`, and `date`.\n@param direction the direction to display the item results.\n@param fields the fields to retrieve.\n@return an iterable containing the items in this folder.",
"Add the list with given bundles to the \"Export-Package\" main attribute.\n\n@param exportedPackages The list of all packages to add.",
"Returns the command line options to be used for scalaxb, excluding the\ninput file names.",
"Handles Multi Channel Encapsulation message. Decapsulates\nan Application Command message and handles it using the right\nendpoint.\n@param serialMessage the serial message to process.\n@param offset the offset at which to start procesing.",
"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 []",
"This method extracts project properties from a Phoenix file.\n\n@param phoenixSettings Phoenix settings\n@param storepoint Current storepoint",
"Lift a Java Callable to a Scala Function0\n\n@param f the function to lift\n\n@returns the Scala function",
"Use this API to flush cachecontentgroup."
] |
public static String wordShape(String inStr, int wordShaper, Collection<String> knownLCWords) {
// this first bit is for backwards compatibility with how things were first
// implemented, where the word shaper name encodes whether to useLC.
// If the shaper is in the old compatibility list, then a specified
// list of knownLCwords is ignored
if (knownLCWords != null && dontUseLC(wordShaper)) {
knownLCWords = null;
}
switch (wordShaper) {
case NOWORDSHAPE:
return inStr;
case WORDSHAPEDAN1:
return wordShapeDan1(inStr);
case WORDSHAPECHRIS1:
return wordShapeChris1(inStr);
case WORDSHAPEDAN2:
return wordShapeDan2(inStr, knownLCWords);
case WORDSHAPEDAN2USELC:
return wordShapeDan2(inStr, knownLCWords);
case WORDSHAPEDAN2BIO:
return wordShapeDan2Bio(inStr, knownLCWords);
case WORDSHAPEDAN2BIOUSELC:
return wordShapeDan2Bio(inStr, knownLCWords);
case WORDSHAPEJENNY1:
return wordShapeJenny1(inStr, knownLCWords);
case WORDSHAPEJENNY1USELC:
return wordShapeJenny1(inStr, knownLCWords);
case WORDSHAPECHRIS2:
return wordShapeChris2(inStr, false, knownLCWords);
case WORDSHAPECHRIS2USELC:
return wordShapeChris2(inStr, false, knownLCWords);
case WORDSHAPECHRIS3:
return wordShapeChris2(inStr, true, knownLCWords);
case WORDSHAPECHRIS3USELC:
return wordShapeChris2(inStr, true, knownLCWords);
case WORDSHAPECHRIS4:
return wordShapeChris4(inStr, false, knownLCWords);
case WORDSHAPEDIGITS:
return wordShapeDigits(inStr);
default:
throw new IllegalStateException("Bad WordShapeClassifier");
}
} | [
"Specify the string and the int identifying which word shaper to\nuse and this returns the result of using that wordshaper on the String.\n\n@param inStr String to calculate word shape of\n@param wordShaper Constant for which shaping formula to use\n@param knownLCWords A Collection of known lowercase words, which some shapers use\nto decide the class of capitalized words.\n<i>Note: while this code works with any Collection, you should\nprovide a Set for decent performance.</i> If this parameter is\nnull or empty, then this option is not used (capitalized words\nare treated the same, regardless of whether the lowercased\nversion of the String has been seen).\n@return The wordshape String"
] | [
"Apply the AAD algorithm to this very variable\n\nNOTE: in this case it is indeed correct to assume that the output dimension is \"one\"\nmeaning that there is only one {@link RandomVariableUniqueVariable} as an output.\n\n@return gradient for the built up function",
"Gets the value for the key.\n\n@param key the key to check for the value\n\n@return the value or an empty collection if no values were set",
"Create a random video.\n\n@return random video.",
"Use this API to fetch linkset_interface_binding resources of given name .",
"Sets the model that the handling works on.\n\n@param databaseModel The database model\n@param objModel The object model",
"Read the relationships for an individual GanttProject task.\n\n@param gpTask GanttProject task",
"Set the color for the statusBar\n\n@param statusBarColor",
"Returns a flag, indicating if the current event is a multi-day event.\nThe method is only called if the single event has an explicitely set end date\nor an explicitely changed whole day option.\n\n@return a flag, indicating if the current event takes lasts over more than one day.",
"Get the text value for the specified element. If the element is null, or the element's body is empty then this method will return null.\n\n@param element\nThe Element\n@return The value String or null"
] |
private String getHostHeaderForHost(String hostName) {
List<ServerRedirect> servers = serverRedirectService.tableServers(requestInformation.get().client.getId());
for (ServerRedirect server : servers) {
if (server.getSrcUrl().compareTo(hostName) == 0) {
String hostHeader = server.getHostHeader();
if (hostHeader == null || hostHeader.length() == 0) {
return null;
}
return hostHeader;
}
}
return null;
} | [
"Obtain host header value for a hostname\n\n@param hostName\n@return"
] | [
"Processes the template for all column definitions of the current table.\n\n@param template The template\n@param attributes The attributes of the tag\n@exception XDocletException if an error occurs\[email protected] type=\"block\"",
"Acquire the exclusive lock, with a max wait timeout to acquire.\n@param permit - the permit Integer for this operation. May not be {@code null}.\n@param timeout - the timeout scalar quantity.\n@param unit - see {@code TimeUnit} for quantities.\n@return {@code boolean} true on successful acquire.\n@throws InterruptedException - if the acquiring thread was interrupted.\n@throws IllegalArgumentException if {@code permit} is null.",
"Parses the query facet configurations.\n@param rangeFacetObject The JSON sub-node with the query facet configurations.\n@return The query facet configurations.",
"If the file is compressed, handle this so that the stream is ready to read.\n\n@param stream input stream\n@return uncompressed input stream",
"parse json text to specified class\n\n@param jsonRtn\n@param jsonRtnClazz\n@return",
"Should be called each frame.",
"Clears out the statement handles.\n@param internalClose if true, close the inner statement handle too.",
"Sleeps if necessary to slow down the caller.\n\n@param eventsSeen Number of events seen since last invocation. Basis for\ndetermining whether its necessary to sleep.",
"Applies the mask to this address section and then compares values with the given address section\n\n@param mask\n@param other\n@return"
] |
private boolean getRelative(int value)
{
boolean result;
if (value < 0 || value >= RELATIVE_MAP.length)
{
result = false;
}
else
{
result = RELATIVE_MAP[value];
}
return result;
} | [
"Determine if the exception is relative based on the recurrence type integer value.\n\n@param value integer value\n@return true if the recurrence is relative"
] | [
"Parse a parameterized object from an InputStream.\n\n@param is The InputStream, most likely from your networking library.\n@param jsonObjectType The ParameterizedType describing the object. Ex: LoganSquare.parse(is, new ParameterizedType<MyModel<OtherModel>>() { });",
"Places a connection back in the originating partition.\n@param connectionHandle to place back\n@throws SQLException on error",
"Convert from Hadoop Text to Bytes",
"Creates a file\n\n@param folder File\n@param fileName String\n@throws IOException",
"Executes a given SPARQL query and returns a stream with the result in\nJSON format.\n\n@param query\n@return\n@throws IOException",
"Remove a named object",
"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.",
"Map the EventType.\n\n@param eventType the event type\n@return the event",
"Searches all descendant folders using a given query and query parameters.\n@param offset is the starting position.\n@param limit the maximum number of items to return. The default is 30 and the maximum is 200.\n@param bsp containing query and advanced search capabilities.\n@return a PartialCollection containing the search results."
] |
public static String[] slice(String[] strings, int begin, int length) {
String[] result = new String[length];
System.arraycopy( strings, begin, result, 0, length );
return result;
} | [
"Create a smaller array from an existing one.\n\n@param strings an array containing element of type {@link String}\n@param begin the starting position of the sub-array\n@param length the number of element to consider\n@return a new array continaining only the selected elements"
] | [
"Dumps an animation channel to stdout.\n\n@param nodeAnim the channel",
"Merges two lists of references, eliminating duplicates in the process.\n\n@param references1\n@param references2\n@return merged list",
"Get the class name without the qualified package name.\n@param className the className to get the short name for\n@return the class name of the class without the package name\n@throws IllegalArgumentException if the className is empty",
"Scan the segments to find the largest height value present.\n\n@return the largest waveform height anywhere in the preview.",
"Request a database sends a list of UUIDs.\n\n@param count The count of UUIDs.",
"Parses an adl source into a differential archetype.\n\n@param adl contents of an adl source file\n@return parsed archetype\n@throws org.openehr.adl.parser.AdlParserException if an error occurred while parsing",
"Get layer style by name.\n\n@param name layer style name\n@return layer style",
"Read exceptions for a calendar.\n\n@param table calendar exception data\n@param calendar calendar\n@param exceptionID first exception ID",
"Captures System.out and System.err and redirects them\nto Redwood logging.\n@param captureOut True is System.out should be captured\n@param captureErr True if System.err should be captured"
] |
private void populateCalendar(Record record, ProjectCalendar calendar, boolean isBaseCalendar)
{
if (isBaseCalendar == true)
{
calendar.setName(record.getString(0));
}
else
{
calendar.setParent(m_projectFile.getCalendarByName(record.getString(0)));
}
calendar.setWorkingDay(Day.SUNDAY, DayType.getInstance(record.getInteger(1)));
calendar.setWorkingDay(Day.MONDAY, DayType.getInstance(record.getInteger(2)));
calendar.setWorkingDay(Day.TUESDAY, DayType.getInstance(record.getInteger(3)));
calendar.setWorkingDay(Day.WEDNESDAY, DayType.getInstance(record.getInteger(4)));
calendar.setWorkingDay(Day.THURSDAY, DayType.getInstance(record.getInteger(5)));
calendar.setWorkingDay(Day.FRIDAY, DayType.getInstance(record.getInteger(6)));
calendar.setWorkingDay(Day.SATURDAY, DayType.getInstance(record.getInteger(7)));
m_eventManager.fireCalendarReadEvent(calendar);
} | [
"Populates a calendar instance.\n\n@param record MPX record\n@param calendar calendar instance\n@param isBaseCalendar true if this is a base calendar"
] | [
"Clone a widget info map considering what may be copied to the client.\n\n@param widgetInfo widget info map\n@return cloned copy including only records which are not {@link ServerSideOnlyInfo}",
"Make a list value containing the specified values.",
"as we know nothing has changed.",
"Go through all nodes and determine how many partition Ids each node\nhosts.\n\n@param cluster\n@return map of nodeId to number of primary partitions hosted on node.",
"Pretty prints the output of getMapOfContiguousPartitionRunLengths\n\n@param cluster\n@param zoneId\n@return pretty string of contiguous run lengths",
"Use this API to fetch all the vridparam resources that are configured on netscaler.",
"Determines the median value of the data set.\n@return If the number of elements is odd, returns the middle element.\nIf the number of elements is even, returns the midpoint of the two\nmiddle elements.\n@since 1.0.1",
"Use this API to apply nspbr6 resources.",
"Process the timephased resource assignment data to work out the\nsplit structure of the task.\n\n@param task parent task\n@param timephasedComplete completed resource assignment work\n@param timephasedPlanned planned resource assignment work"
] |
private HashMap<String, StoreDefinition> makeStoreDefinitionMap(List<StoreDefinition> storeDefs) {
HashMap<String, StoreDefinition> storeDefMap = new HashMap<String, StoreDefinition>();
for(StoreDefinition storeDef: storeDefs)
storeDefMap.put(storeDef.getName(), storeDef);
return storeDefMap;
} | [
"Returns the list of store defs as a map\n\n@param storeDefs\n@return"
] | [
"Clears out the statement handles.\n@param internalClose if true, close the inner statement handle too.",
"Add a property.",
"Reads the next chunk for the intermediate work buffer.",
"Execute a partitioned query using an index and a query selector.\n\nOnly available in partitioned databases. To verify a database is partitioned call\n{@link Database#info()} and check that {@link DbInfo.Props#getPartitioned()} returns\n{@code true}.\n\n<p>Example usage:</p>\n<pre>\n{@code\n// Query database partition 'Coppola'.\nQueryResult<Movie> movies = db.query(\"Coppola\", new QueryBuilder(and(\ngt(\"Movie_year\", 1960),\neq(\"Person_name\", \"Al Pacino\"))).\nfields(\"Movie_name\", \"Movie_year\").\nbuild(), Movie.class);\n}\n</pre>\n\n@param partitionKey Database partition to query.\n@param query String representation of a JSON object describing criteria used to\nselect documents.\n@param classOfT The class of Java objects to be returned in the {@code docs} field of\nresult.\n@param <T> The type of the Java object to be returned in the {@code docs} field of\nresult.\n@return A {@link QueryResult} object, containing the documents matching the query\nin the {@code docs} field.\n@see com.cloudant.client.api.Database#query(String, Class)",
"Read filename from spec.",
"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",
"Sets the values of this vector to those of v1.\n\n@param v1\nvector whose values are copied",
"Converts a sequence of Java characters to a sequence of unicode code points.\n\n@return the number of code points written to the destination buffer",
"the transaction id are generated as unique timestamps\n\n@param timeMs in milliseconds\n@return a unique transactionId"
] |
public double getBearing(LatLong end) {
if (this.equals(end)) {
return 0;
}
double lat1 = latToRadians();
double lon1 = longToRadians();
double lat2 = end.latToRadians();
double lon2 = end.longToRadians();
double angle = -Math.atan2(Math.sin(lon1 - lon2) * Math.cos(lat2),
Math.cos(lat1) * Math.sin(lat2) - Math.sin(lat1)
* Math.cos(lat2) * Math.cos(lon1 - lon2));
if (angle < 0.0) {
angle += Math.PI * 2.0;
}
if (angle > Math.PI) {
angle -= Math.PI * 2.0;
}
return Math.toDegrees(angle);
} | [
"Calculates the bearing, in degrees, of the end LatLong point from this\nLatLong point.\n\n@param end The point that the bearing is calculated for.\n@return The bearing, in degrees, of the supplied point from this point."
] | [
"Get a list of referring domains for a collection.\n\n@param date\n(Required) Stats will be returned for this date. A day according to Flickr Stats starts at midnight GMT for all users, and timestamps will\nautomatically be rounded down to the start of the day.\n@param collectionId\n(Optional) The id of the collection to get stats for. If not provided, stats for all collections 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.getCollectionDomains.html\"",
"Stops the current debug server. Active connections are\nnot affected.",
"Use this API to fetch all the cacheobject resources that are configured on netscaler.\nThis uses cacheobject_args which is a way to provide additional arguments while fetching the resources.",
"Used internally to find the solution to a single column vector.",
"Changes the message of this comment.\n@param newMessage the new message for this comment.\n@return updated info about this comment.",
"Initialize the domain registry.\n\n@param registry the domain registry",
"Checks the given class descriptor for correct procedure settings.\n\n@param classDef The class descriptor\n@param checkLevel The current check level (this constraint is checked in basic and strict)\n@exception ConstraintException If the constraint has been violated",
"Check that the scope type is allowed by the stereotypes on the bean and\nthe bean type",
"Set a callback to handle any exceptions in the chain of execution.\n\n@param callback\nInstance of {@link ErrorCallback}.\n@return Reference to the {@code ExecutionChain}\n@throws IllegalStateException\nif the chain of execution has already been {@link #execute()\nstarted}."
] |
public ValueContainer[] getKeyValues(ClassDescriptor cld, Object objectOrProxy, boolean convertToSql) throws PersistenceBrokerException
{
IndirectionHandler handler = ProxyHelper.getIndirectionHandler(objectOrProxy);
if(handler != null)
{
return getKeyValues(cld, handler.getIdentity(), convertToSql); //BRJ: convert Identity
}
else
{
ClassDescriptor realCld = getRealClassDescriptor(cld, objectOrProxy);
return getValuesForObject(realCld.getPkFields(), objectOrProxy, convertToSql);
}
} | [
"Returns an Array with an Objects PK VALUES if convertToSql is true, any\nassociated java-to-sql conversions are applied. If the Object is a Proxy\nor a VirtualProxy NO conversion is necessary.\n\n@param objectOrProxy\n@param convertToSql\n@return Object[]\n@throws PersistenceBrokerException"
] | [
"Use this API to fetch hanode_routemonitor_binding resources of given name .",
"Sets the duration for the animations in this animator.\n\n@param start the animation will start playing from the specified time\n@param end the animation will stop playing at the specified time\n\n@see GVRAnimation#setDuration(float, float)",
"Process StepFinishedEvent. Change last added to stepStorage step\nand add it as child of previous step.\n\n@param event to process",
"Use this API to unset the properties of nslimitselector resources.\nProperties that need to be unset are specified in args array.",
"Calculate start dates for a monthly recurrence.\n\n@param calendar current date\n@param frequency frequency\n@param dates array of start dates",
"Handles adding a key. Calls the registered listener and wraps it's method in some GUI adjustments.",
"Generate the next combination and return an array containing\nthe appropriate elements.\n@see #nextCombinationAsArray(Object[])\n@see #nextCombinationAsList()\n@return An array containing the elements that make up the next combination.",
"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",
"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)"
] |
@Override
@SuppressWarnings("unchecked")
public ChronoLocalDateTime<JulianDate> localDateTime(TemporalAccessor temporal) {
return (ChronoLocalDateTime<JulianDate>) super.localDateTime(temporal);
} | [
"Obtains a Julian local date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the Julian local date-time, not null\n@throws DateTimeException if unable to create the date-time"
] | [
"Gets the registration point that been associated with the registration for the longest period.\n\n@return the initial registration point, or {@code null} if there are no longer any registration points",
"Gets the data by id.\n\n@param id the id\n@return the data by id\n@throws IOException Signals that an I/O exception has occurred.",
"Called when app's singleton registry has been initialized",
"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.",
"A write through put to inner-store.\n\n@param keyBytes : keyName strings serialized as bytes eg. 'cluster.xml'\n@param valueBytes : versioned byte[] eg. UTF bytes for cluster xml\ndefinitions\n@throws VoldemortException",
"Make a copy of JobContext of current thread\n@return the copy of current job context or an empty job context",
"Aliases variables with an unknown type.\n@param variable The variable being aliased\n@param name Name of the variable",
"Typically this is transparently handled by using the Protostream codecs but be aware of it when bypassing Protostream.",
"Called when is removed the parent of the scene object.\n\n@param parent Old parent of this scene object."
] |
public String getUniqueFilename(String baseFileName, String extension, boolean cleanBaseFileName, String... ancestorFolders)
{
if (cleanBaseFileName)
{
baseFileName = PathUtil.cleanFileName(baseFileName);
}
if (ancestorFolders != null)
{
Path pathToFile = Paths.get("", Stream.of(ancestorFolders).map(ancestor -> PathUtil.cleanFileName(ancestor)).toArray(String[]::new)).resolve(baseFileName);
baseFileName = pathToFile.toString();
}
String filename = baseFileName + "." + extension;
// FIXME this looks nasty
while (usedFilenames.contains(filename))
{
filename = baseFileName + "." + index.getAndIncrement() + "." + extension;
}
usedFilenames.add(filename);
return filename;
} | [
"Returns a unique file name\n@param baseFileName the requested base name for the file\n@param extension the requested extension for the file\n@param cleanBaseFileName specify if the <code>baseFileName</code> has to be cleaned before being used (i.e. 'jboss-web' should not be cleaned to avoid '-' to become '_')\n@param ancestorFolders specify the ancestor folders for the file (if there's no ancestor folder, just pass 'null' value)\n@return a String representing the unique file generated"
] | [
"Searches the variables layers, top to bottom, for given name, and returns if found; null otherwise.\n\nIf maxDepth is set to {@link Variables#SEARCH_ALL_LAYERS}, then search all layers.",
"Return the list of galleries created by a user. Sorted from newest to oldest.\n\n@param userId\nThe user you want to check for\n@param perPage\nNumber of galleries per page\n@param page\nThe page number\n@return gallery\n@throws FlickrException\n\n@see <a hrerf=\"http://www.flickr.com/services/api/flickr.galleries.getList.html\">flickr.galleries.getList</a>",
"Adds a file to your assembly but automatically generates the field name of the file.\n\n@param file {@link File} the file to be uploaded.",
"Vend a SessionVar with the default value",
"Use this API to fetch the statistics of all ipseccounters_stats resources that are configured on netscaler.",
"Convert from Hadoop Text to Bytes",
"Determines the offset code of a forward contract from the name of a forward curve.\nThis method will extract a group of one or more digits together with the first letter behind them, if any.\nIf there are multiple groups of digits in the name, this method will extract the last.\nIf there is no number in the string, this method will return null.\n\n@param curveName The name of the curve.\n@return The offset code as String",
"Most complete output",
"performs a SELECT operation against RDBMS.\n@param query the query string.\n@param cld ClassDescriptor providing JDBC information."
] |
public ReferrerList getCollectionReferrers(Date date, String domain, String collectionId, int perPage, int page) throws FlickrException {
return getReferrers(METHOD_GET_COLLECTION_REFERRERS, domain, "collection_id", collectionId, date, perPage, page);
} | [
"Get a list of referrers from a given domain to a collection.\n\n@param date\n(Required) Stats will be returned for this date. A day according to Flickr Stats starts at midnight GMT for all users, and timestamps will\nautomatically be rounded down to the start of the day.\n@param domain\n(Required) The domain to return referrers for. This should be a hostname (eg: \"flickr.com\") with no protocol or pathname.\n@param collectionId\n(Optional) The id of the collection to get stats for. If not provided, stats for all collections 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.getCollectionReferrers.html\""
] | [
"Convert from Hadoop Text to Bytes",
"Return the max bounds of the layer as envelope.\n\n@param layer the layer to get envelope from\n@return Envelope the envelope",
"Executes a query using the given parameters. The query results will be added to the\nExecutionResults using the given identifier.\n\n@param identifier\nThe identifier to be used for the results when added to the ExecutionResults\n@param name\nThe name of the query to execute\n@param arguments\nThe arguments to be used for the query parameters\n@return",
"Updates the text style according to a new text position\n@param bstyle the style to be updated\n@param text the text position",
"Convert the Primavera string representation of a UUID into a Java UUID instance.\n\n@param value Primavera UUID\n@return Java UUID instance",
"set the insetsFrameLayout to display the content in fullscreen\nunder the statusBar and navigationBar\n\n@param fullscreen",
"Get all views from the list content\n@return list of views currently visible",
"Adds two complex numbers.\n\n@param z1 Complex Number.\n@param z2 Complex Number.\n@return Returns new ComplexNumber instance containing the sum of specified complex numbers.",
"Use this API to unset the properties of nsconfig resource.\nProperties that need to be unset are specified in args array."
] |
public Bundler put(String key, String value) {
delegate.putString(key, value);
return this;
} | [
"Inserts a String value into the mapping of the underlying Bundle, replacing any existing value\nfor the given key. Either key or value may be null.\n\n@param key a String, or null\n@param value a String, or null\n@return this bundler instance to chain method calls"
] | [
"Returns the compact tag records for all tags in the workspace.\n\n@param workspace The workspace or organization to find tags in.\n@return Request object",
"returns true if a job was queued within a timeout",
"Validate that the configuration is valid.\n\n@return any validation errors.",
"Creates the container for a bundle descriptor.\n@return the container for a bundle descriptor.",
"Add all elements in the iterator to the collection.\n\n@param target\n@param iterator\n@return true if the target was modified, false otherwise",
"Get the response headers for URL, following redirects\n\n@param stringUrl URL to use\n@param followRedirects whether to follow redirects\n@return headers HTTP Headers\n@throws IOException I/O error happened",
"Process a single outline code.\n\n@param parentRow outline code to task mapping table\n@throws SQLException",
"Simple context menu handler for multi-select tables.\n\n@param table the table\n@param menu the table's context menu\n@param event the click event\n@param entries the context menu entries",
"Get the ActivityInterface.\n\n@return The ActivityInterface"
] |
public static boolean isSafe(Expression expression) {
if (expression instanceof MethodCallExpression) {
return ((MethodCallExpression) expression).isSafe();
}
if (expression instanceof PropertyExpression) {
return ((PropertyExpression) expression).isSafe();
}
return false;
} | [
"Tells you if the expression is a null safe dereference.\n@param expression\nexpression\n@return\ntrue if is null safe dereference."
] | [
"Use this API to update nsrpcnode.",
"Throw fault.\n\n@param code the fault code\n@param message the message\n@param t the throwable type\n@throws PutEventsFault",
"Retrieve the version number",
"Removes the specified list of users from following the project, this will not affect project membership status.\nReturns the updated project record.\n\n@param project The project to remove followers from.\n@return Request object",
"Gets the type to use for the Vaadin table column corresponding to the c-th column in this result.\n\n@param c the column index\n@return the class to use for the c-th Vaadin table column",
"Use this API to fetch all the policydataset resources that are configured on netscaler.",
"Detokenize the input list of words.\n\n@param tokens List of words.\n@return Detokenized string.",
"Specify the method to instantiate objects\nrepresented by this descriptor.\n@see #setFactoryClass",
"Restore authentications from persisted state.\n\n@param savedAuthorization saved authorizations"
] |
Subsets and Splits