query
stringlengths 74
6.1k
| positive
sequencelengths 1
1
| negative
sequencelengths 9
9
|
---|---|---|
public static byte[] domainControllerDataToByteBuffer(List<DomainControllerData> data) throws Exception {
final ByteArrayOutputStream out_stream = new ByteArrayOutputStream(512);
byte[] result;
try (DataOutputStream out = new DataOutputStream(out_stream)) {
Iterator<DomainControllerData> iter = data.iterator();
while (iter.hasNext()) {
DomainControllerData dcData = iter.next();
dcData.writeTo(out);
if (iter.hasNext()) {
S3Util.writeString(SEPARATOR, out);
}
}
result = out_stream.toByteArray();
}
return result;
} | [
"Write the domain controller data to a byte buffer.\n\n@param data the domain controller data\n@return the byte buffer\n@throws Exception"
] | [
"Return the serialized form of this Identity.\n\n@return The serialized representation\n@see #fromByteArray\n@deprecated",
"Returns whether this host should ignore operations from the master domain controller that target\nthe given address.\n\n@param address the resource address. Cannot be {@code null}\n\n@return {@code true} if the operation should be ignored; {@code false} otherwise",
"Returns the overtime cost of this resource assignment.\n\n@return cost",
"alert, prompt, and confirm behave as if the OK button is always clicked.",
"Scan a network interface to find if it has an address space which matches the device we are trying to reach.\nIf so, return the address specification.\n\n@param aDevice the DJ Link device we are trying to communicate with\n@param networkInterface the network interface we are testing\n@return the address which can be used to communicate with the device on the interface, or null",
"Returns a set that contains all the unique entries of the given iterator in the order of their appearance.\nThe result set is a copy of the iterator with stable order.\n\n@param iterator\nthe iterator. May not be <code>null</code>.\n@return a set with the unique entries of the given iterator. Never <code>null</code>.",
"Use this API to fetch appfwprofile_csrftag_binding resources of given name .",
"Returns the classDescriptor.\n\n@return ClassDescriptor",
"Converts this file into a resource name on the classpath by cutting of the file path\nto the classpath root.\n\n@param classPathRootOnDisk The location of the classpath root on disk, with a trailing slash.\n@param file The file.\n@return The resource name on the classpath."
] |
public static String getInputValueName(
@Nullable final String inputPrefix,
@Nonnull final BiMap<String, String> inputMapper,
@Nonnull final String field) {
String name = inputMapper == null ? null : inputMapper.inverse().get(field);
if (name == null) {
if (inputMapper != null && inputMapper.containsKey(field)) {
throw new RuntimeException("field in keys");
}
final String[] defaultValues = {
Values.TASK_DIRECTORY_KEY, Values.CLIENT_HTTP_REQUEST_FACTORY_KEY,
Values.TEMPLATE_KEY, Values.PDF_CONFIG_KEY, Values.SUBREPORT_DIR_KEY,
Values.OUTPUT_FORMAT_KEY, Values.JOB_ID_KEY
};
if (inputPrefix == null || Arrays.asList(defaultValues).contains(field)) {
name = field;
} else {
name = inputPrefix.trim() +
Character.toUpperCase(field.charAt(0)) +
field.substring(1);
}
}
return name;
} | [
"Calculate the name of the input value.\n\n@param inputPrefix a nullable prefix to prepend to the name if non-null and non-empty\n@param inputMapper the name mapper\n@param field the field containing the value"
] | [
"Checks the initialization-method of given class descriptor.\n\n@param classDef The class descriptor\n@param checkLevel The current check level (this constraint is only checked in strict)\n@exception ConstraintException If the constraint has been violated",
"Get transformer to use.\n\n@return transformation to apply",
"Use this API to add transformpolicy.",
"use parseJsonResponse instead",
"Get layer style by name.\n\n@param name layer style name\n@return layer style",
"Log a free-form warning\n@param message the warning message. Cannot be {@code null}",
"Write a comma to the output stream if required.",
"Publish finish events for each of the specified query labels\n\n<pre>\n{@code\nLabelledEvents.start(\"get\", 1l, bus, \"typeA\", \"custom\");\ntry {\nreturn \"ok\";\n} finally {\nRequestEvents.finish(\"get\", 1l, bus, \"typeA\", \"custom\");\n}\n\n}\n</pre>\n\n\n@param query Completed query\n@param correlationId Identifier\n@param bus EventBus to post events to\n@param labels Query types to post to event bus",
"Set the String of request body data to be sent to the server.\n\n@param input String of request body data to be sent to the server\n@return an {@link HttpConnection} for method chaining"
] |
public static int getLineNumber(Member member) {
if (!(member instanceof Method || member instanceof Constructor)) {
// We are not able to get this info for fields
return 0;
}
// BCEL is an optional dependency, if we cannot load it, simply return 0
if (!Reflections.isClassLoadable(BCEL_CLASS, WeldClassLoaderResourceLoader.INSTANCE)) {
return 0;
}
String classFile = member.getDeclaringClass().getName().replace('.', '/');
ClassLoaderResourceLoader classFileResourceLoader = new ClassLoaderResourceLoader(member.getDeclaringClass().getClassLoader());
InputStream in = null;
try {
URL classFileUrl = classFileResourceLoader.getResource(classFile + ".class");
if (classFileUrl == null) {
// The class file is not available
return 0;
}
in = classFileUrl.openStream();
ClassParser cp = new ClassParser(in, classFile);
JavaClass javaClass = cp.parse();
// First get all declared methods and constructors
// Note that in bytecode constructor is translated into a method
org.apache.bcel.classfile.Method[] methods = javaClass.getMethods();
org.apache.bcel.classfile.Method match = null;
String signature;
String name;
if (member instanceof Method) {
signature = DescriptorUtils.methodDescriptor((Method) member);
name = member.getName();
} else if (member instanceof Constructor) {
signature = DescriptorUtils.makeDescriptor((Constructor<?>) member);
name = INIT_METHOD_NAME;
} else {
return 0;
}
for (org.apache.bcel.classfile.Method method : methods) {
// Matching method must have the same name, modifiers and signature
if (method.getName().equals(name)
&& member.getModifiers() == method.getModifiers()
&& method.getSignature().equals(signature)) {
match = method;
}
}
if (match != null) {
// If a method is found, try to obtain the optional LineNumberTable attribute
LineNumberTable lineNumberTable = match.getLineNumberTable();
if (lineNumberTable != null) {
int line = lineNumberTable.getSourceLine(0);
return line == -1 ? 0 : line;
}
}
// No suitable method found
return 0;
} catch (Throwable t) {
return 0;
} finally {
if (in != null) {
try {
in.close();
} catch (Exception e) {
return 0;
}
}
}
} | [
"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"
] | [
"For creating regular columns\n@return",
"Return true if the values of the two vectors are equal when cast as ints.\n\n@param a first vector to compare\n@param b second vector to compare\n@return true if the values of the two vectors are equal when cast as ints",
"Checks if the name of the file follows the version-n format\n\n@param versionDir The directory\n@return Returns true if the name is correct, else false",
"Set the rate types.\n\n@param rateTypes the rate types, not null and not empty.\n@return this, for chaining.\n@throws IllegalArgumentException when not at least one {@link RateType} is provided.",
"Returns the total count of the specified event\n@param event The event for which you want to get the total count\n@return Total count in int",
"Use this API to fetch vrid6 resource of given name .",
"Connect to the HC and retrieve the current model updates.\n\n@param controller the server controller\n@param callback the operation completed callback\n\n@throws IOException for any error",
"Append the text at the end of the File, using a specified encoding.\n\n@param file a File\n@param text the text to append at the end of the File\n@param charset the charset used\n@throws IOException if an IOException occurs.\n@since 1.0",
"Parses an RgbaColor from a hexadecimal, rgb, rgba, hsl, or hsla\nvalue.\n\n@return returns the parsed color"
] |
private static String getBundle(String friendlyName, String className, int truncate)
{
try {
cl.loadClass(className);
int start = className.length();
for (int i = 0; i < truncate; ++i)
start = className.lastIndexOf('.', start - 1);
final String bundle = className.substring(0, start);
return "+ " + friendlyName + align(friendlyName) + "- " + bundle;
}
catch (final ClassNotFoundException e) {}
catch (final NoClassDefFoundError e) {}
return "- " + friendlyName + align(friendlyName) + "- not available";
} | [
"to check availability, then class name is truncated to bundle id"
] | [
"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)",
"Builds the data structures that show the effects of the plan by server group",
"Creates a code location URL from a class\n\n@param codeLocationClass the class\n@return A URL created from Class\n@throws InvalidCodeLocation if URL creation fails",
"Returns all methods for a specific group\n\n@param groupId group ID to remove methods from\n@param filters array of method types to filter by, null means no filter\n@return Collection of methods found\n@throws Exception exception",
"Sets a quota for a users.\n\n@param user the user.\n@param quota the quota.",
"Parses coordinates into a Spatial4j point shape.",
"B = -A. Changes the sign of elements in A and stores it in B. A and B can be the same instance.\n\n@param A (Input) Matrix. Not modified.\n@param B (Output) Matrix. Modified.",
"Sets currency symbol.\n\n@param symbol currency symbol",
"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."
] |
@SuppressWarnings("unchecked")
protected String addPostRunDependent(Appliable<? extends Indexable> appliable) {
TaskGroup.HasTaskGroup dependency = (TaskGroup.HasTaskGroup) appliable;
return this.addPostRunDependent(dependency);
} | [
"Add an appliable \"post-run\" dependent for this task item.\n\n@param appliable the appliable \"post-run\" dependent.\n@return the key to be used as parameter to taskResult(string) method to retrieve updated \"post-run\" dependent"
] | [
"Generates a file of random data in a format suitable for the DIEHARD test.\nDIEHARD requires 3 million 32-bit integers.\n@param rng The random number generator to use to generate the data.\n@param outputFile The file that the random data is written to.\n@throws IOException If there is a problem writing to the file.",
"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",
"Get the Query Paramaters to be used for search request.\n@return this.QueryStringBuilder.",
"Method used to create missing timephased data.\n\n@param file project file\n@param assignment resource assignment\n@param timephasedPlanned planned timephased data\n@param timephasedComplete complete timephased data",
"This function helps handle the following case\n\n<OL>\n<LI>TX1 locls r1 col1\n<LI>TX1 fails before unlocking\n<LI>TX2 attempts to write r1:col1 w/o reading it\n</OL>\n\n<p>\nIn this case TX2 would not roll back TX1, because it never read the column. This function\nattempts to handle this case if TX2 fails. Only doing this in case of failures is cheaper than\ntrying to always read unread columns.\n\n@param cd Commit data",
"Remove duplicate Strings from the given array. Also sorts the array, as\nit uses a TreeSet.\n\n@param array the String array\n@return an array without duplicates, in natural sort order",
"Method to initialize the list.\n\n@param resList a given instance or null\n@return an instance",
"Writes all data that was collected about classes to a json file.",
"This method is used to parse a string representation of a time\nunit, and return the appropriate constant value.\n\n@param units string representation of a time unit\n@param locale target locale\n@return numeric constant\n@throws MPXJException normally thrown when parsing fails"
] |
public Date[] getDates()
{
int frequency = NumberHelper.getInt(m_frequency);
if (frequency < 1)
{
frequency = 1;
}
Calendar calendar = DateHelper.popCalendar(m_startDate);
List<Date> dates = new ArrayList<Date>();
switch (m_recurrenceType)
{
case DAILY:
{
getDailyDates(calendar, frequency, dates);
break;
}
case WEEKLY:
{
getWeeklyDates(calendar, frequency, dates);
break;
}
case MONTHLY:
{
getMonthlyDates(calendar, frequency, dates);
break;
}
case YEARLY:
{
getYearlyDates(calendar, dates);
break;
}
}
DateHelper.pushCalendar(calendar);
return dates.toArray(new Date[dates.size()]);
} | [
"Retrieve the set of start dates represented by this recurrence data.\n\n@return array of start dates"
] | [
"Get a bean from the application context. Returns null if the bean does not exist.\n@param name name of bean\n@param requiredType type of bean\n@return the bean or null",
"Creates a decorator bean\n\n@param <T> The type\n@param clazz The class\n@param beanManager the current manager\n@return a Bean",
"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",
"Retrieves a specific range of items in this collection.\n@param offset the index of the first item to retrieve.\n@param limit the maximum number of items to retrieve after the offset.\n@param fields the fields to retrieve.\n@return a partial collection containing the specified range of items.",
"Use this API to add dospolicy resources.",
"Initialize the pattern controllers.",
"Facade method for operating the Telnet Shell supporting line editing and command\nhistory over a socket.\n\n@param prompt Prompt to be displayed\n@param appName The app name string\n@param mainHandler Main command handler\n@param input Input stream.\n@param output Output stream.\n@return Shell that can be either further customized or run directly by calling commandLoop().",
"Post the specified photo to a blog.\n\n@param photo\nThe photo metadata\n@param blogId\nThe blog ID\n@throws FlickrException",
"Calling EventProducerInterceptor in case of logging faults.\n\n@param exchange\nthe message exchange\n@param reqFid\nthe FlowId\n\n@throws Fault\nthe fault"
] |
@Override
public <K, V> StoreClient<K, V> getStoreClient(final String storeName,
final InconsistencyResolver<Versioned<V>> resolver) {
// wrap it in LazyStoreClient here so any direct calls to this method
// returns a lazy client
return new LazyStoreClient<K, V>(new Callable<StoreClient<K, V>>() {
@Override
public StoreClient<K, V> call() throws Exception {
Store<K, V, Object> clientStore = getRawStore(storeName, resolver);
return new RESTClient<K, V>(storeName, clientStore);
}
}, true);
} | [
"Creates a REST client used to perform Voldemort operations against the\nCoordinator\n\n@param storeName Name of the store to perform the operations on\n@param resolver Custom resolver as specified by the application\n@return"
] | [
"Checks whether the given set of properties is available.\n\n@param keys the keys to check\n@return true if all properties are available, false otherwise",
"Use this API to update spilloverpolicy.",
"Determine whether the user has followed bean-like naming convention or not.",
"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\"",
"Attaches the menu drawer to the window.",
"Returns the position for a given number of occurrences or NOT_FOUND if\nthis value is not found.\n\n@param nOccurrence\nnumber of occurrences\n@return the position for a given number of occurrences or NOT_FOUND if\nthis value is not found",
"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",
"Returns a licenses regarding its Id and a fake on if no license exist with such an Id\n\n@param licenseId String\n@return License",
"Quick and dirty XML text escape.\n\n@param sb working string buffer\n@param text input text\n@return escaped text"
] |
private long getEndTime(ISuite suite, IInvokedMethod method)
{
// Find the latest end time for all tests in the suite.
for (Map.Entry<String, ISuiteResult> entry : suite.getResults().entrySet())
{
ITestContext testContext = entry.getValue().getTestContext();
for (ITestNGMethod m : testContext.getAllTestMethods())
{
if (method == m)
{
return testContext.getEndDate().getTime();
}
}
// If we can't find a matching test method it must be a configuration method.
for (ITestNGMethod m : testContext.getPassedConfigurations().getAllMethods())
{
if (method == m)
{
return testContext.getEndDate().getTime();
}
}
for (ITestNGMethod m : testContext.getFailedConfigurations().getAllMethods())
{
if (method == m)
{
return testContext.getEndDate().getTime();
}
}
}
throw new IllegalStateException("Could not find matching end time.");
} | [
"Returns the timestamp for the time at which the suite finished executing.\nThis is determined by finding the latest end time for each of the individual\ntests in the suite.\n@param suite The suite to find the end time of.\n@return The end time (as a number of milliseconds since 00:00 1st January 1970 UTC)."
] | [
"Use this API to fetch all the responderparam resources that are configured on netscaler.",
"Returns a site record for the site of the given name, creating a new one\nif it does not exist yet.\n\n@param siteKey\nthe key of the site\n@return the suitable site record",
"Constraint that ensures that the field has a conversion if the java type requires it. Also checks the conversion class.\n\n@param fieldDef The field descriptor\n@param checkLevel The current check level (this constraint is checked in basic (partly) and strict)\n@exception ConstraintException If the conversion class is invalid",
"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.",
"Specifies the maximum capacity of the counter.\n\n@param capacity\n<code>long</code>\n@throws IllegalArgumentException\nif windowMillis is less than 1.",
"Converts a list of dates to a Json array with the long representation of the dates as strings.\n@param individualDates the list to convert.\n@return Json array with long values of dates as string",
"Use this API to fetch the statistics of all servicegroup_stats resources that are configured on netscaler.",
"append normal text\n\n@param text normal text\n@return SimplifySpanBuild",
"Determines whether there is an element of the collection that evaluates to true\nfor the predicate.\n@param\tpredicate\tAn OQL boolean query predicate.\n@return\tTrue if there is an element of the collection that evaluates to true\nfor the predicate, otherwise false.\n@exception\torg.odmg.QueryInvalidException\tThe query predicate is invalid."
] |
public static boolean isBadXmlCharacter(char c) {
boolean cDataCharacter = c < '\u0020' && c != '\t' && c != '\r' && c != '\n';
cDataCharacter |= (c >= '\uD800' && c < '\uE000');
cDataCharacter |= (c == '\uFFFE' || c == '\uFFFF');
return cDataCharacter;
} | [
"Detect bad xml 1.0 characters\n\n@param c to detect\n@return true if specified character valid, false otherwise"
] | [
"Provides a ready to use diff update for our adapter based on the implementation of the\nstandard equals method from Object.\n\n@param newList to refresh our content",
"Returns the list of people who have favorited a given photo.\n\nThis method does not require authentication.\n\n@param photoId\n@param perPage\n@param page\n@return List of {@link com.flickr4java.flickr.people.User}",
"Adapt a file path to the current file system.\n@param filePath The input file path string.\n@return File path compatible with the file system of this {@link GVRResourceVolume}.",
"Adds a parameter that requires a string argument to the argument list.\nIf the given argument is null, then the argument list remains unchanged.",
"Add \"ORDER BY\" clause to the SQL query statement. This can be called multiple times to add additional \"ORDER BY\"\nclauses. Ones earlier are applied first.",
"Add new control at the end of control bar with specified touch listener.\nSize of control bar is updated based on new number of controls.\n@param name name of the control to remove\n@param properties JSON control specific properties\n@param listener touch listener",
"copy all fields from the \"from\" object to the \"to\" object.\n\n@param from source object\n@param to from's clone\n@param fields fields to be populated\n@param accessible 'true' if all 'fields' have been made accessible during\ntraversal",
"convert Event bean to EventType manually.\n\n@param event the event\n@return the event type",
"We have obtained album art for a device, so store it and alert any listeners.\n\n@param update the update which caused us to retrieve this art\n@param art the album art which we retrieved"
] |
public String getSample(int line, int column, Janitor janitor) {
String sample = null;
String text = source.getLine(line, janitor);
if (text != null) {
if (column > 0) {
String marker = Utilities.repeatString(" ", column - 1) + "^";
if (column > 40) {
int start = column - 30 - 1;
int end = (column + 10 > text.length() ? text.length() : column + 10 - 1);
sample = " " + text.substring(start, end) + Utilities.eol() + " " +
marker.substring(start, marker.length());
} else {
sample = " " + text + Utilities.eol() + " " + marker;
}
} else {
sample = text;
}
}
return sample;
} | [
"Returns a sampling of the source at the specified line and column,\nof null if it is unavailable."
] | [
"Gets the uuid from response.\n\n@param myResponse\nthe my response\n@return the uuid from response",
"Finds an Object of the specified type.\n\n@param <T> Object type.\n@param classType The class of type T.\n@param id The document _id field.\n@param rev The document _rev field.\n@return An object of type T.\n@throws NoDocumentException If the document is not found in the database.",
"ChromeCast does not allow you to jump levels too quickly to avoid blowing speakers.\nSetting by increment allows us to easily get the level we want\n\n@param level volume level from 0 to 1 to set\n@throws IOException\n@see <a href=\"https://developers.google.com/cast/docs/design_checklist/sender#sender-control-volume\">sender</a>",
"Stops the background data synchronization thread and releases the local client.",
"Attempt to resolve the given expression string, recursing if resolution of one string produces\nanother expression.\n\n@param expressionString the expression string from a node of {@link ModelType#EXPRESSION}\n@param ignoreDMRResolutionFailure {@code false} if {@link org.jboss.dmr.ModelNode#resolve() basic DMR resolution}\nfailures should be ignored, and {@code new ModelNode(expressionType.asString())} returned\n@param initial {@code true} if this call originated outside this method; {@code false} if it is a recursive call\n\n@return a node of {@link ModelType#STRING} where the encapsulated string is the resolved expression, or a node\nof {@link ModelType#EXPRESSION} if {@code ignoreDMRResolutionFailure} and {@code initial} are\n{@code true} and the string could not be resolved.\n\n@throws OperationFailedException if the expression cannot be resolved",
"This method retrieves the calendar hours for the specified day.\nNote that if this is a derived calendar, then this method\nwill refer to the base calendar where no hours are specified\nin the derived calendar.\n\n@param day Day instance\n@return calendar hours",
"Remove the realm name block.\n\n@see PropertiesFileLoader#addLineContent(java.io.BufferedReader, java.util.List, String)",
"Get the list of build numbers that are to be kept forever.",
"Private helper method which decodes the Stitch error from the body of an HTTP `Response`\nobject. If the error is successfully decoded, this function will throw the error for the end\nuser to eventually consume. If the error cannot be decoded, this is likely not an error from\nthe Stitch server, and this function will return an error message that the calling function\nshould use as the message of a StitchServiceException with an unknown code."
] |
protected boolean checkvalue(String colorvalue) {
boolean valid = validateColorValue(colorvalue);
if (valid) {
if (colorvalue.length() == 4) {
char[] chr = colorvalue.toCharArray();
for (int i = 1; i < 4; i++) {
String foo = String.valueOf(chr[i]);
colorvalue = colorvalue.replaceFirst(foo, foo + foo);
}
}
m_textboxColorValue.setValue(colorvalue, true);
m_colorField.getElement().getStyle().setBackgroundColor(colorvalue);
m_colorValue = colorvalue;
}
return valid;
} | [
"Validates the inputed color value.\n@param colorvalue the value of the color\n@return true if the inputed color value is valid"
] | [
"Records the result of updating a server group.\n\n@param serverGroup the server group's name. Cannot be <code>null</code>\n@param failed <code>true</code> if the server group update failed;\n<code>false</code> if it succeeded",
"Extracts warnings that are returned in an API response.\n\n@param root\nroot node of the JSON result",
"Gets the JVM memory usage.\n\n@return the JVM memory usage",
"Verifies that the given query can be properly scattered.\n\n@param query the query to verify\n@throws IllegalArgumentException if the query is invalid.",
"Gets the Chi Square distance between two normalized histograms.\n\n@param histogram1 Histogram.\n@param histogram2 Histogram.\n@return The Chi Square distance between x and y.",
"Remove a bean from the context, calling the destruction callback if any.\n\n@param name bean name\n@return previous value",
"Returns the value of found in the model.\n\n@param model the model that contains the key and value.\n@param expressionResolver the expression resolver to use to resolve expressions\n\n@return the directory grouping found in the model.\n\n@throws IllegalArgumentException if the {@link org.jboss.as.controller.descriptions.ModelDescriptionConstants#DIRECTORY_GROUPING directory grouping}\nwas not found in the model.",
"Creates an association row representing the given entry and adds it to the association managed by the given\npersister.",
"Return the available format ids."
] |
public Map<String, CmsCategory> getReadCategory() {
if (null == m_categories) {
m_categories = CmsCollectionsGenericWrapper.createLazyMap(new Transformer() {
public Object transform(Object categoryPath) {
try {
CmsCategoryService catService = CmsCategoryService.getInstance();
return catService.localizeCategory(
m_cms,
catService.readCategory(m_cms, (String)categoryPath, getRequestContext().getUri()),
m_cms.getRequestContext().getLocale());
} catch (CmsException e) {
LOG.warn(e.getLocalizedMessage(), e);
return null;
}
}
});
}
return m_categories;
} | [
"Transforms the category path of a category to the category.\n@return a map from root or site path to category."
] | [
"Invalidating just the GVRView associated with the GVRViewSceneObject\nincorrectly set the clip rectangle to just that view. To fix this,\nwe have to create a full screen android View and invalidate this\nto restore the clip rectangle.\n@return full screen View object",
"Retrieve the version number",
"Creates needed textfields for general label in footer groups.\n@param djgroup\n@param jgroup",
"Returns the JRDesignGroup for the DJGroup passed\n@param jd\n@param layoutManager\n@param group\n@return",
"Waits until all pending operations are complete and closes this repository.\n\n@param failureCauseSupplier the {@link Supplier} that creates a new {@link CentralDogmaException}\nwhich will be used to fail the operations issued after this method is called",
"Inserts a CharSequence value into the mapping of the underlying Bundle, replacing any existing\nvalue for the given key. Either key or value may be null.\n\n@param key a String, or null\n@param value a CharSequence, or null\n@return this bundler instance to chain method calls",
"An invalid reference or references. The verification of the digest of a\nreference failed. This can be caused by a change to the referenced data\nsince the signature was generated.\n\n@param aInvalidReferences\nThe indices to the invalid references.\n@return Result object",
"Creates an observable that emits the given item after the specified time in milliseconds.\n\n@param event the event to emit\n@param milliseconds the delay in milliseconds\n@param <T> the type of event\n@return delayed observable",
"Gets the effects of this action.\n\n@return the effects. Will not be {@code null}"
] |
public void growMaxLength( int arrayLength , boolean preserveValue ) {
if( arrayLength < 0 )
throw new IllegalArgumentException("Negative array length. Overflow?");
// see if multiplying numRows*numCols will cause an overflow. If it won't then pick the smaller of the two
if( numRows != 0 && numCols <= Integer.MAX_VALUE / numRows ) {
// save the user from themselves
arrayLength = Math.min(numRows*numCols, arrayLength);
}
if( nz_values == null || arrayLength > this.nz_values.length ) {
double[] data = new double[ arrayLength ];
int[] row_idx = new int[ arrayLength ];
if( preserveValue ) {
if( nz_values == null )
throw new IllegalArgumentException("Can't preserve values when uninitialized");
System.arraycopy(this.nz_values, 0, data, 0, this.nz_length);
System.arraycopy(this.nz_rows, 0, row_idx, 0, this.nz_length);
}
this.nz_values = data;
this.nz_rows = row_idx;
}
} | [
"Increases the maximum size of the data array so that it can store sparse data up to 'length'. The class\nparameter nz_length is not modified by this function call.\n\n@param arrayLength Desired maximum length of sparse data\n@param preserveValue If true the old values will be copied into the new arrays. If false that step will be skipped."
] | [
"This method is called by the ++ operator for the class CharSequence.\nIt increments the last character in the given CharSequence. If the last\ncharacter in the CharSequence is Character.MAX_VALUE a Character.MIN_VALUE\nwill be appended. The empty CharSequence is incremented to a string\nconsisting of the character Character.MIN_VALUE.\n\n@param self a CharSequence\n@return a value obtained by incrementing the toString() of the CharSequence\n@since 1.8.2",
"Mark new or deleted reference elements\n@param broker",
"Get the Query Paramaters to be used for search request.\n@return this.QueryStringBuilder.",
"Returns all keys of all rows contained within this association.\n\n@return all keys of all rows contained within this association",
"Checks all data sets in a given record for constraint violations.\n\n@param record\nIIM record (1,2,3, ...) to check\n\n@return list of constraint violations, empty set if IIM file is valid",
"Finish configuration.",
"Returns the intersection of this range with the given range, a range which includes those addresses in both this and the given rqnge.\n@param other\n@return",
"Returns a non-validating XML parser. The parser ignores both DTDs and XSDs.\n\n@return An XML parser in the form of a DocumentBuilder",
"Parses an item IRI\n\n@param iri\nthe item IRI like http://www.wikidata.org/entity/Q42\n@throws IllegalArgumentException\nif the IRI is invalid or does not ends with an item id"
] |
public Collection<User> getFavorites(String photoId, int perPage, int page) throws FlickrException {
Map<String, Object> parameters = new HashMap<String, Object>();
parameters.put("method", METHOD_GET_FAVORITES);
parameters.put("photo_id", photoId);
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());
}
List<User> users = new ArrayList<User>();
Element userRoot = response.getPayload();
NodeList userNodes = userRoot.getElementsByTagName("person");
for (int i = 0; i < userNodes.getLength(); i++) {
Element userElement = (Element) userNodes.item(i);
User user = new User();
user.setId(userElement.getAttribute("nsid"));
user.setUsername(userElement.getAttribute("username"));
user.setFaveDate(userElement.getAttribute("favedate"));
users.add(user);
}
return users;
} | [
"Returns the list of people who have favorited a given photo.\n\nThis method does not require authentication.\n\n@param photoId\n@param perPage\n@param page\n@return List of {@link com.flickr4java.flickr.people.User}"
] | [
"Returns all the dependencies of a module\n\n@param module Module\n@return List<Dependency>",
"Stop listening for device announcements. Also discard any announcements which had been received, and\nnotify any registered listeners that those devices have been lost.",
"Searches for all annotations of the given type on this method or on type level for all interfaces and superclasses\n\n@param method the method to scan\n@param annotation the annotation to search for\n@param <T> the type of the annotation\n@return the list of all method or type level annotations in the type hierarchy",
"Readable yyyyMMdd int representation of a day, which is also sortable.",
"Set the header names to forward from the request. Should not be defined if all is set to true\n\n@param names the header names.",
"Use this API to update aaaparameter.",
"Performs backward pass of Batch Normalization layer. Returns x gradient,\nbnScale gradient and bnBias gradient",
"Copy the data from an InputStream to a temp file.\n\n@param inputStream data source\n@param tempFileSuffix suffix to use for temp file\n@return File instance",
"Remove colProxy from list of pending collections and\nregister its contents with the transaction."
] |
public <V> V detach(final AttachmentKey<V> key) {
assert key != null;
return key.cast(contextAttachments.remove(key));
} | [
"Detaches or removes the value from this context.\n\n@param key the key to the attachment.\n@param <V> the value type of the attachment.\n\n@return the attachment if found otherwise {@code null}."
] | [
"Undo changes for a single patch entry.\n\n@param entry the patch entry\n@param loader the content loader",
"This method is used to quote any special characters that appear in\nliteral text that is required as part of the currency format.\n\n@param literal Literal text\n@return literal text with special characters in quotes",
"Returns a PreparedStatementCreator that returns a page of the underlying\nresult set.\n\n@param dialect\nDatabase dialect to use.\n@param limit\nMaximum number of rows to return.\n@param offset\nIndex of the first row to return.",
"Get all the names of inputs that are required to be in the Values object when this graph is executed.",
"This method extracts calendar data from a Phoenix file.\n\n@param phoenixProject Root node of the Phoenix file",
"Read the parameters on initialization.\n\n@see org.apache.solr.update.processor.UpdateRequestProcessorFactory#init(org.apache.solr.common.util.NamedList)",
"Writes and reads the XOP attachment using a CXF JAX-RS Proxy\nThe proxy automatically sets the \"mtom-enabled\" property by checking\nthe CXF EndpointProperty set on the XopAttachment interface.\n\n@throws Exception",
"Computes the mean or average of all the elements.\n\n@return mean",
"Get the subsystem deployment model root.\n\n<p>\nIf the subsystem resource does not exist one will be created.\n</p>\n\n@param subsystemName the subsystem name.\n\n@return the model"
] |
public void setDateAttribute(String name, Date value) {
ensureAttributes();
Attribute attribute = new DateAttribute(value);
attribute.setEditable(isEditable(name));
getAllAttributes().put(name, attribute);
} | [
"Sets the specified date attribute to the specified value.\n\n@param name name of the attribute\n@param value value of the attribute\n@since 1.9.0"
] | [
"Handle the serialization of String, Integer and boolean parameters.\n\n@param param to serialize\n@return Object",
"Fetch a value from the Hashmap .\n\n@param firstKey\nfirst key\n@param secondKey\nsecond key\n@return the element or null.",
"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",
"The only difference between version 1.5 and 1.6 of the schema were to make is possible to define discovery options, this\nresulted in the host and port attributes becoming optional -this method also indicates if discovery options are required\nwhere the host and port were not supplied.\n\n@param allowDiscoveryOptions i.e. are host and port potentially optional?\n@return true if discovery options are required, i.e. no host and port set and the admin policy requires a config.",
"refresh the most recent history entries\n\n@param limit number of entries to populate\n@param offset number of most recent entries to skip\n@return populated history entries\n@throws Exception exception",
"Send a waveform preview update announcement to all registered listeners.\n\n@param player the player whose waveform preview has changed\n@param preview the new waveform preview, if any",
"To read an object in a quick & dirty way. Prepare to handle failures when object serialization changes!",
"Remove the nodes representing the entity and the embedded elements attached to it.\n\n@param executionEngine the {@link GraphDatabaseService} used to run the query\n@param columnValues the values of the key identifying the entity to remove",
"Gets a tokenizer from a reader."
] |
public static final Color getColor(byte[] data, int offset)
{
Color result = null;
if (getByte(data, offset + 3) == 0)
{
int r = getByte(data, offset);
int g = getByte(data, offset + 1);
int b = getByte(data, offset + 2);
result = new Color(r, g, b);
}
return result;
} | [
"Reads a color value represented by three bytes, for R, G, and B\ncomponents, plus a flag byte indicating if this is an automatic color.\nReturns null if the color type is \"Automatic\".\n\n@param data byte array of data\n@param offset offset into array\n@return new Color instance"
] | [
"Convert a Planner date-time value into a Java date.\n\n20070222T080000Z\n\n@param value Planner date-time\n@return Java Date instance",
"Expects a height mat as input\n\n@param input - A grayscale height map\n@return edges",
"Returns whether this represents a valid host name or address format.\n@return",
"Update an existing feature. Made package private for testing purposes.\n\n@param feature feature to update\n@throws LayerException oops",
"Creates the given directory. Fails if it already exists.",
"Removes an accessory from being handled or advertised by this root. Any existing Homekit\nconnections will be terminated to allow the clients to reconnect and see the updated accessory\nlist.\n\n@param accessory accessory to cease advertising and handling",
"Ends the transition",
"Retrieves the column title for the given locale.\n\n@param locale required locale for the default column title\n@return column title",
"Get the related tags.\n\n<p>\nThis method does not require authentication.\n</p>\n\n@param tag\nThe source tag\n@return A RelatedTagsList object\n@throws FlickrException"
] |
public String getResourcePath()
{
switch (resourceType)
{
case ANDROID_ASSETS: return assetPath;
case ANDROID_RESOURCE: return resourceFilePath;
case LINUX_FILESYSTEM: return filePath;
case NETWORK: return url.getPath();
case INPUT_STREAM: return inputStreamName;
default: return null;
}
} | [
"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"
] | [
"Computes the dot product of each basis vector against the sample. Can be used as a measure\nfor membership in the training sample set. High values correspond to a better fit.\n\n@param sample Sample of original data.\n@return Higher value indicates it is more likely to be a member of input dataset.",
"This method is called to alert project listeners to the fact that\na resource has been written to a project file.\n\n@param resource resource instance",
"Creates a new resource.\n@param cmsObject The CmsObject of the current request context.\n@param newLink A string, specifying where which new content should be created.\n@param locale The locale for which the\n@param sitePath site path of the currently edited content.\n@param modelFileName not used.\n@param mode optional creation mode\n@param postCreateHandler optional class name of an {@link I_CmsCollectorPostCreateHandler} which is invoked after the content has been created.\nThe fully qualified class name can be followed by a \"|\" symbol and a handler specific configuration string.\n@return The site-path of the newly created resource.",
"Dump data for all non-summary tasks to stdout.\n\n@param name file name",
"Use this API to fetch the statistics of all nsacl6_stats resources that are configured on netscaler.",
"Sets the country for which currencies should be requested.\n\n@param countries The ISO countries.\n@return the query for chaining.",
"Checks if provided class package is on the exclude list\n\n@param classPackageName\nname of class package\n@return false if class package is on the {@link #excludePackages} list",
"Set the diffuse light intensity.\n\nThis designates the color of the diffuse reflection.\nIt is multiplied by the material diffuse color to derive\nthe hue of the diffuse reflection for that material.\nThe built-in phong shader {@link GVRPhongShader} uses a {@code vec4} uniform named\n{@code diffuse_intensity} to control the intensity of diffuse light reflected.\n\n@param r red component (0 to 1)\n@param g green component (0 to 1)\n@param b blue component (0 to 1)\n@param a alpha component (0 to 1)",
"Read recurring data for a calendar exception.\n\n@param bce MPXJ calendar exception\n@param exception XML calendar exception"
] |
public static Chart getMSDLineChart(Trajectory t, int lagMin, int lagMax) {
return getMSDLineChart(t, lagMin, lagMax, new MeanSquaredDisplacmentFeature(t,
lagMin));
} | [
"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"
] | [
"Verifies if the new value is different from the field's old value. It's\nuseful, for example, in NoSQL databases that replicates data between\nservers. This verification prevents to mark a field as modified and to be\nreplicated needlessly.\n\n@param field\nthe field that we are checking before to be modified\n@param value\nthe new value\n@return true if the new and the old values are different and the value\nwas changed.",
"Find all methods on classes under scanBase that are annotated with annotationClass.\n\n@param scanBase Package to scan recursively, in dot notation (ie: org.jrugged...)\n@param annotationClass Class of the annotation to search for\n@return Set<Method> The set of all @{java.lang.reflect.Method}s having the annotation",
"Use this API to fetch all the snmpalarm resources that are configured on netscaler.",
"Builds the resource.\n\n@return the cms resource",
"Provisions a new user in an enterprise with additional user information.\n@param api the API connection to be used by the created user.\n@param login the email address the user will use to login.\n@param name the name of the user.\n@param params additional user information.\n@return the created user's info.",
"Find and return the appropriate getter method for field.\n\n@return Get method or null (or throws IllegalArgumentException) if none found.",
"Handles the response of the SendData request.\n@param incomingMessage the response message to process.",
"Closes the Netty Channel and releases all resources",
"Set default value with\n\n@param iso ISO2 of country"
] |
@SuppressWarnings("unchecked")
public static void executeCommand(String[] args) throws IOException {
OptionParser parser = getParser();
// declare parameters
List<String> metaKeys = null;
String url = null;
// parse command-line input
args = AdminToolUtils.copyArrayAddFirst(args, "--" + OPT_HEAD_META_CHECK);
OptionSet options = parser.parse(args);
if(options.has(AdminParserUtils.OPT_HELP)) {
printHelp(System.out);
return;
}
// check required options and/or conflicting options
AdminParserUtils.checkRequired(options, OPT_HEAD_META_CHECK);
AdminParserUtils.checkRequired(options, AdminParserUtils.OPT_URL);
// load parameters
metaKeys = (List<String>) options.valuesOf(OPT_HEAD_META_CHECK);
url = (String) options.valueOf(AdminParserUtils.OPT_URL);
// execute command
if(metaKeys.size() == 0
|| (metaKeys.size() == 1 && metaKeys.get(0).equals(METAKEY_ALL))) {
metaKeys = Lists.newArrayList();
metaKeys.add(MetadataStore.CLUSTER_KEY);
metaKeys.add(MetadataStore.STORES_KEY);
metaKeys.add(MetadataStore.SERVER_STATE_KEY);
}
AdminClient adminClient = AdminToolUtils.getAdminClient(url);
doMetaCheck(adminClient, metaKeys);
} | [
"Parses command-line and checks if metadata is consistent across all\nnodes.\n\n@param args Command-line input\n@param printHelp Tells whether to print help only or execute command\nactually\n@throws IOException"
] | [
"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",
"Write a Byte Order Mark at the beginning of the file\n\n@param stream the FileOutputStream to write the BOM to\n@param bigEndian true if UTF 16 Big Endian or false if Low Endian\n@throws IOException if an IOException occurs.\n@since 1.0",
"Sets the license for a photo.\n\nThis method requires authentication with 'write' permission.\n\n@param photoId\nThe photo to update the license for.\n@param licenseId\nThe license to apply, or 0 (zero) to remove the current license.\n@throws FlickrException",
"1-D Integer array to float array.\n\n@param array Integer array.\n@return Float array.",
"Use this API to fetch dnsnsecrec resources of given names .",
"makes object obj persistent to the Objectcache under the key oid.",
"Use this API to delete gslbservice of given name.",
"Detach any script file from a scriptable target.\n\n@param target The scriptable target.",
"Create a new file but fail if it already exists. The check for\nexistance of the file and it's creation are an atomic operation with\nrespect to other filesystem activities."
] |
public static InstalledIdentity load(final InstalledImage installedImage, final ProductConfig productConfig, List<File> moduleRoots, final List<File> bundleRoots) throws IOException {
return LayersFactory.load(installedImage, productConfig, moduleRoots, bundleRoots);
} | [
"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"
] | [
"Updates the polling state from a PUT or PATCH operation.\n\n@param response the response from Retrofit REST call\n@throws CloudException thrown if the response is invalid\n@throws IOException thrown by deserialization",
"This method retrieves a double of the specified type,\nbelonging to the item with the specified unique ID.\n\n@param id unique ID of entity to which this data belongs\n@param type data type identifier\n@return required double data",
"Returns the finish date for this resource assignment.\n\n@return finish date",
"Read a list of fixed sized blocks from the input stream.\n\n@return List of MapRow instances representing the fixed size blocks",
"Starts the Okapi Barcode UI.\n\n@param args the command line arguments",
"Read a Synchro string from an input stream.\n\n@param is input stream\n@return String instance",
"Retuns the Windows UNC style path with backslashs intead of forward slashes.\n\n@return The UNC path.",
"Sets the left padding for all cells in the table.\n@param paddingLeft new padding, ignored if smaller than 0\n@return this to allow chaining",
"Reads a single record from the table.\n\n@param buffer record data\n@param table parent table"
] |
@SuppressWarnings("WeakerAccess")
public int getPlayerDBServerPort(int player) {
ensureRunning();
Integer result = dbServerPorts.get(player);
if (result == null) {
return -1;
}
return result;
} | [
"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"
] | [
"This will set the last nestingLevel elements in the dotPositions to the values present in the dollarPositions.\nThe rest will be set to -1.\n\n<p>In another words the dotPositions array will contain the rightmost dollar positions.\n\n@param dollarPositions the positions of the $ in the binary class name\n@param dotPositions the positions of the dots to initialize from the dollarPositions\n@param nestingLevel the number of dots (i.e. how deep is the nesting of the classes)",
"Use this API to fetch netbridge_vlan_binding resources of given name .",
"Abort and close the transaction. Calling abort abandons all persistent\nobject modifications and releases the associated locks. Aborting a\ntransaction does not restore the state of modified transient objects",
"Allow the given job type to be executed.\n@param jobName the job name as seen\n@param jobType the job type to allow",
"this method is not intended to be called by clients\n@since 2.12",
"Use to generate a file based on generator node.",
"we can't call this method 'of', cause it won't compile on JDK7",
"Use this API to fetch aaauser_vpntrafficpolicy_binding resources of given name .",
"Set the individual dates.\n@param dates the dates to set."
] |
public boolean checkContains(String uri, String[] patterns) {
for (String pattern : patterns) {
if (pattern.length() > 0) {
if (uri.contains(pattern)) {
return true;
}
}
}
return false;
} | [
"Check whether the URL contains one of the patterns.\n\n@param uri URI\n@param patterns possible patterns\n@return true when URL contains one of the patterns"
] | [
"Filter unsafe or unnecessary request.\n\n@param nodeDataMapValidSource\nthe node data map valid source\n@param nodeDataMapValidSafe\nthe node data map valid safe",
"Adds the correct load instruction based on the type descriptor\n\n@param code the bytecode to add the instruction to\n@param type the type of the variable\n@param variable the variable number",
"Get the refresh frequency of this scene object.\n\n@return The refresh frequency of this TextViewSceneObject.",
"Must be called before any other functions. Declares and sets up internal data structures.\n\n@param numSamples Number of samples that will be processed.\n@param sampleSize Number of elements in each sample.",
"The digits were stored as a hex value, thix switches them to an octal value.\n\n@param currentHexValue\n@param digitCount\n@return",
"Starts listening for shakes on devices with appropriate hardware.\n\n@return true if the device supports shake detection.",
"Given a year, month, and day, find the number of occurrences of that day in the month\n\n@param year the year\n@param month the month\n@param day the day\n@return the number of occurrences of the day in the month",
"Specify the output format of the image.\n\n@see ImageFormat",
"Obtains a Ethiopic zoned date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the Ethiopic zoned date-time, not null\n@throws DateTimeException if unable to create the date-time"
] |
public static void addToMediaStore(Context context, File file) {
String[] path = new String[]{file.getPath()};
MediaScannerConnection.scanFile(context, path, null, null);
} | [
"another media scan way"
] | [
"Un-serialize a Json into Module\n@param module String\n@return Module\n@throws IOException",
"Given a symmetric matrix which is represented by a lower triangular matrix convert it back into\na full symmetric matrix.\n\n@param A (Input) Lower triangular matrix (Output) symmetric matrix",
"This method is called to try to catch any invalid tasks that may have sneaked past all our other checks.\nThis is done by validating the tasks by task ID.",
"Send get request.\n\n@param url the url\n@param customHeaders the customHeaders\n@param params the params\n@return the string\n@throws URISyntaxException the uri syntax exception\n@throws IOException the io exception",
"Formats an IPTC string for this reference using information obtained from\nSubject Reference System.\n\n@param srs\nreference subject reference system\n@return IPTC formatted reference",
"Executes an operation on the controller latching onto an existing transaction\n\n@param operation the operation\n@param handler the handler\n@param control the transaction control\n@param prepareStep the prepare step to be executed before any other steps\n@param operationId the id of the current transaction\n@return the result of the operation",
"If provided with an AVRO schema, validates it and checks if there are\nbackwards compatible.\n\nTODO should probably place some similar checks for other serializer types\nas well?\n\n@param serializerDef",
"Use this API to fetch all the sslcertkey resources that are configured on netscaler.",
"Internal method used to retrieve a integer from an\nembedded data block.\n\n@param blocks list of data blocks\n@return int value"
] |
protected static boolean fileDoesNotExist(String file, String path,
String dest_dir) {
File f = new File(dest_dir);
if (!f.isDirectory())
return false;
String folderPath = createFolderPath(path);
f = new File(f, folderPath);
File javaFile = new File(f, file);
boolean result = !javaFile.exists();
return result;
} | [
"Method to know if already exists one file with the same name in the same\nfolder\n\n@param scenario_name\n@param path\n@param dest_dir\n@return true when the file does not exist"
] | [
"Convenience extension, to generate traced code.",
"Returns a module\n\n@param moduleId String\n@return DbModule",
"Treats the object as iterable, iterating through the values it represents and returns the first non-null result obtained from calling the closure, otherwise returns the defaultResult.\n\n@param self an Object with an iterator returning its values\n@param defaultResult an Object that should be returned if all closure results are null\n@param closure a closure that returns a non-null value when processing should stop\n@return the first non-null result of the closure, otherwise the default value\n@since 1.7.5",
"Retrieve the default mapping between MPXJ task fields and Primavera wbs field names.\n\n@return mapping",
"Clear all beans and call the destruction callback.",
"Extract a list of exception assignments.\n\n@param exceptionData string representation of exception assignments\n@return list of exception assignment rows",
"Group results by the specified field.\n\n@param fieldName by which to group results\n@param isNumber whether field isNumeric.\n@return this for additional parameter setting or to query",
"Invalidating just the GVRView associated with the GVRViewSceneObject\nincorrectly set the clip rectangle to just that view. To fix this,\nwe have to create a full screen android View and invalidate this\nto restore the clip rectangle.\n@return full screen View object",
"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...)"
] |
public static boolean compareAnnotatedParameters(AnnotatedParameter<?> p1, AnnotatedParameter<?> p2) {
return compareAnnotatedCallable(p1.getDeclaringCallable(), p2.getDeclaringCallable()) && p1.getPosition() == p2.getPosition() && compareAnnotated(p1, p2);
} | [
"Compares two annotated parameters and returns true if they are equal"
] | [
"Return collection of path Ids in priority order\n\n@param profileId ID of profile\n@return collection of path Ids in priority order",
"Add a '<=' clause so the column must be less-than or equals-to the value.",
"Returns the indices that would sort an array.\n\n@param array Array.\n@param ascending Ascending order.\n@return Array of indices.",
"Always returns the original proxy object that was serialized.\n\n@return the proxy object\n@throws java.io.ObjectStreamException",
"Compare two integers, accounting for null values.\n\n@param n1 integer value\n@param n2 integer value\n@return comparison result",
"Build copyright map once.",
"Used to read the domain model when a slave host connects to the DC\n\n@param transformers the transformers for the host\n@param transformationInputs parameters for the transformation\n@param ignoredTransformationRegistry registry of resources ignored by the transformation target\n@param domainRoot the root resource for the domain resource tree\n@return a read master domain model util instance",
"we need to cache the address in here and not in the address section if there is a zone",
"This function uses a proxy which is capable of transforming typed invocations into proper HTTP calls\nwhich will be understood by RESTful services. This works for subresources as well. Interfaces and\nconcrete classes can be proxified, in the latter case a CGLIB runtime dependency is needed. CXF JAX-RS\nproxies can be configured the same way as HTTP-centric WebClients and response status and headers can\nalso be checked. HTTP response errors can be converted into typed exceptions."
] |
public synchronized void initTaskSchedulerIfNot() {
if (scheduler == null) {
scheduler = Executors
.newSingleThreadScheduledExecutor(DaemonThreadFactory
.getInstance());
CapacityAwareTaskScheduler runner = new CapacityAwareTaskScheduler();
scheduler.scheduleAtFixedRate(runner,
ParallecGlobalConfig.schedulerInitDelay,
ParallecGlobalConfig.schedulerCheckInterval,
TimeUnit.MILLISECONDS);
logger.info("initialized daemon task scheduler to evaluate waitQ tasks.");
}
} | [
"as it is daemon thread\n\nTODO when release external resources should shutdown the scheduler."
] | [
"Initializes unspecified sign properties using available defaults\nand global settings.",
"Get image ID from imageTag on the current agent.\n\n@param imageTag\n@return",
"Reads a string of single byte characters from the input array.\nThis method assumes that the string finishes either at the\nend of the array, or when char zero is encountered.\nReading begins at the supplied offset into the array.\n\n@param data byte array of data\n@param offset offset into the array\n@return string value",
"Use this API to unset the properties of systemuser resources.\nProperties that need to be unset are specified in args array.",
"Plots the MSD curve with the trajectory t and adds the fitted model for confined diffusion above.\n@param t Trajectory to calculate the msd curve\n@param lagMin Minimum timelag (e.g. 1,2,3..) lagMin*timelag = elapsed time in seconds\n@param lagMax Maximum timelag (e.g. 1,2,3..) lagMax*timelag = elapsed time in seconds\n@param timelag Elapsed time between two frames.\n@param a Parameter alpha\n@param b Shape parameter 1\n@param c Shape parameter 2\n@param d Diffusion coefficient",
"Helper method to split a string by a given character, with empty parts omitted.",
"Log a warning for the given operation at the provided address for the given attribute, using the provided detail\nmessage.\n\n@param address where warning occurred\n@param operation where which problem occurred\n@param message custom error message to append\n@param attribute attribute we that has problem",
"Throws one RendererException if the viewType, layoutInflater or parent are null.",
"Transforms a single configuration file using the given transformation source.\n\n@param file the configuration file\n@param transformSource the transform soruce\n\n@throws TransformerConfigurationException -\n@throws IOException -\n@throws SAXException -\n@throws TransformerException -\n@throws ParserConfigurationException -"
] |
public static PersistenceStrategy<?, ?, ?> getInstance(
CacheMappingType cacheMapping,
EmbeddedCacheManager externalCacheManager,
URL configurationUrl,
JtaPlatform jtaPlatform,
Set<EntityKeyMetadata> entityTypes,
Set<AssociationKeyMetadata> associationTypes,
Set<IdSourceKeyMetadata> idSourceTypes ) {
if ( cacheMapping == CacheMappingType.CACHE_PER_KIND ) {
return getPerKindStrategy(
externalCacheManager,
configurationUrl,
jtaPlatform
);
}
else {
return getPerTableStrategy(
externalCacheManager,
configurationUrl,
jtaPlatform,
entityTypes,
associationTypes,
idSourceTypes
);
}
} | [
"Returns a persistence strategy based on the passed configuration.\n\n@param cacheMapping the selected {@link org.hibernate.ogm.datastore.keyvalue.options.CacheMappingType}\n@param externalCacheManager the infinispan cache manager\n@param configurationUrl the location of the configuration file\n@param jtaPlatform the {@link JtaPlatform}\n@param entityTypes the meta-data of the entities\n@param associationTypes the meta-data of the associations\n@param idSourceTypes the meta-data of the id generators\n@return the persistence strategy"
] | [
"Export data base contents to a directory using supplied connection.\n\n@param connection database connection\n@param directory target directory\n@throws Exception",
"Returns the export format indicated in the result-type parameter \"layoutManager\"\n@param _invocation\n@return",
"Returns the query string currently in the text field.\n\n@return the query string",
"Clone layer information considering what may be copied to the client.\n\n@param original layer info\n@return cloned copy including only allowed information",
"Checks to make sure that pseudo scoped beans (i.e. @Dependent scoped beans) have no circular dependencies.",
"Performs a null edit on an entity. This has some effects on Wikibase,\nsuch as refreshing the labels of the referred items in the UI.\n\n@param currentDocument\nthe document to perform a null edit on\n@throws MediaWikiApiErrorException\nif the API returns errors\n@throws IOException\nif there are any IO errors, such as missing network connection",
"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.",
"Append the given item to the end of the list\n@param segment segment to append",
"This is the main entry point used to convert the internal representation\nof timephased work into an external form which can\nbe displayed to the user.\n\n@param projectCalendar calendar used by the resource assignment\n@param work timephased resource assignment data\n@param rangeUnits timescale units\n@param dateList timescale date ranges\n@return list of durations, one per timescale date range"
] |
private void setViewPagerScroller() {
try {
Field scrollerField = ViewPager.class.getDeclaredField("mScroller");
scrollerField.setAccessible(true);
Field interpolatorField = ViewPager.class.getDeclaredField("sInterpolator");
interpolatorField.setAccessible(true);
scroller = new CustomDurationScroller(getContext(), (Interpolator)interpolatorField.get(null));
scrollerField.set(this, scroller);
} catch (Exception e) {
e.printStackTrace();
}
} | [
"set ViewPager scroller to change animation duration when sliding"
] | [
"Multiple of gradient windwos per masc relation of x y\n\n@return int[]",
"Process TestCaseStartedEvent. New testCase will be created and added\nto suite as child.\n\n@param event to process",
"Build the crosstab. Throws LayoutException if anything is wrong\n@return",
"Wrap getOperationStatus to avoid throwing exception over JMX",
"Wrap Statement with a proxy.\n@param target statement handle\n@param connectionHandle originating bonecp connection\n@return Proxy to a statement.",
"This static method calculated the rho of a call option under a Black-Scholes model\n\n@param initialStockValue The initial value of the underlying, i.e., the spot.\n@param riskFreeRate The risk free rate of the bank account numerarie.\n@param volatility The Black-Scholes volatility.\n@param optionMaturity The option maturity T.\n@param optionStrike The option strike.\n@return The rho of the option",
"Recycle all views in the list. The host views might be reused for other data to\nsave resources on creating new widgets.",
"Generate date patterns based on the project configuration.\n\n@param properties project properties\n@return date patterns",
"Fetches a list of available photo licenses for Flickr.\n\nThis method does not require authentication.\n\n@return A collection of License objects\n@throws FlickrException"
] |
private static boolean validateLocalFileRecord(FileChannel channel, long startLocRecord, long compressedSize) throws IOException {
ByteBuffer lfhBuffer = getByteBuffer(LOCLEN);
read(lfhBuffer, channel, startLocRecord);
if (lfhBuffer.limit() < LOCLEN || getUnsignedInt(lfhBuffer, 0) != LOCSIG) {
return false;
}
if (compressedSize == -1) {
// We can't further evaluate
return true;
}
int fnLen = getUnsignedShort(lfhBuffer, LOC_FILENAMELEN);
int extFieldLen = getUnsignedShort(lfhBuffer, LOC_EXTFLDLEN);
long nextSigPos = startLocRecord + LOCLEN + compressedSize + fnLen + extFieldLen;
read(lfhBuffer, channel, nextSigPos);
long header = getUnsignedInt(lfhBuffer, 0);
return header == LOCSIG || header == EXTSIG || header == CENSIG;
} | [
"Checks that the data starting at startLocRecord looks like a local file record header.\n\n@param channel the channel\n@param startLocRecord offset into channel of the start of the local record\n@param compressedSize expected compressed size of the file, or -1 to indicate this isn't known"
] | [
"Given the initial and final cluster dumps it into the output directory\n\n@param currentCluster Initial cluster metadata\n@param finalCluster Final cluster metadata\n@param outputDirName Output directory where to dump this file\n@param filePrefix String to prepend to the initial & final cluster\nmetadata files\n@throws IOException",
"Input method, called by a Subscriber indicating its intent into receive notification about a given topic.\n\n@param sr DTO containing the info given by the protocol",
"Set the value for a floating point vector of length 3.\n@param key name of uniform to set.\n@param x new X value\n@param y new Y value\n@param z new Z value\n@see #getVec3\n@see #getFloatVec(String)",
"Sets the right padding character for all cells in the table.\n@param paddingRightChar new padding character, ignored if null\n@return this to allow chaining",
"Returns an array of all endpoints\n\n@param profileId ID of profile\n@param clientUUID UUID of client\n@param filters filters to apply to endpoints\n@return Collection of endpoints\n@throws Exception exception",
"Retrieve the default aliases to be applied to MPXJ task and resource fields.\n\n@return map of aliases",
"Used to determine if multiple cost rates apply to this assignment.\n\n@return true if multiple cost rates apply to this assignment",
"Adds a new email alias to this user's account and confirms it without user interaction.\nThis functionality is only available for enterprise admins.\n@param email the email address to add as an alias.\n@param isConfirmed whether or not the email alias should be automatically confirmed.\n@return the newly created email alias.",
"Kicks off an animation that will result in the pointer being centered in the\npie slice of the currently selected item."
] |
public AssemblyResponse cancelAssembly(String url)
throws RequestException, LocalOperationException {
Request request = new Request(this);
return new AssemblyResponse(request.delete(url, new HashMap<String, Object>()));
} | [
"cancels a running assembly.\n\n@param url full url of the Assembly.\n@return {@link AssemblyResponse}\n@throws RequestException if request to transloadit server fails.\n@throws LocalOperationException if something goes wrong while running non-http operations."
] | [
"Use this API to expire cachecontentgroup.",
"Returns the version of Jenkins Artifactory Plugin or empty string if not found\n\n@return the version of Jenkins Artifactory Plugin or empty string if not found",
"Use this API to update gslbsite resources.",
"Render json.\n\n@param o\nthe o\n@return the string",
"Record the checkout queue length\n\n@param dest Destination of the socket to checkout. Will actually record\nif null. Otherwise will call this on self and corresponding child\nwith this param null.\n@param queueLength The number of entries in the \"synchronous\" checkout\nqueue.",
"Prepare a batch api request using list of individual reuests.\n@param requests list of api requests that has to be executed in batch.",
"Returns an integer array that contains the current values for all the\ntexture parameters.\n\n@return an integer array that contains the current values for all the\ntexture parameters.",
"Returns true if the class node represents a the class node for the Class class\nand if the parametrized type is a neither a placeholder or a wildcard. For example,\nthe class node Class<Foo> where Foo is a class would return true, but the class\nnode for Class<?> would return false.\n@param classNode a class node to be tested\n@return true if it is the class node for Class and its generic type is a real class",
"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."
] |
private static void writeNumber(Class<?> numberClass, Number value, CharBuf buffer) {
if (numberClass == Integer.class) {
buffer.addInt((Integer) value);
} else if (numberClass == Long.class) {
buffer.addLong((Long) value);
} else if (numberClass == BigInteger.class) {
buffer.addBigInteger((BigInteger) value);
} else if (numberClass == BigDecimal.class) {
buffer.addBigDecimal((BigDecimal) value);
} else if (numberClass == Double.class) {
Double doubleValue = (Double) value;
if (doubleValue.isInfinite()) {
throw new JsonException("Number " + value + " can't be serialized as JSON: infinite are not allowed in JSON.");
}
if (doubleValue.isNaN()) {
throw new JsonException("Number " + value + " can't be serialized as JSON: NaN are not allowed in JSON.");
}
buffer.addDouble(doubleValue);
} else if (numberClass == Float.class) {
Float floatValue = (Float) value;
if (floatValue.isInfinite()) {
throw new JsonException("Number " + value + " can't be serialized as JSON: infinite are not allowed in JSON.");
}
if (floatValue.isNaN()) {
throw new JsonException("Number " + value + " can't be serialized as JSON: NaN are not allowed in JSON.");
}
buffer.addFloat(floatValue);
} else if (numberClass == Byte.class) {
buffer.addByte((Byte) value);
} else if (numberClass == Short.class) {
buffer.addShort((Short) value);
} else { // Handle other Number implementations
buffer.addString(value.toString());
}
} | [
"Serializes Number value and writes it into specified buffer."
] | [
"Finds an entity given its primary key.\n\n@throws RowNotFoundException\nIf no such object was found.\n@throws TooManyRowsException\nIf more that one object was returned for the given ID.",
"Gets the numeric codes. Setting it to -1 search for currencies that have no numeric code.\n\n@return the query for chaining.",
"Use this API to fetch autoscaleprofile resource of given name .",
"Use this API to update autoscaleaction resources.",
"Search down all extent classes and return max of all found\nPK values.",
"Add image with a exception message in the PDF document.\n\n@param context\nPDF context\n@param e\nexception to put in image",
"to avoid creation of unmaterializable proxies",
"determine the what state a transaction is in by inspecting the primary column",
"Internal used method to retrieve object based on Identity.\n\n@param id\n@return\n@throws PersistenceBrokerException"
] |
public void setResourceCalendar(ProjectCalendar calendar)
{
set(ResourceField.CALENDAR, calendar);
if (calendar == null)
{
setResourceCalendarUniqueID(null);
}
else
{
calendar.setResource(this);
setResourceCalendarUniqueID(calendar.getUniqueID());
}
} | [
"This method allows a pre-existing resource calendar to be attached to a\nresource.\n\n@param calendar resource calendar"
] | [
"Add the string representation of the given object to this sequence. The given indentation will be prepended to\neach line except the first one if the object has a multi-line string representation.\n\n@param object\nthe appended object.\n@param indentation\nthe indentation string that should be prepended. May not be <code>null</code>.",
"This method extracts data for a single calendar from an MSPDI file.\n\n@param calendar Calendar data\n@param map Map of calendar UIDs to names\n@param baseCalendars list of base calendars",
"Converts the given dislect to a human-readable datasource type.",
"Returns a correlation matrix which has rank < n and for which the first n factors agree with the factors of correlationMatrix.\n\n@param correlationMatrix The given correlation matrix.\n@param numberOfFactors The requested number of factors (Eigenvectors).\n@return Factor reduced correlation matrix.",
"Pump events from event stream.",
"This method writes extended attribute data for an assignment.\n\n@param xml MSPDI assignment\n@param mpx MPXJ assignment",
"Calculate the value of a CMS strike using the Black-Scholes model for the swap rate together with\nthe Hunt-Kennedy convexity adjustment.\n\n@param forwardSwaprate The forward swap rate\n@param volatility Volatility of the log of the swap rate\n@param swapAnnuity The swap annuity\n@param optionMaturity The option maturity\n@param swapMaturity The swap maturity\n@param payoffUnit The payoff unit, e.g., the discount factor corresponding to the payment date\n@param optionStrike The option strike\n@return Value of the CMS strike",
"Abort and close the transaction. Calling abort abandons all persistent\nobject modifications and releases the associated locks. Aborting a\ntransaction does not restore the state of modified transient objects",
"Expands all tabs into spaces. Assumes the CharSequence represents a single line of text.\n\n@param self A line to expand\n@param tabStop The number of spaces a tab represents\n@return The expanded toString() of this CharSequence\n@see #expandLine(String, int)\n@since 1.8.2"
] |
private static int getBlockLength(String text, int offset)
{
int startIndex = offset;
boolean finished = false;
char c;
while (finished == false)
{
c = text.charAt(offset);
switch (c)
{
case '\r':
case '\n':
case '}':
{
finished = true;
break;
}
default:
{
++offset;
break;
}
}
}
int length = offset - startIndex;
return (length);
} | [
"Calculates the length of the next block of RTF data.\n\n@param text RTF data\n@param offset current offset into this data\n@return block length"
] | [
"Restore authentications from persisted state.\n\n@param savedAuthorization saved authorizations",
"Get the real Object for already materialized Handler\n\n@param objectOrProxy\n@return Object or null if the Handel is not materialized",
"Roll the java.util.Time forward or backward.\n\n@param startDate - The start date\n@param period Calendar.YEAR etc\n@param amount - Negative to rollbackwards.",
"Sort MapRows based on a named attribute.\n\n@param rows map rows to sort\n@param attribute attribute to sort on\n@return list argument (allows method chaining)",
"Go over the task list and create a map of stealerId -> Tasks\n\n@param sbTaskList List of all stealer-based rebalancing tasks to be\nscheduled.",
"all objects in list1 that are not in list2\n\n@param <T>\n@param list1\nFirst collection\n@param list2\nSecond collection\n@return The collection difference list1 - list2",
"Process a file.\n\n@param file the file to be processed\n@param mode the patching mode\n@throws IOException",
"flush all messages to disk\n\n@param force flush anyway(ignore flush interval)",
"read a producer request from buffer\n\n@param buffer data buffer\n@return parsed producer request"
] |
public DbArtifact getArtifact(final String gavc) {
final DbArtifact artifact = repositoryHandler.getArtifact(gavc);
if(artifact == null){
throw new WebApplicationException(Response.status(Response.Status.NOT_FOUND)
.entity("Artifact " + gavc + " does not exist.").build());
}
return artifact;
} | [
"Return an artifact regarding its gavc\n\n@param gavc String\n@return DbArtifact"
] | [
"Converts the given string to a clob object\n\n@param stringName string name to clob\n@param sqlConnection Connection object\n@return Clob object or NULL",
"Recursively read a task, and any sub tasks.\n\n@param mpxjParent Parent for the MPXJ tasks\n@param gpTask GanttProject task",
"Handling out request.\n\n@param message\nthe message\n@throws Fault\nthe fault",
"Process the given key and value. First validate the value and check if there's no different value for the same key in the same source - invalid and\ndifferent values are treated as a deployment problem.\n\n@param properties\n@param key\n@param value",
"Build the key for the TableAlias based on the path and the hints\n@param aPath\n@param hintClasses\n@return the key for the TableAlias",
"Record a new event.",
"Called by spring when application context is being destroyed.",
"Sets a custom response on an endpoint using default profile and client\n\n@param pathValue path (endpoint) value\n@param requestType path request type. \"GET\", \"POST\", etc\n@param customData custom response data\n@return true if success, false otherwise",
"Returns the connection that has been saved or null if none."
] |
private String listToCSV(List<String> list) {
String csvStr = "";
for (String item : list) {
csvStr += "," + item;
}
return csvStr.length() > 1 ? csvStr.substring(1) : csvStr;
} | [
"Concat a List into a CSV String.\n@param list list to concat\n@return csv string"
] | [
"a specialized version of solve that avoid additional checks that are not needed.",
"Does the slice contain only 7-bit ASCII characters.",
"Use this API to fetch lbvserver_cachepolicy_binding resources of given name .",
"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",
"Use this API to fetch a vpnglobal_authenticationsamlpolicy_binding resources.",
"Main method for testing fetching",
"Subtracts vector v1 from v2 and places the result in this vector.\n\n@param v1\nleft-hand vector\n@param v2\nright-hand vector",
"Deserialize a javascript design document file to a DesignDocument object.\n\n@param file the design document javascript file (UTF-8 encoded)\n@return {@link DesignDocument}\n@throws FileNotFoundException if the file does not exist or cannot be read",
"Creates a copy with verbose mode enabled.\n\n@param serverSetups the server setups.\n@return copies of server setups with verbose mode enabled."
] |
public void setDay(Day d)
{
if (m_day != null)
{
m_parentCalendar.removeHoursFromDay(this);
}
m_day = d;
m_parentCalendar.attachHoursToDay(this);
} | [
"Set day.\n\n@param d day instance"
] | [
"Gets the publisher wrapped by the specofoed FlexiblePublisher.\n@param publisher The FlexiblePublisher wrapping the publisher.\n@param type The type of the publisher wrapped by the FlexiblePublisher.\n@return The publisher object wrapped by the FlexiblePublisher.\nNull is returned if the FlexiblePublisher does not wrap a publisher of the specified type.\n@throws IllegalArgumentException In case publisher is not of type\n{@link org.jenkins_ci.plugins.flexible_publish.FlexiblePublisher}",
"Re-initializes the shader texture used to fill in\nthe Circle upon drawing.",
"Counts additional occurrences of a property as the main property of\nstatements.\n\n@param usageStatistics\nstatistics object where count is stored\n@param property\nthe property to count\n@param count\nthe number of times to count the property",
"Process the graphical indicator data.",
"format with lazy-eval",
"Validates the input parameters.",
"Samples a batch of indices in the range [0, numExamples) without replacement.",
"Converts a class into a signature token.\n\n@param c class\n@return signature token text",
"Process events in the order as they were received.\n\n<p/>\n\nThe overall time to process the events must be within the bounds of the\ntimeout or an {@link InsufficientOperationalNodesException} will be\nthrown."
] |
public static List<StoreDefinition> validateRebalanceStore(List<StoreDefinition> storeDefList) {
List<StoreDefinition> returnList = new ArrayList<StoreDefinition>(storeDefList.size());
for(StoreDefinition def: storeDefList) {
if(!def.isView() && !canRebalanceList.contains(def.getType())) {
throw new VoldemortException("Rebalance does not support rebalancing of stores of type "
+ def.getType() + " - " + def.getName());
} else if(!def.isView()) {
returnList.add(def);
} else {
logger.debug("Ignoring view " + def.getName() + " for rebalancing");
}
}
return returnList;
} | [
"Given a list of store definitions, makes sure that rebalance supports all\nof them. If not it throws an error.\n\n@param storeDefList List of store definitions\n@return Filtered list of store definitions which rebalancing supports"
] | [
"Unkink FK fields of target object.\n\n@param targetObject real (non-proxy) target object\n@param cld {@link ClassDescriptor} of the real target object\n@param rds An {@link ObjectReferenceDescriptor} or {@link CollectionDescriptor}\nassociated with the real object.",
"Updates the text style according to a new text position\n@param bstyle the style to be updated\n@param text the text position",
"Use this API to fetch vlan_interface_binding resources of given name .",
"Use this API to update route6.",
"Calculate the Hamming distance between two hashes\n\n@param h1\n@param h2\n@return",
"Retrieve the default aliases to be applied to MPXJ task and resource fields.\n\n@return map of aliases",
"Extracts a house holder vector from the column of A and stores it in u\n@param A Complex matrix with householder vectors stored in the lower left triangle\n@param row0 first row in A (implicitly assumed to be r + i0)\n@param row1 last row + 1 in A\n@param col Column in A\n@param u Output array storage\n@param offsetU first index in U",
"Update the background color of the mBgCircle image view.",
"Sets any application-specific custom fields. The values\nare presented to the application and the iPhone doesn't\ndisplay them automatically.\n\nThis can be used to pass specific values (urls, ids, etc) to\nthe application in addition to the notification message\nitself.\n\n@param key the custom field name\n@param value the custom field value\n@return this"
] |
public static List<Versioned<byte[]>> resolveVersions(List<Versioned<byte[]>> values) {
List<Versioned<byte[]>> resolvedVersions = new ArrayList<Versioned<byte[]>>(values.size());
// Go over all the values and determine whether the version is
// acceptable
for(Versioned<byte[]> value: values) {
Iterator<Versioned<byte[]>> iter = resolvedVersions.iterator();
boolean obsolete = false;
// Compare the current version with a set of accepted versions
while(iter.hasNext()) {
Versioned<byte[]> curr = iter.next();
Occurred occurred = value.getVersion().compare(curr.getVersion());
if(occurred == Occurred.BEFORE) {
obsolete = true;
break;
} else if(occurred == Occurred.AFTER) {
iter.remove();
}
}
if(!obsolete) {
// else update the set of accepted versions
resolvedVersions.add(value);
}
}
return resolvedVersions;
} | [
"Given a set of versions, constructs a resolved list of versions based on\nthe compare function above\n\n@param values\n@return list of values after resolution"
] | [
"Use this API to fetch all the systementitydata resources that are configured on netscaler.\nThis uses systementitydata_args which is a way to provide additional arguments while fetching the resources.",
"Returns the primary port of the server.\n\n@return the primary {@link ServerPort} if the server is started. {@link Optional#empty()} otherwise.",
"Returns the value of the matrix at the specified index of the 1D row major array.\n\n@see DMatrixRMaj#get(int)\n\n@param index The element's index whose value is to be returned\n@return The value of the specified element.",
"Ask the specified player for the specified waveform preview from the specified media slot, first checking if we\nhave a cached copy.\n\n@param dataReference uniquely identifies the desired waveform preview\n\n@return the preview, if it was found, or {@code null}\n\n@throws IllegalStateException if the WaveformFinder is not running",
"Reports a dependency of this node has been faulted.\n\n@param dependencyKey the id of the dependency node\n@param throwable the reason for unsuccessful resolution",
"The method determines if the type can be resolved and if not, will try to guess the qualified name using the information from the imports.",
"Build a stack trace for this path. This can be used in generating more meaningful exceptions\nwhile using Crawljax in conjunction with JUnit for example.\n\n@return a array of StackTraceElements denoting the steps taken by this path. The first\nelement [0] denotes the last {@link Eventable} on this path while the last item\ndenotes the first {@link Eventable} executed.",
"Override the thread context ClassLoader with the environment's bean ClassLoader\nif necessary, i.e. if the bean ClassLoader is not equivalent to the thread\ncontext ClassLoader already.\n@param classLoaderToUse the actual ClassLoader to use for the thread context\n@return the original thread context ClassLoader, or {@code null} if not overridden",
"Return the value from the field in the object that is defined by this FieldType. If the field is a foreign object\nthen the ID of the field is returned instead."
] |
public static boolean isInteger(CharSequence self) {
try {
Integer.valueOf(self.toString().trim());
return true;
} catch (NumberFormatException nfe) {
return false;
}
} | [
"Determine if a CharSequence can be parsed as an Integer.\n\n@param self a CharSequence\n@return true if the CharSequence can be parsed\n@see #isInteger(String)\n@since 1.8.2"
] | [
"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)",
"Create a collection object of the given collection type. If none has been given,\nOJB uses RemovalAwareList, RemovalAwareSet, or RemovalAwareCollection depending\non the field type.\n\n@param desc The collection descriptor\n@param collectionClass The collection class specified in the collection-descriptor\n@return The collection object",
"Returns screen height and width\n\n@param context\nAny non-null Android Context\n@param p\nOptional Point to reuse. If null, a new Point will be created.\n@return .x is screen width; .y is screen height.",
"Create a new server group\n\n@param groupName name of server group\n@return Created ServerGroup",
"Read the name of a table and prepare to populate it with column data.\n\n@param startIndex start of the block\n@param blockLength length of the block",
"Get the section list\n\nN.B. The section list contains the bottom sections\n@return the list of sections setted",
"Helper method to retrieve a canonical revision for git commits migrated from SVN. Migrated commits are\ndetected by the presence of 'git-svn-id' in the commit message.\n\n@param revision the commit/revision to inspect\n@param branch the name of the branch it came from\n@return the original SVN revision if it was a migrated commit from the branch specified, otherwise the git revision",
"This method can be used by child classes to apply the configuration that is stored in config.",
"Checks if a document exist in the database.\n\n@param id The document _id field.\n@return true If the document is found, false otherwise."
] |
public static base_response delete(nitro_service client, String serverip) throws Exception {
ntpserver deleteresource = new ntpserver();
deleteresource.serverip = serverip;
return deleteresource.delete_resource(client);
} | [
"Use this API to delete ntpserver of given name."
] | [
"Create a standalone target.\n\n@param controllerClient the connected controller client to a standalone instance.\n@return the remote target",
"Plots the MSD curve with the trajectory t and adds the fitted model for directed motion above.\n@param t\n@param lagMin Minimum timelag (e.g. 1,2,3..) lagMin*timelag = elapsed time in seconds\n@param lagMax lagMax Maximum timelag (e.g. 1,2,3..) lagMax*timelag = elapsed time in seconds\n@param timelag Elapsed time between two frames.\n@param diffusionCoefficient Diffusion coefficient\n@param velocity velocity of the active transport",
"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)",
"Method must be invoked upon completion of a rebalancing task. It is the\ntask's responsibility to do so.\n\n@param stealerId\n@param donorId",
"Method used to instantiate the appropriate input stream reader,\na standard one, or one which can deal with \"encrypted\" data.\n\n@param directory directory entry\n@param name file name\n@return new input stream\n@throws IOException",
"Returns the given text with the first letter in upper case.\n\n<h2>Examples:</h2>\n<pre>\ncapitalize(\"hi\") == \"Hi\"\ncapitalize(\"Hi\") == \"Hi\"\ncapitalize(\"hi there\") == \"hi there\"\ncapitalize(\"\") == \"\"\ncapitalize(null) == null\n</pre>\n@param text the text to capitalize\n@return text with the first letter in upper case",
"Samples a batch of indices in the range [0, numExamples) without replacement.",
"Check if this path matches the address path.\nAn address matches this address if its path elements match or are valid\nmulti targets for this path elements. Addresses that are equal are matching.\n\n@param address The path to check against this path. If null, this method\nreturns false.\n@return true if the provided path matches, false otherwise.",
"Returns width and height that allow the given source width, height to fit inside the target width, height\nwithout losing aspect ratio"
] |
protected void showStep(A_CmsSetupStep step) {
Window window = newWindow();
window.setContent(step);
window.setCaption(step.getTitle());
A_CmsUI.get().addWindow(window);
window.center();
} | [
"Shows the given step.\n\n@param step the step"
] | [
"Send a failed operation response.\n\n@param context the request context\n@param errorCode the error code\n@param message the operation message\n@throws IOException for any error",
"Sets the server groups for the deployment.\n\n@param serverGroups the server groups to set\n\n@return this deployment",
"Returns the aliased certificate. Certificates are aliased by their hostname.\n@see ThumbprintUtil\n@param alias\n@return\n@throws KeyStoreException\n@throws UnrecoverableKeyException\n@throws NoSuchProviderException\n@throws NoSuchAlgorithmException\n@throws CertificateException\n@throws SignatureException\n@throws CertificateNotYetValidException\n@throws CertificateExpiredException\n@throws InvalidKeyException\n@throws CertificateParsingException",
"Return all server groups for a profile\n\n@param profileId ID of profile\n@return collection of ServerGroups for a profile",
"Adds OPT_P | OPT_PARTITION option to OptionParser, with multiple\narguments.\n\n@param parser OptionParser to be modified\n@param required Tells if this option is required or optional",
"Sets the file-pointer offset, measured from the beginning of this file,\nat which the next read or write occurs.",
"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}",
"Get the filters ExporterServiceFilter and ExportDeclarationFilter from the properties, stop the instance if one of.\nthem is invalid.",
"Resolve the subsystem versions.\n\n@param extensions the extensions to install\n@return the subsystem versions"
] |
public T copy() {
T ret = createLike();
ret.getMatrix().set(this.getMatrix());
return ret;
} | [
"Creates and returns a matrix which is idential to this one.\n\n@return A new identical matrix."
] | [
"Un-serialize a Json into Module\n@param module String\n@return Module\n@throws IOException",
"Send an ERROR log message with specified subsystem. If subsystem is not enabled the message\nwill not be logged\n@param subsystem logging subsystem\n@param tag Used to identify the source of a log message. It usually identifies the class or\nactivity where the log call occurs.\n@param msg The message you would like logged.\n@return",
"Handles the cases in which we can use longs rather than BigInteger\n\n@param section\n@param increment\n@param addrCreator\n@param lowerProducer\n@param upperProducer\n@param prefixLength\n@return",
"Compares current cluster with final cluster. Uses pertinent store defs\nfor each cluster to determine if a node that hosts a zone-primary in the\ncurrent cluster will no longer host any zone-nary in the final cluster.\nThis check is the precondition for a server returning an invalid metadata\nexception to a client on a normal-case put or get. Normal-case being that\nthe zone-primary receives the pseudo-master put or the get operation.\n\n@param currentCluster\n@param currentStoreDefs\n@param finalCluster\n@param finalStoreDefs\n@return pretty-printed string documenting invalid metadata rates for each\nzone.",
"Build a String representation of given arguments.",
"Finds the null space of A\n@param A (Input) Matrix. Modified\n@param numSingularValues Number of singular values\n@param nullspace Storage for null-space\n@return true if successful or false if it failed",
"a small static helper to set a multi state drawable on a view\n\n@param icon\n@param iconColor\n@param selectedIcon\n@param selectedIconColor\n@param tinted\n@param imageView",
"Retrieves the avatar of a user as an InputStream.\n\n@return InputStream representing the user avater.",
"Check if this request is part of the specified request. This is the case if both requests have equal properties\nand the specified request is asking for the same or more paint operations than this one.\n\n@param request another request\n@return true if the current request is contained in the specified request\n@since 1.10.0"
] |
public static DMatrixRMaj wrap(int numRows , int numCols , double []data ) {
DMatrixRMaj s = new DMatrixRMaj();
s.data = data;
s.numRows = numRows;
s.numCols = numCols;
return s;
} | [
"Creates a new DMatrixRMaj around the provided data. The data must encode\na row-major matrix. Any modification to the returned matrix will modify the\nprovided data.\n\n@param numRows Number of rows in the matrix.\n@param numCols Number of columns in the matrix.\n@param data Data that is being wrapped. Referenced Saved.\n@return A matrix which references the provided data internally."
] | [
"Function to filter files based on defined rules.",
"Adds custom header to request\n\n@param key\n@param value",
"returns a collection of Reader LockEntries for object obj.\nIf now LockEntries could be found an empty Vector is returned.",
"Returns a new color with a new value of the specified HSL\ncomponent.",
"Parse an extended attribute date value.\n\n@param value string representation\n@return date value",
"Extract schema of the key field",
"Returns a string representation of the receiver, containing\nthe String representation of each key-value pair, sorted ascending by value.",
"This method computes the list of unnamed parameters, by filtering the\nlist of raw arguments, stripping out the named parameters.",
"Use this API to unset the properties of ipv6 resource.\nProperties that need to be unset are specified in args array."
] |
private void processOutlineCodeValues() throws IOException
{
DirectoryEntry outlineCodeDir = (DirectoryEntry) m_projectDir.getEntry("TBkndOutlCode");
FixedMeta fm = new FixedMeta(new DocumentInputStream(((DocumentEntry) outlineCodeDir.getEntry("FixedMeta"))), 10);
FixedData fd = new FixedData(fm, new DocumentInputStream(((DocumentEntry) outlineCodeDir.getEntry("FixedData"))));
Map<Integer, FieldType> map = new HashMap<Integer, FieldType>();
int items = fm.getItemCount();
for (int loop = 0; loop < items; loop++)
{
byte[] data = fd.getByteArrayValue(loop);
if (data.length < 18)
{
continue;
}
int index = MPPUtility.getShort(data, 0);
int fieldID = MPPUtility.getInt(data, 12);
FieldType fieldType = FieldTypeHelper.getInstance(fieldID);
if (fieldType.getFieldTypeClass() != FieldTypeClass.UNKNOWN)
{
map.put(Integer.valueOf(index), fieldType);
}
}
VarMeta outlineCodeVarMeta = new VarMeta9(new DocumentInputStream(((DocumentEntry) outlineCodeDir.getEntry("VarMeta"))));
Var2Data outlineCodeVarData = new Var2Data(outlineCodeVarMeta, new DocumentInputStream(((DocumentEntry) outlineCodeDir.getEntry("Var2Data"))));
Map<FieldType, List<Pair<String, String>>> valueMap = new HashMap<FieldType, List<Pair<String, String>>>();
for (Integer id : outlineCodeVarMeta.getUniqueIdentifierArray())
{
FieldType fieldType = map.get(id);
String value = outlineCodeVarData.getUnicodeString(id, VALUE);
String description = outlineCodeVarData.getUnicodeString(id, DESCRIPTION);
List<Pair<String, String>> list = valueMap.get(fieldType);
if (list == null)
{
list = new ArrayList<Pair<String, String>>();
valueMap.put(fieldType, list);
}
list.add(new Pair<String, String>(value, description));
}
for (Entry<FieldType, List<Pair<String, String>>> entry : valueMap.entrySet())
{
populateContainer(entry.getKey(), entry.getValue());
}
} | [
"Reads outline code custom field values and populates container."
] | [
"This is a temporary measure until we have a type-safe solution for\nretrieving serializers from a SerializerFactory. It avoids warnings all\nover the codebase while making it easy to verify who calls it.",
"Creates an empty block style definition.\n@return",
"Set the channel. This will return whether the channel could be set successfully or not.\n\n@param newChannel the channel\n@return whether the operation succeeded or not",
"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",
"A henson navigator is a class that helps a consumer to consume the navigation api that it\ndeclares in its dependencies. The henson navigator will wrap the intent builders. Thus, a\nhenson navigator, is driven by consumption of intent builders, whereas the henson classes are\ndriven by the production of an intent builder.\n\n<p>This task is created per android variant:\n\n<ul>\n<li>we scan the variant compile configuration for navigation api dependencies\n<li>we generate a henson navigator class for this variant that wraps the intent builders\n</ul>\n\n@param variant the variant for which to create a builder.\n@param hensonNavigatorPackageName the package name in which we create the class.",
"Provides a reverse view on the given list which is especially useful to traverse a list backwards in a for-each\nloop. The list itself is not modified by calling this method.\n\n@param list\nthe list whose elements should be traversed in reverse. May not be <code>null</code>.\n@return a list with the same elements as the given list, in reverse",
"Use this API to unset the properties of bridgetable resources.\nProperties that need to be unset are specified in args array.",
"Returns the length of the message in bytes as it is encoded on the wire.\n\nApple require the message to be of length 255 bytes or less.\n\n@return length of encoded message in bytes",
"Creates a date from the equivalent long value. This conversion\ntakes account of the time zone.\n\n@param date date expressed as a long integer\n@return new Date instance"
] |
public void merge(GVRSkeleton newSkel)
{
int numBones = getNumBones();
List<Integer> parentBoneIds = new ArrayList<Integer>(numBones + newSkel.getNumBones());
List<String> newBoneNames = new ArrayList<String>(newSkel.getNumBones());
List<Matrix4f> newMatrices = new ArrayList<Matrix4f>(newSkel.getNumBones());
GVRPose oldBindPose = getBindPose();
GVRPose curPose = getPose();
for (int i = 0; i < numBones; ++i)
{
parentBoneIds.add(mParentBones[i]);
}
for (int j = 0; j < newSkel.getNumBones(); ++j)
{
String boneName = newSkel.getBoneName(j);
int boneId = getBoneIndex(boneName);
if (boneId < 0)
{
int parentId = newSkel.getParentBoneIndex(j);
Matrix4f m = new Matrix4f();
newSkel.getBindPose().getLocalMatrix(j, m);
newMatrices.add(m);
newBoneNames.add(boneName);
if (parentId >= 0)
{
boneName = newSkel.getBoneName(parentId);
parentId = getBoneIndex(boneName);
}
parentBoneIds.add(parentId);
}
}
if (parentBoneIds.size() == numBones)
{
return;
}
int n = numBones + parentBoneIds.size();
int[] parentIds = Arrays.copyOf(mParentBones, n);
int[] boneOptions = Arrays.copyOf(mBoneOptions, n);
String[] boneNames = Arrays.copyOf(mBoneNames, n);
mBones = Arrays.copyOf(mBones, n);
mPoseMatrices = new float[n * 16];
for (int i = 0; i < parentBoneIds.size(); ++i)
{
n = numBones + i;
parentIds[n] = parentBoneIds.get(i);
boneNames[n] = newBoneNames.get(i);
boneOptions[n] = BONE_ANIMATE;
}
mBoneOptions = boneOptions;
mBoneNames = boneNames;
mParentBones = parentIds;
mPose = new GVRPose(this);
mBindPose = new GVRPose(this);
mBindPose.copy(oldBindPose);
mPose.copy(curPose);
mBindPose.sync();
for (int j = 0; j < newSkel.getNumBones(); ++j)
{
mBindPose.setLocalMatrix(numBones + j, newMatrices.get(j));
mPose.setLocalMatrix(numBones + j, newMatrices.get(j));
}
setBindPose(mBindPose);
mPose.sync();
updateBonePose();
} | [
"Merge the source skeleton with this one.\nThe result will be that this skeleton has all of its\noriginal bones and all the bones in the new skeleton.\n\n@param newSkel skeleton to merge with this one"
] | [
"Use this API to add vlan.",
"Returns the list of nodes which match the expression xpathExpr in the String domStr.\n\n@return the list of nodes which match the query\n@throws XPathExpressionException\n@throws IOException",
"Validate the configuration.\n\n@param validationErrors where to put the errors.",
"When the descriptor was added while editing, but the change was not saved, it has to be removed\nwhen the editor is closed.\n@throws CmsException thrown when deleting the descriptor resource fails",
"Returns whether this host should ignore operations from the master domain controller that target\nthe given address.\n\n@param address the resource address. Cannot be {@code null}\n\n@return {@code true} if the operation should be ignored; {@code false} otherwise",
"Infer app name from entry class\n\n@param entryClass\nthe entry class\n@return\napp name inferred from the entry class",
"Set a knot type.\n@param n the knot index\n@param type the type\n@see #getKnotType",
"Exchanges the initial fully-formed messages which establishes the transaction context for queries to\nthe dbserver.\n\n@throws IOException if there is a problem during the exchange",
"Destroy the proxy & update the map containing the registration ref.\n\n@param importDeclaration"
] |
public static double Entropy( int[] values ){
int n = values.length;
int total = 0;
double entropy = 0;
double p;
// calculate total amount of hits
for ( int i = 0; i < n; i++ )
{
total += values[i];
}
if ( total != 0 )
{
// for all values
for ( int i = 0; i < n; i++ )
{
// get item's probability
p = (double) values[i] / total;
// calculate entropy
if ( p != 0 )
entropy += ( -p * (Math.log10(p)/Math.log10(2)) );
}
}
return entropy;
} | [
"Calculate entropy value.\n@param values Values.\n@return Returns entropy value of the specified histogram array."
] | [
"Used to apply or update the watermark for the item.\n@param itemUrl url template for the item.\n@param imprint the value must be \"default\", as custom watermarks is not yet supported.\n@return the watermark associated with the item.",
"Return all Clients for a profile\n\n@param profileId ID of profile clients belong to\n@return collection of the Clients found\n@throws Exception exception",
"Get a project according to its full name.\n\n@param fullName The full name of the project.\n@return The project which answers the full name.",
"Resize the image passing the new height and width\n\n@param height\n@param width\n@return",
"Returns a list of all parts that have been uploaded to an upload session.\n@param offset paging marker for the list of parts.\n@param limit maximum number of parts to return.\n@return the list of parts.",
"Return the regression basis functions.\n\n@param exerciseDate The date w.r.t. which the basis functions should be measurable.\n@param model The model.\n@return Array of random variables.\n@throws net.finmath.exception.CalculationException Thrown if the valuation fails, specific cause may be available via the <code>cause()</code> method.",
"Use this API to fetch cmppolicylabel_cmppolicy_binding resources of given name .",
"Use this API to fetch tmtrafficpolicy_tmglobal_binding resources of given name .",
"Use this API to add tmtrafficaction resources."
] |
private void ensureToolValidForCreation(ExternalTool tool) {
//check for the unconditionally required fields
if(StringUtils.isAnyBlank(tool.getName(), tool.getPrivacyLevel(), tool.getConsumerKey(), tool.getSharedSecret())) {
throw new IllegalArgumentException("External tool requires all of the following for creation: name, privacy level, consumer key, shared secret");
}
//check that there is either a URL or a domain. One or the other is required
if(StringUtils.isBlank(tool.getUrl()) && StringUtils.isBlank(tool.getDomain())) {
throw new IllegalArgumentException("External tool requires either a URL or domain for creation");
}
} | [
"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"
] | [
"This is pretty ugly. We end up mimicking the request logic here, so this\nneeds to stay in sync with handleRequest.",
"Switches DB type.\n\n@param dbName the database type\n@param webapp the webapp name",
"Use this API to fetch statistics of streamidentifier_stats resource of given name .",
"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.",
"Deletes the first element from the receiver that matches the specified element.\nDoes nothing, if no such matching element is contained.\n\nTests elements for equality or identity as specified by <tt>testForEquality</tt>.\nWhen testing for equality, two elements <tt>e1</tt> and\n<tt>e2</tt> are <i>equal</i> if <tt>(e1==null ? e2==null :\ne1.equals(e2))</tt>.)\n\n@param testForEquality if true -> tests for equality, otherwise for identity.\n@param element the element to be deleted.",
"Gets a collection of all the email aliases for this user.\n\n<p>Note that the user's primary login email is not included in the collection of email aliases.</p>\n\n@return a collection of all the email aliases for this user.",
"Write a message to the console.\n\n@param pattern\nA {@link String#format(String, Object...)} pattern\n@param parameters\nOptional parameters to plug into the pattern",
"Writes the JavaScript code describing the tags as Tag classes to given writer.",
"Checks if the name of the file follows the version-n format\n\n@param versionDir The directory\n@return Returns true if the name is correct, else false"
] |
protected void putResponse(JSONObject json,
String param,
Object value) {
try {
json.put(param,
value);
} catch (JSONException e) {
logger.error("json write error",
e);
}
} | [
"Append data to JSON response.\n@param param\n@param value"
] | [
"Checks constraints on this model.\n\n@param checkLevel The amount of checks to perform\n@throws ConstraintException If a constraint has been violated",
"Adds an extent relation to the current class definition.\n\n@param attributes The attributes of the tag\n@return An empty string\n@exception XDocletException If an error occurs\[email protected] type=\"content\"\[email protected] name=\"name\" optional=\"false\" description=\"The fully qualified name of the extending\nclass\"",
"Creates the automaton map.\n\n@param prefix the prefix\n@param valueList the value list\n@param filter the filter\n@return the map",
"Use this API to unset the properties of lbsipparameters resource.\nProperties that need to be unset are specified in args array.",
"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",
"Set the repeat count of an override at ordinal index\n\n@param pathName Path name\n@param methodName Fully qualified method name\n@param ordinal 1-based index of the override within the overrides of type methodName\n@param repeatCount new repeat count to set\n@return true if success, false otherwise",
"Used to retrieve all metadata associated with the item.\n@param item item to get metadata for.\n@param fields the optional fields to retrieve.\n@return An iterable of metadata instances associated with the item.",
"Calculates the maximum text height which is possible based on the used Paint and its settings.\n\n@param _Paint Paint object which will be used to display a text.\n@param _Text The text which should be measured. If null, a default text is chosen, which\nhas a maximum possible height\n@return Maximum text height in px.",
"Decides what are the preferred credentials to use for resolving the repo keys of the server\n\n@return Preferred credentials for repo resolving. Never null."
] |
public static <T> List<T> toList(Iterable<T> items) {
List<T> list = new ArrayList<T>();
addAll(list, items);
return list;
} | [
"Create a list out of the items in the Iterable.\n\n@param <T>\nThe type of items in the Iterable.\n@param items\nThe items to be made into a list.\n@return A list consisting of the items of the Iterable, in the same order."
] | [
"Use this API to fetch all the systemcollectionparam resources that are configured on netscaler.",
"Retrieve a child record by name.\n\n@param key child record name\n@return child record",
"Add a rollback loader for a give patch.\n\n@param patchId the patch id.\n@param target the patchable target\n@throws XMLStreamException\n@throws IOException",
"This method takes a calendar of MPXJ library type, then returns a String of the\ngeneral working days USACE format. For example, the regular 5-day work week is\nNYYYYYN\n\nIf you get Fridays off work, then the String becomes NYYYYNN\n\n@param input ProjectCalendar instance\n@return work days string",
"Indicate whether the given URI matches this template.\n@param uri the URI to match to\n@return {@code true} if it matches; {@code false} otherwise",
"Returns true if the request should continue.\n\n@return",
"Infer the type of and create a new output variable using the results from the right side of the equation.\nIf the type is already known just return that.",
"Static method to convert a binary operator into a string.\n\n@param oper is the binary comparison operator to be converted",
"Creates a searchable item that represents a metadata field found for a track.\n\n@param menuItem the rendered menu item containing the searchable metadata field\n@return the searchable metadata field"
] |
public static final String printAccrueType(AccrueType value)
{
return (Integer.toString(value == null ? AccrueType.PRORATED.getValue() : value.getValue()));
} | [
"Print an accrue type.\n\n@param value AccrueType instance\n@return accrue type value"
] | [
"This is a method to stream slops to \"slop\" store when a node is detected\nfaulty in a streaming session\n\n@param key -- original key\n@param value -- original value\n@param storeName -- the store for which we are registering the slop\n@param failedNodeId -- the faulty node ID for which we register a slop\n@throws IOException",
"Returns all categories that are direct children of the current main category.\n\n@return all categories that are direct children of the current main category.",
"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.",
"Populates a calendar instance.\n\n@param record MPX record\n@param calendar calendar instance\n@param isBaseCalendar true if this is a base calendar",
"Returns an iterable containing all the enterprise users that matches the filter and specifies which child fields\nto retrieve from the API.\n@param api the API connection to be used when retrieving the users.\n@param filterTerm used to filter the results to only users starting with this string in either the name or the\nlogin. Can be null to not filter the results.\n@param fields the fields to retrieve. Leave this out for the standard fields.\n@return an iterable containing all the enterprise users that matches the filter.",
"Instantiates a new event collector.",
"2-D Complex Gabor function.\n\n@param x X axis coordinate.\n@param y Y axis coordinate.\n@param wavelength Wavelength.\n@param orientation Orientation.\n@param phaseOffset Phase offset.\n@param gaussVariance Gaussian variance.\n@param aspectRatio Aspect ratio.\n@return Gabor response.",
"Get a File path list from configuration.\n\n@param name the name of the property\n@param props the set of configuration properties\n\n@return the CanonicalFile form for the given name.",
"Not used."
] |
protected void reportWorked(int workIncrement, int currentUnitIndex) {
if (this.progress != null) {
if (this.progress.isCanceled()) {
// Only AbortCompilation can stop the compiler cleanly.
// We check cancellation again following the call to compile.
throw new AbortCompilation(true, null);
}
this.progress.worked(workIncrement, (this.totalUnits* this.remainingIterations) - currentUnitIndex - 1);
}
} | [
"Checks whether the compilation has been canceled and reports the given work increment to the compiler progress."
] | [
"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",
"Loads configuration from InputStream. Later loads have lower priority.\n\n@param in InputStream to load from\n@since 1.2.0",
"remove a converted object from the pool\n\n@param converter\n@param sourceObject\n@param destinationType",
"Determine if a task field contains data.\n\n@param task task instance\n@param field target field\n@return true if the field contains data",
"This method retrieves a byte array containing the data at the\ngiven index in the block. If no data is found at the given index\nthis method returns null.\n\n@param index index of the data item to be retrieved\n@return byte array containing the requested data",
"Return a public static method of a class.\n@param methodName the static method name\n@param clazz the class which defines the method\n@param args the parameter types to the method\n@return the static method, or {@code null} if no static method was found\n@throws IllegalArgumentException if the method name is blank or the clazz is null",
"Use this API to update dbdbprofile resources.",
"Moves the cursor to the given row number in the iterator. If the row\nnumber is positive, the cursor moves to the given row number with\nrespect to the beginning of the iterator. The first row is row 1, the\nsecond is row 2, and so on.\n\n@param row the row to move to in this iterator, by absolute number",
"Calculate the screen size of a tile. Normally the screen size is expressed in pixels and should therefore be\nintegers, but for the sake of accuracy we try to keep a double value as long as possible.\n\n@param worldSize\nThe width and height of a tile in the layer's world coordinate system.\n@param scale\nThe current client side scale.\n@return Returns an array of double values where the first value is the tile screen width and the second value is\nthe tile screen height."
] |
private MBeanServer getServerForName(String name) {
try {
MBeanServer mbeanServer = null;
final ObjectName objectNameQuery = new ObjectName(name + ":type=Service,*");
for (final MBeanServer server : MBeanServerFactory.findMBeanServer(null)) {
if (server.queryNames(objectNameQuery, null).size() > 0) {
mbeanServer = server;
// we found it, bail out
break;
}
}
return mbeanServer;
} catch (Exception e) {
}
return null;
} | [
"Returns an MBeanServer with the specified name\n\n@param name\n@return"
] | [
"Use this API to update snmpoption.",
"Retrieves a constant value.\n\n@param type field type\n@param block criteria data block\n@return constant value",
"Converts the given list of a type to paged list of a different type.\n\n@param list the list to convert to paged list\n@param mapper the mapper to map type in input list to output list\n@param <OutT> the type of items in output paged list\n@param <InT> the type of items in input paged list\n@return the paged list",
"Determine which field the Activity ID has been mapped to.\n\n@param map field map\n@return field",
"Handles an initial response from a PUT or PATCH operation response by polling the status of the operation\nasynchronously, once the operation finishes emits the final response.\n\n@param observable the initial observable from the PUT or PATCH operation.\n@param resourceType the java.lang.reflect.Type of the resource.\n@param <T> the return type of the caller.\n@return the observable of which a subscription will lead to a final response.",
"Get a list of all active server mappings defined for current profile\n\n@return Collection of ServerRedirects",
"Gets the UTF-8 sequence length of the code point.\n\n@throws InvalidCodePointException if code point is not within a valid range",
"Check if the provided manifestPath is correct.\nSet the manifest and imagePath in case of the correct manifest.\n@param manifestPath\n@param candidateImagePath\n@param dependenciesClient\n@param listener\n@return true if found the correct manifest\n@throws IOException",
"Use this API to fetch all the vrid6 resources that are configured on netscaler."
] |
public static systemsession get(nitro_service service, Long sid) throws Exception{
systemsession obj = new systemsession();
obj.set_sid(sid);
systemsession response = (systemsession) obj.get_resource(service);
return response;
} | [
"Use this API to fetch systemsession resource of given name ."
] | [
"Returns the project membership record.\n\n@param projectMembership Globally unique identifier for the project membership.\n@return Request object",
"Demonstrates obtaining the request history data from a test run",
"Wait to shutdown service\n\n@param executorService Executor service to shutdown\n@param timeOutSec Time we wait for",
"Makes the object unpickable and removes the touch handler for it\n@param sceneObject\n@return true if the handler has been successfully removed",
"Retrieve a duration in the form required by Phoenix.\n\n@param duration Duration instance\n@return formatted duration",
"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.",
"Retrieve the date range at the specified index.\nThe index is zero based, and this method will return\nnull if the requested date range does not exist.\n\n@param index range index\n@return date range instance",
"Use this API to update appfwlearningsettings resources.",
"Non-blocking call\n\n@param key\n@param value\n@return"
] |
public boolean classifySentenceStdin(DocumentReaderAndWriter<IN> readerWriter)
throws IOException
{
BufferedReader is = new BufferedReader(new InputStreamReader(System.in, flags.inputEncoding));
String line;
String text = "";
String eol = "\n";
String sentence = "<s>";
while ((line = is.readLine()) != null) {
if (line.trim().equals("")) {
text += sentence + eol;
ObjectBank<List<IN>> documents = makeObjectBankFromString(text, readerWriter);
classifyAndWriteAnswers(documents, readerWriter);
text = "";
} else {
text += line + eol;
}
}
if (text.trim().equals("")) {
return false;
}
return true;
} | [
"Classify stdin by senteces seperated by blank line\n@param readerWriter\n@return\n@throws IOException"
] | [
"Returns the undo collection representing the given namespace for recording documents that\nmay need to be reverted after a system failure.\n\n@param namespace the namespace referring to the undo collection.\n@return the undo collection representing the given namespace for recording documents that\nmay need to be reverted after a system failure.",
"Use this API to update vserver.",
"Default implementation returns unmodified original Query\n\n@see org.apache.ojb.broker.accesslayer.QueryCustomizer#customizeQuery",
"Computes the cross product of v1 and v2 and places the result in this\nvector.\n\n@param v1\nleft-hand vector\n@param v2\nright-hand vector",
"helper method to set the TranslucentStatusFlag\n\n@param on",
"Execute push docker image on agent\n\n@param launcher\n@param log\n@param imageTag\n@param username\n@param password\n@param host @return\n@throws IOException\n@throws InterruptedException",
"Create a SVG graphic with the give dimensions.\n\n@param size The size of the SVG graphic.",
"Return configuration tweaks in a format appropriate for ness-jdbc DatabaseModule.",
"Sets the path of the edited file in the corresponding display.\n@param editedFilePath path of the edited file to set."
] |
private long recover() throws IOException {
checkMutable();
long len = channel.size();
ByteBuffer buffer = ByteBuffer.allocate(4);
long validUpTo = 0;
long next = 0L;
do {
next = validateMessage(channel, validUpTo, len, buffer);
if (next >= 0) validUpTo = next;
} while (next >= 0);
channel.truncate(validUpTo);
setSize.set(validUpTo);
setHighWaterMark.set(validUpTo);
logger.info("recover high water mark:" + highWaterMark());
/* This should not be necessary, but fixes bug 6191269 on some OSs. */
channel.position(validUpTo);
needRecover.set(false);
return len - validUpTo;
} | [
"Recover log up to the last complete entry. Truncate off any bytes from any incomplete\nmessages written\n\n@throws IOException any exception"
] | [
"Returns a list of objects for each line in the spreadsheet, of the specified type.\n\n<p>\nIf the class is a view model then the objects will be properly instantiated (that is, using\n{@link DomainObjectContainer#newViewModelInstance(Class, String)}, with the correct\nview model memento); otherwise the objects will be simple transient objects (that is, using\n{@link DomainObjectContainer#newTransientInstance(Class)}).\n</p>",
"Add BoxMetaDataFilter to the JsonArray boxMetadataFilterRequestArray.\n@param @param bmf accepts a filter that has templateKey, scope, and filters populated.\n@return JsonArray that is formated Json request",
"Write the text to the File, using the specified encoding.\n\n@param file a File\n@param text the text to write to the File\n@param charset the charset used\n@throws IOException if an IOException occurs.\n@since 1.0",
"Retrieve a table of data.\n\n@param type table type\n@return FastTrackTable instance",
"Whether this section is consistent with an EUI64 section,\nwhich means it came from an extended 8 byte address,\nand the corresponding segments in the middle match 0xff and 0xfe\n\n@param partial whether missing segments are considered a match\n@return",
"Set the buttons size.",
"Updates the exceptions panel.",
"Returns whether the given host matches this one. For hosts to match, they must represent the same addresses or have the same host names.\nHosts are not resolved when matching. Also, hosts must have the same port and service. They must have the same masks if they are host names.\nEven if two hosts are invalid, they match if they have the same invalid string.\n\n@param host\n@return",
"Multiplied a transpose orthogonal matrix Q by the specified rotator. This is used\nto update the U and V matrices. Updating the transpose of the matrix is faster\nsince it only modifies the rows.\n\n\n@param Q Orthogonal matrix\n@param m Coordinate of rotator.\n@param n Coordinate of rotator.\n@param c cosine of rotator.\n@param s sine of rotator."
] |
public static int cudnnBatchNormalizationBackward(
cudnnHandle handle,
int mode,
Pointer alphaDataDiff,
Pointer betaDataDiff,
Pointer alphaParamDiff,
Pointer betaParamDiff,
cudnnTensorDescriptor xDesc, /** same desc for x, dx, dy */
Pointer x,
cudnnTensorDescriptor dyDesc,
Pointer dy,
cudnnTensorDescriptor dxDesc,
Pointer dx,
/** Shared tensor desc for the 4 tensors below */
cudnnTensorDescriptor dBnScaleBiasDesc,
Pointer bnScale, /** bnBias doesn't affect backpropagation */
/** scale and bias diff are not backpropagated below this layer */
Pointer dBnScaleResult,
Pointer dBnBiasResult,
/** Same epsilon as forward pass */
double epsilon,
/** Optionally cached intermediate results from
forward pass */
Pointer savedMean,
Pointer savedInvVariance)
{
return checkResult(cudnnBatchNormalizationBackwardNative(handle, mode, alphaDataDiff, betaDataDiff, alphaParamDiff, betaParamDiff, xDesc, x, dyDesc, dy, dxDesc, dx, dBnScaleBiasDesc, bnScale, dBnScaleResult, dBnBiasResult, epsilon, savedMean, savedInvVariance));
} | [
"Performs backward pass of Batch Normalization layer. Returns x gradient,\nbnScale gradient and bnBias gradient"
] | [
"Old SOAP client uses new SOAP service",
"Translate the operation address.\n\n@param op the operation\n@return the new operation",
"Sets all elements in this matrix to their absolute values. Note\nthat this operation is in-place.\n@see MatrixFunctions#abs(DoubleMatrix)\n@return this matrix",
"Use this API to fetch sslfipskey resource of given name .",
"Constructs a valid request and passes it on to the next handler. It also\ncreates the 'Store' object corresponding to the store name specified in\nthe REST request.\n\n@param requestValidator The Validator object used to construct the\nrequest object\n@param ctx Context of the Netty channel\n@param messageEvent Message Event used to write the response / exception",
"Attempts to revert the working copy. In case of failure it just logs the error.",
"Assemble and send a packet that performs sync control, turning a device's sync mode on or off, or telling it\nto become the tempo master.\n\n@param target an update from the device whose sync state is to be set\n@param command the byte identifying the specific sync command to be sent\n\n@throws IOException if there is a problem sending the command to the device",
"Use this API to add onlinkipv6prefix.",
"Gets the favorite entries corresponding to the currently displayed favorite widgets.\n\n@return the list of favorite entries"
] |
public <L extends Listener> void popEvent(Event<?, L> expected) {
synchronized (this.stack) {
final Event<?, ?> actual = this.stack.pop();
if (actual != expected) {
throw new IllegalStateException(String.format(
"Unbalanced pop: expected '%s' but encountered '%s'",
expected.getListenerClass(), actual));
}
}
} | [
"Pops the top event off the current event stack. This action has to be\nperformed immediately after the event has been dispatched to all\nlisteners.\n\n@param <L> Type of the listener.\n@param expected The Event which is expected at the top of the stack.\n@see #pushEvent(Event)"
] | [
"Gets Widget bounds height\n@return height",
"Use this API to flush cachecontentgroup resources.",
"Closes the window containing the given component.\n\n@param component a component",
"Remove a part of a CharSequence by replacing the first occurrence\nof target within self with '' and returns the result.\n\n@param self a CharSequence\n@param target an object representing the part to remove\n@return a String containing the original minus the part to be removed\n@see #minus(String, Object)\n@since 1.8.2",
"Validates a space separated list of emails.\n\n@param emails Space separated list of emails\n@return {@link hudson.util.FormValidation.ok()} if valid or empty, error otherwise",
"Checks if we can see any players that are on a different network than the one we chose for the Virtual CDJ.\nIf so, we are not going to be able to communicate with them, and they should all be moved onto a single\nnetwork.\n\n@return the device announcements of any players which are on unreachable networks, or hopefully an empty list\n@throws IllegalStateException if we are not running",
"Use this API to fetch all the rnatparam resources that are configured on netscaler.",
"Indicate whether the given URI matches this template.\n@param uri the URI to match to\n@return {@code true} if it matches; {@code false} otherwise",
"Update artifact download url of an artifact\n\n@param gavc String\n@param downLoadUrl String"
] |
public boolean isAssociation(String targetTypeName, List<String> pathWithoutAlias) {
OgmEntityPersister persister = getPersister( targetTypeName );
Type propertyType = persister.getPropertyType( pathWithoutAlias.get( 0 ) );
return propertyType.isAssociationType();
} | [
"Check if the path to the property correspond to an association.\n\n@param targetTypeName the name of the entity containing the property\n@param pathWithoutAlias the path to the property WITHOUT aliases\n@return {@code true} if the property is an association or {@code false} otherwise"
] | [
"Saves meta tree, writes database root and flushes the log.\n\n@param metaTree mutable meta tree\n@param env enclosing environment\n@param expired expired loggables (database root to be added)\n@return database root loggable which is read again from the log.",
"Creates the string mappings.\n\n@param mtasTokenIdFactory\nthe mtas token id factory\n@param level\nthe level\n@param stringValue\nthe string value\n@param offsetStart\nthe offset start\n@param offsetEnd\nthe offset end\n@param position\nthe position\n@throws IOException\nSignals that an I/O exception has occurred.",
"Finds and returns the date for the given event summary and year within the given ics file,\nor null if not present.",
"Is the transport secured by a JAX-WS property",
"Parse request parameters and files.\n@param request\n@param response",
"Returns the link for the given workplace resource.\n\nThis should only be used for resources under /system or /shared.<p<\n\n@param cms the current OpenCms user context\n@param resourceName the resource to generate the online link for\n@param forceSecure forces the secure server prefix\n\n@return the link for the given resource",
"Gets a document from the service.\n\n@param key\nunique key to reference the document\n@return the document or null if no such document",
"needs to be resolved once extension beans are deployed",
"Returns the command to run by the shell to normally run the checkin script.\n@return the command to run by the shell to normally run the checkin script."
] |
private void readException(ProjectCalendar bc, Project.Calendars.Calendar.Exceptions.Exception exception)
{
Date fromDate = exception.getTimePeriod().getFromDate();
Date toDate = exception.getTimePeriod().getToDate();
// Vico Schedule Planner seems to write start and end dates to FromTime and ToTime
// rather than FromDate and ToDate. This is plain wrong, and appears to be ignored by MS Project
// so we will ignore it too!
if (fromDate != null && toDate != null)
{
ProjectCalendarException bce = bc.addCalendarException(fromDate, toDate);
bce.setName(exception.getName());
readRecurringData(bce, exception);
Project.Calendars.Calendar.Exceptions.Exception.WorkingTimes times = exception.getWorkingTimes();
if (times != null)
{
List<Project.Calendars.Calendar.Exceptions.Exception.WorkingTimes.WorkingTime> time = times.getWorkingTime();
for (Project.Calendars.Calendar.Exceptions.Exception.WorkingTimes.WorkingTime period : time)
{
Date startTime = period.getFromTime();
Date endTime = period.getToTime();
if (startTime != null && endTime != null)
{
if (startTime.getTime() >= endTime.getTime())
{
endTime = DateHelper.addDays(endTime, 1);
}
bce.addRange(new DateRange(startTime, endTime));
}
}
}
}
} | [
"Read a single calendar exception.\n\n@param bc parent calendar\n@param exception exception data"
] | [
"Translate a Wikimedia language code to its preferred value\nif this code is deprecated, or return it untouched if the string\nis not a known deprecated Wikimedia language code\n\n@param wikimediaLanguageCode\nthe language code as used by Wikimedia\n@return\nthe preferred language code corresponding to the original language code",
"Set default values for the TimeAndSizeRollingAppender appender\n\n@param appender",
"URL-Decodes a given string using ISO-8859-1. No UnsupportedEncodingException to handle as it is dealt with in\nthis method.",
"Curries a function that takes four arguments.\n\n@param function\nthe original function. May not be <code>null</code>.\n@param argument\nthe fixed first argument of {@code function}.\n@return a function that takes three arguments. Never <code>null</code>.",
"Use this API to kill systemsession resources.",
"Get transformer to use.\n\n@return transformation to apply",
"Determines whether the specified permission is permitted.\n\n@param permission\n@return <tt>false<tt> if the specified permission is not permitted, based on the current security policy; <tt>true<tt> otherwise",
"Removes the given service provider factory from the set of\nproviders for the service.\n\n@param serviceName\nThe fully qualified name of the service interface.\n@param factory\nA factory for creating a specific type of service\nprovider. May be <tt>null</tt> in which case this\nmethod does nothing.\n@throws IllegalArgumentException if serviceName is <tt>null</tt>",
"Execute push docker image on agent\n\n@param launcher\n@param log\n@param imageTag\n@param username\n@param password\n@param host @return\n@throws IOException\n@throws InterruptedException"
] |
@Override
public void visit(Rule rule) {
Rule copy = null;
Filter filterCopy = null;
if (rule.getFilter() != null) {
Filter filter = rule.getFilter();
filterCopy = copy(filter);
}
List<Symbolizer> symsCopy = new ArrayList<Symbolizer>();
for (Symbolizer sym : rule.symbolizers()) {
if (!skipSymbolizer(sym)) {
Symbolizer symCopy = copy(sym);
symsCopy.add(symCopy);
}
}
Graphic[] legendCopy = rule.getLegendGraphic();
for (int i = 0; i < legendCopy.length; i++) {
legendCopy[i] = copy(legendCopy[i]);
}
Description descCopy = rule.getDescription();
descCopy = copy(descCopy);
copy = sf.createRule();
copy.symbolizers().addAll(symsCopy);
copy.setDescription(descCopy);
copy.setLegendGraphic(legendCopy);
copy.setName(rule.getName());
copy.setFilter(filterCopy);
copy.setElseFilter(rule.isElseFilter());
copy.setMaxScaleDenominator(rule.getMaxScaleDenominator());
copy.setMinScaleDenominator(rule.getMinScaleDenominator());
if (STRICT && !copy.equals(rule)) {
throw new IllegalStateException(
"Was unable to duplicate provided Rule:" + rule);
}
pages.push(copy);
} | [
"Overridden to skip some symbolizers."
] | [
"We have identified that we have an MDB file. This could be a Microsoft Project database\nor an Asta database. Open the database and use the table names present to determine\nwhich type this is.\n\n@param stream schedule data\n@return ProjectFile instance",
"Adds a column pair to this foreignkey.\n\n@param localColumn The column in the local table\n@param remoteColumn The column in the remote table",
"Use this API to add onlinkipv6prefix resources.",
"Obtains a local date in Pax 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 Pax local date, not null\n@throws DateTimeException if unable to create the date",
"Validates the inputed color value.\n@param colorvalue the value of the color\n@return true if the inputed color value is valid",
"Set the name of the schema containing the Primavera tables.\n\n@param schema schema name.",
"Puts strings inside quotes and numerics are left as they are.\n@param str\n@return",
"Use this API to update sslocspresponder.",
"Evalutes AND and OR operators.\n\n@param container data context\n@param promptValues responses to prompts\n@return operator result"
] |
public static IndexedContainer getGroupsOfUser(
CmsObject cms,
CmsUser user,
String caption,
String iconProp,
String ou,
String propStatus,
Function<CmsGroup, CmsCssIcon> iconProvider) {
IndexedContainer container = new IndexedContainer();
container.addContainerProperty(caption, String.class, "");
container.addContainerProperty(ou, String.class, "");
container.addContainerProperty(propStatus, Boolean.class, new Boolean(true));
if (iconProvider != null) {
container.addContainerProperty(iconProp, CmsCssIcon.class, null);
}
try {
for (CmsGroup group : cms.getGroupsOfUser(user.getName(), true)) {
Item item = container.addItem(group);
item.getItemProperty(caption).setValue(group.getSimpleName());
item.getItemProperty(ou).setValue(group.getOuFqn());
if (iconProvider != null) {
item.getItemProperty(iconProp).setValue(iconProvider.apply(group));
}
}
} catch (CmsException e) {
LOG.error("Unable to read groups from user", e);
}
return container;
} | [
"Gets container with alls groups of a certain user.\n\n@param cms cmsobject\n@param user to find groups for\n@param caption caption property\n@param iconProp property\n@param ou ou\n@param propStatus status property\n@param iconProvider the icon provider\n@return Indexed Container"
] | [
"Initializes the locales that can be selected via the language switcher in the bundle editor.\n@return the locales for which keys can be edited.",
"Returns the length of the message in bytes as it is encoded on the wire.\n\nApple require the message to be of length 255 bytes or less.\n\n@return length of encoded message in bytes",
"Removes columns from the matrix.\n\n@param A Matrix. Modified\n@param col0 First column\n@param col1 Last column, inclusive.",
"Reverses all the TransitionControllers managed by this TransitionManager",
"Retrieves a thumbnail, or smaller image representation, of this file. Sizes of 32x32, 64x64, 128x128,\nand 256x256 can be returned in the .png format and sizes of 32x32, 94x94, 160x160, and 320x320 can be returned\nin the .jpg format.\n\n@param fileType either PNG of JPG\n@param minWidth minimum width\n@param minHeight minimum height\n@param maxWidth maximum width\n@param maxHeight maximum height\n@return the byte array of the thumbnail image",
"Retrieve the configuration of the named template.\n\n@param name the template name;",
"Send an error to the client with an exception.\n\n@param httpServletResponse the http response to send the error to\n@param e the error that occurred",
"Creates a region from a name and a label.\n\n@param name the uniquely identifiable name of the region\n@param label the label of the region\n@return the newly created region",
"Get the node that has been selected by the user, or null if\nnothing is selected.\n@return The node or <code>null</code>"
] |
public static void applyMultiIconTo(Drawable icon, int iconColor, Drawable selectedIcon, int selectedIconColor, boolean tinted, ImageView imageView) {
//if we have an icon then we want to set it
if (icon != null) {
//if we got a different color for the selectedIcon we need a StateList
if (selectedIcon != null) {
if (tinted) {
imageView.setImageDrawable(new PressedEffectStateListDrawable(icon, selectedIcon, iconColor, selectedIconColor));
} else {
imageView.setImageDrawable(UIUtils.getIconStateList(icon, selectedIcon));
}
} else if (tinted) {
imageView.setImageDrawable(new PressedEffectStateListDrawable(icon, iconColor, selectedIconColor));
} else {
imageView.setImageDrawable(icon);
}
//make sure we display the icon
imageView.setVisibility(View.VISIBLE);
} else {
//hide the icon
imageView.setVisibility(View.GONE);
}
} | [
"a small static helper to set a multi state drawable on a view\n\n@param icon\n@param iconColor\n@param selectedIcon\n@param selectedIconColor\n@param tinted\n@param imageView"
] | [
"Create an MD5 hash of a string.\n\n@param input Input string.\n@return Hash of input.\n@throws IllegalArgumentException if {@code input} is blank.",
"This method extracts data for a single resource from a Phoenix file.\n\n@param phoenixResource resource data\n@return Resource instance",
"Prepare the options by adding additional information to them.\n@see <a href=\"https://docs.mongodb.com/manual/core/index-ttl/\">TTL Indexes</a>",
"Creates the parents of nested XML elements if necessary.\n@param xmlContent the XML content that is edited.\n@param xmlPath the path of the (nested) element, for which the parents should be created\n@param l the locale for which the XML content is edited.",
"Returns true if the given item document lacks a label for at least one of\nthe languages covered.\n\n@param itemDocument\n@return true if some label is missing",
"Converts a collection of dates to a JSON array with the long representation of the dates as strings.\n@param dates the list to convert.\n@return JSON array with long values of dates as string",
"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",
"Creates a random vector that is inside the specified span.\n\n@param span The span the random vector belongs in.\n@param rand RNG\n@return A random vector within the specified span.",
"Set the pattern scheme to either \"by weekday\" or \"by day of month\".\n@param isByWeekDay flag, indicating if the pattern \"by weekday\" should be set.\n@param fireChange flag, indicating if a value change event should be fired."
] |
public static float calcDet(Vector3 a ,Vector3 b, Vector3 c) {
return (a.x*(b.y-c.y)) - (a.y*(b.x-c.x)) + (b.x*c.y-b.y*c.x);
} | [
"checks if the triangle is not re-entrant"
] | [
"Convert gallery name to title key.\n@param gallery gallery name for example \"downloadgallery\"\n@return key as string \"ERR_REASON_NO_DOWNLOADGALLERY_0\"",
"This method removes all RTF formatting from a given piece of text.\n\n@param text Text from which the RTF formatting is to be removed.\n@return Plain text",
"Get list of asynchronous operations on this node. By default, only the\npending operations are returned.\n\n@param showCompleted Show completed operations\n@return A list of operation ids.",
"Removes the supplied marker from the map.\n\n@param marker",
"Ordinary noise function.\n\n@param x X Value.\n@param y Y Value.\n@return",
"Search for the attribute \"id\" and return the value.\n\n@return the id of this element or null when not found",
"Use this API to add dnsaaaarec resources.",
"Use this API to fetch responderpolicy resource of given name .",
"Unmarshals the XML content and adds the file to the bundle files.\n@throws CmsException thrown if reading the file or unmarshaling fails."
] |
public static ForwardCurveInterpolation createForwardCurveFromDiscountFactors(String name, double[] times, RandomVariable[] givenDiscountFactors, double paymentOffset) {
ForwardCurveInterpolation forwardCurveInterpolation = new ForwardCurveInterpolation(name, paymentOffset, InterpolationEntityForward.FORWARD, null);
if(times.length == 0) {
throw new IllegalArgumentException("Vector of times must not be empty.");
}
if(times[0] > 0) {
// Add first forward
RandomVariable forward = givenDiscountFactors[0].sub(1.0).pow(-1.0).div(times[0]);
forwardCurveInterpolation.addForward(null, 0.0, forward, true);
}
for(int timeIndex=0; timeIndex<times.length-1;timeIndex++) {
RandomVariable forward = givenDiscountFactors[timeIndex].div(givenDiscountFactors[timeIndex+1].sub(1.0)).div(times[timeIndex+1] - times[timeIndex]);
double fixingTime = times[timeIndex];
boolean isParameter = (fixingTime > 0);
forwardCurveInterpolation.addForward(null, fixingTime, forward, isParameter);
}
return forwardCurveInterpolation;
} | [
"Create a forward curve from given times and discount factors.\n\nThe forward curve will have times.length-1 fixing times from times[0] to times[times.length-2]\n<code>\nforward[timeIndex] = (givenDiscountFactors[timeIndex]/givenDiscountFactors[timeIndex+1]-1.0) / (times[timeIndex+1] - times[timeIndex]);\n</code>\nNote: If time[0] > 0, then the discount factor 1.0 will inserted at time 0.0\n\n@param name The name of this curve.\n@param times A vector of given time points.\n@param givenDiscountFactors A vector of given discount factors (corresponding to the given time points).\n@param paymentOffset The maturity of the underlying index modeled by this curve.\n@return A new ForwardCurve object."
] | [
"Replaces sequences of whitespaces with tabs within a line.\n\n@param self A line to unexpand\n@param tabStop The number of spaces a tab represents\n@return an unexpanded String\n@since 1.8.2",
"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",
"Awaits at most 5 minutes until all pods meets the given predicate.\n\n@param filter used to wait to detect that a pod is up and running.",
"Use this API to fetch vpnvserver_rewritepolicy_binding resources of given name .",
"Adds descriptions to the item.\n\n@param descriptions\nthe descriptions to add",
"Infer app name from entry class\n\n@param entryClass\nthe entry class\n@return\napp name inferred from the entry class",
"Reads a PEP file from the input stream.\n\n@param is input stream representing a PEP file",
"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",
"Converts the given list of a type to paged list of a different type.\n\n@param list the list to convert to paged list\n@param mapper the mapper to map type in input list to output list\n@param <OutT> the type of items in output paged list\n@param <InT> the type of items in input paged list\n@return the paged list"
] |
public static boolean isAvailable() throws Exception {
try {
Registry myRegistry = LocateRegistry.getRegistry("127.0.0.1", port);
com.groupon.odo.proxylib.hostsedit.rmi.Message impl = (com.groupon.odo.proxylib.hostsedit.rmi.Message) myRegistry.lookup(SERVICE_NAME);
return true;
} catch (Exception e) {
return false;
}
} | [
"Returns whether or not the host editor service is available\n\n@return\n@throws Exception"
] | [
"Writes a list of UDF types.\n\n@author lsong\n@param type parent entity type\n@param mpxj parent entity\n@return list of UDFAssignmentType instances",
"Compare an array of bytes with a subsection of a larger array of bytes.\n\n@param lhs small array of bytes\n@param rhs large array of bytes\n@param rhsOffset offset into larger array of bytes\n@return true if a match is found",
"Use this API to update nsrpcnode.",
"Make log segment file name from offset bytes. All this does is pad out the offset number\nwith zeros so that ls sorts the files numerically\n@param offset offset value (padding with zero)\n@return filename with offset",
"Returns a new iterator filtering any null references.\n\n@param unfiltered\nthe unfiltered iterator. May not be <code>null</code>.\n@return an unmodifiable iterator containing all elements of the original iterator without any <code>null</code>\nreferences. Never <code>null</code>.",
"Sets the matrix 'inv' equal to the inverse of the matrix that was decomposed.\n\n@param inv Where the value of the inverse will be stored. Modified.",
"Process normal calendar working and non-working days.\n\n@param calendar parent calendar",
"Use this API to fetch a vpnglobal_binding resource .",
"Acquire a calendar instance.\n\n@return Calendar instance"
] |
public CmsJspInstanceDateBean getToInstanceDate() {
if (m_instanceDate == null) {
m_instanceDate = new CmsJspInstanceDateBean(getToDate(), m_cms.getRequestContext().getLocale());
}
return m_instanceDate;
} | [
"Converts a date to an instance date bean.\n@return the instance date bean."
] | [
"Create an embedded host controller.\n\n@param jbossHomePath the location of the root of the host controller installation. Cannot be {@code null} or empty.\n@param modulePath the location of the root of the module repository. May be {@code null} if the standard\nlocation under {@code jbossHomePath} should be used\n@param systemPackages names of any packages that must be treated as system packages, with the same classes\nvisible to the caller's classloader visible to host-controller-side classes loaded from\nthe server's modular classloader\n@param cmdargs any additional arguments to pass to the embedded host controller (e.g. -b=192.168.100.10)\n@return the server. Will not be {@code null}",
"Given a set of versions, constructs a resolved list of versions based on\nthe compare function above\n\n@param values\n@return list of values after resolution",
"Get a list of destinations and the values matching templated parameter for the given path.\nReturns an empty list when there are no destinations that are matched.\n\n@param path path to be routed.\n@return List of Destinations matching the given route.",
"Read flow id from message.\n\n@param message the message\n@return the FlowId as string",
"resolves a Field or Property node generics by using the current class and\nthe declaring class to extract the right meaning of the generics symbols\n@param an a FieldNode or PropertyNode\n@param type the origin type\n@return the new ClassNode with corrected generics",
"Use this API to fetch tmtrafficpolicy_lbvserver_binding resources of given name .",
"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.",
"Creates a Resque backtrace from a Throwable's stack trace. Includes\ncauses.\n\n@param t\nthe Exception to use\n@return a list of strings that represent how the exception's stacktrace\nappears.",
"Reset hard on HEAD.\n\n@throws GitAPIException"
] |
private void instanceAlreadyLoaded(
final Tuple resultset,
final int i,
//TODO create an interface for this usage
final OgmEntityPersister persister,
final org.hibernate.engine.spi.EntityKey key,
final Object object,
final LockMode lockMode,
final SharedSessionContractImplementor session)
throws HibernateException {
if ( !persister.isInstance( object ) ) {
throw new WrongClassException(
"loaded object was of wrong class " + object.getClass(),
key.getIdentifier(),
persister.getEntityName()
);
}
if ( LockMode.NONE != lockMode && upgradeLocks() ) { // no point doing this if NONE was requested
final boolean isVersionCheckNeeded = persister.isVersioned() &&
session.getPersistenceContext().getEntry( object )
.getLockMode().lessThan( lockMode );
// we don't need to worry about existing version being uninitialized
// because this block isn't called by a re-entrant load (re-entrant
// loads _always_ have lock mode NONE)
if ( isVersionCheckNeeded ) {
//we only check the version when _upgrading_ lock modes
Object oldVersion = session.getPersistenceContext().getEntry( object ).getVersion();
persister.checkVersionAndRaiseSOSE( key.getIdentifier(), oldVersion, session, resultset );
//we need to upgrade the lock mode to the mode requested
session.getPersistenceContext().getEntry( object )
.setLockMode( lockMode );
}
}
} | [
"The entity instance is already in the session cache\n\nCopied from Loader#instanceAlreadyLoaded"
] | [
"Get a new token.\n\n@return 14 character String",
"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",
"Returns a new color with a new value of the specified HSL\ncomponent.",
"Use this API to add sslaction resources.",
"Determines the field via reflection look-up.\n\n@param clazz The java class to search in\n@param fieldName The field's name\n@return The field object or <code>null</code> if no matching field was found",
"Retrieve the default mapping between MPXJ task fields and Primavera wbs field names.\n\n@return mapping",
"Returns a single template.\n\n@param id id of the template to retrieve.\n@return {@link Response}\n\n@throws RequestException if request to transloadit server fails.\n@throws LocalOperationException if something goes wrong while running non-http operations.",
"Each schema set has its own database cluster. The template1 database has the schema preloaded so that\neach test case need only create a new database and not re-invoke Migratory.",
"Method used to extract data from the block of properties and\ninsert the key value pair into a map.\n\n@param data block of property data\n@param previousItemOffset previous offset\n@param previousItemKey item key\n@param itemOffset current item offset"
] |
public Iterable<BoxLegalHoldAssignment.Info> getAssignments(String ... fields) {
return this.getAssignments(null, null, DEFAULT_LIMIT, fields);
} | [
"Returns iterable containing assignments for this single legal hold policy.\n@param fields the fields to retrieve.\n@return an iterable containing assignments for this single legal hold policy."
] | [
"SearchService is a service which shares the information about Persons with the PersonService.\nIt lets users search for individual people using simple or complex search expressions.\nThe interaction with this service also verifies that the JAX-RS server is capable of supporting multiple\nroot resource classes",
"Standard doclet entry point\n@param root\n@return",
"Extract the parent WBS from a WBS.\n\n@param wbs current WBS\n@return parent WBS",
"Returns the command line options to be used for scalaxb, excluding the\ninput file names.",
"Adds a new Site matcher object to the map of server names.\n\n@param matcher the SiteMatcher of the server\n@param site the site to add",
"Method used to create missing timephased data.\n\n@param file project file\n@param assignment resource assignment\n@param timephasedPlanned planned timephased data\n@param timephasedComplete complete timephased data",
"Handle http worker response.\n\n@param respOnSingleReq\nthe my response\n@throws Exception\nthe exception",
"Call rollback on the underlying connection.",
"Creates an object instance from the Groovy resource\n\n@param resource the Groovy resource to parse\n@return An Object instance"
] |
private void removeObservation( int index ) {
final int N = y.numRows-1;
final double d[] = y.data;
// shift
for( int i = index; i < N; i++ ) {
d[i] = d[i+1];
}
y.numRows--;
} | [
"Removes an element from the observation matrix.\n\n@param index which element is to be removed"
] | [
"Sets the bottom padding character for all cells in the table.\n@param paddingBottomChar new padding character, ignored if null\n@return this to allow chaining",
"Use this API to add systemuser.",
"Use this API to update sslcertkey.",
"Perform the merge\n\n@param stereotypeAnnotations The stereotype annotations",
"Shutdown the server\n\n@throws Exception exception",
"Get all the names of inputs that are required to be in the Values object when this graph is executed.",
"Method to send Request messages to a specific df_service\n\n@param df_service\nThe name of the df_service\n@param msgContent\nThe content of the message to be sent\n@return Message sent to + the name of the df_service",
"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",
"Helper function to bind script bundler to various targets"
] |
public void forAllIndexDescriptorColumns(String template, Properties attributes) throws XDocletException
{
String fields = _curIndexDescriptorDef.getProperty(PropertyHelper.OJB_PROPERTY_FIELDS);
FieldDescriptorDef fieldDef;
String name;
for (CommaListIterator it = new CommaListIterator(fields); it.hasNext();)
{
name = it.getNext();
fieldDef = _curClassDef.getField(name);
if (fieldDef == null)
{
throw new XDocletException(Translator.getString(XDocletModulesOjbMessages.class,
XDocletModulesOjbMessages.INDEX_FIELD_MISSING,
new String[]{name, _curIndexDescriptorDef.getName(), _curClassDef.getName()}));
}
_curIndexColumn = fieldDef.getProperty(PropertyHelper.OJB_PROPERTY_COLUMN);
generate(template);
}
_curIndexColumn = null;
} | [
"Processes the template for all index columns for the current index descriptor.\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\""
] | [
"poll the response queue for response\n\n@param timeout timeout amount\n@param timeUnit timeUnit of timeout\n@return same result of BlockQueue.poll(long, TimeUnit)\n@throws InterruptedException",
"Use this API to fetch aaagroup_authorizationpolicy_binding resources of given name .",
"Query a player to determine the port on which its database server is running.\n\n@param announcement the device announcement with which we detected a new player on the network.",
"Rotate list of String. Used for randomize selection of received endpoints\n\n@param strings\nlist of Strings\n@return the same list in random order",
"This handler will be triggered when there's no search result",
"Returns the set of synchronized documents in a namespace.\n\n@param namespace the namespace to get synchronized documents for.\n@return the set of synchronized documents in a namespace.",
"compares two AST nodes",
"Generic version of getting value by key from the JobContext of current thread\n@param key the key\n@param clz the val class\n@param <T> the val type\n@return the value",
"Abort the daemon\n\n@param error the error causing the abortion"
] |
public static nstimer_binding get(nitro_service service, String name) throws Exception{
nstimer_binding obj = new nstimer_binding();
obj.set_name(name);
nstimer_binding response = (nstimer_binding) obj.get_resource(service);
return response;
} | [
"Use this API to fetch nstimer_binding resource of given name ."
] | [
"Updates event definitions for all throwing events.\n@param def Definitions",
"Adds all pairs from 'fromMap' to 'toMap' excluding once that matching the pattern",
"Returns the URL of a classpath resource.\n\n@param resourceName\nThe name of the resource.\n\n@return The URL.",
"Check config.\n\n@param context the context\n@return true, if successful\n@throws Exception the exception",
"Check if information model entity referenced by archetype\nhas right name or type",
"Returns a new color that has the hue adjusted by the specified\namount.",
"Remove any mapping for this key, and return any previously\nmapped value.\n\n@param key the key whose mapping is to be removed\n@return the value removed, or null",
"Turn a resultset into EndpointOverride\n\n@param results results containing relevant information\n@return EndpointOverride\n@throws Exception exception",
"Visits a dependence of the current module.\n\n@param module the qualified name of the dependence.\n@param access the access flag of the dependence among\nACC_TRANSITIVE, ACC_STATIC_PHASE, ACC_SYNTHETIC\nand ACC_MANDATED.\n@param version the module version at compile time or null."
] |
public boolean getNumericBoolean(int field)
{
boolean result = false;
if ((field < m_fields.length) && (m_fields[field].length() != 0))
{
result = Integer.parseInt(m_fields[field]) == 1;
}
return (result);
} | [
"Accessor method used to retrieve a Boolean object representing the\ncontents of an individual field. If the field does not exist in the\nrecord, null is returned.\n\n@param field the index number of the field to be retrieved\n@return the value of the required field"
] | [
"Set a new Cursor position if active and enabled.\n\n@param x x value of the position\n@param y y value of the position\n@param z z value of the position",
"Given the histogram of columns compute the col_idx for the matrix. nz_length is automatically set and\nnz_values will grow if needed.\n@param histogram histogram of column values in the sparse matrix. modified, see above.",
"Initialize the key set for an xml bundle.",
"Deserializes a variable, checking whether the datatype is custom or not\n@param s\n@param variableType\n@param dataTypes\n@return",
"This function computes which reduce task to shuffle a record to.",
"Internal method that finds the matching enum for a configured field that has the name argument.\n\n@return The matching enum value or null if blank enum name.\n@throws IllegalArgumentException\nIf the enum name is not known.",
"Read a task from a ConceptDraw PROJECT file.\n\n@param projectIdentifier parent project identifier\n@param map outline number to task map\n@param task ConceptDraw PROJECT task",
"Support the range subscript operator for GString\n\n@param text a GString\n@param range a Range\n@return the String of characters corresponding to the provided range\n@since 2.3.7",
"Returns the configured body or the default value."
] |
protected void handleResponseOut(T message) throws Fault {
Message reqMsg = message.getExchange().getInMessage();
if (reqMsg == null) {
LOG.warning("InMessage is null!");
return;
}
// No flowId for oneway message
Exchange ex = reqMsg.getExchange();
if (ex.isOneWay()) {
return;
}
String reqFid = FlowIdHelper.getFlowId(reqMsg);
// if some interceptor throws fault before FlowIdProducerIn fired
if (reqFid == null) {
if (LOG.isLoggable(Level.FINE)) {
LOG.fine("Some interceptor throws fault.Setting FlowId in response.");
}
reqFid = FlowIdProtocolHeaderCodec.readFlowId(message);
}
// write IN message to SAM repo in case fault
if (reqFid == null) {
Message inMsg = ex.getInMessage();
reqFid = FlowIdProtocolHeaderCodec.readFlowId(inMsg);
if (null != reqFid) {
if (LOG.isLoggable(Level.FINE)) {
LOG.fine("FlowId '" + reqFid
+ "' found in message of fault incoming exchange.");
LOG.fine("Calling EventProducerInterceptor to log IN message");
}
handleINEvent(ex, reqFid);
}
}
if (reqFid == null) {
reqFid = FlowIdSoapCodec.readFlowId(message);
}
if (reqFid != null) {
if (LOG.isLoggable(Level.FINE)) {
LOG.fine("FlowId '" + reqFid + "' found in incoming message.");
}
} else {
reqFid = ContextUtils.generateUUID();
// write IN message to SAM repo in case fault
if (null != ex.getOutFaultMessage()) {
if (LOG.isLoggable(Level.FINE)) {
LOG.fine("FlowId '" + reqFid
+ "' generated for fault message.");
LOG.fine("Calling EventProducerInterceptor to log IN message");
}
handleINEvent(ex, reqFid);
}
if (LOG.isLoggable(Level.FINE)) {
LOG.fine("No flowId found in incoming message! Generate new flowId "
+ reqFid);
}
}
FlowIdHelper.setFlowId(message, reqFid);
} | [
"Handling out responce.\n\n@param message\nthe message\n@throws Fault\nthe fault"
] | [
"Imports a file via assimp without post processing.\n\n@param filename the file to import\n@return the loaded scene\n@throws IOException if an error occurs",
"Use this API to fetch all the spilloverpolicy resources that are configured on netscaler.",
"Generates a vector clock with the provided values\n\n@param serverIds servers in the clock\n@param clockValue value of the clock for each server entry\n@param timestamp ts value to be set for the clock\n@return",
"Assigns the element in the Matrix to the specified value. Performs a bounds check to make sure\nthe requested element is part of the matrix.\n\n@param row The row of the element.\n@param col The column of the element.\n@param value The element's new value.",
"Edit the text of a comment as the currently authenticated user.\n\nThis method requires authentication with 'write' permission.\n\n@param commentId\nThe id of the comment to edit.\n@param commentText\nUpdate the comment to this text.\n@throws FlickrException",
"Handles subscription verification callback from Facebook.\n@param subscription The subscription name.\n@param challenge A challenge that Facebook expects to be returned.\n@param verifyToken A verification token that must match with the subscription's token given when the controller was created.\n@return The challenge if the verification token matches; blank string otherwise.",
"From the set of classes a new set is built containing all indexed\nsubclasses, but removing then all subtypes of indexed entities.\n\n@param selection\n\n@return a new set of entities",
"Check whether the patch can be applied to a given target.\n\n@param condition the conditions\n@param target the target\n@throws PatchingException",
"Re-initializes the shader texture used to fill in\nthe Circle upon drawing."
] |
protected void createNewFile(final File file) {
try {
file.createNewFile();
setFileNotWorldReadablePermissions(file);
} catch (IOException e){
throw new RuntimeException(e);
}
} | [
"This creates a new audit log file with default permissions.\n\n@param file File to create"
] | [
"Parses formatter attributes.\n\n@param formatterLoc the node location\n@return the map of formatter attributes (unmodifiable)",
"Merges two lists together.\n\n@param one first list\n@param two second list\n@return merged lists",
"Get Rule\nGet a rule using the Rule ID\n@param ruleId Rule ID. (required)\n@return RuleEnvelope\n@throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body",
"Parser for forecast\n\n@param feed\n@return",
"Determine the current state the server is in.\n\n@return the server status",
"Registers a BeanNameAutoProxyCreator class that wraps the bean being\nmonitored. The proxy is associated with the PerformanceMonitorInterceptor\nfor the bean, which is created when parsing the methods attribute from\nthe springconfiguration xml file.\n\n@param source An Attribute node from the spring configuration\n@param holder A container for the beans I will create\n@param context the context currently parsing my spring config",
"This method returns the length of overlapping time between two time\nranges.\n\n@param start1 start of first range\n@param end1 end of first range\n@param start2 start start of second range\n@param end2 end of second range\n@return overlapping time in milliseconds",
"Either a single file extension or a comma-separated list of extensions for which the language\nshall be registered.",
"123.2.3.4 is 4.3.2.123.in-addr.arpa."
] |
PathAddress toPathAddress(final ObjectName name) {
return ObjectNameAddressUtil.toPathAddress(rootObjectInstance.getObjectName(), getRootResourceAndRegistration().getRegistration(), name);
} | [
"Convert an ObjectName to a PathAddress.\n\nPatterns are supported: there may not be a resource at the returned PathAddress but a resource model <strong>MUST</strong>\nmust be registered."
] | [
"Upgrades a read transaction to a write transaction, executes the work then downgrades to a read transaction\nagain.\n\n@since 2.4\n@noreference",
"Obtain newline-delimited headers from response\n\n@param response HttpServletResponse to scan\n@return newline-delimited headers",
"Used to create a new retention policy with optional parameters.\n@param api the API connection to be used by the created user.\n@param name the name of the retention policy.\n@param type the type of the retention policy. Can be \"finite\" or \"indefinite\".\n@param length the duration in days that the retention policy will be active for after being assigned to content.\n@param action the disposition action can be \"permanently_delete\" or \"remove_retention\".\n@param optionalParams the optional parameters.\n@return the created retention policy's info.",
"Use this API to fetch all the appfwprofile resources that are configured on netscaler.",
"Add a property with the given name and the given list of values to this Properties object. Name\nand values are trimmed before the property is added.\n\n@param name the name of the property, must not be <code>null</code>.\n@param values the values of the property, must no be <code>null</code>,\nnone of the values must be <code>null</code>",
"Parses a string that contains multiple fat client configs in avro format\n\n@param configAvro Input string of avro format, that contains config for\nmultiple stores\n@return Map of store names to store config properties",
"Store some state on this request context associated with the specified interceptor instance.\nUsed where a single interceptor instance needs to associate state with each HTTP request.\n\n@param interceptor the interceptor instance\n@param stateName the key to store the state object under\n@param stateObjectToStore the state object to store\n@param <T> the type of the state object to store\n@see #getState(HttpConnectionInterceptor, String, Class)\n@since 2.6.0",
"Returns all values that can be selected in the widget.\n@param cms the current CMS object\n@param rootPath the root path to the currently edited xml file (sitemap config)\n@param allRemoved flag, indicating if all inheritedly available formatters should be disabled\n@return all values that can be selected in the widget.",
"Checks whether the compilation has been canceled and reports the given work increment to the compiler progress."
] |
public static void dumpMaterial(AiMaterial material) {
for (AiMaterial.Property prop : material.getProperties()) {
dumpMaterialProperty(prop);
}
} | [
"Dumps all properties of a material to stdout.\n\n@param material the material"
] | [
"Use this API to fetch statistics of service_stats resource of given name .",
"Gets an entry point for the given deployment. If one does not exist it will be created. If the request controller is disabled\nthis will return null.\n\nEntry points are reference counted. If this method is called n times then {@link #removeControlPoint(ControlPoint)}\nmust also be called n times to clean up the entry points.\n\n@param deploymentName The top level deployment name\n@param entryPointName The entry point name\n@return The entry point, or null if the request controller is disabled",
"Notification that the process has become unstable.\n\n@return {@code true} if this is a change in status",
"With the Batik SVG library it is only possible to create new SVG graphics, but you can not modify an\nexisting graphic. So, we are loading the SVG file as plain XML and doing the modifications by hand.",
"Creates a non-binary media type with the given type, subtype, and charSet\n@throws com.tngtech.jgiven.exception.JGivenWrongUsageException if any of the given arguments is {@code null}",
"not start with another option name",
"Sets page shift orientation. The pages might be shifted horizontally or vertically relative\nto each other to make the content of each page on the screen at least partially visible\n@param orientation",
"Creates the save and exit button UI Component.\n@return the save and exit button.",
"for testing purpose"
] |
private boolean isToIgnore(CtElement element) {
if (element instanceof CtStatementList && !(element instanceof CtCase)) {
if (element.getRoleInParent() == CtRole.ELSE || element.getRoleInParent() == CtRole.THEN) {
return false;
}
return true;
}
return element.isImplicit() || element instanceof CtReference;
} | [
"Ignore some element from the AST\n\n@param element\n@return"
] | [
"Last caller of this method will unregister the Mbean. All callers\ndecrement the counter.",
"Delete the proxy history for the active profile\n\n@throws Exception exception",
"Use this API to fetch authenticationldappolicy_vpnglobal_binding resources of given name .",
"Notification that boot has completed successfully and the configuration history should be updated",
"Extracts the last revision id from the JSON response returned\nby the API after an edit\n\n@param response\nthe response as returned by Mediawiki\n@return\nthe new revision id of the edited entity\n@throws JsonMappingException",
"Configures a worker pool for the converter.\n\n@param corePoolSize The core pool size of the worker pool.\n@param maximumPoolSize The maximum pool size of the worker pool.\n@param keepAliveTime The keep alive time of the worker pool.\n@param unit The time unit of the specified keep alive time.\n@return This builder instance.",
"Calls the specified Stitch function, and decodes the response into an instance of the specified\ntype. The response will be decoded using the codec registry given.\n\n@param name the name of the Stitch function to call.\n@param args the arguments to pass to the Stitch function.\n@param requestTimeout the number of milliseconds the client should wait for a response from the\nserver before failing with an error.\n@param resultClass the class that the Stitch response should be decoded as.\n@param <T> the type into which the Stitch response will be decoded.\n@param codecRegistry the codec registry that will be used to encode/decode the function call.\n@return the decoded value.",
"Set the maximum date limit.",
"Returns the name of the class to be instantiated.\n@param rs the Resultset\n@return null if the column is not available"
] |
public Collection<License> getInfo() throws FlickrException {
Map<String, Object> parameters = new HashMap<String, Object>();
parameters.put("method", METHOD_GET_INFO);
Response response = transportAPI.get(transportAPI.getPath(), parameters, apiKey, sharedSecret);
if (response.isError()) {
throw new FlickrException(response.getErrorCode(), response.getErrorMessage());
}
List<License> licenses = new ArrayList<License>();
Element licensesElement = response.getPayload();
NodeList licenseElements = licensesElement.getElementsByTagName("license");
for (int i = 0; i < licenseElements.getLength(); i++) {
Element licenseElement = (Element) licenseElements.item(i);
License license = new License();
license.setId(licenseElement.getAttribute("id"));
license.setName(licenseElement.getAttribute("name"));
license.setUrl(licenseElement.getAttribute("url"));
licenses.add(license);
}
return licenses;
} | [
"Fetches a list of available photo licenses for Flickr.\n\nThis method does not require authentication.\n\n@return A collection of License objects\n@throws FlickrException"
] | [
"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",
"Obtains a local date in Discordian calendar system from the\nera, year-of-era and day-of-year fields.\n\n@param era the Discordian era, not null\n@param yearOfEra the year-of-era\n@param dayOfYear the day-of-year\n@return the Discordian local date, not null\n@throws DateTimeException if unable to create the date\n@throws ClassCastException if the {@code era} is not a {@code DiscordianEra}",
"Use this API to fetch all the snmpmanager resources that are configured on netscaler.",
"Use this API to fetch aaagroup_authorizationpolicy_binding resources of given name .",
"Handling out request.\n\n@param message\nthe message\n@throws Fault\nthe fault",
"Use this API to update aaaparameter.",
"Convert a URL Encoded name back to the original form.\n@param name the name to URL urlDecode.\n@param encoding the string encoding to be used (i.e. UTF-8)\n@return the name in original form.\n@throws UnsupportedEncodingException if the encoding is not supported.",
"Tells you if the expression is a null safe dereference.\n@param expression\nexpression\n@return\ntrue if is null safe dereference.",
"Returns the value of the identified field as a Boolean.\n@param fieldName the name of the field\n@return the value of the field as a Boolean"
] |
protected static Map<String, List<Statement>> addStatementToGroups(Statement statement, Map<String, List<Statement>> claims) {
Map<String, List<Statement>> newGroups = new HashMap<>(claims);
String pid = statement.getMainSnak().getPropertyId().getId();
if(newGroups.containsKey(pid)) {
List<Statement> newGroup = new ArrayList<>(newGroups.get(pid).size());
boolean statementReplaced = false;
for(Statement existingStatement : newGroups.get(pid)) {
if(existingStatement.getStatementId().equals(statement.getStatementId()) &&
!existingStatement.getStatementId().isEmpty()) {
statementReplaced = true;
newGroup.add(statement);
} else {
newGroup.add(existingStatement);
}
}
if(!statementReplaced) {
newGroup.add(statement);
}
newGroups.put(pid, newGroup);
} else {
newGroups.put(pid, Collections.singletonList(statement));
}
return newGroups;
} | [
"Adds a Statement to a given collection of statement groups.\nIf the statement id is not null and matches that of an existing statement,\nthis statement will be replaced.\n\n@param statement\n@param claims\n@return"
] | [
"Resolve the single type argument of the given generic interface against\nthe given target class which is assumed to implement the generic interface\nand possibly declare a concrete type for its type variable.\n@param clazz the target class to check against\n@param genericIfc the generic interface or superclass to resolve the type argument from\n@return the resolved type of the argument, or {@code null} if not resolvable",
"get bearer token returned by IAM in JSON format",
"The only indication that a task is a SubProject is the contents\nof the subproject file name field. We test these here then add a skeleton\nsubproject structure to match the way we do things with MPP files.",
"A property tied to the map, updated when the idle state event is fired.\n\n@return",
"Add a path to a profile, returns the id\n\n@param id ID of profile\n@param pathname name of path\n@param actualPath value of path\n@return ID of path created\n@throws Exception exception",
"Set the value of a field using its alias.\n\n@param alias field alias\n@param value field value",
"Makes a DocumentReaderAndWriter based on\nflags.plainTextReaderAndWriter. Useful for reading in\nuntokenized text documents or reading plain text from the command\nline. An example of a way to use this would be to return a\nedu.stanford.nlp.wordseg.Sighan2005DocumentReaderAndWriter for\nthe Chinese Segmenter.",
"Invokes the ready tasks.\n\n@param context group level shared context that need be passed to\n{@link TaskGroupEntry#invokeTaskAsync(boolean, InvocationContext)}\nmethod of each entry in the group when it is selected for execution\n\n@return an observable that emits the result of tasks in the order they finishes.",
"Clean wait task queue."
] |
private static JsonParser newJsonParserForNode(JsonNode jsonNode) throws IOException {
JsonParser parser = new JsonFactory().createParser(jsonNode.toString());
parser.nextToken();
return parser;
} | [
"Create a JsonParser for a given json node.\n@param jsonNode the json node\n@return the json parser\n@throws IOException"
] | [
"Utility function that gives list of values from list of value-pair\nstrings.\n\n@param valuePairs List of value-pair strings\n@param delim Delimiter that separates the value pair\n@returns The list of values; empty if no value-pair is present, The even\nelements are the first ones of the value pair, and the odd\nelements are the second ones. For example, if the list of\nvalue-pair is [\"cluster.xml=file1\", \"stores.xml=file2\"], and the\npair delimiter is '=', we will then have the list of values in\nreturn: [\"cluster.xml\", \"file1\", \"stores.xml\", \"file2\"].",
"Returns the finish date for this resource assignment.\n\n@return finish date",
"This method formats a time unit.\n\n@param timeUnit time unit instance\n@return formatted time unit instance",
"When all the elements in a sorted set are inserted with the same score, in order to force lexicographical\nordering, this command returns all the elements in the sorted set with a value in the given range.\nIf the elements in the sorted set have different scores, the returned elements are unspecified.\n@param lexRange\n@return the range of elements",
"Obtain a connection asynchronously by queueing a request to obtain a connection in a separate thread.\n\nUse as follows:<p>\nFuture<Connection> result = pool.getAsyncConnection();<p>\n... do something else in your application here ...<p>\nConnection connection = result.get(); // get the connection<p>\n\n@return A Future task returning a connection.",
"Get info for a given topic reply\n\n@param topicId\nUnique identifier of a topic for a given group {@link Topic}.\n@param replyId\nUnique identifier of a reply for a given topic {@link Reply}.\n@return A group topic\n@throws FlickrException\n@see <a href=\"http://www.flickr.com/services/api/flickr.groups.discuss.replies.getInfo.html\">API Documentation</a>",
"Returns true if a Map literal that contains only entries where both key and value are constants.\n@param expression - any expression",
"Render a zero Double as null.\n\n@param value double value\n@return null if the double value is zero",
"Remove all scene objects."
] |
public void seekToSeasonYear(String seasonString, String yearString) {
Season season = Season.valueOf(seasonString);
assert(season != null);
seekToIcsEventYear(SEASON_ICS_FILE, yearString, season.getSummary());
} | [
"Seeks to the given season within the given year\n\n@param seasonString\n@param yearString"
] | [
"This method writes a single predecessor link to the MSPDI file.\n\n@param taskID The task UID\n@param type The predecessor type\n@param lag The lag duration\n@return A new link to be added to the MSPDI file",
"Returns the configured bundle, or the provided default bundle.\n@param defaultMessages the default bundle\n@param locale the preferred locale\n@return the configured bundle or, if not found, the default bundle.",
"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.",
"Perform the module promotion\n\n@param moduleId String",
"Returns the total number of elements which are true.\n@return number of elements which are set to true",
"Retrieve a number of rows matching the supplied query.\n\n@param sql query statement\n@return result set\n@throws SQLException",
"Returns true if \"file\" is a subfile or subdirectory of \"dir\".\n\nFor example with the directory /path/to/a, the following return values would occur:\n\n/path/to/a/foo.txt - true /path/to/a/bar/zoo/boo/team.txt - true /path/to/b/foo.txt - false",
"Enables or disables auto closing when selecting a date.",
"This method will add a DemoInterceptor into every in and every out phase\nof the interceptor chains.\n\n@param provider"
] |
protected String findPath(String start, String end) {
if (start.equals(end)) {
return start;
} else {
return findPath(start, parent.get(end)) + " -> " + end;
}
} | [
"Find the path.\n\n@param start key of first node in the path\n@param end key of last node in the path\n@return string containing the nodes keys in the path separated by arrow symbol"
] | [
"Use this API to clear Interface resources.",
"Write correlation id to message.\n\n@param message the message\n@param correlationId the correlation id",
"get the TypeSignature corresponding to given class with given type\narguments\n\n@param clazz\n@param typeArgs\n@return",
"Return the available format ids.",
"Get the configuration for a TMS layer by retrieving and parsing it's XML description file. The parsing is done\nusing JaxB.\n@param layer the tms layer to get capabilities for.\n@return Returns the description as a Java configuration object.\n@throws TmsLayerException\nIn case something went wrong trying to find or parse the XML description file.",
"Returns the connection count in this registry.\n\nNote it might count connections that are closed but not removed from registry yet\n\n@return the connection count",
"Walk project references recursively, building up a list of thrift files they provide, starting\nwith an empty file list.",
"Creates the udpClient with proper handler.\n\n@return the bound request builder\n@throws HttpRequestCreateException\nthe http request create exception",
"An endpoint to compile an array of soy templates to JavaScript.\n\nThis endpoint is a preferred way of compiling soy templates to JavaScript but it requires a user to compose a url\non their own or using a helper class TemplateUrlComposer, which calculates checksum of a file and puts this in url\nso that whenever a file changes, after a deployment a JavaScript, url changes and a new hash is appended to url, which enforces\ngetting of new compiles JavaScript resource.\n\nInvocation of this url may throw two types of http exceptions:\n1. notFound - usually when a TemplateResolver cannot find a template with an associated name\n2. error - usually when there is a permission error and a user is not allowed to compile a template into a JavaScript\n\n@param hash - some unique number that should be used when we are caching this resource in a browser and we use http cache headers\n@param templateFileNames - an array of template names, e.g. client-words,server-time, which may or may not contain extension\ncurrently three modes are supported - soy extension, js extension and no extension, which is preferred\n@param disableProcessors - whether the controller should run registered outputProcessors after the compilation is complete.\n@param request - HttpServletRequest\n@param locale - locale\n@return response entity, which wraps a compiled soy to JavaScript files.\n@throws IOException - io error"
] |
public void deleteLicense(final String licName) {
final DbLicense dbLicense = getLicense(licName);
repoHandler.deleteLicense(dbLicense.getName());
final FiltersHolder filters = new FiltersHolder();
final LicenseIdFilter licenseIdFilter = new LicenseIdFilter(licName);
filters.addFilter(licenseIdFilter);
for (final DbArtifact artifact : repoHandler.getArtifacts(filters)) {
repoHandler.removeLicenseFromArtifact(artifact, licName, this);
}
} | [
"Delete a license from the repository\n\n@param licName The name of the license to remove"
] | [
"Called when a ParentViewHolder has triggered a collapse for it's parent\n\n@param flatParentPosition the position of the parent that is calling to be collapsed",
"Clones a BufferedImage.\n@param image the image to clone\n@return the cloned image",
"Helper method to add cue list entries from a parsed ANLZ cue tag\n\n@param entries the list of entries being accumulated\n@param tag the tag whose entries are to be added",
"If you have priorities based on enums, this is the recommended prioritizer to use as it will prevent\nstarvation of low priority items\n\n@param groupClass\n@return",
"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",
"Update a variable name with a date if the variable is detected as being a date.\n\n@param variableName the variable name.\n@param date the date to replace the value with if the variable is a date variable.",
"Processes the template for the object cache of the current class definition.\n\n@param template The template\n@param attributes The attributes of the tag\n@exception XDocletException if an error occurs\[email protected] type=\"block\"",
"Rebuild logging systems with updated mode\n@param newMode log mode",
"Reads a markdown link ID.\n\n@param out\nThe StringBuilder to write to.\n@param in\nInput String.\n@param start\nStarting position.\n@return The new position or -1 if this is no valid markdown link ID."
] |
public void stopServer() throws Exception {
if (!externalDatabaseHost) {
try (Connection sqlConnection = getConnection()) {
sqlConnection.prepareStatement("SHUTDOWN").execute();
} catch (Exception e) {
}
try {
server.stop();
} catch (Exception e) {
}
}
} | [
"Shutdown the server\n\n@throws Exception exception"
] | [
"Converts a vector into a quaternion.\nUsed for the direction of spot and directional lights\nCalled upon initialization and updates to those vectors\n\n@param d",
"Unpause the server, allowing it to resume normal operations",
"A Maven stub is a Maven Project for which we have found information, but the project has not yet been located\nwithin the input application. If we have found an application of the same GAV within the input app, we should\nfill out this stub instead of creating a new one.",
"Gets the value of the resourceRequestCriterion property.\n\n<p>\nThis accessor method returns a reference to the live list,\nnot a snapshot. Therefore any modification you make to the\nreturned list will be present inside the JAXB object.\nThis is why there is not a <CODE>set</CODE> method for the resourceRequestCriterion property.\n\n<p>\nFor example, to add a new item, do as follows:\n<pre>\ngetResourceRequestCriterion().add(newItem);\n</pre>\n\n\n<p>\nObjects of the following type(s) are allowed in the list\n{@link ResourceRequestType.ResourceRequestCriterion }",
"Extract data for a single predecessor.\n\n@param task parent task\n@param row Synchro predecessor data",
"Begin a \"track;\" that is, begin logging at one level deeper.\nChannels other than the FORCE channel are ignored.\n@param args The title of the track to begin, with an optional FORCE flag.",
"Assign an ID value to this field.",
"Return the path to the parent directory. Should return the root if\nfrom is root.\n\n@param from either a file or directory\n@return the parent directory",
"This method calculates the absolute number of days between two dates.\nNote that where two date objects are provided that fall on the same\nday, this method will return one not zero. Note also that this method\nassumes that the dates are passed in the correct order, i.e.\nstartDate < endDate.\n\n@param startDate Start date\n@param endDate End date\n@return number of days in the date range"
] |
private void writeComma() throws IOException
{
if (m_firstNameValuePair.peek().booleanValue())
{
m_firstNameValuePair.pop();
m_firstNameValuePair.push(Boolean.FALSE);
}
else
{
m_writer.write(',');
}
} | [
"Write a comma to the output stream if required."
] | [
"Adds a member to this group with the specified role.\n@param user the member to be added to this group.\n@param role the role of the user in this group. Can be null to assign the default role.\n@return info about the new group membership.",
"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",
"Adds all categories from one resource to another, skipping categories that are not available for the resource copied to.\n\nThe resource where categories are copied to has to be locked.\n\n@param cms the CmsObject used for reading and writing.\n@param fromResource the resource to copy the categories from.\n@param toResourceSitePath the full site path of the resource to copy the categories to.\n@throws CmsException thrown if copying the resources fails.",
"Gets an overrideID for a class name, method name\n\n@param className name of class\n@param methodName name of method\n@return override ID of method",
"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",
"Attempt to shutdown the server. As much shutdown as possible will be\ncompleted, even if intermediate errors are encountered.\n\n@throws VoldemortException",
"Reads a quoted string value from the request.",
"absolute for advancedJDBCSupport\n@param row",
"Returns a module\n\n@param moduleId String\n@return DbModule"
] |
void merge(Archetype flatParent, Archetype specialized) {
expandAttributeNodes(specialized.getDefinition());
flattenCObject(RmPath.ROOT, null, flatParent.getDefinition(), specialized.getDefinition());
mergeOntologies(flatParent.getTerminology(), specialized.getTerminology());
if (flatParent.getAnnotations() != null) {
if (specialized.getAnnotations() == null) {
specialized.setAnnotations(new ResourceAnnotations());
}
annotationsMerger.merge(flatParent.getAnnotations().getItems(), specialized.getAnnotations().getItems());
}
} | [
"Merges a specialized archetype with its parent. Merge will be done in-place on the specialized parameter.\n\n@param flatParent Flat parent archetype\n@param specialized Specialized archetype"
] | [
"Calls afterMaterialization on all registered listeners in the reverse\norder of registration.",
"Call batch tasks inside of a connection which may, or may not, have been \"saved\".",
"Returns the later of two dates, handling null values. A non-null Date\nis always considered to be later than a null Date.\n\n@param d1 Date instance\n@param d2 Date instance\n@return Date latest date",
"Process events in the order as they were received.\n\n<p/>\n\nThe overall time to process the events must be within the bounds of the\ntimeout or an {@link InsufficientOperationalNodesException} will be\nthrown.",
"Get the best guess we have for the current track position on the specified player.\n\n@param player the player number whose position is desired\n\n@return the milliseconds into the track that we believe playback has reached, or -1 if we don't know\n\n@throws IllegalStateException if the TimeFinder is not running",
"Removes all of the markers from the map.",
"Removes empty space when \"fitToContent\" is true and real height of object is\ntaller than current bands height, otherwise, it is not modified\n\n@param band\n@param currHeigth\n@param fitToContent",
"Sets the the time of day\n\n@param hours the hours to set. Must be guaranteed to parse as an\ninteger between 0 and 23\n\n@param minutes the minutes to set. Must be guaranteed to parse as\nan integer between 0 and 59\n\n@param seconds the optional seconds to set. Must be guaranteed to parse as\nan integer between 0 and 59\n\n@param amPm the meridian indicator to use. Must be either 'am' or 'pm'\n\n@param zoneString the time zone to use in one of two formats:\n- zoneinfo format (America/New_York, America/Los_Angeles, etc)\n- GMT offset (+05:00, -0500, +5, etc)",
"Format the message using the pattern and the arguments.\n\n@param pattern the pattern in the format of \"{1} this is a {2}\"\n@param arguments the arguments.\n@return the formatted result."
] |
public static BoxRetentionPolicyAssignment.Info createAssignmentToMetadata(BoxAPIConnection api,
String policyID,
String templateID,
MetadataFieldFilter... filter) {
JsonObject assignTo = new JsonObject().add("type", TYPE_METADATA).add("id", templateID);
JsonArray filters = null;
if (filter.length > 0) {
filters = new JsonArray();
for (MetadataFieldFilter f : filter) {
filters.add(f.getJsonObject());
}
}
return createAssignment(api, policyID, assignTo, filters);
} | [
"Assigns a retention policy to all items with a given metadata template, optionally matching on fields.\n@param api the API connection to be used by the created assignment.\n@param policyID id of the assigned retention policy.\n@param templateID the ID of the metadata template to assign the policy to.\n@param filter optional fields to match against in the metadata template.\n@return info about the created assignment."
] | [
"Creates a new Logger instance for the specified name.",
"Implement this to do your drawing.\n\n@param canvas the canvas on which the background will be drawn",
"a small static helper to set the text color to a textView null save\n\n@param colorHolder\n@param textView\n@param colorDefault",
"Read hints from a file and merge with the given hints map.",
"Returns angle in degrees between two points\n\n@param ax x of the point 1\n@param ay y of the point 1\n@param bx x of the point 2\n@param by y of the point 2\n@return angle in degrees between two points",
"Checks if the child is currently in ViewPort\n@param dataIndex child index\n@return true if the child is in viewport, false - otherwise",
"Convert a field value to something suitable to be stored in the database.",
"Checks if request is intended for Gerrit host.",
"apply the base fields to other views if configured to do so."
] |
public static int rank( DMatrixRMaj A ) {
SingularValueDecomposition_F64<DMatrixRMaj> svd = DecompositionFactory_DDRM.svd(A.numRows,A.numCols,false,true,true);
if( svd.inputModified() ) {
A = A.copy();
}
if( !svd.decompose(A)) {
throw new RuntimeException("SVD Failed!");
}
int N = svd.numberOfSingularValues();
double sv[] = svd.getSingularValues();
double threshold = singularThreshold(sv,N);
int count = 0;
for (int i = 0; i < sv.length; i++) {
if( sv[i] >= threshold ) {
count++;
}
}
return count;
} | [
"Returns the matrix's rank. Automatic selection of threshold\n\n@param A Matrix. Not modified.\n@return The rank of the decomposed matrix."
] | [
"Convenience method to determine if a character is special to the regex system.\n\n@param chr\nthe character to test\n\n@return is the character a special character.",
"Invokes the setter on the bean with the supplied value.\n\n@param bean\nthe bean\n@param setMethod\nthe setter method for the field\n@param fieldValue\nthe field value to set\n@throws SuperCsvException\nif there was an exception invoking the setter",
"Use this API to update filterhtmlinjectionparameter.",
"Helper method used to peel off spurious wrappings of DateTimeException\n\n@param e DateTimeException to peel\n\n@return DateTimeException that does not have another DateTimeException as its cause.",
"Get the features collection from a GeoJson URL.\n\n@param template the template\n@param geoJsonUrl what to parse\n@return the feature collection",
"Get the diff between any two valid revisions.\n\n@param from revision from\n@param to revision to\n@param pathPattern target path pattern\n@return the map of changes mapped by path\n@throws StorageException if {@code from} or {@code to} does not exist.",
"Use this API to add inat resources.",
"Collect the total times measured by all known named timers of the given\nname. This is useful to add up times that were collected across separate\nthreads.\n\n@param timerName\n@return timer",
"Gets the effects of this action.\n\n@return the effects. Will not be {@code null}"
] |
@Override
public List<Revision> getMatrixHistory(final int start, final int limit) throws StoreException {
return delegate.getMatrixHistory(start, limit);
} | [
"caching is not supported for this method"
] | [
"This method is called by the client to load the most recent list of resources.\nThis method should only be called by the service client.\n\n@param result the most recent list of resources.",
"Sets all Fluo properties to their default in the given configuration. NOTE - some properties do\nnot have defaults and will not be set.",
"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>.",
"Resolves a path relative to the base path.\n\n@param base the base path\n@param paths paths relative to the base directory\n\n@return the resolved path",
"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",
"resumed a given deployment\n\n@param deployment The deployment to resume",
"Notification that the process has become unstable.\n\n@return {@code true} if this is a change in status",
"Write attributes for an individual custom field.\nNote that at present we are only writing a subset of the\navailable data... in this instance the field alias.\nIf the field does not have an alias we won't write an\nentry.\n\n@param field custom field to write\n@throws IOException",
"Returns a spread of integers in a range [0,max) that includes\ncount. The spread is sorted from largest to smallest."
] |
public Map<Integer, List<Row>> createTimeEntryMap(List<Row> rows)
{
Map<Integer, List<Row>> map = new HashMap<Integer, List<Row>>();
for (Row row : rows)
{
Integer workPatternID = row.getInteger("TIME_ENTRYID");
List<Row> list = map.get(workPatternID);
if (list == null)
{
list = new LinkedList<Row>();
map.put(workPatternID, list);
}
list.add(row);
}
return map;
} | [
"Creates a map between a work pattern ID and a list of time entry rows.\n\n@param rows time entry rows\n@return time entry map"
] | [
"Gets a list of registered docker images from the images cache, if it has been\nregistered to the cache for a specific build-info ID and if a docker manifest has been captured for it\nby the build-info proxy.\n@param buildInfoId\n@return",
"Compute a singular-value decomposition of A.\n\n@return A DoubleMatrix[3] array of U, S, V such that A = U * diag(S) * V'",
"Set the scrollbar used for vertical scrolling.\n\n@param scrollbar the scrollbar, or null to clear it\n@param width the width of the scrollbar in pixels",
"Populate the constraint type and constraint date.\nNote that Merlin allows both start and end constraints simultaneously.\nAs we can't have both, we'll prefer the start constraint.\n\n@param row task data from database\n@param task Task instance",
"Returns true if the given item document lacks a label for at least one of\nthe languages covered.\n\n@param itemDocument\n@return true if some label is missing",
"Populates a calendar exception instance.\n\n@param record MPX record\n@param calendar calendar to which the exception will be added\n@throws MPXJException",
"Retrieve the number of minutes per day for this calendar.\n\n@return minutes per day",
"Calculates the smallest value between the three inputs.\n@param first value\n@param second value\n@param third value\n@return the smallest value between the three inputs",
"Returns a new color that has the hue adjusted by the specified\namount."
] |
public static base_response update(nitro_service client, responderpolicy resource) throws Exception {
responderpolicy updateresource = new responderpolicy();
updateresource.name = resource.name;
updateresource.rule = resource.rule;
updateresource.action = resource.action;
updateresource.undefaction = resource.undefaction;
updateresource.comment = resource.comment;
updateresource.logaction = resource.logaction;
updateresource.appflowaction = resource.appflowaction;
return updateresource.update_resource(client);
} | [
"Use this API to update responderpolicy."
] | [
"Transforms a length according to the current transformation matrix.",
"Retrieve the number of minutes per day for this calendar.\n\n@return minutes per day",
"Apply a filter to the list of all resources, and show the results.\n\n@param project project file\n@param filter filter",
"Configures a RequestBuilder to send an RPC request when the RequestBuilder\nis intended to be returned through the asynchronous proxy interface.\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.",
"Publish finish events for each of the specified query types\n\n<pre>\n{@code\nRequestEvents.start(\"get\", 1l, bus, \"typeA\", \"custom\");\ntry {\nreturn \"ok\";\n} finally {\nRequestEvents.finish(\"get\", 1l, bus, \"typeA\", \"custom\");\n}\n\n}\n</pre>\n\n\n@param query Completed query\n@param correlationId Identifier\n@param bus EventBus to post events to\n@param types Query types to post to event bus",
"Constructs the convex hull of a set of points whose coordinates are given\nby an array of doubles.\n\n@param coords\nx, y, and z coordinates of each input point. The length of\nthis array must be at least three times <code>nump</code>.\n@param nump\nnumber of input points\n@throws IllegalArgumentException\nthe number of input points is less than four or greater than\n1/3 the length of <code>coords</code>, or the points appear\nto be coincident, colinear, or coplanar.",
"Invoke the setters for the given variables on the given instance.\n@param <T> the instance type\n@param instance the instance to inject with the variables\n@param vars the variables to inject\n@return the instance\n@throws ReflectiveOperationException if there was a problem finding or invoking a setter method",
"Use this API to add gslbsite resources.",
"Release the connection back to the pool.\n\n@throws SQLException Never really thrown"
] |
public void addProfile(Object key, DescriptorRepository repository)
{
if (metadataProfiles.contains(key))
{
throw new MetadataException("Duplicate profile key. Key '" + key + "' already exists.");
}
metadataProfiles.put(key, repository);
} | [
"Add a metadata profile.\n@see #loadProfile"
] | [
"Prints the plan to a file.\n\n@param outputDirName\n@param plan",
"Send a data to Incoming Webhook endpoint.",
"Use this API to create sslfipskey.",
"Use this API to add tmtrafficaction.",
"Close all JDBC objects related to this connection.",
"Replies the elements of the given map except the pair with the given key.\n\n<p>\nThe replied map is a view on the given map. It means that any change\nin the original map is reflected to the result of this operation.\n</p>\n\n@param <K> type of the map keys.\n@param <V> type of the map values.\n@param map the map to update.\n@param key the key to remove.\n@return the map with the content of the map except the key.\n@since 2.15",
"Read a Synchro date from an input stream.\n\n@param is input stream\n@return Date instance",
"Read calendar data.",
"Sets the left padding character for all cells in the row.\n@param paddingLeftChar new padding character, ignored if null\n@return this to allow chaining"
] |
protected void parseCombineIntegerLists(TokenList tokens) {
TokenList.Token t = tokens.getFirst();
if( t == null || t.next == null )
return;
int numFound = 0;
TokenList.Token start = null;
TokenList.Token end = null;
while( t != null ) {
if( t.getType() == Type.VARIABLE && (isVariableInteger(t) ||
t.getVariable().getType() == VariableType.INTEGER_SEQUENCE )) {
if( numFound == 0 ) {
numFound = 1;
start = end = t;
} else {
numFound++;
end = t;
}
} else if( numFound > 1 ) {
IntegerSequence sequence = new IntegerSequence.Combined(start,end);
VariableIntegerSequence varSequence = functions.getManagerTemp().createIntegerSequence(sequence);
replaceSequence(tokens, varSequence, start, end);
numFound = 0;
} else {
numFound = 0;
}
t = t.next;
}
if( numFound > 1 ) {
IntegerSequence sequence = new IntegerSequence.Combined(start,end);
VariableIntegerSequence varSequence = functions.getManagerTemp().createIntegerSequence(sequence);
replaceSequence(tokens, varSequence, start, end);
}
} | [
"Looks for sequences of integer lists and combine them into one big sequence"
] | [
"Retrieves from all the Jenkins agents all the docker images, which have been registered for a specific build-info ID\nOnly images for which manifests have been captured are returned.\n\n@param buildInfoId\n@return\n@throws IOException\n@throws InterruptedException",
"Enable the use of the given controller type by\nadding it to the cursor controller types list.\n@param controllerType GVRControllerType to add to the list",
"Create a buffered image with the correct image bands etc... for the tiles being loaded.\n\n@param imageWidth width of the image to create\n@param imageHeight height of the image to create.",
"Requests the waveform detail for a specific track ID, given a connection to a player that has already been\nset up.\n\n@param rekordboxId the track whose waveform detail is desired\n@param slot identifies the media slot we are querying\n@param client the dbserver client that is communicating with the appropriate player\n\n@return the retrieved waveform detail, or {@code null} if none was available\n@throws IOException if there is a communication problem",
"Plots the MSD curve with the trajectory t and adds the fitted model for anomalous diffusion above.\n@param t\n@param lagMin Minimum timelag (e.g. 1,2,3..) lagMin*timelag = elapsed time in seconds\n@param lagMax lagMax Maximum timelag (e.g. 1,2,3..) lagMax*timelag = elapsed time in seconds\n@param timelag Elapsed time between two frames.\n@param a Exponent alpha of power law function\n@param D Diffusion coeffcient",
"Returns true if the given candidate is a group that is filtered due to rule parameters in the current call graph.",
"Sets padding between the pages\n@param padding\n@param axis",
"Log error information",
"Total count of partition-stores moved in this task.\n\n@return number of partition stores moved in this task."
] |
public int rebalanceNode(final RebalanceTaskInfo stealInfo) {
final RebalanceTaskInfo info = metadataStore.getRebalancerState()
.find(stealInfo.getDonorId());
// Do we have the plan in the state?
if(info == null) {
throw new VoldemortException("Could not find plan " + stealInfo
+ " in the server state on " + metadataStore.getNodeId());
} else if(!info.equals(stealInfo)) {
// If we do have the plan, is it the same
throw new VoldemortException("The plan in server state " + info
+ " is not the same as the process passed " + stealInfo);
} else if(!acquireRebalancingPermit(stealInfo.getDonorId())) {
// Both are same, now try to acquire a lock for the donor node
throw new AlreadyRebalancingException("Node " + metadataStore.getNodeId()
+ " is already rebalancing from donor "
+ info.getDonorId() + " with info " + info);
}
// Acquired lock successfully, start rebalancing...
int requestId = asyncService.getUniqueRequestId();
// Why do we pass 'info' instead of 'stealInfo'? So that we can change
// the state as the stores finish rebalance
asyncService.submitOperation(requestId,
new StealerBasedRebalanceAsyncOperation(this,
voldemortConfig,
metadataStore,
requestId,
info));
return requestId;
} | [
"This function is responsible for starting the actual async rebalance\noperation. This is run if this node is the stealer node\n\n<br>\n\nWe also assume that the check that this server is in rebalancing state\nhas been done at a higher level\n\n@param stealInfo Partition info to steal\n@return Returns a id identifying the async operation"
] | [
"Register a new DropPasteWorkerInterface.\n@param worker The new worker",
"Method used to write the name of the scenarios methods\n\n@param word\n@return the same word starting with lower case",
"Create a HashSet with the given initial values.\n\n@param values The values\n@param <T> The type.",
"Create a model controller client which is exclusively receiving messages on an existing channel.\n\n@param channel the channel\n@param executorService an executor\n@return the created client",
"Confirms that both clusters have the same set of zones defined.\n\n@param lhs\n@param rhs",
"We have obtained a waveform preview for a device, so store it and alert any listeners.\n\n@param update the update which caused us to retrieve this waveform preview\n@param preview the waveform preview which we retrieved",
"Schedule at most one task.\n\nThe scheduled task *must* invoke 'doneTask()' upon\ncompletion/termination.\n\n@param executeService flag to control execution of the service, some tests pass\nin value 'false'\n@return The task scheduled or null if not possible to schedule a task at\nthis time.",
"Parses the resource String id and get back the int res id\n@param context\n@param id String resource id\n@return int resource id",
"Set the pointer on the bar. With the Value value.\n\n@param value float between 0 and 1"
] |
public void removeMetadataProvider(MetadataProvider provider) {
for (Set<MetadataProvider> providers : metadataProviders.values()) {
providers.remove(provider);
}
} | [
"Removes a metadata provider so it will no longer be consulted to provide metadata for tracks loaded from any\nmedia.\n\n@param provider the metadata provider to remove."
] | [
"Create a document that parses the tile's featureFragment, using GraphicsWriter classes.\n\n@param writer\nwriter\n@return document\n@throws RenderException\noops",
"Scans a set of classes for both ReaderListeners and Swagger annotations. All found listeners will\nbe instantiated before any of the classes are scanned for Swagger annotations - so they can be invoked\naccordingly.\n\n@param classes a set of classes to scan\n@return the generated Swagger definition",
"Get the authentication method to use.\n\n@return authentication method",
"Calculate the layout offset",
"Unicast addresses allocated for private use\n\n@see java.net.InetAddress#isSiteLocalAddress()",
"Loads the specified class name and stores it in the hash\n\n@param className class name\n@throws Exception exception",
"Appends a formatted line of code to the source.\n\n<p>Formatting supports {@code %s} and {@code %n$s}. Most args are converted according to their\n{@link Object#toString()} method, except that:<ul>\n<li> {@link Package} and {@link PackageElement} instances use their fully-qualified names\n(no \"package \" prefix).\n<li> {@link Class}, {@link TypeElement}, {@link DeclaredType} and {@link QualifiedName}\ninstances use their qualified names where necessary, or shorter versions if a suitable\nimport line can be added.\n<li> {@link Excerpt} instances have {@link Excerpt#addTo(SourceBuilder)} called.\n</ul>",
"Splits data into blocks, adds error correction and then interleaves the blocks and error correction data.",
"Sets the current class definition derived from the current class, 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=\"accept-locks\" optional=\"true\" description=\"The accept locks setting\" values=\"true,false\"\[email protected] name=\"attributes\" optional=\"true\" description=\"Attributes of the class as name-value pairs 'name=value',\nseparated by commas\"\[email protected] name=\"determine-extents\" optional=\"true\" description=\"Whether to determine\npersistent direct sub types automatically\" values=\"true,false\"\[email protected] name=\"documentation\" optional=\"true\" description=\"Documentation on the class\"\[email protected] name=\"factory-method\" optional=\"true\" description=\"Specifies a no-argument factory method that is\nused to create instances (not yet implemented !)\"\[email protected] name=\"factory-class\" optional=\"true\" description=\"Specifies a factory class to be used for creating\nobjects of this class\"\[email protected] name=\"factory-method\" optional=\"true\" description=\"Specifies a static no-argument method in the factory class\"\[email protected] name=\"generate-repository-info\" optional=\"true\" description=\"Whether repository data should be\ngenerated for the class\" values=\"true,false\"\[email protected] name=\"generate-table-info\" optional=\"true\" description=\"Whether table data should be\ngenerated for the class\" values=\"true,false\"\[email protected] name=\"include-inherited\" optional=\"true\" description=\"Whether to include\nfields/references/collections of supertypes\" values=\"true,false\"\[email protected] name=\"initialization-method\" optional=\"true\" description=\"Specifies a no-argument instance method that is\ncalled right after an instance has been read from the database\"\[email protected] name=\"isolation-level\" optional=\"true\" description=\"The isolation level setting\"\[email protected] name=\"proxy\" optional=\"true\" description=\"The proxy setting for this class\"\[email protected] name=\"proxy-prefetching-limit\" optional=\"true\" description=\"Specifies the amount of objects of\nobjects of this class to prefetch in collections\"\[email protected] name=\"refresh\" optional=\"true\" description=\"Can be set to force OJB to refresh instances when\nloaded from the cache\" values=\"true,false\"\[email protected] name=\"row-reader\" optional=\"true\" description=\"The row reader for the class\"\[email protected] name=\"schema\" optional=\"true\" description=\"The schema for the type\"\[email protected] name=\"table\" optional=\"true\" description=\"The table for the class\"\[email protected] name=\"table-documentation\" optional=\"true\" description=\"Documentation on the table\""
] |
public String getStatement() throws SQLException {
StringBuilder sb = new StringBuilder();
appendSql(null, sb, new ArrayList<ArgumentHolder>());
return sb.toString();
} | [
"Returns the associated SQL WHERE statement."
] | [
"This static method calculated the vega of a call option under a Black-Scholes model\n\n@param initialStockValue The initial value of the underlying, i.e., the spot.\n@param riskFreeRate The risk free rate of the bank account numerarie.\n@param volatility The Black-Scholes volatility.\n@param optionMaturity The option maturity T.\n@param optionStrike The option strike.\n@return The vega of the option",
"Gets the site label for the entry.\n\n@param cms the current CMS context\n@param entry the entry\n@return the site label for the entry",
"Processes the template for all procedures of the current class definition.\n\n@param template The template\n@param attributes The attributes of the tag\n@exception XDocletException if an error occurs\[email protected] type=\"block\"",
"Checks if data set is mandatory but missing or non repeatable but having\nmultiple values in this IIM instance.\n\n@param info\nIIM data set to check\n@return list of constraint violations, empty set if data set is valid",
"Returns the JSON datatype for the property datatype as represented by\nthe given WDTK datatype IRI string.\n\n@param datatypeIri\nthe WDTK datatype IRI string; case-sensitive\n@throws IllegalArgumentException\nif the given datatype string is not known",
"Unzip a file to a target directory.\n@param zip the path to the zip file.\n@param target the path to the target directory into which the zip file will be unzipped.\n@throws IOException",
"Returns an instance of the CleverTap SDK.\n\n@param context The Android context\n@return The {@link CleverTapAPI} object\n@deprecated use {@link CleverTapAPI#getDefaultInstance(Context context)}",
"Set default interval for sending events to monitoring service. DefaultInterval will be used by\nscheduler.\n\n@param defaultInterval the new default interval",
"2-D Integer array to double array.\n\n@param array Integer array.\n@return Double array."
] |
public static appflowpolicylabel get(nitro_service service, String labelname) throws Exception{
appflowpolicylabel obj = new appflowpolicylabel();
obj.set_labelname(labelname);
appflowpolicylabel response = (appflowpolicylabel) obj.get_resource(service);
return response;
} | [
"Use this API to fetch appflowpolicylabel resource of given name ."
] | [
"Given OGC PropertyIsLike Filter information, construct an SQL-compatible 'like' pattern.\n\nSQL % --> match any number of characters _ --> match a single character\n\nNOTE; the SQL command is 'string LIKE pattern [ESCAPE escape-character]' We could re-define the escape character,\nbut I'm not doing to do that in this code since some databases will not handle this case.\n\nMethod: 1.\n\nExamples: ( escape ='!', multi='*', single='.' ) broadway* -> 'broadway%' broad_ay -> 'broad_ay' broadway ->\n'broadway'\n\nbroadway!* -> 'broadway*' (* has no significance and is escaped) can't -> 'can''t' ( ' escaped for SQL\ncompliance)\n\n\nNOTE: we also handle \"'\" characters as special because they are end-of-string characters. SQL will convert ' to\n'' (double single quote).\n\nNOTE: we don't handle \"'\" as a 'special' character because it would be too confusing to have a special char as\nanother special char. Using this will throw an error (IllegalArgumentException).\n\n@param escape escape character\n@param multi ?????\n@param single ?????\n@param pattern pattern to match\n@return SQL like sub-expression\n@throws IllegalArgumentException oops",
"Calculate which pie slice is under the pointer, and set the current item\nfield accordingly.",
"Determine how many forked JVMs to use.",
"Create the service name for a channel\n\n@param channelName\nthe channel name\n@return the service name",
"Returns the Map value of the field.\n\n@return the Map value of the field. It returns a reference of the value both for <code>MAP</code> and\n<code>LIST_MAP</code>.\n@throws IllegalArgumentException if the value cannot be converted to Map.",
"Invert by solving for against an identity matrix.\n\n@param A_inv Where the inverted matrix saved. Modified.",
"returns an Enumeration of PrimaryKey Objects for objects of class DataClass.\nThe Elements returned come from a SELECT ... WHERE Statement\nthat is defined by the fields and their coresponding values of listFields\nand listValues.\nUseful for EJB Finder Methods...\n@param primaryKeyClass the pk class for the searched objects\n@param query the query",
"Get a writer implementation to push data into Canvas while being able to control the behavior of blank values.\nIf the serializeNulls parameter is set to true, this writer will serialize null fields in the JSON being\nsent to Canvas. This is required if you want to explicitly blank out a value that is currently set to something.\n@param type Interface type you wish to get an implementation for\n@param oauthToken An OAuth token to use for authentication when making API calls\n@param serializeNulls Whether or not to include null fields in the serialized JSON. Defaults to false if null\n@param <T> A writer implementation\n@return An instantiated instance of the requested writer type",
"Calculates the squared curvature of the LIBOR instantaneous variance.\n\n@param evaluationTime Time at which the product is evaluated.\n@param model A model implementing the LIBORModelMonteCarloSimulationModel\n@return The squared curvature of the LIBOR instantaneous variance (reduced a possible tolerance). The return value is ≥ 0."
] |
public double getValue(ForwardCurveInterface forwardCurve, double swaprateVolatility) {
double swaprate = swaprates[0];
for (double swaprate1 : swaprates) {
if (swaprate1 != swaprate) {
throw new RuntimeException("Uneven swaprates not allows for analytical pricing.");
}
}
double[] swapTenor = new double[fixingDates.length+1];
System.arraycopy(fixingDates, 0, swapTenor, 0, fixingDates.length);
swapTenor[swapTenor.length-1] = paymentDates[paymentDates.length-1];
double forwardSwapRate = Swap.getForwardSwapRate(new TimeDiscretization(swapTenor), new TimeDiscretization(swapTenor), forwardCurve);
double swapAnnuity = SwapAnnuity.getSwapAnnuity(new TimeDiscretization(swapTenor), forwardCurve);
return AnalyticFormulas.blackModelSwaptionValue(forwardSwapRate, swaprateVolatility, exerciseDate, swaprate, swapAnnuity);
} | [
"This method returns the value of the product using a Black-Scholes model for the swap rate\nThe model is determined by a discount factor curve and a swap rate volatility.\n\n@param forwardCurve The forward curve on which to value the swap.\n@param swaprateVolatility The Black volatility.\n@return Value of this product"
] | [
"Retrieves a specific range of child items in this folder.\n\n@param offset the index of the first child item to retrieve.\n@param limit the maximum number of children to retrieve after the offset.\n@param fields the fields to retrieve.\n@return a partial collection containing the specified range of child items.",
"Deletes an email alias from this user's account.\n\n<p>The IDs of the user's email aliases can be found by calling {@link #getEmailAliases}.</p>\n\n@param emailAliasID the ID of the email alias to delete.",
"Set the week day the event should take place.\n@param dayString the day as string.",
"Record the resource request queue length\n\n@param dest Destination of the socket for which resource request is\nenqueued. Will actually record if null. Otherwise will call this\non self and corresponding child with this param null.\n@param queueLength The number of entries in the \"asynchronous\" resource\nrequest queue.",
"Retrieve the configuration of the named template.\n\n@param name the template name;",
"Trade the request token for an access token, this is step three of authorization.\n@param oAuthRequestToken\nthis is the token returned by the {@link AuthInterface#getRequestToken} call.\n@param verifier",
"Returns the compact project status update records for all updates on the project.\n\n@param project The project to find status updates for.\n@return Request object",
"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\"",
"Runs the currently entered query and displays the results."
] |
protected boolean isItemAccepted(byte[] key) {
boolean entryAccepted = false;
if (!fetchOrphaned) {
if (isKeyNeeded(key)) {
entryAccepted = true;
}
} else {
if (!StoreRoutingPlan.checkKeyBelongsToNode(key, nodeId, initialCluster, storeDef)) {
entryAccepted = true;
}
}
return entryAccepted;
} | [
"Determines if entry is accepted. For normal usage, this means confirming that the key is\nneeded. For orphan usage, this simply means confirming the key belongs to the node.\n\n@param key\n@return true iff entry is accepted."
] | [
"The primary run loop of the event processor.",
"delegate to each contained OJBIterator and release\nits resources.",
"Convenience method for getting the value of a private object field,\nwithout the stress of checked exceptions in the reflection API.\n\n@param object\nObject containing the field.\n@param fieldName\nName of the field whose value to return.",
"Looks up a variable given its name. If none is found then return null.",
"Picks out a File from `thriftFiles` corresponding to a given artifact ID\nand file name. Returns null if `artifactId` and `fileName` do not map to a\nthrift file path.\n\n@parameter artifactId The artifact ID of which to look up the path\n@parameter fileName the name of the thrift file for which to extract a path\n@parameter thriftFiles The set of Thrift files in which to lookup the\nartifact ID.\n@return The path of the directory containing Thrift files for the given\nartifact ID. null if artifact ID not found.",
"Resolves line alpha based on distance comparing to max distance.\nWhere alpha is close to 0 for maxDistance, and close to 1 to 0 distance.\n\n@param distance line length\n@param maxDistance max line length\n@return line alpha",
"Delete a comment as the currently authenticated user.\n\nThis method requires authentication with 'write' permission.\n\n@param commentId\nThe id of the comment to delete.\n@throws FlickrException",
"Generates a schedule based on some meta data. The schedule generation\nconsiders short periods.\n\n@param referenceDate The date which is used in the schedule to internally convert dates to doubles, i.e., the date where t=0.\n@param startDate The start date of the first period.\n@param frequency The frequency.\n@param maturity The end date of the last period.\n@param daycountConvention The daycount convention.\n@param shortPeriodConvention If short period exists, have it first or last.\n@param dateRollConvention Adjustment to be applied to the all dates.\n@param businessdayCalendar Businessday calendar (holiday calendar) to be used for date roll adjustment.\n@param fixingOffsetDays Number of business days to be added to period start to get the fixing date.\n@param paymentOffsetDays Number of business days to be added to period end to get the payment date.\n@return The corresponding schedule\n@deprecated Will be removed in version 2.3",
"Check the variable name and if not set, set it with the singleton variable being on the top of the stack."
] |
Subsets and Splits