query stringlengths 74 6.1k | positive listlengths 1 1 | negative listlengths 9 9 |
|---|---|---|
public InputStream getAvatar() {
URL url = USER_AVATAR_TEMPLATE.build(this.getAPI().getBaseURL(), this.getID());
BoxAPIRequest request = new BoxAPIRequest(this.getAPI(), url, "GET");
BoxAPIResponse response = request.send();
return response.getBody();
} | [
"Retrieves the avatar of a user as an InputStream.\n\n@return InputStream representing the user avater."
] | [
"Used to create a new retention policy.\n@param api the API connection to be used by the created user.\n@param name the name of the retention policy.\n@param type the type of the retention policy. Can be \"finite\" or \"indefinite\".\n@param length the duration in days that the retention policy will be active for a... |
private EndpointOverride getEndpointOverrideFromResultSet(ResultSet results) throws Exception {
EndpointOverride endpoint = new EndpointOverride();
endpoint.setPathId(results.getInt(Constants.GENERIC_ID));
endpoint.setPath(results.getString(Constants.PATH_PROFILE_ACTUAL_PATH));
endpoint.... | [
"Turn a resultset into EndpointOverride\n\n@param results results containing relevant information\n@return EndpointOverride\n@throws Exception exception"
] | [
"Add a shutdown listener, which gets called when all requests completed on shutdown.\n\n@param listener the shutdown listener",
"Resets the generator state.",
"Check from another ConcurrentGroupServerUpdatePolicy whose plans are meant to\nexecute once this policy's plans are successfully completed.\n\n@retur... |
public static <T> T assertNotNull(T value, String name) {
if (value == null)
throw new IllegalArgumentException("Null " + name);
return value;
} | [
"Throws an IllegalArgumentException when the given value is null.\n@param value the value to assert if not null\n@param name the name of the argument\n@param <T> The generic type of the value to assert if not null\n@return the value"
] | [
"Sanity checks the input or declares a new matrix. Return matrix is an identity matrix.",
"Use this API to add inat.",
"Copy the contents of the given byte array to the given OutputStream.\nLeaves the stream open when done.\n@param in the byte array to copy from\n@param out the OutputStream to copy to\n@throws... |
private String filterAttributes(String html) {
String filteredHtml = html;
for (String attribute : this.filterAttributes) {
String regex = "\\s" + attribute + "=\"[^\"]*\"";
Pattern p = Pattern.compile(regex, Pattern.CASE_INSENSITIVE);
Matcher m = p.matcher(html);
filteredHtml = m.replaceAll("");
}
... | [
"Filters attributes from the HTML string.\n\n@param html The HTML to filter.\n@return The filtered HTML string."
] | [
"Creates the save and exit button UI Component.\n@return the save and exit button.",
"Method to initialize the list.\n\n@param resList a given instance or null\n@return an instance",
"Handle a completed request producing an optional response",
"generate a message for loglevel ERROR\n\n@param pObject the messa... |
void checkRmModelConformance() {
final AmVisitor<AmObject, AmConstraintContext> visitor = AmVisitors.preorder(new ConformanceVisitor());
ArchetypeWalker.walkConstraints(visitor, archetype, new AmConstraintContext());
} | [
"Check if information model entity referenced by archetype\nhas right name or type"
] | [
"Creates a non-binary media type with the given type, subtype, and charSet\n@throws com.tngtech.jgiven.exception.JGivenWrongUsageException if any of the given arguments is {@code null}",
"This produces a canonical string.\n\nRFC 5952 describes canonical representations.\nhttp://en.wikipedia.org/wiki/IPv6_address#... |
private void writeDayTypes(Calendars calendars)
{
DayTypes dayTypes = m_factory.createDayTypes();
calendars.setDayTypes(dayTypes);
List<DayType> typeList = dayTypes.getDayType();
DayType dayType = m_factory.createDayType();
typeList.add(dayType);
dayType.setId("0");
dayType... | [
"Write the standard set of day types.\n\n@param calendars parent collection of calendars"
] | [
"Schedule at most one task.\n\nThe scheduled task *must* invoke 'doneTask()' upon\ncompletion/termination.\n\n@param executeService flag to control execution of the service, some tests pass\nin value 'false'\n@return The task scheduled or null if not possible to schedule a task at\nthis time.",
"Check local saved... |
public void createInsertionSql(Database model, Platform platform, Writer writer) throws IOException
{
for (Iterator it = _beans.iterator(); it.hasNext();)
{
writer.write(platform.getInsertSql(model, (DynaBean)it.next()));
if (it.hasNext())
{
... | [
"Generates and writes the sql for inserting the currently contained data objects.\n\n@param model The database model\n@param platform The platform\n@param writer The output stream"
] | [
"Non-blocking call that will throw any Exceptions in the traditional\nmanner on access\n\n@param key\n@param value\n@return",
"Given a list of store definitions, makes sure that rebalance supports all\nof them. If not it throws an error.\n\n@param storeDefList List of store definitions\n@return Filtered list of s... |
public Date getNextWorkStart(Date date)
{
Calendar cal = Calendar.getInstance();
cal.setTime(date);
updateToNextWorkStart(cal);
return cal.getTime();
} | [
"Utility method to retrieve the next working date start time, given\na date and time as a starting point.\n\n@param date date and time start point\n@return date and time of next work start"
] | [
"Computes either the vector p-norm or the induced matrix p-norm depending on A\nbeing a vector or a matrix respectively.\n\n@param A Vector or matrix whose norm is to be computed.\n@param p The p value of the p-norm.\n@return The computed norm.",
"Adds a data source to the configuration. If in deduplication mode\... |
private void setRequestLanguages(WbGetEntitiesActionData properties) {
if (this.filter.excludeAllLanguages()
|| this.filter.getLanguageFilter() == null) {
return;
}
properties.languages = ApiConnection.implodeObjects(this.filter
.getLanguageFilter());
} | [
"Sets the value for the API's \"languages\" parameter based on the current\nsettings.\n\n@param properties\ncurrent setting of parameters"
] | [
"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.",
"User-initiated commands use this method.\n\n@param command The... |
public static void reset() {
for (Object name : Collections.list(MAP_KEY_TO_SCOPE.keys())) {
closeScope(name);
}
ConfigurationHolder.configuration.onScopeForestReset();
ScopeImpl.resetUnBoundProviders();
} | [
"Clears all scopes. Useful for testing and not getting any leak..."
] | [
"Delete the proxy history for the active profile\n\n@throws Exception exception",
"Add contents to the deployment and attach a \"transformed\" slave operation to the operation context.\n\n@param context the operation context\n@param operation the original operation\n@param contentRepository the content repository... |
private long size(final Jedis jedis, final String queueName) {
final String key = key(QUEUE, queueName);
final long size;
if (JedisUtils.isDelayedQueue(jedis, key)) { // If delayed queue, use ZCARD
size = jedis.zcard(key);
} else { // Else, use LLEN
size = jedis.l... | [
"Size of a queue.\n\n@param jedis\n@param queueName\n@return"
] | [
"Write the document object to a file.\n\n@param document the document object.\n@param filePathname the path name of the file to be written to.\n@param method the output method: for instance html, xml, text\n@param indent amount of indentation. -1 to use the default.\n@throws TransformerException if ... |
private void remove() {
if (removing) {
return;
}
if (deactiveNotifications.size() == 0) {
return;
}
removing = true;
final NotificationPopupView view = deactiveNotifications.get(0);
final LinearFadeOutAnimation fadeOutAnimation = new Linea... | [
"Remove a notification message. Recursive until all pending removals have been completed."
] | [
"Translate the each ByteArray in an iterable into a hexadecimal string\n\n@param arrays The array of bytes to translate\n@return An iterable of converted strings",
"Get the auth URL, this is step two of authorization.\n\n@param oAuthRequestToken\nthe token from a {@link AuthInterface#getRequestToken} call.",
"U... |
protected void setProperty(String propertyName, JavascriptObject propertyValue) {
jsObject.setMember(propertyName, propertyValue.getJSObject());
} | [
"Sets a property on this Javascript object for which the value is a\nJavascript object itself.\n\n@param propertyName The name of the property.\n@param propertyValue The value of the property."
] | [
"Ask the specified player for metadata about the track in the specified slot with the specified rekordbox ID,\nusing cached media instead if it is available, and possibly giving up if we are in passive mode.\n\n@param track uniquely identifies the track whose metadata is desired\n@param trackType identifies the typ... |
final void dispatchToAppender(final LoggingEvent customLoggingEvent) {
// wrap the LoggingEvent in a FileRollEvent to prevent recursion bug
final FoundationFileRollingAppender appender = this.getSource();
if (appender != null) {
appender.append(new FileRollEvent(customLoggingEvent, this));
}
} | [
"Convenience method dispatches the specified event to the source appender,\nwhich will result in the custom event data being appended to the new file.\n\n@param customLoggingEvent\nThe custom Log4J event to be appended."
] | [
"Use this API to disable nsacl6.",
"Finds out which dump files of the given type have been downloaded\nalready. The result is a list of objects that describe the available dump\nfiles, in descending order by their date. Not all of the dumps included\nmight be actually available.\n\n@param dumpContentType\nthe typ... |
public static snmpuser[] get(nitro_service service, options option) throws Exception{
snmpuser obj = new snmpuser();
snmpuser[] response = (snmpuser[])obj.get_resources(service,option);
return response;
} | [
"Use this API to fetch all the snmpuser resources that are configured on netscaler."
] | [
"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.",
"Calculates the beginLine of a violation report.\n\n@param pmdViolation The violation for which the beginLine should be calculated.\n@r... |
public FluoKeyValue[] getKeyValues() {
FluoKeyValue kv = keyVals[0];
kv.setKey(new Key(row, fam, qual, vis, ColumnType.WRITE.encode(1)));
kv.getValue().set(WriteValue.encode(0, false, false));
kv = keyVals[1];
kv.setKey(new Key(row, fam, qual, vis, ColumnType.DATA.encode(0)));
kv.getValue().set... | [
"Translates the Fluo row, column, and value set into the persistent format that is stored in\nAccumulo.\n\n<p>\nThe objects returned by this method are reused each time its called. So each time this is\ncalled it invalidates what was returned by previous calls to this method.\n\n@return A an array of Accumulo key v... | [
"Creates a new Box Developer Edition connection with App User token.\n@param userId the user ID to use for an App User.\n@param clientId the client ID to use when exchanging the JWT assertion for an access token.\n@param clientSecret the client secret to use when exchanging the ... |
private int cleanupSegmentsToMaintainSize(final Log log) throws IOException {
if (logRetentionSize < 0 || log.size() < logRetentionSize) return 0;
List<LogSegment> toBeDeleted = log.markDeletedWhile(new LogSegmentFilter() {
long diff = log.size() - logRetentionSize;
public boo... | [
"Runs through the log removing segments until the size of the log is at least\nlogRetentionSize bytes in size\n\n@throws IOException"
] | [
"Convert a Identification to a By used in WebDriver Drivers.\n\n@return the correct By specification of the current Identification.",
"Parses a code block with no parentheses and no commas. After it is done there should be a single token left,\nwhich is returned.",
"End building the script\n@param config the c... |
private void countGender(EntityIdValue gender, SiteRecord siteRecord) {
Integer curValue = siteRecord.genderCounts.get(gender);
if (curValue == null) {
siteRecord.genderCounts.put(gender, 1);
} else {
siteRecord.genderCounts.put(gender, curValue + 1);
}
} | [
"Counts a single page of the specified gender. If this is the first page\nof that gender on this site, a suitable key is added to the list of the\nsite's genders.\n\n@param gender\nthe gender to count\n@param siteRecord\nthe site record to count it for"
] | [
"Attempts to detect the provided pattern as an exact match.\n@param pattern the pattern to find in the reader stream\n@return the number of times the pattern is found,\nor an error code\n@throws MalformedPatternException if the pattern is invalid\n@throws Exception if a generic error is encountered",
"Map content... |
@SuppressWarnings("WeakerAccess")
public ByteBuffer getRawData() {
if (rawData != null) {
rawData.rewind();
return rawData.slice();
}
return null;
} | [
"Get the raw bytes of the beat grid as it was read over the network. This can be used to analyze fields\nthat have not yet been reliably understood, and is also used for storing the beat grid in a cache file.\nThis is not available when the beat grid was loaded by Crate Digger.\n\n@return the bytes that make up the... | [
"Retrieves a specific range of items in this collection.\n@param offset the index of the first item to retrieve.\n@param limit the maximum number of items to retrieve after the offset.\n@param fields the fields to retrieve.\n@return a partial collection containing the specified range of items.",
... |
public static int daysDiff(Date earlierDate, Date laterDate) {
if (earlierDate == null || laterDate == null) {
return 0;
}
return (int) ((laterDate.getTime() / DAY_MILLIS) - (earlierDate.getTime() / DAY_MILLIS));
} | [
"Get the days difference"
] | [
"Read the domain controller's data from an input stream.\n\n@param instream the input stream\n@throws Exception",
"Sets the value for the API's \"sitefilter\" parameter based on the current\nsettings.\n\n@param properties\ncurrent setting of parameters",
"Method for reporting SQLException. This is used by\nthe ... |
private String swapStore(String storeName, String directory) throws VoldemortException {
ReadOnlyStorageEngine store = getReadOnlyStorageEngine(metadataStore,
storeRepository,
storeName... | [
"Given a read-only store name and a directory, swaps it in while returning\nthe directory path being swapped out\n\n@param storeName The name of the read-only store\n@param directory The directory being swapped in\n@return The directory path which was swapped out\n@throws VoldemortException"
] | [
"Add a management request handler factory to this context.\n\n@param factory the request handler to add",
"Abort an active extern transaction associated with the given PB.",
"Creates, writes and loads a new keystore and CA root certificate.",
"Set the model used by the right table.\n\n@param model table model... |
public <Result, Param extends Resource> Result execWithoutCacheClear(Param resource, IUnitOfWork<Result, Param> transaction) throws WrappedException {
CacheAdapter cacheAdapter = getOrCreate(resource);
try {
cacheAdapter.ignoreNotifications();
return transaction.exec(resource);
} catch (RuntimeException e) ... | [
"The transaction will be executed. While it is running, any semantic state change\nin the given resource will be ignored and the cache will not be cleared."
] | [
"Appends the GROUP BY clause for the Query\n@param groupByFields\n@param buf",
"Check the version to assure it is allowed.\n\n@param pluginName plugin name which needs the dependency\n@param dependency dependency which needs to be verified\n@param requestedVersion requested/minimum version\n@param availableVersio... |
public void sendData(SerialMessage serialMessage)
{
if (serialMessage.getMessageClass() != SerialMessage.SerialMessageClass.SendData) {
logger.error(String.format("Invalid message class %s (0x%02X) for sendData", serialMessage.getMessageClass().getLabel(), serialMessage.getMessageClass().getKey()));
r... | [
"Transmits the SerialMessage to a single Z-Wave Node.\nSets the transmission options as well.\n@param serialMessage the Serial message to send."
] | [
"Rotate root widget to make it facing to the front of the scene",
"Removes a design document using the id and rev from the database.\n\n@param id the document id (optionally prefixed with \"_design/\")\n@param rev the document revision\n@return {@link DesignDocument}",
"Array of fieldNames for which counts sho... |
public static double[] computeSeasonalAdjustments(double[] realizedCPIValues, int lastMonth, int numberOfYearsToAverage) {
/*
* Cacluate average log returns
*/
double[] averageLogReturn = new double[12];
Arrays.fill(averageLogReturn, 0.0);
for(int arrayIndex = 0; arrayIndex < 12*numberOfYearsToAverage; a... | [
"Computes annualized seasonal adjustments from given monthly realized CPI values.\n\n@param realizedCPIValues An array of consecutive monthly CPI values (minimum size is 12*numberOfYearsToAverage))\n@param lastMonth The index of the last month in the sequence of realizedCPIValues (corresponding to the enums in <cod... | [
"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... |
private void reInitLayoutElements() {
m_panel.clear();
for (CmsCheckBox cb : m_checkBoxes) {
m_panel.add(setStyle(m_onlyLabels ? new Label(cb.getText()) : cb));
}
} | [
"Refresh the layout element."
] | [
"Print a constraint type.\n\n@param value ConstraintType instance\n@return constraint type value",
"Get layer style by name.\n\n@param name layer style name\n@return layer style",
"Adds a new cell to the current grid\n@param cell the td component",
"set the textColor of the ColorHolder to an drawable\n\n@para... |
public Object getColumnValue(String columnName) {
for ( int j = 0; j < columnNames.length; j++ ) {
if ( columnNames[j].equals( columnName ) ) {
return columnValues[j];
}
}
return null;
} | [
"Get the value of the specified column.\n\n@param columnName the name of the column\n@return the corresponding value of the column, {@code null} if the column does not exist in the row key"
] | [
"Use this API to fetch appfwprofile_cookieconsistency_binding resources of given name .",
"Returns the docker version.\n\n@param serverUrl\nThe serverUrl to use.",
"Sets the publish queue shutdown time.\n\n@param publishQueueShutdowntime the shutdown time to set, parsed as <code>int</code>",
"Cancel on target... |
public void registerDestructionCallback(String name, Runnable callback) {
Bean bean = beans.get(name);
if (null == bean) {
bean = new Bean();
beans.put(name, bean);
}
bean.destructionCallback = callback;
} | [
"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."
] | [
"Returns a single sort option configuration as configured via the methods parameter, or null if the parameter does not specify a sort option.\n@param json The JSON sort option configuration.\n@return The sort option configuration, or null if the JSON could not be read.",
"defines the KEY in the parent report para... |
@Override
public void process(Step step) {
step.setName(getName());
step.setStatus(Status.PASSED);
step.setStart(System.currentTimeMillis());
step.setTitle(getTitle());
} | [
"Sets name, status, start time and title to specified step\n\n@param step which will be changed"
] | [
"Gets the date time str standard.\n\n@param d\nthe d\n@return the date time str standard",
"Runs the example program.\n\n@param args\n@throws IOException\nif there was a problem in writing the output file",
"B = -A. Changes the sign of elements in A and stores it in B. A and B can be the same instance.\n\n@pa... |
public static base_responses update(nitro_service client, dospolicy resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
dospolicy updateresources[] = new dospolicy[resources.length];
for (int i=0;i<resources.length;i++){
updateresources[i] = new d... | [
"Use this API to update dospolicy resources."
] | [
"Redirect standard streams so that the output can be passed to listeners.",
"Writes a WBS entity to the PM XML file.\n\n@param mpxj MPXJ Task entity",
"Use this API to fetch dnsnsecrec resources of given names .",
"Returns the value stored for the given key at the point of call.\n@param key a non null key\n@r... |
public double getValueWithGivenYield(double evaluationTime, double rate, AnalyticModel model) {
DiscountCurve referenceCurve = DiscountCurveInterpolation.createDiscountCurveFromDiscountFactors("referenceCurve", new double[] {0.0, 1.0}, new double[] {1.0, 1.0});
return getValueWithGivenSpreadOverCurve(evaluationTim... | [
"Returns the value of the sum of discounted cash flows of the bond where\nthe discounting is done with the given yield curve.\nThis method can be used for optimizer.\n\n@param evaluationTime The evaluation time as double. Cash flows prior and including this time are not considered.\n@param rate The yield which is u... | [
"Handles incoming Application Command Request.\n@param incomingMessage the request message to process.",
"Use this API to fetch lbvserver_auditnslogpolicy_binding resources of given name .",
"Remove an addon from an app.\n@param appName App name. See {@link #listApps} for a list of apps that can be used.\n@para... |
@Override
public ClosableIterator<Tuple> callStoredProcedure(String storedProcedureName, ProcedureQueryParameters params, TupleContext tupleContext) {
validate( params );
StringBuilder commandLine = createCallStoreProcedureCommand( storedProcedureName, params );
Document result = callStoredProcedure( commandLine... | [
"In MongoDB the equivalent of a stored procedure is a stored Javascript.\n\n@param storedProcedureName name of stored procedure\n@param params query parameters\n@param tupleContext the tuple context\n\n@return the result as a {@link ClosableIterator}"
] | [
"Start the timer.",
"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",
"Use this API to fetch vpntraffi... |
public static base_response update(nitro_service client, onlinkipv6prefix resource) throws Exception {
onlinkipv6prefix updateresource = new onlinkipv6prefix();
updateresource.ipv6prefix = resource.ipv6prefix;
updateresource.onlinkprefix = resource.onlinkprefix;
updateresource.autonomusprefix = resource.autonom... | [
"Use this API to update onlinkipv6prefix."
] | [
"Converts a tab delimited string into an object with given fields\nRequires the object has setXxx functions for the specified fields\n\n@param objClass Class of object to be created\n@param str string to convert\n@param delimiterRegex delimiter regular expression\n@param fieldNames fieldnames\n@param <T> type to re... |
public static SVGGraphics2D createSvgGraphics(final Dimension size)
throws ParserConfigurationException {
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
DocumentBuilder db = dbf.newDocumentBuilder();
Document document = db.getDOMImplementation().createDocument(nul... | [
"Create a SVG graphic with the give dimensions.\n\n@param size The size of the SVG graphic."
] | [
"Print a booking type.\n\n@param value BookingType instance\n@return booking type value",
"Determines whether the current object on the specified level has a specific property, and if so, processes the\ntemplate\n\n@param template The template\n@param attributes The attributes of the tag\n... |
private void addResources(MpxjTreeNode parentNode, ProjectFile file)
{
for (Resource resource : file.getResources())
{
final Resource r = resource;
MpxjTreeNode childNode = new MpxjTreeNode(resource)
{
@Override public String toString()
{
... | [
"Add resources to the tree.\n\n@param parentNode parent tree node\n@param file resource container"
] | [
"return a prepared DELETE Statement fitting for the given ClassDescriptor",
"1-D Forward Discrete Hartley Transform.\n\n@param data Data.",
"Tests if this partition has hit a threshold and signal to the pool watch thread to create new connections\n@param connectionPartition to test for.",
"Given an AVRO seria... |
@Override
public final float getFloat(final String key) {
Float result = optFloat(key);
if (result == null) {
throw new ObjectMissingException(this, key);
}
return result;
} | [
"Get a property as a float or throw an exception.\n\n@param key the property name"
] | [
"Checks if the InputStream have the text\n\n@param in InputStream to read\n@param text Text to check\n@return whether the inputstream has the text",
"Use this API to fetch wisite_accessmethod_binding resources of given name .",
"Process normal calendar working and non-working days.\n\n@param calendar parent cal... |
synchronized boolean reload(int permit, boolean suspend) {
return internalSetState(new ReloadTask(permit, suspend), InternalState.SERVER_STARTED, InternalState.RELOADING);
} | [
"Reload a managed server.\n\n@param permit the controller permit\n@return whether the state was changed successfully or not"
] | [
"This is a convenience method which allows all projects in an\nXER file to be read in a single pass.\n\n@param is input stream\n@param linkCrossProjectRelations add Relation links that cross ProjectFile boundaries\n@return list of ProjectFile instances\n@throws MPXJException",
"Returns an array specifing the inde... |
public double get( int index ) {
MatrixType type = mat.getType();
if( type.isReal()) {
if (type.getBits() == 64) {
return ((DMatrixRMaj) mat).data[index];
} else {
return ((FMatrixRMaj) mat).data[index];
}
} else {
... | [
"Returns the value of the matrix at the specified index of the 1D row major array.\n\n@see DMatrixRMaj#get(int)\n\n@param index The element's index whose value is to be returned\n@return The value of the specified element."
] | [
"Registers an event handler in the repository shared between Javascript\nand Java.\n\n@param h Event handler to be registered.\n@return Callback key that Javascript will use to find this handler.",
"A specific, existing tag can be deleted by making a DELETE request\non the URL for that tag.\n\nReturns an empty da... |
public int rank() {
if( is64 ) {
return SingularOps_DDRM.rank((SingularValueDecomposition_F64)svd, tol);
} else {
return SingularOps_FDRM.rank((SingularValueDecomposition_F32)svd, (float)tol);
}
} | [
"Returns the rank of the decomposed matrix.\n\n@see SingularOps_DDRM#rank(SingularValueDecomposition_F64, double)\n\n@return The matrix's rank"
] | [
"Returns the root path for this source file, based upon the package name.\n\nFor example, if path is \"/project/src/main/java/org/example/Foo.java\" and the package is \"org.example\", then this\nshould return \"/project/src/main/java\".\n\nReturns null if the folder structure does not match the package name.",
"... |
public void disableAll(int profileId, String client_uuid) {
PreparedStatement statement = null;
try (Connection sqlConnection = sqlService.getConnection()) {
statement = sqlConnection.prepareStatement(
"DELETE FROM " + Constants.DB_TABLE_ENABLED_OVERRIDE +
... | [
"Delete all enabled overrides for a client\n\n@param profileId profile ID of teh client\n@param client_uuid UUID of teh client"
] | [
"Retrieve configuration details for a given custom field.\n\n@param field required custom field\n@return configuration detail",
"Read hints from a file.",
"Gets the bytes for the highest address in the range represented by this address.\n\n@return",
"Adds a new row after the given one.\n\n@param row the row a... |
public static vridparam get(nitro_service service) throws Exception{
vridparam obj = new vridparam();
vridparam[] response = (vridparam[])obj.get_resources(service);
return response[0];
} | [
"Use this API to fetch all the vridparam resources that are configured on netscaler."
] | [
"Permanently deletes a trashed folder.\n@param folderID the ID of the trashed folder to permanently delete.",
"makes object obj persistent to the Objectcache under the key oid.",
"Confirms that both clusters have the same set of zones defined.\n\n@param lhs\n@param rhs",
"Restore the recorded state from the r... |
public static String compactDump(INode node, boolean showHidden) {
StringBuilder result = new StringBuilder();
try {
compactDump(node, showHidden, "", result);
} catch (IOException e) {
return e.getMessage();
}
return result.toString();
} | [
"Creates a string representation of the given node. Useful for debugging.\n\n@return a debug string for the given node."
] | [
"Utility function that creates directory.\n\n@param dir Directory path\n@return File object of directory.",
"Formats the supplied value using the specified DateTimeFormat.\n\n@return \"\" if the value is null",
"Convert from a DTO to an internal Spring bean definition.\n\n@param beanDefinitionDto The DTO object... |
void unbind(String key)
{
NamedEntry entry = new NamedEntry(key, null, false);
localUnbind(key);
addForDeletion(entry);
} | [
"Remove a named object"
] | [
"Assembles an avro format string of single store config from store\nproperties\n\n@param props Store properties\n@return String in avro format that contains single store configs",
"Handles DMR strings in the configuration\n\n@param node the node to create.\n@param name the name for the node.\n@param value the v... |
private void setDatesInternal(SortedSet<Date> dates) {
if (!m_dates.equals(dates)) {
m_dates = new TreeSet<>(dates);
fireValueChange();
}
} | [
"Updates the internal list of dates and fires a value change if necessary.\n\n@param dates the dates to set."
] | [
"Checks the status of one or more asynchronous photo upload tickets. This method does not require authentication.\n\n@param tickets\na set of ticket ids (Strings) or {@link Ticket} objects containing ids\n@return a list of {@link Ticket} objects.\n@throws FlickrException",
"Prints a debug log message that details... |
public List<BindingInfo> getQueueBindings(String vhost, String queue) {
final URI uri = uriWithPath("./queues/" + encodePathSegment(vhost) +
"/" + encodePathSegment(queue) + "/bindings");
final BindingInfo[] result = this.rt.getForObject(uri, BindingInfo[].class);
return asListOrNull(result);
} | [
"Returns a list of bindings where provided queue is the destination.\n\n@param vhost vhost of the exchange\n@param queue destination queue name\n@return list of bindings"
] | [
"Use this API to add dnspolicylabel.",
"Apply aliases to task and resource fields.\n\n@param aliases map of aliases",
"Convert raw data into Java types.\n\n@param type data type\n@param data raw data\n@return list of Java object",
"END ODO CHANGES",
"Return tabular data\n@param labels Labels array\n@param d... |
private void processCalendarData(List<ProjectCalendar> calendars) throws SQLException
{
for (ProjectCalendar calendar : calendars)
{
processCalendarData(calendar, getRows("SELECT * FROM MSP_CALENDAR_DATA WHERE PROJ_ID=? AND CAL_UID=?", m_projectID, calendar.getUniqueID()));
}
} | [
"Process calendar hours and exception data from the database.\n\n@param calendars all calendars for the project"
] | [
"Set the pattern scheme.\n@param isWeekDayBased flag, indicating if the week day based scheme should be set.",
"Loads the properties file using the classloader provided. Creating a string from the properties\n\"user.agent.name\" and \"user.agent.version\".\n@param loader The class loader to use to load the resour... |
private File[] getFilesFromProperty(final String name, final Properties props) {
String sep = WildFlySecurityManager.getPropertyPrivileged("path.separator", null);
String value = props.getProperty(name, null);
if (value != null) {
final String[] paths = value.split(Pattern.quote(sep)... | [
"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."
] | [
"Stop finding beat grids for all active players.",
"Log a free-form warning\n@param message the warning message. Cannot be {@code null}",
"Find the the qualfied container port of the target service\nUses java annotations first or returns the container port.\n\n@param service\nThe target service.\n@param qualifi... |
public static boolean isConstant(Expression expression, Object expected) {
return expression instanceof ConstantExpression && expected.equals(((ConstantExpression) expression).getValue());
} | [
"Tells you if an expression is the expected constant.\n@param expression\nany expression\n@param expected\nthe expected int or String\n@return\nas described"
] | [
"Removes file from your assembly.\n\n@param name field name of the file to remove.",
"Checks if a point is in the given rectangle.\n\n@param _Rect rectangle which is checked\n@param _X x-coordinate of the point\n@param _Y y-coordinate of the point\n@return True if the points intersects with the rectangle.",... |
protected void processResourceBaseline(Row row)
{
Integer id = row.getInteger("RES_UID");
Resource resource = m_project.getResourceByUniqueID(id);
if (resource != null)
{
int index = row.getInt("RB_BASE_NUM");
resource.setBaselineWork(index, row.getDuration("RB_BASE_WORK"))... | [
"Read resource baseline values.\n\n@param row result set row"
] | [
"Remove a bundle.\n\n@param moduleName the module name\n@param slot the module slot\n@param existingHash the existing hash\n@return the builder",
"Sets ID field value.\n\n@param val value",
"Make a copy of JobContext of current thread\n@return the copy of current job context or an empty job context",
"Return ... |
protected void updateFontTable()
{
PDResources resources = pdpage.getResources();
if (resources != null)
{
try
{
processFontResources(resources, fontTable);
} catch (IOException e) {
log.error("Error processing font resource... | [
"Updates the font table by adding new fonts used at the current page."
] | [
"Determine the enum value corresponding to the third play state found in the packet.\n\n@return the proper value",
"In managed environment do internal close the used connection",
"Update the object in the database.",
"Parses command-line and verifies metadata versions on all the cluster\nnodes\n\n@param args ... |
public static nsacl6_stats[] get(nitro_service service) throws Exception{
nsacl6_stats obj = new nsacl6_stats();
nsacl6_stats[] response = (nsacl6_stats[])obj.stat_resources(service);
return response;
} | [
"Use this API to fetch the statistics of all nsacl6_stats resources that are configured on netscaler."
] | [
"So we will follow rfc 1035 and in addition allow the underscore.",
"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",
"Helper method that searches an object ... |
public static void scale(GVRMesh mesh, float x, float y, float z) {
final float [] vertices = mesh.getVertices();
final int vsize = vertices.length;
for (int i = 0; i < vsize; i += 3) {
vertices[i] *= x;
vertices[i + 1] *= y;
vertices[i + 2] *= z;
... | [
"Scale the mesh at x, y and z axis.\n\n@param mesh Mesh to be scaled.\n@param x Scale to be applied on x-axis.\n@param y Scale to be applied on y-axis.\n@param z Scale to be applied on z-axis."
] | [
"Reconnect the context if the RedirectException is valid.",
"Calls the specified Stitch function, and decodes the response into an instance of the specified\ntype. The response will be decoded using the codec registry given.\n\n@param name the name of the Stitch function to call.\n@param args the arguments to pas... |
public void print() {
Iterator<String> iter = getKeys();
while (iter.hasNext()) {
String key = iter.next();
log.info(key + " = " + getRawString(key));
}
} | [
"Logs all properties"
] | [
"Creates a new Collaboration Whitelist for a domain.\n@param api the API connection to be used by the resource.\n@param domain the domain to be added to a collaboration whitelist for a Box Enterprise.\n@param direction an enum representing the direction of th... |
public static final String printExtendedAttributeDate(Date value)
{
return (value == null ? null : DATE_FORMAT.get().format(value));
} | [
"Print an extended attribute date value.\n\n@param value date value\n@return string representation"
] | [
"Use this API to fetch nslimitselector resource of given name .",
"Extracts the data for a single file from the input stream and writes\nit to a target directory.\n\n@param stream input stream\n@param dir target directory",
"Get the Operation metadata for an MBean by name.\n@return the {@link Map} of {@link Str... |
public void createProposals(final Collection<ContentAssistContext> contexts, final IIdeContentProposalAcceptor acceptor) {
Iterable<ContentAssistContext> _filteredContexts = this.getFilteredContexts(contexts);
for (final ContentAssistContext context : _filteredContexts) {
ImmutableList<AbstractElement> _f... | [
"Create content assist proposals and pass them to the given acceptor."
] | [
"Read a text stream into a single string.\n\n@param inputStream\nStream containing text. Will be closed on exit.\n@return The contents, or null on error.",
"Adds a submodule to the module.\n\n<P>\nINFO: If the module is promoted, all added submodule will be promoted.\n\n@param submodule Module",
"The derivative... |
public final static int readMdLink(final StringBuilder out, final String in, final int start)
{
int pos = start;
int counter = 1;
while (pos < in.length())
{
final char ch = in.charAt(pos);
if (ch == '\\' && pos + 1 < in.length())
{
... | [
"Reads a markdown link.\n\n@param out\nThe StringBuilder to write to.\n@param in\nInput String.\n@param start\nStarting position.\n@return The new position or -1 if this is no valid markdown link."
] | [
"Execute a redirected request\n\n@param stringStatusCode\n@param httpMethodProxyRequest\n@param httpServletRequest\n@param httpServletResponse\n@throws Exception",
"Use this API to Force clustersync.",
"Helper method for variance calculations.\n@return The sum of the squares of the differences between\neach val... |
public int executeTask(final TransactionalProtocolClient.TransactionalOperationListener<ServerOperation> listener, final ServerUpdateTask task) {
try {
return execute(listener, task.getServerIdentity(), task.getOperation());
} catch (OperationFailedException e) {
// Handle failur... | [
"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"
] | [
"Use this API to add dnssuffix.",
"Use this API to update bridgetable resources.",
"Convert given value to given target\n\n@param fromValue\nthe value to convert\n@param toType\ntarget target\n@param <T>\ntarget of the result\n@return the value converted to given target\n@throws TypeCastException\nif conversion... |
public static base_responses delete(nitro_service client, ntpserver resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
ntpserver deleteresources[] = new ntpserver[resources.length];
for (int i=0;i<resources.length;i++){
deleteresources[i] = new n... | [
"Use this API to delete ntpserver resources."
] | [
"Create content assist proposals and pass them to the given acceptor.",
"Access an attribute, hereby using the class name as key.\n\n@param type the type, not {@code null}\n@return the type attribute value, or {@code null}.",
"Replace default values will null, allowing them to be ignored.\n\n@param value value ... |
public static void registerMbean(Object mbean, ObjectName name) {
registerMbean(ManagementFactory.getPlatformMBeanServer(),
JmxUtils.createModelMBean(mbean),
name);
} | [
"Register the given mbean with the platform mbean server\n\n@param mbean The mbean to register\n@param name The name to register under"
] | [
"Return the version string of this instance of finmath-lib.\n\n@return The version string of this instance of finmath-lib.",
"Convert the continuous values into discrete values by chopping up\nthe distribution into several equally-sized intervals.",
"performs a SELECT operation against RDBMS.\n@param query the ... |
public NamedStyleInfo getNamedStyleInfo(String name) {
for (NamedStyleInfo info : namedStyleInfos) {
if (info.getName().equals(name)) {
return info;
}
}
return null;
} | [
"Get layer style by name.\n\n@param name layer style name\n@return layer style"
] | [
"Retrieve a finish date time in the form required by Phoenix.\n\n@param value Date instance\n@return formatted date time",
"Obtains a string from a PDF value\n@param value the PDF value of the String, Integer or Float type\n@return the corresponging string value",
"Calculates a md5 hash for an url\n\nIf a passe... |
public void recordResourceRequestQueueLength(SocketDestination dest, int queueLength) {
if(dest != null) {
getOrCreateNodeStats(dest).recordResourceRequestQueueLength(null, queueLength);
recordResourceRequestQueueLength(null, queueLength);
} else {
this.resourceReques... | [
"Record the resource request queue length\n\n@param dest Destination of the socket for which resource request is\nenqueued. Will actually record if null. Otherwise will call this\non self and corresponding child with this param null.\n@param queueLength The number of entries in the \"asynchronous\" resource\nreques... | [
"Write the patch.xml\n\n@param rollbackPatch the patch\n@param file the target file\n@throws IOException",
"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 n... |
public static List<Node> getSiblings(Node parent, Node element) {
List<Node> result = new ArrayList<>();
NodeList list = parent.getChildNodes();
for (int i = 0; i < list.getLength(); i++) {
Node el = list.item(i);
if (el.getNodeName().equals(element.getNodeName())) {
result.add(el);
}
}
return... | [
"Get siblings of the same type as element from parent.\n\n@param parent parent node.\n@param element element.\n@return List of sibling (from element) under parent"
] | [
"Creates builder for passed path element\n\n@param elementName name of xml element that is used as decorator\n@return PersistentResourceXMLBuilder\n@deprecated decorator element support is currently considered as preview\n@since 4.0",
"Create a clone of the Renderer. This method is the base of the prototype mecha... |
protected Boolean getIgnoreQuery() {
Boolean isIgnoreQuery = parseOptionalBooleanValue(m_configObject, JSON_KEY_IGNORE_QUERY);
return (null == isIgnoreQuery) && (m_baseConfig != null)
? Boolean.valueOf(m_baseConfig.getGeneralConfig().getIgnoreQueryParam())
: isIgnoreQuery;
} | [
"Returns a flag indicating if the query given by the parameters should be ignored.\n@return A flag indicating if the query given by the parameters should be ignored."
] | [
"Register the given mbean with the platform mbean server\n\n@param mbean The mbean to register\n@param name The name to register under",
"Show a toast-like message for the specified duration\n\n@param message\n@param duration in seconds",
"Retrieves state and metrics information for individual node.\n\n@param n... |
private void addAuthentication(HttpHost host, Credentials credentials,
AuthScheme authScheme, HttpClientContext context) {
AuthCache authCache = context.getAuthCache();
if (authCache == null) {
authCache = new BasicAuthCache();
context.setAuthCache(authCache);
... | [
"Add authentication information for the given host\n@param host the host\n@param credentials the credentials\n@param authScheme the scheme for preemptive authentication (should be\n<code>null</code> if adding authentication for a proxy server)\n@param context the context in which the authentication information\nsho... | [
"Read an optional boolean value form a JSON Object.\n@param json the JSON object to read from.\n@param key the key for the boolean value in the provided JSON object.\n@return the boolean or null if reading the boolean fails.",
"Used by TracedParallelBatch where its used to wrap a TraceContext and puts it in the\n... |
public int sharedSegments(Triangle t2) {
int counter = 0;
if(a.equals(t2.a)) {
counter++;
}
if(a.equals(t2.b)) {
counter++;
}
if(a.equals(t2.c)) {
counter++;
}
if(b.equals(t2.a)) {
counter++;
}
if(b.equals(t2.b)) {
counter++;
}
if(b.equals(t2.c)) {
counter++;
}
if(c.equals... | [
"checks if the 2 triangles shares a segment\n@author Doron Ganel & Eyal Roth(2009)\n@param t2 - a second triangle\n@return boolean"
] | [
"private int numCalls = 0;",
"Converts assignment duration values from minutes to hours.\n\n@param list assignment data",
"Set the weeks of the month the events should occur.\n@param weeksOfMonth the weeks of month to set (first to fifth, where fifth means last).",
"Whether the specified JavaBeans property ex... |
protected void mergeSameWork(LinkedList<TimephasedWork> list)
{
LinkedList<TimephasedWork> result = new LinkedList<TimephasedWork>();
TimephasedWork previousAssignment = null;
for (TimephasedWork assignment : list)
{
if (previousAssignment == null)
{
assignment.... | [
"Merges individual days together into time spans where the\nsame work is undertaken each day.\n\n@param list assignment data"
] | [
"Use this API to fetch statistics of appfwpolicylabel_stats resource of given name .",
"Parse a duration in minutes form a number of hours.\n\n@param value String representation\n@return Integer instance",
"Use this API to fetch all the systemcollectionparam resources that are configured on netscaler.",
"Use ... |
public String toIPTC(SubjectReferenceSystem srs) {
StringBuffer b = new StringBuffer();
b.append("IPTC:");
b.append(getNumber());
b.append(":");
if (getNumber().endsWith("000000")) {
b.append(toIPTCHelper(srs.getName(this)));
b.append("::");
} else if (getNumber().endsWith("000")) {
b.appe... | [
"Formats an IPTC string for this reference using information obtained from\nSubject Reference System.\n\n@param srs\nreference subject reference system\n@return IPTC formatted reference"
] | [
"Renders a given graphic into a new image, scaled to fit the new size and rotated.",
"Shutdown task scheduler.",
"compares two java files",
"Search for interesting photos using the Flickr Interestingness algorithm.\n\n@param params\nAny search parameters\n@param perPage\nNumber of items per page\n@param page\... |
private InputValue getInputValue(FormInput input) {
/* Get the DOM element from Selenium. */
WebElement inputElement = browser.getWebElement(input.getIdentification());
switch (input.getType()) {
case TEXT:
case PASSWORD:
case HIDDEN:
case SELECT:
case TEXTAREA:
return new InputValue(inputEle... | [
"Generates the InputValue for the form input by inspecting the current\nvalue of the corresponding WebElement on the DOM.\n\n@return The current InputValue for the element on the DOM."
] | [
"Print the lead string followed by centered formatted string. The whole\nlength of the line is 80 chars.\n\nExample:\n\n```java\nprintCenterWithLead(\" *\", \"Hello %s\", \"World\");\n```\n\nwill print something like\n\n```\n* Hello World\n```\n\nNote the above is just a demo, the exact number of white... |
public long nextUniqueTransaction(long timeMs) {
long id = timeMs;
for (; ; ) {
long old = transactionID.get();
if (old >= id)
id = old + 1;
if (transactionID.compareAndSet(old, id))
break;
}
return id;
} | [
"the transaction id are generated as unique timestamps\n\n@param timeMs in milliseconds\n@return a unique transactionId"
] | [
"Create a clone of the Renderer. This method is the base of the prototype mechanism implemented\nto avoid create new objects from RendererBuilder. Pay an special attention implementing clone\nmethod in Renderer subtypes.\n\n@return a copy of the current renderer.",
"Wait until a range has no notifications.\n\n@re... |
@Nonnull
public BiMap<String, String> getOutputMapper() {
final BiMap<String, String> outputMapper = this.processor.getOutputMapperBiMap();
if (outputMapper == null) {
return HashBiMap.create();
}
return outputMapper;
} | [
"Get the output mapper from processor."
] | [
"returns a unique String for given field.\nthe returned uid is unique accross all tables.",
"Assigns an element a value based on its index in the internal array..\n\n@param index The matrix element that is being assigned a value.\n@param value The element's new value.",
"Add a IN clause so the column must be eq... |
public StandaloneCommandBuilder setDebug(final boolean suspend, final int port) {
debugArg = String.format(DEBUG_FORMAT, (suspend ? "y" : "n"), port);
return this;
} | [
"Sets the debug JPDA remote socket debugging argument.\n\n@param suspend {@code true} to suspend otherwise {@code false}\n@param port the port to listen on\n\n@return the builder"
] | [
"Use this API to add dospolicy resources.",
"Builds the mapping table.",
"Checks if the child is currently in ViewPort\n@param dataIndex child index\n@return true if the child is in viewport, false - otherwise",
"Retrieves state and metrics information for individual client connection.\n\n@param name connecti... |
public boolean isValid() {
if(addressProvider.isUninitialized()) {
try {
validate();
return true;
} catch(AddressStringException e) {
return false;
}
}
return !addressProvider.isInvalid();
} | [
"Returns whether this is a valid address string format.\n\nThe accepted IP address formats are:\nan IPv4 address, an IPv6 address, a network prefix alone, the address representing all addresses of all types, or an empty string.\nIf this method returns false, and you want more details, call validate() and examine th... | [
"Use this API to update clusterinstance resources.",
"Removes the given row.\n\n@param row the row to remove",
"gets the count of addresses that this address division grouping may represent\n\nIf this address division grouping is not a subnet block of multiple addresses or has no range of values, then there is ... |
private Iterable<Key> getSplitKey(List<Key> keys, int numSplits) {
// If the number of keys is less than the number of splits, we are limited in the number of
// splits we can make.
if (keys.size() < numSplits - 1) {
return keys;
}
// Calculate the number of keys per split. This should be KEY... | [
"Given a list of keys and a number of splits find the keys to split on.\n\n@param keys the list of keys.\n@param numSplits the number of splits."
] | [
"Sets an attribute in the main section of the manifest to a map.\nThe map entries will be joined with a single whitespace character, and each key-value pair will be joined with a '='.\n\n@param name the attribute's name\n@param values the attribute's value\n@return {@code this}\n@throws IllegalStateException if e... |
private void getMonthlyRelativeDates(Calendar calendar, int frequency, List<Date> dates)
{
long startDate = calendar.getTimeInMillis();
calendar.set(Calendar.DAY_OF_MONTH, 1);
int dayNumber = NumberHelper.getInt(m_dayNumber);
while (moreDates(calendar, dates))
{
if (dayNumber ... | [
"Calculate start dates for a monthly relative recurrence.\n\n@param calendar current date\n@param frequency frequency\n@param dates array of start dates"
] | [
"Find and unmarshal all test suite files in given directories.\n\n@throws IOException if any occurs.\n@see #unmarshal(File)",
"checks if there is a writelock for transaction tx on object obj.\nReturns true if so, else false.",
"Gets the txinfo cache weight\n\n@param conf The FluoConfiguration\n@return The size ... |
void onPatternChange() {
PatternType patternType = m_model.getPatternType();
boolean isSeries = !patternType.equals(PatternType.NONE);
setSerialOptionsVisible(isSeries);
m_seriesCheckBox.setChecked(isSeries);
if (isSeries) {
m_groupPattern.selectButton(m_patternButto... | [
"Called when the pattern has changed."
] | [
"Call rollback on the underlying connection.",
"Use this API to disable vserver of given name.",
"Sets the left padding character for all cells in the table.\n@param paddingLeftChar new padding character, ignored if null\n@return this to allow chaining",
"The Cost Variance field shows the difference between t... |
public SqlStatement getPreparedInsertStatement(ClassDescriptor cld)
{
SqlStatement sql;
SqlForClass sfc = getSqlForClass(cld);
sql = sfc.getInsertSql();
if(sql == null)
{
ProcedureDescriptor pd = cld.getInsertProcedure();
if(pd == null)
... | [
"generate a prepared INSERT-Statement for the Class\ndescribed by cld.\n\n@param cld the ClassDescriptor"
] | [
"Get the first non-white Y point\n@param img Image in memory\n@return the trimmed y start",
"Wait until a range has no notifications.\n\n@return true if notifications were ever seen while waiting",
"Adds search fields from elements on a container page to a container page's document.\n@param document The documen... |
public void setDropShadowColor(int color) {
GradientDrawable.Orientation orientation = getDropShadowOrientation();
final int endColor = color & 0x00FFFFFF;
mDropShadowDrawable = new GradientDrawable(orientation,
new int[] {
color,
... | [
"Sets the color of the drop shadow.\n\n@param color The color of the drop shadow."
] | [
"Return the list of module dependencies\n\n@param moduleName\n@param moduleVersion\n@param fullRecursive\n@param corporate\n@param thirdParty\n@return List<Dependency>\n@throws GrapesCommunicationException",
"Subtracts v1 from this vector and places the result in this vector.\n\n@param v1\nright-hand vector",
"... |
public Set<String> rangeByRankReverse(final long start, final long end) {
return doWithJedis(new JedisCallable<Set<String>>() {
@Override
public Set<String> call(Jedis jedis) {
return jedis.zrevrange(getKey(), start, end);
}
});
} | [
"Returns the specified range of elements in the sorted set.\nThe elements are considered to be ordered from the highest to the lowest score.\nDescending lexicographical order is used for elements with equal score.\nBoth start and stop are zero-based inclusive indexes. They can also be negative numbers indicating of... | [
"Initializes the set of report implementation.",
"Deletes specified entity clearing all its properties and deleting all its outgoing links.\n\n@param entity to delete.",
"Use this API to unset the properties of vridparam resource.\nProperties that need to be unset are specified in args array.",
"Specify the m... |
public void setPath(int pathId, String path) {
PreparedStatement statement = null;
try (Connection sqlConnection = sqlService.getConnection()) {
statement = sqlConnection.prepareStatement(
"UPDATE " + Constants.DB_TABLE_PATH +
" SET " + Constants.PATH_PROF... | [
"Sets the actual path for this ID\n\n@param pathId ID of path\n@param path value of path"
] | [
"Places a new value at the end of the existing value array, increasing the field length accordingly.\n@param newValue - the 2 floats making the new SFVec2f appended to the MFVec2f array list",
"Internal method used to retrieve a byte array from one\nor more embedded data blocks. Consecutive data blocks may\nneed ... |
public static boolean requiresReload(final Set<Flag> flags) {
return flags.contains(Flag.RESTART_ALL_SERVICES) || flags.contains(Flag.RESTART_RESOURCE_SERVICES);
} | [
"Checks to see within the flags if a reload, i.e. not a full restart, is required.\n\n@param flags the flags to check\n\n@return {@code true} if a reload is required, otherwise {@code false}"
] | [
"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",
"Searches for cases where a minus sign means negative operator. That happens when there is a minus\nsign with a variable to its right and no variable to... |
public void updateFrontFacingRotation(float rotation) {
if (!Float.isNaN(rotation) && !equal(rotation, frontFacingRotation)) {
final float oldRotation = frontFacingRotation;
frontFacingRotation = rotation % 360;
for (OnFrontRotationChangedListener listener : mOnFrontRotationC... | [
"Set new front facing rotation\n@param rotation"
] | [
"Returns the type discriminator value for given Frames model class, extracted from the @TypeValue annotation.",
"Generate and return the list of statements to create a database table and any associated features.",
"Convert gallery name to title key.\n@param gallery gallery name for example \"downloadgallery\"\n... |
public Version putVersionedWithCustomTimeout(CompositeVoldemortRequest<K, V> requestWrapper)
throws ObsoleteVersionException {
validateTimeout(requestWrapper.getRoutingTimeoutInMs());
for(int attempts = 0; attempts < this.metadataRefreshAttempts; attempts++) {
try {
... | [
"Performs a Versioned put operation with the specified composite request\nobject\n\n@param requestWrapper Composite request object containing the key and the\nversioned object\n@return Version of the value for the successful put\n@throws ObsoleteVersionException"
] | [
"Creates a simple, annotation defined Enterprise Web Bean using the annotations specified on type\n\n@param <T> The type\n@param beanManager the current manager\n@param type the AnnotatedType to use\n@return An Enterprise Web Bean",
"Scans a set of classes for both ReaderListeners and Swagger annot... |
public void sortIndices(SortCoupledArray_F64 sorter ) {
if( sorter == null )
sorter = new SortCoupledArray_F64();
sorter.quick(col_idx,numCols+1,nz_rows,nz_values);
indicesSorted = true;
} | [
"Sorts the row indices in ascending order.\n@param sorter (Optional) Used to sort rows. If null a new instance will be declared internally."
] | [
"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",
"Given the key, figures out which partition on the local node hosts the key.\n\n@param key\n@return",
"Returns iterable with all ... |
public static String getShortName(String className) {
Assert.hasLength(className, "Class name must not be empty");
int lastDotIndex = className.lastIndexOf(PACKAGE_SEPARATOR);
int nameEndIndex = className.indexOf(CGLIB_CLASS_SEPARATOR);
if (nameEndIndex == -1) {
nameEndIndex = className.length();
}
Strin... | [
"Get the class name without the qualified package name.\n@param className the className to get the short name for\n@return the class name of the class without the package name\n@throws IllegalArgumentException if the className is empty"
] | [
"Map originator type.\n\n@param originatorType the originator type\n@return the originator",
"Parse a date value.\n\n@param value String representation\n@return Date instance",
"Sets the path to the script file to load and loads the script.\n\n@param filePath path to script file\n@throws IOException if the scri... |
public static void dumpTexCoords(AiMesh mesh, int coords) {
if (!mesh.hasTexCoords(coords)) {
System.out.println("mesh has no texture coordinate set " + coords);
return;
}
for (int i = 0; i < mesh.getNumVertices(); i++) {
int numComponents = mesh.getN... | [
"Dumps a texture coordinate set of a mesh to stdout.\n\n@param mesh the mesh\n@param coords the coordinates"
] | [
"Use this API to unset the properties of nstimeout resource.\nProperties that need to be unset are specified in args array.",
"Fixed length fancy formatting for doubles. If possible decimal notation is used. If all the significant digits\ncan't be shown then it will switch to exponential notation. If not all the... |
private static int resolveDomainTimeoutAdder() {
String propValue = WildFlySecurityManager.getPropertyPrivileged(DOMAIN_TEST_SYSTEM_PROPERTY, DEFAULT_DOMAIN_TIMEOUT_STRING);
if (sysPropDomainValue == null || !sysPropDomainValue.equals(propValue)) {
// First call or the system property change... | [
"Allows testsuites to shorten the domain timeout adder"
] | [
"Gets an app client by its client app id if it has been initialized; throws if none can be\nfound.\n\n@param clientAppId the client app id of the app client to get.\n@return the app client associated with the client app id.",
"Set the current playback position. This method can only be used in situations where the... |
protected void importUserFromFile() {
CmsImportUserThread thread = new CmsImportUserThread(
m_cms,
m_ou,
m_userImportList,
getGroupsList(m_importGroups, true),
getRolesList(m_importRoles, true),
m_sendMail.getValue().booleanValue());
... | [
"Import user from file."
] | [
"Adds each required substring, checking that it's not null.\n\n@param requiredSubStrings\nthe required substrings\n@throws NullPointerException\nif a required substring is null",
"Watches specified IDs in a collection.\n@param ids the ids to watch.\n@return the stream of change events.",
"This method recursivel... |
public static base_response unset(nitro_service client, vridparam resource, String[] args) throws Exception{
vridparam unsetresource = new vridparam();
return unsetresource.unset_resource(client,args);
} | [
"Use this API to unset the properties of vridparam resource.\nProperties that need to be unset are specified in args array."
] | [
"Use this API to fetch lbmonitor_binding resource of given name .",
"Helper method to lookup a DAO if it has already been associated with the class. Otherwise this returns null.",
"Sets the bottom padding for all cells in the table.\n@param paddingBottom new padding, ignored if smaller than 0\n@return this to a... |
private void processWorkingHours(ProjectCalendar mpxjCalendar, Sequence uniqueID, Day day, List<OverriddenDayType> typeList)
{
if (isWorkingDay(mpxjCalendar, day))
{
ProjectCalendarHours mpxjHours = mpxjCalendar.getCalendarHours(day);
if (mpxjHours != null)
{
Overri... | [
"Process the standard working hours for a given day.\n\n@param mpxjCalendar MPXJ Calendar instance\n@param uniqueID unique ID sequence generation\n@param day Day instance\n@param typeList Planner list of days"
] | [
"Sets an element in at the specified index.",
"Consumes the next character in the request, checking that it matches the\nexpected one. This method should be used when the",
"remove files from directory. All-or-nothing operation - if any of the files fails to be removed, all deleted files are restored.\n\nThe op... |
public static CoordinateReferenceSystem parseProjection(
final String projection, final Boolean longitudeFirst) {
try {
if (longitudeFirst == null) {
return CRS.decode(projection);
} else {
return CRS.decode(projection, longitudeFirst);
... | [
"Parse the given projection.\n\n@param projection The projection string.\n@param longitudeFirst longitudeFirst"
] | [
"Ensures that the foreign keys required by the given collection are present in the element class.\n\n@param modelDef The model\n@param collDef The collection\n@throws ConstraintException If there is a problem with the foreign keys",
"Returns the default jdbc type for the given java type.\n\n@param javaType The q... |
public void setNearClippingDistance(float near) {
if(leftCamera instanceof GVRCameraClippingDistanceInterface &&
centerCamera instanceof GVRCameraClippingDistanceInterface &&
rightCamera instanceof GVRCameraClippingDistanceInterface) {
((GVRCameraClippingDistanceInterface)leftC... | [
"Sets the distance from the origin to the near clipping plane for the\nwhole camera rig.\n\n@param near\nDistance to the near clipping plane."
] | [
"Given an AVRO serializer definition, validates if all the avro schemas\nare valid i.e parseable.\n\n@param avroSerDef",
"Retrieves the constructor that is used by OJB to create instances of the given collection proxy\nclass.\n\n@param proxyClass The proxy class\n@param baseType The required base type of the prox... |
static String expandUriComponent(String source, UriTemplateVariables uriVariables) {
if (source == null) {
return null;
}
if (source.indexOf('{') == -1) {
return source;
}
Matcher matcher = NAMES_PATTERN.matcher(source);
StringBuffer sb = new StringBuffer();
while (matcher.find()) {
String match ... | [
"static expansion helpers"
] | [
"Creates metadata on this file in the specified template type.\n\n@param typeName the metadata template type name.\n@param metadata the new metadata values.\n@return the metadata returned from the server.",
"Set the draw mode for this mesh. Default is GL_TRIANGLES.\n\n@param drawMode",
"Sets the top padding for... |
private void processGeneratedProperties(
Serializable id,
Object entity,
Object[] state,
SharedSessionContractImplementor session,
GenerationTiming matchTiming) {
Tuple tuple = getFreshTuple( EntityKeyBuilder.fromPersister( this, id, session ), session );
saveSharedTuple( entity, tuple, session );
... | [
"Re-reads the given entity, refreshing any properties updated on the server-side during insert or update."
] | [
"Read the calendar data from a Gantt Designer file.\n\n@param gantt Gantt Designer file.",
"Mark root of this task task group depends on the given TaskItem.\nThis ensure this task group's root get picked for execution only after the completion\nof invocation of provided TaskItem.\n\n@param dependencyTaskItem the ... |
public static final int getShort(InputStream is) throws IOException
{
byte[] data = new byte[2];
is.read(data);
return getShort(data, 0);
} | [
"Read a short int from an input stream.\n\n@param is input stream\n@return int value"
] | [
"Return the lines of a CharSequence as a List of String.\n\n@param self a CharSequence object\n@return a list of lines\n@throws java.io.IOException if an error occurs\n@since 1.8.2",
"Signal that all threads have run to completion, and the multithreaded\nenvironment is over.\n@param check The name of the thread g... |
@Override
public void perform(GraphRewrite event, EvaluationContext context)
{
checkVariableName(event, context);
WindupVertexFrame payload = resolveVariable(event, getVariableName());
if (payload instanceof FileReferenceModel)
{
FileModel file = ((FileReferenceModel)... | [
"Set the payload to the fileModel of the given instance even though the variable is not directly of it's type. This is mainly to simplify the\ncreation of the rule, when the FileModel itself is not being iterated but just a model referencing it."
] | [
"Get the default providers list to be used.\n\n@return the default provider list and ordering, not null.",
"Fires an event on an element using its identification.\n\n@param eventable The eventable.\n@return true if it is able to fire the event successfully on the element.\n@throws InterruptedException when interr... |
public static String getTypeValue(Class<? extends WindupFrame> clazz)
{
TypeValue typeValueAnnotation = clazz.getAnnotation(TypeValue.class);
if (typeValueAnnotation == null)
throw new IllegalArgumentException("Class " + clazz.getCanonicalName() + " lacks a @TypeValue annotation");
... | [
"Returns the type discriminator value for given Frames model class, extracted from the @TypeValue annotation."
] | [
"Converts the given string to a clob object\n\n@param stringName string name to clob\n@param sqlConnection Connection object\n@return Clob object or NULL",
"Returns the indices that would sort an array.\n\n@param array Array.\n@param ascending Ascending order.\n@return Array of indices.",
"Returns iterable ... |
private static int tribus(int version, int a, int b, int c) {
if (version < 10) {
return a;
} else if (version >= 10 && version <= 26) {
return b;
} else {
return c;
}
} | [
"Choose from three numbers based on version."
] | [
"Set the background color.\n\nIf you don't set the background color, the default is an opaque black:\n{@link Color#BLACK}, 0xff000000.\n\n@param color\nAn Android 32-bit (ARGB) {@link Color}, such as you get from\n{@link Resources#getColor(int)}",
"Returns the default hidden preference for the user.\n\n@return bo... |
public void fireCalendarReadEvent(ProjectCalendar calendar)
{
if (m_projectListeners != null)
{
for (ProjectListener listener : m_projectListeners)
{
listener.calendarRead(calendar);
}
}
} | [
"This method is called to alert project listeners to the fact that\na calendar has been read from a project file.\n\n@param calendar calendar instance"
] | [
"Register a loader with the 'sniffer'.\n\n'Factory loaders' are pre-registered. To load a format we don't support,\ncreate a {@link GVRCompressedTextureLoader} descendant. Then, before\ntrying to load any files in that format, create an instance and call\n{@link #register()}:\n\n<pre>\n\nnew MyCompressedFormat().re... |
public double distanceToPlane(Point3d p) {
return normal.x * p.x + normal.y * p.y + normal.z * p.z - planeOffset;
} | [
"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"
] | [
"Creates a XopBean. The image on the disk is included as a byte array,\na DataHandler and java.awt.Image\n@return the bean\n@throws Exception",
"IN Criteria with SubQuery\n@param attribute The field name to be used\n@param subQuery The subQuery",
"compute Cosh using Taylor Series.\n\n@param x An angle, in... |
@RequestMapping(value = "/api/profile/{profileIdentifier}/clients", method = RequestMethod.POST)
public
@ResponseBody
HashMap<String, Object> addClient(Model model,
@PathVariable("profileIdentifier") String profileIdentifier,
@Reque... | [
"Returns a new client id for the profileIdentifier\n\n@param model\n@param profileIdentifier\n@return json with a new client_id\n@throws Exception"
] | [
"Add the line to the content\n\n@param bufferedFileReader The file reader\n@param content The content of the file\n@param line The current read line\n@throws IOException",
"Use this API to fetch snmpalarm resource of given name .",
"Retuns the Windows UNC style path with backslashs inte... |
public boolean setCustomResponse(String pathValue, String requestType, String customData) {
try {
JSONObject path = getPathFromEndpoint(pathValue, requestType);
if (path == null) {
String pathName = pathValue;
createPath(pathName, pathValue, requestType);
... | [
"Sets a custom response on an endpoint\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"
] | [
"Return the list of module dependencies\n\n@param moduleName\n@param moduleVersion\n@param fullRecursive\n@param corporate\n@param thirdParty\n@return List<Dependency>\n@throws GrapesCommunicationException",
"The normalized string returned by this method is consistent with java.net.Inet6address.\n\nIPs are not co... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.