query
stringlengths 74
6.1k
| positive
sequencelengths 1
1
| negative
sequencelengths 9
9
|
---|---|---|
private void readFormDataFromFile() {
List<FormInput> formInputList =
FormInputValueHelper.deserializeFormInputs(config.getSiteDir());
if (formInputList != null) {
InputSpecification inputSpecs = config.getCrawlRules().getInputSpecification();
for (FormInput input : formInputList) {
inputSpecs.inputField(input);
}
}
} | [
"Reads input data from a JSON file in the output directory."
] | [
"Retrieves the amount of time between two date time values. Note that\nthese values are converted into canonical values to remove the\ndate component.\n\n@param start start time\n@param end end time\n@return length of time",
"Pretty prints the output of getMapOfContiguousPartitionRunLengths\n\n@param cluster\n@param zoneId\n@return pretty string of contiguous run lengths",
"Return the score of the specified element of the sorted set at key.\n@param member\n@return The score value or <code>null</code> if the element does not exist in the set.",
"end class CoNLLIterator",
"Load a cube map texture asynchronously.\n\nThis is the implementation of\n{@link GVRAssetLoader#loadCubemapTexture(GVRAndroidResource)} - it will\nusually be more convenient (and more efficient) to call that directly.\n\n@param gvrContext\nThe GVRF context\n@param textureCache\nTexture cache - may be {@code null}\n@param resource\nA steam containing a zip file which contains six bitmaps. The\nsix bitmaps correspond to +x, -x, +y, -y, +z, and -z faces of\nthe cube map texture respectively. The default names of the\nsix images are \"posx.png\", \"negx.png\", \"posy.png\", \"negx.png\",\n\"posz.png\", and \"negz.png\", which can be changed by calling\n{@link GVRCubemapImage#setFaceNames(String[])}.\n@param priority\nThis request's priority. Please see the notes on asynchronous\npriorities in the <a href=\"package-summary.html#async\">package\ndescription</a>.\n@return A {@link Future} that you can pass to methods like\n{@link GVRShaderData#setMainTexture(Future)}",
"Use this API to rename a nsacl6 resource.",
"Assign based on execution time history. The algorithm is a greedy heuristic\nassigning the longest remaining test to the slave with the\nshortest-completion time so far. This is not optimal but fast and provides\na decent average assignment.",
"Closes the window containing the given component.\n\n@param component a component",
"A smoothed pulse function. A cubic function is used to smooth the step between two thresholds.\n@param a1 the lower threshold position for the start of the pulse\n@param a2 the upper threshold position for the start of the pulse\n@param b1 the lower threshold position for the end of the pulse\n@param b2 the upper threshold position for the end of the pulse\n@param x the input parameter\n@return the output value"
] |
private Class<?> beanType(String name) {
Class<?> type = context.getType(name);
if (ClassUtils.isCglibProxyClass(type)) {
return AopProxyUtils.ultimateTargetClass(context.getBean(name));
}
return type;
} | [
"Return the bean type, untangling the proxy if needed\n\n@param name\nthe bean name\n@return The Class of the bean"
] | [
"Receive a notification that the channel was closed.\n\nThis is used for the {@link ManagementClientChannelStrategy.Establishing} since it might use multiple channels.\n\n@param closed the closed resource\n@param e the exception which occurred during close, if any",
"The fields returned by default. Typically the output is done via display formatters and hence nearly no\nfield is necessary. Returning all fields might cause performance problems.\n\n@return the default return fields.",
"Create the close button UI Component.\n@return the close button.",
"Creates a new RgbaColor from the specified HSL components.\n\n<p>\n<i>Implementation based on <a\nhref=\"http://en.wikipedia.org/wiki/HSL_and_HSV\">wikipedia</a>\nand <a\nhref=\"http://www.w3.org/TR/css3-color/#hsl-color\">w3c</a></i>\n\n@param H\nHue [0,360)\n@param S\nSaturation [0,100]\n@param L\nLightness [0,100]",
"Build resolution context in which message will be discovered and built\n@param components resolution components, used to identify message bundle\n@param messageParams message parameters will be substituted in message and used in pattern matching\n@since 3.1\n@return immutable resolution context instance for given parameters",
"Test for convergence by seeing if the element with the largest change\nis smaller than the tolerance. In some test cases it alternated between\nthe + and - values of the eigen vector. When this happens it seems to have \"converged\"\nto a non-dominant eigen vector. At least in the case I looked at. I haven't devoted\na lot of time into this issue...",
"Use this API to update spilloverpolicy.",
"Send a beat grid update announcement to all registered listeners.\n\n@param player the player whose beat grid information has changed\n@param beatGrid the new beat grid associated with that player, if any",
"Use this API to delete gslbsite of given name."
] |
public static <T> OptionalValue<T> ofNullable(ResourceKey key, T value) {
return new GenericOptionalValue<T>(RUNTIME_SOURCE, key, value);
} | [
"Returns new instance of OptionalValue with given key and value\n@param key resource key of the created value\n@param value wrapped object\n@param <T> type of the wrapped object\n@return given object wrapped in OptionalValue with given key"
] | [
"Sets object for statement at specific index, adhering to platform- and null-rules.\n@param stmt the statement\n@param index the current parameter index\n@param value the value to set\n@param sqlType the JDBC SQL-type of the value\n@throws SQLException on platform error",
"Load the avatar base model\n@param avatarResource resource with avatar model",
"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",
"Might not fill all of dst.",
"End building the script\n@param config the configuration for the script to build\n@return the new {@link LuaScript} instance",
"Ends the transition",
"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.",
"Writes the data collected about classes to a file.",
"Create a Css Selector Transform"
] |
private void processWorkWeeks(byte[] data, int offset, ProjectCalendar cal)
{
// System.out.println("Calendar=" + cal.getName());
// System.out.println("Work week block start offset=" + offset);
// System.out.println(ByteArrayHelper.hexdump(data, true, 16, ""));
// skip 4 byte header
offset += 4;
while (data.length >= offset + ((7 * 60) + 2 + 2 + 8 + 4))
{
//System.out.println("Week start offset=" + offset);
ProjectCalendarWeek week = cal.addWorkWeek();
for (Day day : Day.values())
{
// 60 byte block per day
processWorkWeekDay(data, offset, week, day);
offset += 60;
}
Date startDate = DateHelper.getDayStartDate(MPPUtility.getDate(data, offset));
offset += 2;
Date finishDate = DateHelper.getDayEndDate(MPPUtility.getDate(data, offset));
offset += 2;
// skip unknown 8 bytes
//System.out.println(ByteArrayHelper.hexdump(data, offset, 8, false));
offset += 8;
//
// Extract the name length - ensure that it is aligned to a 4 byte boundary
//
int nameLength = MPPUtility.getInt(data, offset);
if (nameLength % 4 != 0)
{
nameLength = ((nameLength / 4) + 1) * 4;
}
offset += 4;
if (nameLength != 0)
{
String name = MPPUtility.getUnicodeString(data, offset, nameLength);
offset += nameLength;
week.setName(name);
}
week.setDateRange(new DateRange(startDate, finishDate));
// System.out.println(week);
}
} | [
"Read the work weeks.\n\n@param data calendar data\n@param offset current offset into data\n@param cal parent calendar"
] | [
"Detect and apply waves, now or when the widget is attached.\n\n@param widget target widget to ensure is attached first",
"We have received notification that a device is no longer on the network, so clear out its artwork.\n\n@param announcement the packet which reported the device’s disappearance",
"Adds a new cell to the current grid\n@param cell the td component",
"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",
"Wraps a linear solver of any type with a safe solver the ensures inputs are not modified",
"Write back to hints file.",
"Provides a nicely formatted string of the method definition. For simplicity, generic types on some of the elements\nare not displayed.\n@return\nstring form of node with some generic elements suppressed",
"Creates a solver for symmetric positive definite matrices.\n\n@return A new solver for symmetric positive definite matrices.",
"The quick way to detect for a tier of devices.\nThis method detects for devices which can\ndisplay iPhone-optimized web content.\nIncludes iPhone, iPod Touch, Android, Windows Phone 7 and 8, BB10, WebOS, Playstation Vita, etc.\n@return detection of any device in the iPhone/Android/Windows Phone/BlackBerry/WebOS Tier"
] |
private String format(Object o)
{
String result;
if (o == null)
{
result = "";
}
else
{
if (o instanceof Boolean == true)
{
result = LocaleData.getString(m_locale, (((Boolean) o).booleanValue() == true ? LocaleData.YES : LocaleData.NO));
}
else
{
if (o instanceof Float == true || o instanceof Double == true)
{
result = (m_formats.getDecimalFormat().format(((Number) o).doubleValue()));
}
else
{
if (o instanceof Day)
{
result = Integer.toString(((Day) o).getValue());
}
else
{
result = o.toString();
}
}
}
//
// At this point there should be no line break characters in
// the file. If we find any, replace them with spaces
//
result = stripLineBreaks(result, MPXConstants.EOL_PLACEHOLDER_STRING);
//
// Finally we check to ensure that there are no embedded
// quotes or separator characters in the value. If there are, then
// we quote the value and escape any existing quote characters.
//
if (result.indexOf('"') != -1)
{
result = escapeQuotes(result);
}
else
{
if (result.indexOf(m_delimiter) != -1)
{
result = '"' + result + '"';
}
}
}
return (result);
} | [
"This method returns the string representation of an object. In most\ncases this will simply involve calling the normal toString method\non the object, but a couple of exceptions are handled here.\n\n@param o the object to formatted\n@return formatted string representing input Object"
] | [
"Get a list of tags for the specified photo.\n\n<p>\nThis method does not require authentication.\n</p>\n\n@param photoId\nThe photo ID\n@return The collection of Tag objects",
"Check config.\n\n@param context the context\n@return true, if successful\n@throws Exception the exception",
"Creates and returns a matrix which is idential to this one.\n\n@return A new identical matrix.",
"Use this API to expire cacheobject resources.",
"Returns true if the input is a vector\n@param a A matrix or vector\n@return true if it's a vector. Column or row.",
"Apply a filter to the list of all resources, and show the results.\n\n@param project project file\n@param filter filter",
"Shuts down a standalone server.\n\n@param client the client used to communicate with the server\n@param timeout the graceful shutdown timeout, a value of {@code -1} will wait indefinitely and a value of\n{@code 0} will not attempt a graceful shutdown\n\n@throws IOException if an error occurs communicating with the server",
"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",
"Sets the node meta data but allows overwriting values.\n\n@param key - the meta data key\n@param value - the meta data value\n@return the old node meta data value for this key\n@throws GroovyBugError if key is null"
] |
@SuppressWarnings({"unchecked", "unused"})
public static <T> T[] object2Array(final Class<T> clazz, final Object obj) {
return (T[]) obj;
} | [
"We try to convert an Object to an Array and this is not easy in Java so we need a little bit of nasty magic.\n\n@param <T> Type of elements\n@param clazz Clazz of the Objct elements\n@param obj Object\n@return Array"
] | [
"Returns the start position of the indicator.\n\n@return The start position of the indicator.",
"Switches to the next tab.",
"trim \"act.\" from conf keys",
"Returns a new analysis context builder that extracts the information about the available extensions from\nthe provided Revapi instance.\n\n<p>The extensions have to be known so that both old and new style of configuration can be usefully worked with.\n\n@param revapi the revapi instance to read the available extensions from\n@return a new analysis context builder",
"Gets the publisher of the specified type, if it is wrapped by the \"Flexible Publish\" publisher in a project.\nNull is returned if no such publisher is found.\n@param project The project\n@param type The type of the publisher",
"Build all combinations of graph structures for generic event stubs of a maximum length\n@param length Maximum number of nodes in each to generate\n@return All graph combinations of specified length or less",
"Starts given docker machine.\n\n@param cliPathExec\nlocation of docker-machine or null if it is on PATH.\n@param machineName\nto be started.",
"Gets the default options to be passed when no custom properties are given.\n\n@return properties with formatter options",
"Caches the given object using the given Identity as key\n\n@param oid The Identity key\n@param obj The object o cache"
] |
protected boolean shouldApplyThisRuleTo(ClassNode classNode) {
// TODO Consider caching applyTo, doNotApplyTo and associated WildcardPatterns
boolean shouldApply = true;
String applyTo = getApplyToClassNames();
String doNotApplyTo = getDoNotApplyToClassNames();
if (applyTo != null && applyTo.length() > 0) {
WildcardPattern pattern = new WildcardPattern(applyTo, true);
shouldApply = pattern.matches(classNode.getNameWithoutPackage()) || pattern.matches(classNode.getName());
}
if (shouldApply && doNotApplyTo != null && doNotApplyTo.length() > 0) {
WildcardPattern pattern = new WildcardPattern(doNotApplyTo, true);
shouldApply = !pattern.matches(classNode.getNameWithoutPackage()) && !pattern.matches(classNode.getName());
}
return shouldApply;
} | [
"Return true if this rule should be applied for the specified ClassNode, based on the\nconfiguration of this rule.\n@param classNode - the ClassNode\n@return true if this rule should be applied for the specified ClassNode"
] | [
"Checks whether the specified event name is restricted. If it is,\nthen create a pending error, and abort.\n\n@param name The event name\n@return Boolean indication whether the event name is restricted",
"Common mechanism to convert Synchro commentary recorss into notes.\n\n@param rows commentary table rows\n@return note text",
"Send a database announcement to all registered listeners.\n\n@param slot the media slot whose database availability has changed\n@param database the database whose relevance has changed\n@param available if {@code} true, the database is newly available, otherwise it is no longer relevant",
"Returns the connection count by key specified in this registry\n\nNote it might count connections that are closed but not removed from registry yet\n\n@param key\nthe key\n@return connection count by key",
"don't run on main thread",
"Get the label distance..\n\n@param settings Parameters for rendering the scalebar.",
"Launch Sample Activity residing in the same module",
"Use this API to fetch the statistics of all gslbdomain_stats resources that are configured on netscaler.",
"Compute 2-dimensional Perlin noise.\n@param x the x coordinate\n@param y the y coordinate\n@return noise value at (x,y)"
] |
public static void putUnsignedInt(ByteBuffer buffer, int index, long value) {
buffer.putInt(index, (int) (value & 0xffffffffL));
} | [
"Write the given long value as a 4 byte unsigned integer. Overflow is\nignored.\n\n@param buffer The buffer to write to\n@param index The position in the buffer at which to begin writing\n@param value The value to write"
] | [
"Returns the class of datatype URI that best characterizes the range of\nthe given property based on its datatype.\n\n@param propertyIdValue\nthe property for which to get a range\n@return the range URI or null if the datatype could not be identified.",
"Returns an MBeanServer with the specified name\n\n@param name\n@return",
"Create an import declaration and delegates its registration for an upper class.",
"Performs a Bulk Documents insert request.\n\n@param objects The {@link List} of objects.\n@param allOrNothing Indicates whether the request has <tt>all-or-nothing</tt> semantics.\n@return {@code List<Response>} Containing the resulted entries.",
"Add the given entries of the input map into the output map.\n\n<p>\nIf a key in the inputMap already exists in the outputMap, its value is\nreplaced in the outputMap by the value from the inputMap.\n</p>\n\n@param <K> type of the map keys.\n@param <V> type of the map values.\n@param outputMap the map to update.\n@param inputMap the entries to add.\n@since 2.15",
"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",
"Filter for public tweets on these languages.\n\n@param languages\nValid BCP 47 (http://tools.ietf.org/html/bcp47) language identifiers,\nand may represent any of the languages listed on Twitter's advanced search page\n(https://twitter.com/search-advanced), or \"und\" if no language could be detected.\nThese strings should NOT be url-encoded.\n@return this",
"Instantiates the templates specified by @Template within @Templates",
"Returns the proxies real subject. The subject will be materialized if\nnecessary.\n\n@return The subject"
] |
public Iterator getAllBaseTypes()
{
ArrayList baseTypes = new ArrayList();
baseTypes.addAll(_directBaseTypes.values());
for (int idx = baseTypes.size() - 1; idx >= 0; idx--)
{
ClassDescriptorDef curClassDef = (ClassDescriptorDef)baseTypes.get(idx);
for (Iterator it = curClassDef.getDirectBaseTypes(); it.hasNext();)
{
ClassDescriptorDef curBaseTypeDef = (ClassDescriptorDef)it.next();
if (!baseTypes.contains(curBaseTypeDef))
{
baseTypes.add(0, curBaseTypeDef);
idx++;
}
}
}
return baseTypes.iterator();
} | [
"Returns all base types.\n\n@return An iterator of the base types"
] | [
"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.",
"Use this API to update appfwlearningsettings resources.",
"Return true if the expression is a constructor call on any of the named classes, with any number of parameters.\n@param expression - the expression\n@param classNames - the possible List of class names\n@return as described",
"Returns the simplified name of the type of the specified object.",
"Attempt to detect the current platform.\n\n@return The current platform.\n\n@throws UnsupportedPlatformException if the platform cannot be detected.",
"Notify all shutdown listeners that the shutdown completed.",
"Return the inverse cumulative distribution function at x.\n\n@param x Argument\n@return Inverse cumulative distribution function at x.",
"Returns the default privacy level for geographic information attached to the user's photos.\n\n@return privacy-level\n@throws FlickrException\n@see com.flickr4java.flickr.Flickr#PRIVACY_LEVEL_NO_FILTER\n@see com.flickr4java.flickr.Flickr#PRIVACY_LEVEL_PUBLIC\n@see com.flickr4java.flickr.Flickr#PRIVACY_LEVEL_FRIENDS\n@see com.flickr4java.flickr.Flickr#PRIVACY_LEVEL_FAMILY\n@see com.flickr4java.flickr.Flickr#PRIVACY_LEVEL_FRIENDS_FAMILY\n@see com.flickr4java.flickr.Flickr#PRIVACY_LEVEL_PRIVATE",
"Another method to force an input string into a fixed width field\nand set it on the right with the left side filled with space ' ' characters.\n\n@param input input string\n@param width required width\n@return formatted string"
] |
protected boolean isSecureLink(CmsObject cms, String vfsName, CmsSite targetSite, boolean secureRequest) {
return OpenCms.getStaticExportManager().isSecureLink(cms, vfsName, targetSite.getSiteRoot(), secureRequest);
} | [
"Checks if the link target is a secure link.<p\n\n@param cms the current CMS context\n@param vfsName the path of the link target\n@param targetSite the target site containing the detail page\n@param secureRequest true if the currently running request is secure\n\n@return true if the link should be a secure link"
] | [
"Create dummy groups for each concatenated report, and in the footer of\neach group adds the subreport.",
"Template method responsible for file compression checks, file creation, and\ndelegation to specific strategy implementations.\n\n@param backupFile\nThe file to be compressed.\n@param properties\nThe appender's configuration.",
"Copy all of the mappings from the specified map to this one, replacing\nany mappings with the same keys.\n\n@param in the map whose mappings are to be copied",
"Read an optional month value form a JSON value.\n@param val the JSON value that should represent the month.\n@return the month from the JSON or null if reading the month fails.",
"Generate the body of a toString method that uses plain concatenation.\n\n<p>Conventionally, we join properties with comma separators. If all of the properties are\nalways present, this can be done with a long block of unconditional code. We could use a\nStringBuilder for this, but in fact the Java compiler will do this for us under the hood\nif we use simple string concatenation, so we use the more readable approach.",
"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>",
"Add a console pipeline to the Redwood handler tree,\nprinting to stderr.\nCalling this multiple times will result in messages being printed\nmultiple times.\n@return this",
"Resizes an image to the specified height, changing width in the same proportion\n@param originalImage Image in memory\n@param heightOut The height to resize\n@return New Image in memory",
"Create a hazard curve from given times and given discount factors using default interpolation and extrapolation methods.\n\n@param name The name of this hazard curve.\n@param times Array of times as doubles.\n@param givenSurvivalProbabilities Array of corresponding survival probabilities.\n@return A new discount factor object."
] |
private Integer highlanderMode(JobDef jd, DbConn cnx)
{
if (!jd.isHighlander())
{
return null;
}
try
{
Integer existing = cnx.runSelectSingle("ji_select_existing_highlander", Integer.class, jd.getId());
return existing;
}
catch (NoResultException ex)
{
// Just continue, this means no existing waiting JI in queue.
}
// Now we need to actually synchronize through the database to avoid double posting
// TODO: use a dedicated table, not the JobDef one. Will avoid locking the configuration.
ResultSet rs = cnx.runSelect(true, "jd_select_by_id", jd.getId());
// Now we have a lock, just retry - some other client may have created a job instance recently.
try
{
Integer existing = cnx.runSelectSingle("ji_select_existing_highlander", Integer.class, jd.getId());
rs.close();
cnx.commit(); // Do not keep the lock!
return existing;
}
catch (NoResultException ex)
{
// Just continue, this means no existing waiting JI in queue. We keep the lock!
}
catch (SQLException e)
{
// Who cares.
jqmlogger.warn("Issue when closing a ResultSet. Transaction or session leak is possible.", e);
}
jqmlogger.trace("Highlander mode analysis is done: nor existing JO, must create a new one. Lock is hold.");
return null;
} | [
"Helper. Current transaction is committed in some cases."
] | [
"Boot the controller. Called during service start.\n\n@param context the boot context\n@throws ConfigurationPersistenceException\nif the configuration failed to be loaded",
"Sets an attribute in a non-main section of the manifest.\n\n@param section the section's name\n@param name the attribute's name\n@param value the attribute's value\n@return {@code this}\n@throws IllegalStateException if entries have been added or the JAR has been written prior to calling this methods.",
"Builds the Join for columns if they are not found among the existingColumns.\n@param columns the list of columns represented by Criteria.Field to ensure\n@param existingColumns the list of column names (String) that are already appended",
"Creates a db handling object.\n\n@return The db handling object\n@throws BuildException If the handling is invalid",
"Add a content modification.\n\n@param modification the content modification",
"Creates a new remote proxy controller using an existing channel.\n\n@param channelAssociation the channel association\n@param pathAddress the address within the model of the created proxy controller\n@param addressTranslator the translator to use translating the address for the remote proxy\n@return the proxy controller\n\n@deprecated only present for test case use",
"Request the artwork with a particular artwork ID, given a connection to a player that has already been set up.\n\n@param artworkId identifies the album art to retrieve\n@param slot the slot identifier from which the associated track was loaded\n@param trackType the kind of track that owns the artwork\n@param client the dbserver client that is communicating with the appropriate player\n\n@return the track's artwork, or null if none is available\n\n@throws IOException if there is a problem communicating with the player",
"This method extracts resource data from an MSPDI file.\n\n@param project Root node of the MSPDI file\n@param calendarMap Map of calendar UIDs to names",
"Use this API to fetch all the nsrollbackcmd resources that are configured on netscaler.\nThis uses nsrollbackcmd_args which is a way to provide additional arguments while fetching the resources."
] |
protected void checkScopeAllowed() {
if (ejbDescriptor.isStateless() && !isDependent()) {
throw BeanLogger.LOG.scopeNotAllowedOnStatelessSessionBean(getScope(), getType());
}
if (ejbDescriptor.isSingleton() && !(isDependent() || getScope().equals(ApplicationScoped.class))) {
throw BeanLogger.LOG.scopeNotAllowedOnSingletonBean(getScope(), getType());
}
} | [
"Check that the scope type is allowed by the stereotypes on the bean and\nthe bean type"
] | [
"OR operation which takes 2 arguments and OR's them together.\n\n<p>\n<b>NOTE:</b> There is no guarantee of the order of the clauses that are generated in the final query.\n</p>\n<p>\n<b>NOTE:</b> I can't remove the generics code warning that can be associated with this method. You can instead\nuse the {@link #or(int)} method.\n</p>",
"Creates the DAO if we have config information cached and caches the DAO.",
"Creates the tables according to the schema files.\n\n@throws PlatformException If some error occurred",
"Update the lastCheckTime of the given record.\n\n@param id the id\n@param lastCheckTime the new value",
"Deletes a story. A user can only delete stories they have created. Returns an empty data record.\n\n@param story Globally unique identifier for the story.\n@return Request object",
"Use this API to fetch all the systemuser resources that are configured on netscaler.",
"Adds this handler to the widget.\n\n@param <H> the type of handler to add\n@param type the event type\n@param handler the handler\n@return {@link HandlerRegistration} used to remove the handler",
"Finish service initialization.\n\n@throws GeomajasException oops",
"Register an active operation with a specific operation id.\n\n@param id the operation id\n@param attachment the shared attachment\n@param callback the completed callback\n@return the created active operation\n\n@throws java.lang.IllegalStateException if an operation with the same id is already registered"
] |
String getRangeUri(PropertyIdValue propertyIdValue) {
String datatype = this.propertyRegister
.getPropertyType(propertyIdValue);
if (datatype == null)
return null;
switch (datatype) {
case DatatypeIdValue.DT_MONOLINGUAL_TEXT:
this.rdfConversionBuffer.addDatatypeProperty(propertyIdValue);
return Vocabulary.RDF_LANG_STRING;
case DatatypeIdValue.DT_STRING:
case DatatypeIdValue.DT_EXTERNAL_ID:
case DatatypeIdValue.DT_MATH:
this.rdfConversionBuffer.addDatatypeProperty(propertyIdValue);
return Vocabulary.XSD_STRING;
case DatatypeIdValue.DT_COMMONS_MEDIA:
case DatatypeIdValue.DT_GLOBE_COORDINATES:
case DatatypeIdValue.DT_ITEM:
case DatatypeIdValue.DT_PROPERTY:
case DatatypeIdValue.DT_LEXEME:
case DatatypeIdValue.DT_FORM:
case DatatypeIdValue.DT_SENSE:
case DatatypeIdValue.DT_TIME:
case DatatypeIdValue.DT_URL:
case DatatypeIdValue.DT_GEO_SHAPE:
case DatatypeIdValue.DT_TABULAR_DATA:
case DatatypeIdValue.DT_QUANTITY:
this.rdfConversionBuffer.addObjectProperty(propertyIdValue);
return Vocabulary.OWL_THING;
default:
return null;
}
} | [
"Returns the class of datatype URI that best characterizes the range of\nthe given property based on its datatype.\n\n@param propertyIdValue\nthe property for which to get a range\n@return the range URI or null if the datatype could not be identified."
] | [
"Add the given entries of the input map into the output map.\n\n<p>\nIf a key in the inputMap already exists in the outputMap, its value is\nreplaced in the outputMap by the value from the inputMap.\n</p>\n\n@param <K> type of the map keys.\n@param <V> type of the map values.\n@param outputMap the map to update.\n@param inputMap the entries to add.\n@since 2.15",
"Return cached object by key. The key will be concatenated with\ncurrent session id when fetching the cached object\n\n@param key\n@param <T>\nthe object type\n@return the cached object",
"Use this API to fetch the statistics of all nsacl6_stats resources that are configured on netscaler.",
"A helper - in Java 9, the extension CL was renamed to platform CL and hosts all the JDK classes. Before 9, it was useless and we used\nbootstrap CL instead.\n\n@return the base CL to use.",
"Set new point coordinates somewhere on screen and apply new direction\n\n@param position the point position to apply new values to",
"Returns the default output for functions without configured JSPs.\n\n@param request the current request\n@return the default HTML output",
"Returns the docker version.\n\n@param serverUrl\nThe serverUrl to use.",
"Returns a new analysis context builder that extracts the information about the available extensions from\nthe provided Revapi instance.\n\n<p>The extensions have to be known so that both old and new style of configuration can be usefully worked with.\n\n@param revapi the revapi instance to read the available extensions from\n@return a new analysis context builder",
"Populates data in this Options from the character stream.\n@param in The Reader\n@throws IOException If there is a problem reading data"
] |
public <T extends Widget & Checkable> List<Integer> getCheckedWidgetIndexes() {
List<Integer> checked = new ArrayList<>();
List<Widget> children = getChildren();
final int size = children.size();
for (int i = 0, j = -1; i < size; ++i) {
Widget c = children.get(i);
if (c instanceof Checkable) {
++j;
if (((Checkable) c).isChecked()) {
checked.add(j);
}
}
}
return checked;
} | [
"Gets all checked widget indexes in the group. The indexes are counted from 0 to size -1,\nwhere size is the number of Checkable widgets in the group. It does not take into account\nany non-Checkable widgets added to the group widget.\n\n@return list of checked widget indexes"
] | [
"Ranks a map based on integer values\n@param inputMap Input\n@return The ranked map",
"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",
"Returns a unique file name\n@param baseFileName the requested base name for the file\n@param extension the requested extension for the file\n@param cleanBaseFileName specify if the <code>baseFileName</code> has to be cleaned before being used (i.e. 'jboss-web' should not be cleaned to avoid '-' to become '_')\n@param ancestorFolders specify the ancestor folders for the file (if there's no ancestor folder, just pass 'null' value)\n@return a String representing the unique file generated",
"Add the list with given bundles to the \"Export-Package\" main attribute.\n\n@param exportedPackages The list of all packages to add.",
"Returns the value of an option, or the default if the value is null or the key is not part of the map.\n@param configOptions the map with the config options.\n@param optionKey the option to get the value of\n@param defaultValue the default value to return if the option is not set.\n@return the value of an option, or the default if the value is null or the key is not part of the map.",
"Gets any previous versions of this file. Note that only users with premium accounts will be able to retrieve\nprevious versions of their files.\n\n@return a list of previous file versions.",
"Generate a VideoCollection with random data obtained form VIDEO_INFO map. You don't need o\ncreate your own AdapteeCollections. Review ListAdapteeCollection if needed.\n\n@param videoCount size of the collection.\n@return VideoCollection generated.",
"Compare two versions\n\n@param other\n@return an integer: 0 if equals, -1 if older, 1 if newer\n@throws IncomparableException is thrown when two versions are not coparable",
"Return a list of place IDs for a query string.\n\nThe flickr.places.find method is not a geocoder. It will round \"up\" to the nearest place type to which place IDs apply. For example, if you pass it a\nstreet level address it will return the city that contains the address rather than the street, or building, itself.\n\n<p>\nThis method does not require authentication.\n</p>\n\n@param query\n@return PlacesList\n@throws FlickrException"
] |
private static AbstractIndex constructLiborIndex(String forwardCurveName, Schedule schedule) {
if(forwardCurveName != null) {
//determine average fixing offset and period length
double fixingOffset = 0;
double periodLength = 0;
for(int i = 0; i < schedule.getNumberOfPeriods(); i++) {
fixingOffset *= ((double) i) / (i+1);
fixingOffset += (schedule.getPeriodStart(i) - schedule.getFixing(i)) / (i+1);
periodLength *= ((double) i) / (i+1);
periodLength += schedule.getPeriodLength(i) / (i+1);
}
return new LIBORIndex(forwardCurveName, fixingOffset, periodLength);
} else {
return null;
}
} | [
"Construct a Libor index for a given curve and schedule.\n\n@param forwardCurveName\n@param schedule\n@return The Libor index or null, if forwardCurveName is null."
] | [
"Retrieves a vertex attribute as an integer buffer.\nThe attribute name must be one of the\nattributes named in the descriptor passed to the constructor.\n@param attributeName name of the attribute to update\n@throws IllegalArgumentException if attribute name not in descriptor vertex attribute is not <i>int</i>\n@see #setIntArray(String, int[])\n@see #getIntVec(String)",
"Use this API to update gslbservice resources.",
"Polls the next ParsedWord from the stack.\n\n@return next ParsedWord",
"Add a channel to the animation to animate the named bone.\n@param boneName name of bone to animate.\n@param channel The animation channel.",
"perform the actual matching",
"Utility function that copies a string array and add another string to\nfirst\n\n@param arr Original array of strings\n@param add\n@return Copied array of strings",
"Splits the given string.",
"Get all backup data\n\n@param model\n@return\n@throws Exception",
"Selects a specific vertex and fragment shader to use for rendering.\n\nIf a shader template has been specified, it is used to generate\na vertex and fragment shader based on mesh attributes, bound textures\nand light sources. If the textures bound to the material are changed\nor a new light source is added, this function must be called again\nto select the appropriate shaders. This function may cause recompilation\nof shaders which is quite slow.\n\n@param scene scene being rendered\n@see GVRShaderTemplate GVRMaterialShader.getShaderType"
] |
public static bridgegroup_nsip_binding[] get(nitro_service service, Long id) throws Exception{
bridgegroup_nsip_binding obj = new bridgegroup_nsip_binding();
obj.set_id(id);
bridgegroup_nsip_binding response[] = (bridgegroup_nsip_binding[]) obj.get_resources(service);
return response;
} | [
"Use this API to fetch bridgegroup_nsip_binding resources of given name ."
] | [
"Get the names of the currently registered format providers.\n\n@return the provider names, never null.",
"Checks if the given argument is null and throws an exception with a\nmessage containing the argument name if that it true.\n\n@param argument the argument to check for null\n@param argumentName the name of the argument to check.\nThis is used in the exception message.\n@param <T> the type of the argument\n@return the argument itself\n@throws IllegalArgumentException in case argument is null",
"Given a status update from a CDJ, find the metadata for the track that it has loaded, if any. If there is\nan appropriate metadata cache, will use that, otherwise makes a query to the players dbserver.\n\n@param status the CDJ status update that will be used to determine the loaded track and ask the appropriate\nplayer for metadata about it\n\n@return the metadata that was obtained, if any",
"Use this API to fetch dnsview resource of given name .",
"Used to create a new finite 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 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.",
"Dump an array of bytes in hexadecimal.\n\n@param displayOffset the display offset (left column)\n@param data the byte array of data\n@param offset the offset to start dumping in the byte array\n@param len the length of data to dump\n@return the dump string",
"Guess the date of the dump from the given dump file name.\n\n@param fileName\n@return 8-digit date stamp or YYYYMMDD if none was found",
"Sets the quaternion of the keyframe.",
"Use this API to add vpath."
] |
public void addAuxHandler(Object handler, String prefix) {
if (handler == null) {
throw new NullPointerException();
}
auxHandlers.put(prefix, handler);
allHandlers.add(handler);
addDeclaredMethods(handler, prefix);
inputConverter.addDeclaredConverters(handler);
outputConverter.addDeclaredConverters(handler);
if (handler instanceof ShellDependent) {
((ShellDependent)handler).cliSetShell(this);
}
} | [
"This method is very similar to addMainHandler, except ShellFactory\nwill pass all handlers registered with this method to all this shell's subshells.\n\n@see org.gearvrf.debug.cli.Shell#addMainHandler(java.lang.Object, java.lang.String)\n\n@param handler Object which should be registered as handler.\n@param prefix Prefix that should be prepended to all handler's command names."
] | [
"Retrieves the amount of working time represented by\na calendar exception.\n\n@param exception calendar exception\n@return length of time in milliseconds",
"Helper xml end tag writer\n\n@param value the output stream to use in writing",
"Handle bind service event.\n@param service Service instance\n@param props Service reference properties",
"Move the animation frame counter forward.\n\n@return boolean specifying if animation should continue or if loopCount has been fulfilled.",
"Starts given docker machine.\n\n@param cliPathExec\nlocation of docker-machine or null if it is on PATH.\n@param machineName\nto be started.",
"Determine if the buffer, when expressed as text, matches a fingerprint regular expression.\n\n@param buffer bytes from file\n@param fingerprint fingerprint regular expression\n@return true if the file matches the fingerprint",
"Computes an MD4 hash for the password.\n\n@param password the password for which to compute the hash\n@throws NoSuchAlgorithmException\n@throws InvalidKeyException\n\n@return the password hash",
"Possibly coalesces the newest change event to match the user's original intent. For example,\nan unsynchronized insert and update is still an insert.\n\n@param lastUncommittedChangeEvent the last change event known about for a document.\n@param newestChangeEvent the newest change event known about for a document.\n@return the possibly coalesced change event.",
"Pull docker image using the docker java client.\n\n@param imageTag\n@param username\n@param password\n@param host"
] |
public void fire(StepFinishedEvent event) {
Step step = stepStorage.adopt();
event.process(step);
notifier.fire(event);
} | [
"Process StepFinishedEvent. Change last added to stepStorage step\nand add it as child of previous step.\n\n@param event to process"
] | [
"Returns true if required properties for FluoAdmin are set",
"Returns an array of all declared fields in the given class and all\nsuper-classes.",
"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",
"Sets the provided square matrix to be a random symmetric matrix whose values are selected from an uniform distribution\nfrom min to max, inclusive.\n\n@param A The matrix that is to be modified. Must be square. Modified.\n@param min Minimum value an element can have.\n@param max Maximum value an element can have.\n@param rand Random number generator.",
"Set the groups assigned to a path\n\n@param groups group IDs to set\n@param pathId ID of path",
"Used to get the current repository key\n@return keyFromText or keyFromSelect reflected by the dynamicMode flag",
"Use this API to fetch gslbservice resource of given name .",
"Use this API to fetch a cmpglobal_cmppolicy_binding resources.",
"Loads treebank data from first argument and prints it.\n\n@param args Array of command-line arguments: specifies a filename"
] |
public Permissions getPerms(String photoId) throws FlickrException {
Map<String, Object> parameters = new HashMap<String, Object>();
parameters.put("method", METHOD_GET_PERMS);
parameters.put("photo_id", photoId);
Response response = transport.get(transport.getPath(), parameters, apiKey, sharedSecret);
if (response.isError()) {
throw new FlickrException(response.getErrorCode(), response.getErrorMessage());
}
Element permissionsElement = response.getPayload();
Permissions permissions = new Permissions();
permissions.setId(permissionsElement.getAttribute("id"));
permissions.setPublicFlag("1".equals(permissionsElement.getAttribute("ispublic")));
permissions.setFamilyFlag("1".equals(permissionsElement.getAttribute("isfamily")));
permissions.setFriendFlag("1".equals(permissionsElement.getAttribute("isfriend")));
permissions.setComment(permissionsElement.getAttribute("permcomment"));
permissions.setAddmeta(permissionsElement.getAttribute("permaddmeta"));
return permissions;
} | [
"Get the permission information for the specified photo.\n\nThis method requires authentication with 'read' permission.\n\n@param photoId\nThe photo id\n@return The Permissions object\n@throws FlickrException"
] | [
"Sets the max.\n\n@param n the new max",
"Sorts the specified list itself according to the order induced by applying a key function to each element which\nyields a comparable criteria.\n\n@param list\nthe list to be sorted. May not be <code>null</code>.\n@param key\nthe key function to-be-used. May not be <code>null</code>.\n@return the sorted list itself.\n@see Collections#sort(List)",
"Get layer style by name.\n\n@param name layer style name\n@return layer style",
"This method lists task predecessor and successor relationships.\n\n@param file project file",
"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.",
"helper to calculate the navigationBar height\n\n@param context\n@return",
"Returns a list ordered from the highest priority to the lowest.",
"Return true if c has a @hidden tag associated with it",
"Returns a simple web page where certs can be downloaded. This is meant for mobile device setup.\n@return\n@throws Exception"
] |
public boolean addSsextension(String ssExt) {
if (this.ssextensions == null) {
this.ssextensions = new ArrayList<String>();
}
return this.ssextensions.add(ssExt);
} | [
"Add an additional SSExtension\n@param ssExt the ssextension to set"
] | [
"Returns a Client object for a clientUUID and profileId\n\n@param clientUUID UUID or friendlyName of client\n@param profileId - can be null, safer if it is not null\n@return Client object or null\n@throws Exception exception",
"Get the names of all current registered providers.\n\n@return the names of all current registered providers, never null.",
"Use this API to fetch onlinkipv6prefix resource of given name .",
"Sets the duration for the animation to be played.\n\n@param start the animation will start playing from the specified time\n@param end the animation will stop playing at the specified time\n\n@return {@code this}, so you can chain setProperty() calls.\n@throws IllegalArgumentException\nIf {@code start} is either negative value, greater than\n{@code end} value or {@code end} is greater than duration",
"Returns a prefix length for which the range of this segment grouping matches the the block of addresses for that prefix.\n\nIf no such prefix exists, returns null\n\nIf this segment grouping represents a single value, returns the bit length\n\n@return the prefix length or null",
"public because it's used by other packages that use Duke",
"Return any feedback messages and errors that were generated - but\nsuppressed - during the interpolation process. Since unresolvable\nexpressions will be left in the source string as-is, this feedback is\noptional, and will only be useful for debugging interpolation problems.\n\n@return a {@link List} that may be interspersed with {@link String} and\n{@link Throwable} instances.",
"Gets the index of a ExpandableWrapper within the helper item list based on\nthe index of the ExpandableWrapper.\n\n@param parentPosition The index of the parent in the list of parents\n@return The index of the parent in the merged list of children and parents",
"Marshal the assertion as a JSON object.\n\n@param assertion the assertion to marshal"
] |
protected void splitCriteria()
{
Criteria whereCrit = getQuery().getCriteria();
Criteria havingCrit = getQuery().getHavingCriteria();
if (whereCrit == null || whereCrit.isEmpty())
{
getJoinTreeToCriteria().put(getRoot(), null);
}
else
{
// TODO: parameters list shold be modified when the form is reduced to DNF.
getJoinTreeToCriteria().put(getRoot(), whereCrit);
buildJoinTree(whereCrit);
}
if (havingCrit != null && !havingCrit.isEmpty())
{
buildJoinTree(havingCrit);
}
} | [
"First reduce the Criteria to the normal disjunctive form, then\ncalculate the necessary tree of joined tables for each item, then group\nitems with the same tree of joined tables."
] | [
"Support the subscript operator for CharSequence.\n\n@param text a CharSequence\n@param index the index of the Character to get\n@return the Character at the given index\n@since 1.0",
"Helper method that stores in a hash map how often a certain key occurs.\nIf the key has not been encountered yet, a new entry is created for it in\nthe map. Otherwise the existing value for the key is incremented.\n\n@param map\nthe map where the counts are stored\n@param key\nthe key to be counted\n@param count\nvalue by which the count should be incremented; 1 is the usual\ncase",
"Resize the image passing the new height and width\n\n@param height\n@param width\n@return",
"Encodes the given URI path with the given encoding.\n@param path the path to be encoded\n@param encoding the character encoding to encode to\n@return the encoded path\n@throws UnsupportedEncodingException when the given encoding parameter is not supported",
"Use this API to fetch nssimpleacl resource of given name .",
"Formats the supplied value using the specified DateTimeFormat.\n\n@return \"\" if the value is null",
"Creates the stats type.\n\n@param statsItems\nthe stats items\n@param sortType\nthe sort type\n@param functionParser\nthe function parser\n@return the string",
"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",
"Read exceptions for a calendar.\n\n@param table calendar exception data\n@param calendar calendar\n@param exceptionID first exception ID"
] |
public void afterDeploymentValidation(@Observes @Priority(1) AfterDeploymentValidation event, BeanManager beanManager) {
BeanManagerImpl manager = BeanManagerProxy.unwrap(beanManager);
probe.init(manager);
if (isJMXSupportEnabled(manager)) {
try {
MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();
mbs.registerMBean(new ProbeDynamicMBean(jsonDataProvider, JsonDataProvider.class), constructProbeJsonDataMBeanName(manager, probe));
} catch (MalformedObjectNameException | InstanceAlreadyExistsException | MBeanRegistrationException | NotCompliantMBeanException e) {
event.addDeploymentProblem(ProbeLogger.LOG.unableToRegisterMBean(JsonDataProvider.class, manager.getContextId(), e));
}
}
addContainerLifecycleEvent(event, null, beanManager);
exportDataIfNeeded(manager);
} | [
"any possible bean invocations from other ADV observers"
] | [
"Calculate the file to compile a jasper report template to.\n\n@param configuration the configuration for the current app.\n@param jasperFileXml the jasper report template in xml format.\n@param extension the extension of the compiled report template.\n@param logger the logger to log errors to if an occur.",
"Sorts the given array into sorted order using the given comparator.\n\n@param self the array to be sorted\n@param comparator a Comparator used for the comparison\n@return the sorted array\n@since 1.5.5",
"Internal utility to help JNI add hit objects to the pick list. Specifically for MeshColliders with picking\nfor UV, Barycentric, and normal coordinates enabled",
"Stop a managed server.",
"Triggers a replication request, blocks while the replication is in progress.\n@return ReplicationResult encapsulating the result",
"Closes the output. Should be called after the JSON serialization was\nfinished.\n\n@throws IOException\nif there was a problem closing the output",
"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",
"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.",
"This method is used to automatically generate a value\nfor the WBS field of this task.\n\n@param parent Parent Task"
] |
public static DoubleMatrix expm(DoubleMatrix A) {
// constants for pade approximation
final double c0 = 1.0;
final double c1 = 0.5;
final double c2 = 0.12;
final double c3 = 0.01833333333333333;
final double c4 = 0.0019927536231884053;
final double c5 = 1.630434782608695E-4;
final double c6 = 1.0351966873706E-5;
final double c7 = 5.175983436853E-7;
final double c8 = 2.0431513566525E-8;
final double c9 = 6.306022705717593E-10;
final double c10 = 1.4837700484041396E-11;
final double c11 = 2.5291534915979653E-13;
final double c12 = 2.8101705462199615E-15;
final double c13 = 1.5440497506703084E-17;
int j = Math.max(0, 1 + (int) Math.floor(Math.log(A.normmax()) / Math.log(2)));
DoubleMatrix As = A.div((double) Math.pow(2, j)); // scaled version of A
int n = A.getRows();
// calculate D and N using special Horner techniques
DoubleMatrix As_2 = As.mmul(As);
DoubleMatrix As_4 = As_2.mmul(As_2);
DoubleMatrix As_6 = As_4.mmul(As_2);
// U = c0*I + c2*A^2 + c4*A^4 + (c6*I + c8*A^2 + c10*A^4 + c12*A^6)*A^6
DoubleMatrix U = DoubleMatrix.eye(n).muli(c0).addi(As_2.mul(c2)).addi(As_4.mul(c4)).addi(
DoubleMatrix.eye(n).muli(c6).addi(As_2.mul(c8)).addi(As_4.mul(c10)).addi(As_6.mul(c12)).mmuli(As_6));
// V = c1*I + c3*A^2 + c5*A^4 + (c7*I + c9*A^2 + c11*A^4 + c13*A^6)*A^6
DoubleMatrix V = DoubleMatrix.eye(n).muli(c1).addi(As_2.mul(c3)).addi(As_4.mul(c5)).addi(
DoubleMatrix.eye(n).muli(c7).addi(As_2.mul(c9)).addi(As_4.mul(c11)).addi(As_6.mul(c13)).mmuli(As_6));
DoubleMatrix AV = As.mmuli(V);
DoubleMatrix N = U.add(AV);
DoubleMatrix D = U.subi(AV);
// solve DF = N for F
DoubleMatrix F = Solve.solve(D, N);
// now square j times
for (int k = 0; k < j; k++) {
F.mmuli(F);
}
return F;
} | [
"Calculate matrix exponential of a square matrix.\n\nA scaled Pade approximation algorithm is used.\nThe algorithm has been directly translated from Golub & Van Loan \"Matrix Computations\",\nalgorithm 11.3.1. Special Horner techniques from 11.2 are also used to minimize the number\nof matrix multiplications.\n\n@param A square matrix\n@return matrix exponential of A"
] | [
"Register the given object under the package name of the object's class\nwith the given type name.\n\nthis method using the platform mbean server as returned by\nManagementFactory.getPlatformMBeanServer()\n\n@param typeName The name of the type to register\n@param obj The object to register as an mbean",
"Returns the directory of the file.\n\n@param filePath Path of the file.\n@return The directory string or {@code null} if\nthere is no parent directory.\n@throws IllegalArgumentException if path is bad",
"Use this API to fetch csvserver_appflowpolicy_binding resources of given name .",
"Copy the contents of the given InputStream into a String.\nLeaves the stream open when done.\n@param in the InputStream to copy from\n@return the String that has been copied to\n@throws IOException in case of I/O errors",
"Add a task to the project.\n\n@return new task instance",
"Runs the module import script.\n\n@param cms the CMS context to use\n@param module the module for which to run the script",
"Synchronize the scroll positions of the scrollbars with the actual scroll\nposition of the content.",
"Use this API to delete dnstxtrec.",
"Handle content length.\n\n@param event\nthe event"
] |
private static void verifyJUnit4Present() {
try {
Class<?> clazz = Class.forName("org.junit.runner.Description");
if (!Serializable.class.isAssignableFrom(clazz)) {
JvmExit.halt(SlaveMain.ERR_OLD_JUNIT);
}
} catch (ClassNotFoundException e) {
JvmExit.halt(SlaveMain.ERR_NO_JUNIT);
}
} | [
"Verify JUnit presence and version."
] | [
"Sets the left padding for all cells in the row.\n@param paddingLeft new padding, ignored if smaller than 0\n@return this to allow chaining",
"Sets the promotion state.\n\n<P>INFO: This method updates automatically all the contained artifacts.\n\n@param promoted boolean",
"Reads and sets the next feed in the stream.",
"Start the initialization.\n\n@param id\n@param manager\n@param bootstrap\n@return the initialized Weld container",
"Get the aggregated result human readable string for easy display.\n\n\n@param aggregateResultMap the aggregate result map\n@return the aggregated result human",
"Opens the stream in a background thread.",
"Adds the given property and value to the constructed reference.\n\n@param propertyIdValue\nthe property to add\n@param value\nthe value to add\n@return builder object to continue construction",
"Add a creatable \"post-run\" dependent for this task item.\n\n@param creatable the creatable \"post-run\" dependent.\n@return the key to be used as parameter to taskResult(string) method to retrieve created \"post-run\" dependent",
"Generates a schedule based on some meta data. The schedule generation\nconsiders short periods. Date rolling is ignored.\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@return The corresponding schedule\n@deprecated Will be removed in version 2.3"
] |
public void cullHistory(final int profileId, final String clientUUID, final int limit) throws Exception {
//Allow only 1 delete thread to run
if (threadActive) {
return;
}
threadActive = true;
//Create a thread so proxy will continue to work during long delete
Thread t1 = new Thread(new Runnable() {
@Override
public void run() {
PreparedStatement statement = null;
try (Connection sqlConnection = sqlService.getConnection()) {
String sqlQuery = "SELECT COUNT(" + Constants.GENERIC_ID + ") FROM " + Constants.DB_TABLE_HISTORY + " ";
// see if profileId is set or not (-1)
if (profileId != -1) {
sqlQuery += "WHERE " + Constants.GENERIC_PROFILE_ID + "=" + profileId + " ";
}
if (clientUUID != null && clientUUID.compareTo("") != 0) {
sqlQuery += "AND " + Constants.GENERIC_CLIENT_UUID + "='" + clientUUID + "' ";
}
sqlQuery += ";";
Statement query = sqlConnection.createStatement();
ResultSet results = query.executeQuery(sqlQuery);
if (results.next()) {
if (results.getInt("COUNT(" + Constants.GENERIC_ID + ")") < (limit + 10000)) {
return;
}
}
//Find the last item in the table
statement = sqlConnection.prepareStatement("SELECT " + Constants.GENERIC_ID + " FROM " + Constants.DB_TABLE_HISTORY +
" WHERE " + Constants.CLIENT_CLIENT_UUID + " = \'" + clientUUID + "\'" +
" AND " + Constants.CLIENT_PROFILE_ID + " = " + profileId +
" ORDER BY " + Constants.GENERIC_ID + " ASC LIMIT 1");
ResultSet resultSet = statement.executeQuery();
if (resultSet.next()) {
int currentSpot = resultSet.getInt(Constants.GENERIC_ID) + 100;
int finalDelete = currentSpot + 10000;
//Delete 100 items at a time until 10000 are deleted
//Do this so table is unlocked frequently to allow other proxy items to access it
while (currentSpot < finalDelete) {
PreparedStatement deleteStatement = sqlConnection.prepareStatement("DELETE FROM " + Constants.DB_TABLE_HISTORY +
" WHERE " + Constants.CLIENT_CLIENT_UUID + " = \'" + clientUUID + "\'" +
" AND " + Constants.CLIENT_PROFILE_ID + " = " + profileId +
" AND " + Constants.GENERIC_ID + " < " + currentSpot);
deleteStatement.executeUpdate();
currentSpot += 100;
}
}
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
threadActive = false;
if (statement != null) {
statement.close();
}
} catch (Exception e) {
}
}
}
});
t1.start();
} | [
"Removes old entries in the history table for the given profile and client UUID\n\n@param profileId ID of profile\n@param clientUUID UUID of client\n@param limit Maximum number of history entries to remove\n@throws Exception exception"
] | [
"Adds a function to the end of the token list\n@param function Function which is to be added\n@return The new Token created around function",
"Returns an iterator that will only offer leaf trace regions. If the nested regions have gaps, these will be\nfilled with parent data. If this region is a leaf, a singleton iterator will be returned.\n\n@return an unmodifiable iterator for all leafs. Never <code>null</code>.",
"Read an unsigned integer from the given byte array\n\n@param bytes The bytes to read from\n@param offset The offset to begin reading at\n@return The integer as a long",
"Pretty prints the given source code.\n\n@param code\nsource code to format\n@param options\nformatter options\n@param lineEnding\ndesired line ending\n@return formatted source code",
"Removes 'original' and places 'target' at the same location",
"Add the string representation of the given object to this sequence at the given index. The given indentation will\nbe prepended to each line except the first one if the object has a multi-line string representation.\n\n@param object\nthe to-be-appended object.\n@param indentation\nthe indentation string that should be prepended. May not be <code>null</code>.\n@param index\nthe index in the list of segments.",
"Start unmarshalling using the parser.\n@param parser\n@param preProcessingData\n@return the root element of a bpmn2 document.\n@throws java.io.IOException",
"Scans given archive for files passing given filter, adds the results into given list.",
"Convert a Java date into a Planner time.\n\n0800\n\n@param value Java Date instance\n@return Planner time value"
] |
public static tunnelip_stats[] get(nitro_service service) throws Exception{
tunnelip_stats obj = new tunnelip_stats();
tunnelip_stats[] response = (tunnelip_stats[])obj.stat_resources(service);
return response;
} | [
"Use this API to fetch the statistics of all tunnelip_stats resources that are configured on netscaler."
] | [
"Replace bad xml charactes in given array by space\n\n@param cbuf buffer to replace in\n@param off Offset from which to start reading characters\n@param len Number of characters to be replaced",
"Get the aggregated result human readable string for easy display.\n\n\n@param aggregateResultMap the aggregate result map\n@return the aggregated result human",
"This is needed when running on slaves.",
"Exit the Application",
"Converts a sequence of unicode code points to a sequence of Java characters.\n\n@return the number of chars written to the destination buffer",
"Create a new service activator for the domain server communication services.\n\n@param endpointConfig the endpoint configuration\n@param managementURI the management connection URI\n@param serverName the server name\n@param serverProcessName the server process name\n@param authKey the authentication key\n@param managementSubsystemEndpoint whether to use the mgmt subsystem endpoint or not\n@return the service activator",
"Destroys the current session",
"in truth we probably only need the types as injected by the metadata binder",
"appends a WHERE-clause to the Statement\n@param where\n@param crit\n@param stmt"
] |
private void removeFromInverseAssociations(
Tuple resultset,
int tableIndex,
Serializable id,
SharedSessionContractImplementor session) {
new EntityAssociationUpdater( this )
.id( id )
.resultset( resultset )
.session( session )
.tableIndex( tableIndex )
.propertyMightRequireInverseAssociationManagement( propertyMightBeMainSideOfBidirectionalAssociation )
.removeNavigationalInformationFromInverseSide();
} | [
"Removes the given entity from the inverse associations it manages."
] | [
"Apply the matching client UUID for the request\n\n@param httpServletRequest\n@param history",
"Filter out interceptors and decorators which are also enabled globally.\n\n@param enabledClasses\n@param globallyEnabledClasses\n@param logMessageCallback\n@param deployment\n@return the filtered list",
"Convenience method which allows all projects in the database to\nbe read in a single operation.\n\n@return list of ProjectFile instances\n@throws MPXJException",
"Use this API to fetch vpntrafficpolicy_aaagroup_binding resources of given name .",
"returns the total count of objects in the GeneralizedCounter.",
"Fire an event and notify observers that belong to this module.\n@param eventType\n@param event\n@param qualifiers",
"Main method of the class, which handles the process of creating the tests\n\n@param requirementsFolder\n, it is the folder where the plain text given by the client is\nstored\n@param platformName\n, to choose the MAS platform (JADE, JADEX, etc.)\n@param src_test_dir\n, the folder where our classes are created\n@param tests_package\n, the name of the package where the stories are created\n@param casemanager_package\n, the path where casemanager must be created\n@param loggingPropFile\n, properties file\n@throws Exception\n, if any error is found in the configuration",
"Creates a replica of the node with the new partitions list\n\n@param node The node whose replica we are creating\n@param partitionsList The new partitions list\n@return Replica of node with new partitions list",
"Replies the elements of the given map except the pairs with the given keys.\n\n<p>\nThe replied map is a view on the given map. It means that any change\nin the original map is reflected to the result of this operation.\n</p>\n\n@param <K> type of the map keys.\n@param <V> type of the map values.\n@param map the map to update.\n@param keys the keys of the pairs to remove.\n@return the map with the content of the map except the pairs.\n@since 2.15"
] |
public static spilloverpolicy_stats[] get(nitro_service service) throws Exception{
spilloverpolicy_stats obj = new spilloverpolicy_stats();
spilloverpolicy_stats[] response = (spilloverpolicy_stats[])obj.stat_resources(service);
return response;
} | [
"Use this API to fetch the statistics of all spilloverpolicy_stats resources that are configured on netscaler."
] | [
"Returns the list of colliders attached to scene objects that are\nvisible from the viewpoint of the camera.\n\n<p>\nThis method is thread safe because it guarantees that only\none thread at a time is picking against particular scene graph,\nand it extracts the hit data during within its synchronized block. You\ncan then examine the return list without worrying about another thread\ncorrupting your hit data.\n\nThe hit location returned is the world position of the scene object center.\n\n@param scene\nThe {@link GVRScene} with all the objects to be tested.\n\n@return A list of {@link org.gearvrf.GVRPicker.GVRPickedObject}, sorted by distance from the\ncamera rig. Each {@link org.gearvrf.GVRPicker.GVRPickedObject} contains the scene object\nwhich owns the {@link GVRCollider} along with the hit\nlocation and distance from the camera.\n\n@since 1.6.6",
"Used to determine if multiple cost rates apply to this assignment.\n\n@return true if multiple cost rates apply to this assignment",
"Adds all edges for a given object envelope vertex. All edges are\nadded to the edgeList map.\n@param vertex the Vertex object to find edges for",
"lookup current maximum value for a single field in\ntable the given class descriptor was associated.",
"If first and second are Strings, then this returns an MutableInternedPair\nwhere the Strings have been interned, and if this Pair is serialized\nand then deserialized, first and second are interned upon\ndeserialization.\n\n@param p A pair of Strings\n@return MutableInternedPair, with same first and second as this.",
"Given a resource field name, this method returns the resource field number.\n\n@param field resource field name\n@return resource field number",
"Use this API to change responderhtmlpage.",
"If there is a SubReport on a Group, we do the layout here\n@param columnsGroup\n@param jgroup",
"Invoked when an action occurs."
] |
protected void checkActiveState(Widget child) {
// Check if this widget has a valid href
String href = child.getElement().getAttribute("href");
String url = Window.Location.getHref();
int pos = url.indexOf("#");
String location = pos >= 0 ? url.substring(pos, url.length()) : "";
if (!href.isEmpty() && location.startsWith(href)) {
ListItem li = findListItemParent(child);
if (li != null) {
makeActive(li);
}
} else if (child instanceof HasWidgets) {
// Recursive check
for (Widget w : (HasWidgets) child) {
checkActiveState(w);
}
}
} | [
"Checks if this child holds the current active state.\nIf the child is or contains the active state it is applied."
] | [
"Notifies that multiple content items are removed.\n\n@param positionStart the position.\n@param itemCount the item count.",
"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.",
"Specify the method to instantiate objects\nrepresented by this descriptor.\n@see #setFactoryClass",
"Refresh this context with the specified configuration locations.\n\n@param configLocations\nlist of configuration resources (see implementation for specifics)\n@throws GeomajasException\nindicates a problem with the new location files (see cause)",
"Unzip a file or a folder\n@param zipFile\n@param unzippedFolder optional, if null the file/folder will be extracted in the same folder as zipFile\n@return",
"Delete an object from the database.",
"Look up all recorded playback state information.\n\n@return the playback state recorded for any player\n@since 0.5.0",
"Seeks to the given day within the current year\n@param dayOfYear the day of the year to seek to, represented as an integer\nfrom 1 to 366. Must be guaranteed to parse as an Integer. If this day is\nbeyond the last day of the current year, the actual last day of the year\nwill be used.",
"Process an operand value used in the definition of the graphical\nindicator criteria.\n\n@param index position in operand list\n@param type field type\n@param criteria indicator criteria"
] |
public static base_response add(nitro_service client, dnsview resource) throws Exception {
dnsview addresource = new dnsview();
addresource.viewname = resource.viewname;
return addresource.add_resource(client);
} | [
"Use this API to add dnsview."
] | [
"Extracts out a matrix from source given a sub matrix with arbitrary rows and columns specified in\ntwo array lists\n\n@param src Source matrix. Not modified.\n@param rows array of row indexes\n@param rowsSize maximum element in row array\n@param cols array of column indexes\n@param colsSize maximum element in column array\n@param dst output matrix. Must be correct shape.",
"Returns true if the activity is a start milestone.\n\n@param activity Phoenix activity\n@return true if the activity is a milestone",
"Return all valid tenors for a given moneyness and maturity.\n\n@param moneynessBP The moneyness in bp for which to get the tenors.\n@param maturityInMonths The maturities in months for which to get the tenors.\n@return The tenors in months.",
"Write the provided chunk at the offset specified in the token. If finalChunk is set, the file\nwill be closed.",
"Specify the method to instantiate objects\nrepresented by this descriptor.\n@see #setFactoryClass",
"Refresh the layout element.",
"Write calendar hours.\n\n@param parentCalendar parent calendar instance\n@param record calendar hours instance\n@throws IOException",
"Skips variable length blocks up to and including next zero length block.",
"Visit an exported package of the current module.\n\n@param packaze the qualified name of the exported package.\n@param access the access flag of the exported package,\nvalid values are among {@code ACC_SYNTHETIC} and\n{@code ACC_MANDATED}.\n@param modules the qualified names of the modules that can access to\nthe public classes of the exported package or\n<tt>null</tt>."
] |
private List<Integer> getPageSizes() {
final String pageSizes = parseOptionalStringValue(XML_ELEMENT_PAGESIZE);
if (pageSizes != null) {
String[] pageSizesArray = pageSizes.split("-");
if (pageSizesArray.length > 0) {
try {
List<Integer> result = new ArrayList<>(pageSizesArray.length);
for (int i = 0; i < pageSizesArray.length; i++) {
result.add(Integer.valueOf(pageSizesArray[i]));
}
return result;
} catch (NumberFormatException e) {
LOG.warn(Messages.get().getBundle().key(Messages.LOG_PARSING_PAGE_SIZES_FAILED_1, pageSizes), e);
}
}
}
return null;
} | [
"Returns the configured page size, or the default page size if it is not configured.\n@return The configured page size, or the default page size if it is not configured."
] | [
"Loads a classifier from the file specified by loadPath. If loadPath ends in\n.gz, uses a GZIPInputStream, else uses a regular FileInputStream.",
"Returns the complete tag record for a single tag.\n\n@param tag The tag to get.\n@return Request object",
"Serializes this RuleSet in an XML document.\n\n@param destination The writer to which the XML document shall be written.",
"Restores a trashed file to a new location with a new name.\n@param fileID the ID of the trashed file.\n@param newName an optional new name to give the file. This can be null to use the file's original name.\n@param newParentID an optional new parent ID for the file. This can be null to use the file's original\nparent.\n@return info about the restored file.",
"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.",
"Process encoded payload.\n\n@throws IOException Signals that an I/O exception has occurred.",
"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",
"Returns whether this address section represents a subnet block of addresses associated its prefix length.\n\nReturns false if it has no prefix length, if it is a single address with a prefix length (ie not a subnet), or if it is a range of addresses that does not include\nthe entire subnet block for its prefix length.\n\nIf {@link AddressNetwork#getPrefixConfiguration} is set to consider all prefixes as subnets, this returns true for any grouping with prefix length.\n\n@return",
"Sinc function.\n\n@param x Value.\n@return Sinc of the value."
] |
public static Iterable<BoxGroup.Info> getAllGroupsByName(final BoxAPIConnection api, String name) {
final QueryStringBuilder builder = new QueryStringBuilder();
if (name == null || name.trim().isEmpty()) {
throw new BoxAPIException("Searching groups by name requires a non NULL or non empty name");
} else {
builder.appendParam("name", name);
}
return new Iterable<BoxGroup.Info>() {
public Iterator<BoxGroup.Info> iterator() {
URL url = GROUPS_URL_TEMPLATE.buildWithQuery(api.getBaseURL(), builder.toString());
return new BoxGroupIterator(api, url);
}
};
} | [
"Gets an iterable of all the groups in the enterprise that are starting with the given name string.\n@param api the API connection to be used when retrieving the groups.\n@param name the name prefix of the groups. If the groups need to searched by full name that has spaces,\nthen the parameter string should have been wrapped with \"\".\n@return an iterable containing info about all the groups."
] | [
"checks whether the specified Object obj is write-locked by Transaction tx.\n@param tx the transaction\n@param obj the Object to be checked\n@return true if lock exists, else false",
"Use this API to fetch all the ipv6 resources that are configured on netscaler.",
"The Critical field indicates whether a task has any room in the schedule\nto slip, or if a task is on the critical path. The Critical field contains\nYes if the task is critical and No if the task is not critical.\n\n@return boolean",
"Use this API to fetch autoscaleaction resource of given name .",
"Use this API to add responderpolicy.",
"Divide two complex numbers.\n\n@param z1 Complex Number.\n@param z2 Complex Number.\n@return Returns new ComplexNumber instance containing the divide of specified complex numbers.",
"Returns the entry associated with the given key.\n\n@param key the key of the entry to look up\n@return the entry associated with that key, or null\nif the key is not in this map",
"Use this API to export application.",
"Update the Target Filter of the ImporterService.\nApply the induce modifications on the links of the ImporterService\n\n@param serviceReference"
] |
private static ResourceBundle tryBundle(String baseName, Locale locale, boolean wantBase) {
I_CmsResourceBundle first = null; // The most specialized bundle.
I_CmsResourceBundle last = null; // The least specialized bundle.
List<String> bundleNames = CmsLocaleManager.getLocaleVariants(baseName, locale, true, true);
for (String bundleName : bundleNames) {
// break if we would try the base bundle, but we do not want it directly
if (bundleName.equals(baseName) && !wantBase && (first == null)) {
break;
}
I_CmsResourceBundle foundBundle = tryBundle(bundleName);
if (foundBundle != null) {
if (first == null) {
first = foundBundle;
}
if (last != null) {
last.setParent((ResourceBundle)foundBundle);
}
foundBundle.setLocale(locale);
last = foundBundle;
}
}
return (ResourceBundle)first;
} | [
"Tries to load a the bundle for a given locale, also loads the backup\nlocales with the same language.\n\n@param baseName the raw bundle name, without locale qualifiers\n@param locale the locale\n@param wantBase whether a resource bundle made only from the base name\n(with no locale information attached) should be returned.\n@return the resource bundle if it was loaded, otherwise the backup"
] | [
"Applies this patch to a JSON value.\n\n@param node the value to apply the patch to\n@return the patched JSON value\n@throws JsonPatchException failed to apply patch\n@throws NullPointerException input is null",
"Prepares the CmsObject for jumping to this favorite location, and returns the appropriate URL.\n\n@param cms the CmsObject to initialize for jumping to the favorite\n@return the link for the favorite location\n\n@throws CmsException if something goes wrong",
"Close all HTTP clients created by this factory\n@throws IOException if an I/O error occurs",
"Get the script for a given ID\n\n@param id ID of script\n@return Script if found, otherwise null",
"Remove all references to a groupId\n\n@param groupIdToRemove ID of group",
"Retrieves the project start date. If an explicit start date has not been\nset, this method calculates the start date by looking for\nthe earliest task start date.\n\n@return project start date",
"Setter for \"addContentInfo\", indicating if content information should be added.\n@param doAddInfo The value of the \"addContentInfo\" attribute of the tag",
"Sets the body of this request to a given JSON string.\n@param body the JSON string to use as the body.",
"Generates a toString method using concatenation or a StringBuilder."
] |
private void renameReadOnlyV2Files(int masterPartitionId, int correctReplicaType) {
for (int replica = 0; replica < routingStrategy.getNumReplicas(); replica++) {
if (replica != correctReplicaType) {
int chunkId = 0;
while (true) {
String fileName = Integer.toString(masterPartitionId) + "_"
+ Integer.toString(replica) + "_"
+ Integer.toString(chunkId);
File index = getIndexFile(fileName);
File data = getDataFile(fileName);
if(index.exists() && data.exists()) {
// We found files with the "wrong" replica type, so let's rename them
String correctFileName = Integer.toString(masterPartitionId) + "_"
+ Integer.toString(correctReplicaType) + "_"
+ Integer.toString(chunkId);
File indexWithCorrectReplicaType = getIndexFile(correctFileName);
File dataWithCorrectReplicaType = getDataFile(correctFileName);
Utils.move(index, indexWithCorrectReplicaType);
Utils.move(data, dataWithCorrectReplicaType);
// Maybe change this to DEBUG?
logger.info("Renamed files with wrong replica type: "
+ index.getAbsolutePath() + "|data -> "
+ indexWithCorrectReplicaType.getName() + "|data");
} else if(index.exists() ^ data.exists()) {
throw new VoldemortException("One of the following does not exist: "
+ index.toString()
+ " or "
+ data.toString() + ".");
} else {
// The files don't exist, or we've gone over all available chunks,
// so let's move on.
break;
}
chunkId++;
}
}
}
} | [
"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."
] | [
"Set the pointer on the bar. With the Value value.\n\n@param value float between 0 and 1",
"You should call this method from your activity onRequestPermissionsResult.\n\n@param requestCode The request code passed in requestPermissions(android.app.Activity, String[], int)\n@param permissions The requested permissions. Never null.\n@param grantResults The grant results for the corresponding permissions which is either\nPERMISSION_GRANTED or PERMISSION_DENIED. Never null.",
"Attach the given link to the classification, while checking for duplicates.",
"Drop down item view\n\n@param position position of item\n@param convertView View of item\n@param parent parent view of item's view\n@return covertView",
"Adds the given value to the set.\n\n@return true if the value was actually new",
"Use this API to add snmpuser.",
"Renumbers all entity unique IDs.",
"Remove any device announcements that are so old that the device seems to have gone away.",
"The length of the region left to the completion offset that is part of the\nreplace region."
] |
public Photo getListPhoto(String photoId) throws FlickrException {
Map<String, Object> parameters = new HashMap<String, Object>();
parameters.put("method", METHOD_GET_LIST_PHOTO);
parameters.put("photo_id", photoId);
Response response = transportAPI.get(transportAPI.getPath(), parameters, apiKey, sharedSecret);
if (response.isError()) {
throw new FlickrException(response.getErrorCode(), response.getErrorMessage());
}
Element photoElement = response.getPayload();
Photo photo = new Photo();
photo.setId(photoElement.getAttribute("id"));
List<Tag> tags = new ArrayList<Tag>();
Element tagsElement = (Element) photoElement.getElementsByTagName("tags").item(0);
NodeList tagElements = tagsElement.getElementsByTagName("tag");
for (int i = 0; i < tagElements.getLength(); i++) {
Element tagElement = (Element) tagElements.item(i);
Tag tag = new Tag();
tag.setId(tagElement.getAttribute("id"));
tag.setAuthor(tagElement.getAttribute("author"));
tag.setAuthorName(tagElement.getAttribute("authorname"));
tag.setRaw(tagElement.getAttribute("raw"));
tag.setValue(((Text) tagElement.getFirstChild()).getData());
tags.add(tag);
}
photo.setTags(tags);
return photo;
} | [
"Get a list of tags for the specified photo.\n\n<p>\nThis method does not require authentication.\n</p>\n\n@param photoId\nThe photo ID\n@return The collection of Tag objects"
] | [
"Validate JUnit4 presence in a concrete version.",
"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.",
"In case we cannot delete a directory create a marker to recheck whether we can garbage collect some not\nreferenced directories and files.\n\n@param file the directory",
"Execute a server task.\n\n@param listener the transactional server listener\n@param task the server task\n@return time to wait in ms for a response from the server, or {@code -1} if the task execution failed locally",
"For internal use! This method creates real new PB instances",
"This method handles submitting and then waiting for the request from the\nserver. It uses the ClientRequest API to actually write the request and\nthen read back the response. This implementation will not block for a\nresponse from the server.\n\n@param <T> Return type\n\n@param clientRequest ClientRequest implementation used to write the\nrequest and read the response\n@param operationName Simple string representing the type of request\n\n@return Data returned by the individual requests",
"Deletes this collaboration.",
"Convert an Object to a Time.",
"Compares the two comma-separated lists.\n\n@param list1 The first list\n@param list2 The second list\n@return <code>true</code> if the lists are equal"
] |
private void readTasks(Project project)
{
Project.Tasks tasks = project.getTasks();
if (tasks != null)
{
int tasksWithoutIDCount = 0;
for (Project.Tasks.Task task : tasks.getTask())
{
Task mpxjTask = readTask(task);
if (mpxjTask.getID() == null)
{
++tasksWithoutIDCount;
}
}
for (Project.Tasks.Task task : tasks.getTask())
{
readPredecessors(task);
}
//
// MS Project will happily read tasks from an MSPDI file without IDs,
// it will just generate ID values based on the task order in the file.
// If we find that there are no ID values present, we'll do the same.
//
if (tasksWithoutIDCount == tasks.getTask().size())
{
m_projectFile.getTasks().renumberIDs();
}
}
m_projectFile.updateStructure();
} | [
"This method extracts task data from an MSPDI file.\n\n@param project Root node of the MSPDI file"
] | [
"Open the connection to the server.\n\n@param url the url to connect to\n@return returns the input stream for the connection\n@throws IOException cannot get result",
"Create the patching task based on the definition.\n\n@param definition the task description\n@param provider the content provider\n@param context the task context\n@return the created task",
"Checks all data sets in IIM records 1, 2 and 3 for constraint violations.\n\n@return list of constraint violations, empty set if IIM file is valid",
"generate a message for loglevel ERROR\n\n@param pObject the message Object",
"Emit a event object with parameters and force all listeners to be called asynchronously.\n\n@param event\nthe target event\n@param args\nthe arguments passed in\n@see #emit(EventObject, Object...)",
"Reads the XER file table and row structure ready for processing.\n\n@param is input stream\n@throws MPXJException",
"Extract resource assignments for a task.\n\n@param task parent task\n@param assignments list of Synchro resource assignment data",
"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)",
"Should be called after all rows have been created\n@param headerStyle\n@param totalStyle\n@param totalHeaderStyle\n@return"
] |
public static base_responses update(nitro_service client, sslcertkey resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
sslcertkey updateresources[] = new sslcertkey[resources.length];
for (int i=0;i<resources.length;i++){
updateresources[i] = new sslcertkey();
updateresources[i].certkey = resources[i].certkey;
updateresources[i].expirymonitor = resources[i].expirymonitor;
updateresources[i].notificationperiod = resources[i].notificationperiod;
}
result = update_bulk_request(client, updateresources);
}
return result;
} | [
"Use this API to update sslcertkey resources."
] | [
"Remove a part of a CharSequence. This replaces the first occurrence\nof the pattern within self with '' and returns the result.\n\n@param self a String\n@param pattern a Pattern representing the part to remove\n@return a String minus the part to be removed\n@since 2.2.0",
"Returns the primary port of the server.\n\n@return the primary {@link ServerPort} if the server is started. {@link Optional#empty()} otherwise.",
"Sets the top padding character for all cells in the table.\n@param paddingTopChar new padding character, ignored if null\n@return this to allow chaining",
"Either gets an existing lock on the specified resource or creates one if none exists.\nThis methods guarantees to do this atomically.\n\n@param resourceId the resource to get or create the lock on\n@param isolationId the isolation level identity key. See {@link CommonsOJBLockManager}.\n@return the lock for the specified resource",
"Checks the given class descriptor.\n\n@param classDef The class descriptor\n@param checkLevel The amount of checks to perform\n@exception ConstraintException If a constraint has been violated",
"Allocate a timestamp",
"Formats the value provided with the specified DateTimeFormat",
"Interim and final clusters ought to have same partition counts, same\nzones, and same node state. Partitions per node may of course differ.\n\n@param interimCluster\n@param finalCluster",
"Load the given configuration file."
] |
public static boolean classNodeImplementsType(ClassNode node, Class target) {
ClassNode targetNode = ClassHelper.make(target);
if (node.implementsInterface(targetNode)) {
return true;
}
if (node.isDerivedFrom(targetNode)) {
return true;
}
if (node.getName().equals(target.getName())) {
return true;
}
if (node.getName().equals(target.getSimpleName())) {
return true;
}
if (node.getSuperClass() != null && node.getSuperClass().getName().equals(target.getName())) {
return true;
}
if (node.getSuperClass() != null && node.getSuperClass().getName().equals(target.getSimpleName())) {
return true;
}
if (node.getInterfaces() != null) {
for (ClassNode declaredInterface : node.getInterfaces()) {
if (classNodeImplementsType(declaredInterface, target)) {
return true;
}
}
}
return false;
} | [
"This method tells you if a ClassNode implements or extends a certain class.\n@param node\nthe node\n@param target\nthe class\n@return\ntrue if the class node 'is a' target"
] | [
"Adds all options from the passed container to this container.\n\n@param container a container with options to add",
"given is at the begining, of is at the end",
"Sets the underlying connect timeout in milliseconds.\nA value of 0 specifies an infinite timeout.\n@see okhttp3.OkHttpClient.Builder#connectTimeout(long, TimeUnit)",
"Execute a HTTP request and handle common error cases.\n\n@param connection the HttpConnection request to execute\n@return the executed HttpConnection\n@throws CouchDbException for HTTP error codes or if an IOException was thrown",
"Organises the data from Asta into a hierarchy and converts this into tasks.\n\n@param bars bar data\n@param expandedTasks expanded task data\n@param tasks task data\n@param milestones milestone data",
"Read an individual GanttProject resource assignment.\n\n@param gpAllocation GanttProject resource assignment.",
"Use this API to delete gslbsite of given name.",
"Function to perform forward pooling",
"Checks the preconditions for creating a new RequireSubStr processor with a List of Strings.\n\n@param requiredSubStrings\nthe required substrings\n@throws NullPointerException\nif requiredSubStrings or one of its elements is null\n@throws IllegalArgumentException\nif requiredSubStrings is empty"
] |
private static QName getServiceName(Server server) {
QName serviceName;
String bindingId = getBindingId(server);
EndpointInfo eInfo = server.getEndpoint().getEndpointInfo();
if (JAXRS_BINDING_ID.equals(bindingId)) {
serviceName = eInfo.getName();
} else {
ServiceInfo serviceInfo = eInfo.getService();
serviceName = serviceInfo.getName();
}
return serviceName;
} | [
"Extracts the service name from a Server.\n@param server\n@return"
] | [
"Map the EventType.\n\n@param eventType the event type\n@return the event",
"Add custom fields to the tree.\n\n@param parentNode parent tree node\n@param file custom fields container",
"Use this API to unset the properties of lbsipparameters resource.\nProperties that need to be unset are specified in args array.",
"Convert an Integer value into a String.\n\n@param value Integer value\n@return String value",
"Obtains a Accounting zoned date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the Accounting zoned date-time, not null\n@throws DateTimeException if unable to create the date-time",
"Set the given column name to the given value.\n\n@param name The column name to set.\n@param value the value to set.\n@return {@code this}\n@throws IllegalArgumentException if a column name does not exist in the table.",
"Logs a message for a case where the value of a property does not fit to\nits declared datatype.\n\n@param propertyIdValue\nthe property that was used\n@param datatype\nthe declared type of the property\n@param valueType\na string to denote the type of value",
"Returns a list ordered from the highest priority to the lowest.",
"Move the animation frame counter forward.\n\n@return boolean specifying if animation should continue or if loopCount has been fulfilled."
] |
public void close() {
logger.info("Closing all sync producers");
if (sync) {
for (SyncProducer p : syncProducers.values()) {
p.close();
}
} else {
for (AsyncProducer<V> p : asyncProducers.values()) {
p.close();
}
}
} | [
"Closes all the producers in the pool"
] | [
"Extracts project properties from a ConceptDraw PROJECT file.\n\n@param cdp ConceptDraw PROJECT file",
"Use this API to fetch all the nssimpleacl resources that are configured on netscaler.",
"Returns true if required properties for MiniFluo are set",
"Converts the given CharSequence into a List of Strings of one character.\n\n@param self a CharSequence\n@return a List of characters (a 1-character String)\n@see #toSet(String)\n@since 1.8.2",
"Queries a Search Index and returns ungrouped results. In case the query\nused grouping, an empty list is returned\n\n@param <T> Object type T\n@param query the Lucene query to be passed to the Search index\n@param classOfT The class of type T\n@return The result of the search query as a {@code List<T> }",
"Reads outline code custom field values and populates container.",
"Process a file.\n\n@param file the file to be processed\n@param mode the patching mode\n@throws IOException",
"Closes the JDBC statement and its associated connection.",
"Return a collection of product descriptors for each option in the smile.\n\n@param referenceDate The reference date (translating the maturity floating point date to dates.\n@return a collection of product descriptors for each option in the smile."
] |
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."
] | [
"Convert this object to a json array.",
"Returns the end time of the event.\n@return the end time of the event.",
"Writes assignment baseline data.\n\n@param xml MSPDI assignment\n@param mpxj MPXJ assignment",
"Fetches the HttpMethod from annotations and returns String representation of HttpMethod.\nReturn emptyString if not present.\n\n@param method Method handling the http request.\n@return String representation of HttpMethod from annotations or emptyString as a default.",
"Support the range subscript operator for CharSequence with IntRange\n\n@param text a CharSequence\n@param range an IntRange\n@return the subsequence CharSequence\n@since 1.0",
"Return an input stream to read the data from the named table.\n\n@param name table name\n@return InputStream instance\n@throws IOException",
"Loaders call this method to register themselves. This method can be called by\nloaders provided by the application.\n\n@param textureClass\nThe class the loader is responsible for loading.\n\n@param asyncLoaderFactory\nThe factory object.",
"Use this API to delete nsip6 resources.",
"Produces a string identifying this half-edge by the point index values of\nits tail and head vertices.\n\n@return identifying string"
] |
public static void fire(I_CmsHasDateBoxEventHandlers source, Date date, boolean isTyping) {
if (TYPE != null) {
CmsDateBoxEvent event = new CmsDateBoxEvent(date, isTyping);
source.fireEvent(event);
}
} | [
"Fires the event.\n\n@param source the event source\n@param date the date\n@param isTyping true if event was caused by user pressing key that may have changed the value"
] | [
"Close it and ignore any exceptions.",
"Sets the path of the edited file in the corresponding display.\n@param editedFilePath path of the edited file to set.",
"Prepares a statement with parameters that should work with most RDBMS.\n\n@param con the connection to utilize\n@param sql the sql syntax to use when creating the statement.\n@param scrollable determines if the statement will be scrollable.\n@param createPreparedStatement if <code>true</code>, then a\n{@link PreparedStatement} will be created. If <code>false</code>, then\na {@link java.sql.CallableStatement} will be created.\n@param explicitFetchSizeHint will be used as fetchSize hint\n(if applicable) if > 0\n\n@return a statement that can be used to execute the syntax contained in\nthe <code>sql</code> argument.",
"Returns true if we should skip this bar, i.e. the bar only has a single child task.\n\n@param row bar row to test\n@return true if this bar should be skipped",
"Parses operations where the input comes from variables to its left and right\n\n@param ops List of operations which should be parsed\n@param tokens List of all the tokens\n@param sequence List of operation sequence",
"Main entry point when called to process constraint data.\n\n@param projectDir project directory\n@param file parent project file\n@param inputStreamFactory factory to create input stream",
"Used when setting the \"visible\" field in the response. See the \"List Conversations\" docs for details\n@param filters Filter strings to be applied to the visibility of conversations\n@return this to continue building options",
"Read a text file into a single string\n\n@param file\nThe file to read\n@return The contents, or null on error.",
"Polls from the location header and updates the polling state with the\npolling response for a PUT operation.\n\n@param pollingState the polling state for the current operation.\n@param <T> the return type of the caller."
] |
static WeldContainer startInitialization(String id, Deployment deployment, Bootstrap bootstrap) {
if (SINGLETON.isSet(id)) {
throw WeldSELogger.LOG.weldContainerAlreadyRunning(id);
}
WeldContainer weldContainer = new WeldContainer(id, deployment, bootstrap);
SINGLETON.set(id, weldContainer);
RUNNING_CONTAINER_IDS.add(id);
return weldContainer;
} | [
"Start the initialization.\n\n@param id\n@param manager\n@param bootstrap\n@return the initialized Weld container"
] | [
"Cleans a multi-value property key.\n\n@param name Name of the property key\n@return The {@link ValidationResult} object containing the key,\nand the error code(if any)\n<p/>\nFirst calls cleanObjectKey\nKnown property keys are reserved for multi-value properties, subsequent validation is done for those",
"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>",
"Returns the corresponding mac section, or null if this address section does not correspond to a mac section.\nIf this address section has a prefix length it is ignored.\n\n@param extended\n@return",
"Delivers the correct JSON Object for the Bounds\n\n@param bounds\n@throws org.json.JSONException",
"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.",
"Use this API to update systemcollectionparam.",
"Gets the date time str standard.\n\n@param d\nthe d\n@return the date time str standard",
"Notifies that an existing footer item is moved to another position.\n\n@param fromPosition the original position.\n@param toPosition the new position.",
"Convert the holiday format from EquivalenceClassTransformer into a date format\n\n@param holiday the date\n@return a date String in the format yyyy-MM-dd"
] |
private void processHyperlinkData(Resource resource, byte[] data)
{
if (data != null)
{
int offset = 12;
String hyperlink;
String address;
String subaddress;
offset += 12;
hyperlink = MPPUtility.getUnicodeString(data, offset);
offset += ((hyperlink.length() + 1) * 2);
offset += 12;
address = MPPUtility.getUnicodeString(data, offset);
offset += ((address.length() + 1) * 2);
offset += 12;
subaddress = MPPUtility.getUnicodeString(data, offset);
resource.setHyperlink(hyperlink);
resource.setHyperlinkAddress(address);
resource.setHyperlinkSubAddress(subaddress);
}
} | [
"This method is used to extract the resource hyperlink attributes\nfrom a block of data and call the appropriate modifier methods\nto configure the specified task object.\n\n@param resource resource instance\n@param data hyperlink data block"
] | [
"Returns all factory instances that match the query.\n\n@param query the factory query, not null.\n@return the instances found, never null.",
"Release a connection by placing the connection back in the pool.\n@param connectionHandle Connection being released.\n@throws SQLException",
"Checks if the specified longitude is correct.\n\n@param name the name of the longitude field\n@param longitude the value of the longitude field\n@return the longitude",
"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",
"Obtains a database connection, retrying if necessary.\n@param connectionHandle\n@return A DB connection.\n@throws SQLException",
"Log a warning for the resource at the provided address and the given attributes. The detail message is a default\n'Attributes are not understood in the target model version and this resource will need to be ignored on the target host.'\n\n@param address where warning occurred\n@param attributes attributes we are warning about",
"if |a11-a22| >> |a12+a21| there might be a better way. see pg371",
"Add a dependency to the module.\n\n@param dependency Dependency",
"Release the rebalancing permit for a particular node id\n\n@param nodeId The node id whose permit we want to release"
] |
@Override
public EnvironmentConfig setSetting(@NotNull final String key, @NotNull final Object value) {
return (EnvironmentConfig) super.setSetting(key, value);
} | [
"Sets the value of the setting with the specified key.\n\n@param key name of the setting\n@param value the setting value\n@return this {@code EnvironmentConfig} instance"
] | [
"Reads a PEP file from the input stream.\n\n@param is input stream representing a PEP file",
"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",
"Adds multiple observers using unique integer prefixes for each.\n\n@deprecated since 1.1.0. Replaced by {@link #setObserverProvider(String)} and\n{@link #getObserverProvider()}",
"Creates a new Box Developer Edition connection with App User token levaraging BoxConfig.\n@param userId the user ID to use for an App User.\n@param boxConfig box configuration settings object\n@return a new instance of BoxAPIConnection.",
"Creates a Profile object from a SQL resultset\n\n@param result resultset containing the profile\n@return Profile\n@throws Exception exception",
"Removes any configured observers.\n\n@deprecated since 1.1.0. Replaced by {@link #setObserverProvider(String)} and\n{@link #getObserverProvider()}",
"Checks, if all values necessary for a specific pattern are valid.\n@return a flag, indicating if all values required for the pattern are valid.",
"Reads the availability table from the file.\n\n@param resource MPXJ resource instance\n@param periods MSPDI availability periods",
"Returns true if templates are to be instantiated synchronously and false if\nasynchronously."
] |
@Programmatic
public <T> Blob toExcelPivot(
final List<T> domainObjects,
final Class<T> cls,
final String fileName) throws ExcelService.Exception {
return toExcelPivot(domainObjects, cls, null, fileName);
} | [
"Creates a Blob holding a single-sheet spreadsheet with a pivot of the domain objects. The sheet name is derived from the\nclass name.\n\n<p>\nMinimal requirements for the domain object are:\n</p>\n<ul>\n<li>\nOne property has annotation {@link PivotRow} and will be used as row identifier in left column of pivot.\nEmpty values are supported.\n</li>\n<li>\nAt least one property has annotation {@link PivotColumn}. Its values will be used in columns of pivot.\nEmpty values are supported.\n</li>\n<li>\nAt least one property has annotation {@link PivotValue}. Its values will be distributed in the pivot.\n</li>\n</ul>"
] | [
"Handles the deletion of a key.\n@param key the deleted key.\n@return <code>true</code> if the deletion was successful, <code>false</code> otherwise.",
"Use this API to create sslfipskey.",
"Use this API to fetch responderpolicy resource of given name .",
"SetLoop will either set the GVRNodeAnimation's Repeat Mode to REPEATED if loop is true.\nor it will set the GVRNodeAnimation's Repeat Mode to ONCE if loop is false\nif loop is set to TRUE, when it was previously FALSE, then start the Animation.\n@param doLoop\n@param gvrContext",
"Provide array of String results from inputOutput MFString field named string.\n@return value of string field",
"Updates all inverse associations managed by a given entity.",
"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.",
"Register the given callback as to be executed after request completion.\n\n@param name The name of the bean.\n@param callback The callback of the bean to be executed for destruction.",
"Use this API to unset the properties of inatparam resource.\nProperties that need to be unset are specified in args array."
] |
private void processCalendars() throws Exception
{
List<Row> rows = getRows("select * from zcalendar where zproject=?", m_projectID);
for (Row row : rows)
{
ProjectCalendar calendar = m_project.addCalendar();
calendar.setUniqueID(row.getInteger("Z_PK"));
calendar.setName(row.getString("ZTITLE"));
processDays(calendar);
processExceptions(calendar);
m_eventManager.fireCalendarReadEvent(calendar);
}
} | [
"Read calendar data."
] | [
"Use this API to add ntpserver resources.",
"Get all categories\nGet all tags marked as categories\n@return ApiResponse<TagsEnvelope>\n@throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body",
"Sorts the specified list itself into ascending order, according to the natural ordering of its elements.\n\n@param list\nthe list to be sorted. May not be <code>null</code>.\n@return the sorted list itself.\n@see Collections#sort(List)",
"Filter the URI based on a regular expression.\nCan be combined with an additional file-extension filter.",
"Ends the transition",
"Returns a new ObjectPool for the specified connection descriptor.\nOverride this method to setup your own pool.\n@param jcd the connection descriptor for which to set up the pool\n@return a newly created object pool",
"cleanup tx and prepare for reuse",
"Return the authorization URL which is used to perform the authorization_code based OAuth2 flow.\n@param clientID the client ID to use with the connection.\n@param redirectUri the URL to which Box redirects the browser when authentication completes.\n@param state the text string that you choose.\nBox sends the same string to your redirect URL when authentication is complete.\n@param scopes this optional parameter identifies the Box scopes available\nto the application once it's authenticated.\n@return the authorization URL",
"Set a colspan in a group of columns. First add the cols to the report\n\n@param colNumber the index of the col\n@param colQuantity the number of cols how i will take\n@param colspanTitle colspan title\n@return a Dynamic Report Builder\n@throws ColumnBuilderException When the index of the cols is out of\nbounds."
] |
public static Object getObjectFromColumn(ResultSet rs, Integer jdbcType, int columnId)
throws SQLException
{
return getObjectFromColumn(rs, null, jdbcType, null, columnId);
} | [
"Returns an java object read from the specified ResultSet column."
] | [
"Extract the field types from the fieldConfigs if they have not already been configured.",
"Returns the complete record for a single status update.\n\n@param projectStatus The project status update to get.\n@return Request object",
"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",
"Deletes any empty directories under the output directory. These\ndirectories are created by TestNG for its own reports regardless\nof whether those reports are generated. If you are using the\ndefault TestNG reports as well as ReportNG, these directories will\nnot be empty and will be retained. Otherwise they will be removed.\n@param outputDirectory The directory to search for empty directories.",
"Sets the segment reject as a string. This method is for convenience\nto be able to set percent reject type just by calling with '3%' and\notherwise it uses rows. All this assuming that parsing finds '%' characher\nand is able to parse a raw reject number.\n\n@param reject the new segment reject",
"If an error is thrown while loading zone data, the exception is logged\nto system error and null is returned for this and all future requests.\n\n@param id the id to load\n@return the loaded zone",
"Sets the offset for the animation.\n\n@param startOffset animation will start at the specified offset value\n\n@return {@code this}, so you can chain setProperty() calls.\n@throws IllegalArgumentException\nIf {@code startOffset} is either negative or greater than\nthe animation duration",
"Transforms user name and icon size into the image path.\n\n@param name the user name\n@param size IconSize to get icon for\n\n@return the path",
"Gets existing config files.\n\n@return the existing config files"
] |
public void init(Map<String, String> testConfig, Map<String, String> hiveVars) {
context.init();
HiveConf hiveConf = context.getHiveConf();
// merge test case properties with hive conf before HiveServer is started.
for (Map.Entry<String, String> property : testConfig.entrySet()) {
hiveConf.set(property.getKey(), property.getValue());
}
try {
hiveServer2 = new HiveServer2();
hiveServer2.init(hiveConf);
// Locate the ClIService in the HiveServer2
for (Service service : hiveServer2.getServices()) {
if (service instanceof CLIService) {
client = (CLIService) service;
}
}
Preconditions.checkNotNull(client, "ClIService was not initialized by HiveServer2");
sessionHandle = client.openSession("noUser", "noPassword", null);
SessionState sessionState = client.getSessionManager().getSession(sessionHandle).getSessionState();
currentSessionState = sessionState;
currentSessionState.setHiveVariables(hiveVars);
} catch (Exception e) {
throw new IllegalStateException("Failed to create HiveServer :" + e.getMessage(), e);
}
// Ping hive server before we do anything more with it! If validation
// is switched on, this will fail if metastorage is not set up properly
pingHiveServer();
} | [
"Will start the HiveServer.\n\n@param testConfig Specific test case properties. Will be merged with the HiveConf of the context\n@param hiveVars HiveVars to pass on to the HiveServer for this session"
] | [
"Delegates file rolling to composed objects.\n\n@see FileRollable#roll(org.apache.log4j.spi.LoggingEvent)",
"Adds the headers.\n\n@param builder\nthe builder\n@param headerMap\nthe header map",
"Returns a resource description resolver that uses common descriptions for some attributes.\n\n@param keyPrefix the prefix to be appended to the {@link LoggingExtension#SUBSYSTEM_NAME}\n\n@return the resolver",
"Get the available sizes of a Photo.\n\nThe boolean toggle allows to (api-)sign the call.\n\nThis way the calling user can retrieve sizes for <b>his own</b> private photos.\n\n@param photoId\nThe photo ID\n@param sign\ntoggle to allow optionally signing the call (Authenticate)\n@return A collection of {@link Size}\n@throws FlickrException",
"other static handlers",
"Write a project file in SDEF format to an output stream.\n\n@param projectFile ProjectFile instance\n@param out output stream",
"Returns a new instance of the given class using the constructor with the specified parameter.\n\n@param target The class to instantiate\n@param type The types of the single parameter of the constructor\n@param arg The argument\n@return The instance",
"Tests whether the two field descriptors are equal, i.e. have same name, same column\nand same jdbc-type.\n\n@param first The first field\n@param second The second field\n@return <code>true</code> if they are equal",
"Get permissions for who may view geo data for a photo.\n\nThis method requires authentication with 'read' permission.\n\n@param photoId\nreqired photo id, not null\n@return the permissions\n@throws FlickrException\nif photo id is invalid, if photo has no geodata or if any other error has been reported in the response."
] |
public Rate getRate(int field) throws MPXJException
{
Rate result;
if ((field < m_fields.length) && (m_fields[field].length() != 0))
{
try
{
String rate = m_fields[field];
int index = rate.indexOf('/');
double amount;
TimeUnit units;
if (index == -1)
{
amount = m_formats.getCurrencyFormat().parse(rate).doubleValue();
units = TimeUnit.HOURS;
}
else
{
amount = m_formats.getCurrencyFormat().parse(rate.substring(0, index)).doubleValue();
units = TimeUnitUtility.getInstance(rate.substring(index + 1), m_locale);
}
result = new Rate(amount, units);
}
catch (ParseException ex)
{
throw new MPXJException("Failed to parse rate", ex);
}
}
else
{
result = null;
}
return (result);
} | [
"Accessor method used to retrieve an Rate 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\n@throws MPXJException normally thrown when parsing fails"
] | [
"Overridden 'consume' method. Corresponding parent method will be called necessary number of times\n\n@param initialVars - a map containing the initial variables assignments\n@return the number of lines written",
"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.",
"Plots the rotated trajectory, spline and support points.",
"Sorts the given array into sorted order using the given comparator.\n\n@param self the array to be sorted\n@param comparator a Comparator used for the comparison\n@return the sorted array\n@since 1.5.5",
"Skips variable length blocks up to and including next zero length block.",
"Remove the given pair into the map.\n\n<p>\nIf the given key is inside the map, but is not mapped to the given value, the\nmap will not be changed.\n</p>\n\n@param <K> type of the map keys.\n@param <V> type of the map values.\n@param map the map to update.\n@param entry the entry (key, value) to remove from the map.\n@return {@code true} if the pair was removed.\n@since 2.15",
"Create a Deliverable inside the database that will track a file created by a JobInstance Must be called from inside a transaction\n\n@param path\nFilePath (relative to a root directory - cf. Node)\n@param originalFileName\nFileName\n@param fileFamily\nFile family (may be null). E.g.: \"daily report\"\n@param jobId\nJob Instance ID\n@param cnx\nthe DbConn to use.",
"Upcasts a Builder instance to the generated superclass, to allow access to private fields.\n\n<p>Reuses an existing upcast instance if one was already declared in this scope.\n\n@param code the {@link SourceBuilder} to add the declaration to\n@param datatype metadata about the user type the builder is being generated for\n@param builder the Builder instance to upcast\n@returns a variable holding the upcasted instance",
"Use this API to unset the properties of nslimitselector resources.\nProperties that need to be unset are specified in args array."
] |
protected static void sendInitSQL(Connection connection, String initSQL) throws SQLException{
// fetch any configured setup sql.
if (initSQL != null){
Statement stmt = null;
try{
stmt = connection.createStatement();
stmt.execute(initSQL);
if (testSupport){ // only to aid code coverage, normally set to false
stmt = null;
}
} finally{
if (stmt != null){
stmt.close();
}
}
}
} | [
"Sends out the SQL as defined in the config upon first init of the connection.\n@param connection\n@param initSQL\n@throws SQLException"
] | [
"Set the role info for this user. If set, this will be used to set the user's authorizations.\n\n@param roles the roles\n@since 1.10.0",
"By the time we reach this method, we should be looking at the SQLite\ndatabase file itself.\n\n@param file SQLite database file\n@return ProjectFile instance",
"Computes the mean or average of all the elements.\n\n@return mean",
"Initializes the fields on the changes file with the values of the specified\nbinary package control file.\n\n@param packageControlFile",
"Token Info\nReturns the Token Information\n@return ApiResponse<TokenInfoSuccessResponse>\n@throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body",
"Removes the specified list of users from following the project, this will not affect project membership status.\nReturns the updated project record.\n\n@param project The project to remove followers from.\n@return Request object",
"Unmarshal the XML content with auto-correction.\n@param file the file that contains the XML\n@return the XML read from the file\n@throws CmsXmlException thrown if the XML can't be read.",
"Return key Values of an Identity\n@param cld\n@param oid\n@param convertToSql\n@return Object[]\n@throws PersistenceBrokerException",
"Read a field into our table configuration for field=value line."
] |
public long removeRangeByScore(final ScoreRange scoreRange) {
return doWithJedis(new JedisCallable<Long>() {
@Override
public Long call(Jedis jedis) {
return jedis.zremrangeByScore(getKey(), scoreRange.from(), scoreRange.to());
}
});
} | [
"Removes all elements in the sorted set with a score in the given range.\n@param scoreRange\n@return the number of elements removed."
] | [
"Given a particular id, return the correct contextual. For contextuals\nwhich aren't passivation capable, the contextual can't be found in another\ncontainer, and null will be returned.\n\n@param id An identifier for the contextual\n@return the contextual",
"Per the navigation drawer design guidelines, updates the action bar to show the global app\n'context', rather than just what's in the current screen.",
"Hashes a path, if the path points to a directory then hashes the contents recursively.\n@param messageDigest the digest used to hash.\n@param path the file/directory we want to hash.\n@return the resulting hash.\n@throws IOException",
"Hide the following channels.\n@param channels The names of the channels to hide.\n@return this",
"Add the option specifying if the categories should be displayed collapsed\nwhen the dialog opens.\n\n@see org.opencms.ui.actions.I_CmsADEAction#getParams()",
"Returns the corresponding ModuleSpec service name for the given module.\n\n@param identifier The module identifier\n@return The service name of the ModuleSpec service",
"Draw an elliptical exterior with this color.\n\n@param rect rectangle in which ellipse should fit\n@param color colour to use for stroking\n@param linewidth line width",
"Update the selection state of the item\n@param dataIndex data set index\n@param select if it is true the item is marked as selected, otherwise - unselected\n@return true if the selection state has been changed successfully, otherwise - false",
"The way calendars are stored in an MPP8 file means that there\ncan be forward references between the base calendar unique ID for a\nderived calendar, and the base calendar itself. To get around this,\nwe initially populate the base calendar name attribute with the\nbase calendar unique ID, and now in this method we can convert those\nID values into the correct names.\n\n@param baseCalendars list of calendars and base calendar IDs"
] |
static GVRPerspectiveCamera makePerspShadowCamera(GVRPerspectiveCamera centerCam, float coneAngle)
{
GVRPerspectiveCamera camera = new GVRPerspectiveCamera(centerCam.getGVRContext());
float near = centerCam.getNearClippingDistance();
float far = centerCam.getFarClippingDistance();
camera.setNearClippingDistance(near);
camera.setFarClippingDistance(far);
camera.setFovY((float) Math.toDegrees(coneAngle));
camera.setAspectRatio(1.0f);
return camera;
} | [
"Adds a perspective camera constructed from the designated\nperspective camera to describe the shadow projection.\nThis type of camera is used for shadows generated by spot lights.\n@param centerCam GVRPerspectiveCamera to derive shadow projection from\n@param coneAngle spot light cone angle\n@return Perspective camera to use for shadow casting\n@see GVRSpotLight"
] | [
"Retrieves the index of a cost rate table entry active on a given date.\n\n@param date target date\n@return cost rate table entry index",
"Create a style from a list of rules.\n\n@param styleRules the rules",
"Determines the field name based on an accessor method name.\n\n@param methodName\nan accessor method name\n@return the resulting field name",
"Returns the corresponding ModuleSpec service name for the given module.\n\n@param identifier The module identifier\n@return The service name of the ModuleSpec service",
"Use this API to fetch all the nspbr6 resources that are configured on netscaler.",
"Use this API to fetch clusterinstance resources of given names .",
"This method extracts project properties from a Planner file.\n\n@param project Root node of the Planner file",
"Saves the messages for all languages that were opened in the editor.\n\n@throws CmsException thrown if saving fails.",
"Calculates a checksum for the specified buffer.\n@param buffer the buffer to calculate.\n@return the checksum value."
] |
protected boolean prepareClose() {
synchronized (lock) {
final State state = this.state;
if (state == State.OPEN) {
this.state = State.CLOSING;
lock.notifyAll();
return true;
}
}
return false;
} | [
"Signal that we are about to close the channel. This will not have any affect on the underlying channel, however\nprevent setting a new channel.\n\n@return whether the closing state was set successfully"
] | [
"Checks the preconditions for creating a new ForbidSubStr processor with a List of forbidden substrings.\n\n@param forbiddenSubStrings\nthe forbidden substrings\n@throws NullPointerException\nif forbiddenSubStrings is null\n@throws IllegalArgumentException\nif forbiddenSubStrings is empty",
"Use this API to add dbdbprofile resources.",
"Open a new content stream.\n\n@param item the content item\n@return the content stream",
"Process field aliases.",
"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}.",
"Attaches a pre-existing set of hours to the correct\nday within the calendar.\n\n@param hours calendar hours instance",
"Generate and return the list of statements to drop a database table.",
"Adds position noise to the trajectories\n@param t\n@param sd\n@return trajectory with position noise",
"Read calendar data from a PEP file."
] |
private String[] getHeaders() {
final List<String> headers = new ArrayList<>();
if(decorator.getShowSources()){
headers.add(SOURCE_FIELD);
}
if(decorator.getShowSourcesVersion()){
headers.add(SOURCE_VERSION_FIELD);
}
if(decorator.getShowTargets()){
headers.add(TARGET_FIELD);
}
if(decorator.getShowTargetsDownloadUrl()){
headers.add(DOWNLOAD_URL_FIELD);
}
if(decorator.getShowTargetsSize()){
headers.add(SIZE_FIELD);
}
if(decorator.getShowScopes()){
headers.add(SCOPE_FIELD);
}
if(decorator.getShowLicenses()){
headers.add(LICENSE_FIELD);
}
if(decorator.getShowLicensesLongName()){
headers.add(LICENSE_LONG_NAME_FIELD);
}
if(decorator.getShowLicensesUrl()){
headers.add(LICENSE_URL_FIELD);
}
if(decorator.getShowLicensesComment()){
headers.add(LICENSE_COMMENT_FIELD);
}
return headers.toArray(new String[headers.size()]);
} | [
"Init the headers of the table regarding the filters\n\n@return String[]"
] | [
"Cleanup function to remove all allocated listeners",
"Adds a redirect URL to the specified profile ID\n\n@param model\n@param profileId\n@param srcUrl\n@param destUrl\n@param hostHeader\n@return\n@throws Exception",
"Returns the z-coordinate of a vertex position.\n\n@param vertex the vertex index\n@return the z coordinate",
"Do the set-up that's needed to access Amazon S3.",
"Sends a normal HTTP response containing the serialization information in\na XML format",
"Creates a converter function that converts value using a constructor that accepts a single String argument.\n\n@return A converter function or {@code null} if the given type doesn't have a public constructor that accepts\na single String argument.",
"Use this API to fetch sslvserver_sslcipher_binding resources of given name .",
"Add the key and return it's index code. If the key already is present, the previous\nindex code is returned and no insertion is done.\n\n@param key key to add\n@return index of the key",
"Get a collection of Photo objects for the specified Photoset.\n\nThis method does not require authentication.\n\n@see com.flickr4java.flickr.photos.Extras\n@see com.flickr4java.flickr.Flickr#PRIVACY_LEVEL_NO_FILTER\n@see com.flickr4java.flickr.Flickr#PRIVACY_LEVEL_PUBLIC\n@see com.flickr4java.flickr.Flickr#PRIVACY_LEVEL_FRIENDS\n@see com.flickr4java.flickr.Flickr#PRIVACY_LEVEL_FRIENDS_FAMILY\n@see com.flickr4java.flickr.Flickr#PRIVACY_LEVEL_FAMILY\n@see com.flickr4java.flickr.Flickr#PRIVACY_LEVEL_FRIENDS\n@param photosetId\nThe photoset ID\n@param extras\nSet of extra-fields\n@param privacy_filter\nfilter value for authenticated calls\n@param perPage\nThe number of photos per page\n@param page\nThe page offset\n@return PhotoList The Collection of Photo objects\n@throws FlickrException"
] |
public void set(final Argument argument) {
if (argument != null) {
map.put(argument.getKey(), Collections.singleton(argument));
}
} | [
"Sets an argument to the collection of arguments. This guarantees only one value will be assigned to the\nargument key.\n\n@param argument the argument to add"
] | [
"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",
"Get the maximum width and height of the labels.\n\n@param settings Parameters for rendering the scalebar.",
"Read one collection element from the current row of the JDBC result set\n\n@param optionalOwner the collection owner\n@param optionalKey the collection key\n@param persister the collection persister\n@param descriptor the collection aliases\n@param rs the result set\n@param session the session\n@throws HibernateException if an error occurs\n@throws SQLException if an error occurs during the query execution",
"Return the containing group if it contains exactly one element.\n\n@since 2.14",
"Returns a description String based on the defined command and options.\nUseful when printing \"help\" info etc.",
"Adds all direct subtypes to the given list.\n\n@param type The type for which to determine the direct subtypes\n@param subTypes The list to receive the subtypes",
"Mark the given child resource as the post run dependent of the parent of this collection.\n\n@param childResource the child resource",
"Retrieves an existing resource assignment if one is present,\nto prevent duplicate resource assignments being added.\n\n@param resource resource to test for\n@return existing resource assignment",
"Sets the value for the API's \"languages\" parameter based on the current\nsettings.\n\n@param properties\ncurrent setting of parameters"
] |
private boolean absoluteAdvanced(int row)
{
boolean retval = false;
try
{
if (getRsAndStmt().m_rs != null)
{
if (row == 0)
{
getRsAndStmt().m_rs.beforeFirst();
}
else
{
retval = getRsAndStmt().m_rs.absolute(row);
}
m_current_row = row;
setHasCalledCheck(false);
}
}
catch (SQLException e)
{
advancedJDBCSupport = false;
}
return retval;
} | [
"absolute for advancedJDBCSupport\n@param row"
] | [
"Look up the playback state that has reached furthest in the track, but give playing players priority over stopped players.\nThis is used to choose the scroll center when auto-scrolling is active.\n\n@return the playback state, if any, with the highest playing {@link PlaybackState#position} value",
"Copies a classworlds file to a temporary location either on the local filesystem or on a slave depending on the\nnode type.\n\n@return The path of the classworlds.conf file",
"Print an extended attribute value.\n\n@param writer parent MSPDIWriter instance\n@param value attribute value\n@param type type of the value being passed\n@return string representation",
"Removes each of the specified followers from the task if they are\nfollowing. Returns the complete, updated record for the affected task.\n\n@param task The task to remove followers from.\n@return Request object",
"generate a prepared UPDATE-Statement for the Class\ndescribed by cld\n@param cld the ClassDescriptor",
"returns all methods not in the group\n\n@param groupId Id of group\n@return List of Methods for a group\n@throws Exception exception",
"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",
"Reads an argument of type \"number\" from the request.",
"Add an accessory to be handled and advertised by this root. Any existing Homekit connections\nwill be terminated to allow the clients to reconnect and see the updated accessory list. When\nusing this for a bridge, the ID of the accessory must be greater than 1, as that ID is reserved\nfor the Bridge itself.\n\n@param accessory to advertise and handle."
] |
public char pollChar() {
if(hasNextChar()) {
if(hasNextWord() &&
character+1 >= parsedLine.words().get(word).lineIndex()+
parsedLine.words().get(word).word().length())
word++;
return parsedLine.line().charAt(character++);
}
return '\u0000';
} | [
"Polls the next char from the stack\n\n@return next char"
] | [
"Throws one RendererException if the viewType, layoutInflater or parent are null.",
"Count some stats on what occurs in a file.",
"Add a mapping of properties between two beans\n\n@param beanToBeanMapping",
"Curries a procedure that takes one argument.\n\n@param procedure\nthe original procedure. May not be <code>null</code>.\n@param argument\nthe fixed argument.\n@return a procedure that takes no arguments. Never <code>null</code>.",
"Returns the Euclidean distance between this vector and vector v.\n\n@return distance between this vector and v",
"Excludes Vertices that are of the provided type.",
"Loads treebank data from first argument and prints it.\n\n@param args Array of command-line arguments: specifies a filename",
"Log modified request\n\n@param httpMethodProxyRequest\n@param httpServletResponse\n@param history",
"Determine the generic value type of the given Map field.\n@param mapField the map field to introspect\n@param nestingLevel the nesting level of the target type\n(typically 1; e.g. in case of a List of Lists, 1 would indicate the\nnested List, whereas 2 would indicate the element of the nested List)\n@return the generic type, or {@code null} if none"
] |
public static PackageNameMappingWithPackagePattern fromPackage(String packagePattern)
{
PackageNameMapping packageNameMapping = new PackageNameMapping();
packageNameMapping.setPackagePattern(packagePattern);
return packageNameMapping;
} | [
"Sets the package pattern to match against."
] | [
"Sets the alert sound to be played.\n\nPassing {@code null} disables the notification sound.\n\n@param sound the file name or song name to be played\nwhen receiving the notification\n@return this",
"Join the Collection of Strings using the specified delimiter.\n\n@param s\nThe String collection\n@param delimiter\nThe delimiter String\n@return The joined String",
"Removes a corporate groupId from an Organisation\n\n@param organizationId String\n@param corporateGroupId String",
"Truncated power function.\n\n@param value Value.\n@param degree Degree.\n@return Result.",
"Returns the time elapsed by the user on the app\n@return Time elapsed by user on the app in int",
"Gets the addresses of the child resources under the given resource.\n\n@param context the operation context\n@param registry registry entry representing the resource\n@param resource the current resource\n@param validChildType a single child type to which the results should be limited. If {@code null} the result\nshould include all child types\n@return map where the keys are the child types and the values are a set of child names associated with a type",
"Gets string content from InputStream\n\n@param is InputStream to read\n@return InputStream content",
"Write notes.\n\n@param recordNumber record number\n@param text note text\n@throws IOException",
"Create a Renderer getting a copy from the prototypes collection.\n\n@param content to render.\n@param parent used to inflate the view.\n@return a new renderer."
] |
protected static final float[] getSpreadInRange(float member, int count, int max, int offset) {
// to find the spread, we first find the min that is a
// multiple of max/count away from the member
int interval = max / count;
float min = (member + offset) % interval;
if (min == 0 && member == max) {
min += interval;
}
float[] range = new float[count];
for (int i = 0; i < count; i++) {
range[i] = min + interval * i + offset;
}
return range;
} | [
"Returns a spread of integers in a range [0,max) that includes\ncount. The spread is sorted from largest to smallest."
] | [
"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)",
"Remove a bean from the context, calling the destruction callback if any.\n\n@param name bean name\n@return previous value",
"Create the service name for a channel\n\n@param channelName\nthe channel name\n@return the service name",
"Removes a value from the list.\n\n@param list the list\n@param value value to remove",
"Returns a list of the compact representation of all of the custom fields in a workspace.\n\n@param workspace The workspace or organization to find custom field definitions in.\n@return Request object",
"Return a list of unique namespace and predicate pairs, optionally limited by predicate or namespace, in alphabetical order.\n\nThis method does not require authentication.\n\n@param namespace\noptional, can be null\n@param predicate\noptional, can be null\n@param perPage\nThe number of photos to show per page\n@param page\nThe page offset\n@return NamespacesList containing Pair-objects\n@throws FlickrException",
"Get the maximum width and height of the labels.\n\n@param settings Parameters for rendering the scalebar.",
"Retrieves state and metrics information for all channels on individual connection.\n@param connectionName the connection name to retrieve channels\n@return list of channels on the connection",
"Calculates Tangent value of the complex number.\n\n@param z1 A ComplexNumber instance.\n@return Returns new ComplexNumber instance containing the Tangent value of the specified complex number."
] |
public Object getJavaDefaultValueDefault() {
if (field.getType() == boolean.class) {
return DEFAULT_VALUE_BOOLEAN;
} else if (field.getType() == byte.class || field.getType() == Byte.class) {
return DEFAULT_VALUE_BYTE;
} else if (field.getType() == char.class || field.getType() == Character.class) {
return DEFAULT_VALUE_CHAR;
} else if (field.getType() == short.class || field.getType() == Short.class) {
return DEFAULT_VALUE_SHORT;
} else if (field.getType() == int.class || field.getType() == Integer.class) {
return DEFAULT_VALUE_INT;
} else if (field.getType() == long.class || field.getType() == Long.class) {
return DEFAULT_VALUE_LONG;
} else if (field.getType() == float.class || field.getType() == Float.class) {
return DEFAULT_VALUE_FLOAT;
} else if (field.getType() == double.class || field.getType() == Double.class) {
return DEFAULT_VALUE_DOUBLE;
} else {
return null;
}
} | [
"Return whether or not the field value passed in is the default value for the type of the field. Null will return\ntrue."
] | [
"Returns the number of consecutive leading one or zero bits.\nIf network is true, returns the number of consecutive leading one bits.\nOtherwise, returns the number of consecutive leading zero bits.\n\n@param network\n@return",
"Use this API to fetch all the inat resources that are configured on netscaler.",
"Finds the first mesh in the given model.\n@param model root of a model loaded by the asset loader.\n@return GVRMesh found or null if model does not contain meshes\n@see #loadMesh(GVRAndroidResource.MeshCallback, GVRAndroidResource, int)",
"Get an exception reporting an unexpected end tag for an XML element.\n@param reader the stream reader\n@return the exception",
"Set the TableAlias for aPath\n@param aPath\n@param hintClasses\n@param TableAlias",
"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",
"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 the zero rates for a given vector maturities.\n\n@param maturities The given maturities.\n@return The zero rates.",
"Ensures that every path starts and ends with a slash character.\n\n@param scriptPath the scriptPath that needs to be normalized\n@return a path with leading and trailing slash"
] |
public void forObjectCache(String template, Properties attributes) throws XDocletException
{
_curObjectCacheDef = _curClassDef.getObjectCache();
if (_curObjectCacheDef != null)
{
generate(template);
_curObjectCacheDef = null;
}
} | [
"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\""
] | [
"Provide array of String results from inputOutput MFString field named string.\n@return value of string field",
"Clean wait task queue.",
"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.",
"Encodes the given URI path with the given encoding.\n@param path the path to be encoded\n@param encoding the character encoding to encode to\n@return the encoded path\n@throws UnsupportedEncodingException when the given encoding parameter is not supported",
"Set text parameters from properties\n@param context Valid Android {@link Context}\n@param properties JSON text properties",
"Gets the Topsoe divergence.\n\n@param p P vector.\n@param q Q vector.\n@return The Topsoe divergence between p and q.",
"Deletes a FilePath file.\n\n@param workspace The build workspace.\n@param path The path in the workspace.\n@throws IOException In case of missing file.",
"Use this API to unset the properties of clusterinstance resource.\nProperties that need to be unset are specified in args array.",
"Sets the queue.\n\n@param queue the new queue"
] |
public void setInitialSequence(int[] sequence) {
if(models != null){
for(int i = 0; i < models.length; i++)
models[i].setInitialSequence(sequence);
return;
}
model1.setInitialSequence(sequence);
model2.setInitialSequence(sequence);
} | [
"Informs this sequence model that the value of the whole sequence is initialized to sequence"
] | [
"Backup all xml files in a given directory.\n\n@param source the source directory\n@param target the target directory\n@throws IOException for any error",
"Sets the baseline finish text value.\n\n@param baselineNumber baseline number\n@param value baseline finish text value",
"Register custom filter types especially for serializer of specification json file",
"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",
"Extracts the row from a matrix.\n@param a Input matrix\n@param row Which row is to be extracted\n@param out output. Storage for the extracted row. If null then a new vector will be returned.\n@return The extracted row.",
"Invoke a method through reflection.\nFalls through to using the Invoker to call the method in case the reflection call fails..\n\n@param object the object on which to invoke a method\n@param methodName the name of the method to invoke\n@param parameters the parameters of the method call\n@return the result of the method call",
"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",
"Writes the content of an input stream to an output stream\n\n@throws IOException",
"Output the SQL type for the default value for the type."
] |
private void setCorrectDay(Calendar date) {
if (monthHasNotDay(date)) {
date.set(Calendar.DAY_OF_MONTH, date.getActualMaximum(Calendar.DAY_OF_MONTH));
} else {
date.set(Calendar.DAY_OF_MONTH, m_dayOfMonth);
}
} | [
"Set the correct day for the date with year and month already fixed.\n@param date the date, where year and month are already correct."
] | [
"Adds an environment variable to the process being created.\n\n@param key they key for the variable\n@param value the value for the variable\n\n@return the launcher",
"Creates a ServiceCall from an observable object.\n\n@param observable the observable to create from\n@param <T> the type of the response\n@return the created ServiceCall",
"Removes all commas from the token list",
"Sets the timewarp setting from a numeric string\n\n@param timewarp a numeric string containing the number of milliseconds since the epoch",
"Changes the vertex buffer associated with this mesh.\n@param vbuf new vertex buffer to use\n@see #setVertices(float[])\n@see #getVertexBuffer()\n@see #getVertices()",
"Wrap PreparedStatement with a proxy.\n@param target statement handle\n@param connectionHandle originating bonecp connection\n@return Proxy to a Preparedstatement.",
"Tells you if the ASTNode is a method node for the given name, arity, and return type.\n@param node\nthe node to inspect\n@param methodNamePattern\nthe expected name of the method\n@param numArguments\nthe expected number of arguments, optional\n@param returnType\nthe expected return type, optional\n@return\ntrue if this node is a MethodNode meeting the parameters. false otherwise",
"Process a compilation unit already parsed and build.",
"Adds a new gender item and an initial name.\n\n@param entityIdValue\nthe item representing the gender\n@param name\nthe label to use for representing the gender"
] |
public static void doMetaClearRebalance(AdminClient adminClient, List<Integer> nodeIds) {
AdminToolUtils.assertServerNotInOfflineState(adminClient, nodeIds);
System.out.println("Setting " + MetadataStore.SERVER_STATE_KEY + " to "
+ MetadataStore.VoldemortState.NORMAL_SERVER);
doMetaSet(adminClient,
nodeIds,
MetadataStore.SERVER_STATE_KEY,
MetadataStore.VoldemortState.NORMAL_SERVER.toString());
RebalancerState state = RebalancerState.create("[]");
System.out.println("Cleaning up " + MetadataStore.REBALANCING_STEAL_INFO + " to "
+ state.toJsonString());
doMetaSet(adminClient,
nodeIds,
MetadataStore.REBALANCING_STEAL_INFO,
state.toJsonString());
System.out.println("Cleaning up " + MetadataStore.REBALANCING_SOURCE_CLUSTER_XML
+ " to empty string");
doMetaSet(adminClient, nodeIds, MetadataStore.REBALANCING_SOURCE_CLUSTER_XML, "");
} | [
"Removes metadata related to rebalancing.\n\n@param adminClient An instance of AdminClient points to given cluster\n@param nodeIds Node ids to clear metadata after rebalancing"
] | [
"Send the message using the JavaMail session defined in the message\n\n@param mimeMessage Message to send",
"generate a prepared SELECT-Statement for the Class\ndescribed by cld\n@param cld the ClassDescriptor",
"Upload a photo from a File.\n\n@param file\nthe photo file\n@param metaData\nThe meta data\n@return photoId or ticketId\n@throws FlickrException",
"Checks if a newly created action wants to write output to stdout, and\nlogs a warning if other actions are doing the same.\n\n@param newAction\nthe new action to be checked",
"Sets the top padding character for all cells in the row.\n@param paddingTopChar new padding character, ignored if null\n@return this to allow chaining",
"Returns new instance of OptionalValue with given value\n@param value wrapped object\n@param <T> type of the wrapped object\n@return given object wrapped in OptionalValue",
"Populates a Map instance representing the IDs and names of\nprojects available in the current file.\n\n@param is input stream used to read XER file\n@return Map instance containing ID and name pairs\n@throws MPXJException",
"Use this API to fetch filtered set of appqoepolicy resources.\nset the filter parameter values in filtervalue object.",
"Gets a JSON string containing any pending changes to this object that can be sent back to the Box API.\n@return a JSON string containing the pending changes."
] |
private void addDateRange(ProjectCalendarHours hours, Date start, Date end)
{
if (start != null && end != null)
{
Calendar cal = DateHelper.popCalendar(end);
// If the time ends on midnight, the date should be the next day. Otherwise problems occur.
if (cal.get(Calendar.HOUR_OF_DAY) == 0 && cal.get(Calendar.MINUTE) == 0 && cal.get(Calendar.SECOND) == 0 && cal.get(Calendar.MILLISECOND) == 0)
{
cal.add(Calendar.DAY_OF_YEAR, 1);
}
end = cal.getTime();
DateHelper.pushCalendar(cal);
hours.addRange(new DateRange(start, end));
}
} | [
"Get a date range that correctly handles the case where the end time\nis midnight. In this instance the end time should be the start of the\nnext day.\n\n@param hours calendar hours\n@param start start date\n@param end end date"
] | [
"open a readable or writeable FileChannel\n\n@param file file object\n@param mutable writeable\n@return open the FileChannel\n@throws IOException any io exception",
"Emit a string event with parameters and force all listeners to be called asynchronously.\n\n@param event\nthe target event\n@param args\nthe arguments passed in\n@see #emit(String, Object...)",
"Determine which type of percent complete is used on on this task,\nand calculate the required value.\n\n@param row task data\n@return percent complete value",
"Returns a specific profile\n\n@param profileId ID of profile\n@return Selected profile if found, null if not found\n@throws Exception exception",
"Returns the overtime cost of this resource assignment.\n\n@return cost",
"Main method of the class, which handles the process of creating the tests\n\n@param requirementsFolder\n, it is the folder where the plain text given by the client is\nstored\n@param platformName\n, to choose the MAS platform (JADE, JADEX, etc.)\n@param src_test_dir\n, the folder where our classes are created\n@param tests_package\n, the name of the package where the stories are created\n@param casemanager_package\n, the path where casemanager must be created\n@param loggingPropFile\n, properties file\n@throws Exception\n, if any error is found in the configuration",
"Returns the value of this product under the given model.\n\n@param evaluationTime Evaluation time.\n@param model The model.\n@return Value of this product und the given model.",
"Returns the number of rows within this association.\n\n@return the number of rows within this association",
"Parse priority.\n\n\n@param priority priority value\n@return Priority instance"
] |
public void deleteMetadata(String templateName, String scope) {
URL url = METADATA_URL_TEMPLATE.build(this.getAPI().getBaseURL(), this.getID(), scope, templateName);
BoxAPIRequest request = new BoxAPIRequest(this.getAPI(), url, "DELETE");
BoxAPIResponse response = request.send();
response.disconnect();
} | [
"Deletes the metadata on this folder associated with a specified scope and template.\n\n@param templateName the metadata template type name.\n@param scope the scope of the template (usually \"global\" or \"enterprise\")."
] | [
"We have obtained a beat grid for a device, so store it and alert any listeners.\n\n@param update the update which caused us to retrieve this beat grid\n@param beatGrid the beat grid which we retrieved",
"Calculates the LatLong position of the end point of a line the specified\ndistance from this LatLong, along the provided bearing, where North is 0,\nEast is 90 etc.\n\n@param bearing The bearing, in degrees, with North as 0, East as 90 etc.\n@param distance The distance in metres.\n@return A new LatLong indicating the end point.",
"Calculates directory size as total size of all its files, recursively.\n\n@param self a file object\n@return directory size (length)\n@since 2.1\n\n@throws IOException if File object specified does not exist\n@throws IllegalArgumentException if the provided File object does not represent a directory",
"Shifts are performed based upon singular values computed previously. If it does not converge\nusing one of those singular values it uses a Wilkinson shift instead.",
"Set to array.\n@param injectionProviders\nset of providers\n@return array of providers",
"Merge the contents of the given plugin.xml into this one.",
"Checks the given class descriptor for correct procedure settings.\n\n@param classDef The class descriptor\n@param checkLevel The current check level (this constraint is checked in basic and strict)\n@exception ConstraintException If the constraint has been violated",
"Sets the HTML entity translator for all cells in the table.\nIt will also remove any other translator set.\nNothing will happen if the argument is null.\n@param htmlElementTranslator translator\n@return this to allow chaining",
"Convert this buffer to a java array.\n@return"
] |
private Map<String, Table> getIndex(Table table)
{
Map<String, Table> result;
if (!table.getResourceFlag())
{
result = m_taskTablesByName;
}
else
{
result = m_resourceTablesByName;
}
return result;
} | [
"Retrieve the correct index for the supplied Table instance.\n\n@param table Table instance\n@return index"
] | [
"EAP 7.0",
"Gets information about a trashed file that's limited to a list of specified fields.\n@param fileID the ID of the trashed file.\n@param fields the fields to retrieve.\n@return info about the trashed file containing only the specified fields.",
"This method evaluates a if a graphical indicator should\nbe displayed, given a set of Task or Resource data. The\nmethod will return -1 if no indicator should be displayed.\n\n@param container Task or Resource instance\n@return indicator index",
"Send ourselves \"updates\" about any tracks that were loaded before we started, or before we were requesting\ndetails, since we missed them.",
"Samples with replacement from a collection\n\n@param c\nThe collection to be sampled from\n@param n\nThe number of samples to take\n@return a new collection with the sample",
"Discards any tracks from the hot cache that were loaded from a now-unmounted media slot, because they are no\nlonger valid.",
"Read custom fields for a GanttProject resource.\n\n@param gpResource GanttProject resource\n@param mpxjResource MPXJ Resource instance",
"Build filter for the request.\n\n@param layerFilter layer filter\n@param featureIds features to include in report (null for all)\n@return filter\n@throws GeomajasException filter could not be parsed/created",
"Returns the nested object definition with the specified name.\n\n@param name The name of the attribute of the nested object\n@return The nested object definition or <code>null</code> if there is no such nested object"
] |
public static String encodePath(String path, String encoding) throws UnsupportedEncodingException {
return HierarchicalUriComponents.encodeUriComponent(path, encoding, HierarchicalUriComponents.Type.PATH);
} | [
"Encodes the given URI path with the given encoding.\n@param path the path to be encoded\n@param encoding the character encoding to encode to\n@return the encoded path\n@throws UnsupportedEncodingException when the given encoding parameter is not supported"
] | [
"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",
"Returns the input to parse including the whitespace left to the cursor position since\nit may be relevant to the list of proposals for whitespace sensitive languages.",
"Provide array of String results from inputOutput MFString field named url.\n@array saved in valueDestination",
"The location for this elevation.\n\n@return",
"Remove a bean from the context, calling the destruction callback if any.\n\n@param name bean name\n@return previous value",
"Returns any events for the given resource ID since the last sync token\n\n@param resource Globally unique identifier for the resource.\n@param sync Sync token provided by a previous call to the events API\n@return Request object",
"Call the no-arg constructor for the given class\n\n@param <T> The type of the thing to construct\n@param klass The class\n@return The constructed thing",
"Create constant name.\n@param state STATE_UNCHANGED, STATE_CHANGED, STATE_NEW or STATE_DELETED.\n@return cconstanname as String",
"Use this API to rename a cmppolicylabel resource."
] |
public static String getJavaClassFromSchemaInfo(String schemaInfo) {
final String ONLY_JAVA_CLIENTS_SUPPORTED = "Only Java clients are supported currently, so the format of the schema-info should be: <schema-info>java=foo.Bar</schema-info> where foo.Bar is the fully qualified name of the message.";
if(StringUtils.isEmpty(schemaInfo))
throw new IllegalArgumentException("This serializer requires a non-empty schema-info.");
String[] languagePairs = StringUtils.split(schemaInfo, ',');
if(languagePairs.length > 1)
throw new IllegalArgumentException(ONLY_JAVA_CLIENTS_SUPPORTED);
String[] javaPair = StringUtils.split(languagePairs[0], '=');
if(javaPair.length != 2 || !javaPair[0].trim().equals("java"))
throw new IllegalArgumentException(ONLY_JAVA_CLIENTS_SUPPORTED);
return javaPair[1].trim();
} | [
"Extracts the java class name from the schema info\n\n@param schemaInfo the schema info, a string like: java=java.lang.String\n@return the name of the class extracted from the schema info"
] | [
"Use this API to fetch authenticationradiusaction resource of given name .",
"Use this API to fetch all the systemsession resources that are configured on netscaler.",
"Iterates over all the documents, adding each to the given target.\n\n@param target the collection to insert into\n@param <A> the collection type\n@return the target",
"Compares two vectors and determines if they are numeric equals,\nindependent of its type.\n\n@param vector1\nthe first vector\n@param vector2\nthe second vector\n@return true if the vectors are numeric equals",
"Get the max extent as a envelop object.",
"Creates an operation to deploy existing deployment content to the runtime.\n\n@param deployment the deployment to deploy\n\n@return the deploy operation",
"Convert MPX day index to Day instance.\n\n@param day day index\n@return Day instance",
"when divisionPrefixLen is null, isAutoSubnets has no effect",
"helper method to set the TranslucentStatusFlag\n\n@param on"
] |
private static void addRedeployOperationStep(final CompositeOperationBuilder builder, final DeploymentDescription deployment) {
final String deploymentName = deployment.getName();
final Set<String> serverGroups = deployment.getServerGroups();
if (serverGroups.isEmpty()) {
builder.addStep(createOperation(DEPLOYMENT_REDEPLOY_OPERATION, createAddress(DEPLOYMENT, deploymentName)));
} else {
for (String serverGroup : serverGroups) {
builder.addStep(createOperation(DEPLOYMENT_REDEPLOY_OPERATION, createAddress(SERVER_GROUP, serverGroup, DEPLOYMENT, deploymentName)));
}
}
} | [
"Adds a redeploy step to the composite operation.\n\n@param builder the builder to add the step to\n@param deployment the deployment being redeployed"
] | [
"Computes execution time\n@param extra",
"Checks if is file exist.\n\n@param filePath\nthe file path\n@return true, if is file exist",
"Verify JUnit presence and version.",
"from IsoFields in ThreeTen-Backport",
"Returns the default safety level preference for the user.\n\n@see com.flickr4java.flickr.Flickr#SAFETYLEVEL_MODERATE\n@see com.flickr4java.flickr.Flickr#SAFETYLEVEL_RESTRICTED\n@see com.flickr4java.flickr.Flickr#SAFETYLEVEL_SAFE\n@return The current users safety-level\n@throws FlickrException",
"Populate the expanded exceptions list based on the main exceptions list.\nWhere we find recurring exception definitions, we generate individual\nexceptions for each recurrence to ensure that we account for them correctly.",
"Adds the newState and the edge between the currentState and the newState on the SFG.\n\n@param newState the new state.\n@param eventable the clickable causing the new state.\n@return the clone state iff newState is a clone, else returns null",
"Creates a status instance from the given serviceReferences.\nThe given list is copied to a new set made immutable.\n\n@param serviceReferencesBound the set of ServiceReference which are bound to the declaration.\n@param serviceReferencesHandled the set of ServiceReference which are handling the declaration.\n@return the new instance of status",
"Read the file header data.\n\n@param is input stream"
] |
public String getOuterMostNullEmbeddableIfAny(String column) {
String[] path = column.split( "\\." );
if ( !isEmbeddableColumn( path ) ) {
return null;
}
// the cached value may be null hence the explicit key lookup
if ( columnToOuterMostNullEmbeddableCache.containsKey( column ) ) {
return columnToOuterMostNullEmbeddableCache.get( column );
}
return determineAndCacheOuterMostNullEmbeddable( column, path );
} | [
"Should only called on a column that is being set to null.\n\nReturns the most outer embeddable containing {@code column} that is entirely null.\nReturn null otherwise i.e. not embeddable.\n\nThe implementation lazily compute the embeddable state and caches it.\nThe idea behind the lazy computation is that only some columns will be set to null\nand only in some situations.\nThe idea behind caching is that an embeddable contains several columns, no need to recompute its state."
] | [
"Validates that the data structure at position startEndRecord has a field in the expected position\nthat points to the start of the first central directory file, and, if so, that the file\nhas a complete end of central directory record comment at the end.\n\n@param file the file being checked\n@param channel the channel\n@param startEndRecord the start of the end of central directory record\n@param endSig the end of central dir signature\n@return true if it can be confirmed that the end of directory record points to a central directory\nfile and a complete comment is present, false otherwise\n@throws java.io.IOException",
"Given a string which is either the name of a predefined tab configuration or a configuration string, returns\nthe corresponding tab configuration.\n\n@param configStr a configuration string or predefined configuration name\n\n@return the gallery tab configuration",
"Use this API to fetch all the vpnsessionaction resources that are configured on netscaler.",
"This method uses the configured git credentials and repo, to test its validity.\nIn addition, in case the user requested creation of a new tag, it checks that\nanother tag with the same name doesn't exist",
"Read the version number.\n\n@param is input stream",
"Returns an array of non-empty ids from the given list of ids or values.\n\n@param idsOrValues\nlist of ids and/or values\n@return array of non-empty ids",
"Adds an additional statement to the constructed document.\n\n@param statement\nthe additional statement\n@return builder object to continue construction",
"Use this API to fetch linkset_interface_binding resources of given name .",
"Removes the given object from the cache\n\n@param oid oid of the object to remove"
] |
public static final Date parseDate(String value)
{
Date result = null;
try
{
if (value != null && !value.isEmpty())
{
result = DATE_FORMAT.get().parse(value);
}
}
catch (ParseException ex)
{
// Ignore
}
return result;
} | [
"Parse a date value.\n\n@param value String representation\n@return Date instance"
] | [
"Removes all candidates from this collection which are not\nassociated with an initialising method.\n\n@return a {@code Collection} containing the removed\nunassociated candidates. This list is empty if none\nwere removed, i. e. the result is never {@code null}.",
"Unregister the mbean with the given name, if there is one registered\n\n@param name The mbean name to unregister\n@see #registerMBean(Object, String)",
"Check the given URI to see if it matches.\n\n@param matchInfo the matchInfo to validate.\n@return True if it matches.",
"Use this API to fetch all the gslbrunningconfig resources that are configured on netscaler.",
"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 click on \"Add\" button.\n@param e the click event.",
"compares two java files",
"Lookup a PortComponentMetaData by wsdl-port local part\n\n@param name - the wsdl-port local part\n@return PortComponentMetaData if found, null otherwise",
"Given a key and a list of steal infos give back a list of stealer node\nids which will steal this.\n\n@param key Byte array of key\n@param stealerNodeToMappingTuples Pairs of stealer node id to their\ncorresponding [ partition - replica ] tuples\n@param cluster Cluster metadata\n@param storeDef Store definitions\n@return List of node ids"
] |
public static Path createTempDirectory(Path dir, String prefix) throws IOException {
try {
return Files.createTempDirectory(dir, prefix);
} catch (UnsupportedOperationException ex) {
}
return Files.createTempDirectory(dir, prefix);
} | [
"Create a temporary directory with the same attributes as its parent directory.\n@param dir\nthe path to directory in which to create the directory\n@param prefix\nthe prefix string to be used in generating the directory's name;\nmay be {@code null}\n@return the path to the newly created directory that did not exist before\nthis method was invoked\n@throws IOException"
] | [
"Remove a PropertyChangeListener for a specific property from this node.\nThis functionality has. Please note that the listener this does not remove\na listener that has been added without specifying the property it is\ninterested in.",
"Pre API 11, this does an alpha animation.\n\n@param progress",
"Return a list of Flickr supported blogging services.\n\nThis method does not require authentication.\n\n@return List of Services\n@throws FlickrException",
"Deletes a specific client id for a profile\n\n@param model\n@param profileIdentifier\n@param clientUUID\n@return returns the table of the remaining clients or an exception if deletion failed for some reason\n@throws Exception",
"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.",
"returns the zero argument constructor for the class represented by this class descriptor\nor null if a zero argument constructor does not exist. If the zero argument constructor\nfor this class is not public it is made accessible before being returned.",
"if you don't have an argument, choose the value that is going to be inserted into the map instead\n\n@param commandLineOption specification of the command line options\n@param value the value that is going to be inserted into the map instead of the argument",
"Get a configured database connection via JNDI.",
"Locks the bundle descriptor.\n@throws CmsException thrown if locking fails."
] |
public void showToast(final String message, float duration) {
final float quadWidth = 1.2f;
final GVRTextViewSceneObject toastSceneObject = new GVRTextViewSceneObject(this, quadWidth, quadWidth / 5,
message);
toastSceneObject.setTextSize(6);
toastSceneObject.setTextColor(Color.WHITE);
toastSceneObject.setGravity(Gravity.CENTER_HORIZONTAL|Gravity.TOP);
toastSceneObject.setBackgroundColor(Color.DKGRAY);
toastSceneObject.setRefreshFrequency(GVRTextViewSceneObject.IntervalFrequency.REALTIME);
final GVRTransform t = toastSceneObject.getTransform();
t.setPositionZ(-1.5f);
final GVRRenderData rd = toastSceneObject.getRenderData();
final float finalOpacity = 0.7f;
rd.getMaterial().setOpacity(0);
rd.setRenderingOrder(2 * GVRRenderData.GVRRenderingOrder.OVERLAY);
rd.setDepthTest(false);
final GVRCameraRig rig = getMainScene().getMainCameraRig();
rig.addChildObject(toastSceneObject);
final GVRMaterialAnimation fadeOut = new GVRMaterialAnimation(rd.getMaterial(), duration / 4.0f) {
@Override
protected void animate(GVRHybridObject target, float ratio) {
final GVRMaterial material = (GVRMaterial) target;
material.setOpacity(finalOpacity - ratio * finalOpacity);
}
};
fadeOut.setOnFinish(new GVROnFinish() {
@Override
public void finished(GVRAnimation animation) {
rig.removeChildObject(toastSceneObject);
}
});
final GVRMaterialAnimation fadeIn = new GVRMaterialAnimation(rd.getMaterial(), 3.0f * duration / 4.0f) {
@Override
protected void animate(GVRHybridObject target, float ratio) {
final GVRMaterial material = (GVRMaterial) target;
material.setOpacity(ratio * finalOpacity);
}
};
fadeIn.setOnFinish(new GVROnFinish() {
@Override
public void finished(GVRAnimation animation) {
getAnimationEngine().start(fadeOut);
}
});
getAnimationEngine().start(fadeIn);
} | [
"Show a toast-like message for the specified duration\n\n@param message\n@param duration in seconds"
] | [
"Answer the real ClassDescriptor for anObj\nie. aCld may be an Interface of anObj, so the cld for anObj is returned",
"Append the given item to the end of the list\n@param segment segment to append",
"This method is a sync parse to the JSON stream of atlas information.\n\n@return List of atlas information.",
"Used to finish up pushing the bulge off the matrix.",
"Creates a triangular matrix where the amount of fill is randomly selected too.\n\n@param upper true for upper triangular and false for lower\n@param N number of rows and columns\ner * @param minFill minimum fill fraction\n@param maxFill maximum fill fraction\n@param rand random number generator\n@return Random matrix",
"Start check of execution time\n@param extra",
"Guess the type of the given dump from its filename.\n\n@param fileName\n@return dump type, defaulting to JSON if no type was found",
"Returns the overtime cost of this resource assignment.\n\n@return cost",
"Checks given permissions are needed to show rationale.\n\n@return returns true if one of the permission is needed to show rationale."
] |
@Pure
public static <K, V> Map<K, V> operator_minus(Map<K, V> map, final Iterable<?> keys) {
return Maps.filterKeys(map, new Predicate<K>() {
@Override
public boolean apply(K input) {
return !Iterables.contains(keys, input);
}
});
} | [
"Replies the elements of the given map except the pairs with the given keys.\n\n<p>\nThe replied map is a view on the given map. It means that any change\nin the original map is reflected to the result of this operation.\n</p>\n\n@param <K> type of the map keys.\n@param <V> type of the map values.\n@param map the map to update.\n@param keys the keys of the pairs to remove.\n@return the map with the content of the map except the pairs.\n@since 2.15"
] | [
"Append the text at the end of the Path.\n\n@param self a Path\n@param text the text to append at the end of the Path\n@throws java.io.IOException if an IOException occurs.\n@since 2.3.0",
"Adds the supplied marker to the map.\n\n@param marker",
"get the ClassTypeSignature corresponding to given parameterized type\n\n@param parameterizedType\n@return",
"Checks to see if a subsystem resource has already been registered for the deployment.\n\n@param subsystemName the name of the subsystem\n\n@return {@code true} if the subsystem exists on the deployment otherwise {@code false}",
"Return a new File object based on the baseDir and the segments.\n\nThis method does not perform any operation on the file system.",
"Use this API to fetch clusternodegroup resource of given name .",
"Remove a path\n\n@param pathId ID of path",
"Retrieves the real subject from the underlying RDBMS. Override this\nmethod if the object is to be materialized in a specific way.\n\n@return The real subject of the proxy",
"These exact lines are shared between three different tools, so\nthey have been moved here to reduce code duplication.\n@return The parsed command-line, with options removed."
] |
public static String getDateTimeStrConcise(Date d) {
if (d == null)
return "";
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmssSSSZ");
return sdf.format(d);
} | [
"Gets the date time str concise.\n\n@param d\nthe d\n@return the date time str concise"
] | [
"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",
"Mark a PersistenceBroker as preferred choice for current Thread\n\n@param key The PBKey the broker is associated to\n@param broker The PersistenceBroker to mark as current",
"Split string content into list, ignoring matches of the pattern\n@param content String content\n@param ignorePattern Pattern to ignore\n@return list",
"This one picks up on Dan2 ideas, but seeks to make less distinctions\nmid sequence by sorting for long words, but to maintain extra\ndistinctions for short words, by always recording the class of the\nfirst and last two characters of the word.\nCompared to chris2 on which it is based,\nit uses more Unicode classes, and so collapses things like\npunctuation more, and might work better with real unicode.\n\n@param s The String to find the word shape of\n@param omitIfInBoundary If true, character classes present in the\nfirst or last two (i.e., BOUNDARY_SIZE) letters\nof the word are not also registered\nas classes that appear in the middle of the word.\n@param knownLCWords If non-null and non-empty, tag with a \"k\" suffix words\nthat are in this list when lowercased (representing\nthat the word is \"known\" as a lowercase word).\n@return A word shape for the word.",
"Start a print.\n\n@param jobId the job ID\n@param specJson the client json request.\n@param out the stream to write to.",
"Computes the WordNet 2.0 POS tag corresponding to the PTB POS tag s.\n\n@param s a Penn TreeBank POS tag.",
"All the sub-level attributes.\n\n@param name the attribute name.\n@param attribute the attribute.",
"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.",
"Use this API to unset the properties of nsdiameter resource.\nProperties that need to be unset are specified in args array."
] |
public synchronized int get() {
if (available == 0) {
return -1;
}
byte value = buffer[idxGet];
idxGet = (idxGet + 1) % capacity;
available--;
return value;
} | [
"Gets a single byte return or -1 if no data is available."
] | [
"This method extracts project properties from a Planner file.\n\n@param project Root node of the Planner file",
"Declares a shovel.\n\n@param vhost virtual host where to declare the shovel\n@param info Shovel info.",
"Returns true if required properties for MiniFluo are set",
"Adds a string reference, a class reference, a method type, a module\nor a package to the constant pool of the class being build.\nDoes nothing if the constant pool already contains a similar item.\n\n@param type\na type among STR, CLASS, MTYPE, MODULE or PACKAGE\n@param value\nstring value of the reference.\n@return a new or already existing reference item.",
"Extract the DatabaseTableConfig for a particular class by looking for class and field annotations. This is used\nby internal classes to configure a class.",
"Returns the plugins classpath elements.",
"Want to make arbitrary probability queries? Then this is the method for\nyou. Given the filename, it reads it in and breaks it into documents, and\nthen makes a CRFCliqueTree for each document. you can then ask the clique\ntree for marginals and conditional probabilities of almost anything you\nwant.",
"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\"",
"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"
] |
public static BsonDocument copyOfDocument(final BsonDocument document) {
final BsonDocument newDocument = new BsonDocument();
for (final Map.Entry<String, BsonValue> kv : document.entrySet()) {
newDocument.put(kv.getKey(), kv.getValue());
}
return newDocument;
} | [
"Returns a copy of the given document.\n@param document the document to copy.\n@return a copy of the given document."
] | [
"Use this API to fetch the statistics of all nspbr6_stats resources that are configured on netscaler.",
"Writes a vInt directly to a byte array\n\n@param dest The destination array for the vInt to be written to\n@param offset The location where to write the vInt to\n@param i The Value being written into byte array\n@return Returns the new offset location",
"Use this API to fetch all the csparameter resources that are configured on netscaler.",
"Prepare a parallel HTTP HEAD Task.\n\n@param url\nthe UrlPostfix: e.g. in http://localhost:8080/index.html.,the url is \"/index.html\"\n@return the parallel task builder",
"called periodically to check that the heartbeat has been received\n\n@return {@code true} if we have received a heartbeat recently",
"On host controller reload, remove a not running server registered in the process controller declared as stopping.",
"Checks, if all values necessary for a specific pattern are valid.\n@return a flag, indicating if all values required for the pattern are valid.",
"Goes through all the RO Stores in the plan and swaps it\n\n@param swappedStoreNames Names of stores already swapped\n@param useSwappedStoreNames Swap only the previously swapped stores (\nHappens during error )",
"Starts the scenario with the given method and arguments.\nDerives the description from the method name.\n@param method the method that started the scenario\n@param arguments the test arguments with their parameter names"
] |
@NotThreadsafe
private void initFileStreams(int chunkId) {
/**
* {@link Set#add(Object)} returns false if the element already existed in the set.
* This ensures we initialize the resources for each chunk only once.
*/
if (chunksHandled.add(chunkId)) {
try {
this.indexFileSizeInBytes[chunkId] = 0L;
this.valueFileSizeInBytes[chunkId] = 0L;
this.checkSumDigestIndex[chunkId] = CheckSum.getInstance(checkSumType);
this.checkSumDigestValue[chunkId] = CheckSum.getInstance(checkSumType);
this.position[chunkId] = 0;
this.taskIndexFileName[chunkId] = new Path(FileOutputFormat.getOutputPath(conf),
getStoreName() + "."
+ Integer.toString(chunkId) + "_"
+ this.taskId + INDEX_FILE_EXTENSION
+ fileExtension);
this.taskValueFileName[chunkId] = new Path(FileOutputFormat.getOutputPath(conf),
getStoreName() + "."
+ Integer.toString(chunkId) + "_"
+ this.taskId + DATA_FILE_EXTENSION
+ fileExtension);
if(this.fs == null)
this.fs = this.taskIndexFileName[chunkId].getFileSystem(conf);
if(isValidCompressionEnabled) {
this.indexFileStream[chunkId] = new DataOutputStream(new BufferedOutputStream(new GZIPOutputStream(fs.create(this.taskIndexFileName[chunkId]),
DEFAULT_BUFFER_SIZE)));
this.valueFileStream[chunkId] = new DataOutputStream(new BufferedOutputStream(new GZIPOutputStream(fs.create(this.taskValueFileName[chunkId]),
DEFAULT_BUFFER_SIZE)));
} else {
this.indexFileStream[chunkId] = fs.create(this.taskIndexFileName[chunkId]);
this.valueFileStream[chunkId] = fs.create(this.taskValueFileName[chunkId]);
}
fs.setPermission(this.taskIndexFileName[chunkId],
new FsPermission(HadoopStoreBuilder.HADOOP_FILE_PERMISSION));
logger.info("Setting permission to 755 for " + this.taskIndexFileName[chunkId]);
fs.setPermission(this.taskValueFileName[chunkId],
new FsPermission(HadoopStoreBuilder.HADOOP_FILE_PERMISSION));
logger.info("Setting permission to 755 for " + this.taskValueFileName[chunkId]);
logger.info("Opening " + this.taskIndexFileName[chunkId] + " and "
+ this.taskValueFileName[chunkId] + " for writing.");
} catch(IOException e) {
throw new RuntimeException("Failed to open Input/OutputStream", e);
}
}
} | [
"The MapReduce framework should operate sequentially, so thread safety shouldn't be a problem."
] | [
"Print the visibility adornment of element e prefixed by\nany stereotypes",
"Creates the button for converting an XML bundle in a property bundle.\n@return the created button.",
"Merge a new subsystem from the global registration.\n\n@param registry the global registry\n@param subsystemName the subsystem name\n@param version the subsystem version",
"Adds api doc roots from a link. The folder reffered by the link should contain a package-list\nfile that will be parsed in order to add api doc roots to this configuration\n@param packageListUrl",
"Over simplistic helper to compare two strings to check radio buttons.\n\n@param value1 the first value\n@param value2 the second value\n@return \"checked\" if both values are equal, the empty String \"\" otherwise",
"Gets the listener classes to which dispatching should be prevented while\nthis event is being dispatched.\n\n@return The listener classes marked to prevent.\n@see #preventCascade(Class)",
"Stores a public key mapping.\n@param original\n@param substitute",
"Select the default currency properties from the database.\n\n@param currencyID default currency ID",
"Override for customizing XmlMapper and ObjectMapper"
] |
public static ComplexNumber Pow(ComplexNumber z1, double n) {
double norm = Math.pow(z1.getMagnitude(), n);
double angle = 360 - Math.abs(Math.toDegrees(Math.atan(z1.imaginary / z1.real)));
double common = n * angle;
double r = norm * Math.cos(Math.toRadians(common));
double i = norm * Math.sin(Math.toRadians(common));
return new ComplexNumber(r, i);
} | [
"Calculate power of a complex number.\n\n@param z1 Complex Number.\n@param n Power.\n@return Returns a new complex number containing the power of a specified number."
] | [
"Utility function that pauses and asks for confirmation on dangerous\noperations.\n\n@param confirm User has already confirmed in command-line input\n@param opDesc Description of the dangerous operation\n@throws IOException\n@return True if user confirms the operation in either command-line input\nor here.",
"Close all HTTP clients created by this factory\n@throws IOException if an I/O error occurs",
"Returns string content of blob identified by specified blob handle. String contents cache is used.\n\n@param blobHandle blob handle\n@param txn {@linkplain Transaction} instance\n@return string content of blob identified by specified blob handle\n@throws IOException if something went wrong",
"Hashes a path, if the path points to a directory then hashes the contents recursively.\n@param messageDigest the digest used to hash.\n@param path the file/directory we want to hash.\n@return the resulting hash.\n@throws IOException",
"Return the association as cached in the entry state.\n\n@param collectionRole the role of the association\n@return the cached association",
"Log a warning for the given operation at the provided address for the given attributes, 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 attributes attributes we that have problems about",
"Get permissions for who may view geo data for a photo.\n\nThis method requires authentication with 'read' permission.\n\n@param photoId\nreqired photo id, not null\n@return the permissions\n@throws FlickrException\nif photo id is invalid, if photo has no geodata or if any other error has been reported in the response.",
"Executes the given transaction within the context of a write lock.\n\n@param t The transaction to execute.",
"Return a copy of the result as a String.\n\n<p>The default version of this method copies the result into a temporary byte array and then\ntries to decode it using the configured encoding.\n\n@return string version of the result.\n@throws IOException if the data cannot be produced or could not be decoded to a String."
] |
private ProjectFile handleMDBFile(InputStream stream) throws Exception
{
File file = InputStreamHelper.writeStreamToTempFile(stream, ".mdb");
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
String url = "jdbc:odbc:DRIVER=Microsoft Access Driver (*.mdb);DBQ=" + file.getCanonicalPath();
Set<String> tableNames = populateTableNames(url);
if (tableNames.contains("MSP_PROJECTS"))
{
return readProjectFile(new MPDDatabaseReader(), file);
}
if (tableNames.contains("EXCEPTIONN"))
{
return readProjectFile(new AstaDatabaseReader(), file);
}
return null;
}
finally
{
FileHelper.deleteQuietly(file);
}
} | [
"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"
] | [
"Get the Roman Numeral of the current value\n@return",
"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",
"Inserts an array of Parcelable values into the mapping of the underlying Bundle, replacing any\nexisting value for the given key. Either key or value may be null.\n\n@param key a String, or null\n@param value an array of Parcelable objects, or null\n@return this bundler instance to chain method calls",
"Sets a file whose contents will be prepended to the JAR file's data.\n\n@param file the prefix file, or {@code null} for none.\n@return {@code this}",
"Modify a module.\n\n@param moduleName the module name\n@param slot the module slot\n@param existingHash the existing hash\n@param newHash the new hash of the modified content\n@return the builder",
"Makes a DocumentReaderAndWriter based on the flags the CRFClassifier\nwas constructed with. Will create the flags.readerAndWriter and\ninitialize it with the CRFClassifier's flags.",
"called per frame of animation to update the camera position",
"Set possible tile URLs.\n\n@param tileUrls tile URLs",
"Downloads this version of the file to a given OutputStream while reporting the progress to a ProgressListener.\n@param output the stream to where the file will be written.\n@param listener a listener for monitoring the download's progress."
] |
public static final GVRPickedObject[] pickObjects(GVRScene scene, float ox, float oy, float oz, float dx,
float dy, float dz) {
sFindObjectsLock.lock();
try {
final GVRPickedObject[] result = NativePicker.pickObjects(scene.getNative(), 0L, ox, oy, oz, dx, dy, dz);
return result;
} finally {
sFindObjectsLock.unlock();
}
} | [
"Casts a ray into the scene graph, and returns the objects it intersects.\n\nThe ray is defined by its origin {@code [ox, oy, oz]} and its direction\n{@code [dx, dy, dz]}.\n\n<p>\nThe ray origin may be [0, 0, 0] and the direction components should be\nnormalized from -1 to 1: Note that the y direction runs from -1 at the\nbottom to 1 at the top. To construct a picking ray originating at the\nuser's head and pointing into the scene along the camera lookat vector,\npass in 0, 0, 0 for the origin and 0, 0, -1 for the direction.\n\n<p>\nThis method is thread safe because it guarantees that only\none thread at a time is doing a ray cast into a particular scene graph,\nand it extracts the hit data during within its synchronized block. You\ncan then examine the return list without worrying about another thread\ncorrupting your hit data.\n<p>\nDepending on the type of collider, that the hit location may not be exactly\nwhere the ray would intersect the scene object itself. Rather, it is\nwhere the ray intersects the collision geometry associated with the collider.\n\n@param scene\nThe {@link GVRScene} with all the objects to be tested.\n\n@param ox\nThe x coordinate of the ray origin.\n\n@param oy\nThe y coordinate of the ray origin.\n\n@param oz\nThe z coordinate of the ray origin.\n\n@param dx\nThe x vector of the ray direction.\n\n@param dy\nThe y vector of the ray direction.\n\n@param dz\nThe z vector of the ray direction.\n@return A list of {@link GVRPickedObject}, sorted by distance from the\ncamera rig. Each {@link GVRPickedObject} contains the scene object\nwhich owns the {@link GVRCollider} along with the hit\nlocation and distance from the camera.\n\n@since 1.6.6"
] | [
"Check if the gravity and orientation are not in conflict one with other.\n@param gravity\n@param orientation\n@return true if orientation and gravity can be applied together, false - otherwise",
"Use this API to update nsspparams.",
"Computes the distance from a point p to the plane of this face.\n\n@param p\nthe point\n@return distance from the point to the plane",
"Generates required number of placeholders as string.\n\nExample: {@code numberOfPlaceholders == 1, result == \"?\"},\n{@code numberOfPlaceholders == 2, result == \"?,?\"}.\n\n@param numberOfPlaceholders required amount of placeholders, should be {@code > 0}.\n@return string with placeholders.",
"called periodically to check that the heartbeat has been received\n\n@return {@code true} if we have received a heartbeat recently",
"Returns an array with the width of the longest word per column calculated from the given table.\nDefault padding will be added per column.\nPadding for individual columns will be added if defined.\n@param rows the table rows for calculations\n@param colNumbers number of columns in the table\n@return array with width of longest word for each column, null if input table was null",
"Scales the brightness of a pixel.",
"create a broker with given broker info\n\n@param id broker id\n@param brokerInfoString broker info format: <b>creatorId:host:port:autocreated</b>\n@return broker instance with connection config\n@see #getZKString()",
"Calculate the layout container size along the axis\n@param axis {@link Axis}\n@return size"
] |
public Operation.Info create( Symbol op , Variable left , Variable right ) {
switch( op ) {
case PLUS:
return Operation.add(left, right, managerTemp);
case MINUS:
return Operation.subtract(left, right, managerTemp);
case TIMES:
return Operation.multiply(left, right, managerTemp);
case RDIVIDE:
return Operation.divide(left, right, managerTemp);
case LDIVIDE:
return Operation.divide(right, left, managerTemp);
case POWER:
return Operation.pow(left, right, managerTemp);
case ELEMENT_DIVIDE:
return Operation.elementDivision(left, right, managerTemp);
case ELEMENT_TIMES:
return Operation.elementMult(left, right, managerTemp);
case ELEMENT_POWER:
return Operation.elementPow(left, right, managerTemp);
default:
throw new RuntimeException("Unknown operation " + op);
}
} | [
"Create a new instance of a two input function from an operator character\n@param op Which operation\n@param left Input variable on left\n@param right Input variable on right\n@return Resulting operation"
] | [
"Execute a request through Odo processing\n\n@param httpMethodProxyRequest\n@param httpServletRequest\n@param httpServletResponse\n@param history",
"Get the first controller of a specified type\n@param type controller type to search for\n@return controller found or null if no controllers of the given type",
"Convert a Planner time into a Java date.\n\n0800\n\n@param value Planner time\n@return Java Date instance",
"create a HashMap form the json properties and add it to the shape\n@param modelJSON\n@param current\n@throws org.json.JSONException",
"Helper method for formatting connection termination messages.\n\n@param connectionName\nThe name of the connection\n@param host\nThe remote host\n@param connectionReason\nThe reason for establishing the connection\n@param terminationReason\nThe reason for terminating the connection\n@return A formatted message in the format:\n\"[<connectionName>] remote host[<host>] <connectionReason> - <terminationReason>\"\n<br/>\ne.g. [con1] remote host[123.123.123.123] connection to ECMG -\nterminated by remote host.",
"Extracts the value of this bit flag from the supplied byte array\nand sets the value in the supplied container.\n\n@param container container\n@param data byte array",
"Adds a new leap second to these rules.\n\n@param mjDay the Modified Julian Day that the leap second occurs at the end of\n@param leapAdjustment the leap seconds to add/remove at the end of the day, either -1 or 1\n@throws IllegalArgumentException if the leap adjustment is invalid\n@throws IllegalArgumentException if the day is before or equal the last known leap second day\nand the definition does not match a previously registered leap\n@throws ConcurrentModificationException if another thread updates the rules at the same time",
"Ask the specified player for an Artist menu.\n\n@param slotReference the player and slot for which the menu is desired\n@param sortOrder the order in which responses should be sorted, 0 for default, see Section 6.11.1 of the\n<a href=\"https://github.com/Deep-Symmetry/dysentery/blob/master/doc/Analysis.pdf\">Packet Analysis\ndocument</a> for details\n\n@return the entries in the artist menu\n\n@throws Exception if there is a problem obtaining the menu",
"Create a Deliverable inside the database that will track a file created by a JobInstance Must be called from inside a transaction\n\n@param path\nFilePath (relative to a root directory - cf. Node)\n@param originalFileName\nFileName\n@param fileFamily\nFile family (may be null). E.g.: \"daily report\"\n@param jobId\nJob Instance ID\n@param cnx\nthe DbConn to use."
] |
private void readHeader(InputStream is) throws IOException
{
byte[] header = new byte[20];
is.read(header);
m_offset += 20;
SynchroLogger.log("HEADER", header);
} | [
"Read the file header data.\n\n@param is input stream"
] | [
"Returns all the dependencies taken into account the artifact of the module that will be removed from the dependencies\n\n@param module Module\n@param producedArtifacts List<String>\n@return Set<Dependency>",
"Reads and returns the mediator URN from the JSON content.\n\n@see #RegistrationConfig(String)",
"Resolve a resource transformer for a given address.\n\n@param address the address\n@param placeholderResolver a placeholder resolver used to resolve children of a placeholder registration\n@return the resource transformer",
"Use this API to delete appfwlearningdata.",
"Read flow id.\n\n@param message the message\n@return flow id from the message",
"Print a date time value.\n\n@param value date time value\n@return string representation",
"Write a duration field to the JSON file.\n\n@param fieldName field name\n@param value field value",
"Get a list of tags for the specified photo.\n\n<p>\nThis method does not require authentication.\n</p>\n\n@param photoId\nThe photo ID\n@return The collection of Tag objects",
"Subtracts v1 from this vector and places the result in this vector.\n\n@param v1\nright-hand vector"
] |
public byte[] serialize() throws PersistenceBrokerException
{
// Identity is serialized and written to an ObjectOutputStream
// This ObjectOutputstream is compressed by a GZIPOutputStream
// and finally written to a ByteArrayOutputStream.
// the resulting byte[] is returned
try
{
final ByteArrayOutputStream bao = new ByteArrayOutputStream();
final GZIPOutputStream gos = new GZIPOutputStream(bao);
final ObjectOutputStream oos = new ObjectOutputStream(gos);
oos.writeObject(this);
oos.close();
gos.close();
bao.close();
return bao.toByteArray();
}
catch (Exception ignored)
{
throw new PersistenceBrokerException(ignored);
}
} | [
"Return the serialized form of this Identity.\n\n@return The serialized representation\n@see #fromByteArray\n@deprecated"
] | [
"Checks whether the given field definition is used as the primary key of a class referenced by\na reference.\n\n@param modelDef The model\n@param fieldDef The current field descriptor def\n@return The reference that uses the field or <code>null</code> if the field is not used in this way",
"If directory doesn't exists try to create it.\n\n@param directory given directory to check\n@throws ReportGenerationException if can't create specified directory",
"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",
"Modify the transform's current rotation in quaternion terms, around a\npivot other than the origin.\n\n@param quatW\n'W' component of the rotation quaternion.\n@param quatX\n'X' component of the rotation quaternion.\n@param quatY\n'Y' component of the rotation quaternion.\n@param quatZ\n'Z' component of the rotation quaternion.\n@param pivotX\n'X' component of the pivot's location.\n@param pivotY\n'Y' component of the pivot's location.\n@param pivotZ\n'Z' component of the pivot's location.",
"Uploads a new file to this folder while reporting the progress to a ProgressListener.\n\n@param fileContent a stream containing the contents of the file to upload.\n@param name the name to give the uploaded file.\n@param fileSize the size of the file used for determining the progress of the upload.\n@param listener a listener for monitoring the upload's progress.\n@return the uploaded file's info.",
"Loads the configuration from file \"OBJ.properties\". If the system\nproperty \"OJB.properties\" is set, then the configuration in that file is\nloaded. Otherwise, the file \"OJB.properties\" is tried. If that is also\nunsuccessful, then the configuration is filled with default values.",
"List app dynos for an app\n\n@param appName See {@link #listApps} for a list of apps that can be used.",
"Sets orientation of loopbar\n\n@param orientation int value of orientation. Must be one of {@link Orientation}",
"Removes the supplied marker from the map.\n\n@param marker"
] |
public static dnsaaaarec[] get(nitro_service service) throws Exception{
dnsaaaarec obj = new dnsaaaarec();
dnsaaaarec[] response = (dnsaaaarec[])obj.get_resources(service);
return response;
} | [
"Use this API to fetch all the dnsaaaarec resources that are configured on netscaler."
] | [
"Helper method fro providers to fire hotkey event in a separate thread\n\n@param hotKey hotkey to fire",
"Closes any registered stream entries that have not yet been consumed",
"Get the property name from the expression.\n\n@param expression expression\n@return property name",
"Applies the given codec registry to be used alongside the default codec registry.\n\n@param codecRegistry the codec registry to merge in.\n@return an {@link StitchObjectMapper} with the merged codec registries.",
"Use this API to add ntpserver resources.",
"Creates needed textfields for general label in footer groups.\n@param djgroup\n@param jgroup",
"Count the total number of queued resource requests for all queues. The\nresult is \"approximate\" in the face of concurrency since individual\nqueues can change size during the aggregate count.\n\n@return The (approximate) aggregate count of queued resource requests.",
"Construct a Access Token from a Flickr Response.\n\n@param response",
"Generates the specified number of random resource names with the same prefix.\n@param prefix the prefix to be used if possible\n@param maxLen the maximum length for the random generated name\n@param count the number of names to generate\n@return random names"
] |
protected PersistenceBrokerInternal createNewBrokerInstance(PBKey key) throws PBFactoryException
{
if (key == null) throw new PBFactoryException("Could not create new broker with PBkey argument 'null'");
// check if the given key really exists
if (MetadataManager.getInstance().connectionRepository().getDescriptor(key) == null)
{
throw new PBFactoryException("Given PBKey " + key + " does not match in metadata configuration");
}
if (log.isEnabledFor(Logger.INFO))
{
// only count created instances when INFO-Log-Level
log.info("Create new PB instance for PBKey " + key +
", already created persistence broker instances: " + instanceCount);
// useful for testing
++this.instanceCount;
}
PersistenceBrokerInternal instance = null;
Class[] types = {PBKey.class, PersistenceBrokerFactoryIF.class};
Object[] args = {key, this};
try
{
instance = (PersistenceBrokerInternal) ClassHelper.newInstance(implementationClass, types, args);
OjbConfigurator.getInstance().configure(instance);
instance = (PersistenceBrokerInternal) InterceptorFactory.getInstance().createInterceptorFor(instance);
}
catch (Exception e)
{
log.error("Creation of a new PB instance failed", e);
throw new PBFactoryException("Creation of a new PB instance failed", e);
}
return instance;
} | [
"For internal use! This method creates real new PB instances"
] | [
"Check if the property is part of the identifier of the entity.\n\n@param persister the {@link OgmEntityPersister} of the entity with the property\n@param namesWithoutAlias the path to the property with all the aliases resolved\n@return {@code true} if the property is part of the id, {@code false} otherwise.",
"Un-serialize a Json into Module\n@param module String\n@return Module\n@throws IOException",
"Function to perform backward pooling",
"Convert a document List into arrays storing the data features and labels.\n\n@param document\nTraining documents\n@return A Pair, where the first element is an int[][][] representing the\ndata and the second element is an int[] representing the labels",
"Method to read our client's plain text\n\n@param file_name\n@return the filereader to translate client's plain text into our files\n@throws BeastException\nif any problem is found whit the file",
"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 fetch all the gslbsite resources that are configured on netscaler.",
"Set the timeout for idle connections. Voldemort client caches all\nconnections to the Voldemort server. This setting allows the a connection\nto be dropped, if it is idle for more than this time.\n\nThis could be useful in the following cases 1) Voldemort client is not\ndirectly connected to the server and is connected via a proxy or\nfirewall. The Proxy or firewall could drop the connection silently. If\nthe connection is dropped, then client will see operations fail with a\ntimeout. Setting this property enables the Voldemort client to tear down\nthe connection before a firewall could drop it. 2) Voldemort server\ncaches the connection and each connection has an associated memory cost.\nSetting this property on all clients, enable the clients to prune the\nconnections and there by freeing up the server connections.\n\nthrows IllegalArgumentException if the timeout is less than 10 minutes.\n\nCurrently it can't be set below 10 minutes to avoid the racing risk of\ncontention between connection checkout and selector trying to close it.\nThis is intended for low throughput scenarios.\n\n@param idleConnectionTimeout\nzero or negative number to disable the feature ( default -1)\ntimeout\n@param unit {@link TimeUnit}\n@return ClientConfig object for chained set\n\nthrows {@link IllegalArgumentException} if the timeout is greater\nthan 0, but less than 10 minutes.",
"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"
] |
protected boolean lacksSomeLanguage(ItemDocument itemDocument) {
for (int i = 0; i < arabicNumeralLanguages.length; i++) {
if (!itemDocument.getLabels()
.containsKey(arabicNumeralLanguages[i])) {
return true;
}
}
return false;
} | [
"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"
] | [
"Returns true if the input is a vector\n@param a A matrix or vector\n@return true if it's a vector. Column or row.",
"Disassociate a name with an object\n@param name The name of an object.\n@exception ObjectNameNotFoundException No object exists in the database with that name.",
"Find the path to the first association in the property path.\n\n@param targetTypeName the entity with the property\n@param pathWithoutAlias the path to the property WITHOUT the alias\n@return the path to the first association or {@code null} if there isn't an association in the property path",
"Copy new data to an existing float-point texture.\n\nCreating a new {@link GVRFloatImage} is pretty cheap, but it's still\nnot a totally trivial operation: it does involve some memory management\nand some GL hardware handshaking. Reusing the texture reduces this\noverhead (primarily by delaying garbage collection). Do be aware that\nupdating a texture will affect any and all {@linkplain GVRMaterial\nmaterials} (and/or post effects that use the texture!\n\n@param width\nTexture width, in pixels\n@param height\nTexture height, in pixels\n@param data\nA linear array of float pairs.\n@return {@code true} if the updateGPU succeeded, and {@code false} if it\nfailed. Updating a texture requires that the new data parameter\nhas the exact same {@code width} and {@code height} and pixel\nformat as the original data.\n@throws IllegalArgumentException\nIf {@code width} or {@code height} is {@literal <= 0,} or if\n{@code data} is {@code null}, or if\n{@code data.length < height * width * 2}",
"Sets all Fluo properties to their default in the given configuration. NOTE - some properties do\nnot have defaults and will not be set.",
"Creates a single property declaration.\n@param property Property name.\n@param term Property value.\n@return The resulting declaration.",
"Given a class node, if this class node implements a trait, then generate all the appropriate\ncode which delegates calls to the trait. It is safe to call this method on a class node which\ndoes not implement a trait.\n@param cNode a class node\n@param unit the source unit",
"Use this API to fetch aaagroup_vpntrafficpolicy_binding resources of given name .",
"Obtain the profile identifier.\n\n@param profileIdentifier Can be profile ID, or friendly name\n@return\n@throws Exception"
] |
public List<? super OpenShiftResource> processTemplateResources() {
List<? extends OpenShiftResource> resources;
final List<? super OpenShiftResource> processedResources = new ArrayList<>();
templates = OpenShiftResourceFactory.getTemplates(getType());
boolean sync_instantiation = OpenShiftResourceFactory.syncInstantiation(getType());
/* Instantiate templates */
for (Template template : templates) {
resources = processTemplate(template);
if (resources != null) {
if (sync_instantiation) {
/* synchronous template instantiation */
processedResources.addAll(resources);
} else {
/* asynchronous template instantiation */
try {
delay(openShiftAdapter, resources);
} catch (Throwable t) {
throw new IllegalArgumentException(asynchronousDelayErrorMessage(), t);
}
}
}
}
return processedResources;
} | [
"Instantiates the templates specified by @Template within @Templates"
] | [
"Returns all the pixels for the image\n\n@return an array of pixels for this image",
"dispatch to gravity state",
"When creating image columns\n@return",
"Do synchronization of the given J2EE ODMG Transaction",
"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",
"Gets the Searcher for a given variant.\n\n@param variant an identifier to differentiate this Searcher from eventual others.\n@return the corresponding Searcher instance.\n@throws IllegalStateException if no searcher was {@link #create(Searchable) created} before for this {@code variant}.",
"Helper method to add a parameter without having to create it explicitely. The created parameter should be persisted afterwards.\n\n@param key\nname of the parameter to add\n@param value\nvalue of the parameter to create\n@return the newly created parameter",
"Creates the database.\n\n@throws PlatformException If some error occurred",
"Before cluster management operations, i.e. remember and disable quota\nenforcement settings"
] |
protected final void verify() {
collectInitialisers();
verifyCandidates();
verifyInitialisers();
collectPossibleInitialValues();
verifyPossibleInitialValues();
collectEffectiveAssignmentInstructions();
verifyEffectiveAssignmentInstructions();
collectAssignmentGuards();
verifyAssignmentGuards();
end();
} | [
"Template method for verification of lazy initialisation."
] | [
"Adds a function to the end of the token list\n@param function Function which is to be added\n@return The new Token created around function",
"Returns a byte array containing a copy of the bytes",
"Return the score of the specified element of the sorted set at key.\n@param member\n@return The score value or <code>null</code> if the element does not exist in the set.",
"Returns a lazily generated map from site paths of resources to the available locales for the resource.\n\n@return a lazily generated map from site paths of resources to the available locales for the resource.",
"Adds each of the specified followers to the task, if they are not already\nfollowing. Returns the complete, updated record for the affected task.\n\n@param task The task to add followers to.\n@return Request object",
"Flattens an option into its value or else null, which is not great but is usually more convenient in Java.\n@param option Optional value -- either Some(T) or None\n@param <T> Any type\n@return The value inside the option, or else null",
"A convenience method for creating an immutable sorted map.\n\n@param self a SortedMap\n@return an immutable SortedMap\n@see java.util.Collections#unmodifiableSortedMap(java.util.SortedMap)\n@since 1.0",
"Performs case-sensitive depth-first search for a child object and then\nremoves it if found.\n\n@param name name of scene object to be removed.\n\n@return true if child was found (and removed), else false",
"Sets the name of the designated bone.\n\n@param boneindex zero based index of bone to rotate.\n@param bonename string with name of bone.\n. * @see #getBoneName"
] |
public static base_response delete(nitro_service client, String jsoncontenttypevalue) throws Exception {
appfwjsoncontenttype deleteresource = new appfwjsoncontenttype();
deleteresource.jsoncontenttypevalue = jsoncontenttypevalue;
return deleteresource.delete_resource(client);
} | [
"Use this API to delete appfwjsoncontenttype of given name."
] | [
"Returns a RowColumn following the current one\n\n@return RowColumn following this one",
"Emit a event object with parameters and force all listeners to be called synchronously.\n\n@param event\nthe target event\n@param args\nthe arguments passed in\n@see #emit(EventObject, Object...)",
"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.",
"Mark content as obsolete. If content was already marked for obsolescenceTimeout ms then it is removed.\n\n@param ref the content refrence to be marked as obsolete.\n\n@return true if the content refrence is removed, fale otherwise.",
"Reads the categories assigned to a resource.\n\n@return map from the resource path (root path) to the assigned categories",
"Use this API to export appfwlearningdata resources.",
"Use this API to disable Interface resources of given names.",
"Add a '<' clause so the column must be less-than the value.",
"Read the parameters on initialization.\n\n@see org.apache.solr.update.processor.UpdateRequestProcessorFactory#init(org.apache.solr.common.util.NamedList)"
] |
private static StackTraceElement getStackTrace() {
StackTraceElement[] stack = Thread.currentThread().getStackTrace();
int i = 2; // we can skip the first two (first is getStackTrace(), second is this method)
while (i < stack.length) {
boolean isLoggingClass = false;
for (String loggingClass : loggingClasses) {
String className = stack[i].getClassName();
if (className.startsWith(loggingClass)) {
isLoggingClass = true;
break;
}
}
if (!isLoggingClass) {
break;
}
i += 1;
}
// if we didn't find anything, keep last element (probably shouldn't happen, but could if people add too many logging classes)
if (i >= stack.length) {
i = stack.length - 1;
}
return stack[i];
} | [
"Get the current stack trace element, skipping anything from known logging classes.\n@return The current stack trace for this thread"
] | [
"Determines whether a project has the specified publisher type, wrapped by the \"Flexible Publish\" publisher.\n@param project The project\n@param type The type of the publisher\n@return true if the project contains a publisher of the specified type wrapped by the \"Flexible Publish\" publisher.",
"FIXME Remove this method",
"Use this API to update callhome.",
"Mapping message info.\n\n@param messageInfo the message info\n@return the message info type",
"performs a SQL SELECT statement against RDBMS.\n@param sql the query string.\n@param cld ClassDescriptor providing meta-information.",
"Undeletes the selected files\n\n@return the ids of the modified resources\n\n@throws CmsException if something goes wrong",
"Use this API to delete route6 resources of given names.",
"Resets all member fields that hold information about the revision that is\ncurrently being processed.",
"Finds \"Y\" coordinate value in which more elements could be added in the band\n@param band\n@return"
] |
private Class getDynamicProxyClass(Class baseClass) {
Class[] m_dynamicProxyClassInterfaces;
if (foundInterfaces.containsKey(baseClass)) {
m_dynamicProxyClassInterfaces = (Class[])foundInterfaces.get(baseClass);
} else {
m_dynamicProxyClassInterfaces = getInterfaces(baseClass);
foundInterfaces.put(baseClass, m_dynamicProxyClassInterfaces);
}
// return dynymic Proxy Class implementing all interfaces
Class proxyClazz = Proxy.getProxyClass(baseClass.getClassLoader(), m_dynamicProxyClassInterfaces);
return proxyClazz;
} | [
"returns a dynamic Proxy that implements all interfaces of the\nclass described by this ClassDescriptor.\n\n@return Class the dynamically created proxy class"
] | [
"Performs a HTTP DELETE request.\n\n@return {@link Response}",
"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 the pointer on the bar. With the Value value.\n\n@param value float between 0 and 1",
"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",
"Checks the available space and sets max-height to the details field-set.",
"Takes a numeric string value and converts it to a integer between 0 and 100.\n\nreturns 0 if the string is not numeric.\n\n@param percentage - A numeric string value\n@return a integer between 0 and 100",
"Processes an index descriptor tag.\n\n@param template The template\n@param attributes The attributes of the tag\n@exception XDocletException If an error occurs\[email protected] type=\"content\"\[email protected] name=\"documentation\" optional=\"true\" description=\"Documentation on the index\"\[email protected] name=\"fields\" optional=\"false\" description=\"The fields making up the index separated by commas\"\[email protected] name=\"name\" optional=\"false\" description=\"The name of the index descriptor\"\[email protected] name=\"unique\" optional=\"true\" description=\"Whether the index descriptor is unique\" values=\"true,false\"",
"remove files from directory. All-or-nothing operation - if any of the files fails to be removed, all deleted files are restored.\n\nThe operation is performed in two steps - first all the files are moved to a backup folder, and afterwards backup folder is removed.\nIf an error occurs in the first step of the operation, all files are restored and the operation ends with status {@code false}.\nIf an error occurs in the second step, the operation ends with status {@code false}, but the files are not rolled back.\n\n@throws IOException if an error occurred",
"Check if the specified sql-string is a stored procedure\nor not.\n@param sql The sql query to check\n@return <em>True</em> if the query is a stored procedure, else <em>false</em> is returned."
] |
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"
] | [
"This is the probability density function for the Gaussian\ndistribution.",
"Writes batch of data to the source\n@param batch\n@throws InterruptedException",
"Return true only if the MethodCallExpression represents a method call for the specified method name\n@param methodCall - the AST MethodCallExpression\n@param methodNamePattern - the expected name of the method being called\n@param numArguments - The number of expected arguments\n@return true only if the method call name matches",
"Returns s if it's at most maxWidth chars, otherwise chops right side to fit.",
"Processes the template for all extents of the current class.\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\"",
"Retrieve the Activity ID value for this task.\n@param task Task instance\n@return Activity ID value",
"Append a SubQuery the SQL-Clause\n@param subQuery the subQuery value of SelectionCriteria",
"Get a property as a boolean or null.\n\n@param key the property name",
"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"
] |
private String readHeaderString(BufferedInputStream stream) throws IOException
{
int bufferSize = 100;
stream.mark(bufferSize);
byte[] buffer = new byte[bufferSize];
stream.read(buffer);
Charset charset = CharsetHelper.UTF8;
String header = new String(buffer, charset);
int prefixIndex = header.indexOf("PPX!!!!|");
int suffixIndex = header.indexOf("|!!!!XPP");
if (prefixIndex != 0 || suffixIndex == -1)
{
throw new IOException("File format not recognised");
}
int skip = suffixIndex + 9;
stream.reset();
stream.skip(skip);
return header.substring(prefixIndex + 8, suffixIndex);
} | [
"Read the header from the Phoenix file.\n\n@param stream input stream\n@return raw header data"
] | [
"2-D Gaussian function.\n\n@param x value.\n@param y value.\n@return Function's value at point (x,y).",
"Convert from an internal Spring bean definition to a DTO.\n\n@param beanDefinition The internal Spring bean definition.\n@return Returns a DTO representation.",
"This method extracts task data from an MSPDI file.\n\n@param project Root node of the MSPDI file",
"Converts a time in UTC to a gwt Date object which is in the timezone of\nthe current browser.\n\n@return The Date corresponding to the time, adjusted for the timezone of\nthe current browser. null if the specified time is null or\nrepresents a negative number.",
"Get a sub-list of this list\n@param fromIndex index of the first element in the sub-list (inclusive)\n@param toIndex index of the last element in the sub-list (inclusive)\n@return the sub-list",
"Retrieves the value component of a criteria expression.\n\n@param field field type\n@param block block data\n@return field value",
"Gets id of a property and creates the new one if necessary.\n\n@param txn transaction\n@param propertyName name of the property.\n@param allowCreate if set to true and if there is no property named as propertyName,\ncreate the new id for the propertyName.\n@return < 0 if there is no such property and create=false, else id of the property",
"Converts from a Fluo RowColumn to a Accumulo Key\n\n@param rc RowColumn\n@return Key",
"Sets the initial MoificationState of the wrapped object myObj. The initial state will be StateNewDirty if myObj\nis not persisten already. The state will be set to StateOldClean if the object is already persistent."
] |
private SubProject readSubProject(byte[] data, int uniqueIDOffset, int filePathOffset, int fileNameOffset, int subprojectIndex)
{
try
{
SubProject sp = new SubProject();
int type = SUBPROJECT_TASKUNIQUEID0;
if (uniqueIDOffset != -1)
{
int value = MPPUtility.getInt(data, uniqueIDOffset);
type = MPPUtility.getInt(data, uniqueIDOffset + 4);
switch (type)
{
case SUBPROJECT_TASKUNIQUEID0:
case SUBPROJECT_TASKUNIQUEID1:
case SUBPROJECT_TASKUNIQUEID2:
case SUBPROJECT_TASKUNIQUEID3:
case SUBPROJECT_TASKUNIQUEID4:
case SUBPROJECT_TASKUNIQUEID5:
case SUBPROJECT_TASKUNIQUEID6:
{
sp.setTaskUniqueID(Integer.valueOf(value));
m_taskSubProjects.put(sp.getTaskUniqueID(), sp);
break;
}
default:
{
if (value != 0)
{
sp.addExternalTaskUniqueID(Integer.valueOf(value));
m_taskSubProjects.put(Integer.valueOf(value), sp);
}
break;
}
}
// Now get the unique id offset for this subproject
value = 0x00800000 + ((subprojectIndex - 1) * 0x00400000);
sp.setUniqueIDOffset(Integer.valueOf(value));
}
if (type == SUBPROJECT_TASKUNIQUEID4)
{
sp.setFullPath(MPPUtility.getUnicodeString(data, filePathOffset));
}
else
{
//
// First block header
//
filePathOffset += 18;
//
// String size as a 4 byte int
//
filePathOffset += 4;
//
// Full DOS path
//
sp.setDosFullPath(MPPUtility.getString(data, filePathOffset));
filePathOffset += (sp.getDosFullPath().length() + 1);
//
// 24 byte block
//
filePathOffset += 24;
//
// 4 byte block size
//
int size = MPPUtility.getInt(data, filePathOffset);
filePathOffset += 4;
if (size == 0)
{
sp.setFullPath(sp.getDosFullPath());
}
else
{
//
// 4 byte unicode string size in bytes
//
size = MPPUtility.getInt(data, filePathOffset);
filePathOffset += 4;
//
// 2 byte data
//
filePathOffset += 2;
//
// Unicode string
//
sp.setFullPath(MPPUtility.getUnicodeString(data, filePathOffset, size));
//filePathOffset += size;
}
//
// Second block header
//
fileNameOffset += 18;
//
// String size as a 4 byte int
//
fileNameOffset += 4;
//
// DOS file name
//
sp.setDosFileName(MPPUtility.getString(data, fileNameOffset));
fileNameOffset += (sp.getDosFileName().length() + 1);
//
// 24 byte block
//
fileNameOffset += 24;
//
// 4 byte block size
//
size = MPPUtility.getInt(data, fileNameOffset);
fileNameOffset += 4;
if (size == 0)
{
sp.setFileName(sp.getDosFileName());
}
else
{
//
// 4 byte unicode string size in bytes
//
size = MPPUtility.getInt(data, fileNameOffset);
fileNameOffset += 4;
//
// 2 byte data
//
fileNameOffset += 2;
//
// Unicode string
//
sp.setFileName(MPPUtility.getUnicodeString(data, fileNameOffset, size));
//fileNameOffset += size;
}
}
//System.out.println(sp.toString());
// Add to the list of subprojects
m_file.getSubProjects().add(sp);
return (sp);
}
//
// Admit defeat at this point - we have probably stumbled
// upon a data format we don't understand, so we'll fail
// gracefully here. This will now be reported as a missing
// sub project error by end users of the library, rather
// than as an exception being thrown.
//
catch (ArrayIndexOutOfBoundsException ex)
{
return (null);
}
} | [
"Method used to read the sub project details from a byte array.\n\n@param data byte array\n@param uniqueIDOffset offset of unique ID\n@param filePathOffset offset of file path\n@param fileNameOffset offset of file name\n@param subprojectIndex index of the subproject, used to calculate unique id offset\n@return new SubProject instance"
] | [
"Extract a list of exception assignments.\n\n@param exceptionData string representation of exception assignments\n@return list of exception assignment rows",
"Save page to log\n\n@return address of this page after save",
"Write a long attribute.\n\n@param name attribute name\n@param value attribute value",
"read message from file\n\n@param readOffset offset in this channel(file);not the message offset\n@param size max data size\n@return messages sharding data with file log\n@throws IOException reading file failed",
"Read all resource assignments from a GanttProject project.\n\n@param gpProject GanttProject project",
"Returns a File object whose path is the expected user directory.\nDoes not create or check for existence.\n@param prefix\n@param suffix\n@param parent\n@return",
"The main method, which is essentially the same as in CRFClassifier. See the class documentation.",
"Possibly coalesces the newest change event to match the user's original intent. For example,\nan unsynchronized insert and update is still an insert.\n\n@param lastUncommittedChangeEvent the last change event known about for a document.\n@param newestChangeEvent the newest change event known about for a document.\n@return the possibly coalesced change event.",
"We have received an update that invalidates any previous metadata for that player, so clear it out, and alert\nany listeners if this represents a change. This does not affect the hot cues; they will stick around until the\nplayer loads a new track that overwrites one or more of them.\n\n@param update the update which means we can have no metadata for the associated player"
] |
private void rotatorPushRight( int m )
{
double b11 = off[m];
double b21 = diag[m+1];
computeRotator(b21,-b11);
// apply rotator on the right
off[m] = 0;
diag[m+1] = b21*c-b11*s;
if( m+2 < N) {
double b22 = off[m+1];
off[m+1] = b22*c;
bulge = b22*s;
} else {
bulge = 0;
}
// SimpleMatrix Q = createQ(m,m+1, c, s, true);
// B=Q.mult(B);
//
// B.print();
// printMatrix();
// System.out.println(" bulge = "+bulge);
// System.out.println();
if( Ut != null ) {
updateRotator(Ut,m,m+1,c,s);
// SimpleMatrix.wrap(Ut).mult(B).mult(SimpleMatrix.wrap(Vt).transpose()).print();
// printMatrix();
// System.out.println("bulge = "+bulge);
// System.out.println();
}
} | [
"Start pushing the element off to the right."
] | [
"Executes the supplied cell processors on the last row of CSV that was read and populates the supplied List of\nprocessed columns.\n\n@param processedColumns\nthe List to populate with processed columns\n@param processors\nthe cell processors\n@return the updated List\n@throws NullPointerException\nif processedColumns or processors is null\n@throws SuperCsvConstraintViolationException\nif a CellProcessor constraint failed\n@throws SuperCsvException\nif the wrong number of processors are supplied, or CellProcessor execution failed",
"Return input mapper from processor.",
"returns a new segment masked by the given mask\n\nThis method applies the mask first to every address in the range, and it does not preserve any existing prefix.\nThe given prefix will be applied to the range of addresses after the mask.\nIf the combination of the two does not result in a contiguous range, then {@link IncompatibleAddressException} is thrown.",
"Process start.\n\n@param endpoint the endpoint\n@param eventType the event type",
"Retrieve the number of minutes per month for this calendar.\n\n@return minutes per month",
"Checks that all the qualifiers in the set requiredQualifiers are in the set of qualifiers. Qualifier equality rules for\nannotation members are followed.\n\n@param requiredQualifiers The required qualifiers\n@param qualifiers The set of qualifiers to check\n@return True if all matches, false otherwise",
"Adds a new gender item and an initial name.\n\n@param entityIdValue\nthe item representing the gender\n@param name\nthe label to use for representing the gender",
"Load all string recognize.",
"Adds a new row after the given one.\n\n@param row the row after which a new one should be added"
] |
public void process() {
// are we ready to process yet, or have we had an error, and are
// waiting a bit longer in the hope that it will resolve itself?
if (error_skips > 0) {
error_skips--;
return;
}
try {
if (logger != null)
logger.debug("Starting processing");
status = "Processing";
lastCheck = System.currentTimeMillis();
// FIXME: how to break off processing if we don't want to keep going?
processor.deduplicate(batch_size);
status = "Sleeping";
if (logger != null)
logger.debug("Finished processing");
} catch (Throwable e) {
status = "Thread blocked on error: " + e;
if (logger != null)
logger.error("Error in processing; waiting", e);
error_skips = error_factor;
}
} | [
"Runs the record linkage process."
] | [
"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.",
"Converts the http entity to string. If entity is null, returns empty string.\n@param entity\n@return\n@throws IOException",
"Uniformly random numbers",
"set ViewPager scroller to change animation duration when sliding",
"loading Properties from files\n\n@param filename file path\n@return properties\n@throws RuntimeException while file not exist or loading fail",
"This method is used to calculate the duration of work between two fixed\ndates according to the work schedule defined in the named calendar.\nThe name of the calendar to be used is passed as an argument.\n\n@param calendarName name of the calendar to use\n@param startDate start of the period\n@param endDate end of the period\n@return new Duration object\n@throws MPXJException normally when no Standard calendar is available\n@deprecated use calendar.getDuration(startDate, endDate)",
"Handles Multi Channel Encapsulation message. Decapsulates\nan Application Command message and handles it using the right\nendpoint.\n@param serialMessage the serial message to process.\n@param offset the offset at which to start procesing.",
"Given the current cluster and a zone id that needs to be dropped, this\nmethod will remove all partitions from the zone that is being dropped and\nmove it to the existing zones. The partitions are moved intelligently so\nas not to avoid any data movement in the existing zones.\n\nThis is achieved by moving the partitions to nodes in the surviving zones\nthat is zone-nry to that partition in the surviving zone.\n\n@param currentCluster Current cluster metadata\n@return Returns an interim cluster with empty partition lists on the\nnodes from the zone being dropped",
"Write the management protocol header.\n\n@param header the mgmt protocol header\n@param os the output stream\n@throws IOException"
] |
private static boolean waitTillNoNotifications(Environment env, TableRange range)
throws TableNotFoundException {
boolean sawNotifications = false;
long retryTime = MIN_SLEEP_MS;
log.debug("Scanning tablet {} for notifications", range);
long start = System.currentTimeMillis();
while (hasNotifications(env, range)) {
sawNotifications = true;
long sleepTime = Math.max(System.currentTimeMillis() - start, retryTime);
log.debug("Tablet {} had notfications, will rescan in {}ms", range, sleepTime);
UtilWaitThread.sleep(sleepTime);
retryTime = Math.min(MAX_SLEEP_MS, (long) (retryTime * 1.5));
start = System.currentTimeMillis();
}
return sawNotifications;
} | [
"Wait until a range has no notifications.\n\n@return true if notifications were ever seen while waiting"
] | [
"Get an exception reporting an unexpected end tag for an XML element.\n@param reader the stream reader\n@return the exception",
"performs a primary key lookup operation against RDBMS and materializes\nan object from the resulting row. Only skalar attributes are filled from\nthe row, references are not resolved.\n@param oid contains the primary key info.\n@param cld ClassDescriptor providing mapping information.\n@return the materialized object, null if no matching row was found or if\nany error occured.",
"Returns the property value read from the given JavaBean.\n\n@param bean the JavaBean to read the property from\n@param property the property to read\n\n@return the property value read from the given JavaBean",
"Deletes the metadata on this folder associated with a specified template.\n\n@param templateName the metadata template type name.",
"Compute \"sent\" date\n\n@param msg Message to take sent date from. May be null to use default\n@param defaultVal Default if sent date is not present\n@return Sent date or now if no date could be found",
"Remove a server mapping from current profile by ID\n\n@param serverMappingId server mapping ID\n@return Collection of updated ServerRedirects",
"resolves any lazy cross references in this resource, adding Issues for unresolvable elements to this resource.\nThis resource might still contain resolvable proxies after this method has been called.\n\n@param mon a {@link CancelIndicator} can be used to stop the resolution.",
"Returns a string to resolve apostrophe issue in xpath\n\n@param text\n@return the apostrophe resolved xpath value string",
"Get the contents from the request URL.\n\n@param url URL to get the response from\n@param layer the raster layer\n@return {@link InputStream} with the content\n@throws IOException cannot get content"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.