query
stringlengths 74
6.1k
| positive
listlengths 1
1
| negative
listlengths 9
9
|
---|---|---|
private static int getContainerPort(Service service, Annotation... qualifiers) {
for (Annotation q : qualifiers) {
if (q instanceof Port) {
Port port = (Port) q;
if (port.value() > 0) {
return port.value();
}
}
}
ServicePort servicePort = findQualifiedServicePort(service, qualifiers);
if (servicePort != null) {
return servicePort.getTargetPort().getIntVal();
}
return 0;
} | [
"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 qualifiers\nThe set of qualifiers.\n\n@return Returns the resolved containerPort of '0' as a fallback."
]
| [
"Convert an object to another object with given type\n\n@param <T>\n@param source\nobject to convert\n@param typeReference\nreference to {@link java.lang.reflect.Type}\n@return the converted object if conversion failed\n@throws ConverterException",
"Compute costs.",
"Use this API to update Interface resources.",
"Throws an IllegalArgumentException when the given value is not false.\n@param value the value to assert if false\n@param message the message to display if the value is false\n@return the value",
"Sets the lower limits for the \"moving\" body translation relative to joint point.\n\n@param limitX the X axis lower translation limit\n@param limitY the Y axis lower translation limit\n@param limitZ the Z axis lower translation limit",
"Print a duration value.\n\n@param value Duration instance\n@return string representation of a duration",
"Wait for the read side to close. Used when the writer needs to know when\nthe reader finishes consuming a message.",
"Write a long attribute.\n\n@param name attribute name\n@param value attribute value",
"Start with specifying the groupId"
]
|
static BsonDocument getFreshVersionDocument() {
final BsonDocument versionDoc = new BsonDocument();
versionDoc.append(Fields.SYNC_PROTOCOL_VERSION_FIELD, new BsonInt32(1));
versionDoc.append(Fields.INSTANCE_ID_FIELD, new BsonString(UUID.randomUUID().toString()));
versionDoc.append(Fields.VERSION_COUNTER_FIELD, new BsonInt64(0L));
return versionDoc;
} | [
"Returns a BSON version document representing a new version with a new instance ID, and\nversion counter of zero.\n@return a BsonDocument representing a synchronization version"
]
| [
"Retrieves the path using the endpoint value\n\n@param pathValue - path (endpoint) value\n@param requestType - \"GET\", \"POST\", etc\n@return Path or null\n@throws Exception exception",
"find the middle point of two intersect points in circle,only one point will be correct\n\n@param center\n@param a\n@param b\n@param area\n@param radius\n@return",
"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.",
"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}.",
"Sends a server command continuation request '+' back to the client,\nrequesting more data to be sent.",
"Overrides the superclass implementation to allow the value type's AttributeDefinition to in turn\nresolve each element.\n\n{@inheritDoc}",
"Creates a new RDF serializer based on the current configuration of this\nobject.\n\n@return the newly created RDF serializer\n@throws IOException\nif there were problems opening the output files",
"Records that there is no media mounted in a particular media player slot, updating listeners if this is a change,\nand clearing any affected items from our in-memory caches.\n\n@param slot the slot in which no media is mounted",
"Validates for non-conflicting roles"
]
|
public Node insertEntity(GraphDatabaseService executionEngine, Object[] columnValues) {
Map<String, Object> params = params( columnValues );
Result result = executionEngine.execute( getCreateEntityQuery(), params );
return singleResult( result );
} | [
"Creates the node corresponding to an entity.\n\n@param executionEngine the {@link GraphDatabaseService} used to run the query\n@param columnValues the values in {@link org.hibernate.ogm.model.key.spi.EntityKey#getColumnValues()}\n@return the corresponding node"
]
| [
"Parse the string representation of a timestamp.\n\n@param value string representation\n@return Java representation",
"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",
"Read a field into our table configuration for field=value line.",
"Returns the value of the specified matrix element. Performs a bounds check to make sure\nthe requested element is part of the matrix.\n\n@param row The row of the element.\n@param col The column of the element.\n@return The value of the element.",
"Calls all initializers of the bean\n\n@param instance The bean instance",
"The parameter 'project' is not used at the moment, but will be used once schema and plugin support lands.",
"General API\n-> compile each of supplied files\n-> recompile any required types for which we have an incomplete principle structure",
"Ping route Ping the ESI routers\n\n@return ApiResponse<String>\n@throws ApiException\nIf fail to call the API, e.g. server error or cannot\ndeserialize the response body",
"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"
]
|
private I_CmsSearchIndex getIndex() {
I_CmsSearchIndex index = null;
// get the configured index or the selected index
if (isInitialCall()) {
// the search form is in the initial state
// get the configured index
index = OpenCms.getSearchManager().getIndex(getSettings().getUserSettings().getWorkplaceSearchIndexName());
} else {
// the search form is not in the inital state, the submit button was used already or the
// search index was changed already
// get the selected index in the search dialog
index = OpenCms.getSearchManager().getIndex(getJsp().getRequest().getParameter("indexName.0"));
}
return index;
} | [
"Gets the index to use in the search.\n\n@return the index to use in the search"
]
| [
"Adds another condition for an element within this annotation.",
"Concats two arrays.\n\n@param first the first array\n@param second the second array\n@param <T> the type of the element in the array\n@return a new array created adding the element in the second array after the first one",
"Get a list of layer digests from docker manifest.\n\n@param manifestContent\n@return\n@throws IOException",
"Checks if the dependency server is available\n\n@return true if the server is reachable, false otherwise",
"Process UDFs for a specific object.\n\n@param mpxj field container\n@param udfs UDF values",
"read CustomInfo list from table.\n\n@param eventId the event id\n@return the map",
"Instruct a query to use a specific index.\n@param designDocument Design document to use.\n@param indexName Index name to use.\n@return {@code QueryBuilder} object for method chaining.",
"Use this API to fetch onlinkipv6prefix resource of given name .",
"Create a new remote proxy controller.\n\n@param client the transactional protocol client\n@param pathAddress the path address\n@param addressTranslator the address translator\n@param targetKernelVersion the {@link ModelVersion} of the kernel management API exposed by the proxied process\n@return the proxy controller"
]
|
public static gslbservice[] get(nitro_service service) throws Exception{
gslbservice obj = new gslbservice();
gslbservice[] response = (gslbservice[])obj.get_resources(service);
return response;
} | [
"Use this API to fetch all the gslbservice resources that are configured on netscaler."
]
| [
"One of the two main methods in this class. Creates a RendererViewHolder instance with a\nRenderer inside ready to be used. The RendererBuilder to create a RendererViewHolder using the\ninformation given as parameter.\n\n@param viewGroup used to create the ViewHolder.\n@param viewType associated to the renderer.\n@return ViewHolder extension with the Renderer it has to use inside.",
"This method extracts resource data from a Phoenix file.\n\n@param phoenixProject parent node for resources",
"Non-supported in JadeAgentIntrospector",
"Check type.\n\n@param type the type\n@return the boolean",
"add a new producer, either synchronous or asynchronous, connecting\nto the specified broker\n\n@param broker broker to producer",
"Draw an elliptical interior with this color.\n\n@param rect rectangle in which ellipse should fit\n@param color colour to use for filling",
"Look up a shaper by a short String name.\n\n@param name Shaper name. Known names have patterns along the lines of:\ndan[12](bio)?(UseLC)?, jenny1(useLC)?, chris[1234](useLC)?.\n@return An integer constant for the shaper",
"Add an object into cache by key with expiration time specified\n\n@param key\nthe key to index the object within the cache\n@param obj\nthe object to be cached\n@param expiration\nthe seconds after which the object will be evicted from the cache",
"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}"
]
|
private void writePropertyStatisticsToFile(UsageStatistics usageStatistics,
String fileName) {
try (PrintStream out = new PrintStream(
ExampleHelpers.openExampleFileOuputStream(fileName))) {
out.println("Property id,in statements,in qualifiers,in references,total");
for (Entry<PropertyIdValue, Integer> entry : usageStatistics.propertyCountsMain
.entrySet()) {
int qCount = usageStatistics.propertyCountsQualifier.get(entry
.getKey());
int rCount = usageStatistics.propertyCountsReferences.get(entry
.getKey());
int total = entry.getValue() + qCount + rCount;
out.println(entry.getKey().getId() + "," + entry.getValue()
+ "," + qCount + "," + rCount + "," + total);
}
} catch (IOException e) {
e.printStackTrace();
}
} | [
"Stores the gathered usage statistics about property uses to a CSV file.\n\n@param usageStatistics\nthe statistics to store\n@param fileName\nthe name of the file to use"
]
| [
"try to delegate the master to handle the response\n\n@param response\n@return true if the master accepted the response; false if the master\ndidn't accept",
"Check if the current version match the last release or the last snapshot one\n\n@param artifact\n@return boolean",
"Sort and order steps to avoid unwanted generation",
"Print a work group.\n\n@param value WorkGroup instance\n@return work group value",
"Parser for forecast\n\n@param feed\n@return",
"Add properties to 'properties' map on transaction start\n@param type - of transaction",
"Notifies that multiple header items are removed.\n\n@param positionStart the position.\n@param itemCount the item count.",
"Returns the y-coordinate of a vertex position.\n\n@param vertex the vertex index\n@return the y coordinate",
"ten less than Cube Q"
]
|
public void implicitDoubleStep( int x1 , int x2 ) {
if( printHumps )
System.out.println("Performing implicit double step");
// compute the wilkinson shift
double z11 = A.get(x2 - 1, x2 - 1);
double z12 = A.get(x2 - 1, x2);
double z21 = A.get(x2, x2 - 1);
double z22 = A.get(x2, x2);
double a11 = A.get(x1,x1);
double a21 = A.get(x1+1,x1);
double a12 = A.get(x1,x1+1);
double a22 = A.get(x1+1,x1+1);
double a32 = A.get(x1+2,x1+1);
if( normalize ) {
temp[0] = a11;temp[1] = a21;temp[2] = a12;temp[3] = a22;temp[4] = a32;
temp[5] = z11;temp[6] = z22;temp[7] = z12;temp[8] = z21;
double max = Math.abs(temp[0]);
for( int j = 1; j < temp.length; j++ ) {
if( Math.abs(temp[j]) > max )
max = Math.abs(temp[j]);
}
a11 /= max;a21 /= max;a12 /= max;a22 /= max;a32 /= max;
z11 /= max;z22 /= max;z12 /= max;z21 /= max;
}
// these equations are derived when the eigenvalues are extracted from the lower right
// 2 by 2 matrix. See page 388 of Fundamentals of Matrix Computations 2nd ed for details.
double b11,b21,b31;
if( useStandardEq ) {
b11 = ((a11- z11)*(a11- z22)- z21 * z12)/a21 + a12;
b21 = a11 + a22 - z11 - z22;
b31 = a32;
} else {
// this is different from the version in the book and seems in my testing to be more resilient to
// over flow issues
b11 = ((a11- z11)*(a11- z22)- z21 * z12) + a12*a21;
b21 = (a11 + a22 - z11 - z22)*a21;
b31 = a32*a21;
}
performImplicitDoubleStep(x1, x2, b11 , b21 , b31 );
} | [
"Performs an implicit double step using the values contained in the lower right hand side\nof the submatrix for the estimated eigenvector values.\n@param x1\n@param x2"
]
| [
"Populate time ranges.\n\n@param ranges time ranges from a Synchro table\n@param container time range container",
"Gets whether the given server can be updated.\n\n@param server the id of the server. Cannot be <code>null</code>\n\n@return <code>true</code> if the server can be updated; <code>false</code>\nif the update should be cancelled\n\n@throws IllegalStateException if this policy is not expecting a request\nto update the given server",
"Set the menu's width in pixels.",
"Initialize the domain registry.\n\n@param registry the domain registry",
"Read an optional boolean value form a JSON value.\n@param val the JSON value that should represent the boolean.\n@return the boolean from the JSON or null if reading the boolean fails.",
"Updates this BoxJSONObject using the information in a JSON object.\n@param jsonObject the JSON object containing updated information.",
"If the Authtoken was already created in a separate program but not saved to file.\n\n@param authToken\n@param tokenSecret\n@param username\n@return\n@throws IOException",
"Create and get actor system.\n\n@return the actor system",
"We have received notification that a device is no longer on the network, so clear out its metadata.\n\n@param announcement the packet which reported the device’s disappearance"
]
|
public void addDependency(final ProcessorGraphNode node) {
Assert.isTrue(node != this, "A processor can't depends on himself");
this.dependencies.add(node);
node.addRequirement(this);
} | [
"Add a dependency to this node.\n\n@param node the dependency to add."
]
| [
"Called from the native side\n@param eye",
"EAP 7.0",
"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",
"Record a prepared operation.\n\n@param identity the server identity\n@param prepared the prepared operation",
"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.",
"This method is used to automatically generate a value\nfor the Outline Number field of this task.\n\n@param parent Parent Task",
"Parses a single query facet item with query and label.\n@param prefix path to the query facet item (with trailing '/').\n@return the query facet item.",
"this class loader interface can be used by other plugins to lookup\nresources from the bundles. A temporary class loader interface is set\nduring other configuration loading as well\n\n@return ClassLoaderInterface (BundleClassLoaderInterface)",
"Use this API to fetch all the appflowpolicylabel resources that are configured on netscaler."
]
|
private void readNormalDay(ProjectCalendar calendar, Project.Calendars.Calendar.WeekDays.WeekDay weekDay)
{
int dayNumber = weekDay.getDayType().intValue();
Day day = Day.getInstance(dayNumber);
calendar.setWorkingDay(day, BooleanHelper.getBoolean(weekDay.isDayWorking()));
ProjectCalendarHours hours = calendar.addCalendarHours(day);
Project.Calendars.Calendar.WeekDays.WeekDay.WorkingTimes times = weekDay.getWorkingTimes();
if (times != null)
{
for (Project.Calendars.Calendar.WeekDays.WeekDay.WorkingTimes.WorkingTime period : times.getWorkingTime())
{
Date startTime = period.getFromTime();
Date endTime = period.getToTime();
if (startTime != null && endTime != null)
{
if (startTime.getTime() >= endTime.getTime())
{
endTime = DateHelper.addDays(endTime, 1);
}
hours.addRange(new DateRange(startTime, endTime));
}
}
}
} | [
"This method extracts data for a normal working day from an MSPDI file.\n\n@param calendar Calendar data\n@param weekDay Day data"
]
| [
"Provisions a new app user in an enterprise using Box Developer Edition.\n@param api the API connection to be used by the created user.\n@param name the name of the user.\n@return the created user's info.",
"Compares two fields given by their names.\n\n@param objA The name of the first field\n@param objB The name of the second field\n@return\n@see java.util.Comparator#compare(java.lang.Object, java.lang.Object)",
"Intercepts calls for setting a key and value for a JSON object\n\n@param name the key name\n@param args the value associated with the key",
"Read the work weeks.\n\n@param data calendar data\n@param offset current offset into data\n@param cal parent calendar",
"Returns the specified range of elements in the sorted set.\nThe elements are considered to be ordered from the lowest to the highest score.\nLexicographical order is used for elements with equal score.\nBoth start and stop are zero-based inclusive indexes. They can also be negative numbers indicating offsets from\nthe end of the sorted set, with -1 being the last element of the sorted set.\n@param start\n@param end\n@return the range of elements",
"Gets the flags associated with this attribute.\n@return the flags. Will not return {@code null}",
"Flushes this output stream and forces any buffered output bytes to be written out to the stream. If propagate is\ntrue, the wrapped stream will also be flushed.\n\n@param propagate\nboolean flag to indicate whether the wrapped OutputStream should also be flushed.\n@throws IOException\nif an I/O error occurs.",
"Non-blocking call\n\n@param key\n@param value\n@return",
"Write project properties.\n\n@param record project properties\n@throws IOException"
]
|
private Entry getEntry(Object key)
{
if (key == null) return null;
int hash = hashCode(key);
int index = indexFor(hash);
for (Entry entry = table[index]; entry != null; entry = entry.next)
{
if ((entry.hash == hash) && equals(key, entry.getKey()))
{
return entry;
}
}
return null;
} | [
"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"
]
| [
"Generate a PageMetadata object for the page represented by the specified pagination token.\n\n@param paginationToken opaque pagination token\n@param initialParameters the initial view query parameters (i.e. for the page 1 request).\n@param <K> the view key type\n@param <V> the view value type\n@return PageMetadata object for the given page",
"Given a String the method uses Regex to check if the String only contains punctuation characters\n\n@param s a String to check using regex\n@return true if the String is valid",
"Start the actual migration. Take the version of the database, get all required migrations and execute them or do\nnothing if the DB is already up to date.\n\nAt the end the underlying database instance is closed.\n\n@throws MigrationException if a migration fails",
"Stop a managed server.",
"Wraps the specified object pool for connections as a DataSource.\n\n@param jcd the OJB connection descriptor for the pool to be wrapped\n@param connectionPool the connection pool to be wrapped\n@return a DataSource attached to the connection pool.\nConnections will be wrapped using DBCP PoolGuard, that will not allow\nunwrapping unless the \"accessToUnderlyingConnectionAllowed=true\" configuration\nis specified.",
"Parses values out of the header text.\n\n@param header header text",
"Chooses a single segment to be compressed, or null if no segment could be chosen.\n@param options\n@param createMixed\n@return",
"Returns the set of synchronized documents in a namespace.\n\n@param namespace the namespace to get synchronized documents for.\n@return the set of synchronized documents in a namespace.",
"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"
]
|
public static void addToMediaStore(Context context, File file) {
String[] path = new String[]{file.getPath()};
MediaScannerConnection.scanFile(context, path, null, null);
} | [
"another media scan way"
]
| [
"Polls the next char from the stack\n\n@return next char",
"Converts an MPXJ Duration instance into the string representation\nof a Planner duration.\n\nPlanner represents durations as a number of seconds in its\nfile format, however it displays durations as days and hours,\nand seems to assume that a working day is 8 hours.\n\n@param value string representation of a duration\n@return Duration instance",
"Update the currency format.\n\n@param properties project properties\n@param decimalSeparator decimal separator\n@param thousandsSeparator thousands separator",
"Sets the specified float attribute to the specified value.\n\n@param name name of the attribute\n@param value value of the attribute\n@since 1.9.0",
"Returns true if required properties for FluoClient are set",
"Use this API to expire cachecontentgroup.",
"Account for key being fetched.\n\n@param key",
"Sets the transformations to be applied to the shape before indexing it.\n\n@param transformations the sequence of transformations\n@return this with the specified sequence of transformations",
"Format a calendar instance that is parseable from JavaScript, according to ISO-8601.\n\n@param cal the calendar to format to a JSON string\n@return a formatted date in the form of a string"
]
|
public void setValue(String propName, Object value) {
for (RequestProp prop : props) {
if (prop.getName().equals(propName)) {
JComponent valComp = prop.getValueComponent();
if (valComp instanceof JTextComponent) {
((JTextComponent)valComp).setText(value.toString());
}
if (valComp instanceof AbstractButton) {
((AbstractButton)valComp).setSelected((Boolean)value);
}
if (valComp instanceof JComboBox) {
((JComboBox)valComp).setSelectedItem(value);
}
return;
}
}
} | [
"Set the value of the underlying component. Note that this will\nnot work for ListEditor components. Also, note that for a JComboBox,\nThe value object must have the same identity as an object in the drop-down.\n\n@param propName The DMR property name to set.\n@param value The value."
]
| [
"Load all string recognize.",
"Get the bytes which represent the payload of this field, without the leading type tag and length header, as\na newly-allocated byte array.\n\n@return a new byte array containing a copy of the bytes this field contains",
"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",
"Gets as many of the requested bytes as available from this buffer.\n\n@return number of bytes actually got from this buffer (0 if no bytes are available)",
"Create new logging action\nThis method check if there is an old instance for this thread-local\nIf not - Initialize new instance and set it as this thread-local's instance\n@param logger\n@param auditor\n@param instance\n@return whether new instance was set to thread-local",
"Helper method for formatting connection establishment 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@return A formatted message in the format:\n\"[<connectionName>] remote host[<host>] <connectionReason>\"\n<br/>\ne.g. [con1] remote host[123.123.123.123] connection to ECMG.",
"Get the URI for the given statement.\n\n@param statement\nthe statement for which to create a URI\n@return the URI",
"Use this API to fetch tmtrafficpolicy_tmglobal_binding resources of given name .",
"Throw IllegalStateException if key is not present in map.\n@param key the key to expect.\n@param map the map to search.\n@throws IllegalArgumentException if key is not in map."
]
|
public Replication targetOauth(String consumerSecret, String consumerKey, String tokenSecret,
String token) {
targetOauth = new JsonObject();
this.consumerSecret = consumerSecret;
this.consumerKey = consumerKey;
this.tokenSecret = tokenSecret;
this.token = token;
return this;
} | [
"Authenticate with the target database using OAuth.\n\n@param consumerSecret consumer secret\n@param consumerKey consumer key\n@param tokenSecret token secret\n@param token token\n@return this Replication instance to set more options\n@deprecated OAuth 1.0 implementation has been <a href=\"http://docs.couchdb.org/en/stable/whatsnew/2.1.html?highlight=oauth#upgrade-notes\"\ntarget=\"_blank\">removed in CouchDB 2.1</a>"
]
| [
"Enables lifecycle callbacks for Android devices\n@param application App's Application object",
"Checks if the provided license is valid and could be stored into the database\n\n@param license the license to test\n@throws WebApplicationException if the data is corrupted",
"Read project data from a database.\n\n@return ProjectFile instance\n@throws MPXJException",
"Return a long value from a prepared query.",
"Checks if the provided license is valid and could be stored into the database\n\n@param license the license to test\n@throws WebApplicationException if the data is corrupted",
"Returns the configured bundle, or the provided default bundle.\n@param defaultMessages the default bundle\n@param locale the preferred locale\n@return the configured bundle or, if not found, the default bundle.",
"Use this API to fetch a aaaglobal_binding resource .",
"Rethrows platform specific OperationCanceledExceptions and unwraps OperationCanceledErrors. Does nothing for any other type of Throwable.",
"Handle a value change.\n@param propertyId the column in which the value has changed."
]
|
private Project.Tasks.Task.PredecessorLink writePredecessor(Integer taskID, RelationType type, Duration lag)
{
Project.Tasks.Task.PredecessorLink link = m_factory.createProjectTasksTaskPredecessorLink();
link.setPredecessorUID(NumberHelper.getBigInteger(taskID));
link.setType(BigInteger.valueOf(type.getValue()));
link.setCrossProject(Boolean.FALSE); // SF-300: required to keep P6 happy when importing MSPDI files
if (lag != null && lag.getDuration() != 0)
{
double linkLag = lag.getDuration();
if (lag.getUnits() != TimeUnit.PERCENT && lag.getUnits() != TimeUnit.ELAPSED_PERCENT)
{
linkLag = 10.0 * Duration.convertUnits(linkLag, lag.getUnits(), TimeUnit.MINUTES, m_projectFile.getProjectProperties()).getDuration();
}
link.setLinkLag(BigInteger.valueOf((long) linkLag));
link.setLagFormat(DatatypeConverter.printDurationTimeUnits(lag.getUnits(), false));
}
else
{
// SF-329: default required to keep Powerproject happy when importing MSPDI files
link.setLinkLag(BIGINTEGER_ZERO);
link.setLagFormat(DatatypeConverter.printDurationTimeUnits(m_projectFile.getProjectProperties().getDefaultDurationUnits(), false));
}
return (link);
} | [
"This method writes a single predecessor link to the MSPDI file.\n\n@param taskID The task UID\n@param type The predecessor type\n@param lag The lag duration\n@return A new link to be added to the MSPDI file"
]
| [
"Update the central directory signature of a .jar.\n\n@param file the file to process\n@param searchPattern the search patter to use\n@param badSkipBytes the bad bytes skip table\n@param newSig the new signature\n@param endSig the expected signature\n@throws IOException",
"Read task data from a PEP file.",
"remove the user profile with id from the db.",
"Process the timephased resource assignment data to work out the\nsplit structure of the task.\n\n@param task parent task\n@param timephasedComplete completed resource assignment work\n@param timephasedPlanned planned resource assignment work",
"Clears all scopes. Useful for testing and not getting any leak...",
"Write a Date attribute.\n\n@param name attribute name\n@param value attribute value",
"Method for reporting SQLException. This is used by\nthe treenodes if retrieving information for a node\nis not successful.\n@param message The message describing where the error occurred\n@param sqlEx The exception to be reported.",
"Use this API to fetch all the nslimitselector resources that are configured on netscaler.",
"Removes a tag from the task. Returns an empty data block.\n\n@param task The task to remove a tag from.\n@return Request object"
]
|
public static policydataset[] get(nitro_service service) throws Exception{
policydataset obj = new policydataset();
policydataset[] response = (policydataset[])obj.get_resources(service);
return response;
} | [
"Use this API to fetch all the policydataset resources that are configured on netscaler."
]
| [
"Use this context as prototype for a new mutable builder. The new builder is\npre-populated with the current settings of this context instance.",
"A loop driver for applying operations to all primary ClassNodes in\nour AST. Automatically skips units that have already been processed\nthrough the current phase.",
"Generate a schedule for the given start and end date.\n\n@param referenceDate The reference date (corresponds to \\( t = 0 \\).\n@param startDate The start date.\n@param endDate The end date.\n@return The schedule",
"Last caller of this method will unregister the Mbean. All callers\ndecrement the counter.",
"Find the index of the first matching element in the list\n@param element the element value to find\n@return the index of the first matching element, or <code>-1</code> if none found",
"Adds a word to the end of the token list\n@param word word which is to be added\n@return The new Token created around symbol",
"dst is just for log information",
"Returns the address for the operation.\n\n@param op the operation\n\n@return the operation address or a new undefined model node",
"Print a time value.\n\n@param value time value\n@return time value"
]
|
public void remove(RowKey key) {
currentState.put( key, new AssociationOperation( key, null, REMOVE ) );
} | [
"Removes the row with the specified key from this association.\n\n@param key the key of the association row to remove"
]
| [
"Write file creation record.\n\n@throws IOException",
"returns a sorted array of fields",
"You should use the server's time here. Otherwise you might get unexpected results.\n\nThe typical use case is:\n\n\n<pre>\nHTTPResponse response = ....\nHTTPRequest request = createRequest();\nrequest = request.conditionals(new Conditionals().ifModifiedSince(response.getLastModified());\n</pre>\n\n@param time the time to check.\n@return the conditionals with the If-Modified-Since date set.",
"Use this API to update sslcertkey resources.",
"Determines if entry is accepted. For normal usage, this means confirming that the key is\nneeded. For orphan usage, this simply means confirming the key belongs to the node.\n\n@param key\n@return true iff entry is accepted.",
"Performs a transpose across block sub-matrices. Reduces\nthe number of cache misses on larger matrices.\n\n*NOTE* If this is beneficial is highly dependent on the computer it is run on. e.g:\n- Q6600 Almost twice as fast as standard.\n- Pentium-M Same speed and some times a bit slower than standard.\n\n@param A Original matrix. Not modified.\n@param A_tran Transposed matrix. Modified.\n@param blockLength Length of a block.",
"Initializes custom prefix for all junit4 properties. This must be consistent\nacross all junit4 invocations if done from the same classpath. Use only when REALLY needed.",
"Build and return the complete URI containing values\nsuch as the document ID, attachment ID, and query syntax.",
"Use this API to enable Interface resources of given names."
]
|
public static base_responses add(nitro_service client, authenticationradiusaction resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
authenticationradiusaction addresources[] = new authenticationradiusaction[resources.length];
for (int i=0;i<resources.length;i++){
addresources[i] = new authenticationradiusaction();
addresources[i].name = resources[i].name;
addresources[i].serverip = resources[i].serverip;
addresources[i].serverport = resources[i].serverport;
addresources[i].authtimeout = resources[i].authtimeout;
addresources[i].radkey = resources[i].radkey;
addresources[i].radnasip = resources[i].radnasip;
addresources[i].radnasid = resources[i].radnasid;
addresources[i].radvendorid = resources[i].radvendorid;
addresources[i].radattributetype = resources[i].radattributetype;
addresources[i].radgroupsprefix = resources[i].radgroupsprefix;
addresources[i].radgroupseparator = resources[i].radgroupseparator;
addresources[i].passencoding = resources[i].passencoding;
addresources[i].ipvendorid = resources[i].ipvendorid;
addresources[i].ipattributetype = resources[i].ipattributetype;
addresources[i].accounting = resources[i].accounting;
addresources[i].pwdvendorid = resources[i].pwdvendorid;
addresources[i].pwdattributetype = resources[i].pwdattributetype;
addresources[i].defaultauthenticationgroup = resources[i].defaultauthenticationgroup;
addresources[i].callingstationid = resources[i].callingstationid;
}
result = add_bulk_request(client, addresources);
}
return result;
} | [
"Use this API to add authenticationradiusaction resources."
]
| [
"Utility method used to round a double to the given precision.\n\n@param value value to truncate\n@param precision Number of decimals to round to.\n@return double value",
"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.",
"Create a new remote proxy controller.\n\n@param client the transactional protocol client\n@param pathAddress the path address\n@param addressTranslator the address translator\n@param targetKernelVersion the {@link ModelVersion} of the kernel management API exposed by the proxied process\n@return the proxy controller",
"This implementation does not support the 'offset' and 'maxResultSize' parameters.",
"Check if the provided date or any date after it are part of the series.\n@param nextDate the current date to check.\n@param previousOccurrences the number of events of the series that took place before the date to check.\n@return <code>true</code> if more dates (including the provided one) could be in the series, <code>false</code> otherwise.",
"Use this API to unset the properties of aaaparameter resource.\nProperties that need to be unset are specified in args array.",
"Return the position of an element inside an array\n\n@param array the array where it looks for an element\n@param element the element to find in the array\n@param <T> the type of elements in the array\n@return the position of the element if it's found in the array, -1 otherwise",
"Processes graphical indicator definitions for each column.",
"Find out which method to call on the service bean."
]
|
public static final String hexdump(byte[] buffer, int offset, int length, boolean ascii, int columns, String prefix)
{
StringBuilder sb = new StringBuilder();
if (buffer != null)
{
int index = offset;
DecimalFormat df = new DecimalFormat("00000");
while (index < (offset + length))
{
if (index + columns > (offset + length))
{
columns = (offset + length) - index;
}
sb.append(prefix);
sb.append(df.format(index - offset));
sb.append(":");
sb.append(hexdump(buffer, index, columns, ascii));
sb.append('\n');
index += columns;
}
}
return (sb.toString());
} | [
"Dump raw data as hex.\n\n@param buffer buffer\n@param offset offset into buffer\n@param length length of data to dump\n@param ascii true if ASCII should also be printed\n@param columns number of columns\n@param prefix prefix when printing\n@return hex dump"
]
| [
"Update max min.\n\n@param n the n\n@param c the c",
"Get the hours difference",
"Set the end type as derived from other values.",
"Performs a get operation with the specified composite request object\n\n@param requestWrapper A composite request object containing the key (and\n/ or default value) and timeout.\n@return The Versioned value corresponding to the key",
"Returns the simplified name of the type of the specified object.",
"Check the given resource back into the pool\n\n@param key The key for the resource\n@param resource The resource",
"Read a nested table. Instantiates the supplied reader class to\nextract the data.\n\n@param reader table reader class\n@return table rows",
"Parses a single query facet item with query and label.\n@param prefix path to the query facet item (with trailing '/').\n@return the query facet item.",
"Revert all the working copy changes."
]
|
public GVRTexture getSplashTexture(GVRContext gvrContext) {
Bitmap bitmap = BitmapFactory.decodeResource( //
gvrContext.getContext().getResources(), //
R.drawable.__default_splash_screen__);
GVRTexture tex = new GVRTexture(gvrContext);
tex.setImage(new GVRBitmapImage(gvrContext, bitmap));
return tex;
} | [
"Override this method to supply a custom splash screen image.\n\n@param gvrContext\nThe new {@link GVRContext}\n@return Texture to display\n\n@since 1.6.4"
]
| [
"Reads all text up to next XML tag and returns it as a String.\n\n@return the String of the text read, which may be empty.",
"Main method, handles all the setup tasks for DataGenerator a user would normally do themselves\n\n@param args command line arguments",
"Samples a batch of indices in the range [0, numExamples) without replacement.",
"The conditional expectation is calculated using a Monte-Carlo regression technique.\n\n@param exerciseTime The exercise time\n@param model The valuation model\n@return The condition expectation estimator\n@throws CalculationException Thrown if underlying model failed to calculate stochastic process.",
"Deal with streams attached to an operation response from a proxied domain process.\n\n@param context the context of the operation\n@param responseNode the DMR response from the proxied process\n@param streams the streams associated with the response",
"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",
"Checks all data sets in a given record for constraint violations.\n\n@param record\nIIM record (1,2,3, ...) to check\n\n@return list of constraint violations, empty set if IIM file is valid",
"Update server mapping's host header\n\n@param serverMappingId ID of server mapping\n@param hostHeader value of host header\n@return updated ServerRedirect",
"Returns the logger name that should be used in the log manager.\n\n@param name the name of the logger from the resource\n\n@return the name of the logger"
]
|
public static void checkOperatorIsValid(int operatorCode) {
switch (operatorCode) {
case OPERATOR_LT:
case OPERATOR_LE:
case OPERATOR_EQ:
case OPERATOR_NE:
case OPERATOR_GE:
case OPERATOR_GT:
case OPERATOR_UNKNOWN:
return;
default:
throw new IllegalStateException(String.format(Locale.US, ERROR_INVALID_CODE, operatorCode));
}
} | [
"Checks if the given operator code is a valid one.\n\n@param operatorCode an operator code to evaluate\n@throws IllegalStateException if operatorCode is not a known operator code."
]
| [
"Use this API to fetch a vpnglobal_vpnnexthopserver_binding resources.",
"Set keyboard done listener to detect when the user click \"DONE\" on his keyboard\n\n@param listener IntlPhoneInputListener",
"Set the TableAlias for aPath\n@param aPath\n@param hintClasses\n@param TableAlias",
"of the unbound provider (",
"Use this API to rename a gslbservice resource.",
"To store an object in a quick & dirty way.",
"Visits a method instruction. A method instruction is an instruction that\ninvokes a method.\n\n@param opcode\nthe opcode of the type instruction to be visited. This opcode\nis either INVOKEVIRTUAL, INVOKESPECIAL, INVOKESTATIC or\nINVOKEINTERFACE.\n@param owner\nthe internal name of the method's owner class (see\n{@link Type#getInternalName() getInternalName}).\n@param name\nthe method's name.\n@param desc\nthe method's descriptor (see {@link Type Type}).\n@param itf\nif the method's owner class is an interface.",
"Retrieve a boolean field.\n\n@param type field type\n@return field data",
"Set the groups assigned to a path\n\n@param groups group IDs to set\n@param pathId ID of path"
]
|
public void reset() {
state = BreakerState.CLOSED;
isHardTrip = false;
byPass = false;
isAttemptLive = false;
notifyBreakerStateChange(getStatus());
} | [
"Manually set the breaker to be reset and ready for use. This\nis only useful after a manual trip otherwise the breaker will\ntrip automatically again if the service is still unavailable.\nJust like a real breaker. WOOT!!!"
]
| [
"generate a prepared DELETE-Statement for the Class\ndescribed by cld.\n@param cld the ClassDescriptor",
"Apply issues tracker info to a build info builder (used by generic tasks and maven2 which doesn't use the extractor",
"Append the text at the end of the File, using a specified encoding.\n\n@param file a File\n@param text the text to append at the end of the File\n@param charset the charset used\n@throws IOException if an IOException occurs.\n@since 1.0",
"Reads the CSS and JavaScript files from the JAR file and writes them to\nthe output directory.\n@param outputDirectory Where to put the resources.\n@throws IOException If the resources can't be read or written.",
"Create a model mbean from an object using the description given in the\nJmx annotation if present. Only operations are supported so far, no\nattributes, constructors, or notifications\n\n@param o The object to create an MBean for\n@return The ModelMBean for the given object",
"Enter information into the hidden input field.\n\n@param input The input to enter into the hidden field.",
"Method used to write the name of the scenarios methods\n\n@param word\n@return the same word starting with lower case",
"Sets the jdbc connection to use.\n\n@param jcd The connection to use\n@throws PlatformException If the target database cannot be handled with torque",
"This method displays the resource assignments for each resource. This time\nrather than just iterating through the list of all assignments in\nthe file, we extract the assignments on a resource-by-resource basis.\n\n@param file MPX file"
]
|
public static base_response update(nitro_service client, nspbr6 resource) throws Exception {
nspbr6 updateresource = new nspbr6();
updateresource.name = resource.name;
updateresource.action = resource.action;
updateresource.srcipv6 = resource.srcipv6;
updateresource.srcipop = resource.srcipop;
updateresource.srcipv6val = resource.srcipv6val;
updateresource.srcport = resource.srcport;
updateresource.srcportop = resource.srcportop;
updateresource.srcportval = resource.srcportval;
updateresource.destipv6 = resource.destipv6;
updateresource.destipop = resource.destipop;
updateresource.destipv6val = resource.destipv6val;
updateresource.destport = resource.destport;
updateresource.destportop = resource.destportop;
updateresource.destportval = resource.destportval;
updateresource.srcmac = resource.srcmac;
updateresource.protocol = resource.protocol;
updateresource.protocolnumber = resource.protocolnumber;
updateresource.vlan = resource.vlan;
updateresource.Interface = resource.Interface;
updateresource.priority = resource.priority;
updateresource.msr = resource.msr;
updateresource.monitor = resource.monitor;
updateresource.nexthop = resource.nexthop;
updateresource.nexthopval = resource.nexthopval;
updateresource.nexthopvlan = resource.nexthopvlan;
return updateresource.update_resource(client);
} | [
"Use this API to update nspbr6."
]
| [
"Send get request.\n\n@param url the url\n@param customHeaders the customHeaders\n@param params the params\n@return the string\n@throws URISyntaxException the uri syntax exception\n@throws IOException the io exception",
"Override the thread context ClassLoader with the environment's bean ClassLoader\nif necessary, i.e. if the bean ClassLoader is not equivalent to the thread\ncontext ClassLoader already.\n@param classLoaderToUse the actual ClassLoader to use for the thread context\n@return the original thread context ClassLoader, or {@code null} if not overridden",
"A smoothed step function. A cubic function is used to smooth the step between two thresholds.\n@param a the lower threshold position\n@param b the upper threshold position\n@param x the input parameter\n@return the output value",
"Constructs the path from FQCN, validates writability, and creates a writer.",
"Obtain the profile identifier.\n\n@param profileIdentifier Can be profile ID, or friendly name\n@return\n@throws Exception",
"Copies just the upper or lower triangular portion of a matrix.\n\n@param src Matrix being copied. Not modified.\n@param dst Where just a triangle from src is copied. If null a new one will be created. Modified.\n@param upper If the upper or lower triangle should be copied.\n@return The copied matrix.",
"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",
"Retrieves the avatar of a user as an InputStream.\n\n@return InputStream representing the user avater.",
"Extract schema of the key field"
]
|
public static String getModuleName(final String moduleId) {
final int splitter = moduleId.indexOf(':');
if(splitter == -1){
return moduleId;
}
return moduleId.substring(0, splitter);
} | [
"Split a module Id to get the module name\n@param moduleId\n@return String"
]
| [
"Returns the default output for functions without configured JSPs.\n\n@param request the current request\n@return the default HTML output",
"Use this API to fetch vpnsessionpolicy_aaauser_binding resources of given name .",
"The default field facets.\n\n@param categoryConjunction flag, indicating if category selections in the facet should be \"AND\" combined.\n@return the default field facets.",
"Gets a collection of all the email aliases for this user.\n\n<p>Note that the user's primary login email is not included in the collection of email aliases.</p>\n\n@return a collection of all the email aliases for this user.",
"Use this API to fetch appfwprofile_cookieconsistency_binding resources of given name .",
"Creates a simple deployment description.\n\n@param name the name for the deployment\n@param serverGroups the server groups\n\n@return the deployment description",
"Runs the print.\n\n@param args the cli arguments\n@throws Exception",
"Return the set of synchronized document _ids in a namespace\nthat have been paused due to an irrecoverable error.\n\n@param namespace the namespace to get paused document _ids for.\n@return the set of paused document _ids in a namespace",
"Returns an empty Search object in Json\n@return String\n@throws IOException"
]
|
public final void notifyContentItemRemoved(int position) {
if (position < 0 || position >= contentItemCount) {
throw new IndexOutOfBoundsException("The given position " + position
+ " is not within the position bounds for content items [0 - "
+ (contentItemCount - 1) + "].");
}
notifyItemRemoved(position + headerItemCount);
} | [
"Notifies that a content item is removed.\n\n@param position the position."
]
| [
"Private helper method which decodes the Stitch error from the body of an HTTP `Response`\nobject. If the error is successfully decoded, this function will throw the error for the end\nuser to eventually consume. If the error cannot be decoded, this is likely not an error from\nthe Stitch server, and this function will return an error message that the calling function\nshould use as the message of a StitchServiceException with an unknown code.",
"Returns a correlation matrix which has rank < n and for which the first n factors agree with the factors of correlationMatrix.\n\n@param correlationMatrix The given correlation matrix.\n@param numberOfFactors The requested number of factors (Eigenvectors).\n@return Factor reduced correlation matrix.",
"Reads timephased assignment data.\n\n@param calendar current calendar\n@param assignment assignment data\n@param type flag indicating if this is planned or complete work\n@return list of timephased resource assignment instances",
"Gets or creates id of the entity type.\n\n@param entityType entity type name.\n@param allowCreate if set to true and if there is no entity type like entityType,\ncreate the new id for the entityType.\n@return entity type id.",
"Checks to see if all the provided matrices are the expected size for an SVD. If an error is encountered\nthen an exception is thrown. This automatically handles compact and non-compact formats",
"Resolve the boot updates and register at the local HC.\n\n@param controller the model controller\n@param callback the completed callback\n@throws Exception for any error",
"Get a scalar value for the DOM diversity using the Robust Tree Edit Distance\n\n@param dom1\n@param dom2\n@return",
"Overloads the left shift operator to provide an easy way to append multiple\nobjects as string representations to a String.\n\n@param self a String\n@param value an Object\n@return a StringBuffer built from this string\n@since 1.0",
"Gets a byte within this sequence of bytes\n\n@param i index into sequence\n@return byte\n@throws IllegalArgumentException if i is out of range"
]
|
public List<Tag> getRootTags()
{
return this.definedTags.values().stream()
.filter(Tag::isRoot)
.collect(Collectors.toList());
} | [
"Returns the tags that were root in the definition files. These serve as entry point shortcuts when browsing the graph. We could reduce this to\njust fewer as the root tags may be connected through parents=\"...\"."
]
| [
"Returns a Span that covers all rows beginning with a prefix.",
"Creates a bridge accessory, capable of holding multiple child accessories. This has the\nadvantage over multiple standalone accessories of only requiring a single pairing from iOS for\nthe bridge.\n\n@param authInfo authentication information for this accessory. These values should be persisted\nand re-supplied on re-start of your application.\n@param label label for the bridge. This will show in iOS during pairing.\n@param manufacturer manufacturer of the bridge. This information is exposed to iOS for unknown\npurposes.\n@param model model of the bridge. This is also exposed to iOS for unknown purposes.\n@param serialNumber serial number of the bridge. Also exposed. Purposes also unknown.\n@return the bridge, from which you can {@link HomekitRoot#addAccessory add accessories} and\nthen {@link HomekitRoot#start start} handling requests.\n@throws IOException when mDNS cannot connect to the network",
"Starts the named animation.\n@see GVRAvatar#stop(String)\n@see GVRAnimationEngine#start(GVRAnimation)",
"Returns a new AWT BufferedImage from this image.\n\n@param type the type of buffered image to create, if not specified then defaults to the current image type\n@return a new, non-shared, BufferedImage with the same data as this Image.",
"Get the log if exists or return null\n\n@param topic topic name\n@param partition partition index\n@return a log for the topic or null if not exist",
"Use this API to fetch all the onlinkipv6prefix resources that are configured on netscaler.",
"Merge another AbstractTransition's states into this object, such that the other AbstractTransition\ncan be discarded.\n\n@param another\n@return true if the merge is successful.",
"Called on mouse up in the caption area, ends dragging by ending event\ncapture.\n\n@param event the mouse up event that ended dragging\n\n@see DOM#releaseCapture\n@see #beginDragging\n@see #endDragging",
"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"
]
|
public void registerDropPasteWorker(DropPasteWorkerInterface worker)
{
this.dropPasteWorkerSet.add(worker);
defaultDropTarget.setDefaultActions(
defaultDropTarget.getDefaultActions()
| worker.getAcceptableActions(defaultDropTarget.getComponent())
);
} | [
"Register a new DropPasteWorkerInterface.\n@param worker The new worker"
]
| [
"This method writes task data to a JSON file.\nNote that we write the task hierarchy in order to make rebuilding the hierarchy easier.",
"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.",
"Prints to a file. If the file does not exist, rewrites the file;\ndoes not append.",
"Finds the next valid line of words in the stream and extracts them.\n\n@return List of valid words on the line. null if the end of the file has been reached.\n@throws java.io.IOException",
"Re-maps a provided collection.\n\n@param <T_Result>\ntype of result\n@param <T_Source>\ntype of source\n@param source\nfor mapping\n@param mapper\nelement mapper\n@return mapped source",
"Add the set with given bundles to the \"Import-Package\" main attribute.\n\n@param importedPackages The set of all packages to add.",
"returns a sorted array of fields",
"Convert one project file format to another.\n\n@param inputFile input file\n@param outputFile output file\n@throws Exception",
"Ensure that a tool object is valid for creation. The API requires certain fields to be filled out.\nThrows an IllegalArgumentException if the conditions are not met.\n@param tool The external tool object we are trying to create"
]
|
public static boolean blockAligned( int blockLength , DSubmatrixD1 A ) {
if( A.col0 % blockLength != 0 )
return false;
if( A.row0 % blockLength != 0 )
return false;
if( A.col1 % blockLength != 0 && A.col1 != A.original.numCols ) {
return false;
}
if( A.row1 % blockLength != 0 && A.row1 != A.original.numRows) {
return false;
}
return true;
} | [
"Checks to see if the submatrix has its boundaries along inner blocks.\n\n@param blockLength Size of an inner block.\n@param A Submatrix.\n@return If it is block aligned or not."
]
| [
"Validate JUnit4 presence in a concrete version.",
"Arbitrarily resolve the inconsistency by choosing the first object if\nthere is one.\n\n@param values The list of objects\n@return A single value, if one exists, taken from the input list.",
"Configure all UI elements in the \"ending\"-options panel.",
"blocks until there is a connection",
"Helper method that encapsulates the logic to acquire a lock.\n\n@param jedis\nthe connection to Redis\n@param namespace\nthe Resque namespace\n@param lockName\nall calls to this method will contend for a unique lock with\nthe name of lockName\n@param timeout\nseconds until the lock will expire\n@param lockHolder\na unique string used to tell if you are the current holder of\na lock for both acquisition, and extension\n@return Whether or not the lock was acquired.",
"Sets the color for the big total between the column and row\n@param row row index (starting from 1)\n@param column column index (starting from 1)\n@param color",
"Adds tags to the If-Match header.\n\n@param tag the tag to add, may be null. This means the same as adding {@link Tag#ALL}\n@throws IllegalArgumentException if ALL is supplied more than once, or you add a null tag more than once.\n@return a new Conditionals object with the If-Match tag added.",
"Add a task to the project.\n\n@return new task instance",
"Write attributes for an individual custom field.\nNote that at present we are only writing a subset of the\navailable data... in this instance the field alias.\nIf the field does not have an alias we won't write an\nentry.\n\n@param field custom field to write\n@throws IOException"
]
|
private String[] getFksToThisClass()
{
String indTable = getCollectionDescriptor().getIndirectionTable();
String[] fks = getCollectionDescriptor().getFksToThisClass();
String[] result = new String[fks.length];
for (int i = 0; i < result.length; i++)
{
result[i] = indTable + "." + fks[i];
}
return result;
} | [
"prefix the this class fk columns with the indirection table"
]
| [
"Add an exception to a calendar.\n\n@param parentNode parent node\n@param exception calendar exceptions",
"Function to compute the bias gradient for batch convolution",
"Calculates the local translation and rotation for a bone.\nAssumes WorldRot and WorldPos have been calculated for the bone.",
"Validate arguments.",
"Method to initialize the list.\n\n@param resList a given instance or null\n@return an instance",
"Converts a value to the appropriate type.\n\n@param type target type\n@param value input value\n@return output value",
"A fairly basic 5-way classifier, that notes digits, and upper\nand lower case, mixed, and non-alphanumeric.\n\n@param s String to find word shape of\n@return Its word shape: a 5 way classification",
"This method takes an integer enumeration of a priority\nand returns an appropriate instance of this class. Note that unrecognised\nvalues are treated as medium priority.\n\n@param priority int version of the priority\n@return Priority class instance",
"Extract resource type from a resource ID string.\n@param id the resource ID string\n@return the resource type"
]
|
public static BufferedImage resizeToHeight(BufferedImage originalImage, int heightOut) {
int width = originalImage.getWidth();
int height = originalImage.getHeight();
int heightPercent = (heightOut * 100) / height;
int newWidth = (width * heightPercent) / 100;
BufferedImage resizedImage =
new BufferedImage(newWidth, heightOut, BufferedImage.TYPE_INT_ARGB);
Graphics2D g = resizedImage.createGraphics();
g.drawImage(originalImage, 0, 0, newWidth, heightOut, null);
g.dispose();
return resizedImage;
} | [
"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"
]
| [
"Resolve the single type argument of the given generic interface against\nthe given target class which is assumed to implement the generic interface\nand possibly declare a concrete type for its type variable.\n@param clazz the target class to check against\n@param genericIfc the generic interface or superclass to resolve the type argument from\n@return the resolved type of the argument, or {@code null} if not resolvable",
"Check the document field's type\nand object\n@param lhs The field to check\n@param rhs The type\n@return Expression: lhs $type rhs",
"Print classes that were parts of relationships, but not parsed by javadoc",
"Retrieve the value of a field using its alias.\n\n@param alias field alias\n@return field value",
"Waits the given amount of time in seconds for a managed domain to start. A domain is considered started when each\nof the servers in the domain are started unless the server is disabled.\n\n@param client the client used to communicate with the server\n@param startupTimeout the time, in seconds, to wait for the server start\n\n@throws InterruptedException if interrupted while waiting for the server to start\n@throws RuntimeException if the process has died\n@throws TimeoutException if the timeout has been reached and the server is still not started",
"The location for this elevation.\n\n@return",
"Returns a string that encodes the result of a method invocation.\nEffectively, this just removes any headers from the encoded response.\n\n@param encodedResponse\n@return string that encodes the result of a method invocation",
"Acquire the shared lock allowing the acquisition to be interrupted.\n@param permit - the permit Integer for this operation. May not be {@code null}.\n@throws InterruptedException - if the acquiring thread is interrupted.\n@throws IllegalArgumentException if {@code permit} is null.",
"Get the section list\n\nN.B. The section list contains the bottom sections\n@return the list of sections setted"
]
|
public void signIn(String key, WebSocketConnection connection) {
ConcurrentMap<WebSocketConnection, WebSocketConnection> bag = ensureConnectionList(key);
bag.put(connection, connection);
} | [
"Sign in a connection to the registry by key.\n\nNote multiple connections can be attached to the same key\n\n@param key\nthe key\n@param connection\nthe websocket connection\n@see #register(String, WebSocketConnection)"
]
| [
"Use this API to add dbdbprofile.",
"Get the schema for the Avro Record from the object container file",
"Delete the first n items from the list\n\n@param newStart the logsegment who's index smaller than newStart will be deleted.\n@return the deleted segment",
"Use this API to fetch the statistics of all authenticationvserver_stats resources that are configured on netscaler.",
"Read a two byte integer from the data.\n\n@param offset current offset into data block\n@param data data block\n@return int value",
"Use this API to delete route6.",
"Init the licenses cache\n\n@param licenses",
"Get all components of a specific class from this scene object and its descendants.\n@param type component type (as returned from getComponentType())\n@return ArrayList of components with the specified class.",
"Find all the node representing the entity.\n\n@param executionEngine the {@link GraphDatabaseService} used to run the query\n@return an iterator over the nodes representing an entity"
]
|
private void clearBeatGrids(DeviceAnnouncement announcement) {
final int player = announcement.getNumber();
// Iterate over a copy to avoid concurrent modification issues
for (DeckReference deck : new HashSet<DeckReference>(hotCache.keySet())) {
if (deck.player == player) {
hotCache.remove(deck);
if (deck.hotCue == 0) {
deliverBeatGridUpdate(player, null); // Inform listeners the beat grid is gone.
}
}
}
} | [
"We have received notification that a device is no longer on the network, so clear out all its beat grids.\n\n@param announcement the packet which reported the device’s disappearance"
]
| [
"Configure if you want this collapsible container to\naccordion its child elements or use expandable.",
"Constructs a Google APIs HTTP client with the associated credentials.",
"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",
"Recursively read the WBS structure from a PEP file.\n\n@param parent parent container for tasks\n@param id initial WBS ID",
"Similar to masking, checks that the range resulting from the bitwise or is contiguous.\n\n@param maskValue\n@param segmentPrefixLength\n@return\n@throws PrefixLenException",
"Curries a function that takes four arguments.\n\n@param function\nthe original function. May not be <code>null</code>.\n@param argument\nthe fixed first argument of {@code function}.\n@return a function that takes three arguments. Never <code>null</code>.",
"Detects Opera Mobile or Opera Mini.\n@return detection of an Opera browser for a mobile device",
"Clones the given field.\n\n@param fieldDef The field descriptor\n@param prefix A prefix for the name\n@return The cloned field",
"Use this API to delete locationfile."
]
|
@Override
public JavaClassBuilderAt at(TypeReferenceLocation... locations)
{
if (locations != null)
this.locations = Arrays.asList(locations);
return this;
} | [
"Only match if the TypeReference is at the specified location within the file."
]
| [
"Parses the provided file, using the given libraryPaths and sourcePaths as context. The libraries may be either\njar files or references to directories containing class files.\n\nThe sourcePaths must be a reference to the top level directory for sources (eg, for a file\nsrc/main/java/org/example/Foo.java, the source path would be src/main/java).\n\nThe wildcard resolver provides a fallback for processing wildcard imports that the underlying parser was unable\nto resolve.",
"Demonstrates obtaining the request history data from a test run",
"Extracts warnings that are returned in an API response.\n\n@param root\nroot node of the JSON result",
"Append the bounding volume particle positions, times and velocities to the existing mesh\nbefore creating a new scene object with this mesh attached to it.\nAlso, append every created scene object and its creation time to corresponding array lists.\n\n@param particlePositions\n@param particleVelocities\n@param particleTimeStamps",
"Extracts the words from a string. Words are seperated by a space character.\n\n@param line The line that is being parsed.\n@return A list of words contained on the line.",
"Returns the compression type of this kind of dump file using file suffixes\n\n@param fileName the name of the file\n@return compression type\n@throws IllegalArgumentException\nif the given dump file type is not known",
"refresh all deliveries dependencies for a particular product",
"Use this API to fetch dnsnsecrec resource of given name .",
"Checks if the DPI value is already set for GeoServer."
]
|
private NodeList getNodeList(String document, XPathExpression expression) throws Exception
{
Document doc = m_documentBuilder.parse(new InputSource(new StringReader(document)));
return (NodeList) expression.evaluate(doc, XPathConstants.NODESET);
} | [
"Retrieve a node list based on an XPath expression.\n\n@param document XML document to process\n@param expression compiled XPath expression\n@return node list"
]
| [
"Use this API to fetch all the dnssuffix resources that are configured on netscaler.",
"Given a layer ID, search for the WMS layer.\n\n@param layerId layer id\n@return WMS layer or null if layer is not a WMS layer",
"get the jdbcTypes from the Query or the ResultSet if not available from the Query\n@throws SQLException",
"This is the original, naive implementation, using the Wagner &\nFischer algorithm from 1974. It uses a flattened matrix for\nspeed, but still computes the entire matrix.",
"Returns the invocation handler object of the given proxy object.\n\n@param obj The object\n@return The invocation handler if the object is an OJB proxy, or <code>null</code>\notherwise",
"Use this API to unset the properties of snmpmanager resource.\nProperties that need to be unset are specified in args array.",
"Checks to see if a standalone server is running.\n\n@param client the client used to communicate with the server\n\n@return {@code true} if the server is running, otherwise {@code false}",
"Configure a new user defined field.\n\n@param fieldType field type\n@param dataType field data type\n@param name field name",
"Function to clear all the metadata related to the given store\ndefinitions. This is needed when a put on 'stores.xml' is called, thus\nreplacing the existing state.\n\nThis method is not thread safe. It is expected that the caller of this\nmethod will handle concurrency related issues.\n\n@param storeNamesToDelete"
]
|
public static String changeFirstLetterToLowerCase(String word) {
char[] letras = word.toCharArray();
char a = letras[0];
letras[0] = Character.toLowerCase(a);
return new String(letras);
} | [
"Method used to write the name of the scenarios methods\n\n@param word\n@return the same word starting with lower case"
]
| [
"Creates the next permutation in the sequence.\n\n@return An array containing the permutation. The returned array is modified each time this function is called.",
"Adds search fields from elements on a container page to a container page's document.\n@param document The document for the container page\n@param cms The current CmsObject\n@param resource The resource of the container page\n@param systemFields The list of field names for fields where mappings to should be discarded, since these fields are used system internally.\n@return the manipulated document",
"Returns true if \"file\" is a subfile or subdirectory of \"dir\".\n\nFor example with the directory /path/to/a, the following return values would occur:\n\n/path/to/a/foo.txt - true /path/to/a/bar/zoo/boo/team.txt - true /path/to/b/foo.txt - false",
"This is a method to stream slops to \"slop\" store when a node is detected\nfaulty in a streaming session\n\n@param key -- original key\n@param value -- original value\n@param storeName -- the store for which we are registering the slop\n@param failedNodeId -- the faulty node ID for which we register a slop\n@throws IOException",
"Writes an activity to a PM XML file.\n\n@param mpxj MPXJ Task instance",
"Deletes an entity by its primary key.\n\n@param id\nPrimary key of the entity.",
"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.",
"Sets the right padding character for all cells in the table.\n@param paddingRightChar new padding character, ignored if null\n@return this to allow chaining",
"For every String key, it registers the object as a parameter to make it available\nin the report.\n\n@param jd\n@param _parameters"
]
|
Map<Object, Object> getFilters() {
Map<Object, Object> result = new HashMap<Object, Object>(4);
result.put(TableProperty.KEY, m_table.getFilterFieldValue(TableProperty.KEY));
result.put(TableProperty.DEFAULT, m_table.getFilterFieldValue(TableProperty.DEFAULT));
result.put(TableProperty.DESCRIPTION, m_table.getFilterFieldValue(TableProperty.DESCRIPTION));
result.put(TableProperty.TRANSLATION, m_table.getFilterFieldValue(TableProperty.TRANSLATION));
return result;
} | [
"Returns the currently set filters in a map column -> filter.\n\n@return the currently set filters in a map column -> filter."
]
| [
"return a prepared Update Statement fitting to the given ClassDescriptor",
"Retrieve an instance of the ResourceField class based on the data read from an\nMS Project file.\n\n@param value value from an MS Project file\n@return ResourceField instance",
"Retrieve the default number of minutes per month.\n\n@return minutes per month",
"Given a file name and read-only storage format, tells whether the file\nname format is correct\n\n@param fileName The name of the file\n@param format The RO format\n@return true if file format is correct, else false",
"Cancel on target hosts.\n\n@param targetHosts\nthe target hosts\n@return true, if successful",
"Hides the Loader component",
"Create a SVG graphic with the give dimensions.\n\n@param size The size of the SVG graphic.",
"Returns a new List containing the given objects.",
"Adds all items from the iterable to the Collection.\n\n@param self the collection\n@param items the items to add\n@return true if the collection changed"
]
|
public ModelSource resolveModel( Parent parent )
throws UnresolvableModelException {
Dependency parentDependency = new Dependency();
parentDependency.setGroupId(parent.getGroupId());
parentDependency.setArtifactId(parent.getArtifactId());
parentDependency.setVersion(parent.getVersion());
parentDependency.setClassifier("");
parentDependency.setType("pom");
Artifact parentArtifact = null;
try
{
Iterable<ArtifactResult> artifactResults = depencencyResolver.resolveDependencies(
projectBuildingRequest, singleton(parentDependency), null, null );
Iterator<ArtifactResult> iterator = artifactResults.iterator();
if (iterator.hasNext()) {
parentArtifact = iterator.next().getArtifact();
}
} catch (DependencyResolverException e) {
throw new UnresolvableModelException( e.getMessage(), parent.getGroupId(), parent.getArtifactId(),
parent.getVersion(), e );
}
return resolveModel( parentArtifact.getGroupId(), parentArtifact.getArtifactId(), parentArtifact.getVersion() );
} | [
"Resolves the POM for the specified parent.\n\n@param parent the parent coordinates to resolve, must not be {@code null}\n@return The source of the requested POM, never {@code null}\n@since Apache-Maven-3.2.2 (MNG-5639)"
]
| [
"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",
"Answer the SQL-Clause for a FieldCriteria\n\n@param c FieldCriteria\n@param cld ClassDescriptor",
"Parses command line arguments.\n\n@param args\nArray of arguments, like the ones provided by\n{@code void main(String[] args)}\n@param objs\nOne or more objects with annotated public fields.\n@return A {@code List} containing all unparsed arguments (i.e. arguments\nthat are no switches)\n@throws IOException\nif a parsing error occurred.\n@see CmdArgument",
"Builds the HTML code for a select widget given a bean containing the select options\n\n@param htmlAttributes html attributes for the select widget\n@param options the bean containing the select options\n\n@return the HTML for the select box",
"Initialize the pattern choice button group.",
"Read correlation id from message.\n\n@param message the message\n@return the CorrelationId as string",
"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",
"Removes the specified type from the frame.",
"Returns an array of all the singular values in A sorted in ascending order\n\n@param A Matrix. Not modified.\n@return singular values"
]
|
private void throwExceptionIfSafetyRestrictionsAreViolated(CmsObject cms, CmsSolrQuery query, boolean isSpell)
throws CmsSearchException {
if (!isDebug(cms, query)) {
if (isSpell) {
if (m_handlerSpellDisabled) {
throw new CmsSearchException(Messages.get().container(Messages.GUI_HANDLER_REQUEST_NOT_ALLOWED_0));
}
} else {
if (m_handlerSelectDisabled) {
throw new CmsSearchException(Messages.get().container(Messages.GUI_HANDLER_REQUEST_NOT_ALLOWED_0));
}
int start = null != query.getStart() ? query.getStart().intValue() : 0;
int rows = null != query.getRows() ? query.getRows().intValue() : CmsSolrQuery.DEFAULT_ROWS.intValue();
if ((m_handlerMaxAllowedResultsAtAll >= 0) && ((rows + start) > m_handlerMaxAllowedResultsAtAll)) {
throw new CmsSearchException(
Messages.get().container(
Messages.GUI_HANDLER_TOO_MANY_RESULTS_REQUESTED_AT_ALL_2,
Integer.valueOf(m_handlerMaxAllowedResultsAtAll),
Integer.valueOf(rows + start)));
}
if ((m_handlerMaxAllowedResultsPerPage >= 0) && (rows > m_handlerMaxAllowedResultsPerPage)) {
throw new CmsSearchException(
Messages.get().container(
Messages.GUI_HANDLER_TOO_MANY_RESULTS_REQUESTED_PER_PAGE_2,
Integer.valueOf(m_handlerMaxAllowedResultsPerPage),
Integer.valueOf(rows)));
}
if ((null != m_handlerAllowedFields) && (Stream.of(m_handlerAllowedFields).anyMatch(x -> true))) {
if (query.getFields().equals(CmsSolrQuery.ALL_RETURN_FIELDS)) {
query.setFields(m_handlerAllowedFields);
} else {
for (String requestedField : query.getFields().split(",")) {
if (Stream.of(m_handlerAllowedFields).noneMatch(
allowedField -> allowedField.equals(requestedField))) {
throw new CmsSearchException(
Messages.get().container(
Messages.GUI_HANDLER_REQUESTED_FIELD_NOT_ALLOWED_2,
requestedField,
Stream.of(m_handlerAllowedFields).reduce("", (a, b) -> a + "," + b)));
}
}
}
}
}
}
} | [
"Throws an exception if the request can for security reasons not be performed.\nSecurity restrictions can be set via parameters of the index.\n\n@param cms the current context.\n@param query the query.\n@param isSpell flag, indicating if the spellcheck handler is requested.\n@throws CmsSearchException thrown if the query cannot be executed due to security reasons."
]
| [
"Given a HTTPResponce, process it, throwing an error if needed and return a Token for the next\nrequest.",
"Write 'properties' map to given log in given level - with pipe separator between each entry\nWrite exception stack trace to 'logger' in 'error' level, if not empty\n@param logger\n@param level - of logging",
"Generates a module regarding the parameters.\n\n@param name String\n@param version String\n@return Module",
"Return the basis functions for the regression suitable for this product.\n\n@param fixingDate The condition time.\n@param model The model\n@return The basis functions for the regression suitable for this product.\n@throws net.finmath.exception.CalculationException Thrown if the valuation fails, specific cause may be available via the <code>cause()</code> method.",
"Handle exceptions thrown by the storage. Exceptions specific to DELETE go\nhere. Pass other exceptions to the parent class.\n\nTODO REST-Server Add a new exception for this condition - server busy\nwith pending requests. queue is full",
"Construct a new uri by replacing query parameters in initialUri with the query parameters provided.\n\n@param initialUri the initial/template URI\n@param queryParams the new query parameters.",
"Process TestCaseFinishedEvent. Add steps and attachments from\ntop step from stepStorage to current testCase, then remove testCase\nand step from stores. Also remove attachments matches removeAttachments\nconfig.\n\n@param event to process",
"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",
"Gets the declared bean type\n\n@return The bean type"
]
|
public static protocolip_stats get(nitro_service service) throws Exception{
protocolip_stats obj = new protocolip_stats();
protocolip_stats[] response = (protocolip_stats[])obj.stat_resources(service);
return response[0];
} | [
"Use this API to fetch the statistics of all protocolip_stats resources that are configured on netscaler."
]
| [
"Marks the start of a query identified by the provided correlationId\n\n@param query - Query data\n@param correlationId - Identifier\n@return Start event to pass to the Events systems EventBus",
"Utility function that fetches user defined store definitions\n\n@param adminClient An instance of AdminClient points to given cluster\n@param nodeId Node id to fetch store definitions from\n@return The map container that maps store names to store definitions",
"Add the given query parameters.\n@param params the params\n@return this UriComponentsBuilder",
"Apply the layout to the each page in the list\n@param itemLayout item layout in the page\n@return true if the new layout is applied successfully, otherwise - false",
"Returns a map from a category path to the wrapper of all the sub-categories of the category with the path given as key.\n\n@return a map from a category path to all sub-categories of the path's category.",
"Add columns to be returned by the SELECT query. If no columns are selected then all columns are returned by\ndefault. For classes with id columns, the id column is added to the select list automagically. This can be called\nmultiple times to add more columns to select.\n\n<p>\n<b>WARNING:</b> If you specify any columns to return, then any foreign-collection fields will be returned as null\n<i>unless</i> their {@link ForeignCollectionField#columnName()} is also in the list.\n</p>",
"Perform a one-off scan during boot to establish deployment tasks to execute during boot",
"Recursively sort the supplied child tasks.\n\n@param container child tasks",
"Calculates the bounds of the non-transparent parts of the given image.\n@param p the image\n@return the bounds of the non-transparent area"
]
|
@Nonnull
public static Map<String, Integer> parseForcedGroups(@Nonnull final HttpServletRequest request) {
final String forceGroupsList = getForceGroupsStringFromRequest(request);
return parseForceGroupsList(forceGroupsList);
} | [
"Consumer is required to do any privilege checks before getting here\n\n@param request a {@link HttpServletRequest} which may contain forced groups parameters from URL, Header or Cookie.\n@return a map of test names to bucket values specified by the request. Returns an empty {@link Map} if nothing was specified"
]
| [
"Copied from AbstractEntityPersister",
"Use this API to fetch auditnslogpolicy_vpnvserver_binding resources of given name .",
"Ensure that the given connection is established.\n\n@param jedis\na connection to Redis\n@return true if the supplied connection was already connected",
"Use this API to fetch dnstxtrec resources of given names .",
"Run through the map and remove any references that have been null'd out by the GC.",
"note this string is used by hashCode",
"Add the extra parameters which are passed as report parameters. The type of the parameter is \"guessed\" from the\nfirst letter of the parameter name.\n\n@param model view model\n@param request servlet request",
"Sets the currency code, or the regular expression to select codes.\n\n@param codes the currency codes or code expressions, not null.\n@return the query for chaining.",
"Determines if this connection's access token has expired and needs to be refreshed.\n@return true if the access token needs to be refreshed; otherwise false."
]
|
private static BindingType map2BindingType(String bindingId) {
BindingType type;
if (SOAP11_BINDING_ID.equals(bindingId)) {
type = BindingType.SOAP11;
} else if (SOAP12_BINDING_ID.equals(bindingId)) {
type = BindingType.SOAP12;
} else if (JAXRS_BINDING_ID.equals(bindingId)) {
type = BindingType.JAXRS;
} else {
type = BindingType.OTHER;
}
return type;
} | [
"Maps a bindingId to its corresponding BindingType.\n@param bindingId\n@return"
]
| [
"Rotate root widget to make it facing to the front of the scene",
"Register the given mbean with the server\n\n@param server The server to register with\n@param mbean The mbean to register\n@param name The name to register under",
"get the converted object corresponding to sourceObject as converted to\ndestination type by converter\n\n@param converter\n@param sourceObject\n@param destinationType\n@return",
"Returns the type of the current member which is the type in the case of a field, the return type for a getter\nmethod, or the type of the parameter for a setter method.\n\n@return The member type\n@exception XDocletException if an error occurs",
"Logs the time taken by this rule and adds this to the total time taken for this phase",
"The default field facets.\n\n@param categoryConjunction flag, indicating if category selections in the facet should be \"AND\" combined.\n@return the default field facets.",
"Reads all text up to next XML tag and returns it as a String.\n\n@return the String of the text read, which may be empty.",
"Retrieves and validates the content length from the REST request.\n\n@return true if has content length",
"Returns the compact task records for all tasks with the given tag.\nTasks can have more than one tag at a time.\n\n@param tag The tag to fetch tasks from.\n@return Request object"
]
|
@Override
protected AbstractFilePickerFragment<File> getFragment(
final String startPath, final int mode, final boolean allowMultiple,
final boolean allowDirCreate, final boolean allowExistingFile,
final boolean singleClick) {
// startPath is allowed to be null.
// In that case, default folder should be SD-card and not "/"
String path = (startPath != null ? startPath
: Environment.getExternalStorageDirectory().getPath());
currentFragment = new BackHandlingFilePickerFragment();
currentFragment.setArgs(path, mode, allowMultiple, allowDirCreate,
allowExistingFile, singleClick);
return currentFragment;
} | [
"Return a copy of the new fragment and set the variable above."
]
| [
"Sets the the time of day\n\n@param hours the hours to set. Must be guaranteed to parse as an\ninteger between 0 and 23\n\n@param minutes the minutes to set. Must be guaranteed to parse as\nan integer between 0 and 59\n\n@param seconds the optional seconds to set. Must be guaranteed to parse as\nan integer between 0 and 59\n\n@param amPm the meridian indicator to use. Must be either 'am' or 'pm'\n\n@param zoneString the time zone to use in one of two formats:\n- zoneinfo format (America/New_York, America/Los_Angeles, etc)\n- GMT offset (+05:00, -0500, +5, etc)",
"Is the user password reset?\n\n@param user User to check\n@return boolean",
"Processes the most recent dump of the sites table to extract information\nabout registered sites.\n\n@return a Sites objects that contains the extracted information, or null\nif no sites dump was available (typically in offline mode without\nhaving any previously downloaded sites dumps)\n@throws IOException\nif there was a problem accessing the sites table dump or the\ndump download directory",
"Lookup the data-type associated with the class.\n\n@return The associated data-type interface or null if none found.",
"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",
"Used only for unit testing. Please do not use this method in other ways.\n\n@param key\n@return\n@throws Exception",
"Set a knot blend type.\n@param n the knot index\n@param type the knot blend type\n@see #getKnotBlend",
"Sinc function.\n\n@param x Value.\n@return Sinc of the value.",
"Create a new custom field setting on the project.\n\n@param project The project to associate the custom field with\n@return Request object"
]
|
protected void removeWatermark(URLTemplate itemUrl) {
URL watermarkUrl = itemUrl.build(this.getAPI().getBaseURL(), this.getID());
URL url = WATERMARK_URL_TEMPLATE.build(watermarkUrl.toString());
BoxAPIRequest request = new BoxAPIRequest(this.getAPI(), url, "DELETE");
BoxAPIResponse response = request.send();
response.disconnect();
} | [
"Removes a watermark from the item.\nIf the item did not have a watermark applied to it, a 404 Not Found will be returned by API.\n@param itemUrl url template for the item."
]
| [
"Parse a date time value.\n\n@param value String representation\n@return Date instance",
"2-D Complex Gabor function.\n\n@param x X axis coordinate.\n@param y Y axis coordinate.\n@param wavelength Wavelength.\n@param orientation Orientation.\n@param phaseOffset Phase offset.\n@param gaussVariance Gaussian variance.\n@param aspectRatio Aspect ratio.\n@return Gabor response.",
"Stores template parameters for OpenShiftAssistantTemplate.\n\n@param name template parameter name\n@param value template parameter value",
"Perform construction.\n\n@param callbackHandler",
"Returns a simple web page where certs can be downloaded. This is meant for mobile device setup.\n@return\n@throws Exception",
"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 CallableStatement with a proxy.\n@param target statement handle\n@param connectionHandle originating bonecp connection\n@return Proxy to a Callablestatement.",
"Adds an artifact to the module.\n\n<P>\nINFO: If the module is promoted, all added artifacts will be promoted.\n\n@param artifact Artifact",
"Returns a new color with a new value of the specified HSL\ncomponent."
]
|
public void addProperty(String name, String... values) {
List<String> valueList = new ArrayList<String>();
for (String value : values) {
valueList.add(value.trim());
}
properties.put(name.trim(), valueList);
} | [
"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>"
]
| [
"Use this API to update callhome.",
"Handles incoming Application Command Request.\n@param incomingMessage the request message to process.",
"Answer true if an Iterator for a Table is already available\n@param aTable\n@return",
"Initializes custom prefix for all junit4 properties. This must be consistent\nacross all junit4 invocations if done from the same classpath. Use only when REALLY needed.",
"Check whether error handling works. If it works, you should see an\nok, otherwise, you might see the actual error message and then\nthe program exits.",
"Set the buttons size.",
"Use this API to create sslfipskey resources.",
"Updates the terms and statements of the current document.\nThe updates are computed with respect to the current data in the document,\nmaking sure that no redundant deletions or duplicate insertions\nhappen. The references of duplicate statements will be merged. The labels\nand aliases in a given language are kept distinct.\n\n@param currentDocument\nthe document to be updated; needs to have a correct revision id and\nentity id\n@param addLabels\nlabels to be set on the item. They will overwrite existing values\nin the same language.\n@param addDescriptions\ndescription to be set on the item. They will overwrite existing values\nin the same language.\n@param addAliases\naliases to be added. Existing aliases will be kept.\n@param deleteAliases\naliases to be deleted.\n@param addStatements\nthe list of statements to be added or updated; statements with\nempty statement id will be added; statements with non-empty\nstatement id will be updated (if such a statement exists)\n@param deleteStatements\nthe list of statements to be deleted; statements will only be\ndeleted if they are present in the current document (in\nexactly the same form, with the same id)\n@param summary\nshort edit summary\n@return the updated document\n@throws MediaWikiApiErrorException\nif the API returns errors\n@throws IOException\nif there are any IO errors, such as missing network connection",
"The only properties added to a relationship are the columns representing the index of the association."
]
|
private static <T> void readFields(BufferedReader reader, DatabaseTableConfig<T> config) throws SQLException {
List<DatabaseFieldConfig> fields = new ArrayList<DatabaseFieldConfig>();
while (true) {
String line;
try {
line = reader.readLine();
} catch (IOException e) {
throw SqlExceptionUtil.create("Could not read next field from config file", e);
}
if (line == null || line.equals(CONFIG_FILE_FIELDS_END)) {
break;
}
DatabaseFieldConfig fieldConfig = DatabaseFieldConfigLoader.fromReader(reader);
if (fieldConfig == null) {
break;
}
fields.add(fieldConfig);
}
config.setFieldConfigs(fields);
} | [
"Read all of the fields information from the configuration file."
]
| [
"Verifies that the received image is identical to the original one.\n@param xopOriginal\n@param xopResponse",
"create a path structure representing the object graph",
"See also JLS8, 4.12.5 Initial Values of Variables.\n\n@param type\n@return the default value for the given type as defined by JLS",
"Gathers the pk fields from the hierarchy of the given class, and copies them into the class.\n\n@param classDef The root of the hierarchy\n@throws ConstraintException If there is a conflict between the pk fields",
"Create a Count-Query for QueryBySQL\n\n@param aQuery\n@return The count query",
"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",
"Use this API to update snmpalarm resources.",
"Returns the count of total number of unread inbox messages for the user\n@return int - count of all unread messages",
"Decompiles the given .class file and creates the specified output source file.\n\n@param classFilePath the .class file to be decompiled.\n@param outputDir The directory where decompiled .java files will be placed."
]
|
public void seekToMonth(String direction, String seekAmount, String month) {
int seekAmountInt = Integer.parseInt(seekAmount);
int monthInt = Integer.parseInt(month);
assert(direction.equals(DIR_LEFT) || direction.equals(DIR_RIGHT));
assert(monthInt >= 1 && monthInt <= 12);
markDateInvocation();
// set the day to the first of month. This step is necessary because if we seek to the
// current day of a month whose number of days is less than the current day, we will
// pushed into the next month.
_calendar.set(Calendar.DAY_OF_MONTH, 1);
// seek to the appropriate year
if(seekAmountInt > 0) {
int currentMonth = _calendar.get(Calendar.MONTH) + 1;
int sign = direction.equals(DIR_RIGHT) ? 1 : -1;
int numYearsToShift = seekAmountInt +
(currentMonth == monthInt ? 0 : (currentMonth < monthInt ? sign > 0 ? -1 : 0 : sign > 0 ? 0 : -1));
_calendar.add(Calendar.YEAR, (numYearsToShift * sign));
}
// now set the month
_calendar.set(Calendar.MONTH, monthInt - 1);
} | [
"seeks to a particular month\n\n@param direction the direction to seek: two possibilities\n'<' go backward\n'>' go forward\n\n@param seekAmount the amount to seek. Must be guaranteed to parse as an integer\n\n@param month the month to seek to. Must be guaranteed to parse as an integer\nbetween 1 and 12"
]
| [
"Attempts to clear the global log context used for embedded servers.",
"Do not call this method outside of activity!!!",
"Dumps the partition IDs per node in terms of zone n-ary type.\n\n@param cluster\n@param storeRoutingPlan\n@return pretty printed string of detailed zone n-ary type.",
"Begin writing a named list attribute.\n\n@param name attribute name",
"Compute a singular-value decomposition of A.\n\n@return A DoubleMatrix[3] array of U, S, V such that A = U * diag(S) * V'",
"map a property id. Property id can only be an Integer or String",
"Write a map field to the JSON file.\n\n@param fieldName field name\n@param value field value",
"Drop down selected view\n\n@param position position of selected item\n@param convertView View of selected item\n@param parent parent of selected view\n@return convertView",
"Asynchronous call that begins execution of the task\nand returns immediately."
]
|
public List<BoxComment.Info> getComments() {
URL url = GET_COMMENTS_URL_TEMPLATE.build(this.getAPI().getBaseURL(), this.getID());
BoxAPIRequest request = new BoxAPIRequest(this.getAPI(), url, "GET");
BoxJSONResponse response = (BoxJSONResponse) request.send();
JsonObject responseJSON = JsonObject.readFrom(response.getJSON());
int totalCount = responseJSON.get("total_count").asInt();
List<BoxComment.Info> comments = new ArrayList<BoxComment.Info>(totalCount);
JsonArray entries = responseJSON.get("entries").asArray();
for (JsonValue value : entries) {
JsonObject commentJSON = value.asObject();
BoxComment comment = new BoxComment(this.getAPI(), commentJSON.get("id").asString());
BoxComment.Info info = comment.new Info(commentJSON);
comments.add(info);
}
return comments;
} | [
"Gets a list of any comments on this file.\n\n@return a list of comments on this file."
]
| [
"Scan the segments to find the largest height value present.\n\n@return the largest waveform height anywhere in the preview.",
"Get the JSON representation of the metadata field filter.\n@return the JSON object representing the filter.",
"Remove contents from 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\n@return the hash of the uploaded deployment content\n@throws IOException\n@throws OperationFailedException",
"Recursively searches for formatting annotations.\n\n@param visitedTypes used to prevent an endless loop\n@param parameterName",
"Determines how many primary partitions each node within each zone should\nhave. The list of integers returned per zone is the same length as the\nnumber of nodes in that zone.\n\n@param nextCandidateCluster\n@param targetPartitionsPerZone\n@return A map of zoneId to list of target number of partitions per node\nwithin zone.",
"Reads a single byte from the input stream.",
"Use this API to unset the properties of coparameter resource.\nProperties that need to be unset are specified in args array.",
"returns the total count of objects in the GeneralizedCounter.",
"Calculates Sine value of the complex number.\n\n@param z1 A Complex Number instance.\n@return Returns new ComplexNumber instance containing the Sine value of the specified complex number."
]
|
void applyFreshParticleOnScreen(
@NonNull final Scene scene,
final int position
) {
final int w = scene.getWidth();
final int h = scene.getHeight();
if (w == 0 || h == 0) {
throw new IllegalStateException(
"Cannot generate particles if scene width or height is 0");
}
final double direction = Math.toRadians(random.nextInt(360));
final float dCos = (float) Math.cos(direction);
final float dSin = (float) Math.sin(direction);
final float x = random.nextInt(w);
final float y = random.nextInt(h);
final float speedFactor = newRandomIndividualParticleSpeedFactor();
final float radius = newRandomIndividualParticleRadius(scene);
scene.setParticleData(
position,
x,
y,
dCos,
dSin,
radius,
speedFactor);
} | [
"Set new point coordinates somewhere on screen and apply new direction\n\n@param position the point position to apply new values to"
]
| [
"Set a range of the colormap to a single color.\n@param firstIndex the position of the first color\n@param lastIndex the position of the second color\n@param color the color",
"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 resource.\n@param filename The name of the file to load.\n@return A string that represents the first part of the UA string eg java-cloudant/2.6.1",
"Returns Task field name of supplied code no.\n\n@param key - the code no of required Task field\n@return - field name",
"Writes all auxiliary triples that have been buffered recently. This\nincludes OWL property restrictions but it also includes any auxiliary\ntriples required by complex values that were used in snaks.\n\n@throws RDFHandlerException\nif there was a problem writing the RDF triples",
"Propagates the names of all facets to each single facet.",
"Stops this progress bar.",
"Initializes module enablement.\n\n@see ModuleEnablement",
"Common method for creating styles.\n\n@param template the template that the map is part of\n@param styleRef the style ref identifying the style\n@param <T> the source type",
"Process calendar hours.\n\n@param calendar parent calendar\n@param row calendar hours data\n@param dayIndex day index"
]
|
private void addMetadataProviderForMedia(String key, MetadataProvider provider) {
if (!metadataProviders.containsKey(key)) {
metadataProviders.put(key, Collections.newSetFromMap(new ConcurrentHashMap<MetadataProvider, Boolean>()));
}
Set<MetadataProvider> providers = metadataProviders.get(key);
providers.add(provider);
} | [
"Internal method that adds a metadata provider to the set associated with a particular hash key, creating the\nset if needed.\n\n@param key the hashKey identifying the media for which this provider can offer metadata (or the empty string if\nit can offer metadata for all media)\n@param provider the metadata provider to be added to the active set"
]
| [
"Byte run automaton map.\n\n@param automatonMap the automaton map\n@return the map",
"Return a set of all the Declaration matching the DeclarationFilter of the.\nLinker.\n\n@return a set of all the Declaration matching the DeclarationFilter of the\nLinker.",
"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",
"convert selector used in an upsert statement into a document",
"What is something came in between when we last checked and when this method is called",
"Notify our own event listeners of a Z-Wave event.\n@param event the event to send.",
"Return the class's name, possibly by stripping the leading path",
"Converts from partitionId to nodeId. The list of partition IDs,\npartitionIds, is expected to be a \"replicating partition list\", i.e., the\nmapping from partition ID to node ID should be one to one.\n\n@param partitionIds List of partition IDs for which to find the Node ID\nfor the Node that owns the partition.\n@return List of node ids, one for each partition ID in partitionIds\n@throws VoldemortException If multiple partition IDs in partitionIds map\nto the same Node ID.",
"Updates a metadata classification on the specified file.\n\n@param classificationType the metadata classification type.\n@return the new metadata classification type updated on the file."
]
|
private <Y> void checkObserverMethod(EnhancedAnnotatedMethod<T, Y> annotated) {
// Make sure exactly one and only one parameter is annotated with Observes or ObservesAsync
List<EnhancedAnnotatedParameter<?, Y>> eventObjects = annotated.getEnhancedParameters(Observes.class);
eventObjects.addAll(annotated.getEnhancedParameters(ObservesAsync.class));
if (this.reception.equals(Reception.IF_EXISTS) && declaringBean.getScope().equals(Dependent.class)) {
throw EventLogger.LOG.invalidScopedConditionalObserver(this, Formats.formatAsStackTraceElement(annotated.getJavaMember()));
}
if (eventObjects.size() > 1) {
throw EventLogger.LOG.multipleEventParameters(this, Formats.formatAsStackTraceElement(annotated.getJavaMember()));
}
EnhancedAnnotatedParameter<?, Y> eventParameter = eventObjects.iterator().next();
checkRequiredTypeAnnotations(eventParameter);
// Check for parameters annotated with @Disposes
List<?> disposeParams = annotated.getEnhancedParameters(Disposes.class);
if (disposeParams.size() > 0) {
throw EventLogger.LOG.invalidDisposesParameter(this, Formats.formatAsStackTraceElement(annotated.getJavaMember()));
}
// Check annotations on the method to make sure this is not a producer
// method, initializer method, or destructor method.
if (this.observerMethod.getAnnotated().isAnnotationPresent(Produces.class)) {
throw EventLogger.LOG.invalidProducer(this, Formats.formatAsStackTraceElement(annotated.getJavaMember()));
}
if (this.observerMethod.getAnnotated().isAnnotationPresent(Inject.class)) {
throw EventLogger.LOG.invalidInitializer(this, Formats.formatAsStackTraceElement(annotated.getJavaMember()));
}
boolean containerLifecycleObserverMethod = Observers.isContainerLifecycleObserverMethod(this);
for (EnhancedAnnotatedParameter<?, ?> parameter : annotated.getEnhancedParameters()) {
// if this is an observer method for container lifecycle event, it must not inject anything besides BeanManager
if (containerLifecycleObserverMethod && !parameter.isAnnotationPresent(Observes.class) && !parameter.isAnnotationPresent(ObservesAsync.class) && !BeanManager.class.equals(parameter.getBaseType())) {
throw EventLogger.LOG.invalidInjectionPoint(this, Formats.formatAsStackTraceElement(annotated.getJavaMember()));
}
}
} | [
"Performs validation of the observer method for compliance with the specifications."
]
| [
"This continuously tries to reconnect in a separate thread and will only stop if the connection was established\nsuccessfully or the server gets shutdown. If there is currently a reconnect task active the connection paramaters\nand callback will get updated.\n\n@param reconnectUri the updated connection uri\n@param authKey the updated authentication key\n@param callback the current callback",
"Prints out the interceptor chain in a format that is easy to read. It\nalso filters out instances of the DemoInterceptor so you can see what the\nchain would look like in a normal invokation.\n\n@param chain",
"Remove colProxy from list of pending collections and\nregister its contents with the transaction.",
"Use this API to unset the properties of nsrpcnode resources.\nProperties that need to be unset are specified in args array.",
"Adds mappings for each declared field in the mapped class. Any fields\nalready mapped by addColumn are skipped.",
"delegate to each contained OJBIterator and release\nits resources.",
"Read all task relationships from a GanttProject.\n\n@param gpProject GanttProject project",
"Determines the median value of the data set.\n@return If the number of elements is odd, returns the middle element.\nIf the number of elements is even, returns the midpoint of the two\nmiddle elements.\n@since 1.0.1",
"On host controller reload, remove a not running server registered in the process controller declared as down."
]
|
@Override public void setModel(TableModel model)
{
super.setModel(model);
int columns = model.getColumnCount();
TableColumnModel tableColumnModel = getColumnModel();
for (int index = 0; index < columns; index++)
{
tableColumnModel.getColumn(index).setPreferredWidth(m_columnWidth);
}
} | [
"Updates the model. Ensures that we reset the columns widths.\n\n@param model table model"
]
| [
"Saves the messages for all languages that were opened in the editor.\n\n@throws CmsException thrown if saving fails.",
"Create a style from a list of rules.\n\n@param styleRules the rules",
"Set the row, column, and value\n\n@return this",
"adds a CmsJspImageBean as hi-DPI variant to this image\n@param factor the variant multiplier, e.g. \"2x\" (the common retina multiplier)\n@param image the image to be used for this variant",
"Remove all controllers but leave input manager running.\n@return number of controllers removed",
"Updates the R matrix to take in account the removed row.",
"Set the maximum date limit.",
"Find the earliest start time of the specified methods.\n@param methods A list of test methods.\n@return The earliest start time.",
"Reads an argument of type \"astring\" from the request."
]
|
public static Enum<?> findMatchingEnumVal(Field field, String unknownEnumName) {
if (unknownEnumName == null || unknownEnumName.length() == 0) {
return null;
}
for (Enum<?> enumVal : (Enum<?>[]) field.getType().getEnumConstants()) {
if (enumVal.name().equals(unknownEnumName)) {
return enumVal;
}
}
throw new IllegalArgumentException("Unknwown enum unknown name " + unknownEnumName + " for field " + field);
} | [
"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."
]
| [
"Sets the underlying connect timeout in milliseconds.\nA value of 0 specifies an infinite timeout.\n@see okhttp3.OkHttpClient.Builder#connectTimeout(long, TimeUnit)",
"Adds is Null criteria,\ncustomer_id is Null\nThe attribute will NOT be translated into column name\n\n@param column The column name to be used without translation",
"Dump the buffer contents to a file\n@param file\n@throws IOException",
"Use this API to fetch all the appfwwsdl resources that are configured on netscaler.",
"Removes the task from the specified project. The task will still exist\nin the system, but it will not be in the project anymore.\n\nReturns an empty data block.\n\n@param task The task to remove from a project.\n@return Request object",
"Get the collection of the server groups\n\n@return Collection of active server groups",
"Calculates a column title using camel humps to separate words.\n@param _property the property descriptor.\n@return the column title for the given property.",
"Returns true if this entity's primary key is not null, and for numeric\nfields, is non-zero.",
"Determine the height of the preview given an index into it.\n\n@param segment the index of the waveform preview segment to examine\n@param front if {@code true} the height of the front (brighter) segment of a color waveform preview is returned,\notherwise the height of the back (dimmer) segment is returned. Has no effect for blue previews.\n\n@return a value from 0 to 31 representing the height of the waveform at that segment, which may be an average\nof a number of values starting there, determined by the scale"
]
|
@UiHandler("m_dateList")
void dateListValueChange(ValueChangeEvent<SortedSet<Date>> event) {
if (handleChange()) {
m_controller.setDates(event.getValue());
}
} | [
"Handle value change event on the individual dates list.\n@param event the change event."
]
| [
"Get the SuggestionsInterface.\n\n@return The SuggestionsInterface",
"Invokes the exit logger if and only if no ExitLogger was previously invoked.\n@param logger the logger. Cannot be {@code null}",
"Utility function to set the current value in a ListBox.\n\n@return returns true if the option corresponding to the value\nwas successfully selected in the ListBox",
"Gets a string attribute from a json object given a path to traverse.\n\n@param record a JSONObject to traverse.\n@param path the json path to follow.\n@return the attribute as a {@link String}, or null if it was not found.",
"Use this API to clear nssimpleacl.",
"This method tokenizes a string by space characters,\nbut ignores spaces in quoted parts,that are parts in\n'' or \"\". The method does allows the usage of \"\" in ''\nand '' in \"\". The space character between tokens is not\nreturned.\n\n@param s the string to tokenize\n@return the tokens",
"Update the list of buildpacks installed on an app\n\n@param appName See {@link #listApps} for a list of apps that can be used.\n@param buildpacks the new list of buildpack names or URLs.",
"Returns an ArrayList of String URLs of the Carousel Images\n@return ArrayList of Strings",
"Convert a name into initials.\n\n@param name source name\n@return initials"
]
|
public static boolean reconnect(final Jedis jedis, final int reconAttempts, final long reconnectSleepTime) {
int i = 1;
do {
try {
jedis.disconnect();
try {
Thread.sleep(reconnectSleepTime);
} catch (Exception e2) {
}
jedis.connect();
} catch (JedisConnectionException jce) {
} // Ignore bad connection attempts
catch (Exception e3) {
LOG.error("Unknown Exception while trying to reconnect to Redis", e3);
}
} while (++i <= reconAttempts && !testJedisConnection(jedis));
return testJedisConnection(jedis);
} | [
"Attempt to reconnect to Redis.\n\n@param jedis\nthe connection to Redis\n@param reconAttempts\nnumber of times to attempt to reconnect before giving up\n@param reconnectSleepTime\ntime in milliseconds to wait between attempts\n@return true if reconnection was successful"
]
| [
"Join to internal threads and wait millis time per thread or until all\nthreads are finished if millis is 0.\n\n@param millis the time to wait in milliseconds for the threads to join; a timeout of 0 means to wait forever.\n@throws InterruptedException if any thread has interrupted the current thread.\nThe interrupted status of the current thread is cleared when this exception is thrown.",
"Sets up and declares internal data structures.\n\n@param diag Diagonal elements from tridiagonal matrix. Modified.\n@param off Off diagonal elements from tridiagonal matrix. Modified.\n@param numCols number of columns (and rows) in the matrix.",
"Draws the specified image with the first rectangle's bounds, clipping with the second one.\n\n@param img image\n@param rect rectangle\n@param clipRect clipping bounds\n@param opacity opacity of the image (1 = opaque, 0= transparent)",
"Converts a vector from sample space into eigen space.\n\n@param sampleData Sample space data.\n@return Eigen space projection.",
"checks if a bean has been seen before in the dependencyPath. If not, it\nresolves the InjectionPoints and adds the resolved beans to the set of\nbeans to be validated",
"This must be called with the write lock held.\n@param requirement the requirement",
"Process field aliases.",
"Use this API to delete sslcertkey resources of given names.",
"Process task dependencies."
]
|
private static int med3(int a, int b, int c, IntComparator comp) {
int ab = comp.compare(a,b);
int ac = comp.compare(a,c);
int bc = comp.compare(b,c);
return (ab<0 ?
(bc<0 ? b : ac<0 ? c : a) :
(bc>0 ? b : ac>0 ? c : a));
} | [
"Returns the index of the median of the three indexed chars."
]
| [
"Finish the initialization.\n\n@param container\n@param isShutdownHookEnabled",
"Return the list of all the module submodules\n\n@param module\n@return List<DbModule>",
"Looks up the EJB in the container and executes the method on it\n\n@param self the proxy instance.\n@param method the overridden method declared in the super class or\ninterface.\n@param proceed the forwarder method for invoking the overridden method. It\nis null if the overridden method is abstract or declared in the\ninterface.\n@param args an array of objects containing the values of the arguments\npassed in the method invocation on the proxy instance. If a\nparameter type is a primitive type, the type of the array\nelement is a wrapper class.\n@return the resulting value of the method invocation.\n@throws Throwable if the method invocation fails.",
"Use this API to fetch nsrpcnode resource of given name .",
"This method lists all tasks defined in the file.\n\n@param file MPX file",
"retrieve a collection of type collectionClass matching the Query query\n\n@see org.apache.ojb.broker.PersistenceBroker#getCollectionByQuery(Class, Query)",
"Updates the terms and statements of the item document identified by the\ngiven item id. The updates are computed with respect to the current data\nfound online, making sure that no redundant deletions or duplicate insertions\nhappen. The references of duplicate statements will be merged. The labels\nand aliases in a given language are kept distinct.\n\n@param itemIdValue\nid of the document to be updated\n@param addLabels\nlabels to be set on the item. They will overwrite existing values\nin the same language.\n@param addDescriptions\ndescription to be set on the item. They will overwrite existing values\nin the same language.\n@param addAliases\naliases to be added. Existing aliases will be kept.\n@param deleteAliases\naliases to be deleted.\n@param addStatements\nthe list of statements to be added or updated; statements with\nempty statement id will be added; statements with non-empty\nstatement id will be updated (if such a statement exists)\n@param deleteStatements\nthe list of statements to be deleted; statements will only be\ndeleted if they are present in the current document (in\nexactly the same form, with the same id)\n@param summary\nshort edit summary\n@return the updated document\n@throws MediaWikiApiErrorException\nif the API returns errors\n@throws IOException\nif there are any IO errors, such as missing network connection",
"Initialize elements of the panel displayed for the deactivated widget.",
"Answer true if an Iterator for a Table is already available\n@param aTable\n@return"
]
|
public void addClass(ClassDescriptorDef classDef)
{
classDef.setOwner(this);
// Regardless of the format of the class name, we're using the fully qualified format
// This is safe because of the package & class naming constraints of the Java language
_classDefs.put(classDef.getQualifiedName(), classDef);
} | [
"Adds the class descriptor to this model.\n\n@param classDef The class descriptor\n@return The class descriptor or <code>null</code> if there is no such class in this model"
]
| [
"Stop announcing ourselves and listening for status updates.",
"Extracts warnings that are returned in an API response.\n\n@param root\nroot node of the JSON result",
"ten less than Cube Q",
"This method allows the caller to determine if a given date is a\nworking day. This method takes account of calendar exceptions.\n\n@param date Date to be tested\n@return boolean value",
"Matrix inverse for symmetric positive definite matrices. For small matrices an unrolled\ncholesky is used. Otherwise a standard decomposition.\n\n@see UnrolledCholesky_DDRM\n@see LinearSolverFactory_DDRM#chol(int)\n\n@param mat (Input) SPD matrix\n@param result (Output) Inverted matrix.\n@return true if it could invert the matrix false if it could not.",
"Unicast addresses allocated for private use\n\n@see java.net.InetAddress#isSiteLocalAddress()",
"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",
"Creates a collaboration whitelist for a Box User with a given ID.\n@param api the API connection to be used by the collaboration whitelist.\n@param userID the ID of the Box User to add to the collaboration whitelist.\n@return information about the collaboration whitelist created for user.",
"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."
]
|
public void addAccessory(HomekitAccessory accessory) {
if (accessory.getId() <= 1 && !(accessory instanceof Bridge)) {
throw new IndexOutOfBoundsException(
"The ID of an accessory used in a bridge must be greater than 1");
}
addAccessorySkipRangeCheck(accessory);
} | [
"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."
]
| [
"Adds the content info for the collected resources used in the \"This page\" publish dialog.",
"Retrieves the monthly or yearly relative day of the week.\n\n@return day of the week",
"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 new boolean matrix with true or false values selected with equal probability.\n\n@param numRow Number of rows in the new matrix.\n@param numCol Number of columns in the new matrix.\n@param rand Random number generator used to fill the matrix.\n@return The randomly generated matrix.",
"Grab random holiday from the equivalence class that falls between the two dates\n\n@param earliest the earliest date parameter as defined in the model\n@param latest the latest date parameter as defined in the model\n@return a holiday that falls between the dates",
"Retrieves the task mode.\n\n@return task mode",
"Process a text-based PP file.\n\n@param inputStream file input stream\n@return ProjectFile instance",
"Creates an immutable copy that we can cache.",
"Sets the publish queue shutdown time.\n\n@param publishQueueShutdowntime the shutdown time to set, parsed as <code>int</code>"
]
|
public static String createFirstLowCaseName(String scenarioDescription) {
String[] words = scenarioDescription.trim().split(" ");
String name = "";
for (int i = 0; i < words.length; i++) {
name += changeFirstLetterToCapital(words[i]);
}
return changeFirstLetterToLowerCase(name);
} | [
"Given a string with method or package name, creates a Class Name with no\nspaces and first letter lower case\n\n@param String\n- The name of the scenario/story. It should be in lower case.\n@returns String - The class name"
]
| [
"Remove all scene objects.",
"Sets the promotion state.\n\n<P>INFO: This method updates automatically all the contained artifacts.\n\n@param promoted boolean",
"Start the initialization.\n\n@param id\n@param manager\n@param bootstrap\n@return the initialized Weld container",
"Use this API to fetch transformpolicylabel resource of given name .",
"Generates an artifact regarding the parameters.\n\n<P> <b>WARNING:</b> The parameters grId/arId/version should be filled!!! Only classifier and type are not mandatory.\n\n@param groupId String\n@param artifactId String\n@param version String\n@param classifier String\n@param type String\n@param extension String\n@return Artifact",
"Read resource data.",
"This filter permit to return an image sized exactly as requested wherever is its ratio by\nfilling with chosen color the missing parts. Usually used with \"fit-in\" or \"adaptive-fit-in\"\n\n@param color integer representation of color.",
"Return the List of Arguments for the specified MethodCallExpression or a ConstructorCallExpression.\nThe returned List contains either ConstantExpression or MapEntryExpression objects.\n@param methodCall - the AST MethodCallExpression or ConstructorCalLExpression\n@return the List of argument objects",
"Compare the controlDOM and testDOM and save and return the differences in a list.\n\n@return list with differences"
]
|
public static systemglobal_authenticationldappolicy_binding[] get(nitro_service service) throws Exception{
systemglobal_authenticationldappolicy_binding obj = new systemglobal_authenticationldappolicy_binding();
systemglobal_authenticationldappolicy_binding response[] = (systemglobal_authenticationldappolicy_binding[]) obj.get_resources(service);
return response;
} | [
"Use this API to fetch a systemglobal_authenticationldappolicy_binding resources."
]
| [
"Create a new Time, with no date component.",
"If the resource has ordered child types, those child types will be stored in the attachment. If there are no\nordered child types, this method is a no-op.\n\n@param resourceAddress the address of the resource\n@param resource the resource which may or may not have ordered children.",
"Refresh's this connection's access token using its refresh token.\n@throws IllegalStateException if this connection's access token cannot be refreshed.",
"Gets the date time str.\n\n@param d\nthe d\n@return the date time str",
"Get a list of all active server mappings defined for current profile\n\n@return Collection of ServerRedirects",
"Convert this buffer to a java array.\n@return",
"Returns a TypeConverter for a given class.\n\n@param cls The class for which the TypeConverter should be fetched.",
"Remove all scene objects.",
"Visit all child nodes but not this one.\n\n@param visitor The visitor to use."
]
|
public static long raiseToPower(int value, int power)
{
if (power < 0)
{
throw new IllegalArgumentException("This method does not support negative powers.");
}
long result = 1;
for (int i = 0; i < power; i++)
{
result *= value;
}
return result;
} | [
"Calculate the first argument raised to the power of the second.\nThis method only supports non-negative powers.\n@param value The number to be raised.\n@param power The exponent (must be positive).\n@return {@code value} raised to {@code power}."
]
| [
"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",
"Returns true if conversion between the sourceType and targetType can be bypassed.\nMore precisely this method will return true if objects of sourceType can be\nconverted to the targetType by returning the source object unchanged.\n@param sourceType context about the source type to convert from (may be null if source is null)\n@param targetType context about the target type to convert to (required)\n@return true if conversion can be bypassed\n@throws IllegalArgumentException if targetType is null",
"Return the knot at a given position.\n@param x the position\n@return the knot number, or 1 if no knot found",
"Update the list of buildpacks installed on an app\n\n@param appName See {@link #listApps} for a list of apps that can be used.\n@param buildpacks the new list of buildpack names or URLs.",
"Whether the given grid dialect implements the specified facet or not.\n\n@param gridDialect the dialect of interest\n@param facetType the dialect facet type of interest\n@return {@code true} in case the given dialect implements the specified facet, {@code false} otherwise",
"Sets the global setting for this ID\n\n@param pathId ID of path\n@param global True if global, False otherwise",
"Reconnect the context if the RedirectException is valid.",
"Convert a string to a URL and fallback to classpath resource, if not convertible.\n\n@param s\nThe string to convert.\n\n@return The URL.",
"Send message to socket's output stream.\n\n@param messageToSend message to send.\n\n@return {@code true} if message was sent successfully, {@code false} otherwise."
]
|
public EmailAlias addEmailAlias(String email, boolean isConfirmed) {
URL url = EMAIL_ALIASES_URL_TEMPLATE.build(this.getAPI().getBaseURL(), this.getID());
BoxJSONRequest request = new BoxJSONRequest(this.getAPI(), url, "POST");
JsonObject requestJSON = new JsonObject()
.add("email", email);
if (isConfirmed) {
requestJSON.add("is_confirmed", isConfirmed);
}
request.setBody(requestJSON.toString());
BoxJSONResponse response = (BoxJSONResponse) request.send();
JsonObject responseJSON = JsonObject.readFrom(response.getJSON());
return new EmailAlias(responseJSON);
} | [
"Adds a new email alias to this user's account and confirms it without user interaction.\nThis functionality is only available for enterprise admins.\n@param email the email address to add as an alias.\n@param isConfirmed whether or not the email alias should be automatically confirmed.\n@return the newly created email alias."
]
| [
"Issue the database statements to create the table associated with a table configuration.\n\n@param connectionSource\nconnectionSource Associated connection source.\n@param tableConfig\nHand or spring wired table configuration. If null then the class must have {@link DatabaseField}\nannotations.\n@return The number of statements executed to do so.",
"returns a proxy or a fully materialized Object from the current row of the\nunderlying resultset.",
"return the ctc costs and gradients, given the probabilities and labels",
"Returns true if the class node represents a the class node for the Class class\nand if the parametrized type is a neither a placeholder or a wildcard. For example,\nthe class node Class<Foo> where Foo is a class would return true, but the class\nnode for Class<?> would return false.\n@param classNode a class node to be tested\n@return true if it is the class node for Class and its generic type is a real class",
"Write a duration field to the JSON file.\n\n@param fieldName field name\n@param value field value",
"Use this API to disable nsacl6 resources of given names.",
"Gets the date time str concise.\n\n@param d\nthe d\n@return the date time str concise",
"Ask the specified player for the specified waveform preview from the specified media slot, first checking if we\nhave a cached copy.\n\n@param dataReference uniquely identifies the desired waveform preview\n\n@return the preview, if it was found, or {@code null}\n\n@throws IllegalStateException if the WaveformFinder is not running",
"This method maps the task unique identifiers to their index number\nwithin the FixedData block.\n\n@param fieldMap field map\n@param taskFixedMeta Fixed meta data for this task\n@param taskFixedData Fixed data for this task\n@param taskVarData Variable task data\n@return Mapping between task identifiers and block position"
]
|
public Bundler put(String key, Serializable value) {
delegate.putSerializable(key, value);
return this;
} | [
"Inserts a Serializable value into the mapping of the underlying Bundle, replacing any existing\nvalue for the given key. Either key or value may be null.\n\n@param key a String, or null\n@param value a Serializable object, or null\n@return this bundler instance to chain method calls"
]
| [
"Saves the state of this connection to a string so that it can be persisted and restored at a later time.\n\n<p>Note that proxy settings aren't automatically saved or restored. This is mainly due to security concerns\naround persisting proxy authentication details to the state string. If your connection uses a proxy, you will\nhave to manually configure it again after restoring the connection.</p>\n\n@see #restore\n@return the state of this connection.",
"try to find the first none null table name for the given class-descriptor.\nIf cld has extent classes, all of these cld's searched for the first none null\ntable name.",
"If the belief its a count of some sort his counting its increased by one.\n\n@param bName\n- the name of the belief count.",
"Generate an IKVM map file.\n\n@param mapFileName map file name\n@param jarFile jar file containing code to be mapped\n@param mapClassMethods true if we want to produce .Net style class method names\n@throws IOException\n@throws XMLStreamException\n@throws ClassNotFoundException\n@throws IntrospectionException",
"Returns the yield value such that the sum of cash flows of the bond discounted with the yield curve\ncoincides with a given price.\n\n@param bondPrice The target price as double.\n@param model The model under which the product is valued.\n@return The optimal yield value.",
"This method extracts project extended attribute data from an MSPDI file.\n\n@param project Root node of the MSPDI file",
"Retrieve and validate the key from the REST request.\n\n@return true if present, false if missing",
"Initial setup of the service worker registration.",
"Request a scoped transactional token for a particular resource.\n@param accessToken application access token.\n@param scope scope of transactional token.\n@param resource resource transactional token has access to.\n@return a BoxAPIConnection which can be used to perform transactional requests."
]
|
public void setAngularLowerLimits(float limitX, float limitY, float limitZ) {
Native3DGenericConstraint.setAngularLowerLimits(getNative(), limitX, limitY, limitZ);
} | [
"Sets the lower limits for the \"moving\" body rotation relative to joint point.\n\n@param limitX the X axis lower rotation limit (in radians)\n@param limitY the Y axis lower rotation limit (in radians)\n@param limitZ the Z axis lower rotation limit (in radians)"
]
| [
"Attaches meta info about the current state of the device to an event.\nTypically, this meta is added only to the ping event.",
"Generic method used to create a field map from a block of data.\n\n@param data field map data",
"this method will be invoked after methodToBeInvoked is invoked",
"very big duct tape",
"Draw an elliptical interior with this color.\n\n@param rect rectangle in which ellipse should fit\n@param color colour to use for filling",
"Use this API to fetch cmppolicylabel_policybinding_binding resources of given name .",
"Write the domain controller data to a byte buffer.\n\n@param data the domain controller data\n@return the byte buffer\n@throws Exception",
"Hardcode a copy method as being valid. This should be used to tell Mutability Detector about\na method which copies a collection, and when the copy can be wrapped in an immutable wrapper\nwe can consider the assignment immutable. Useful for allowing Mutability Detector to correctly\nwork with other collections frameworks such as Google Guava. Reflection is used to obtain the\nmethod's descriptor and to verify the method's existence.\n\n@param fieldType - the type of the field to which the result of the copy is assigned\n@param fullyQualifiedMethodName - the fully qualified method name\n@param argType - the type of the argument passed to the copy method\n\n@throws MutabilityAnalysisException - if the specified class or method does not exist\n@throws IllegalArgumentException - if any of the arguments are null",
"Sets the jdbc connection to use.\n\n@param jcd The connection to use\n@throws PlatformException If the target database cannot be handled with torque"
]
|
private void exportModules() {
// avoid to export modules if unnecessary
if (((null != m_copyAndUnzip) && !m_copyAndUnzip.booleanValue())
|| ((null == m_copyAndUnzip) && !m_currentConfiguration.getDefaultCopyAndUnzip())) {
m_logStream.println();
m_logStream.println("NOT EXPORTING MODULES - you disabled copy and unzip.");
m_logStream.println();
return;
}
CmsModuleManager moduleManager = OpenCms.getModuleManager();
Collection<String> modulesToExport = ((m_modulesToExport == null) || m_modulesToExport.isEmpty())
? m_currentConfiguration.getConfiguredModules()
: m_modulesToExport;
for (String moduleName : modulesToExport) {
CmsModule module = moduleManager.getModule(moduleName);
if (module != null) {
CmsModuleImportExportHandler handler = CmsModuleImportExportHandler.getExportHandler(
getCmsObject(),
module,
"Git export handler");
try {
handler.exportData(
getCmsObject(),
new CmsPrintStreamReport(
m_logStream,
OpenCms.getWorkplaceManager().getWorkplaceLocale(getCmsObject()),
false));
} catch (CmsRoleViolationException | CmsConfigurationException | CmsImportExportException e) {
e.printStackTrace(m_logStream);
}
}
}
} | [
"Export the modules that should be checked in into git."
]
| [
"Use this API to add dnsaaaarec.",
"Creates necessary objects to make a chart an hyperlink\n\n@param design\n@param djlink\n@param chart\n@param name",
"Return the value of field in the data argument if it is not the default value for the class. If it is the default\nthen null is returned.",
"The context returned by this method may be later reused for other interception types.\n\n@param interceptionModel\n@param ctx\n@param manager\n@param type\n@return the interception context to be used for the AroundConstruct chain",
"This method is called by the client to load the most recent list of resources.\nThis method should only be called by the service client.\n\n@param result the most recent list of resources.",
"Retrieve all Collection attributes of a given instance, and make all of the Proxy Collections\n\n@param newObj the instance to be loaded or refreshed\n@param cld the ClassDescriptor of the instance\n@param forced if set to true, loading is forced even if cld differs",
"Given a String the method uses Regex to check if the String only contains punctuation characters\n\n@param s a String to check using regex\n@return true if the String is valid",
"See page 385 of Fundamentals of Matrix Computations 2nd",
"Set the horizontal and vertical alignment for the image when image gets cropped by resizing.\n\n@param valign Vertical alignment.\n@param halign Horizontal alignment.\n@throws IllegalStateException if image has not been marked for resize."
]
|
public static double Function1D(double x, double mean, double amplitude, double position, double width, double phase, double frequency) {
double envelope = mean + amplitude * Math.exp(-Math.pow((x - position), 2) / Math.pow((2 * width), 2));
double carry = Math.cos(2 * Math.PI * frequency * (x - position) + phase);
return envelope * carry;
} | [
"1-D Gabor function.\n\n@param x Value.\n@param mean Mean.\n@param amplitude Amplitude.\n@param position Position.\n@param width Width.\n@param phase Phase.\n@param frequency Frequency.\n@return Gabor response."
]
| [
"splits a string into a list of strings, ignoring the empty string",
"Sets the value for the API's \"sitefilter\" parameter based on the current\nsettings.\n\n@param properties\ncurrent setting of parameters",
"Check exactly the week check-boxes representing the given weeks.\n@param weeksToCheck the weeks selected.",
"Sets the size of a UIObject",
"Retrieve a FieldType instance based on an ID value from\nan MPP9 or MPP12 file.\n\n@param fieldID field ID\n@return FieldType instance",
"Copies the non-zero structure of orig into \"this\"\n@param orig Matrix who's structure is to be copied",
"Restores a trashed folder to a new location with a new name.\n@param folderID the ID of the trashed folder.\n@param newName an optional new name to give the folder. This can be null to use the folder's original name.\n@param newParentID an optional new parent ID for the folder. This can be null to use the folder's original\nparent.\n@return info about the restored folder.",
"Issue the database statements to create the table associated with a table configuration.\n\n@param connectionSource\nconnectionSource Associated connection source.\n@param tableConfig\nHand or spring wired table configuration. If null then the class must have {@link DatabaseField}\nannotations.\n@return The number of statements executed to do so.",
"Reads a nested table. Uses the supplied reader class instance.\n\n@param readerClass reader class instance\n@return table rows"
]
|
public final static void appendDecEntity(final StringBuilder out, final char value)
{
out.append("&#");
out.append((int)value);
out.append(';');
} | [
"Append the given char as a decimal HTML entity.\n\n@param out\nThe StringBuilder to write to.\n@param value\nThe character."
]
| [
"Add precedence -10 because we need that ContainerRegistry is available in the Arquillian scope.",
"Record a Screen View event\n@param screenName String, the name of the screen",
"Returns a list of files in given addon passing given filter.",
"Returns the real value object.",
"Subtract two complex numbers.\n\n@param z1 Complex Number.\n@param z2 Complex Number.\n@return Returns new ComplexNumber instance containing the subtract of specified complex numbers.",
"Get a misc file.\n\n@param root the root\n@param item the misc content item\n@return the misc file",
"Use this API to enable nsfeature.",
"Initializes the mode switcher.\n@param current the current edit mode",
"Verify JUnit presence and version."
]
|
public void getElevationAlongPath(PathElevationRequest req, ElevationServiceCallback callback) {
this.callback = callback;
JSObject doc = (JSObject) getJSObject().eval("document");
doc.setMember(getVariableName(), this);
StringBuilder r = new StringBuilder(getVariableName())
.append(".")
.append("getElevationAlongPath(")
.append(req.getVariableName())
.append(", ")
.append("function(results, status) {document.")
.append(getVariableName())
.append(".processResponse(results, status);});");
getJSObject().eval(r.toString());
} | [
"Create a request for elevations for samples along a path.\n\n@param req\n@param callback"
]
| [
"Displays a localized warning.\n@param caption the caption of the warning.\n@param description the description of the warning.",
"Creates a field map for tasks.\n\n@param props props data",
"Helper method that encapsulates the logic to acquire a lock.\n\n@param jedis\nthe connection to Redis\n@param namespace\nthe Resque namespace\n@param lockName\nall calls to this method will contend for a unique lock with\nthe name of lockName\n@param timeout\nseconds until the lock will expire\n@param lockHolder\na unique string used to tell if you are the current holder of\na lock for both acquisition, and extension\n@return Whether or not the lock was acquired.",
"Convert an ObjectBank to corresponding collection of data features and\nlabels.\n\n@return A List of pairs, one for each document, where the first element is\nan int[][][] representing the data and the second element is an\nint[] representing the labels.",
"Find the the qualified container port of the target service\nUses java annotations first or returns the container port.\n\n@param service\nThe target service.\n@param qualifiers\nThe set of qualifiers.\n\n@return Returns the resolved containerPort of '0' as a fallback.",
"Pause between cluster change in metadata and starting server rebalancing\nwork.",
"Process StepFinishedEvent. Change last added to stepStorage step\nand add it as child of previous step.\n\n@param event to process",
"Use this API to delete dnssuffix resources of given names.",
"High-accuracy Complementary normal distribution function.\n\n@param x Value.\n@return Result."
]
|
public final boolean roll(final LoggingEvent loggingEvent) {
for (int i = 0; i < this.fileRollables.length; i++) {
if (this.fileRollables[i].roll(loggingEvent)) {
return true;
}
}
return false;
} | [
"Delegates file rolling to composed objects.\n\n@see FileRollable#roll(org.apache.log4j.spi.LoggingEvent)"
]
| [
"Compose src onto dst using the alpha of sel to interpolate between the two.\nI can't think of a way to do this using AlphaComposite.\n@param src the source raster\n@param dst the destination raster\n@param sel the mask raster",
"Sets the right padding for all cells in the table.\n@param paddingRight new padding, ignored if smaller than 0\n@return this to allow chaining",
"Applies the given filter to each of the given elems, and returns the\nlist of elems that were accepted. The runtime type of the returned\narray is the same as the passed in array.",
"read messages beginning from offset\n\n@param offset next message offset\n@param length the max package size\n@return a MessageSet object with length data or empty\n@see MessageSet#Empty\n@throws IOException any exception",
"Merges this with the list of sections to produce the smallest array of sequential block subnets, going from smallest to largest\n\n@param sections the sections to merge with this\n@return",
"Get the active overrides with parameters and the active server group for a client\n\n@param profileID Id of profile to get configuration for\n@param clientUUID Client Id to export configuration\n@return SingleProfileBackup containing active overrides and active server group\n@throws Exception exception",
"Delivers the correct JSON Object for the dockers\n\n@param dockers\n@throws org.json.JSONException",
"Sets the global setting for this ID\n\n@param pathId ID of path\n@param global True if global, False otherwise",
"Signals that the processor to finish and waits until it finishes."
]
|
private Send handle(SelectionKey key, Receive request) {
final short requestTypeId = request.buffer().getShort();
final RequestKeys requestType = RequestKeys.valueOf(requestTypeId);
if (requestLogger.isTraceEnabled()) {
if (requestType == null) {
throw new InvalidRequestException("No mapping found for handler id " + requestTypeId);
}
String logFormat = "Handling %s request from %s";
requestLogger.trace(format(logFormat, requestType, channelFor(key).socket().getRemoteSocketAddress()));
}
RequestHandler handlerMapping = requesthandlerFactory.mapping(requestType, request);
if (handlerMapping == null) {
throw new InvalidRequestException("No handler found for request");
}
long start = System.nanoTime();
Send maybeSend = handlerMapping.handler(requestType, request);
stats.recordRequest(requestType, System.nanoTime() - start);
return maybeSend;
} | [
"Handle a completed request producing an optional response"
]
| [
"adds the qualified names to the require-bundle attribute, if not already\npresent.\n\n@param bundles - passing parameterized bundled (e.g. versions, etc.) is\nnot supported",
"Remove the nodes representing the entity and the embedded elements attached to it.\n\n@param executionEngine the {@link GraphDatabaseService} used to run the query\n@param columnValues the values of the key identifying the entity to remove",
"Check if the provided date or any date after it are part of the series.\n@param nextDate the current date to check.\n@param previousOccurrences the number of events of the series that took place before the date to check.\n@return <code>true</code> if more dates (including the provided one) could be in the series, <code>false</code> otherwise.",
"cleanup tx and prepare for reuse",
"An efficient method for exchanging data between two bit strings. Both bit strings must\nbe long enough that they contain the full length of the specified substring.\n@param other The bitstring with which this bitstring should swap bits.\n@param start The start position for the substrings to be exchanged. All bit\nindices are big-endian, which means position 0 is the rightmost bit.\n@param length The number of contiguous bits to swap.",
"Last caller of this method will unregister the Mbean. All callers\ndecrement the counter.",
"Get the connectivity state as reported by the Android system\n\n@param context Android context\n@return the connectivity state as reported by the Android system",
"Use this API to fetch all the dnssuffix resources that are configured on netscaler.",
"Deletes all of the Directories in root that match the FileFilter\n\n@param root\n@param filter"
]
|
protected AbstractElement getEnclosingSingleElementGroup(AbstractElement elementToParse) {
EObject container = elementToParse.eContainer();
if (container instanceof Group) {
if (((Group) container).getElements().size() == 1) {
return (AbstractElement) container;
}
}
return null;
} | [
"Return the containing group if it contains exactly one element.\n\n@since 2.14"
]
| [
"Check that the range resulting from the mask is contiguous, otherwise we cannot represent it.\n\nFor instance, for the range 0 to 3 (bits are 00 to 11), if we mask all 4 numbers from 0 to 3 with 2 (ie bits are 10),\nthen we are left with 1 and 3. 2 is not included. So we cannot represent 1 and 3 as a contiguous range.\n\nThe underlying rule is that mask bits that are 0 must be above the resulting range in each segment.\n\nAny bit in the mask that is 0 must not fall below any bit in the masked segment range that is different between low and high.\n\nAny network mask must eliminate the entire segment range. Any host mask is fine.\n\n@param maskValue\n@param segmentPrefixLength\n@return\n@throws PrefixLenException",
"Joins the given ranges into the fewest number of ranges.\nIf no joining can take place, the original array is returned.\n\n@param ranges\n@return",
"Returns a copy of the given document.\n@param document the document to copy.\n@return a copy of the given document.",
"Upload a file and attach it to a task\n\n@param task Globally unique identifier for the task.\n@param fileContent Content of the file to be uploaded\n@param fileName Name of the file to be uploaded\n@param fileType MIME type of the file to be uploaded\n@return Request object",
"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",
"Determines whether the object is a materialized object, i.e. no proxy or a\nproxy that has already been loaded from the database.\n\n@param object The object to test\n@return <code>true</code> if the object is materialized",
"Reads the configuration of a field facet.\n@param pathPrefix The XML Path that leads to the field facet configuration, or <code>null</code> if the XML was not correctly structured.\n@return The read configuration, or <code>null</code> if the XML was not correctly structured.",
"Factory method, validates the given triplet year, month and dayOfMonth.\n\n@param prolepticYear the International fixed proleptic-year\n@param month the International fixed month, from 1 to 13\n@param dayOfMonth the International fixed day-of-month, from 1 to 28 (29 for Leap Day or Year Day)\n@return the International fixed date\n@throws DateTimeException if the date is invalid",
"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"
]
|
public static boolean isSameStructure(DMatrixSparseCSC a , DMatrixSparseCSC b) {
if( a.numRows == b.numRows && a.numCols == b.numCols && a.nz_length == b.nz_length) {
for (int i = 0; i <= a.numCols; i++) {
if( a.col_idx[i] != b.col_idx[i] )
return false;
}
for (int i = 0; i < a.nz_length; i++) {
if( a.nz_rows[i] != b.nz_rows[i] )
return false;
}
return true;
}
return false;
} | [
"Checks to see if the two matrices have the same shape and same pattern of non-zero elements\n\n@param a Matrix\n@param b Matrix\n@return true if the structure is the same"
]
| [
"Gets a SerialMessage with the WAKE_UP_NO_MORE_INFORMATION command.\n@return the serial message",
"Use this API to fetch dnssuffix resource of given name .",
"Use this API to add snmpmanager resources.",
"This method computes the list of unnamed parameters, by filtering the\nlist of raw arguments, stripping out the named parameters.",
"Sets the locale for which the property should be read.\n\n@param locale the locale for which the property should be read.",
"Return the trimmed source line corresponding to the specified AST node\n\n@param node - the Groovy AST node",
"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",
"Add all elements in the iterable to the collection.\n\n@param target\n@param iterable\n@return true if the target was modified, false otherwise",
"This method is called to try to catch any invalid tasks that may have sneaked past all our other checks.\nThis is done by validating the tasks by task ID."
]
|
private void setObjectForStatement(PreparedStatement stmt, int index, Object value, int sqlType)
throws SQLException
{
if (value == null)
{
m_platform.setNullForStatement(stmt, index, sqlType);
}
else
{
m_platform.setObjectForStatement(stmt, index, value, sqlType);
}
} | [
"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"
]
| [
"Converts a time represented as an integer to a Date instance.\n\n@param time integer time\n@return Date instance",
"Initialize. create the httpClientStore, tcpClientStore",
"Helper method that encapsulates the minimum logic for adding a job to a\nqueue.\n\n@param jedis\nthe connection to Redis\n@param namespace\nthe Resque namespace\n@param queue\nthe Resque queue name\n@param jobJson\nthe job serialized as JSON",
"Creates a new broker instance.\n\n@param jcdAlias The jdbc connection descriptor name as defined in the repository\n@param user The user name to be used for connecting to the database\n@param password The password to be used for connecting to the database\n@return The persistence broker\n@see org.apache.ojb.broker.core.PersistenceBrokerFactoryIF#createPersistenceBroker(java.lang.String, java.lang.String, java.lang.String)",
"Creates a new section in a project.\n\nReturns the full record of the newly created section.\n\n@param project The project to create the section in\n@return Request object",
"Extract a list of time entries.\n\n@param shiftData string representation of time entries\n@return list of time entry rows",
"Set the time and value of the key at the given index\n@param keyIndex 0 based index of key\n@param time key time in seconds\n@param values key values",
"Searches the Html5ReportGenerator in Java path and instantiates the report",
"This method writes calendar data to an MSPDI file.\n\n@param project Root node of the MSPDI file"
]
|
public void deleteProduct(final String name) {
final DbProduct dbProduct = getProduct(name);
repositoryHandler.deleteProduct(dbProduct.getName());
} | [
"Deletes a product from the database\n\n@param name String"
]
| [
"Shutdown the socket server",
"First close the connection. Then reply.\n\n@param response\nthe response\n@param error\nthe error\n@param errorMessage\nthe error message\n@param stackTrace\nthe stack trace\n@param statusCode\nthe status code\n@param statusCodeInt\nthe status code int",
"Formats a connection string for CLI to use as it's controller connection.\n\n@return the controller string to connect CLI",
"Set the buttons size.",
"Create a new builder for multiple unpaginated requests on the view.\n\n@param keyType {@link com.cloudant.client.api.views.Key.Type} of the key emitted by the\nview\n@param valueType class of the type of value emitted by the view\n@param <K> type of key emitted by the view\n@param <V> type of value emitted by the view\n@return a new {@link MultipleRequestBuilder} for the database view specified by this\nViewRequestBuilder",
"Returns a fine-grained word shape classifier, that equivalence classes\nlower and upper case and digits, and collapses sequences of the\nsame type, but keeps all punctuation. This adds an extra recognizer\nfor a greek letter embedded in the String, which is useful for bio.",
"Total count of partition-stores moved in this task.\n\n@return number of partition stores moved in this task.",
"Retrieves the avatar of a user as an InputStream.\n\n@return InputStream representing the user avater.",
"Calculate a threshold.\n\n@param x first string.\n@param y second string.\n@param p the threshold coefficient.\n@return 2 maxLength(x, y) (1-p)"
]
|
public void setBackgroundColor(int color) {
setBackgroundColorR(Colors.byteToGl(Color.red(color)));
setBackgroundColorG(Colors.byteToGl(Color.green(color)));
setBackgroundColorB(Colors.byteToGl(Color.blue(color)));
setBackgroundColorA(Colors.byteToGl(Color.alpha(color)));
} | [
"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)}"
]
| [
"Construct an InterestRateSwapLegProductDescriptor from a node in a FIPXML file.\n\n@param leg The node containing the leg.\n@param forwardCurveName Forward curve name form outside the node.\n@param discountCurveName Discount curve name form outside the node.\n@param daycountConvention Daycount convention from outside the node.\n@return Descriptor of the swap leg.",
"This method populates the task model from data read from an MPX file.\n\n@param record data read from an MPX file\n@param isText flag indicating whether the textual or numeric data is being supplied",
"Use this API to delete gslbservice of given name.",
"Use this API to unset the properties of nslimitselector resources.\nProperties that need to be unset are specified in args array.",
"Returns a canonical type for a given class.\n\nIf the class is a raw type of a parameterized class, the matching {@link ParameterizedType} (with unresolved type\nvariables) is resolved.\n\nIf the class is an array then the component type of the array is canonicalized\n\nOtherwise, the class is returned.\n\n@return",
"Creates an element that represents an image drawn at the specified coordinates in the page.\n@param x the X coordinate of the image\n@param y the Y coordinate of the image\n@param width the width coordinate of the image\n@param height the height coordinate of the image\n@param type the image type: <code>\"png\"</code> or <code>\"jpeg\"</code>\n@param resource the image data depending on the specified type\n@return",
"Checks to see if every value in the matrix is the specified value.\n\n@param mat The matrix being tested. Not modified.\n@param val Checks to see if every element in the matrix has this value.\n@param tol True if all the elements are within this tolerance.\n@return true if the test passes.",
"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.",
"Merges the two classes into a single class. The smaller class is\nremoved, while the largest class is kept."
]
|
public static Method getSAMMethod(Class<?> c) {
// SAM = single public abstract method
// if the class is not abstract there is no abstract method
if (!Modifier.isAbstract(c.getModifiers())) return null;
if (c.isInterface()) {
Method[] methods = c.getMethods();
// res stores the first found abstract method
Method res = null;
for (Method mi : methods) {
// ignore methods, that are not abstract and from Object
if (!Modifier.isAbstract(mi.getModifiers())) continue;
// ignore trait methods which have a default implementation
if (mi.getAnnotation(Traits.Implemented.class)!=null) continue;
try {
Object.class.getMethod(mi.getName(), mi.getParameterTypes());
continue;
} catch (NoSuchMethodException e) {/*ignore*/}
// we have two methods, so no SAM
if (res!=null) return null;
res = mi;
}
return res;
} else {
LinkedList<Method> methods = new LinkedList();
getAbstractMethods(c, methods);
if (methods.isEmpty()) return null;
ListIterator<Method> it = methods.listIterator();
while (it.hasNext()) {
Method m = it.next();
if (hasUsableImplementation(c, m)) it.remove();
}
return getSingleNonDuplicateMethod(methods);
}
} | [
"returns the abstract method from a SAM type, if it is a SAM type.\n@param c the SAM class\n@return null if nothing was found, the method otherwise"
]
| [
"Validates this string is a valid address, and if not, throws an exception with a descriptive message indicating why it is not.\n@throws AddressStringException",
"Determines if the key replicates to the given node\n\n@param key\n@param nodeId\n@return true if the key belongs to the node as some replica",
"Use this API to fetch vpnvserver_appcontroller_binding resources of given name .",
"Gets the actual type arguments of a class\n\n@param clazz The class to examine\n@return The type arguments",
"Helper for reading a mandatory String value list - throwing an Exception if parsing fails.\n@param json The JSON object where the list should be read from.\n@param key The key of the value to read.\n@return The value from the JSON.\n@throws JSONException thrown when parsing fails.",
"Click no children of the specified parent element.\n\n@param tagName The tag name of which no children should be clicked.\n@return The builder to append more options.",
"Check local saved copy first ??. If Auth by username is available, then we will not need to make the API call.\n\n@throws FlickrException",
"Prepare a parallel HTTP OPTION Task.\n\n@param url\nthe UrlPostfix: e.g. in http://localhost:8080/index.html.,the url is \"/index.html\"\n@return the parallel task builder",
"Gets next node in the DAG which has no dependency or all of it's dependencies are resolved and\nready to be consumed.\n\n@return next node or null if all the nodes have been explored or no node is available at this moment."
]
|
public int getIndexFromOffset(int offset)
{
int result = -1;
for (int loop = 0; loop < m_offset.length; loop++)
{
if (m_offset[loop] == offset)
{
result = loop;
break;
}
}
return (result);
} | [
"This method converts an offset value into an array index, which in\nturn allows the data present in the fixed block to be retrieved. Note\nthat if the requested offset is not found, then this method returns -1.\n\n@param offset Offset of the data in the fixed block\n@return Index of data item within the fixed data block"
]
| [
"Calculate Median value.\n@param values Values.\n@return Median.",
"Physically close off the internal connection.\n@param conn",
"Generate a string with all selected checkboxes separated with ','.\n\n@return a string with all selected checkboxes",
"Recursively read the WBS structure from a PEP file.\n\n@param parent parent container for tasks\n@param id initial WBS ID",
"Get the values of the fields for an obj\nAutoincrement values are automatically set.\n@param fields\n@param obj\n@throws PersistenceBrokerException",
"Use this API to rename a nsacl6 resource.",
"Sends the collected dependencies over to the master and record them.",
"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.",
"This method tells you if a ClassNode implements or extends a certain class.\n@param node\nthe node\n@param target\nthe class\n@return\ntrue if the class node 'is a' target"
]
|
public boolean clearParameters() {
this.query = null;
this.fields = null;
this.scope = null;
this.fileExtensions = null;
this.createdRange = null;
this.updatedRange = null;
this.sizeRange = null;
this.ownerUserIds = null;
this.ancestorFolderIds = null;
this.contentTypes = null;
this.type = null;
this.trashContent = null;
this.metadataFilter = null;
this.sort = null;
this.direction = null;
return true;
} | [
"Clears the Parameters before performing a new search.\n@return this.true;"
]
| [
"Use this API to fetch all the ci resources that are configured on netscaler.",
"Get the number of views, comments and favorites on a photostream for a given date.\n\n@param date\n(Required) Stats will be returned for this date. A day according to Flickr Stats starts at midnight GMT for all users, and timestamps will\nautomatically be rounded down to the start of the day.\n@see \"http://www.flickr.com/services/api/flickr.stats.getPhotostreamStats.htm\"",
"Test the list of TimephasedWork instances to see\nif any of them have been modified.\n\n@param list list of TimephasedWork instances\n@return boolean flag",
"Return collection of path Ids in priority order\n\n@param profileId ID of profile\n@return collection of path Ids in priority order",
"Given a RendererViewHolder passed as argument and a position renders the view using the\nRenderer previously stored into the RendererViewHolder.\n\n@param viewHolder with a Renderer class inside.\n@param position to render.",
"Start check of execution time\n@param extra",
"Disable all overrides for a specified path\n\n@param pathID ID of path containing overrides\n@param clientUUID UUID of client",
"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",
"Creates an immutable map. A copy of the given map is used. As a result, it is safe to modify the source map afterwards.\n\n@param map the given map\n@return an immutable map"
]
|
public static csvserver_copolicy_binding[] get(nitro_service service, String name) throws Exception{
csvserver_copolicy_binding obj = new csvserver_copolicy_binding();
obj.set_name(name);
csvserver_copolicy_binding response[] = (csvserver_copolicy_binding[]) obj.get_resources(service);
return response;
} | [
"Use this API to fetch csvserver_copolicy_binding resources of given name ."
]
| [
"Stops all servers.\n\n{@inheritDoc}",
"Adds an HTTP header to this request.\n@param key the header key.\n@param value the header value.",
"Parses an item id\n\n@param id\nthe identifier of the entity, such as \"Q42\"\n@param siteIri\nthe siteIRI that this value refers to\n@throws IllegalArgumentException\nif the id is invalid",
"Return a list of the top 100 unique places clustered by a given placetype for a user.\n\n@param placeType\nUse Type-constants at {@link Place}\n@param woeId\nA Where On Earth (WOE) ID. Optional, can be null.\n@param placeId\nA Flickr Places ID. Optional, can be null.\n@param threshold\nThe minimum number of photos that a place type must have to be included. If the number of photos is lowered then the parent place type for\nthat place will be used. Optional, can be null.\n@param minUploadDate\nOptional, can be null.\n@param maxUploadDate\nOptional, can be null.\n@param minTakenDate\nOptional, can be null.\n@param maxTakenDate\nOptional, can be null.\n@return A PlacesList\n@throws FlickrException",
"Make a sort order for use in a query.",
"Append Join for SQL92 Syntax without parentheses",
"resolves a Field or Property node generics by using the current class and\nthe declaring class to extract the right meaning of the generics symbols\n@param an a FieldNode or PropertyNode\n@param type the origin type\n@return the new ClassNode with corrected generics",
"Add a EXISTS clause with a sub-query inside of parenthesis.\n\n<p>\n<b>NOTE:</b> The sub-query will be prepared at the same time that the outside query is.\n</p>",
"Creates and start an engine representing the node named as the given parameter.\n\n@param name\nname of the node, as present in the configuration (case sensitive)\n@param handler\ncan be null. A set of callbacks hooked on different engine life cycle events.\n@return an object allowing to stop the engine."
]
|
@SuppressWarnings("WeakerAccess")
public Map<DeckReference, BeatGrid> getLoadedBeatGrids() {
ensureRunning();
// Make a copy so callers get an immutable snapshot of the current state.
return Collections.unmodifiableMap(new HashMap<DeckReference, BeatGrid>(hotCache));
} | [
"Get the beat grids available for all tracks currently loaded in any player, either on the play deck, or\nin a hot cue.\n\n@return the beat grids associated with all current players, including for any tracks loaded in their hot cue slots\n\n@throws IllegalStateException if the BeatGridFinder is not running"
]
| [
"1-D Forward Discrete Hartley Transform.\n\n@param data Data.",
"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.",
"Map event type enum.\n\n@param eventType the event type\n@return the event type enum",
"Checks for duplicate elements. A is sorted\n@param A Matrix to be tested.\n@return true if duplicates or false if false duplicates",
"Set the menu view from a layout resource.\n\n@param layoutResId Resource ID to be inflated.",
"Sets Idle max age.\n\nThe time, for a connection to remain unused before it is closed off. Do not use aggressive values here!\n@param idleMaxAge time after which a connection is closed off\n@param timeUnit idleMaxAge time granularity.",
"Webkit based browsers require that we set the webkit-user-drag style\nattribute to make an element draggable.",
"Convert the continuous values into discrete values by chopping up\nthe distribution into several equally-sized intervals.",
"Gets the value of a global editor configuration parameter.\n\n@param cms the CMS context\n@param editor the editor name\n@param param the name of the parameter\n\n@return the editor parameter value"
]
|
private void handleGlobalArguments(CommandLine cmd) {
if (cmd.hasOption(CMD_OPTION_DUMP_LOCATION)) {
this.dumpDirectoryLocation = cmd
.getOptionValue(CMD_OPTION_DUMP_LOCATION);
}
if (cmd.hasOption(CMD_OPTION_OFFLINE_MODE)) {
this.offlineMode = true;
}
if (cmd.hasOption(CMD_OPTION_QUIET)) {
this.quiet = true;
}
if (cmd.hasOption(CMD_OPTION_CREATE_REPORT)) {
this.reportFilename = cmd.getOptionValue(CMD_OPTION_CREATE_REPORT);
}
if (cmd.hasOption(OPTION_FILTER_LANGUAGES)) {
setLanguageFilters(cmd.getOptionValue(OPTION_FILTER_LANGUAGES));
}
if (cmd.hasOption(OPTION_FILTER_SITES)) {
setSiteFilters(cmd.getOptionValue(OPTION_FILTER_SITES));
}
if (cmd.hasOption(OPTION_FILTER_PROPERTIES)) {
setPropertyFilters(cmd.getOptionValue(OPTION_FILTER_PROPERTIES));
}
if (cmd.hasOption(CMD_OPTION_LOCAL_DUMPFILE)) {
this.inputDumpLocation = cmd.getOptionValue(OPTION_LOCAL_DUMPFILE);
}
} | [
"Analyses the command-line arguments which are relevant for the\nserialization process in general. It fills out the class arguments with\nthis data.\n\n@param cmd\n{@link CommandLine} objects; contains the command line\narguments parsed by a {@link CommandLineParser}"
]
| [
"Loads a CRF classifier from a filepath, and returns it.\n\n@param file\nFile to load classifier from\n@return The CRF classifier\n\n@throws IOException\nIf there are problems accessing the input stream\n@throws ClassCastException\nIf there are problems interpreting the serialized data\n@throws ClassNotFoundException\nIf there are problems interpreting the serialized data",
"Creates a new deployment for the file. If the file is a directory the content will be deployed exploded using\nthe file system location.\n\n@param content the file containing the content\n\n@return the deployment",
"Converts an XML file to an object.\n\n@param fileName The filename where to save it to.\n@return The object.\n@throws FileNotFoundException On error.",
"Write to a context. Uses NullWritable for key so that only value of output string is ultimately written\n\n@param cr the DataPipe to write to",
"Process a relationship between two tasks.\n\n@param row relationship data",
"Returns the map from resourcetype names to default timestamp modes.\n@return the map from resourcetype names to default timestamp modes.",
"Retrieve the var data key for a specific field.\n\n@param type field type\n@return var data key",
"Returns the position for a given number of occurrences or NOT_FOUND if\nthis value is not found.\n\n@param nOccurrence\nnumber of occurrences\n@return the position for a given number of occurrences or NOT_FOUND if\nthis value is not found",
"Clears the dest ColumnBuffer and inserts all entries in dest where the timestamp passes the\ntimestampTest.\n\n@param dest Destination ColumnBuffer\n@param timestampTest Test to determine which timestamps get added to dest"
]
|
public int removeChildObjectsByName(final String name) {
int removed = 0;
if (null != name && !name.isEmpty()) {
removed = removeChildObjectsByNameImpl(name);
}
return removed;
} | [
"Removes any child object that has the given name by performing\ncase-sensitive search.\n\n@param name name of scene object to be removed.\n\n@return number of removed objects, 0 if none was found."
]
| [
"Creates a check box and adds it to the week panel and the checkboxes.\n@param internalValue the internal value of the checkbox\n@param labelMessageKey key for the label of the checkbox",
"Returns true if conversion between the sourceType and targetType can be bypassed.\nMore precisely this method will return true if objects of sourceType can be\nconverted to the targetType by returning the source object unchanged.\n@param sourceType context about the source type to convert from (may be null if source is null)\n@param targetType context about the target type to convert to (required)\n@return true if conversion can be bypassed\n@throws IllegalArgumentException if targetType is null",
"This method is used by JNI, do not call or modify.\n\n@param type the type\n@param number the number",
"Remove a misc file.\n\n@param name the file name\n@param path the relative path\n@param existingHash the existing hash\n@param isDirectory whether the file is a directory or not\n@return the builder",
"Sets the underlying write timeout in milliseconds.\nA value of 0 specifies an infinite timeout.\n@see okhttp3.OkHttpClient.Builder#writeTimeout(long, TimeUnit)",
"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",
"Updates the given integer belief\nadding the given integer\nnewBelief = previousBelief + givenValue\n\n@param String - the belief name\n@param the value to add",
"Use this API to fetch all the cacheobject resources that are configured on netscaler.",
"Find the the qualified container port of the target service\nUses java annotations first or returns the container port.\n\n@param service\nThe target service.\n@param qualifiers\nThe set of qualifiers.\n\n@return Returns the resolved containerPort of '0' as a fallback."
]
|
public static String unexpand(CharSequence self, int tabStop) {
String s = self.toString();
if (s.length() == 0) return s;
try {
StringBuilder builder = new StringBuilder();
for (String line : readLines((CharSequence) s)) {
builder.append(unexpandLine(line, tabStop));
builder.append("\n");
}
// remove the normalized ending line ending if it was not present
if (!s.endsWith("\n")) {
builder.deleteCharAt(builder.length() - 1);
}
return builder.toString();
} catch (IOException e) {
/* ignore */
}
return s;
} | [
"Replaces sequences of whitespaces with tabs.\n\n@param self A CharSequence to unexpand\n@param tabStop The number of spaces a tab represents\n@return an unexpanded String\n@since 1.8.2"
]
| [
"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",
"Removes statement ids from a collection of statement groups.\n@param statementIds\n@param claims\n@return",
"Alternate version of autoGeneratedKeys.\n@param sql\n@param autoGeneratedKeys\n@return cache key to use.",
"Throws if the given file is null, is not a file or directory, or is an empty directory.",
"Creates a directory at the given path if it does not exist yet and if the\ndirectory manager was not configured for read-only access.\n\n@param path\n@throws IOException\nif it was not possible to create a directory at the given\npath",
"Check if the the nodeId is present in the cluster managed by the metadata store\nor throw an exception.\n\n@param nodeId The nodeId to check existence of",
"Create a host target.\n\n@param hostName the host name\n@param client the connected controller client to the master host.\n@return the remote target",
"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}.",
"Estimate excluded volume fraction by monte carlo method\n@return excluded volume fraction"
]
|
private String getNotes(List<MapRow> rows)
{
String result = null;
if (rows != null && !rows.isEmpty())
{
StringBuilder sb = new StringBuilder();
for (MapRow row : rows)
{
sb.append(row.getString("TITLE"));
sb.append('\n');
sb.append(row.getString("TEXT"));
sb.append("\n\n");
}
result = sb.toString();
}
return result;
} | [
"Common mechanism to convert Synchro commentary recorss into notes.\n\n@param rows commentary table rows\n@return note text"
]
| [
"Retrieve and validate the zone id value from the REST request.\n\"X-VOLD-Zone-Id\" is the zone id header.\n\n@return valid zone id or -1 if there is no/invalid zone id",
"Might not fill all of dst.",
"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",
"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",
"Create a deep copy.\n\n@param bindAddress overwrites bind address when creating deep copy.\n@return a copy of the server setup configuration.",
"Replaces an existing metadata value.\n@param path the path that designates the key. Must be prefixed with a \"/\".\n@param value the value.\n@return this metadata object.",
"Restores a trashed file back to its original location.\n@param fileID the ID of the trashed file.\n@return info about the restored file.",
"Retrieve the set of start dates represented by this recurrence data.\n\n@return array of start dates",
"remove a converted object from the pool\n\n@param converter\n@param sourceObject\n@param destinationType"
]
|
public void resizeKeys(int numKeys)
{
int n = numKeys * mFloatsPerKey;
if (mKeys.length == n)
{
return;
}
float[] newKeys = new float[n];
n = Math.min(n, mKeys.length);
System.arraycopy(mKeys, 0, newKeys, 0, n);
mKeys = newKeys;
mFloatInterpolator.setKeyData(mKeys);
} | [
"Resize the key data area.\nThis function will truncate the keys if the\ninitial setting was too large.\n\n@oaran numKeys the desired number of keys"
]
| [
"Adds steps types from given injector and recursively its parent\n\n@param injector the current Inject\n@param types the List of steps types",
"Recursively write tasks.\n\n@param tasks list of tasks\n@throws IOException",
"Deletes the disabled marker file in the directory of the specified version.\n\n@param version to enable\n@throws PersistenceFailureException if the marker file could not be deleted (can happen if\nthe storage system has become read-only or is otherwise\ninaccessible).",
"Set the method arguments for an enabled method override\n\n@param pathName Path name\n@param methodName Fully qualified method name\n@param ordinal 1-based index of the override within the overrides of type methodName\n@param arguments Array of arguments to set(specify all arguments)\n@return true if success, false otherwise",
"Roll the years forward or backward.\n\n@param startDate - The start date\n@param years - Negative to rollbackwards.",
"Get info for a given topic reply\n\n@param topicId\nUnique identifier of a topic for a given group {@link Topic}.\n@param replyId\nUnique identifier of a reply for a given topic {@link Reply}.\n@return A group topic\n@throws FlickrException\n@see <a href=\"http://www.flickr.com/services/api/flickr.groups.discuss.replies.getInfo.html\">API Documentation</a>",
"used for encoding url path segment",
"Writes the timephased data for a resource assignment.\n\n@param mpx MPXJ assignment\n@param xml MSDPI assignment",
"Call the constructor for the given class, inferring the correct types for\nthe arguments. This could be confusing if there are multiple constructors\nwith the same number of arguments and the values themselves don't\ndisambiguate.\n\n@param klass The class to construct\n@param args The arguments\n@return The constructed value"
]
|
public OAuth1RequestToken exchangeAuthToken(String authToken) throws FlickrException {
// Use TreeMap so keys are automatically sorted alphabetically
Map<String, String> parameters = new TreeMap<String, String>();
parameters.put("method", METHOD_EXCHANGE_TOKEN);
parameters.put(Flickr.API_KEY, apiKey);
// This method call must be signed using Flickr (not OAuth) style signing
parameters.put("api_sig", getSignature(sharedSecret, parameters));
Response response = transportAPI.getNonOAuth(transportAPI.getPath(), parameters);
if (response.isError()) {
throw new FlickrException(response.getErrorCode(), response.getErrorMessage());
}
OAuth1RequestToken accessToken = constructToken(response);
return accessToken;
} | [
"Exchange an auth token from the old Authentication API, to an OAuth access token.\n\nCalling this method will delete the auth token used to make the request.\n\n@param authToken\n@throws FlickrException\n@see \"http://www.flickr.com/services/api/flickr.auth.oauth.getAccessToken.html\""
]
| [
"Deletes this collaboration whitelist.",
"Adds a procedure argument definition to this class descriptor.\n\n@param argDef The procedure argument definition",
"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 whitespace might not be correct.\n\n\n@param lead\nthe lead string\n@param format\nThe string format pattern\n@param args\nThe string format arguments",
"Use this API to fetch all the clusternodegroup resources that are configured on netscaler.",
"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",
"Records the result of updating a server.\n\n@param server the id of the server. Cannot be <code>null</code>\n@param response the result of the updates",
"Convert a URL Encoded name back to the original form.\n@param name the name to URL urlDecode.\n@param encoding the string encoding to be used (i.e. UTF-8)\n@return the name in original form.\n@throws UnsupportedEncodingException if the encoding is not supported.",
"make it public for CLI interaction to reuse JobContext",
"Calculate the child size along the axis\n@param dataIndex data index\n@param axis {@link Axis}\n@return child size"
]
|
private int[] convertBatch(int[] batch) {
int[] conv = new int[batch.length];
for (int i=0; i<batch.length; i++) {
conv[i] = sample[batch[i]];
}
return conv;
} | [
"Converts a batch indexing into the sample, to a batch indexing into the\noriginal function.\n\n@param batch The batch indexing into the sample.\n@return A new batch indexing into the original function, containing only\nthe indices from the sample."
]
| [
"This method extracts calendar data from a Phoenix file.\n\n@param phoenixProject Root node of the Phoenix file",
"Use this API to delete lbroute.",
"Redirect standard streams so that the output can be passed to listeners.",
"Initialize. create the httpClientStore, tcpClientStore",
"Executes the API action \"wbremoveclaims\" for the given parameters.\n\n@param statementIds\nthe statement ids to delete\n@param bot\nif true, edits will be flagged as \"bot edits\" provided that\nthe logged in user is in the bot group; for regular users, the\nflag will just be ignored\n@param baserevid\nthe revision of the data that the edit refers to or 0 if this\nshould not be submitted; when used, the site will ensure that\nno edit has happened since this revision to detect edit\nconflicts; it is recommended to use this whenever in all\noperations where the outcome depends on the state of the\nonline data\n@param summary\nsummary for the edit; will be prepended by an automatically\ngenerated comment; the length limit of the autocomment\ntogether with the summary is 260 characters: everything above\nthat limit will be cut off\n@return the JSON response from the API\n@throws IOException\nif there was an IO problem. such as missing network\nconnection\n@throws MediaWikiApiErrorException\nif the API returns an error\n@throws IOException\n@throws MediaWikiApiErrorException",
"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",
"Use this API to renumber nspbr6 resources.",
"Generate attachment extension from mime type\n\n@param type valid mime-type\n@return extension if it's known for specified mime-type, or empty string\notherwise",
"Use this API to fetch nslimitselector resource of given name ."
]
|
private GridLines getGridLines(byte[] data, int offset)
{
Color normalLineColor = ColorType.getInstance(data[offset]).getColor();
LineStyle normalLineStyle = LineStyle.getInstance(data[offset + 3]);
int intervalNumber = data[offset + 4];
LineStyle intervalLineStyle = LineStyle.getInstance(data[offset + 5]);
Color intervalLineColor = ColorType.getInstance(data[offset + 6]).getColor();
return new GridLines(normalLineColor, normalLineStyle, intervalNumber, intervalLineStyle, intervalLineColor);
} | [
"Creates a new GridLines instance.\n\n@param data data block\n@param offset offset into data block\n@return new GridLines instance"
]
| [
"Hides the original Java-style method name using an attribute\nwhich should be respected by Visual Studio, the creates a new\nwrapper method using a .Net style method name.\n\nNote that this does not work for VB as it is case insensitive. Even\nthough Visual Studio won't show you the Java-style method name,\nthe VB compiler sees both and thinks they are the same... which\ncauses it to fail.\n\n@param writer output stream\n@param aClass class being processed\n@param methodSet set of methods which have been processed.\n@throws XMLStreamException",
"Use this API to fetch the statistics of all gslbservice_stats resources that are configured on netscaler.",
"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",
"private multi-value handlers and helpers",
"Set up arguments for each FieldDescriptor in an array.",
"Main method to run the bot.\n\n@param args\n@throws LoginFailedException\n@throws IOException\n@throws MediaWikiApiErrorException",
"Removes all the given tags from the document.\n\n@param dom the document object.\n@param tagName the tag name, examples: script, style, meta\n@return the changed dom.",
"Gets constructors with given annotation type\n\n@param annotationType The annotation type to match\n@return A set of abstracted constructors with given annotation type. If\nthe constructors set is empty, initialize it first. Returns an\nempty set if there are no matches.\n@see org.jboss.weld.annotated.enhanced.EnhancedAnnotatedType#getEnhancedConstructors(Class)",
"Gets the Topsoe divergence.\n\n@param p P vector.\n@param q Q vector.\n@return The Topsoe divergence between p and q."
]
|
public int createLogs(String topic, final int partitions, final boolean forceEnlarge) {
TopicNameValidator.validate(topic);
synchronized (logCreationLock) {
final int configPartitions = getPartition(topic);
if (configPartitions >= partitions || !forceEnlarge) {
return configPartitions;
}
topicPartitionsMap.put(topic, partitions);
if (config.getEnableZookeeper()) {
if (getLogPool(topic, 0) != null) {//created already
topicRegisterTasks.add(new TopicTask(TopicTask.TaskType.ENLARGE, topic));
} else {
topicRegisterTasks.add(new TopicTask(TopicTask.TaskType.CREATE, topic));
}
}
return partitions;
}
} | [
"create logs with given partition number\n\n@param topic the topic name\n@param partitions partition number\n@param forceEnlarge enlarge the partition number of log if smaller than runtime\n@return the partition number of the log after enlarging"
]
| [
"Generates a full list of all parents and their children, in order.\n\n@param parentList A list of the parents from\nthe {@link ExpandableRecyclerAdapter}\n@return A list of all parents and their children, expanded",
"Parse duration time units.\n\nNote that we don't differentiate between confirmed and unconfirmed\ndurations. Unrecognised duration types are default the supplied default value.\n\n@param value BigInteger value\n@param defaultValue if value is null, use this value as the result\n@return Duration units",
"Code common to both XER and database readers to extract\ncurrency format data.\n\n@param row row containing currency data",
"resumed a given deployment\n\n@param deployment The deployment to resume",
"Attachments are only structurally different if one step has an inline attachment\nand the other step either has no inline attachment or the inline attachment is\ndifferent.",
"Inserts a Parcelable value into the mapping of the underlying Bundle, replacing any existing\nvalue for the given key. Either key or value may be null.\n\n@param key a String, or null\n@param value a Parcelable object, or null\n@return this bundler instance to chain method calls",
"Does the slice contain only 7-bit ASCII characters.",
"Convert an object to a list.\n\n@param mapper the object mapper\n@param source the source object\n@param targetElementType the target list element type\n@return list",
"Use this API to fetch all the cacheobject resources that are configured on netscaler."
]
|
public static BoxUser.Info createEnterpriseUser(BoxAPIConnection api, String login, String name) {
return createEnterpriseUser(api, login, name, null);
} | [
"Provisions a new user in an enterprise.\n@param api the API connection to be used by the created user.\n@param login the email address the user will use to login.\n@param name the name of the user.\n@return the created user's info."
]
| [
"Returns an empty map with expected size matching the iterable size if\nit's of type Collection. Otherwise, an empty map with the default size is\nreturned.",
"Calculates the next date, starting from the provided date.\n\n@param date the current date.\n@param interval the number of month to add when moving to the next month.",
"Upgrade the lock on the given object to the given lock mode. The call has\nno effect if the object's current lock is already at or above that level of\nlock mode.\n\n@param obj object to acquire a lock on.\n@param lockMode lock mode to acquire. The lock modes\nare <code>READ</code> , <code>UPGRADE</code> , and <code>WRITE</code> .\n\n@exception LockNotGrantedException Description of Exception",
"Process a calendar exception.\n\n@param calendar parent calendar\n@param row calendar exception data",
"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",
"Returns the indices that would sort an array.\n\n@param array Array.\n@param ascending Ascending order.\n@return Array of indices.",
"Generate the next available field for a user defined field.\n\n@param <E> field type class\n@param clazz class of the desired field enum\n@param type user defined field type.\n@return field of specified type",
"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",
"Creates the conversion server that is specified by this builder.\n\n@return The conversion server that is specified by this builder."
]
|
public synchronized void shutdownTaskScheduler(){
if (scheduler != null && !scheduler.isShutdown()) {
scheduler.shutdown();
logger.info("shutdowned the task scheduler. No longer accepting new tasks");
scheduler = null;
}
} | [
"Shutdown task scheduler."
]
| [
"Write a calendar.\n\n@param record calendar instance\n@throws IOException",
"Convert a wavelength to an RGB value.\n@param wavelength wavelength in nanometres\n@return the RGB value",
"Sets a listener to inform when the user closes the SearchView.\n\n@param listener the listener to call when the user closes the SearchView.",
"Returns a new instance of the class with the given qualified name using the constructor with\nthe specified parameter.\n\n@param className The qualified name of 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",
"Do post exam of child inside the layout after it has been positioned in parent\n@param dataIndex data index",
"Add a metadata profile.\n@see #loadProfile",
"exposed only for tests",
"Calls the httpHandler method.",
"Sets the request body to the contents of a String.\n\n<p>If the contents of the body are large, then it may be more efficient to use an {@link InputStream} instead of\na String. Using a String requires that the entire body be in memory before sending the request.</p>\n\n@param body a String containing the contents of the body."
]
|
public String calculateCacheKey(String sql, int[] columnIndexes) {
StringBuilder tmp = new StringBuilder(sql.length()+4);
tmp.append(sql);
for (int i=0; i < columnIndexes.length; i++){
tmp.append(columnIndexes[i]);
tmp.append("CI,");
}
return tmp.toString();
} | [
"Calculate a cache key.\n@param sql to use\n@param columnIndexes to use\n@return cache key to use."
]
| [
"converts Map of data to json string\n\n@param data map data to converted to json\n@return {@link String}",
"Computes the square root of the complex number.\n\n@param input Input complex number.\n@param root Output. The square root of the input",
"Converts a value to the appropriate type.\n\n@param type target type\n@param value input value\n@return output value",
"Transposes a block matrix.\n\n@param A Original matrix. Not modified.\n@param A_tran Transposed matrix. Modified.",
"Converts a DTO attribute into a generic attribute object.\n\n@param attribute\nThe DTO attribute.\n@return The server side attribute representation. As we don't know at this point what kind of object the\nattribute is (that's a problem for the <code>FeatureModel</code>), we return an <code>Object</code>.",
"Replaces the proxy url with the correct url from the tileMap.\n\n@return correct url to TMS service",
"Reads the next \"word from the request, comprising all characters up to the next SPACE.\nCharacters are tested by the supplied CharacterValidator, and an exception is thrown\nif invalid characters are encountered.",
"Adds a leaf node, which could be a task or a milestone.\n\n@param parentName parent bar name\n@param row row to add\n@param task task to populate with data from the row",
"Validates given external observer method.\n\n@param observerMethod the given observer method\n@param beanManager\n@param originalObserverMethod observer method replaced by given observer method (this parameter is optional)"
]
|
public static Optional<Tag> parse(final String httpTag) {
Tag result = null;
boolean weak = false;
String internal = httpTag;
if (internal.startsWith("W/")) {
weak = true;
internal = internal.substring(2);
}
if (internal.startsWith("\"") && internal.endsWith("\"")) {
result = new Tag(
internal.substring(1, internal.length() - 1), weak);
}
else if (internal.equals("*")) {
result = new Tag("*", weak);
}
return Optional.ofNullable(result);
} | [
"Parses a tag formatted as defined by the HTTP standard.\n\n@param httpTag The HTTP tag string; if it starts with 'W/' the tag will be\nmarked as weak and the data following the 'W/' used as the tag;\notherwise it should be surrounded with quotes (e.g.,\n\"sometag\").\n\n@return A new tag instance.\n\n@see <a\nhref=\"http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.11\">HTTP\nEntity Tags</a>"
]
| [
"Decides what the Map Web provider should be used and generates a builder for it.\n\n@return The AirMapViewBuilder for the selected Map Web provider.",
"Helper method to add a Java integer value to a message digest.\n\n@param digest the message digest being built\n@param value the integer whose bytes should be included in the digest",
"Gets the string representation of the path to the current JSON element.\n\n@param key the leaf key",
"Sets currency symbol.\n\n@param symbol currency symbol",
"Returns an attribute's map value from this JAR's manifest's main section.\nThe attributes string value will be split on whitespace into map entries, and each entry will be split on '=' to get the key-value pair.\nThe returned map may be safely modified.\n\n@param name the attribute's name",
"Updates the date and time formats.\n\n@param properties project properties",
"Returns the approximate size of slop to help in throttling\n\n@param slopVersioned The versioned slop whose size we want\n@return Size in bytes",
"The default field facets.\n\n@param categoryConjunction flag, indicating if category selections in the facet should be \"AND\" combined.\n@return the default field facets.",
"Classify stdin by documents seperated by 3 blank line\n@param readerWriter\n@return boolean reached end of IO\n@throws IOException"
]
|
public static base_responses enable(nitro_service client, String acl6name[]) throws Exception {
base_responses result = null;
if (acl6name != null && acl6name.length > 0) {
nsacl6 enableresources[] = new nsacl6[acl6name.length];
for (int i=0;i<acl6name.length;i++){
enableresources[i] = new nsacl6();
enableresources[i].acl6name = acl6name[i];
}
result = perform_operation_bulk_request(client, enableresources,"enable");
}
return result;
} | [
"Use this API to enable nsacl6 resources of given names."
]
| [
"Performs a null edit on an item. This has some effects on Wikibase,\nsuch as refreshing the labels of the referred items in the UI.\n\n@param itemId\nthe document to perform a null edit on\n@throws MediaWikiApiErrorException\nif the API returns errors\n@throws IOException\nif there are any IO errors, such as missing network connection",
"Compress contiguous partitions into format \"e-i\" instead of\n\"e, f, g, h, i\". This helps illustrate contiguous partitions within a\nzone.\n\n@param cluster\n@param zoneId\n@return pretty string of partitions per zone",
"Create and bind a server socket\n\n@return the server socket\n@throws IOException",
"Searches for commas in the set of tokens. Used for inputs to functions.\n\nIgnore comma's which are inside a [ ] block\n\n@return List of output tokens between the commas",
"Loads the configuration XML from the given string.\n@since 1.3",
"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.",
"Use this API to fetch sslcertkey resource of given name .",
"Get the FieldDescriptors of the extent based on the FieldDescriptors of the parent.",
"common utility method for adding a statement to a record"
]
|
public static String getOffsetCodeFromCurveName(String curveName) {
if(curveName == null || curveName.length() == 0) {
return null;
}
String[] splits = curveName.split("(?<=\\D)(?=\\d)");
String offsetCode = splits[splits.length-1];
if(!Character.isDigit(offsetCode.charAt(0))) {
return null;
}
offsetCode = offsetCode.split("(?<=[A-Za-z])(?=.)", 2)[0];
offsetCode = offsetCode.replaceAll( "[\\W_]", "" );
return offsetCode;
} | [
"Determines the offset code of a forward contract from the name of a forward curve.\nThis method will extract a group of one or more digits together with the first letter behind them, if any.\nIf there are multiple groups of digits in the name, this method will extract the last.\nIf there is no number in the string, this method will return null.\n\n@param curveName The name of the curve.\n@return The offset code as String"
]
| [
"Use this API to fetch gslbsite resource of given name .",
"Use this API to fetch lbvserver_scpolicy_binding resources of given name .",
"Processes the template for all columns of the current table index.\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\"",
"Process calendar hours and exception data from the database.\n\n@param calendars all calendars for the project",
"Read recurring data for a calendar exception.\n\n@param bce MPXJ calendar exception\n@param exception XML calendar exception",
"Stop finding waveforms for all active players.",
"Returns the RPC service for serial dates.\n@return the RPC service for serial dates.",
"Create and return a new Violation for this rule and the specified import className and alias\n@param sourceCode - the SourceCode\n@param className - the class name (as specified within the import statement)\n@param alias - the alias for the import statement\n@param violationMessage - the violation message; may be null\n@return a new Violation object",
"Parses the given Reader for PmdRuleSets.\n\n@return The extracted PmdRuleSet - empty in case of problems, never null."
]
|
@UiThread
public int getParentAdapterPosition() {
int flatPosition = getAdapterPosition();
if (mExpandableAdapter == null || flatPosition == RecyclerView.NO_POSITION) {
return RecyclerView.NO_POSITION;
}
return mExpandableAdapter.getNearestParentPosition(flatPosition);
} | [
"Returns the adapter position of the Parent associated with this ChildViewHolder\n\n@return The adapter position of the Parent if it still exists in the adapter.\nRecyclerView.NO_POSITION if item has been removed from the adapter,\nRecyclerView.Adapter.notifyDataSetChanged() has been called after the last\nlayout pass or the ViewHolder has already been recycled."
]
| [
"Executes the API action \"wbsetlabel\" for the given parameters.\n@param id\nthe id of the entity to be edited; if used, the site and title\nparameters must be null\n@param site\nwhen selecting an entity by title, the site key for the title,\ne.g., \"enwiki\"; if used, title must also be given but id must\nbe null\n@param title\nstring used to select an entity by title; if used, site must\nalso be given but id must be null\n@param newEntity\nused for creating a new entity of a given type; the value\nindicates the intended entity type; possible values include\n\"item\" and \"property\"; if used, the parameters id, site, and\ntitle must be null\n@param language\nthe language code for the label\n@param value\nthe value of the label to set. Set it to null to remove the label.\n@param bot\nif true, edits will be flagged as \"bot edits\" provided that\nthe logged in user is in the bot group; for regular users, the\nflag will just be ignored\n@param baserevid\nthe revision of the data that the edit refers to or 0 if this\nshould not be submitted; when used, the site will ensure that\nno edit has happened since this revision to detect edit\nconflicts; it is recommended to use this whenever in all\noperations where the outcome depends on the state of the\nonline data\n@param summary\nsummary for the edit; will be prepended by an automatically\ngenerated comment; the length limit of the autocomment\ntogether with the summary is 260 characters: everything above\nthat limit will be cut off\n@return the label as returned by the API\n@throws IOException\nif there was an IO problem. such as missing network\nconnection\n@throws MediaWikiApiErrorException\nif the API returns an error\n@throws IOException\n@throws MediaWikiApiErrorException",
"Returns an Object array of all FK field values of the specified object.\nIf the specified object is an unmaterialized Proxy, it will be materialized\nto read the FK values.\n\n@throws MetadataException if an error occours while accessing ForeingKey values on obj",
"Retrieve the index of the table entry valid for the supplied date.\n\n@param date required date\n@return cost rate table entry index",
"Get the authorization uri, where the user logs in.\n\n@param redirectUri\nUri the user is redirected to, after successful authorization.\nThis must be the same as specified at the Eve Online developer\npage.\n@param scopes\nScopes of the Eve Online SSO.\n@param state\nThis should be some secret to prevent XRSF, please read:\nhttp://www.thread-safe.com/2014/05/the-correct-use-of-state-\nparameter-in.html\n@return",
"All the attributes needed either by the processors for each datasource row or by the jasper template.\n\n@param attributes the attributes.",
"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.",
"Get the cached ETag for the given host and file\n@param host the host\n@param file the file\n@return the cached ETag or null if there is no ETag in the cache",
"Generate a currency format.\n\n@param position currency symbol position\n@return currency format",
"Tells you if the expression is the false expression, either literal or constant.\n@param expression\nexpression\n@return\nas described"
]
|
private Integer getOutlineLevel(Task task)
{
String value = task.getWBS();
Integer result = Integer.valueOf(1);
if (value != null && value.length() > 0)
{
String[] path = WBS_SPLIT_REGEX.split(value);
result = Integer.valueOf(path.length);
}
return result;
} | [
"Extract the outline level from a task's WBS attribute.\n\n@param task Task instance\n@return outline level"
]
| [
"Adds the deploy operation as a step to the composite operation.\n\n@param builder the builder to add the step to\n@param deployment the deployment to deploy",
"All the attributes needed either by the processors for each datasource row or by the jasper template.\n\n@param attributes the attributes.",
"Returns a new instance of the class with the given qualified name using the constructor with\nthe specified signature.\n\n@param className The qualified name of the class to instantiate\n@param types The parameter types\n@param args The arguments\n@return The instance",
"Use this API to fetch statistics of cmppolicy_stats resource of given name .",
"Remove custom overrides\n\n@param path_id ID of path containing custom override\n@param client_uuid UUID of the client\n@throws Exception exception",
"Make sure that we have some reasonable defaults available. These would typically be provided by the rulesets\nin the real world.",
"Merges the item from the resultLocaleValues into the corresponding item of the localeValues.\n@param item the item to merge\n@param localeValues the values where the item gets merged into\n@param resultLocaleValues the values where the item to merge is read from\n@return the modified localeValues with the merged item",
"Send a track metadata update announcement to all registered listeners.",
"Add an appliable dependency for this task item.\n\n@param appliable the appliable dependency.\n@return the key to be used as parameter to taskResult(string) method to retrieve updated dependency"
]
|
public void addPostEffect(GVRMaterial postEffectData) {
GVRContext ctx = getGVRContext();
if (mPostEffects == null)
{
mPostEffects = new GVRRenderData(ctx, postEffectData);
GVRMesh dummyMesh = new GVRMesh(getGVRContext(),"float3 a_position float2 a_texcoord");
mPostEffects.setMesh(dummyMesh);
NativeCamera.setPostEffect(getNative(), mPostEffects.getNative());
mPostEffects.setCullFace(GVRRenderPass.GVRCullFaceEnum.None);
}
else
{
GVRRenderPass rpass = new GVRRenderPass(ctx, postEffectData);
rpass.setCullFace(GVRRenderPass.GVRCullFaceEnum.None);
mPostEffects.addPass(rpass);
}
} | [
"Add a post-effect to this camera's render chain.\n\nPost-effects are GL shaders, applied to the texture (hardware bitmap)\ncontaining the rendered scene graph. Each post-effect combines a shader\nselector with a set of parameters: This lets you pass different\nparameters to the shaders for each eye.\n\n@param postEffectData\nPost-effect to append to this camera's render chain"
]
| [
"Reads and returns the mediator URN from the JSON content.\n\n@see #RegistrationConfig(String)",
"Used to parse the dividend dates. Returns null if the date cannot be\nparsed.\n\n@param date String received that represents the date\n@return Calendar object representing the parsed date",
"Get the element at the index as a json array.\n\n@param i the index of the element to access",
"Returns the ARGB components for the pixel at the given coordinates\n\n@param x the x coordinate of the pixel component to grab\n@param y the y coordinate of the pixel component to grab\n@return an array containing ARGB components in that order.",
"Given a particular key, first converts its to the storage format and then\ndetermines which chunk it belongs to\n\n@param key Byte array of keys\n@return Chunk id\n@throws IllegalStateException if unable to find the chunk id for the given key",
"Generate the next permutation and return an array containing\nthe elements in the appropriate order.\n@see #nextPermutationAsArray(Object[])\n@see #nextPermutationAsList()\n@return The next permutation as an array.",
"Initializes module enablement.\n\n@see ModuleEnablement",
"Removes statement ids from a collection of statement groups.\n@param statementIds\n@param claims\n@return",
"The Baseline Start field shows the planned beginning date for a task at\nthe time you saved a baseline. Information in this field becomes available\nwhen you set a baseline.\n\n@return Date"
]
|
private static boolean implementsMethod(ClassNode classNode, String methodName, Class[] argTypes) {
List methods = classNode.getMethods();
if (argTypes == null || argTypes.length ==0) {
for (Iterator i = methods.iterator(); i.hasNext();) {
MethodNode mn = (MethodNode) i.next();
boolean methodMatch = mn.getName().equals(methodName);
if(methodMatch)return true;
// TODO Implement further parameter analysis
}
}
return false;
} | [
"Tests whether the ClassNode implements the specified method name\n\n@param classNode The ClassNode\n@param methodName The method name\n@param argTypes\n@return True if it implements the method"
]
| [
"Prepare a parallel UDP Task.\n\n@param command\nthe command\n@return the parallel task builder",
"Byte run automaton map.\n\n@param automatonMap the automaton map\n@return the map",
"Get a list of collaborators that are allowed access to an app.\n@param appName App name. See {@link #listApps} for a list of apps that can be used.\n@return list of collaborators",
"Close it and ignore any exceptions.",
"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",
"Performs a HTTP PUT request, saves an attachment.\n\n@return {@link Response}",
"Update the lastCheckTime of the given record.\n\n@param id the id\n@param lastCheckTime the new value",
"Command to select a document from the POIFS for viewing.\n\n@param entry document to view",
"Sets the resource to which this calendar is linked. Note that this\nmethod updates the calendar's name to be the same as the resource name.\nIf the resource does not yet have a name, then the calendar is given\na default name.\n\n@param resource resource instance"
]
|
public static BoxAPIConnection restore(String clientID, String clientSecret, String state) {
BoxAPIConnection api = new BoxAPIConnection(clientID, clientSecret);
api.restore(state);
return api;
} | [
"Restores a BoxAPIConnection from a saved state.\n\n@see #save\n@param clientID the client ID to use with the connection.\n@param clientSecret the client secret to use with the connection.\n@param state the saved state that was created with {@link #save}.\n@return a restored API connection."
]
| [
"This method extracts data for a normal working day from an MSPDI file.\n\n@param calendar Calendar data\n@param weekDay Day data",
"This method writes assignment data to an MSPDI file.\n\n@param project Root node of the MSPDI file",
"Returns the output path specified on the javadoc options",
"Provide array of String results from inputOutput MFString field named string.\n@return value of string field",
"Checks if there's exactly one option that exists among all opts.\n\n@param options OptionSet to checked\n@param opts List of options to be checked\n@throws VoldemortException",
"EAP 7.0",
"Overrides the superclass implementation to allow the value type's AttributeDefinition to in turn\nresolve each element.\n\n{@inheritDoc}",
"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",
"Read a Synchro date from an input stream.\n\n@param is input stream\n@return Date instance"
]
|
protected static void writeErrorResponse(final Channel channel, final ManagementRequestHeader header, final Throwable error) throws IOException {
final ManagementResponseHeader response = ManagementResponseHeader.create(header, error);
final MessageOutputStream output = channel.writeMessage();
try {
writeHeader(response, output);
output.close();
} finally {
StreamUtils.safeClose(output);
}
} | [
"Write an error response.\n\n@param channel the channel\n@param header the request\n@param error the error\n@throws IOException"
]
| [
"Load assertion from the provided json or throw exception if not possible.\n\n@param encodedAssertion the assertion as it was encoded in JSON.",
"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)",
"Queues up a callback to be removed and invoked on the next change event.",
"Set the main attribute \"Bundle-RequiredExecutionEnvironment\" to the given\nvalue.\n\n@param bree The new value",
"Emit status line for an aggregated event.",
"Sorts the row indices in ascending order.\n@param sorter (Optional) Used to sort rows. If null a new instance will be declared internally.",
"Gets the JsonObject representation of the given field object.\n@param field represents a template field\n@return the json object",
"Search for groups. 18+ groups will only be returned for authenticated calls where the authenticated user is over 18. This method does not require\nauthentication.\n\n@param text\nThe text to search for.\n@param perPage\nNumber of groups to return per page. If this argument is 0, it defaults to 100. The maximum allowed value is 500.\n@param page\nThe page of results to return. If this argument is 0, it defaults to 1.\n@return A GroupList Object. Only the fields <em>id</em>, <em>name</em> and <em>eighteenplus</em> in the Groups will be set.\n@throws FlickrException",
"Creates a list of placeholders for use in a PreparedStatement\n\n@param length number of placeholders\n@return String of placeholders, seperated by comma"
]
|
public void setAttribute(final String name, final Attribute attribute) {
if (name.equals("datasource")) {
this.allAttributes.putAll(((DataSourceAttribute) attribute).getAttributes());
} else if (this.copyAttributes.contains(name)) {
this.allAttributes.put(name, attribute);
}
} | [
"All the sub-level attributes.\n\n@param name the attribute name.\n@param attribute the attribute."
]
| [
"Unregister the mbean with the given name from the platform mbean server\n\n@param name The name of the mbean to unregister",
"Build copyright map once.",
"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 its left\n\nExample:\na = - b * c",
"Checks if a new version of the file can be uploaded with the specified name and size.\n@param name the new name for the file.\n@param fileSize the size of the new version content in bytes.\n@return whether or not the file version can be uploaded.",
"Returns the export format indicated in the result-type parameter \"layoutManager\"\n@param _invocation\n@return",
"Join N sets.",
"Entry point for recursive resolution of an expression and all of its\nnested expressions.\n\n@todo Ensure unresolvable expressions don't trigger infinite recursion.",
"common utility method for adding a statement to a record",
"Retains only beans which are enabled.\n\n@param beans The mutable set of beans to filter\n@param beanManager The bean manager\n@return a mutable set of enabled beans"
]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.