query
stringlengths 74
6.1k
| positive
sequencelengths 1
1
| negative
sequencelengths 9
9
|
---|---|---|
public AreaOfInterest copy() {
AreaOfInterest aoi = new AreaOfInterest();
aoi.display = this.display;
aoi.area = this.area;
aoi.polygon = this.polygon;
aoi.style = this.style;
aoi.renderAsSvg = this.renderAsSvg;
return aoi;
} | [
"Make a copy of this Area of Interest."
] | [
"Formats a percentage value.\n\n@param number MPXJ percentage value\n@return Primavera percentage value",
"Scroll to the next page. To process the scrolling by pages LayoutScroller must be constructed\nwith a pageSize greater than zero.\n@return the new current item after the scrolling processed.",
"If UPDATE, INSERT or DELETE, return BatchPreparedStatement,\notherwise return null.",
"Kicks off an animation that will result in the pointer being centered in the\npie slice of the currently selected item.",
"Use this API to disable snmpalarm of given name.",
"Detects if the current device is a Nintendo game device.\n@return detection of Nintendo",
"Flat the map of list of string to map of strings, with theoriginal values, seperated by comma",
"Use this API to fetch cachepolicylabel_binding resource of given name .",
"Process a device update once it has been received. Track it as the most recent update from its address,\nand notify any registered listeners, including master listeners if it results in changes to tracked state,\nsuch as the current master player and tempo. Also handles the Baroque dance of handing off the tempo master\nrole from or to another device."
] |
public ClosableIterator<Tuple> callStoredProcedure(EmbeddedCacheManager embeddedCacheManager, String storedProcedureName, ProcedureQueryParameters queryParameters, ClassLoaderService classLoaderService ) {
validate( queryParameters );
Cache<String, String> cache = embeddedCacheManager.getCache( STORED_PROCEDURES_CACHE_NAME, true );
String className = cache.getOrDefault( storedProcedureName, storedProcedureName );
Callable<?> callable = instantiate( storedProcedureName, className, classLoaderService );
setParams( storedProcedureName, queryParameters, callable );
Object res = execute( storedProcedureName, embeddedCacheManager, callable );
return extractResultSet( storedProcedureName, res );
} | [
"Returns the result of a stored procedure executed on the backend.\n\n@param embeddedCacheManager embedded cache manager\n@param storedProcedureName name of stored procedure\n@param queryParameters parameters passed for this query\n@param classLoaderService the class loader service\n\n@return a {@link ClosableIterator} with the result of the query"
] | [
"Uncompresses the given textual content and writes it to the given file.\n\n@param file The file to write to\n@param compressedContent The content\n@throws IOException If an error occurred",
"Creates a remove operation.\n\n@param address the address for the operation\n@param recursive {@code true} if the remove should be recursive, otherwise {@code false}\n\n@return the operation",
"Gets the message payload.\n\n@param message the message\n@return the payload",
"If the specified value is not greater than or equal to the specified minimum and\nless than or equal to the specified maximum, adjust it so that it is.\n@param value The value to check.\n@param min The minimum permitted value.\n@param max The maximum permitted value.\n@return {@code value} if it is between the specified limits, {@code min} if the value\nis too low, or {@code max} if the value is too high.\n@since 1.2",
"Returns a Bic object holding the value of the specified String.\n\n@param bic the String to be parsed.\n@return a Bic object holding the value represented by the string argument.\n@throws BicFormatException if the String doesn't contain parsable Bic.\nUnsupportedCountryException if bic's country is not supported.",
"Dump an array of bytes in hexadecimal.\n\n@param displayOffset the display offset (left column)\n@param data the byte array of data\n@param offset the offset to start dumping in the byte array\n@param len the length of data to dump\n@return the dump string",
"This method is called recursively to write a task and its child tasks\nto the JSON file.\n\n@param task task to write",
"Sets the right padding for all cells in the row.\n@param paddingRight new padding, ignored if smaller than 0\n@return this to allow chaining",
"Use this API to fetch authenticationradiuspolicy_vpnglobal_binding resources of given name ."
] |
public static base_response unset(nitro_service client, aaaparameter resource, String[] args) throws Exception{
aaaparameter unsetresource = new aaaparameter();
return unsetresource.unset_resource(client,args);
} | [
"Use this API to unset the properties of aaaparameter resource.\nProperties that need to be unset are specified in args array."
] | [
"Write resource assignment.\n\n@param record resource assignment instance\n@throws IOException",
"Execute a CLI command. This can be any command that you might execute on\nthe CLI command line, including both server-side operations and local\ncommands such as 'cd' or 'cn'.\n\n@param cliCommand A CLI command.\n@return A result object that provides all information about the execution\nof the command.",
"Send a device found announcement to all registered listeners.\n\n@param announcement the message announcing the new device",
"Retrieves the earliest start date for all assigned tasks.\n\n@return start date",
"Process a device update once it has been received. Track it as the most recent update from its address,\nand notify any registered listeners, including master listeners if it results in changes to tracked state,\nsuch as the current master player and tempo. Also handles the Baroque dance of handing off the tempo master\nrole from or to another device.",
"Inverts the value of the bit at the specified index.\n@param index The bit to flip (0 is the least-significant bit).\n@throws IndexOutOfBoundsException If the specified index is not a bit\nposition in this bit string.",
"Add a \"post-run\" dependent for this model.\n\n@param dependent the \"post-run\" dependent.\n@return key to be used as parameter to taskResult(string) method to retrieve result of root\ntask in the given dependent task group",
"Make a list value containing the specified values.",
"Returns the classpath for executable jar."
] |
@Override
public void solve(DMatrixRMaj B, DMatrixRMaj X) {
blockB.reshape(B.numRows,B.numCols,false);
MatrixOps_DDRB.convert(B,blockB);
// since overwrite B is true X does not need to be passed in
alg.solve(blockB,null);
MatrixOps_DDRB.convert(blockB,X);
} | [
"Only converts the B matrix and passes that onto solve. Te result is then copied into\nthe input 'X' matrix.\n\n@param B A matrix ℜ <sup>m × p</sup>. Not modified.\n@param X A matrix ℜ <sup>n × p</sup>, where the solution is written to. Modified."
] | [
"Refresh's this connection's access token using its refresh token.\n@throws IllegalStateException if this connection's access token cannot be refreshed.",
"Called after creating the first connection. The adapter should create its caches and do all initialization it requires. Most\nimportantly, the SQL query cache should be created.\n\n@param cnx\nan open ready to use connection to the database.",
"Reads a combined date and time value expressed in tenths of a minute.\n\n@param data byte array of data\n@param offset location of data as offset into the array\n@return time value",
"Sets the country for which currencies should be requested.\n\n@param countries The ISO countries.\n@return the query for chaining.",
"Main database initialization. To be called only when _ds is a valid DataSource.",
"Checks if class is on class path\n@param className of the class to check.\n@return true if class in on class path, false otherwise.",
"Emit an event object with parameters.\n\nThis will invoke all {@link SimpleEventListener} bound to the event object\nclass given the listeners has the matching argument list.\n\nIf there is no parameter passed in, i.e. `args.length == 0`, then it will\nalso invoke all the {@link ActEventListener} bound to the event class.\n\nFor example, suppose we have the following Event defined:\n\n```java\npublic class UserActivityEvent extends ActEvent<User> {\npublic UserActivityEvent(User user) {super(user);}\n}\n```\n\nAnd we have the following event handler defined:\n\n```java\n{@literal @}OnEvent\npublic void logUserLogin(UserActivityEvent event, long timestamp) {...}\n\n{@literal @}OnEvent\npublic void checkDuplicateLoginAttempts(UserActivityEvent, Object... args) {...}\n\n{@literal @}OnEvent\npublic void foo(UserActivityEvent event) {...}\n```\n\nThe following code will invoke `logUserLogin` and `checkDuplicateLoginAttempts` methods:\n\n```java\nUser user = ...;\neventBus.emit(new UserActivityEvent(user), System.currentTimeMills());\n```\n\nThe `foo(UserActivityEvent)` will not invoked because:\n\n* The parameter list `(UserActivityEvent, long)` does not match the declared\nargument list `(UserActivityEvent)`. Here the `String` in the parameter\nlist is taken out because it is used to indicate the event, instead of being\npassing through to the event handler method.\n* The method `checkDuplicateLoginAttempts(UserActivityEvent, Object ...)` will\nbe invoked because it declares a varargs typed arguments, meaning it matches\nany parameters passed in.\n\n@param event\nthe target event\n@param args\nthe arguments passed in\n@see SimpleEventListener",
"Creates a build\n\n@param appName See {@link #listApps} for a list of apps that can be used.\n@param build the build information",
"20130512 Converts the sdsm string generated above to Date format.\n\n@param str\nthe str\n@return the date from concise str"
] |
public void terminateAllConnections(){
this.terminationLock.lock();
try{
// close off all connections.
for (int i=0; i < this.pool.partitionCount; i++) {
this.pool.partitions[i].setUnableToCreateMoreTransactions(false); // we can create new ones now, this is an optimization
List<ConnectionHandle> clist = new LinkedList<ConnectionHandle>();
this.pool.partitions[i].getFreeConnections().drainTo(clist);
for (ConnectionHandle c: clist){
this.pool.destroyConnection(c);
}
}
} finally {
this.terminationLock.unlock();
}
} | [
"Closes off all connections in all partitions."
] | [
"Gets an element of the matrix.\n\n@param row\nthe row\n@param col\nthe column\n@return the element at the given position",
"Iterates through the given CharSequence line by line, splitting each line using\nthe given regex delimiter. The list of tokens for each line is then passed to\nthe given closure.\n\n@param self a CharSequence\n@param regex the delimiting regular expression\n@param closure a closure\n@return the last value returned by the closure\n@throws java.io.IOException if an error occurs\n@throws java.util.regex.PatternSyntaxException if the regular expression's syntax is invalid\n@see #splitEachLine(CharSequence, java.util.regex.Pattern, groovy.lang.Closure)\n@since 1.8.2",
"Get list of replies\n\n@param topicId\nUnique identifier of a topic for a given group {@link Topic}.\n@return A reply object\n@throws FlickrException\n@see <a href=\"http://www.flickr.com/services/api/flickr.groups.discuss.replies.getList.html\">API Documentation</a>",
"Generates a change event for a local update of a document in the given namespace referring\nto the given document _id.\n\n@param namespace the namespace where the document was inserted.\n@param documentId the _id of the document that was updated.\n@param update the update specifier.\n@return a change event for a local update of a document in the given namespace referring\nto the given document _id.",
"Requests the waveform preview for a specific track ID, given a connection to a player that has already been\nset up.\n\n@param rekordboxId the track whose waveform preview is desired\n@param slot identifies the media slot we are querying\n@param client the dbserver client that is communicating with the appropriate player\n\n@return the retrieved waveform preview, or {@code null} if none was available\n@throws IOException if there is a communication problem",
"Checks if a parameter exists. If it exists, it is updated. If it doesn't, it is created. Only works for parameters which key is\nunique. Will create a transaction on the given entity manager.",
"Generate date patterns based on the project configuration.\n\n@param properties project properties\n@return date patterns",
"Helper function to return the minimum size of the index space to be passed to the reduction given the input and\noutput tensors",
"Keep track of this handle tied to which thread so that if the thread is terminated\nwe can reclaim our connection handle. We also\n@param c connection handle to track."
] |
protected String stringValue(COSBase value)
{
if (value instanceof COSString)
return ((COSString) value).getString();
else if (value instanceof COSNumber)
return String.valueOf(((COSNumber) value).floatValue());
else
return "";
} | [
"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"
] | [
"Writes the timephased data for a resource assignment.\n\n@param mpx MPXJ assignment\n@param xml MSDPI assignment",
"Given a list of store definitions, filters the list depending on the\nboolean\n\n@param storeDefs Complete list of store definitions\n@param isReadOnly Boolean indicating whether filter on read-only or not?\n@return List of filtered store definition",
"Initialization method.\n\n@param t1\n@param t2",
"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",
"Accessor method used to retrieve a Number instance 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",
"Executes a batch plan.\n\n@param batchId Used as the ID of the batch plan. This allows related\ntasks on client- & server-side to pretty print messages in a\nmanner that debugging can track specific batch plans across the\ncluster.\n@param batchPlan The batch plan...",
"Obtains a Accounting zoned date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the Accounting zoned date-time, not null\n@throws DateTimeException if unable to create the date-time",
"Clones the cluster by constructing a new one with same name, partition\nlayout, and nodes.\n\n@param cluster\n@return clone of Cluster cluster.",
"Creates a new Logger instance for the specified name."
] |
protected String consumeWord(ImapRequestLineReader request,
CharacterValidator validator)
throws ProtocolException {
StringBuilder atom = new StringBuilder();
char next = request.nextWordChar();
while (!isWhitespace(next)) {
if (validator.isValid(next)) {
atom.append(next);
request.consume();
} else {
throw new ProtocolException("Invalid character: '" + next + '\'');
}
next = request.nextChar();
}
return atom.toString();
} | [
"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."
] | [
"Reads characters into a portion of an array, then replace invalid XML characters\n\n@throws IOException If an I/O error occurs\n@see ru.yandex.qatools.allure.config.AllureNamingUtils#isBadXmlCharacter(char) by space",
"Discards any tracks from the hot cache that were loaded from a now-unmounted media slot, because they are no\nlonger valid.",
"Process an individual work week day.\n\n@param data calendar data\n@param offset current offset into data\n@param week parent week\n@param day current day",
"All the indexes defined in the database. Type widening means that the returned Index objects\nare limited to the name, design document and type of the index and the names of the fields.\n\n@return a list of defined indexes with name, design document, type and field names.",
"Set a friendly name for a client\n\n@param profileId profileId of the client\n@param clientUUID UUID of the client\n@param friendlyName friendly name of the client\n@return return Client object or null\n@throws Exception exception",
"Sets the promotion state.\n\n<P>INFO: This method updates automatically all the contained artifacts.\n\n@param promoted boolean",
"Converts an integer into a time format.\n\n@param format integer format value\n@return TimeUnit instance",
"Stops the processing and prints the final time.",
"Generate a currency format.\n\n@param position currency symbol position\n@return currency format"
] |
@SuppressWarnings("WeakerAccess")
public synchronized void stop() {
if (isRunning()) {
final Set<DeviceAnnouncement> lastDevices = getCurrentDevices();
socket.get().close();
socket.set(null);
devices.clear();
firstDeviceTime.set(0);
// Report the loss of all our devices, on the proper thread, outside our lock
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
for (DeviceAnnouncement announcement : lastDevices) {
deliverLostAnnouncement(announcement);
}
}
});
deliverLifecycleAnnouncement(logger, false);
}
} | [
"Stop listening for device announcements. Also discard any announcements which had been received, and\nnotify any registered listeners that those devices have been lost."
] | [
"Sets a request header with the given name and value. If a header with the\nspecified name has already been set then the new value overwrites the\ncurrent value.\n\n@param header the name of the header\n@param value the value of the header\n\n@throws NullPointerException if header or value are null\n@throws IllegalArgumentException if header or value are the empty string",
"Tells you if the ASTNode is a method node for the given name, arity, and return type.\n@param node\nthe node to inspect\n@param methodNamePattern\nthe expected name of the method\n@param numArguments\nthe expected number of arguments, optional\n@param returnType\nthe expected return type, optional\n@return\ntrue if this node is a MethodNode meeting the parameters. false otherwise",
"Encodes the given URI path with the given encoding.\n@param path the path to be encoded\n@param encoding the character encoding to encode to\n@return the encoded path\n@throws UnsupportedEncodingException when the given encoding parameter is not supported",
"Creates an upload session to create a new version of a file in chunks.\nThis will first verify that the version can be created and then open a session for uploading pieces of the file.\n@param fileSize the size of the file that will be uploaded.\n@return the created upload session instance.",
"Starting with the given column index, will return the first column index\nwhich contains a colour that does not match the given color.",
"Set up server for report directory.",
"Check that all nodes in the new cluster have a corresponding entry in\nstoreRepository and innerStores. add a NodeStore if not present, is\nneeded as with rebalancing we can add new nodes on the fly.",
"Gets any app users that has an exact match with the externalAppUserId term.\n@param api the API connection to be used when retrieving the users.\n@param externalAppUserId the external app user id that has been set for app user\n@param fields the fields to retrieve. Leave this out for the standard fields.\n@return an iterable containing users matching the given email",
"Parses command-line and verifies metadata versions on all the cluster\nnodes\n\n@param args Command-line input\n@param printHelp Tells whether to print help only or execute command\nactually\n@throws IOException"
] |
public void sendJsonToUser(Object data, String username) {
sendToUser(JSON.toJSONString(data), username);
} | [
"Send JSON representation of given data object to all connections of a user\n@param data the data object\n@param username the username"
] | [
"Create a structured Record instance from the flat text data.\nNull is returned if errors are encountered during parse.\n\n@param text flat text data\n@return Record instance",
"Set the repeat type.\n\nIn the default {@linkplain GVRRepeatMode#ONCE run-once} mode, animations\nrun once, ignoring the {@linkplain #getRepeatCount() repeat count.} In\n{@linkplain GVRRepeatMode#PINGPONG ping pong} and\n{@linkplain GVRRepeatMode#REPEATED repeated} modes, animations do honor\nthe repeat count, which {@linkplain #DEFAULT_REPEAT_COUNT defaults} to 2.\n\n@param repeatMode\nOne of the {@link GVRRepeatMode} constants\n@return {@code this}, so you can chain setProperty() calls.\n@throws IllegalArgumentException\nIf {@code repetitionType} is not one of the\n{@link GVRRepeatMode} constants",
"Gets all data set values.\n\n@param dataSet\nIIM record and dataset code (See constants in {@link IIM})\n@return data set value\n@throws SerializationException\nif value can't be deserialized from binary representation",
"Hide multiple channels. All other channels will be unaffected.\n@param channels The channels to hide",
"Set the main attribute \"Bundle-Activator\" to the given value.\n\n@param bundleActivator The new value",
"Append the WHERE part of the statement to the StringBuilder.",
"Extract information from a resource ID string with the resource type\nas the identifier.\n\n@param id the resource ID\n@param identifier the identifier to match, e.g. \"resourceGroups\", \"storageAccounts\"\n@return the information extracted from the identifier",
"Use this API to fetch filtered set of gslbservice resources.\nset the filter parameter values in filtervalue object.",
"Recursively builds the VFS entry bean for the quick filtering function in the folder tab.<p<\n\n@param resource the resource\n@param childMap map from parent to child resources\n@param filterMatches the resources matching the filter\n@param parentPaths root paths of resources which are not leaves\n@param isRoot true if this the root node\n\n@return the VFS entry bean for the client\n\n@throws CmsException if something goes wrong"
] |
public List<ResourceRequestType.ResourceRequestCriterion> getResourceRequestCriterion()
{
if (resourceRequestCriterion == null)
{
resourceRequestCriterion = new ArrayList<ResourceRequestType.ResourceRequestCriterion>();
}
return this.resourceRequestCriterion;
} | [
"Gets the value of the resourceRequestCriterion property.\n\n<p>\nThis accessor method returns a reference to the live list,\nnot a snapshot. Therefore any modification you make to the\nreturned list will be present inside the JAXB object.\nThis is why there is not a <CODE>set</CODE> method for the resourceRequestCriterion property.\n\n<p>\nFor example, to add a new item, do as follows:\n<pre>\ngetResourceRequestCriterion().add(newItem);\n</pre>\n\n\n<p>\nObjects of the following type(s) are allowed in the list\n{@link ResourceRequestType.ResourceRequestCriterion }"
] | [
"This could be a self-extracting archive. If we understand the format, expand\nit and check the content for files we can read.\n\n@param stream schedule data\n@return ProjectFile instance",
"Creates a REST client used to perform Voldemort operations against the\nCoordinator\n\n@param storeName Name of the store to perform the operations on\n@param resolver Custom resolver as specified by the application\n@return",
"we need to cache the address in here and not in the address section if there is a zone",
"append normal text\n\n@param text normal text\n@return SimplifySpanBuild",
"Perform the given work with a Jedis connection from the given pool.\n\n@param pool the resource pool\n@param work the work to perform\n@param <V> the result type\n@return the result of the given work\n@throws Exception if something went wrong",
"Use this API to fetch all the callhome resources that are configured on netscaler.",
"Get a state handler for a given patching artifact.\n\n@param artifact the patching artifact\n@param <P>\n@param <S>\n@return the state handler, {@code null} if there is no handler registered for the given artifact",
"Checks whether the given set of properties is available.\n\n@param keys the keys to check\n@return true if all properties are available, false otherwise",
"Creates a new Product in Grapes database\n\n@param dbProduct DbProduct"
] |
@Override
public Future<RawGcsCreationToken> continueObjectCreationAsync(final RawGcsCreationToken token,
final ByteBuffer chunk, long timeoutMillis) {
try {
ensureInitialized();
} catch (IOException e) {
throw new RuntimeException(e);
}
final Environment environment = ApiProxy.getCurrentEnvironment();
return writePool.schedule(new Callable<RawGcsCreationToken>() {
@Override
public RawGcsCreationToken call() throws Exception {
ApiProxy.setEnvironmentForCurrentThread(environment);
return append(token, chunk);
}
}, 50, TimeUnit.MILLISECONDS);
} | [
"Runs calls in a background thread so that the results will actually be asynchronous.\n\n@see com.google.appengine.tools.cloudstorage.RawGcsService#continueObjectCreationAsync(\ncom.google.appengine.tools.cloudstorage.RawGcsService.RawGcsCreationToken,\njava.nio.ByteBuffer, long)"
] | [
"Get a setted section knowing his title\n\nN.B. this search only into section list and bottom section list.\n@param title is the title of the section\n@return the section with title or null if the section is not founded",
"Adds a data source to the configuration. If in deduplication mode\ngroupno == 0, otherwise it gives the number of the group to which\nthe data source belongs.",
"Read data from the table. Return a reference to the current\ninstance to allow method chaining.\n\n@return reader instance",
"Convert an object to a set.\n\n@param mapper the object mapper\n@param source the source object\n@param targetElementType the target set element type\n@return set",
"Find the scheme to use to connect to the service.\nUses java annotations first and if not found, uses kubernetes annotations on the service object.\n\n@param service\nThe target service.\n@param qualifiers\nThe set of qualifiers.\n\n@return Returns the resolved scheme of 'http' as a fallback.",
"return a generic Statement for the given ClassDescriptor",
"Set the view frustum to pick against from the given projection matrix.\n\nIf the projection matrix is null, the picker will revert to picking\nobjects that are visible from the viewpoint of the scene's current camera.\nIf a matrix is given, the picker will pick objects that are visible\nfrom the viewpoint of it's owner the given projection matrix.\n\n@param projMatrix 4x4 projection matrix or null\n@see GVRScene#setPickVisible(boolean)",
"Opens a file from the volume. The filePath is relative to the\ndefaultPath.\n\n@param filePath\nFile path of the resource to open.\n\n@throws IOException",
"Displays a localized warning.\n@param caption the caption of the warning.\n@param description the description of the warning."
] |
private void addUserDefinedField(FieldTypeClass fieldType, UserFieldDataType dataType, String name)
{
try
{
switch (fieldType)
{
case TASK:
TaskField taskField;
do
{
taskField = m_taskUdfCounters.nextField(TaskField.class, dataType);
}
while (m_taskFields.containsKey(taskField) || m_wbsFields.containsKey(taskField));
m_project.getCustomFields().getCustomField(taskField).setAlias(name);
break;
case RESOURCE:
ResourceField resourceField;
do
{
resourceField = m_resourceUdfCounters.nextField(ResourceField.class, dataType);
}
while (m_resourceFields.containsKey(resourceField));
m_project.getCustomFields().getCustomField(resourceField).setAlias(name);
break;
case ASSIGNMENT:
AssignmentField assignmentField;
do
{
assignmentField = m_assignmentUdfCounters.nextField(AssignmentField.class, dataType);
}
while (m_assignmentFields.containsKey(assignmentField));
m_project.getCustomFields().getCustomField(assignmentField).setAlias(name);
break;
default:
break;
}
}
catch (Exception ex)
{
//
// SF#227: If we get an exception thrown here... it's likely that
// we've run out of user defined fields, for example
// there are only 30 TEXT fields. We'll ignore this: the user
// defined field won't be mapped to an alias, so we'll
// ignore it when we read in the values.
//
}
} | [
"Configure a new user defined field.\n\n@param fieldType field type\n@param dataType field data type\n@param name field name"
] | [
"Check position type.\n\n@param type the type\n@return the boolean",
"Open the event stream\n\n@return true if successfully opened, false if not",
"Deploys application reading resources from specified InputStream.\n\n@param inputStream where resources are read\n@throws IOException",
"returns a comparator that allows to sort a Vector of FieldMappingDecriptors\naccording to their m_Order entries.",
"This function interprets the arguments of the main function. By doing\nthis it will set flags for the dump generation. See in the help text for\nmore specific information about the options.\n\n@param args\narray of arguments from the main function.\n@return list of {@link DumpProcessingOutputAction}",
"Read an unsigned integer from the given byte array\n\n@param bytes The bytes to read from\n@param offset The offset to begin reading at\n@return The integer as a long",
"Verify the given job types are all valid.\n\n@param jobTypes the given job types\n@throws IllegalArgumentException if any of the job types are invalid\n@see #checkJobType(String, Class)",
"Retrieves the monthly or yearly relative day of the week.\n\n@return day of the week",
"It is required that T be Serializable"
] |
public ConfigOptionBuilder setDefaultWith( Object defaultValue ) {
co.setHasDefault( true );
co.setValue( defaultValue );
return setOptional();
} | [
"if you have a default, it's automatically optional"
] | [
"The third method to write caseManager. Its task is to write the call to\nthe story to be run.\n\n@param caseManager\nthe file where the test must be written\n@param storyName\nthe name of the story\n@param test_path\nthe path where the story can be found\n@param user\nthe user requesting the story\n@param feature\nthe feature requested by the user\n@param benefit\nthe benefit provided by the feature\n@throws BeastException",
"Gets the prefix from value.\n\n@param value the value\n@return the prefix from value",
"Select the specific vertex and fragment shader to use.\n\nThe shader template is used to generate the sources for the vertex and\nfragment shader based on the vertex, material and light properties. This\nfunction may compile the shader if it does not already exist.\n\n@param context\nGVRContext\n@param rdata\nrenderable entity with mesh and rendering options\n@param scene\nlist of light sources",
"Process stop.\n\n@param endpoint the endpoint\n@param eventType the event type",
"Triggers a replication request, blocks while the replication is in progress.\n@return ReplicationResult encapsulating the result",
"performs a SQL SELECT statement against RDBMS.\n@param sql the query string.\n@param cld ClassDescriptor providing meta-information.",
"Adds a tag to the resource.\n@param key the key for the tag\n@param value the value for the tag\n@return the next stage of the definition/update",
"Get the remote address.\n\n@return the remote address, {@code null} if not available",
"Attaches the menu drawer to the content view."
] |
@OnClick(R.id.navigateToSampleActivity)
public void onSampleActivityCTAClick() {
StringParcel parcel1 = new StringParcel("Andy");
StringParcel parcel2 = new StringParcel("Tony");
List<StringParcel> parcelList = new ArrayList<>();
parcelList.add(parcel1);
parcelList.add(parcel2);
SparseArray<StringParcel> parcelSparseArray = new SparseArray<>();
parcelSparseArray.put(0, parcel1);
parcelSparseArray.put(2, parcel2);
Intent intent = HensonNavigator.gotoSampleActivity(this)
.defaultKeyExtra("defaultKeyExtra")
.extraInt(4)
.extraListParcelable(parcelList)
.extraParcel(parcel1)
.extraParcelable(ComplexParcelable.random())
.extraSparseArrayParcelable(parcelSparseArray)
.extraString("a string")
.build();
startActivity(intent);
} | [
"Launch Sample Activity residing in the same module"
] | [
"Start a timer of the given string name for the current thread. If no such\ntimer exists yet, then it will be newly created.\n\n@param timerName\nthe name of the timer\n@param todoFlags\n@param threadId\nof the thread to track, or 0 if only system clock should be\ntracked",
"Returns a reasonable timeout duration for a watch request.\n\n@param expectedTimeoutMillis timeout duration that a user wants to use, in milliseconds\n@param bufferMillis buffer duration which needs to be added, in milliseconds\n@return timeout duration in milliseconds, between the specified {@code bufferMillis} and\nthe {@link #MAX_MILLIS}.",
"Get the bounding box for a certain tile.\n\n@param code\nThe unique tile code. Determines what tile we're talking about.\n@param maxExtent\nThe maximum extent of the grid to which this tile belongs.\n@param scale\nThe current client side scale.\n@return Returns the bounding box for the tile, expressed in the layer's coordinate system.",
"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>",
"Parses a record containing hours and add them to a container.\n\n@param ranges hours container\n@param hoursRecord hours record",
"Get the active operation.\n\n@param id the active operation id\n@return the active operation, {@code null} if if there is no registered operation",
"just as facade but we keep the qualifiers so that we can recognize Bean from @Intercepted Bean.",
"Seeks to the given day within the current year\n@param dayOfYear the day of the year to seek to, represented as an integer\nfrom 1 to 366. Must be guaranteed to parse as an Integer. If this day is\nbeyond the last day of the current year, the actual last day of the year\nwill be used.",
"Modify a bundle.\n\n@param moduleName the module name\n@param slot the module slot\n@param existingHash the existing hash\n@param newHash the new hash of the modified content\n@return the builder"
] |
private void addDefaults()
{
this.issueCategories.putIfAbsent(MANDATORY, new IssueCategory(MANDATORY, IssueCategoryRegistry.class.getCanonicalName(), "Mandatory", MANDATORY, 1000, true));
this.issueCategories.putIfAbsent(OPTIONAL, new IssueCategory(OPTIONAL, IssueCategoryRegistry.class.getCanonicalName(), "Optional", OPTIONAL, 1000, true));
this.issueCategories.putIfAbsent(POTENTIAL, new IssueCategory(POTENTIAL, IssueCategoryRegistry.class.getCanonicalName(), "Potential Issues", POTENTIAL, 1000, true));
this.issueCategories.putIfAbsent(CLOUD_MANDATORY, new IssueCategory(CLOUD_MANDATORY, IssueCategoryRegistry.class.getCanonicalName(), "Cloud Mandatory", CLOUD_MANDATORY, 1000, true));
this.issueCategories.putIfAbsent(INFORMATION, new IssueCategory(INFORMATION, IssueCategoryRegistry.class.getCanonicalName(), "Information", INFORMATION, 1000, true));
} | [
"Make sure that we have some reasonable defaults available. These would typically be provided by the rulesets\nin the real world."
] | [
"Returns all the deployment runtime names associated with an overlay accross all server groups.\n\n@param context the current OperationContext.\n@param overlay the name of the overlay.\n@return all the deployment runtime names associated with an overlay accross all server groups.",
"Gets the Correlation distance between two points.\n\n@param p A point in space.\n@param q A point in space.\n@return The Correlation distance between x and y.",
"Make sure that the Identity objects of garbage collected cached\nobjects are removed too.",
"Use this API to fetch cacheselector resources of given names .",
"Use this API to reset appfwlearningdata.",
"Retrieve list of assignment extended attributes.\n\n@return list of extended attributes",
"Prepares this DAG for node enumeration using getNext method, each call to getNext returns next node\nin the DAG with no dependencies.",
"Returns a unique file name\n@param baseFileName the requested base name for the file\n@param extension the requested extension for the file\n@param cleanBaseFileName specify if the <code>baseFileName</code> has to be cleaned before being used (i.e. 'jboss-web' should not be cleaned to avoid '-' to become '_')\n@param ancestorFolders specify the ancestor folders for the file (if there's no ancestor folder, just pass 'null' value)\n@return a String representing the unique file generated",
"This method extracts candidate elements from the current DOM tree in the browser, based on\nthe crawl tags defined by the user.\n\n@param currentState the state in which this extract method is requested.\n@return a list of candidate elements that are not excluded.\n@throws CrawljaxException if the method fails."
] |
List<CmsFavoriteEntry> getEntries() {
List<CmsFavoriteEntry> result = new ArrayList<>();
for (I_CmsEditableGroupRow row : m_group.getRows()) {
CmsFavoriteEntry entry = ((CmsFavInfo)row).getEntry();
result.add(entry);
}
return result;
} | [
"Gets the favorite entries corresponding to the currently displayed favorite widgets.\n\n@return the list of favorite entries"
] | [
"Send ourselves \"updates\" about any tracks that were loaded before we started, or before we were requesting\ndetails, since we missed them.",
"Whether the address has the well-known prefix for IPv4 translatable addresses as in rfc 6052 and 6144\n@return",
"Get object by identity. First lookup among objects registered in the\ntransaction, then in persistent storage.\n@param id The identity\n@return The object\n@throws PersistenceBrokerException",
"Creates PollingState from another polling state.\n\n@param other other polling state\n@param result the final result of the LRO\n@param <ResultT> the result that the poll operation produces\n@return the polling state",
"Add an executable \"post-run\" dependent for this model.\n\n@param executable the executable \"post-run\" dependent\n@return the key to be used as parameter to taskResult(string) method to retrieve result of executing\nthe executable \"post-run\" dependent",
"Determines if a token stream contains only numeric tokens\n@param stream\n@return true if all tokens in the given stream can be parsed as an integer",
"Returns the full workspace record for a single workspace.\n\n@param workspace Globally unique identifier for the workspace or organization.\n@return Request object",
"Determine if a CharSequence can be parsed as an Integer.\n\n@param self a CharSequence\n@return true if the CharSequence can be parsed\n@see #isInteger(String)\n@since 1.8.2",
"Consumes a produced result. Calls every transformer in sequence, then\ncalls every dataWriter in sequence.\n\n@param initialVars a map containing the initial variables assignments\n@return the number of lines written"
] |
public static ThreadPoolExecutor newFixedThreadPool(int threads, String groupname, int queueSize) {
return new ThreadPoolExecutor( threads, threads, 0L, TimeUnit.MILLISECONDS, new LinkedBlockingQueue<Runnable>(
queueSize ), new SearchThreadFactory( groupname ), new BlockPolicy() );
} | [
"Creates a new fixed size ThreadPoolExecutor\n\n@param threads\nthe number of threads\n@param groupname\na label to identify the threadpool; useful for profiling.\n@param queueSize\nthe size of the queue to store Runnables when all threads are busy\n@return the new ExecutorService"
] | [
"Returns the compact project records for all projects in the workspace.\n\n@param workspace The workspace or organization to find projects in.\n@return Request object",
"Converts any path into something that can be placed in an Android directory.\n\nTraverses any subdirectories and flattens it all into a single filename. Also\ngets rid of commonly seen illegal characters in tz identifiers, and lower cases\nthe entire thing.\n\n@param path the path to convert\n@return a flat path with no directories (and lower-cased)",
"EAP 7.1",
"Flush the in-memory data to the file",
"Finds all variables in the context with the given names, and also attaches all WindupFreeMarkerMethods from all addons into the map.\n\nThis allows external addons to extend the capabilities in the freemarker reporting system.",
"remove files from directory. All-or-nothing operation - if any of the files fails to be removed, all deleted files are restored.\n\nThe operation is performed in two steps - first all the files are moved to a backup folder, and afterwards backup folder is removed.\nIf an error occurs in the first step of the operation, all files are restored and the operation ends with status {@code false}.\nIf an error occurs in the second step, the operation ends with status {@code false}, but the files are not rolled back.\n\n@throws IOException if an error occurred",
"Compute Cholesky decomposition of A\n\n@param A symmetric, positive definite matrix (only upper half is used)\n@return upper triangular matrix U such that A = U' * U",
"Return a named object associated with the specified key.",
"Prepare the document before rendering.\n\n@param outputStream output stream to render to, null if only for layout\n@param format format\n@throws DocumentException oops\n@throws IOException oops\n@throws PrintingException oops"
] |
private void sendEmptyRequest(String path, String method) throws DatastoreEmulatorException {
HttpURLConnection connection = null;
try {
URL url = new URL(this.host + path);
connection = (HttpURLConnection) url.openConnection();
connection.setDoOutput(true);
connection.setRequestMethod(method);
connection.getOutputStream().close();
if (connection.getResponseCode() != HttpURLConnection.HTTP_OK) {
throw new DatastoreEmulatorException(
String.format(
"%s request to %s returned HTTP status %s",
method, path, connection.getResponseCode()));
}
} catch (IOException e) {
throw new DatastoreEmulatorException(
String.format("Exception connecting to emulator on %s request to %s", method, path), e);
} finally {
if (connection != null) {
connection.disconnect();
}
}
} | [
"Send an empty request using a standard HTTP connection."
] | [
"Apply the AAD algorithm to this very variable\n\nNOTE: in this case it is indeed correct to assume that the output dimension is \"one\"\nmeaning that there is only one {@link RandomVariableUniqueVariable} as an output.\n\n@return gradient for the built up function",
"Set the week days the events should occur.\n@param weekDays the week days to set.",
"Read a FastTrack file.\n\n@param file FastTrack file",
"Add profile to database, return collection of profile data. Called when 'enter' is hit in the UI\ninstead of 'submit' button\n\n@param model\n@param name\n@return\n@throws Exception",
"Get the URI for the given statement.\n\n@param statement\nthe statement for which to create a URI\n@return the URI",
"Retrieves a CodePage instance. Defaults to ANSI.\n\n@param field the index number of the field to be retrieved\n@return the value of the required field",
"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",
"Cosine interpolation.\n\n@param x1 X1 Value.\n@param x2 X2 Value.\n@param a Value.\n@return Value.",
"Process the scheduling project property from PROJPROP. This table only seems to exist\nin P6 databases, not XER files.\n\n@throws SQLException"
] |
public static base_responses export(nitro_service client, appfwlearningdata resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
appfwlearningdata exportresources[] = new appfwlearningdata[resources.length];
for (int i=0;i<resources.length;i++){
exportresources[i] = new appfwlearningdata();
exportresources[i].profilename = resources[i].profilename;
exportresources[i].securitycheck = resources[i].securitycheck;
exportresources[i].target = resources[i].target;
}
result = perform_operation_bulk_request(client, exportresources,"export");
}
return result;
} | [
"Use this API to export appfwlearningdata resources."
] | [
"Update the descriptor content with values from the editor.\n@throws CmsXmlException thrown if update fails due to a wrong XML structure (should never happen)",
"Creates the graphic element to be shown when the datasource is empty",
"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.",
"Starts a background thread which calls the controller every\ncheck_interval milliseconds. Returns immediately, leaving the\nbackground thread running.",
"Use this API to fetch all the policydataset resources that are configured on netscaler.",
"Convert a request type string to value\n\n@param requestType String value of request type GET/POST/PUT/DELETE\n@return Matching REQUEST_TYPE. Defaults to ALL",
"Builds the radio input to set the export and secure property.\n\n@param propName the name of the property to build the radio input for\n\n@return html for the radio input\n\n@throws CmsException if the reading of a property fails",
"Use this API to add policydataset.",
"Returns the number of consecutive leading one or zero bits.\nIf network is true, returns the number of consecutive leading one bits.\nOtherwise, returns the number of consecutive leading zero bits.\n\n@param network\n@return"
] |
public void setGroupsForPath(Integer[] groups, int pathId) {
String newGroups = Arrays.toString(groups);
newGroups = newGroups.substring(1, newGroups.length() - 1).replaceAll("\\s", "");
logger.info("adding groups={}, to pathId={}", newGroups, pathId);
EditService.updatePathTable(Constants.PATH_PROFILE_GROUP_IDS, newGroups, pathId);
} | [
"Set the groups assigned to a path\n\n@param groups group IDs to set\n@param pathId ID of path"
] | [
"1-D Integer array to double array.\n\n@param array Integer array.\n@return Double array.",
"Find Flickr Places information by Place URL.\n\n<p>\nThis method does not require authentication.\n</p>\n\n@deprecated This method has been deprecated. It won't be removed but you should use {@link PlacesInterface#getInfoByUrl(String)} instead.\n@param flickrPlacesUrl\n@return A Location\n@throws FlickrException",
"Use this API to fetch nsrpcnode resources of given names .",
"use the design parameters to compute the constraint equation to get the value",
"Parses command-line and checks if metadata is consistent across all\nnodes.\n\n@param args Command-line input\n@param printHelp Tells whether to print help only or execute command\nactually\n@throws IOException",
"Retrieve the integer value used to represent a task field in an\nMPX file.\n\n@param value MPXJ task field value\n@return MPX field value",
"Removes an Object from the cache.",
"Use this API to link sslcertkey resources.",
"Sets the bit at the specified index.\n@param index The index of the bit to set (0 is the least-significant bit).\n@param set A boolean indicating whether the bit should be set or not.\n@throws IndexOutOfBoundsException If the specified index is not a bit\nposition in this bit string."
] |
public static <E> Collection<E> sampleWithReplacement(Collection<E> c, int n) {
return sampleWithReplacement(c, n, new Random());
} | [
"Samples with replacement from a collection\n\n@param c\nThe collection to be sampled from\n@param n\nThe number of samples to take\n@return a new collection with the sample"
] | [
"slave=true",
"Finish service initialization.\n\n@throws GeomajasException oops",
"Retrieves the amount of time between two date time values. Note that\nthese values are converted into canonical values to remove the\ndate component.\n\n@param start start time\n@param end end time\n@return length of time",
"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",
"Determines the field via reflection look-up.\n\n@param clazz The java class to search in\n@param fieldName The field's name\n@return The field object or <code>null</code> if no matching field was found",
"Create and add model controller handler to an existing management channel handler.\n\n@param handler the channel handler\n@return the created client",
"Callback for constant meta class update change",
"Return the class's name, possibly by stripping the leading path",
"Gets an iterable of all the collections for the given user.\n@param api the API connection to be used when retrieving the collections.\n@return an iterable containing info about all the collections."
] |
public List<ProjectFile> readAll(InputStream is, boolean linkCrossProjectRelations) throws MPXJException
{
try
{
m_tables = new HashMap<String, List<Row>>();
m_numberFormat = new DecimalFormat();
processFile(is);
List<Row> rows = getRows("project", null, null);
List<ProjectFile> result = new ArrayList<ProjectFile>(rows.size());
List<ExternalPredecessorRelation> externalPredecessors = new ArrayList<ExternalPredecessorRelation>();
for (Row row : rows)
{
setProjectID(row.getInt("proj_id"));
m_reader = new PrimaveraReader(m_taskUdfCounters, m_resourceUdfCounters, m_assignmentUdfCounters, m_resourceFields, m_wbsFields, m_taskFields, m_assignmentFields, m_aliases, m_matchPrimaveraWBS);
ProjectFile project = m_reader.getProject();
project.getEventManager().addProjectListeners(m_projectListeners);
processProjectProperties();
processUserDefinedFields();
processCalendars();
processResources();
processResourceRates();
processTasks();
processPredecessors();
processAssignments();
externalPredecessors.addAll(m_reader.getExternalPredecessors());
m_reader = null;
project.updateStructure();
result.add(project);
}
if (linkCrossProjectRelations)
{
for (ExternalPredecessorRelation externalRelation : externalPredecessors)
{
Task predecessorTask;
// we could aggregate the project task id maps but that's likely more work
// than just looping through the projects
for (ProjectFile proj : result)
{
predecessorTask = proj.getTaskByUniqueID(externalRelation.getSourceUniqueID());
if (predecessorTask != null)
{
Relation relation = externalRelation.getTargetTask().addPredecessor(predecessorTask, externalRelation.getType(), externalRelation.getLag());
relation.setUniqueID(externalRelation.getUniqueID());
break;
}
}
// if predecessorTask not found the external task is outside of the file so ignore
}
}
return result;
}
finally
{
m_reader = null;
m_tables = null;
m_currentTableName = null;
m_currentTable = null;
m_currentFieldNames = null;
m_defaultCurrencyName = null;
m_currencyMap.clear();
m_numberFormat = null;
m_defaultCurrencyData = null;
}
} | [
"This is a convenience method which allows all projects in an\nXER file to be read in a single pass.\n\n@param is input stream\n@param linkCrossProjectRelations add Relation links that cross ProjectFile boundaries\n@return list of ProjectFile instances\n@throws MPXJException"
] | [
"Confirms that both clusters have the same set of zones defined.\n\n@param lhs\n@param rhs",
"Performs an efficient update of each columns' norm",
"Get a project according to its full name.\n\n@param fullName The full name of the project.\n@return The project which answers the full name.",
"Abort and close the transaction.\nCalling abort abandons all persistent object modifications and releases the\nassociated locks.\nIf transaction is not in progress a TransactionNotInProgressException is thrown",
"If the layer transformer has not been prepared yet, do it.\n\n@param transformer the transformer",
"On complete.\nSave response headers when needed.\n\n@param response\nthe response\n@return the response on single request",
"Send a failed operation response.\n\n@param context the request context\n@param errorCode the error code\n@param message the operation message\n@throws IOException for any error",
"Retrieves the time at which work starts on the given date, or returns\nnull if this is a non-working day.\n\n@param date Date instance\n@return start time, or null for non-working day",
"Encodes the given source into an encoded String using the rules specified\nby the given component and with the given options.\n@param source the source string\n@param encoding the encoding of the source string\n@param type the URI component for the source\n@return the encoded URI\n@throws IllegalArgumentException when the given uri parameter is not a valid URI"
] |
public static final Boolean parseExtendedAttributeBoolean(String value)
{
return ((value.equals("1") ? Boolean.TRUE : Boolean.FALSE));
} | [
"Parse an extended attribute boolean value.\n\n@param value string representation\n@return boolean value"
] | [
"Returns a RowColumn following the current one\n\n@return RowColumn following this one",
"Use this API to fetch auditnslogpolicy_vpnvserver_binding resources of given name .",
"Gets the logger.\n\n@return Returns a Category",
"Helper to format term updates as expected by the Wikibase API\n@param updates\nplanned updates for the type of term\n@return map ready to be serialized as JSON by Jackson",
"Iterates over the contents of an object or collection, and checks whether a\npredicate is valid for at least one element.\n\n@param self the object over which we iterate\n@param closure the closure predicate used for matching\n@return true if any iteration for the object matches the closure predicate\n@since 1.0",
"Returns iban length for the specified country.\n\n@param countryCode {@link org.iban4j.CountryCode}\n@return the length of the iban for the specified country.",
"Generates a set of excluded method names.\n\n@param methodNames method names\n@return set of method names",
"Use this API to add autoscaleaction.",
"Send message to all connections tagged with all given tags\n@param message the message\n@param labels the tag labels"
] |
public static String toJson(Calendar cal) {
if (cal == null) {
return NULL_VALUE;
}
CharBuf buffer = CharBuf.create(26);
writeDate(cal.getTime(), buffer);
return buffer.toString();
} | [
"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"
] | [
"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",
"Sets the parent node.\n\n@param parentNode The parent of this node. May be null, if this is a root node.",
"Checks if data set is mandatory but missing or non repeatable but having\nmultiple values in this IIM instance.\n\n@param info\nIIM data set to check\n@return list of constraint violations, empty set if data set is valid",
"Adds an additional statement to the constructed document.\n\n@param statement\nthe additional statement\n@return builder object to continue construction",
"Creates a ServiceCall from a paging operation that returns a header response.\n\n@param first the observable to the first page\n@param next the observable to poll subsequent pages\n@param callback the client-side callback\n@param <E> the element type\n@param <V> the header object type\n@return the future based ServiceCall",
"Convert element to another object given a parameterized type signature\n\n@param context\n@param destinationType\nthe destination type\n@param source\nthe source object\n\n@return the converted object\n@throws ConverterException\nif conversion failed",
"Closes off this connection pool.",
"Use this API to fetch a vpnglobal_binding resource .",
"Sets a single element of this vector. Elements 0, 1, and 2 correspond to\nx, y, and z.\n\n@param i\nelement index\n@param value\nelement value\n@return element value throws ArrayIndexOutOfBoundsException if i is not\nin the range 0 to 2."
] |
private static void listResources(ProjectFile file)
{
for (Resource resource : file.getResources())
{
System.out.println("Resource: " + resource.getName() + " (Unique ID=" + resource.getUniqueID() + ") Start=" + resource.getStart() + " Finish=" + resource.getFinish());
}
System.out.println();
} | [
"This method lists all resources defined in the file.\n\n@param file MPX file"
] | [
"Returns a single item from the Iterator.\nIf there's none, returns null.\nIf there are more, throws an IllegalStateException.\n\n@throws IllegalStateException",
"This configuration requires that all your tasks you submit to the system implement\nthe Groupable interface. By default, it will round robin tasks from each group\n\nTasks will be tracked internally in the system by randomly generated UUIDs\n\n@return",
"Use this API to fetch all the nsdiameter resources that are configured on netscaler.",
"Finds the missing value. Seems to lose a degree of freedom, but it\ndoesn't. That degree of freedom is already lost by the sensor.",
"Returns formatted version of Iban.\n\n@return A string representing formatted Iban for printing.",
"Forks off a runnable with the executor provided. Multiple calls are allowed, but the listeners must be\nthreadsafe.",
"Generate the next permutation and return a list containing\nthe elements in the appropriate order.\n@see #nextPermutationAsList(java.util.List)\n@see #nextPermutationAsArray()\n@return The next permutation as a list.",
"Use this API to fetch all the inat resources that are configured on netscaler.",
"Registers all custom Externalizer implementations that Hibernate OGM needs into a running\nInfinispan CacheManager configuration.\nThis is only safe to do when Caches from this CacheManager haven't been started yet,\nor the ones already started do not contain any data needing these.\n\n@see ExternalizerIds\n@param globalCfg the Serialization section of a GlobalConfiguration builder"
] |
public void performActions() {
if (this.clientConfiguration.getActions().isEmpty()) {
this.clientConfiguration.printHelp();
return;
}
this.dumpProcessingController.setOfflineMode(this.clientConfiguration
.getOfflineMode());
if (this.clientConfiguration.getDumpDirectoryLocation() != null) {
try {
this.dumpProcessingController
.setDownloadDirectory(this.clientConfiguration
.getDumpDirectoryLocation());
} catch (IOException e) {
logger.error("Could not set download directory to "
+ this.clientConfiguration.getDumpDirectoryLocation()
+ ": " + e.getMessage());
logger.error("Aborting");
return;
}
}
dumpProcessingController.setLanguageFilter(this.clientConfiguration
.getFilterLanguages());
dumpProcessingController.setSiteLinkFilter(this.clientConfiguration
.getFilterSiteKeys());
dumpProcessingController.setPropertyFilter(this.clientConfiguration
.getFilterProperties());
MwDumpFile dumpFile = this.clientConfiguration.getLocalDumpFile();
if (dumpFile == null) {
dumpFile = dumpProcessingController
.getMostRecentDump(DumpContentType.JSON);
} else {
if (!dumpFile.isAvailable()) {
logger.error("Dump file not found or not readable: "
+ dumpFile.toString());
return;
}
}
this.clientConfiguration.setProjectName(dumpFile.getProjectName());
this.clientConfiguration.setDateStamp(dumpFile.getDateStamp());
boolean hasReadyProcessor = false;
for (DumpProcessingAction props : this.clientConfiguration.getActions()) {
if (!props.isReady()) {
continue;
}
if (props.needsSites()) {
prepareSites();
if (this.sites == null) { // sites unavailable
continue;
}
props.setSites(this.sites);
}
props.setDumpInformation(dumpFile.getProjectName(),
dumpFile.getDateStamp());
this.dumpProcessingController.registerEntityDocumentProcessor(
props, null, true);
hasReadyProcessor = true;
}
if (!hasReadyProcessor) {
return; // silent; non-ready action should report its problem
// directly
}
if (!this.clientConfiguration.isQuiet()) {
EntityTimerProcessor entityTimerProcessor = new EntityTimerProcessor(
0);
this.dumpProcessingController.registerEntityDocumentProcessor(
entityTimerProcessor, null, true);
}
openActions();
this.dumpProcessingController.processDump(dumpFile);
closeActions();
try {
writeReport();
} catch (IOException e) {
logger.error("Could not print report file: " + e.getMessage());
}
} | [
"Performs all actions that have been configured."
] | [
"Boyer Moore scan that proceeds backwards from the end of the file looking for endsig\n\n@param file the file being checked\n@param channel the channel\n@param context the scan context\n@return\n@throws IOException",
"Creates a collection from the given stream, casting each object to the\nprovided listener class. The returned collection must not necessarily be\nmutable.\n\n@param <T> Type of the listeners in the given list.\n@param listenerClass The class of the objects in the provided list.\n@param listeners The stream to obtain the listeners for the resulting\ncollection from.\n@param sizeHint Expected size of the input stream.\n@return A typed copy of the list.",
"Refresh this context with the specified configuration locations.\n\n@param configLocations\nlist of configuration resources (see implementation for specifics)\n@throws GeomajasException\nindicates a problem with the new location files (see cause)",
"This method recursively descends the directory structure, dumping\ndetails of any files it finds to the output file.\n\n@param pw Output PrintWriter\n@param dir DirectoryEntry to dump\n@param prefix prefix used to identify path to this object\n@param showData flag indicating if data is dumped, or just structure\n@param hex set to true if hex output is required\n@param indent indent used if displaying structure only\n@throws Exception Thrown on file read errors",
"Use this API to update dospolicy.",
"Gets the matching beans for binding criteria from a list of beans\n\n@param resolvable the resolvable\n@return A set of filtered beans",
"Replaces the model used to depict the controller in the scene.\n\n@param controllerModel root of hierarchy to use for controller model\n@see #getControllerModel()\n@see #showControllerModel(boolean)",
"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.",
"Randomly generates matrix with the specified number of matrix elements filled with values from min to max.\n\n@param numRows Number of rows\n@param numCols Number of columns\n@param nz_total Total number of non-zero elements in the matrix\n@param min Minimum value\n@param max maximum value\n@param rand Random number generated\n@return Randomly generated matrix"
] |
private T getWrappedPublisher(Publisher flexiblePublisher, Class<T> type) {
if (!(flexiblePublisher instanceof FlexiblePublisher)) {
throw new IllegalArgumentException(String.format("Publisher should be of type: '%s'. Found type: '%s'",
FlexiblePublisher.class, flexiblePublisher.getClass()));
}
List<ConditionalPublisher> conditions = ((FlexiblePublisher) flexiblePublisher).getPublishers();
for (ConditionalPublisher condition : conditions) {
if (type.isInstance(condition.getPublisher())) {
return type.cast(condition.getPublisher());
}
}
return null;
} | [
"Gets the publisher wrapped by the specofoed FlexiblePublisher.\n@param publisher The FlexiblePublisher wrapping the publisher.\n@param type The type of the publisher wrapped by the FlexiblePublisher.\n@return The publisher object wrapped by the FlexiblePublisher.\nNull is returned if the FlexiblePublisher does not wrap a publisher of the specified type.\n@throws IllegalArgumentException In case publisher is not of type\n{@link org.jenkins_ci.plugins.flexible_publish.FlexiblePublisher}"
] | [
"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.",
"The service name to be removed. Can be overridden for unusual service naming patterns\n@param name The name of the resource being removed\n@return The service name to remove. May return {@code null} if only removal based on {@code unavailableCapabilities}\npassed to the constructor are to be performed",
"Obtain the path ID for a profile\n\n@param identifier Can be the path ID, or friendly name\n@param profileId\n@return\n@throws Exception",
"Distributed process finish.\n\n@param rb the rb\n@param mtasFields the mtas fields\n@throws IOException Signals that an I/O exception has occurred.",
"Set a Background Drawable using the appropriate Android version api call\n\n@param view\n@param drawable",
"Append this message to the message set\n@param messages message to append\n@return the written size and first offset\n@throws IOException file write exception",
"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}.",
"Use this API to fetch appfwwsdl resource of given name .",
"Launches the client with the specified parameters.\n\n@param args\ncommand line parameters\n@throws ParseException\n@throws IOException"
] |
@Override
protected void onGraphDraw(Canvas _Canvas) {
super.onGraphDraw(_Canvas);
_Canvas.translate(-mCurrentViewport.left, -mCurrentViewport.top);
drawBars(_Canvas);
} | [
"region Override Methods"
] | [
"Use this API to fetch clusterinstance_binding resource of given name .",
"Keep track of this handle tied to which thread so that if the thread is terminated\nwe can reclaim our connection handle. We also\n@param c connection handle to track.",
"Use this API to fetch all the snmpoption resources that are configured on netscaler.",
"Run a task periodically and indefinitely.\n\n@param task\nTask to run.\n@param delay\nThe first execution will happen in {@code delay} seconds.\n@param period\nSubsequent executions will happen every {@code period} seconds\nafter the first.\n@return An interface that lets you query the status; cancel; or\nreschedule the event.",
"Will create a JNDI Context and register it as the initial context factory builder\n\n@return the context\n@throws NamingException\non any issue during initial context factory builder registration",
"Tries to guess the packaging of the archive - whether it's an EAR, WAR, JAR.\nMaybe not needed as we can rely on the suffix?",
"Adds a metadata classification to the specified file.\n\n@param classificationType the metadata classification type.\n@return the metadata classification type added to the file.",
"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",
"Factory method to do the setup and transformation of inputs\n\n@param matrix a {@link TestMatrixArtifact} loaded by ProctorLoader\n@param loadResult a {@link ProctorLoadResult} which contains result of validation of test definition\n@param functionMapper a given el {@link FunctionMapper}\n@return constructed Proctor object"
] |
public static CharSequence formatDuration(Context context, ReadableDuration readableDuration) {
Resources res = context.getResources();
Duration duration = readableDuration.toDuration();
final int hours = (int) duration.getStandardHours();
if (hours != 0) {
return res.getQuantityString(R.plurals.joda_time_android_duration_hours, hours, hours);
}
final int minutes = (int) duration.getStandardMinutes();
if (minutes != 0) {
return res.getQuantityString(R.plurals.joda_time_android_duration_minutes, minutes, minutes);
}
final int seconds = (int) duration.getStandardSeconds();
return res.getQuantityString(R.plurals.joda_time_android_duration_seconds, seconds, seconds);
} | [
"Return given duration in a human-friendly format. For example, \"4\nminutes\" or \"1 second\". Returns only largest meaningful unit of time,\nfrom seconds up to hours.\n\nThe longest duration it supports is hours.\n\nThis method assumes that there are 60 minutes in an hour,\n60 seconds in a minute and 1000 milliseconds in a second.\nAll currently supplied chronologies use this definition."
] | [
"Use this API to convert sslpkcs12.",
"Visits an annotation on a local variable type.\n\n@param typeRef\na reference to the annotated type. The sort of this type\nreference must be {@link TypeReference#LOCAL_VARIABLE\nLOCAL_VARIABLE} or {@link TypeReference#RESOURCE_VARIABLE\nRESOURCE_VARIABLE}. See {@link TypeReference}.\n@param typePath\nthe path to the annotated type argument, wildcard bound, array\nelement type, or static inner type within 'typeRef'. May be\n<tt>null</tt> if the annotation targets 'typeRef' as a whole.\n@param start\nthe fist instructions corresponding to the continuous ranges\nthat make the scope of this local variable (inclusive).\n@param end\nthe last instructions corresponding to the continuous ranges\nthat make the scope of this local variable (exclusive). This\narray must have the same size as the 'start' array.\n@param index\nthe local variable's index in each range. This array must have\nthe same size as the 'start' array.\n@param desc\nthe class descriptor of the annotation class.\n@param visible\n<tt>true</tt> if the annotation is visible at runtime.\n@return a visitor to visit the annotation values, or <tt>null</tt> if\nthis visitor is not interested in visiting this annotation.",
"Serialize specified object to directory with specified name.\n\n@param directory write to\n@param name serialize object with specified name\n@param obj object to serialize\n@return number of bytes written to directory",
"Use this API to fetch responderpolicy_binding resource of given name .",
"disables the current active id, enables the new one selected\n\n@param profileId profile ID of the client\n@param clientUUID UUID of the client\n@param active true to make client active, false to make client inactive\n@throws Exception exception",
"Retrieves state and metrics information for all client connections across the cluster.\n\n@return list of connections across the cluster",
"The ID field contains the identifier number that Microsoft Project\nautomatically assigns to each task as you add it to the project.\nThe ID indicates the position of a task with respect to the other tasks.\n\n@param val ID",
"This method retrieves the offset of a given entry in the Var2Data block.\nEach entry can be uniquely located by the identifier of the object to\nwhich the data belongs, and the type of the data.\n\n@param id unique identifier of an entity\n@param type data type identifier\n@return offset of requested item",
"Stops all transitions."
] |
public com.cloudant.client.api.model.ReplicationResult trigger() {
ReplicationResult couchDbReplicationResult = replication.trigger();
com.cloudant.client.api.model.ReplicationResult replicationResult = new com.cloudant
.client.api.model.ReplicationResult(couchDbReplicationResult);
return replicationResult;
} | [
"Triggers a replication request, blocks while the replication is in progress.\n@return ReplicationResult encapsulating the result"
] | [
"Write the given pattern to given log in given logging level\n@param logger\n@param level\n@param pattern\n@param exception",
"Process an MPP file to make it anonymous.\n\n@param input input file name\n@param output output file name\n@throws Exception",
"Set the values using the specified Properties object.\n\n@param properties Properties object containing specific property values\nfor the RESTClient config\n\nNote: We're using the same property names as that in ClientConfig\nfor backwards compatibility.",
"Returns the link for the given workplace resource.\n\nThis should only be used for resources under /system or /shared.<p<\n\n@param cms the current OpenCms user context\n@param resourceName the resource to generate the online link for\n@param forceSecure forces the secure server prefix\n\n@return the link for the given resource",
"Accessor method used to retrieve a String 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",
"Returns the Field for a given parent class and a dot-separated path of\nfield names.\n\n@param clazz\nParent class.\n@param path\nPath to the desired field.",
"Finds the most recent dump of the given type that is actually available.\n\n@param dumpContentType\nthe type of the dump to look for\n@return most recent main dump or null if no such dump exists",
"Create a ModelNode representing the operating system the instance is running on.\n\n@return a ModelNode representing the operating system the instance is running on.\n@throws OperationFailedException",
"See page 385 of Fundamentals of Matrix Computations 2nd"
] |
protected int getCenterChild(CacheDataSet cache) {
if (cache.count() == 0)
return -1;
int id = cache.getId(0);
switch (getGravityInternal()) {
case TOP:
case LEFT:
case FRONT:
case FILL:
break;
case BOTTOM:
case RIGHT:
case BACK:
id = cache.getId(cache.count() - 1);
break;
case CENTER:
int i = cache.count() / 2;
while (i < cache.count() && i >= 0) {
id = cache.getId(i);
if (cache.getStartDataOffset(id) <= 0) {
if (cache.getEndDataOffset(id) >= 0) {
break;
} else {
i++;
}
} else {
i--;
}
}
break;
default:
break;
}
Log.d(LAYOUT, TAG, "getCenterChild = %d ", id);
return id;
} | [
">>>>>> measureUntilFull helper methods"
] | [
"checkpoint the ObjectModification",
"Turn json string into map\n\n@param json\n@return",
"Search for photos which match the given search parameters.\n\n@param params\nThe search parameters\n@param perPage\nThe number of photos to show per page\n@param page\nThe page offset\n@return A PhotoList\n@throws FlickrException",
"Find 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",
"Gets information about this collaboration.\n\n@return info about this collaboration.",
"Builds the task hierarchy.\n\nNote that there are two distinct levels of organisation going on here. The first is the\nAsta \"summary\" organisation, where the user organises bars into summary groups. We are using this\nto create our hierarchy of tasks.\n\nThe second level displayed within a summary group (or at the project level if the user has not\ncreated summary groups) is the WBS. At the moment we are not including the WBS in the hierarchy.\n\n@param bars bar data\n@param expandedTasks expanded task data\n@param tasks task data\n@param milestones milestone data\n@return list containing the top level tasks",
"Returns PatternParser used to parse the conversion string. Subclasses may\noverride this to return a subclass of PatternParser which recognize\ncustom conversion characters.\n\n@since 0.9.0",
"AND operation which takes the previous clause and the next clause and AND's them together.",
"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"
] |
public Iterable<BoxRetentionPolicyAssignment.Info> getEnterpriseAssignments(int limit, String ... fields) {
return this.getAssignments(BoxRetentionPolicyAssignment.TYPE_ENTERPRISE, limit, fields);
} | [
"Returns iterable with all enterprise assignments of this retention policy.\n@param limit the limit of entries per response. The default value is 100.\n@param fields the fields to retrieve.\n@return an iterable containing all enterprise assignments."
] | [
"Send a kill signal to all running instances and return as soon as the signal is sent.",
"Returns the number of consecutive trailing one or zero bits.\nIf network is true, returns the number of consecutive trailing zero bits.\nOtherwise, returns the number of consecutive trailing one bits.\n\n@param network\n@return",
"Solve the using the lower triangular matrix in LU. Diagonal elements are assumed\nto be 1",
"Record a content loader for a given patch id.\n\n@param patchID the patch id\n@param contentLoader the content loader",
"set the Modification state to a new value. Used during state transitions.\n@param newModificationState org.apache.ojb.server.states.ModificationState",
"Turn map into string\n\n@param propMap Map to be converted\n@return",
"Checks to see if a WORD matches the name of a macro. if it does it applies the macro at that location",
"Read properties from the raw header data.\n\n@param stream input stream",
"Add a plugin path\n\n@param model\n@param add\n@return\n@throws Exception"
] |
public ServerRedirect addServerMapping(String sourceHost, String destinationHost, String hostHeader) {
JSONObject response = null;
ArrayList<BasicNameValuePair> params = new ArrayList<BasicNameValuePair>();
params.add(new BasicNameValuePair("srcUrl", sourceHost));
params.add(new BasicNameValuePair("destUrl", destinationHost));
params.add(new BasicNameValuePair("profileIdentifier", this._profileName));
if (hostHeader != null) {
params.add(new BasicNameValuePair("hostHeader", hostHeader));
}
try {
BasicNameValuePair paramArray[] = new BasicNameValuePair[params.size()];
params.toArray(paramArray);
response = new JSONObject(doPost(BASE_SERVER, paramArray));
} catch (Exception e) {
e.printStackTrace();
return null;
}
return getServerRedirectFromJSON(response);
} | [
"Add a new server mapping to current profile\n\n@param sourceHost source hostname\n@param destinationHost destination hostname\n@param hostHeader host header\n@return ServerRedirect"
] | [
"Iterates through the given InputStream line by line using the specified\nencoding, splitting each line using the given separator. The list of tokens\nfor each line is then passed to the given closure. Finally, the stream\nis closed.\n\n@param stream an InputStream\n@param regex the delimiting regular expression\n@param charset opens the stream with a specified charset\n@param closure a closure\n@return the last value returned by the closure\n@throws IOException if an IOException occurs.\n@throws java.util.regex.PatternSyntaxException\nif the regular expression's syntax is invalid\n@see #splitEachLine(java.io.Reader, java.lang.String, groovy.lang.Closure)\n@since 1.5.5",
"Check whether the URL contains one of the patterns.\n\n@param uri URI\n@param patterns possible patterns\n@return true when URL contains one of the patterns",
"Assign FK value to all n-side objects referenced by given object.\n\n@param obj real object with 1:n reference\n@param cod {@link CollectionDescriptor} of referenced 1:n objects\n@param insert flag signal insert operation, false signals update operation",
"Serializes the given object in JSON and returns the resulting string. In\ncase of errors, null is returned. In particular, this happens if the\nobject is not based on a Jackson-annotated class. An error is logged in\nthis case.\n\n@param object\nobject to serialize\n@return JSON serialization or null",
"A property tied to the map, updated when the idle state event is fired.\n\n@return",
"Checks if the specified max levels is correct.\n\n@param userMaxLevels the maximum number of levels in the tree\n@param defaultMaxLevels the default max number of levels\n@return the validated max levels",
"set the specified object at index\n\n@param object The object to add at the end of the array.",
"This method retrieves the calendar hours for the specified day.\nNote that if this is a derived calendar, then this method\nwill refer to the base calendar where no hours are specified\nin the derived calendar.\n\n@param day Day instance\n@return calendar hours",
"Verifies if the new value is different from the field's old value. It's\nuseful, for example, in NoSQL databases that replicates data between\nservers. This verification prevents to mark a field as modified and to be\nreplicated needlessly.\n\n@param field\nthe field that we are checking before to be modified\n@param value\nthe new value\n@return true if the new and the old values are different and the value\nwas changed."
] |
public static void pushClassType(CodeAttribute b, String classType) {
if (classType.length() != 1) {
if (classType.startsWith("L") && classType.endsWith(";")) {
classType = classType.substring(1, classType.length() - 1);
}
b.loadClass(classType);
} else {
char type = classType.charAt(0);
switch (type) {
case 'I':
b.getstatic(Integer.class.getName(), TYPE, LJAVA_LANG_CLASS);
break;
case 'J':
b.getstatic(Long.class.getName(), TYPE, LJAVA_LANG_CLASS);
break;
case 'S':
b.getstatic(Short.class.getName(), TYPE, LJAVA_LANG_CLASS);
break;
case 'F':
b.getstatic(Float.class.getName(), TYPE, LJAVA_LANG_CLASS);
break;
case 'D':
b.getstatic(Double.class.getName(), TYPE, LJAVA_LANG_CLASS);
break;
case 'B':
b.getstatic(Byte.class.getName(), TYPE, LJAVA_LANG_CLASS);
break;
case 'C':
b.getstatic(Character.class.getName(), TYPE, LJAVA_LANG_CLASS);
break;
case 'Z':
b.getstatic(Boolean.class.getName(), TYPE, LJAVA_LANG_CLASS);
break;
default:
throw new RuntimeException("Cannot handle primitive type: " + type);
}
}
} | [
"Pushes a class type onto the stack from the string representation This can\nalso handle primitives\n\n@param b the bytecode\n@param classType the type descriptor for the class or primitive to push.\nThis will accept both the java.lang.Object form and the\nLjava/lang/Object; form"
] | [
"Set the duration option.\n@param value the duration option to set ({@link EndType} as string).",
"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",
"Pads the given String to the left with the given character to ensure that\nit's at least totalChars long.",
"List details of all calendars in the file.\n\n@param file ProjectFile instance",
"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",
"Get the element at the index as a float.\n\n@param i the index of the element to access",
"Quick and dirty XML text escape.\n\n@param sb working string buffer\n@param text input text\n@return escaped text",
"Calculate delta with another vector\n@param v another vector\n@return delta vector",
"orientation state factory method"
] |
public static double[][] toDouble(int[][] array) {
double[][] n = new double[array.length][array[0].length];
for (int i = 0; i < array.length; i++) {
for (int j = 0; j < array[0].length; j++) {
n[i][j] = (double) array[i][j];
}
}
return n;
} | [
"2-D Integer array to double array.\n\n@param array Integer array.\n@return Double array."
] | [
"Each element of the second array is added to each element of the first.",
"Use this API to unset the properties of gslbsite resource.\nProperties that need to be unset are specified in args array.",
"Removes the given entity from the inverse associations it manages.",
"Append Join for SQL92 Syntax",
"Only converts the B matrix and passes that onto solve. Te result is then copied into\nthe input 'X' matrix.\n\n@param B A matrix ℜ <sup>m × p</sup>. Not modified.\n@param X A matrix ℜ <sup>n × p</sup>, where the solution is written to. Modified.",
"Loads all localizations not already loaded.\n@throws CmsException thrown if locking a file fails.\n@throws UnsupportedEncodingException thrown if reading a file fails.\n@throws IOException thrown if reading a file fails.",
"Closes any registered stream entries that have not yet been consumed",
"Use this API to restore appfwprofile resources.",
"Create a new file but fail if it already exists. The check for\nexistance of the file and it's creation are an atomic operation with\nrespect to other filesystem activities."
] |
public void addResourceAssignment(ResourceAssignment assignment)
{
if (getExistingResourceAssignment(assignment.getResource()) == null)
{
m_assignments.add(assignment);
getParentFile().getResourceAssignments().add(assignment);
Resource resource = assignment.getResource();
if (resource != null)
{
resource.addResourceAssignment(assignment);
}
}
} | [
"Add a resource assignment which has been populated elsewhere.\n\n@param assignment resource assignment"
] | [
"Read an element which contains only a single list attribute of a given\ntype, returning it as an array.\n@param reader the reader\n@param attributeName the attribute name, usually \"value\"\n@param type the value type class\n@param <T> the value type\n@return the value list as an array\n@throws javax.xml.stream.XMLStreamException if an error occurs or if the\nelement does not contain the specified attribute, contains other\nattributes, or contains child elements.",
"Static method to convert a binary operator into a string.\n\n@param oper is the binary comparison operator to be converted",
"This method extracts task data from a Planner file.\n\n@param plannerProject Root node of the Planner file",
"Use this API to fetch a appflowglobal_binding resource .",
"When creating barcode columns\n@return",
"Adds the specified list of users as members of the project. Returns the updated project record.\n\n@param project The project to add members to.\n@return Request object",
"We have received notification that a device is no longer on the network, so clear out all its waveforms.\n\n@param announcement the packet which reported the device’s disappearance",
"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",
"Checks if is file exist.\n\n@param filePath\nthe file path\n@return true, if is file exist"
] |
@AsParameterConverter
public Trader retrieveTrader(String name) {
for (Trader trader : traders) {
if (trader.getName().equals(name)) {
return trader;
}
}
return mockTradePersister().retrieveTrader(name);
} | [
"Method used as dynamical parameter converter"
] | [
"Creates and returns a GVRSceneObject with the specified mesh attributes.\n\n@param vertices the vertex positions of that make up the mesh. (x1, y1, z1, x2, y2, z2, ...)\n@param velocities the velocity attributes for each vertex. (vx1, vy1, vz1, vx2, vy2, vz2...)\n@param particleTimeStamps the spawning times of each vertex. (t1, 0, t2, 0, t3, 0 ..)\n\n@return The GVRSceneObject with this mesh.",
"Writes back hints file.",
"Returns timezone offset from a session instance. The offset is\nin minutes to UTC time\n\n@param session\nthe session instance\n@return the offset to UTC time in minutes",
"Checks String to see if the parameter is null.\n@param paramValue Object that will be checked if null.\n@return this.true if the parameter that is being checked is not null",
"Executes a given SPARQL query and returns a stream with the result in\nJSON format.\n\n@param query\n@return\n@throws IOException",
"Send a device found announcement to all registered listeners.\n\n@param announcement the message announcing the new device",
"Caches the results of radix to the given power.\n\n@param radix\n@param power\n@return",
"Returns the class of datatype URI that best characterizes the range of\nthe given property based on its datatype.\n\n@param propertyIdValue\nthe property for which to get a range\n@return the range URI or null if the datatype could not be identified.",
"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"
] |
public static boolean isQuotedConstant(String str) {
if (str == null || str.isEmpty()) {
return false;
}
return (str.startsWith("\"") && str.endsWith("\""));
} | [
"Returns true if string starts and ends with double-quote\n@param str\n@return"
] | [
"Converts Observable of page to Observable of Inner.\n@param <InnerT> type of inner.\n@param innerPage Page to be converted.\n@return Observable for list of inner.",
"Returns the parsed story from the given text\n\n@param configuration the Configuration used to run story\n@param storyAsText the story text\n@param storyId the story Id, which will be returned as story path\n@return The parsed Story",
"Remove a key for all language versions. If a descriptor is present, the key is only removed in the descriptor.\n\n@param key the key to remove.\n@return <code>true</code> if removing was successful, <code>false</code> otherwise.",
"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",
"adds all json extension to an diagram\n@param modelJSON\n@param current\n@throws org.json.JSONException",
"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",
"return the ctc costs and gradients, given the probabilities and labels",
"Resize the image passing the new height and width\n\n@param height\n@param width\n@return",
"Converts the results to CSV data.\n\n@return the CSV data"
] |
public static boolean decomposeQR_block_col( final int blockLength ,
final DSubmatrixD1 Y ,
final double gamma[] )
{
int width = Y.col1-Y.col0;
int height = Y.row1-Y.row0;
int min = Math.min(width,height);
for( int i = 0; i < min; i++ ) {
// compute the householder vector
if (!computeHouseHolderCol(blockLength, Y, gamma, i))
return false;
// apply to rest of the columns in the block
rank1UpdateMultR_Col(blockLength,Y,i,gamma[Y.col0+i]);
}
return true;
} | [
"Performs a standard QR decomposition on the specified submatrix that is one block wide.\n\n@param blockLength\n@param Y\n@param gamma"
] | [
"Execute pull docker image on agent\n\n@param launcher\n@param imageTag\n@param username\n@param password\n@param host\n@return\n@throws IOException\n@throws InterruptedException",
"Gets an iterable of all the collections for the given user.\n@param api the API connection to be used when retrieving the collections.\n@return an iterable containing info about all the collections.",
"Term prefix.\n\n@param term\nthe term\n@return the string",
"Create a temporary directory with the same attributes as its parent directory.\n@param dir\nthe path to directory in which to create the directory\n@param prefix\nthe prefix string to be used in generating the directory's name;\nmay be {@code null}\n@return the path to the newly created directory that did not exist before\nthis method was invoked\n@throws IOException",
"A tie-in for subclasses such as AdaGrad.",
"Use this API to unset the properties of ipv6 resource.\nProperties that need to be unset are specified in args array.",
"Extracts the service name from a Server.\n@param server\n@return",
"Computes eigenvalues only\n\n@return",
"One of facade methods for operating the Shell.\n\nRun the obtained Shell with commandLoop().\n\n@see org.gearvrf.debug.cli.Shell#Shell(org.gearvrf.debug.cli.Shell.Settings, org.gearvrf.debug.cli.CommandTable, java.util.List)\n\n@param prompt Prompt to be displayed\n@param appName The app name string\n@param handlers Command handlers\n@return Shell that can be either further customized or run directly by calling commandLoop()."
] |
private void cascadeDeleteFor(ObjectEnvelope mod, List alreadyPrepared)
{
// avoid endless recursion
if(alreadyPrepared.contains(mod.getIdentity())) return;
alreadyPrepared.add(mod.getIdentity());
ClassDescriptor cld = getTransaction().getBroker().getClassDescriptor(mod.getObject().getClass());
List refs = cld.getObjectReferenceDescriptors(true);
cascadeDeleteSingleReferences(mod, refs, alreadyPrepared);
List colls = cld.getCollectionDescriptors(true);
cascadeDeleteCollectionReferences(mod, colls, alreadyPrepared);
} | [
"Walk through the object graph of the specified delete object. Was used for\nrecursive object graph walk."
] | [
"create a new instance of the class represented by the no-argument constructor provided\n@param constructor the zero argument constructor for the class\n@return a new instance of the class\n@throws InstantiationException\n@throws ClassNotPersistenceCapableException if the constructor is null or there is an\nexception while trying to create a new instance",
"Process hours in a working day.\n\n@param calendar project calendar\n@param dayRecord working day data",
"Unmarshals the XML content and adds the file to the bundle files.\n@throws CmsException thrown if reading the file or unmarshaling fails.",
"Start check of execution time\n@param extra",
"refresh the most recent history entries\n\n@param limit number of entries to populate\n@param offset number of most recent entries to skip\n@return populated history entries\n@throws Exception exception",
"This method prints goal information of an agent through its external\naccess. It can be used to check the correct behaviour of the agent.\n\n@param agent_name\nThe name of the agent\n@param connector\nThe connector to get the external access\n@return goals the IGoal[] with all the information, so the tester can\nlook for information",
"Use this API to clear configuration on netscaler.\n@param force clear confirmation without prompting.\n@param level clear config according to the level. eg: basic, extended, full\n@return status of the operation performed.\n@throws Exception Nitro exception is thrown.",
"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.",
"Split a module Id to get the module version\n@param moduleId\n@return String"
] |
@Override
public void onNewState(CrawlerContext context, StateVertex vertex) {
LOG.debug("onNewState");
StateBuilder state = outModelCache.addStateIfAbsent(vertex);
visitedStates.putIfAbsent(state.getName(), vertex);
saveScreenshot(context.getBrowser(), state.getName(), vertex);
outputBuilder.persistDom(state.getName(), context.getBrowser().getUnStrippedDom());
} | [
"Saves a screenshot of every new state."
] | [
"Gets the specified SPI, using the current thread context classloader\n\n@param <T> type of spi class\n@param spiType spi class to retrieve\n@return object",
"Returns the list of module dependencies regarding the provided filters\n\n@param moduleId String\n@param filters FiltersHolder\n@return List<Dependency>",
"Creates PollingState from another polling state.\n\n@param other other polling state\n@param result the final result of the LRO\n@param <ResultT> the result that the poll operation produces\n@return the polling state",
"Get components list for current instance\n@return components",
"Use this API to unset the properties of nsspparams resource.\nProperties that need to be unset are specified in args array.",
"This method is called if the data set has been changed. Subclasses might want to override\nthis method to add some extra logic.\n\nGo through all items in the list:\n- reuse the existing views in the list\n- add new views in the list if needed\n- trim the unused views\n- request re-layout\n\n@param preferableCenterPosition the preferable center position. If it is -1 - keep the\ncurrent center position.",
"Returns a persistence strategy based on the passed configuration.\n\n@param cacheMapping the selected {@link org.hibernate.ogm.datastore.keyvalue.options.CacheMappingType}\n@param externalCacheManager the infinispan cache manager\n@param configurationUrl the location of the configuration file\n@param jtaPlatform the {@link JtaPlatform}\n@param entityTypes the meta-data of the entities\n@param associationTypes the meta-data of the associations\n@param idSourceTypes the meta-data of the id generators\n@return the persistence strategy",
"Returns the value of the identified field as a Long.\n@param fieldName the name of the field\n@return the value of the field as a Long\n@throws FqlException if the field cannot be expressed as an Long",
"Rollback to the specified push version\n\n@param rollbackToDir The version directory to rollback to"
] |
public T modifyFile(final String name, final List<String> path, final byte[] existingHash, final byte[] newHash, final boolean isDirectory) {
return modifyFile(name, path, existingHash, newHash, isDirectory, null);
} | [
"Modify a misc file.\n\n@param name the file name\n@param path the relative path\n@param existingHash the existing hash\n@param newHash the new hash of the modified content\n@param isDirectory whether the file is a directory or not\n@return the builder"
] | [
"Processes the template for all collection definitions of the current class definition.\n\n@param template The template\n@param attributes The attributes of the tag\n@exception XDocletException if an error occurs\[email protected] type=\"block\"",
"Returns a map of URIs to package name, as specified by the packageNames\nparameter.",
"Construct a pretty string documenting progress for this batch plan thus\nfar.\n\n@return pretty string documenting progress",
"Transforms an input file into HTML.\n\n@param file\nThe File to process.\n@param safeMode\nSet to <code>true</code> to escape unsafe HTML tags.\n@return The processed String.\n@throws IOException\nif an IO error occurs\n@see Configuration#DEFAULT",
"Find all the values of the requested type.\n\n@param valueTypeToFind the type of the value to return.\n@param <T> the type of the value to find.\n@return the key, value pairs found.",
"Initialize all components of this URI builder with the components of the given URI.\n@param uri the URI\n@return this UriComponentsBuilder",
"Puts value at given column\n\n@param value Will be encoded using UTF-8",
"Use this API to fetch all the ipset resources that are configured on netscaler.",
"Updates the Q matrix to take inaccount the row that was removed by only multiplying e\nlements that need to be. There is still some room for improvement here...\n@param rowIndex"
] |
public final void configureAccess(final Template template, final ApplicationContext context) {
final Configuration configuration = template.getConfiguration();
AndAccessAssertion accessAssertion = context.getBean(AndAccessAssertion.class);
accessAssertion.setPredicates(configuration.getAccessAssertion(), template.getAccessAssertion());
this.access = accessAssertion;
} | [
"Configure the access permissions required to access this print job.\n\n@param template the containing print template which should have sufficient information to\nconfigure the access.\n@param context the application context"
] | [
"A callback that handles requestComplete event from NIO selector manager\nWill try any possible nodes and pass itself as callback util all nodes\nare exhausted\n\n@param slopKey\n@param slopVersioned\n@param nodesToTry List of nodes to try to contact. Will become shorter\nafter each callback",
"Emit an enum event with parameters supplied.\n\nThis will invoke all {@link SimpleEventListener} bound to the specific\nenum value and all {@link SimpleEventListener} bound to the enum class\ngiven the listeners has the matching argument list.\n\nFor example, given the following enum definition:\n\n```java\npublic enum UserActivity {LOGIN, LOGOUT}\n```\n\nWe have the following simple event listener methods:\n\n```java\n{@literal @}OnEvent\npublic void handleUserActivity(UserActivity, User user) {...}\n\n{@literal @}OnUserActivity(UserActivity.LOGIN)\npublic void logUserLogin(User user, long timestamp) {...}\n\n{@literal @}OnUserActivity(UserActivity.LOGOUT)\npublic void logUserLogout(User user) {...}\n```\n\nThe following code will invoke `logUserLogin` method:\n\n```java\nUser user = ...;\neventBus.emit(UserActivity.LOGIN, user, System.currentTimeMills());\n```\n\nThe `handleUserActivity` is not invoked because\n\n* The method parameter `(UserActivity, User, long)` does not match the declared argument list `(UserActivity, User)`\n\nWhile the following code will invoke both `handleUserActivity` and `logUserLogout` methods:\n\n```java\nUser user = ...;\neventBus.emit(UserActivity.LOGOUT, user);\n```\n\nThe `logUserLogin` method will not be invoked because\n\n1. the method is bound to `UserActivity.LOGIN` enum value specifically, while `LOGOUT` is triggered\n2. the method has a `long timestamp` in the argument list and it is not passed to `eventBus.emit`\n\n@param event\nthe target event\n@param args\nthe arguments passed in\n@see SimpleEventListener",
"Constructs a list of items with given separators.\n\n@param sql\nStringBuilder to which the constructed string will be\nappended.\n@param list\nList of objects (usually strings) to join.\n@param init\nString to be added to the start of the list, before any of the\nitems.\n@param sep\nSeparator string to be added between items in the list.",
"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",
"Finds all variables in the context with the given names, and also attaches all WindupFreeMarkerMethods from all addons into the map.\n\nThis allows external addons to extend the capabilities in the freemarker reporting system.",
"This method is called to alert project listeners to the fact that\na resource assignment has been written to a project file.\n\n@param resourceAssignment resourceAssignment instance",
"Extract phrases from Korean input text\n\n@param tokens Korean tokens (output of tokenize(CharSequence text)).\n@return List of phrase CharSequences.",
"Poll for the next N waiting jobs in line.\n\n@param size maximum amount of jobs to poll for\n@return up to \"size\" jobs",
"set the layout which will host the ScrimInsetsFrameLayout and its layoutParams\n\n@param container\n@param layoutParams\n@return"
] |
private ModelNode addLocalHost(final ModelNode address, final List<ModelNode> operationList, final String hostName) {
String resolvedHost = hostName != null ? hostName : defaultHostControllerName;
// All further operations should modify the newly added host so the address passed in is updated.
address.add(HOST, resolvedHost);
// Add a step to setup the ManagementResourceRegistrations for the root host resource
final ModelNode hostAddOp = new ModelNode();
hostAddOp.get(OP).set(HostAddHandler.OPERATION_NAME);
hostAddOp.get(OP_ADDR).set(address);
operationList.add(hostAddOp);
// Add a step to store the HC name
ModelNode nameValue = hostName == null ? new ModelNode() : new ModelNode(hostName);
final ModelNode writeName = Util.getWriteAttributeOperation(address, NAME, nameValue);
operationList.add(writeName);
return hostAddOp;
} | [
"Add the operation to add the local host definition."
] | [
"Adds a column to this table definition.\n\n@param columnDef The new column",
"Sets the model that the handling works on.\n\n@param databaseModel The database model\n@param objModel The object model",
"Returns the right string representation of the effort level based on given number of points.",
"Adds an individual alias. It will be merged with the current\nlist of aliases, or added as a label if there is no label for\nthis item in this language yet.\n\n@param alias\nthe alias to add",
"Operates on one dimension at a time.",
"Calculate a cache key.\n@param sql to use\n@param columnIndexes to use\n@return cache key to use.",
"Accessor method used to retrieve a Number instance 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 fetch appfwpolicylabel_binding resource of given name .",
"Creates a timestamp from the equivalent long value. This conversion\ntakes account of the time zone and any daylight savings time.\n\n@param timestamp timestamp expressed as a long integer\n@return new Date instance"
] |
public static Class<?> getMapValueFieldType(Field mapField, int nestingLevel) {
return getGenericFieldType(mapField, Map.class, 1, null, nestingLevel);
} | [
"Determine the generic value type of the given Map field.\n@param mapField the map field to introspect\n@param nestingLevel the nesting level of the target type\n(typically 1; e.g. in case of a List of Lists, 1 would indicate the\nnested List, whereas 2 would indicate the element of the nested List)\n@return the generic type, or {@code null} if none"
] | [
"Use this API to clear Interface.",
"Handler for week of month changes.\n@param event the change event.",
"Assemble the configuration section of the URL.",
"Creates a new DMatrixRMaj around the provided data. The data must encode\na row-major matrix. Any modification to the returned matrix will modify the\nprovided data.\n\n@param numRows Number of rows in the matrix.\n@param numCols Number of columns in the matrix.\n@param data Data that is being wrapped. Referenced Saved.\n@return A matrix which references the provided data internally.",
"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>",
"Returns a converter instance for the given annotation.\n\n@param annotation the annotation\n@return a converter instance or {@code null} if the given annotation is no option annotation",
"Creates a new Box Developer Edition connection with enterprise token leveraging an access token cache.\n@param enterpriseId the enterprise ID to use for requesting access token.\n@param clientId the client ID to use when exchanging the JWT assertion for an access token.\n@param clientSecret the client secret to use when exchanging the JWT assertion for an access token.\n@param encryptionPref the encryption preferences for signing the JWT.\n@param accessTokenCache the cache for storing access token information (to minimize fetching new tokens)\n@return a new instance of BoxAPIConnection.",
"Accessor method used to retrieve a Boolean object representing the\ncontents of an individual field. If the field does not exist in the\nrecord, null is returned.\n\n@param field the index number of the field to be retrieved\n@return the value of the required field",
"Processes graphical indicator definitions for each column."
] |
public Table createTable(ProjectFile file, byte[] data, VarMeta varMeta, Var2Data varData)
{
Table table = new Table();
table.setID(MPPUtility.getInt(data, 0));
table.setResourceFlag(MPPUtility.getShort(data, 108) == 1);
table.setName(MPPUtility.removeAmpersands(MPPUtility.getUnicodeString(data, 4)));
byte[] columnData = null;
Integer tableID = Integer.valueOf(table.getID());
if (m_tableColumnDataBaseline != null)
{
columnData = varData.getByteArray(varMeta.getOffset(tableID, m_tableColumnDataBaseline));
}
if (columnData == null)
{
columnData = varData.getByteArray(varMeta.getOffset(tableID, m_tableColumnDataEnterprise));
if (columnData == null)
{
columnData = varData.getByteArray(varMeta.getOffset(tableID, m_tableColumnDataStandard));
}
}
processColumnData(file, table, columnData);
//System.out.println(table);
return (table);
} | [
"Creates a new Table instance from data extracted from an MPP file.\n\n@param file parent project file\n@param data fixed data\n@param varMeta var meta\n@param varData var data\n@return Table instance"
] | [
"Tests whether the given string is the name of a java.lang type.",
"Bilinear interpolation of ARGB values.\n@param x the X interpolation parameter 0..1\n@param y the y interpolation parameter 0..1\n@param rgb array of four ARGB values in the order NW, NE, SW, SE\n@return the interpolated value",
"Converts an object into a tab delimited string with given fields\nRequires the object has public access for the specified fields\n\n@param object Object to convert\n@param delimiter delimiter\n@param fieldNames fieldnames\n@return String representing object",
"Adds a new metadata value of array type.\n@param path the path to the field.\n@param values the collection of values.\n@return the metadata object for chaining.",
"Reads an argument of type \"number\" from the request.",
"Checks if data set is mandatory but missing or non repeatable but having\nmultiple values in this IIM instance.\n\n@param info\nIIM data set to check\n@return list of constraint violations, empty set if data set is valid",
"Creates a new row representing a rule.\n@param type the type for the rule row, must not be null nor {@link TableRowType#CONTENT} nor {@link TableRowType#UNKNOWN}\n@param style the style for the rule row, must not be null nor {@link TableRowStyle#UNKNOWN}\n@return a new row representing a rule\n@throws {@link NullPointerException} if type or style where null\n@throws {@link IllegalStateException} if type or style where unknown or if type was {@link TableRowType#CONTENT}",
"Obtain instance of the SQL Service\n\n@return instance of SQLService\n@throws Exception exception",
"Returns a List of all of the values in the Map whose key matches an entry in the nameMapping array.\n\n@param map\nthe map\n@param nameMapping\nthe keys of the Map values to add to the List\n@return a List of all of the values in the Map whose key matches an entry in the nameMapping array\n@throws NullPointerException\nif map or nameMapping is null"
] |
protected synchronized void releaseBroker(PersistenceBroker broker)
{
/*
arminw:
only close the broker instance if we get
it from the PBF, do nothing if we obtain it from
PBThreadMapping
*/
if (broker != null && _needsClose)
{
_needsClose = false;
broker.close();
}
} | [
"Release the broker instance."
] | [
"Copied from AbstractEntityPersister",
"Appends the given string encoding special HTML characters.\n\n@param out\nThe StringBuilder to write to.\n@param in\nInput String.\n@param start\nInput String starting position.\n@param end\nInput String end position.",
"NOT IN Criteria with SubQuery\n@param attribute The field name to be used\n@param subQuery The subQuery",
"Returns the parameter key of the facet with the given name.\n@param facet the facet's name.\n@return the parameter key for the facet.",
"Assign float value within allowed range of [0,infinity) to initializeOnly SFFloat field named spacing.\n@param newValue",
"compute Sin using Taylor Series.\n\n@param x An angle, in radians.\n@param nTerms Number of terms.\n@return Result.",
"Serialize the object JSON. When an error occures return a string with the given error.",
"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",
"Create an `AppDescriptor` with appName and package name specified\n\nIf `appName` is `null` or blank, it will try the following\napproach to get app name:\n\n1. check the {@link Version#getArtifactId() artifact id} and use it unless\n2. if artifact id is null or empty, then infer app name using {@link AppNameInferer}\n\n@param appName\nthe app name\n@param packageName\nthe package name of the app\n@return\nan `AppDescriptor` instance"
] |
public static int hoursDiff(Date earlierDate, Date laterDate) {
if (earlierDate == null || laterDate == null) {
return 0;
}
return (int) ((laterDate.getTime() / HOUR_MILLIS) - (earlierDate.getTime() / HOUR_MILLIS));
} | [
"Get the hours difference"
] | [
"Returns the primary port of the server.\n\n@return the primary {@link ServerPort} if the server is started. {@link Optional#empty()} otherwise.",
"Helper to read an optional Integer value.\n@param path The XML path of the element to read.\n@return The Integer value stored in the XML, or <code>null</code> if the value could not be read.",
"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 update sslparameter.",
"Get the element at the index as a string.\n\n@param i the index of the element to access",
"Only return tools with a name matching this partial string\n@param searchTerm Tool name to search for\n@return This object to allow adding more options",
"Returns the naming context.",
"Closes the Netty Channel and releases all resources",
"Write an int attribute.\n\n@param name attribute name\n@param value attribute value"
] |
private List<Row> getRows(String sql) throws SQLException
{
allocateConnection();
try
{
List<Row> result = new LinkedList<Row>();
m_ps = m_connection.prepareStatement(sql);
m_rs = m_ps.executeQuery();
populateMetaData();
while (m_rs.next())
{
result.add(new MpdResultSetRow(m_rs, m_meta));
}
return (result);
}
finally
{
releaseConnection();
}
} | [
"Retrieve a number of rows matching the supplied query.\n\n@param sql query statement\n@return result set\n@throws SQLException"
] | [
"Whether the rows of the given association should be stored in a hash using the single row key column as key or\nnot.",
"Remove a bundle.\n\n@param moduleName the module name\n@param slot the module slot\n@param existingHash the existing hash\n@return the builder",
"Sets the default pattern values dependent on the provided start date.\n@param startDate the date, the default values are determined with.",
"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",
"Use this API to fetch authenticationlocalpolicy_authenticationvserver_binding resources of given name .",
"Sleeps if necessary to slow down the caller.\n\n@param eventsSeen Number of events seen since last invocation. Basis for\ndetermining whether its necessary to sleep.",
"Gets the interpolated text of a query from cache. If key does not exist, an exception is thrown.\n\n@param key\nname of the query\n@return the query text",
"Set the specular intensity of the light.\n\nThis designates the color of the specular reflection.\nIt is multiplied by the material specular color to derive\nthe hue of the specular reflection for that material.\nThe built-in phong shader {@link GVRPhongShader} uses a {@code vec4} uniform named\n{@code specular_intensity} to control the specular intensity.\n\n@param r red component (0 to 1)\n@param g green component (0 to 1)\n@param b blue component (0 to 1)\n@param a alpha component (0 to 1)",
"Processes an anonymous reference definition.\n\n@param attributes The attributes of the tag\n@exception XDocletException If an error occurs\[email protected] type=\"content\"\[email protected] name=\"attributes\" optional=\"true\" description=\"Attributes of the reference as name-value pairs 'name=value',\nseparated by commas\"\[email protected] name=\"auto-delete\" optional=\"true\" description=\"Whether to automatically delete the\nreferenced object on object deletion\"\[email protected] name=\"auto-retrieve\" optional=\"true\" description=\"Whether to automatically retrieve\nthe referenced object\"\[email protected] name=\"auto-update\" optional=\"true\" description=\"Whether to automatically update the\nreferenced object\"\[email protected] name=\"class-ref\" optional=\"false\" description=\"The fully qualified name of the class\nowning the referenced field\"\[email protected] name=\"documentation\" optional=\"true\" description=\"Documentation on the reference\"\[email protected] name=\"foreignkey\" optional=\"true\" description=\"The fields in the current type used for\nimplementing the reference\"\[email protected] name=\"otm-dependent\" optional=\"true\" description=\"Whether the reference is dependent on otm\"\[email protected] name=\"proxy\" optional=\"true\" description=\"Whether to use a proxy for the reference\"\[email protected] name=\"proxy-prefetching-limit\" optional=\"true\" description=\"Specifies the amount of objects to prefetch\"\[email protected] name=\"refresh\" optional=\"true\" description=\"Whether to automatically refresh the\nreference\"\[email protected] name=\"remote-foreignkey\" optional=\"true\" description=\"The fields in the referenced type\ncorresponding to the local fields (is only used for the table definition)\""
] |
@PostConstruct
protected void postConstruct() {
if (pixelPerUnitBased) {
// Calculate numerator and denominator
if (pixelPerUnit > PIXEL_PER_METER) {
this.numerator = pixelPerUnit / conversionFactor;
this.denominator = 1;
} else {
this.numerator = 1;
this.denominator = PIXEL_PER_METER / pixelPerUnit;
}
setPixelPerUnitBased(false);
} else {
// Calculate PPU
this.pixelPerUnit = numerator / denominator * conversionFactor;
setPixelPerUnitBased(true);
}
} | [
"Finish configuration."
] | [
"Write a map field to the JSON file.\n\n@param fieldName field name\n@param value field value",
"the absolute and relative calls are the trickiest parts. We have to\nmove across cursor boundaries potentially.\n\na + row value indexes from beginning of resultset\na - row value indexes from the end of th resulset.\n\nCalling absolute(1) is the same as calling first().\nCalling absolute(-1) is the same as calling last().",
"A convenience method for creating an immutable list.\n\n@param self a Set\n@return an immutable Set\n@see java.util.Collections#unmodifiableSet(java.util.Set)\n@since 1.0",
"Decode the password from the given data. Will decode the data block as well.\n\n@param data encrypted data block\n@param encryptionCode encryption code\n\n@return password",
"Returns the curve resulting from the local linear regression with discrete kernel.\n\n@return The regression curve.",
"Awaits at most 5 minutes until all pods meets the given predicate.\n\n@param filter used to wait to detect that a pod is up and running.",
"Read a four byte integer.\n\n@param data byte array\n@param offset offset into array\n@return integer value",
"This method is used to finalize the configuration\nafter the configuration items have been set.",
"Write a string field to the JSON file.\n\n@param fieldName field name\n@param value field value"
] |
public List<Pair<int[][][], int[]>> documentsToDataAndLabelsList(Collection<List<IN>> documents) {
int numDatums = 0;
List<Pair<int[][][], int[]>> docList = new ArrayList<Pair<int[][][], int[]>>();
for (List<IN> doc : documents) {
Pair<int[][][], int[]> docPair = documentToDataAndLabels(doc);
docList.add(docPair);
numDatums += doc.size();
}
System.err.println("numClasses: " + classIndex.size() + ' ' + classIndex);
System.err.println("numDocuments: " + docList.size());
System.err.println("numDatums: " + numDatums);
System.err.println("numFeatures: " + featureIndex.size());
return docList;
} | [
"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."
] | [
"Validate the header signature.\n\n@param input The input to read the signature from\n@throws IOException If any read problems occur",
"Get the JSON representation of the metadata field filter.\n@return the JSON object representing the filter.",
"returns a sorted array of fields",
"Determines whether or not two axially aligned bounding boxes in\nthe same coordinate space intersect.\n@param bv1 first bounding volume to test.\n@param bv2 second bounding volume to test.\n@return true if the boxes intersect, false if not.",
"Initialization that parses the String to a JSON object.\n@param configString The JSON as string.\n@param baseConfig The optional basic search configuration to overwrite (partly) by the JSON configuration.\n@throws JSONException thrown if parsing fails.",
"Generates an organization regarding the parameters.\n\n@param name String\n@return Organization",
"This method returns the value it is passed, or null if the value\nmatches the nullValue argument.\n\n@param value value under test\n@param nullValue return null if value under test matches this value\n@return value or null",
"Use this API to delete onlinkipv6prefix of given name.",
"Adds a chain of vertices to the end of this list."
] |
public void insertBefore(Vertex vtx, Vertex next) {
vtx.prev = next.prev;
if (next.prev == null) {
head = vtx;
} else {
next.prev.next = vtx;
}
vtx.next = next;
next.prev = vtx;
} | [
"Inserts a vertex into this list before another specificed vertex."
] | [
"Build a compact representation of the ModelNode.\n@param node The model\n@return A single line containing the multi lines ModelNode.toString() content.",
"Converts a time in milliseconds to the appropriate x coordinate for drawing something at that time.\n\n@param milliseconds the time at which something should be drawn\n\n@return the component x coordinate at which it should be drawn",
"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",
"Call the appropriate handler for handling the httprequest. 404 if path is not found. 405 if path is found but\nhttpMethod does not match what's configured.\n\n@param request instance of {@code HttpRequest}\n@param responder instance of {@code HttpResponder} to handle the request.",
"used for encoding queries or form data",
"Handles Multi Instance Report message. Handles Report on\nthe number of instances for the command class.\n@param serialMessage the serial message to process.\n@param offset the offset at which to start procesing.",
"Called after creating the first connection. The adapter should create its caches and do all initialization it requires. Most\nimportantly, the SQL query cache should be created.\n\n@param cnx\nan open ready to use connection to the database.",
"Returns all factory instances that match the query.\n\n@param query the factory query, not null.\n@return the instances found, never null.",
"Updates the information about the user status for this terms of service with any info fields that have\nbeen modified locally.\n@param info the updated info."
] |
@Override
public boolean isCompleteRequest(final ByteBuffer buffer) throws VoldemortException {
DataInputStream inputStream = new DataInputStream(new ByteBufferBackedInputStream(buffer));
try {
byte opCode = inputStream.readByte();
// Store Name
inputStream.readUTF();
// Store routing type
getRoutingType(inputStream);
switch(opCode) {
case VoldemortOpCode.GET_VERSION_OP_CODE:
if(!GetVersionRequestHandler.isCompleteRequest(inputStream, buffer))
return false;
break;
case VoldemortOpCode.GET_OP_CODE:
if(!GetRequestHandler.isCompleteRequest(inputStream, buffer, protocolVersion))
return false;
break;
case VoldemortOpCode.GET_ALL_OP_CODE:
if(!GetAllRequestHandler.isCompleteRequest(inputStream, buffer, protocolVersion))
return false;
break;
case VoldemortOpCode.PUT_OP_CODE: {
if(!PutRequestHandler.isCompleteRequest(inputStream, buffer, protocolVersion))
return false;
break;
}
case VoldemortOpCode.DELETE_OP_CODE: {
if(!DeleteRequestHandler.isCompleteRequest(inputStream, buffer))
return false;
break;
}
default:
throw new VoldemortException(" Unrecognized Voldemort OpCode " + opCode);
}
// This should not happen, if we reach here and if buffer has more
// data, there is something wrong.
if(buffer.hasRemaining()) {
logger.info("Probably a client bug, Discarding additional bytes in isCompleteRequest. Opcode: "
+ opCode + ", remaining bytes: " + buffer.remaining());
}
return true;
} catch(IOException e) {
// This could also occur if the various methods we call into
// re-throw a corrupted value error as some other type of exception.
// For example, updating the position on a buffer past its limit
// throws an InvalidArgumentException.
if(logger.isDebugEnabled())
logger.debug("Probable partial read occurred causing exception", e);
return false;
}
} | [
"This is pretty ugly. We end up mimicking the request logic here, so this\nneeds to stay in sync with handleRequest."
] | [
"Use this API to add nsacl6 resources.",
"Load the available layers.\n\n@param image the installed image\n@param productConfig the product config to establish the identity\n@param moduleRoots the module roots\n@param bundleRoots the bundle roots\n@return the layers\n@throws IOException",
"Finds the null space of A\n@param A (Input) Matrix. Modified\n@param numSingularValues Number of singular values\n@param nullspace Storage for null-space\n@return true if successful or false if it failed",
"Obtains a Accounting local date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the Accounting local date-time, not null\n@throws DateTimeException if unable to create the date-time",
"Assign FK value of main object with PK values of the reference object.\n\n@param obj real object with reference (proxy) object (or real object with set FK values on insert)\n@param cld {@link ClassDescriptor} of the real object\n@param rds An {@link ObjectReferenceDescriptor} of real object.\n@param insert Show if \"linking\" is done while insert or update.",
"Prints the data for a single class to the given stream. This will be a\nsingle line in CSV.\n\n@param out\nthe output to write to\n@param classRecord\nthe class record to write\n@param entityIdValue\nthe item id that this class record belongs to",
"Use this API to fetch sslvserver_sslcipher_binding resources of given name .",
"Creates a player wrapper for the Android MediaPlayer.",
"Get a boolean value from the values or null.\n\n@param key the look up key of the value"
] |
public Set<ConstraintViolation> validate(int record) {
Set<ConstraintViolation> errors = new LinkedHashSet<ConstraintViolation>();
for (int ds = 0; ds < 250; ++ds) {
try {
DataSetInfo dataSetInfo = dsiFactory.create(IIM.DS(record, ds));
errors.addAll(validate(dataSetInfo));
} catch (InvalidDataSetException ignored) {
// DataSetFactory doesn't know about this ds, so will skip it
}
}
return errors;
} | [
"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"
] | [
"Returns a new ObjectPool for the specified connection descriptor.\nOverride this method to setup your own pool.\n@param jcd the connection descriptor for which to set up the pool\n@return a newly created object pool",
"Set the value of switch component.",
"Use this API to update nsacl6.",
"Associate a name with an object and make it persistent.\nAn object instance may be bound to more than one name.\nBinding a previously transient object to a name makes that object persistent.\n@param object The object to be named.\n@param name The name to be given to the object.\n@exception org.odmg.ObjectNameNotUniqueException\nIf an attempt is made to bind a name to an object and that name is already bound\nto an object.",
"Create an error image should an error occur while fetching a WMS map.\n\n@param width image width\n@param height image height\n@param e exception\n@return error image\n@throws java.io.IOException oops",
"Closes off this connection pool.",
"Obtain the master partition for a given key\n\n@param key\n@return master partition id",
"Inserts the LokenList immediately following the 'before' token",
"Discards any tracks from the hot cache that were loaded from a now-unmounted media slot, because they are no\nlonger valid."
] |
public void removeAllAnimations() {
for (int i = 0, size = mAnimationList.size(); i < size; i++) {
mAnimationList.get(i).removeAnimationListener(mAnimationListener);
}
mAnimationList.clear();
} | [
"Stops and clears all transitions"
] | [
"This method returns an array containing all of the unique identifiers\nfor which data has been stored in the Var2Data block.\n\n@return array of unique identifiers",
"Asta Powerproject assigns an explicit calendar for each task. This method\nis used to find the most common calendar and use this as the default project\ncalendar. This allows the explicitly assigned task calendars to be removed.",
"Adds each of the specified followers to the task, if they are not already\nfollowing. Returns the complete, updated record for the affected task.\n\n@param task The task to add followers to.\n@return Request object",
"Write the given number of bytes out to the array\n\n@param bytes The array to write to\n@param value The value to write from\n@param offset the offset into the array\n@param numBytes The number of bytes to write",
"Gets the JsonObject representation of the Field Operation.\n@param fieldOperation represents the template update operation\n@return the json object",
"Check type.\n\n@param type the type\n@return the boolean",
"Generate a results file for each test in each suite.\n@param outputDirectory The target directory for the generated file(s).",
"Calculates the LatLong position of the end point of a line the specified\ndistance from this LatLong, along the provided bearing, where North is 0,\nEast is 90 etc.\n\n@param bearing The bearing, in degrees, with North as 0, East as 90 etc.\n@param distance The distance in metres.\n@return A new LatLong indicating the end point.",
"Constraint that ensures that the field has a conversion if the java type requires it. Also checks the conversion class.\n\n@param fieldDef The field descriptor\n@param checkLevel The current check level (this constraint is checked in basic (partly) and strict)\n@exception ConstraintException If the conversion class is invalid"
] |
static void init() {// NOPMD
determineIfNTEventLogIsSupported();
URL resource = null;
final String configurationOptionStr = OptionConverter.getSystemProperty(DEFAULT_CONFIGURATION_KEY, null);
if (configurationOptionStr != null) {
try {
resource = new URL(configurationOptionStr);
} catch (MalformedURLException ex) {
// so, resource is not a URL:
// attempt to get the resource from the class path
resource = Loader.getResource(configurationOptionStr);
}
}
if (resource == null) {
resource = Loader.getResource(DEFAULT_CONFIGURATION_FILE); // NOPMD
}
if (resource == null) {
System.err.println("[FoundationLogger] Can not find resource: " + DEFAULT_CONFIGURATION_FILE); // NOPMD
throw new FoundationIOException("Can not find resource: " + DEFAULT_CONFIGURATION_FILE); // NOPMD
}
// update the log manager to use the Foundation repository.
final RepositorySelector foundationRepositorySelector = new FoundationRepositorySelector(FoundationLogFactory.foundationLogHierarchy);
LogManager.setRepositorySelector(foundationRepositorySelector, null);
// set logger to info so we always want to see these logs even if root
// is set to ERROR.
final Logger logger = getLogger(FoundationLogger.class);
final String logPropFile = resource.getPath();
log4jConfigProps = getLogProperties(resource);
// select and configure again so the loggers are created with the right
// level after the repository selector was updated.
OptionConverter.selectAndConfigure(resource, null, FoundationLogFactory.foundationLogHierarchy);
// start watching for property changes
setUpPropFileReloading(logger, logPropFile, log4jConfigProps);
// add syslog appender or windows event viewer appender
// setupOSSystemLog(logger, log4jConfigProps);
// parseMarkerPatterns(log4jConfigProps);
// parseMarkerPurePattern(log4jConfigProps);
// udpateMarkerStructuredLogOverrideMap(logger);
AbstractFoundationLoggingMarker.init();
updateSniffingLoggersLevel(logger);
setupJULSupport(resource);
} | [
"Initialize that Foundation Logging library."
] | [
"Remove control from the control bar. Size of control bar is updated based on new number of\ncontrols.\n@param name name of the control to remove",
"this method is not intended to be called by clients\n@since 2.12",
"Updates the styling and content of the internal text area based on the real value, the ghost value, and whether\nit has focus.",
"Use this API to add cmppolicylabel.",
"Returns the configured fields of the current field configuration.\n\n@return the configured fields of the current field configuration",
"Extract data for a single task.\n\n@param parent task parent\n@param row Synchro task data",
"Producers returned from this method are not validated. Internal use only.",
"Locks the bundle descriptor.\n@throws CmsException thrown if locking fails.",
"Returns the names of the involved fields when post processing.\n\n@return the names of the involved fields"
] |
private static void setupFlowId(SoapMessage message) {
String flowId = FlowIdHelper.getFlowId(message);
if (flowId == null) {
flowId = FlowIdProtocolHeaderCodec.readFlowId(message);
}
if (flowId == null) {
flowId = FlowIdSoapCodec.readFlowId(message);
}
if (flowId == null) {
Exchange ex = message.getExchange();
if (null!=ex){
Message reqMsg = ex.getOutMessage();
if ( null != reqMsg) {
flowId = FlowIdHelper.getFlowId(reqMsg);
}
}
}
if (flowId != null && !flowId.isEmpty()) {
FlowIdHelper.setFlowId(message, flowId);
}
} | [
"This functions reads SAM flowId and sets it\nas message property for subsequent store in CallContext\n@param message"
] | [
"Creates a namespace if needed.",
"Gets the value of the project property.\n\n<p>\nThis accessor method returns a reference to the live list,\nnot a snapshot. Therefore any modification you make to the\nreturned list will be present inside the JAXB object.\nThis is why there is not a <CODE>set</CODE> method for the project property.\n\n<p>\nFor example, to add a new item, do as follows:\n<pre>\ngetProject().add(newItem);\n</pre>\n\n\n<p>\nObjects of the following type(s) are allowed in the list\n{@link ProjectListType.Project }",
"Acquire the exclusive 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.",
"Use this API to fetch aaauser_auditsyslogpolicy_binding resources of given name .",
"Use this API to fetch all the autoscaleprofile resources that are configured on netscaler.",
"Sends a dummy statement to the server to keep the connection alive\n@param connection Connection handle to perform activity on\n@return true if test query worked, false otherwise",
"Prepare the options by adding additional information to them.\n@see <a href=\"https://docs.mongodb.com/manual/core/index-ttl/\">TTL Indexes</a>",
"Sets the specified range of elements in the specified array to the specified value.\n\n@param from the index of the first element (inclusive) to be filled with the specified value.\n@param to the index of the last element (inclusive) to be filled with the specified value.\n@param val the value to be stored in the specified elements of the receiver.",
"Gets the Hamming distance between two strings.\n\n@param first First string.\n@param second Second string.\n@return The Hamming distance between p and q."
] |
public AsciiTable setPaddingLeftRight(int padding){
for(AT_Row row : this.rows){
if(row.getType()==TableRowType.CONTENT){
row.setPaddingLeftRight(padding);
}
}
return this;
} | [
"Sets left and right padding for all cells in the table.\n@param padding new padding for left and right, ignored if smaller than 0\n@return this to allow chaining"
] | [
"Finds \"Y\" coordinate value in which more elements could be added in the band\n@param band\n@return",
"perform the actual matching",
"Store the data of a print job in the registry.\n\n@param printJobStatus the print job status",
"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",
"Log a fatal message.",
"Use this API to add onlinkipv6prefix resources.",
"Set the locking values\n@param cld\n@param obj\n@param oldLockingValues",
"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",
"Try to unlink the declaration from the importerService referenced by the ServiceReference,.\nreturn true if they have been cleanly unlink, false otherwise.\n\n@param declaration The Declaration\n@param declarationBinderRef The ServiceReference of the ImporterService\n@return true if they have been cleanly unlink, false otherwise."
] |
private void addListeners(ProjectReader reader)
{
if (m_projectListeners != null)
{
for (ProjectListener listener : m_projectListeners)
{
reader.addProjectListener(listener);
}
}
} | [
"Adds any listeners attached to this reader to the reader created internally.\n\n@param reader internal project reader"
] | [
"Get a unique reference to a place where a track is currently loaded in a player.\n\n@param player the player in which the track is loaded\n@param hotCue hot cue number in which the track is loaded, or 0 if it is actively loaded on the playback deck\n\n@return the instance that will always represent a reference to the specified player and hot cue",
"From the set of classes a new set is built containing all indexed\nsubclasses, but removing then all subtypes of indexed entities.\n\n@param selection\n\n@return a new set of entities",
"Return a list of unique namespace and predicate pairs, optionally limited by predicate or namespace, in alphabetical order.\n\nThis method does not require authentication.\n\n@param namespace\noptional, can be null\n@param predicate\noptional, can be null\n@param perPage\nThe number of photos to show per page\n@param page\nThe page offset\n@return NamespacesList containing Pair-objects\n@throws FlickrException",
"Use this API to fetch policydataset_value_binding resources of given name .",
"Returns iban's country code and check digit.\n\n@param iban String\n@return countryCodeAndCheckDigit String",
"Appends the accumulated words to the resulting words. Trailing whitespace is removed because of the\npostprocessing that inserts custom whitespace\n\n@param currentWords is the {@link StringBuilder} of the accumulated words\n@param formattedWords is the list that is being appended to",
"adds all json extension to an diagram\n@param modelJSON\n@param current\n@throws org.json.JSONException",
"List the slack values for each task.\n\n@param file ProjectFile instance",
"Store a comment based on comment text, gavc and user information\n\n@param gavc - entity id\n@param commentText - comment text\n@param credential - user credentials\n@param entityType - type of the entity"
] |
public List<T> nextPermutationAsList()
{
List<T> permutation = new ArrayList<T>(elements.length);
return nextPermutationAsList(permutation);
} | [
"Generate the next permutation and return a list containing\nthe elements in the appropriate order.\n@see #nextPermutationAsList(java.util.List)\n@see #nextPermutationAsArray()\n@return The next permutation as a list."
] | [
"Special multiplication that takes in account the zeros and one in Y, which\nis the matrix that stores the householder vectors.",
"Helper to read a mandatory String value list.\n@param path The XML path of the element to read.\n@return The String list stored in the XML, or <code>null</code> if the value could not be read.\n@throws Exception thrown if the list of String values can not be read.",
"Send a data to Incoming Webhook endpoint.",
"Get an exception reporting an unexpected end tag for an XML element.\n@param reader the stream reader\n@return the exception",
"This method reads an eight byte integer from the input array.\n\n@param data the input array\n@param offset offset of integer data in the array\n@return integer value",
"Use this API to fetch vpnsessionaction resource of given name .",
"Abort the daemon\n\n@param error the error causing the abortion",
"Gets Widget bounds depth\n@return depth",
"Returns an empty model of a Dependency in Json\n\n@return String\n@throws IOException"
] |
protected void reportStorageOpTime(long startNs) {
if(streamStats != null) {
streamStats.reportStreamingScan(operation);
streamStats.reportStorageTime(operation,
Utils.elapsedTimeNs(startNs, System.nanoTime()));
}
} | [
"Helper method to track storage operations & time via StreamingStats.\n\n@param startNs"
] | [
"Return the profileId for a path\n\n@param path_id ID of path\n@return ID of profile\n@throws Exception exception",
"Read the file header data.\n\n@param is input stream",
"Clone a widget info map considering what may be copied to the client.\n\n@param widgetInfo widget info map\n@return cloned copy including only records which are not {@link ServerSideOnlyInfo}",
"Convert this path address to its model node representation.\n\n@return the model node list of properties",
"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",
"Resets the generator state.",
"Adds a new row after the given one.\n\n@param row the row after which a new one should be added",
"Returns the current version info for a provided remote document.\n@param remoteDocument the remote BSON document from which to extract version info\n@return a DocumentVersionInfo",
"Reads all sub-categories below the provided category.\n@return The map from the provided category to it's sub-categories in a {@link CmsJspCategoryAccessBean}."
] |
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"
] | [
"Print channels to the left of log messages\n@param width The width (in characters) to print the channels\n@return this",
"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",
"Read in lines and execute them.\n\n@param reader the reader from which to get the groovy source to exec\n@param out the outputstream to use\n@throws java.io.IOException if something goes wrong",
"Remove a collaborator from an app.\n@param appName App name. See {@link #listApps} for a list of apps that can be used.\n@param collaborator See {@link #listCollaborators} for collaborators that can be removed from the app.",
"Get the column name from the indirection table.\n@param mnAlias\n@param path",
"Processes the template for the object cache of the current class definition.\n\n@param template The template\n@param attributes The attributes of the tag\n@exception XDocletException if an error occurs\[email protected] type=\"block\"",
"Return a Halton number, sequence starting at index = 0, base > 1.\n\n@param index The index of the sequence.\n@param base The base of the sequence. Has to be greater than one (this is not checked).\n@return The Halton number.",
"Convert an operation for deployment overlays to be executed on local servers.\nSince this might be called in the case of redeployment of affected deployments, we need to take into account\nthe composite op resulting from such a transformation\n@see AffectedDeploymentOverlay#redeployLinksAndTransformOperationForDomain\n@param operation\n@param host\n@return",
"Creates an element that represents a rectangle drawn at the specified coordinates in the page.\n@param x the X coordinate of the rectangle\n@param y the Y coordinate of the rectangle\n@param width the width of the rectangle\n@param height the height of the rectangle\n@param stroke should there be a stroke around?\n@param fill should the rectangle be filled?\n@return the resulting DOM element"
] |
public int millisecondsToX(long milliseconds) {
if (autoScroll.get()) {
int playHead = (getWidth() / 2) + 2;
long offset = milliseconds - getFurthestPlaybackPosition();
return playHead + (Util.timeToHalfFrame(offset) / scale.get());
}
return Util.timeToHalfFrame(milliseconds) / scale.get();
} | [
"Converts a time in milliseconds to the appropriate x coordinate for drawing something at that time.\n\n@param milliseconds the time at which something should be drawn\n\n@return the component x coordinate at which it should be drawn"
] | [
"Uncompresses the given textual content and writes it to the given file.\n\n@param file The file to write to\n@param compressedContent The content\n@throws IOException If an error occurred",
"Given a resource field name, this method returns the resource field number.\n\n@param field resource field name\n@return resource field number",
"Feeds input stream to data consumer using metadata from tar entry.\n@param consumer the consumer\n@param inputStream the stream to feed\n@param entry the entry to use for metadata\n@throws IOException on consume error",
"Writes a list of UDF types.\n\n@author lsong\n@param type parent entity type\n@param mpxj parent entity\n@return list of UDFAssignmentType instances",
"Wait to shutdown service\n\n@param executorService Executor service to shutdown\n@param timeOutSec Time we wait for",
"Helper method used to peel off spurious wrappings of DateTimeException\n\n@param e DateTimeException to peel\n\n@return DateTimeException that does not have another DateTimeException as its cause.",
"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>",
"Returns the local collection representing the given namespace for raw document operations.\n\n@param namespace the namespace referring to the local collection.\n@return the local collection representing the given namespace for raw document operations.",
"Gets the date time str concise.\n\n@param d\nthe d\n@return the date time str concise"
] |
private void setNsid() throws FlickrException {
if (username != null && !username.equals("")) {
Auth auth = null;
if (authStore != null) {
auth = authStore.retrieve(username); // assuming FileAuthStore is enhanced else need to
// keep in user-level files.
if (auth != null) {
nsid = auth.getUser().getId();
}
}
if (auth != null)
return;
Auth[] allAuths = authStore.retrieveAll();
for (int i = 0; i < allAuths.length; i++) {
if (username.equals(allAuths[i].getUser().getUsername())) {
nsid = allAuths[i].getUser().getId();
return;
}
}
// For this to work: REST.java or PeopleInterface needs to change to pass apiKey
// as the parameter to the call which is not authenticated.
// Get nsid using flickr.people.findByUsername
PeopleInterface peopleInterf = flickr.getPeopleInterface();
User u = peopleInterf.findByUsername(username);
if (u != null) {
nsid = u.getId();
}
}
} | [
"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"
] | [
"Delete a profile\n\n@param model\n@param id\n@return\n@throws Exception",
"Converts the provided javascript object to JSON string.\n\n<p>If the object is a Map instance, it is stringified as key-value pairs, if it is a list, it is stringified as\na list, otherwise the object is merely converted to string using the {@code toString()} method.\n\n@param object the object to stringify.\n\n@return the object as a JSON string",
"Convert this path address to its model node representation.\n\n@return the model node list of properties",
"If needed, destroy the remaining conversation contexts after an HTTP session was invalidated within the current request.\n\n@param request",
"Send an empty request using a standard HTTP connection.",
"The digits were stored as a hex value, thix switches them to an octal value.\n\n@param currentHexValue\n@param digitCount\n@return",
"Enables or disables sound.\nWhen sound is disabled, nothing is played but the\naudio sources remain intact.\n@param flag true to enable sound, false to disable.",
"Get the value for a particular configuration property\n\n@param name - name of the property\n@return The first value encountered or null",
"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."
] |
private String getLogRequestIdentifier() {
if (logIdentifier == null) {
logIdentifier = String.format("%s-%s %s %s", Integer.toHexString(hashCode()),
numberOfRetries, connection.getRequestMethod(), connection.getURL());
}
return logIdentifier;
} | [
"Get a prefix for the log message to help identify which request is which and which responses\nbelong to which requests."
] | [
"Add hours to a parent object.\n\n@param parentNode parent node\n@param hours list of ranges",
"Use this API to unset the properties of ipv6 resource.\nProperties that need to be unset are specified in args array.",
"Returns an iban with replaced check digit.\n\n@param iban The iban\n@return The iban without the check digit",
"Updates the model. Ensures that we reset the columns widths.\n\n@param model table model",
"Convert a method name into a property name.\n\n@param method target method\n@return property name",
"calculate arc angle between point a and point b\n\n@param center\n@param a\n@param b\n@param area\n@param radius\n@return",
"Unlink the specified reference object.\nMore info see OJB doc.\n@param source The source object with the specified reference field.\n@param attributeName The field name of the reference to unlink.\n@param target The referenced object to unlink.",
"Are both Id's the same?\n\n@param otherElement the other element to compare\n@return true if id == otherElement.id",
"Use this API to delete onlinkipv6prefix of given name."
] |
public static String getEffortLevelDescription(Verbosity verbosity, int points)
{
EffortLevel level = EffortLevel.forPoints(points);
switch (verbosity)
{
case ID:
return level.name();
case VERBOSE:
return level.getVerboseDescription();
case SHORT:
default:
return level.getShortDescription();
}
} | [
"Returns the right string representation of the effort level based on given number of points."
] | [
"Specifies the object id associated with a user assigned managed service identity\nresource that should be used to retrieve the access token.\n\n@param objectId Object ID of the identity to use when authenticating to Azure AD.\n@return MSICredentials",
"Determines total number of partition-stores moved across zones.\n\n@return number of cross zone partition-store moves",
"Returns all the deployment runtime names associated with an overlay accross all server groups.\n\n@param context the current OperationContext.\n@param overlay the name of the overlay.\n@return all the deployment runtime names associated with an overlay accross all server groups.",
"Check whether the given class is cache-safe in the given context,\ni.e. whether it is loaded by the given ClassLoader or a parent of it.\n@param clazz the class to analyze\n@param classLoader the ClassLoader to potentially cache metadata in",
"Writes this address as a single hexadecimal value with always the exact same number of characters, with or without a preceding 0x prefix.",
"Processes an index descriptor tag.\n\n@param template The template\n@param attributes The attributes of the tag\n@exception XDocletException If an error occurs\[email protected] type=\"content\"\[email protected] name=\"documentation\" optional=\"true\" description=\"Documentation on the index\"\[email protected] name=\"fields\" optional=\"false\" description=\"The fields making up the index separated by commas\"\[email protected] name=\"name\" optional=\"false\" description=\"The name of the index descriptor\"\[email protected] name=\"unique\" optional=\"true\" description=\"Whether the index descriptor is unique\" values=\"true,false\"",
"Import user from file.",
"Converts from a Fluo RowColumn to a Accumulo Key\n\n@param rc RowColumn\n@return Key",
"Find and return the appropriate getter method for field.\n\n@return Get method or null (or throws IllegalArgumentException) if none found."
] |
protected PrintResult withOpenOutputStream(final PrintAction function) throws Exception {
final File reportFile = getReportFile();
final Processor.ExecutionContext executionContext;
try (FileOutputStream out = new FileOutputStream(reportFile);
BufferedOutputStream bout = new BufferedOutputStream(out)) {
executionContext = function.run(bout);
}
return new PrintResult(reportFile.length(), executionContext);
} | [
"Open an OutputStream and execute the function using the OutputStream.\n\n@param function the function to execute\n@return the URI and the file size"
] | [
"sets the initialization method for this descriptor",
"Creates a new connection from the data source that the connection descriptor\nrepresents. If the connection descriptor does not directly contain the data source\nthen a JNDI lookup is performed to retrieve the data source.\n\n@param jcd The connection descriptor\n@return A connection instance\n@throws LookupException if we can't get a connection from the datasource either due to a\nnaming exception, a failed sanity check, or a SQLException.",
"Get the MVT type mapping for the provided JTS Geometry.\n\n@param geometry JTS Geometry to get MVT type for\n@return MVT type for the given JTS Geometry, may return\n{@link com.wdtinc.mapbox_vector_tile.VectorTile.Tile.GeomType#UNKNOWN}",
"Sets the stream for a resource.\nThis function allows you to provide a stream that is already open to\nan existing resource. It will throw an exception if that resource\nalready has an open stream.\n@param s InputStream currently open stream to use for I/O.",
"Notifies that multiple content items are changed.\n\n@param positionStart the position.\n@param itemCount the item count.",
"Set a proxy for REST-requests.\n\n@param proxyHost\n@param proxyPort",
"Sets the current field definition derived from the current member, and optionally some attributes.\n\n@param template The template\n@param attributes The attributes of the tag\n@exception XDocletException if an error occurs\[email protected] type=\"block\"\[email protected] name=\"access\" optional=\"true\" description=\"The accessibility of the column\" values=\"readonly,readwrite\"\[email protected] name=\"attributes\" optional=\"true\" description=\"Attributes of the field as name-value pairs 'name=value',\nseparated by commas\"\[email protected] name=\"autoincrement\" optional=\"true\" description=\"Whether the field is\nauto-incremented\" values=\"none,ojb,database\"\[email protected] name=\"column\" optional=\"true\" description=\"The column for the field\"\[email protected] name=\"column-documentation\" optional=\"true\" description=\"Documentation on the column\"\[email protected] name=\"conversion\" optional=\"true\" description=\"The fully qualified name of the\nconversion for the field\"\[email protected] name=\"default-fetch\" optional=\"true\" description=\"The default-fetch setting\"\nvalues=\"true,false\"\[email protected] name=\"documentation\" optional=\"true\" description=\"Documentation on the field\"\[email protected] name=\"id\" optional=\"true\" description=\"The position of the field in the class\ndescriptor\"\[email protected] name=\"indexed\" optional=\"true\" description=\"Whether the field is indexed\"\nvalues=\"true,false\"\[email protected] name=\"jdbc-type\" optional=\"true\" description=\"The jdbc type of the column\"\[email protected] name=\"length\" optional=\"true\" description=\"The length of the column\"\[email protected] name=\"locking\" optional=\"true\" description=\"Whether the field supports locking\"\nvalues=\"true,false\"\[email protected] name=\"nullable\" optional=\"true\" description=\"Whether the field is nullable\"\nvalues=\"true,false\"\[email protected] name=\"precision\" optional=\"true\" description=\"The precision of the column\"\[email protected] name=\"primarykey\" optional=\"true\" description=\"Whether the field is a primarykey\"\nvalues=\"true,false\"\[email protected] name=\"scale\" optional=\"true\" description=\"The scale of the column\"\[email protected] name=\"sequence-name\" optional=\"true\" description=\"The name of the sequence for\nincrementing the field\"\[email protected] name=\"table\" optional=\"true\" description=\"The table of the field (not implemented\nyet)\"\[email protected] name=\"update-lock\" optional=\"true\" description=\"Can be set to false if the persistent attribute is\nused for optimistic locking AND the dbms should update the lock column itself (default is true). Can only be set for\nTIMESTAMP and INTEGER columns\" values=\"true,false\"",
"The main conversion method.\n@param image A BufferedImage containing the image that needs to be converted\n@param favicon When ico is true it will convert ico file into 16 x 16 size\n@return A string containing the ASCII version of the original image.",
"Curries a procedure that takes three arguments.\n\n@param procedure\nthe original procedure. May not be <code>null</code>.\n@param argument\nthe fixed first argument of {@code procedure}.\n@return a procedure that takes two arguments. Never <code>null</code>."
] |
private int calcItemWidth(RecyclerView rvCategories) {
if (itemWidth == null || itemWidth == 0) {
for (int i = 0; i < rvCategories.getChildCount(); i++) {
itemWidth = rvCategories.getChildAt(i).getWidth();
if (itemWidth != 0) {
break;
}
}
}
// in case of call before view was created
if (itemWidth == null) {
itemWidth = 0;
}
return itemWidth;
} | [
"very big duct tape"
] | [
"if you want to convert some string to an object, you have an argument to parse",
"Function to perform forward pooling",
"Declares a fresh Builder to copy default property values from.\n\n<p>Reuses an existing fresh Builder instance if one was already declared in this scope.\n\n@returns a variable holding a fresh Builder, if a no-args factory method is available to\ncreate one with",
"Initialize the version properties map from the gradle.properties file, and the additional properties from the\ngradle.properties file.",
"Convert a Java LinkedList to a Scala Iterable.\n@param linkedList Java LinkedList to convert\n@return Scala Iterable",
"Check that the ranges and sizes add up, otherwise we have lost some data somewhere",
"Creates a map between a work pattern ID and a list of time entry rows.\n\n@param rows time entry rows\n@return time entry map",
"Use this API to delete dnsaaaarec resources.",
"Calculate where within the beat grid array the information for the specified beat can be found.\nYes, this is a super simple calculation; the main point of the method is to provide a nice exception\nwhen the beat is out of bounds.\n\n@param beatNumber the beat desired\n\n@return the offset of the start of our cache arrays for information about that beat"
] |
public Script[] getScripts(Integer type) {
ArrayList<Script> returnData = new ArrayList<>();
PreparedStatement statement = null;
ResultSet results = null;
try (Connection sqlConnection = SQLService.getInstance().getConnection()) {
statement = sqlConnection.prepareStatement("SELECT * FROM " + Constants.DB_TABLE_SCRIPT +
" ORDER BY " + Constants.GENERIC_ID);
if (type != null) {
statement = sqlConnection.prepareStatement("SELECT * FROM " + Constants.DB_TABLE_SCRIPT +
" WHERE " + Constants.SCRIPT_TYPE + "= ?" +
" ORDER BY " + Constants.GENERIC_ID);
statement.setInt(1, type);
}
logger.info("Query: {}", statement);
results = statement.executeQuery();
while (results.next()) {
returnData.add(scriptFromSQLResult(results));
}
} catch (Exception e) {
} finally {
try {
if (results != null) {
results.close();
}
} catch (Exception e) {
}
try {
if (statement != null) {
statement.close();
}
} catch (Exception e) {
}
}
return returnData.toArray(new Script[0]);
} | [
"Return all scripts of a given type\n\n@param type integer value of type\n@return Array of scripts of the given type"
] | [
"Release the rebalancing permit for a particular node id\n\n@param nodeId The node id whose permit we want to release",
"Converts days of the week into a bit field.\n\n@param data recurring data\n@return bit field",
"Convenience method to escape any character that is special to the regex system.\n\n@param inString\nthe string to fix\n\n@return the fixed string",
"Gets the first value for the key.\n\n@param key the key to check for the value\n\n@return the value or {@code null} if the key is not found or the value was {@code null}",
"Checks if the specified bytecode version string represents a JDK 1.5+ compatible\nbytecode version.\n@param bytecodeVersion the bytecode version string (1.4, 1.5, 1.6, 1.7 or 1.8)\n@return true if the bytecode version is JDK 1.5+",
"Set child components.\n\n@param children\nchildren",
"Filter events.\n\n@param events the events\n@return the list of filtered events",
"Use this API to create sslfipskey resources.",
"Init the licenses cache\n\n@param licenses"
] |
protected SingleBusLocatorRegistrar getRegistrar(Bus bus) {
SingleBusLocatorRegistrar registrar = busRegistrars.get(bus);
if (registrar == null) {
check(locatorClient, "serviceLocator", "registerService");
registrar = new SingleBusLocatorRegistrar(bus);
registrar.setServiceLocator(locatorClient);
registrar.setEndpointPrefix(endpointPrefix);
Map<String, String> endpointPrefixes = new HashMap<String, String>();
endpointPrefixes.put("HTTP", endpointPrefixHttp);
endpointPrefixes.put("HTTPS", endpointPrefixHttps);
registrar.setEndpointPrefixes(endpointPrefixes);
busRegistrars.put(bus, registrar);
addLifeCycleListener(bus);
}
return registrar;
} | [
"Retrieves the registar linked to the bus.\nCreates a new registar is not present.\n\n@param bus\n@return"
] | [
"Match the Origin header with the allowed origins.\nIf it doesn't match then a 403 response code is set on the response and it returns null.\n@param exchange the current HttpExchange.\n@param allowedOrigins list of sanitized allowed origins.\n@return the first matching origin, null otherwise.\n@throws Exception",
"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)",
"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.",
"The user can be referenced by their globally unique user ID or their email address.\nReturns the full user record for the invited user.\n\n@param workspace The workspace or organization to invite the user to.\n@return Request object",
"Prepare a parallel PING Task.\n\n@return the parallel task builder",
"Convert an array of bytes into an array of ints. 4 bytes from the\ninput data map to a single int in the output data.\n@param bytes The data to read from.\n@return An array of 32-bit integers constructed from the data.\n@since 1.1",
"Use picasso to render the video thumbnail into the thumbnail widget using a temporal\nplaceholder.\n\n@param video to get the rendered thumbnail.",
"Sets the day of the month.\n@param day the day to set.",
"Allocates a new next buffer and pending fetch."
] |
protected T createInstance() {
try {
Constructor<T> ctor = clazz.getDeclaredConstructor();
ctor.setAccessible(true);
return ctor.newInstance();
} catch (InstantiationException e) {
throw new RuntimeException(e);
} catch (IllegalAccessException e) {
throw new RuntimeException(e);
} catch (SecurityException e) {
throw new RuntimeException(e);
} catch (NoSuchMethodException e) {
throw new RuntimeException(e);
} catch (IllegalArgumentException e) {
throw new RuntimeException(e);
} catch (InvocationTargetException e) {
throw new RuntimeException(e);
}
} | [
"Creates instance of the entity class. This method is called to create the object\ninstances when returning query results."
] | [
"This filter adds rounded corners to the image using the specified color as the background.\n\n@param radiusInner amount of pixels to use as radius.\n@param radiusOuter specifies the second value for the ellipse used for the radius. Use 0 for\nno value.\n@param color fill color for clipped region.",
"Reads and consumes a number of characters from the underlying reader,\nfilling the byte array provided.\n\n@param holder A byte array which will be filled with bytes read from the underlying reader.\n@throws ProtocolException If a char can't be read into each array element.",
"Use this API to add authenticationradiusaction resources.",
"Computes the eigenvalue of the provided tridiagonal matrix. Note that only the upper portion\nneeds to be tridiagonal. The bottom diagonal is assumed to be the same as the top.\n\n@param sideLength Number of rows and columns in the input matrix.\n@param diag Diagonal elements from tridiagonal matrix. Modified.\n@param off Off diagonal elements from tridiagonal matrix. Modified.\n@return true if it succeeds and false if it fails.",
"This method processes any extended attributes associated with a resource.\n\n@param xml MSPDI resource instance\n@param mpx MPX resource instance",
"Returns a resource description resolver that uses common descriptions for some attributes.\n\n@param keyPrefix the prefix to be appended to the {@link LoggingExtension#SUBSYSTEM_NAME}\n\n@return the resolver",
"Computes FPS average",
"Sets the left padding for all cells in the table.\n@param paddingLeft new padding, ignored if smaller than 0\n@return this to allow chaining",
"Places a connection back in the originating partition.\n@param connectionHandle to place back\n@throws SQLException on error"
] |
public boolean removeReader(Object key, Object resourceId)
{
boolean result = false;
ObjectLocks objectLocks = null;
synchronized(locktable)
{
objectLocks = (ObjectLocks) locktable.get(resourceId);
if(objectLocks != null)
{
/**
* MBAIRD, last one out, close the door and turn off the lights.
* if no locks (readers or writers) exist for this object, let's remove
* it from the locktable.
*/
Map readers = objectLocks.getReaders();
result = readers.remove(key) != null;
if((objectLocks.getWriter() == null) && (readers.size() == 0))
{
locktable.remove(resourceId);
}
}
}
return result;
} | [
"Remove an read lock."
] | [
"Get the photos for the specified group pool, optionally filtering by taf.\n\nThis method does not require authentication.\n\n@see com.flickr4java.flickr.photos.Extras\n@param groupId\nThe group ID\n@param userId\nThe user ID (may be null)\n@param tags\nThe optional tags (may be null)\n@param extras\nSet of extra-attributes to include (may be null)\n@param perPage\nThe number of photos per page (0 to ignore)\n@param page\nThe page offset (0 to ignore)\n@return A Collection of Photo objects\n@throws FlickrException",
"Translate the given byte array into a string of 1s and 0s\n\n@param bytes The bytes to translate\n@return The string",
"Map Synchro constraints to MPXJ constraints.\n\n@param task task\n@param row Synchro constraint data",
"Returns the bundle descriptor for the bundle with the provided base name.\n@param cms {@link CmsObject} used for searching.\n@param basename the bundle base name, for which the descriptor is searched.\n@return the bundle descriptor, or <code>null</code> if it does not exist or searching fails.",
"Notifies that an existing content item is moved to another position.\n\n@param fromPosition the original position.\n@param toPosition the new position.",
"Process the graphical indicator data.",
"Get image Id from imageTag using DockerBuildInfoHelper client.\n\n@param imageTag\n@param host\n@return",
"Resets the calendar",
"Append the Parameter\nAdd the place holder ? or the SubQuery\n@param value the value of the criteria"
] |
public <T> DiffNode compare(final T working, final T base)
{
dispatcher.resetInstanceMemory();
try
{
return dispatcher.dispatch(DiffNode.ROOT, Instances.of(working, base), RootAccessor.getInstance());
}
finally
{
dispatcher.clearInstanceMemory();
}
} | [
"Recursively inspects the given objects and returns a node representing their differences. Both objects\nhave be have the same type.\n\n@param working This object will be treated as the successor of the `base` object.\n@param base This object will be treated as the predecessor of the <code>working</code> object.\n@return A node representing the differences between the given objects."
] | [
"Extracts the row from a matrix.\n@param a Input matrix\n@param row Which row is to be extracted\n@param out output. Storage for the extracted row. If null then a new vector will be returned.\n@return The extracted row.",
"Static method to convert a binary operator into a string.\n\n@param oper is the binary comparison operator to be converted",
"Create all the links possible between the Declaration and all the ImporterService matching the.\nImporterServiceFilter of the Linker.\n\n@param declarationSRef the ServiceReference<Declaration> of the Declaration",
"Start the first inner table of a class.",
"Use this API to fetch a appflowglobal_binding resource .",
"Returns a list of the rekordbox IDs of the tracks contained in the cache.\n\n@return a list containing the rekordbox ID for each track present in the cache, in the order they appear",
"Use this API to fetch all the dnsaaaarec resources that are configured on netscaler.\nThis uses dnsaaaarec_args which is a way to provide additional arguments while fetching the resources.",
"Adds a file to your assembly but automatically genarates the name of the file.\n\n@param inputStream {@link InputStream} the file to be uploaded.",
"Parses formatter attributes.\n\n@param formatterLoc the node location\n@return the map of formatter attributes (unmodifiable)"
] |
public void processField(String template, Properties attributes) throws XDocletException
{
String name = OjbMemberTagsHandler.getMemberName();
String defaultType = getDefaultJdbcTypeForCurrentMember();
String defaultConversion = getDefaultJdbcConversionForCurrentMember();
FieldDescriptorDef fieldDef = _curClassDef.getField(name);
String attrName;
if (fieldDef == null)
{
fieldDef = new FieldDescriptorDef(name);
_curClassDef.addField(fieldDef);
}
LogHelper.debug(false, OjbTagsHandler.class, "processField", " Processing field "+fieldDef.getName());
for (Enumeration attrNames = attributes.propertyNames(); attrNames.hasMoreElements(); )
{
attrName = (String)attrNames.nextElement();
fieldDef.setProperty(attrName, attributes.getProperty(attrName));
}
// storing additional info for later use
fieldDef.setProperty(PropertyHelper.OJB_PROPERTY_JAVA_TYPE,
OjbMemberTagsHandler.getMemberType().getQualifiedName());
fieldDef.setProperty(PropertyHelper.OJB_PROPERTY_DEFAULT_JDBC_TYPE, defaultType);
if (defaultConversion != null)
{
fieldDef.setProperty(PropertyHelper.OJB_PROPERTY_DEFAULT_CONVERSION, defaultConversion);
}
_curFieldDef = fieldDef;
generate(template);
_curFieldDef = null;
} | [
"Sets the current field definition derived from the current member, and optionally some attributes.\n\n@param template The template\n@param attributes The attributes of the tag\n@exception XDocletException if an error occurs\[email protected] type=\"block\"\[email protected] name=\"access\" optional=\"true\" description=\"The accessibility of the column\" values=\"readonly,readwrite\"\[email protected] name=\"attributes\" optional=\"true\" description=\"Attributes of the field as name-value pairs 'name=value',\nseparated by commas\"\[email protected] name=\"autoincrement\" optional=\"true\" description=\"Whether the field is\nauto-incremented\" values=\"none,ojb,database\"\[email protected] name=\"column\" optional=\"true\" description=\"The column for the field\"\[email protected] name=\"column-documentation\" optional=\"true\" description=\"Documentation on the column\"\[email protected] name=\"conversion\" optional=\"true\" description=\"The fully qualified name of the\nconversion for the field\"\[email protected] name=\"default-fetch\" optional=\"true\" description=\"The default-fetch setting\"\nvalues=\"true,false\"\[email protected] name=\"documentation\" optional=\"true\" description=\"Documentation on the field\"\[email protected] name=\"id\" optional=\"true\" description=\"The position of the field in the class\ndescriptor\"\[email protected] name=\"indexed\" optional=\"true\" description=\"Whether the field is indexed\"\nvalues=\"true,false\"\[email protected] name=\"jdbc-type\" optional=\"true\" description=\"The jdbc type of the column\"\[email protected] name=\"length\" optional=\"true\" description=\"The length of the column\"\[email protected] name=\"locking\" optional=\"true\" description=\"Whether the field supports locking\"\nvalues=\"true,false\"\[email protected] name=\"nullable\" optional=\"true\" description=\"Whether the field is nullable\"\nvalues=\"true,false\"\[email protected] name=\"precision\" optional=\"true\" description=\"The precision of the column\"\[email protected] name=\"primarykey\" optional=\"true\" description=\"Whether the field is a primarykey\"\nvalues=\"true,false\"\[email protected] name=\"scale\" optional=\"true\" description=\"The scale of the column\"\[email protected] name=\"sequence-name\" optional=\"true\" description=\"The name of the sequence for\nincrementing the field\"\[email protected] name=\"table\" optional=\"true\" description=\"The table of the field (not implemented\nyet)\"\[email protected] name=\"update-lock\" optional=\"true\" description=\"Can be set to false if the persistent attribute is\nused for optimistic locking AND the dbms should update the lock column itself (default is true). Can only be set for\nTIMESTAMP and INTEGER columns\" values=\"true,false\""
] | [
"Delete a photo from flickr.\n\nThis method requires authentication with 'delete' permission.\n\n@param photoId\n@throws FlickrException",
"Use this API to fetch ipset_nsip_binding resources of given name .",
"misc utility methods",
"Read the file header data.\n\n@param is input stream",
"Set the inner angle of the spotlight cone in degrees.\n\nBeyond the outer cone angle there is no illumination.\nThe underlying uniform \"outer_cone_angle\" is the cosine\nof this input angle. If the inner cone angle is larger than the outer cone angle\nthere will be unexpected results.\n@see #setInnerConeAngle(float)\n@see #getOuterConeAngle()",
"return the ctc costs and gradients, given the probabilities and labels",
"Returns all visble sets and pools the photo belongs to.\n\nThis method does not require authentication.\n\n@param photoId\nThe photo to return information for.\n@return a list of {@link PhotoContext} objects\n@throws FlickrException",
"Notify all shutdown listeners that the shutdown completed.",
"Gets the name for the getter for this property\n\n@return The name of the property. The name is \"get\"+ the capitalized propertyName\nor, in the case of boolean values, \"is\" + the capitalized propertyName"
] |
private void copyToStrBuffer(byte[] buffer, int offset, int length) {
Preconditions.checkArgument(length >= 0);
if (strBuffer.length - strBufferIndex < length) {
// cannot fit, expanding buffer
expandStrBuffer(length);
}
System.arraycopy(
buffer, offset, strBuffer, strBufferIndex, Math.min(length, MAX_ALLOWABLE_BUFFER_SIZE - strBufferIndex));
strBufferIndex += length;
} | [
"Copies from buffer to our internal strBufferIndex, expanding the internal buffer if necessary\n@param offset offset in the buffer to start copying from\n@param length length to copy"
] | [
"Populates date time settings.\n\n@param record MPX record\n@param properties project properties",
"Get content of a file as a Map<String, String>, using separator to split values\n@param file File to get content\n@param separator The separator\n@return The map with the values\n@throws IOException I/O Error",
"returns position of xpath element which match the expression xpath in the String dom.\n\n@param dom the Document to search in\n@param xpath the xpath query\n@return position of xpath element, if fails returns -1",
"Returns a time interval as Solr compatible query string.\n@param searchField the field to search for.\n@param startTime the lower limit of the interval.\n@param endTime the upper limit of the interval.\n@return Solr compatible query string.",
"Handle bind service event.\n@param service Service instance\n@param props Service reference properties",
"Returns true if the input is a vector\n@param a A matrix or vector\n@return true if it's a vector. Column or row.",
"Returns the Euclidean distance between this vector and vector v.\n\n@return distance between this vector and v",
"Polls from the location header and updates the polling state with the\npolling response for a PUT operation.\n\n@param pollingState the polling state for the current operation.\n@param <T> the return type of the caller.",
"Convenience method to escape any character that is special to the regex system.\n\n@param inString\nthe string to fix\n\n@return the fixed string"
] |
private void verifyOrAddStore(String clusterURL,
String keySchema,
String valueSchema) {
String newStoreDefXml = VoldemortUtils.getStoreDefXml(
storeName,
props.getInt(BUILD_REPLICATION_FACTOR, 2),
props.getInt(BUILD_REQUIRED_READS, 1),
props.getInt(BUILD_REQUIRED_WRITES, 1),
props.getNullableInt(BUILD_PREFERRED_READS),
props.getNullableInt(BUILD_PREFERRED_WRITES),
props.getString(PUSH_FORCE_SCHEMA_KEY, keySchema),
props.getString(PUSH_FORCE_SCHEMA_VALUE, valueSchema),
description,
owners);
log.info("Verifying store against cluster URL: " + clusterURL + "\n" + newStoreDefXml.toString());
StoreDefinition newStoreDef = VoldemortUtils.getStoreDef(newStoreDefXml);
try {
adminClientPerCluster.get(clusterURL).storeMgmtOps.verifyOrAddStore(newStoreDef, "BnP config/data",
enableStoreCreation, this.storeVerificationExecutorService);
} catch (UnreachableStoreException e) {
log.info("verifyOrAddStore() failed on some nodes for clusterURL: " + clusterURL + " (this is harmless).", e);
// When we can't reach some node, we just skip it and won't create the store on it.
// Next time BnP is run while the node is up, it will get the store created.
} // Other exceptions need to bubble up!
storeDef = newStoreDef;
} | [
"For each node, checks if the store exists and then verifies that the remote schema\nmatches the new one. If the remote store doesn't exist, it creates it."
] | [
"Emit an event object with parameters.\n\nThis will invoke all {@link SimpleEventListener} bound to the event object\nclass given the listeners has the matching argument list.\n\nIf there is no parameter passed in, i.e. `args.length == 0`, then it will\nalso invoke all the {@link ActEventListener} bound to the event class.\n\nFor example, suppose we have the following Event defined:\n\n```java\npublic class UserActivityEvent extends ActEvent<User> {\npublic UserActivityEvent(User user) {super(user);}\n}\n```\n\nAnd we have the following event handler defined:\n\n```java\n{@literal @}OnEvent\npublic void logUserLogin(UserActivityEvent event, long timestamp) {...}\n\n{@literal @}OnEvent\npublic void checkDuplicateLoginAttempts(UserActivityEvent, Object... args) {...}\n\n{@literal @}OnEvent\npublic void foo(UserActivityEvent event) {...}\n```\n\nThe following code will invoke `logUserLogin` and `checkDuplicateLoginAttempts` methods:\n\n```java\nUser user = ...;\neventBus.emit(new UserActivityEvent(user), System.currentTimeMills());\n```\n\nThe `foo(UserActivityEvent)` will not invoked because:\n\n* The parameter list `(UserActivityEvent, long)` does not match the declared\nargument list `(UserActivityEvent)`. Here the `String` in the parameter\nlist is taken out because it is used to indicate the event, instead of being\npassing through to the event handler method.\n* The method `checkDuplicateLoginAttempts(UserActivityEvent, Object ...)` will\nbe invoked because it declares a varargs typed arguments, meaning it matches\nany parameters passed in.\n\n@param event\nthe target event\n@param args\nthe arguments passed in\n@see SimpleEventListener",
"Use this API to update clusterinstance resources.",
"Creates a method signature.\n\n@param method Method instance\n@return method signature",
"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",
"Stops all servers.\n\n{@inheritDoc}",
"Try to get a system property for obsolete keys. The value is automatically converted - a runtime exception may be thrown during conversion.\n\n@return all the properties whose system property keys were different in previous versions",
"Get a default style. If null a simple black line style will be returned.\n\n@param geometryType the name of the geometry type (point, line, polygon)",
"get the getter method corresponding to given property",
"Start the StatsD reporter, if configured.\n\n@throws URISyntaxException"
] |
public JsonObject getJsonObject() {
JsonObject obj = new JsonObject();
obj.add("field", this.field);
obj.add("value", this.value);
return obj;
} | [
"Get the JSON representation of the metadata field filter.\n@return the JSON object representing the filter."
] | [
"Registers a new user with the given email and password.\n\n@param email the email to register with. This will be the username used during log in.\n@param password the password to associated with the email. The password must be between\n6 and 128 characters long.\n@return A {@link Task} that completes when registration completes/fails.",
"Checks to see if all the diagonal elements in the matrix are positive.\n\n@param a A matrix. Not modified.\n@return true if all the diagonal elements are positive, false otherwise.",
"Shows error dialog, manually supplying details instead of getting them from an exception stack trace.\n\n@param message the error message\n@param details the details",
"Create an element that represents a horizntal or vertical line.\n@param x1\n@param y1\n@param x2\n@param y2\n@return the created DOM element",
"Gets the date time str standard.\n\n@param d\nthe d\n@return the date time str standard",
"Returns whether or not the host editor service is available\n\n@return\n@throws Exception",
"Return the entity of a resource\n\n@param resource the resource\n@param <T> the type of the resource's entity\n@param <R> the resource type\n@return the resource's entity",
"Fetches the current online data for the given item, and fixes the\nprecision of integer quantities if necessary.\n\n@param itemIdValue\nthe id of the document to inspect\n@param propertyId\nid of the property to consider",
"Computes an MD4 hash for the password.\n\n@param password the password for which to compute the hash\n@throws NoSuchAlgorithmException\n@throws InvalidKeyException\n\n@return the password hash"
] |
private void recurseAndAddFiles(GraphRewrite event, FileService fileService, WindupJavaConfigurationService javaConfigurationService, FileModel file)
{
if (javaConfigurationService.checkIfIgnored(event, file))
return;
String filePath = file.getFilePath();
File fileReference = new File(filePath);
Long directorySize = new Long(0);
if (fileReference.isDirectory())
{
File[] subFiles = fileReference.listFiles();
if (subFiles != null)
{
for (File reference : subFiles)
{
FileModel subFile = fileService.createByFilePath(file, reference.getAbsolutePath());
recurseAndAddFiles(event, fileService, javaConfigurationService, subFile);
if (subFile.isDirectory())
{
directorySize = directorySize + subFile.getDirectorySize();
}
else
{
directorySize = directorySize + subFile.getSize();
}
}
}
file.setDirectorySize(directorySize);
}
} | [
"Recurses the given folder and creates the FileModels vertices for the child files to the graph."
] | [
"Creates the HikariCP configuration based on the configuration of a pool defined in opencms.properties.\n\n@param config the configuration object with the properties\n@param key the pool name (without the opencms prefix)\n\n@return the HikariCP configuration for the pool",
"Get the root path where the build is located, the project may be checked out to\na sub-directory from the root workspace location.\n\n@param globalEnv EnvVars to take the workspace from, if workspace is not found\nthen it is take from project.getSomeWorkspace()\n@return The location of the root of the Gradle build.\n@throws IOException\n@throws InterruptedException",
"Return a String of length a minimum of totalChars characters by\npadding the input String str at the right end with spaces.\nIf str is already longer\nthan totalChars, it is returned unchanged.",
"Start listening for device announcements and keeping track of the DJ Link devices visible on the network.\nIf already listening, has no effect.\n\n@throws SocketException if the socket to listen on port 50000 cannot be created",
"Sort by time bucket, then backup count, and by compression state.",
"Process a relationship between two tasks.\n\n@param row relationship data",
"Get a System property by its name.\n\n@param name the name of the wanted System property.\n@return the System property value - null if it is not defined.",
"Converts the given CharSequence into a List of Strings of one character.\n\n@param self a CharSequence\n@return a List of characters (a 1-character String)\n@see #toSet(String)\n@since 1.8.2",
"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"
] |
void releaseTransaction(@NotNull final Thread thread, final int permits) {
try (CriticalSection ignored = criticalSection.enter()) {
int currentThreadPermits = getThreadPermits(thread);
if (permits > currentThreadPermits) {
throw new ExodusException("Can't release more permits than it was acquired");
}
acquiredPermits -= permits;
currentThreadPermits -= permits;
if (currentThreadPermits == 0) {
threadPermits.remove(thread);
} else {
threadPermits.put(thread, currentThreadPermits);
}
notifyNextWaiters();
}
} | [
"Release transaction that was acquired in a thread with specified permits."
] | [
"If the String argument locatorSelectionStrategy is as key in the map representing the locatorSelectionStrategies, the\ncorresponding strategy is selected, else it remains unchanged.\n@param locatorSelectionStrategy",
"Search down all extent classes and return max of all found\nPK values.",
"Does a query for the object's Id and copies in each of the field values from the database to refresh the data\nparameter.",
"Closes all the producers in the pool",
"Constructs a relative path between this path and a given path.\n\n<p> Relativization is the inverse of {@link #getAbsolutePath(Path) resolution}.\nThis method attempts to construct a {@link #isAbsolute relative} path\nthat when {@link #getAbsolutePath(Path) resolved} against this path, yields a\npath that locates the same file as the given path. For example, on UNIX,\nif this path is {@code \"/a/b\"} and the given path is {@code \"/a/b/c/d\"}\nthen the resulting relative path would be {@code \"c/d\"}.\nBoth paths must be absolute and and either this path or the given path must be a\n{@link #startsWith(Path) prefix} of the other.\n\n@param other\nthe path to relativize against this path\n\n@return the resulting relative path or null if neither of the given paths is a prefix of the other\n\n@throws IllegalArgumentException\nif this path and {@code other} are not both absolute or relative",
"create a new instance of the class represented by the no-argument constructor provided\n@param constructor the zero argument constructor for the class\n@return a new instance of the class\n@throws InstantiationException\n@throws ClassNotPersistenceCapableException if the constructor is null or there is an\nexception while trying to create a new instance",
"Retrieve the value of a UDF.\n\n@param udf UDF value holder\n@return UDF value",
"Use this API to fetch appflowpolicy_appflowpolicylabel_binding resources of given name .",
"Remove a collaborator from an app.\n@param appName App name. See {@link #listApps} for a list of apps that can be used.\n@param collaborator See {@link #listCollaborators} for collaborators that can be removed from the app."
] |
public ThumborUrlBuilder resize(int width, int height) {
if (width < 0 && width != ORIGINAL_SIZE) {
throw new IllegalArgumentException("Width must be a positive number.");
}
if (height < 0 && height != ORIGINAL_SIZE) {
throw new IllegalArgumentException("Height must be a positive number.");
}
if (width == 0 && height == 0) {
throw new IllegalArgumentException("Both width and height must not be zero.");
}
hasResize = true;
resizeWidth = width;
resizeHeight = height;
return this;
} | [
"Resize picture to desired size.\n\n@param width Desired width.\n@param height Desired height.\n@throws IllegalArgumentException if {@code width} or {@code height} is less than 0 or both are\n0."
] | [
"Analyze all source code using the specified RuleSet and return the report results.\n\n@param ruleSet - the RuleSet to apply to each source component; must not be null.\n@return the results from applying the RuleSet to all of the source",
"Use this API to fetch Interface resource of given name .",
"Paint a check pattern, used for a background to indicate image transparency.\n@param c the component to draw into\n@param g the Graphics objects\n@param x the x position\n@param y the y position\n@param width the width\n@param height the height",
"This method writes assignment data to a Planner file.",
"Find a toBuilder method, if the user has provided one.",
"Creates a new random symmetric matrix that will have the specified real eigenvalues.\n\n@param num Dimension of the resulting matrix.\n@param rand Random number generator.\n@param eigenvalues Set of real eigenvalues that the matrix will have.\n@return A random matrix with the specified eigenvalues.",
"Returns a prefix length for which the range of this segment grouping matches the the block of addresses for that prefix.\n\nIf no such prefix exists, returns null\n\nIf this segment grouping represents a single value, returns the bit length\n\n@return the prefix length or null",
"Stops the scavenger.",
"Reads an argument of type \"astring\" from the request."
] |
public void readFrom(IIMReader reader, int recover) throws IOException, InvalidDataSetException {
final boolean doLog = log != null;
for (;;) {
try {
DataSet ds = reader.read();
if (ds == null) {
break;
}
if (doLog) {
log.debug("Read data set " + ds);
}
DataSetInfo info = ds.getInfo();
Serializer s = info.getSerializer();
if (s != null) {
if (info.getDataSetNumber() == IIM.DS(1, 90)) {
setCharacterSet((String) s.deserialize(ds.getData(), activeSerializationContext));
}
}
dataSets.add(ds);
if (stopAfter9_10 && info.getDataSetNumber() == IIM.DS(9, 10))
break;
} catch (IIMFormatException e) {
if (recoverFromIIMFormat && recover-- > 0) {
boolean r = reader.recover();
if (doLog) {
log.debug(r ? "Recoved from " + e : "Failed to recover from " + e);
}
if (!r)
break;
} else {
throw e;
}
} catch (UnsupportedDataSetException e) {
if (recoverFromUnsupportedDataSet && recover-- > 0) {
boolean r = reader.recover();
if (doLog) {
log.debug(r ? "Recoved from " + e : "Failed to recover from " + e);
}
if (!r)
break;
} else {
throw e;
}
} catch (InvalidDataSetException e) {
if (recoverFromInvalidDataSet && recover-- > 0) {
boolean r = reader.recover();
if (doLog) {
log.debug(r ? "Recoved from " + e : "Failed to recover from " + e);
}
if (!r)
break;
} else {
throw e;
}
} catch (IOException e) {
if (recover-- > 0 && !dataSets.isEmpty()) {
if (doLog) {
log.error("IOException while reading, however some data sets where recovered, " + e);
}
return;
} else {
throw e;
}
}
}
} | [
"Reads data sets from a passed reader.\n\n@param reader\ndata sets source\n@param recover\nmax number of errors reading process will try to recover from.\nSet to 0 to fail immediately\n@throws IOException\nif reader can't read underlying stream\n@throws InvalidDataSetException\nif invalid/undefined data set is encountered"
] | [
"Updates the styling and content of the internal text area based on the real value, the ghost value, and whether\nit has focus.",
"Gets the value for the key.\n\n@param key the key to check for the value\n\n@return the value or an empty collection if no values were set",
"Generate node data map.\n\n@param task\nthe job info",
"Use this API to fetch all the transformpolicy resources that are configured on netscaler.",
"Handles retrieval of primitive char type.\n\n@param field required field\n@param defaultValue default value if field is missing\n@return char value",
"Send a database announcement to all registered listeners.\n\n@param slot the media slot whose database availability has changed\n@param database the database whose relevance has changed\n@param available if {@code} true, the database is newly available, otherwise it is no longer relevant",
"When creating image columns\n@return",
"Validate the header signature.\n\n@param input The input to read the signature from\n@throws IOException If any read problems occur",
"Hides the Loader component"
] |
private ProjectFile handleOleCompoundDocument(InputStream stream) throws Exception
{
POIFSFileSystem fs = new POIFSFileSystem(POIFSFileSystem.createNonClosingInputStream(stream));
String fileFormat = MPPReader.getFileFormat(fs);
if (fileFormat != null && fileFormat.startsWith("MSProject"))
{
MPPReader reader = new MPPReader();
addListeners(reader);
return reader.read(fs);
}
return null;
} | [
"We have an OLE compound document... but is it an MPP file?\n\n@param stream file input stream\n@return ProjectFile instance"
] | [
"Read an optional JSON array.\n@param json the JSON Object that has the array as element\n@param key the key for the array in the provided JSON object\n@return the array or null if reading the array fails.",
"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",
"Alternate version of autoGeneratedKeys.\n@param sql\n@param autoGeneratedKeys\n@return cache key to use.",
"Parses the comma delimited address into model nodes.\n\n@param profileName the profile name for the domain or {@code null} if not a domain\n@param inputAddress the address.\n\n@return a collection of the address nodes.",
"Add a plugin path\n\n@param model\n@param add\n@return\n@throws Exception",
"Ask the specified player for the specified waveform detail from the specified media slot, first checking if we\nhave a cached copy.\n\n@param dataReference uniquely identifies the desired waveform detail\n\n@return the waveform detail, if it was found, or {@code null}\n\n@throws IllegalStateException if the WaveformFinder is not running",
"Closes any registered stream entries that have not yet been consumed",
"If needed, destroy the remaining conversation contexts after an HTTP session was invalidated within the current request.\n\n@param request",
"Creates an SslHandler\n\n@param bufferAllocator the buffer allocator\n@return instance of {@code SslHandler}"
] |
public static int lookupShaper(String name) {
if (name == null) {
return NOWORDSHAPE;
} else if (name.equalsIgnoreCase("dan1")) {
return WORDSHAPEDAN1;
} else if (name.equalsIgnoreCase("chris1")) {
return WORDSHAPECHRIS1;
} else if (name.equalsIgnoreCase("dan2")) {
return WORDSHAPEDAN2;
} else if (name.equalsIgnoreCase("dan2useLC")) {
return WORDSHAPEDAN2USELC;
} else if (name.equalsIgnoreCase("dan2bio")) {
return WORDSHAPEDAN2BIO;
} else if (name.equalsIgnoreCase("dan2bioUseLC")) {
return WORDSHAPEDAN2BIOUSELC;
} else if (name.equalsIgnoreCase("jenny1")) {
return WORDSHAPEJENNY1;
} else if (name.equalsIgnoreCase("jenny1useLC")) {
return WORDSHAPEJENNY1USELC;
} else if (name.equalsIgnoreCase("chris2")) {
return WORDSHAPECHRIS2;
} else if (name.equalsIgnoreCase("chris2useLC")) {
return WORDSHAPECHRIS2USELC;
} else if (name.equalsIgnoreCase("chris3")) {
return WORDSHAPECHRIS3;
} else if (name.equalsIgnoreCase("chris3useLC")) {
return WORDSHAPECHRIS3USELC;
} else if (name.equalsIgnoreCase("chris4")) {
return WORDSHAPECHRIS4;
} else if (name.equalsIgnoreCase("digits")) {
return WORDSHAPEDIGITS;
} else {
return NOWORDSHAPE;
}
} | [
"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"
] | [
"Parses server section of Zookeeper connection string",
"Process the graphical indicator data.",
"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.",
"Construct a new instance.\n\n@return the new instance",
"Start ssh session and obtain session.\n\n@return the session",
"Gets the uuid from response.\n\n@param myResponse\nthe my response\n@return the uuid from response",
"Returns a time interval as Solr compatible query string.\n@param searchField the field to search for.\n@param startTime the lower limit of the interval.\n@param endTime the upper limit of the interval.\n@return Solr compatible query string.",
"Obtain collection of Parameters from request\n\n@param dataArray request parameters\n@return Map of parameters\n@throws Exception exception",
"Find a node in the tree. The node must be \"visible\" to be found.\n@param address The full address of the node matching ManagementModelNode.addressPath()\n@return The node, or null if not found."
] |
public List<Tag> getPrimeTags()
{
return this.definedTags.values().stream()
.filter(Tag::isPrime)
.collect(Collectors.toList());
} | [
"Gets all tags that are \"prime\" tags."
] | [
"Calculate power of a complex number.\n\n@param z1 Complex Number.\n@param n Power.\n@return Returns a new complex number containing the power of a specified number.",
"Generate the body of a toString method that uses plain concatenation.\n\n<p>Conventionally, we join properties with comma separators. If all of the properties are\nalways present, this can be done with a long block of unconditional code. We could use a\nStringBuilder for this, but in fact the Java compiler will do this for us under the hood\nif we use simple string concatenation, so we use the more readable approach.",
"Acquire the exclusive lock, with a max wait timeout to acquire.\n@param permit - the permit Integer for this operation. May not be {@code null}.\n@param timeout - the timeout scalar quantity.\n@param unit - see {@code TimeUnit} for quantities.\n@return {@code boolean} true on successful acquire.\n@throws InterruptedException - if the acquiring thread was interrupted.\n@throws IllegalArgumentException if {@code permit} is null.",
"Removes the supplied marker from the map.\n\n@param marker",
"Handles an initial response from a PUT or PATCH operation response by polling the status of the operation\nasynchronously, once the operation finishes emits the final response.\n\n@param observable the initial observable from the PUT or PATCH operation.\n@param resourceType the java.lang.reflect.Type of the resource.\n@param <T> the return type of the caller.\n@return the observable of which a subscription will lead to a final response.",
"This function is intended to detect the subset of IOException which are not\nconsidered recoverable, in which case we want to bubble up the exception, instead\nof retrying.\n\n@throws VoldemortException",
"Use this API to unset the properties of coparameter resource.\nProperties that need to be unset are specified in args array.",
"Check if the right-hand side type may be assigned to the left-hand side\ntype following the Java generics rules.\n@param lhsType the target type\n@param rhsType the value type that should be assigned to the target type\n@return true if rhs is assignable to lhs",
"Sets the quaternion of the keyframe."
] |
public void setAttributes(final Map<String, Attribute> attributes) {
this.internalAttributes = attributes;
this.allAttributes.putAll(attributes);
} | [
"All the attributes needed either by the processors for each datasource row or by the jasper template.\n\n@param attributes the attributes."
] | [
"Invoke to tell listeners that an step started event processed",
"Convert a Java String instance into the equivalent array of single or\ndouble bytes.\n\n@param value Java String instance representing text\n@param unicode true if double byte characters are required\n@return byte array representing the supplied text",
"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.",
"Execute a CLI command. This can be any command that you might execute on\nthe CLI command line, including both server-side operations and local\ncommands such as 'cd' or 'cn'.\n\n@param cliCommand A CLI command.\n@return A result object that provides all information about the execution\nof the command.",
"Create an import declaration and delegates its registration for an upper class.",
"Sets the bounds of a UIObject, moving and sizing to match the\nbounds specified. Currently used for the itemhover and useful\nfor other absolutely positioned elements.",
"Creates a new Box Developer Edition connection with App User token levaraging BoxConfig.\n@param userId the user ID to use for an App User.\n@param boxConfig box configuration settings object\n@return a new instance of BoxAPIConnection.",
"Creates an empty block style definition.\n@return",
"Extract and return the table name for a class."
] |
private ReferenceDescriptorDef usedByReference(ModelDef modelDef, FieldDescriptorDef fieldDef)
{
String ownerClassName = ((ClassDescriptorDef)fieldDef.getOwner()).getQualifiedName();
ClassDescriptorDef classDef;
ReferenceDescriptorDef refDef;
String targetClassName;
// only relevant for primarykey fields
if (PropertyHelper.toBoolean(fieldDef.getProperty(PropertyHelper.OJB_PROPERTY_PRIMARYKEY), false))
{
for (Iterator classIt = modelDef.getClasses(); classIt.hasNext();)
{
classDef = (ClassDescriptorDef)classIt.next();
for (Iterator refIt = classDef.getReferences(); refIt.hasNext();)
{
refDef = (ReferenceDescriptorDef)refIt.next();
targetClassName = refDef.getProperty(PropertyHelper.OJB_PROPERTY_CLASS_REF).replace('$', '.');
if (ownerClassName.equals(targetClassName))
{
// the field is a primary key of the class referenced by this reference descriptor
return refDef;
}
}
}
}
return null;
} | [
"Checks whether the given field definition is used as the primary key of a class referenced by\na reference.\n\n@param modelDef The model\n@param fieldDef The current field descriptor def\n@return The reference that uses the field or <code>null</code> if the field is not used in this way"
] | [
"Selects the single element of the collection for which the provided OQL query\npredicate is true.\n@param\tpredicate\tAn OQL boolean query predicate.\n@return The element that evaluates to true for the predicate. If no element\nevaluates to true, null is returned.\n@exception\torg.odmg.QueryInvalidException\tThe query predicate is invalid.",
"Adds the dependencies typical for particular deployment types.\nThis is not accurate and doesn't cover the real needs of the project.\nBasically it's just to have \"something\" for the initial implementation.",
"Method to be implemented by the RendererBuilder subtypes. In this method the library user will\ndefine the mapping between content and renderer class.\n\n@param content used to map object to Renderers.\n@return the class associated to the renderer.",
"Flat the map of list of string to map of strings, with theoriginal values, seperated by comma",
"Returns the orthogonal V matrix.\n\n@param V If not null then the results will be stored here. Otherwise a new matrix will be created.\n@return The extracted Q matrix.",
"Creates a new SimpleMatrix with the specified DMatrixRMaj used as its internal matrix. This means\nthat the reference is saved and calls made to the returned SimpleMatrix will modify the passed in DMatrixRMaj.\n\n@param internalMat The internal DMatrixRMaj of the returned SimpleMatrix. Will be modified.",
"Initializes a type\n\n@param name The name of the class\n@return The instance of the class. Returns a dummy if the class was not\nfound.",
"Build a request URL using a given scheme.\n\n@param scheme the scheme, either {@code http} or {@code https}\n@param host\nThe host\n@param port\nThe port\n@param path\nThe path\n@param parameters\nThe parameters\n@return The URL\n@throws MalformedURLException",
"Add a '>=' clause so the column must be greater-than or equals-to the value."
] |
protected NodeData createRectangleStyle(float x, float y, float width, float height, boolean stroke, boolean fill)
{
float lineWidth = transformLength((float) getGraphicsState().getLineWidth());
float lw = (lineWidth < 1f) ? 1f : lineWidth;
float wcor = stroke ? lw : 0.0f;
NodeData ret = CSSFactory.createNodeData();
TermFactory tf = CSSFactory.getTermFactory();
ret.push(createDeclaration("position", tf.createIdent("absolute")));
ret.push(createDeclaration("left", tf.createLength(x, unit)));
ret.push(createDeclaration("top", tf.createLength(y, unit)));
ret.push(createDeclaration("width", tf.createLength(width - wcor, unit)));
ret.push(createDeclaration("height", tf.createLength(height - wcor, unit)));
if (stroke)
{
ret.push(createDeclaration("border-width", tf.createLength(lw, unit)));
ret.push(createDeclaration("border-style", tf.createIdent("solid")));
String color = colorString(getGraphicsState().getStrokingColor());
ret.push(createDeclaration("border-color", tf.createColor(color)));
}
if (fill)
{
String color = colorString(getGraphicsState().getNonStrokingColor());
if (color != null)
ret.push(createDeclaration("background-color", tf.createColor(color)));
}
return ret;
} | [
"Creates the style definition used for a rectangle element based on the given properties of the rectangle\n@param x The X coordinate of the rectangle.\n@param y The Y coordinate of the rectangle.\n@param width The width of the rectangle.\n@param height The height of the rectangle.\n@param stroke Should there be a stroke around?\n@param fill Should the rectangle be filled?\n@return The resulting element style definition."
] | [
"This method returns the value of the product under the specified model and other information in a key-value map.\n\n@param evaluationTime The time on which this products value should be observed.\n@param model A model used to evaluate the product.\n@return The values of the product.\n@throws net.finmath.exception.CalculationException Thrown if the valuation fails, specific cause may be available via the <code>cause()</code> method.",
"Determines whether or not two axially aligned bounding boxes in\nthe same coordinate space intersect.\n@param bv1 first bounding volume to test.\n@param bv2 second bounding volume to test.\n@return true if the boxes intersect, false if not.",
"Use this API to fetch all the nstimeout resources that are configured on netscaler.",
"Blocking function which completes the migration of one store\n\n@param storeName The name of the store\n@param adminClient Admin client used to initiate the copying of data\n@param stealInfo The steal information\n@param isReadOnlyStore Boolean indicating that this is a read-only store",
"Edit the co-ordinates that the user shows in\n\n@param photoId\n@param userId\n@param bounds\n@throws FlickrException",
"Will auto format the given string to provide support for pickadate.js formats.",
"Returns true if required properties for FluoAdmin are set",
"Converts a gwt Date in the timezone of the current browser to a time in\nUTC.\n\n@return A Long corresponding to the number of milliseconds since January\n1, 1970, 00:00:00 GMT or null if the specified Date is null.",
"Returns the ReportModel with given name."
] |
public static Timespan create(Timespan... timespans) {
if (timespans == null) {
return null;
}
if (timespans.length == 0) {
return ZERO_MILLISECONDS;
}
Timespan res = timespans[0];
for (int i = 1; i < timespans.length; i++) {
Timespan timespan = timespans[i];
res = res.add(timespan);
}
return res;
} | [
"Creates a timespan from a list of other timespans.\n\n@return a timespan representing the sum of all the timespans provided"
] | [
"Convenience method for retrieving an Integer resource.\n\n@param locale locale identifier\n@param key resource key\n@return resource value",
"Returns a list of the compact representation of all of the custom fields in a workspace.\n\n@param workspace The workspace or organization to find custom field definitions in.\n@return Request object",
"Compares two annotated types and returns true if they are the same",
"Read JaCoCo report determining the format to be used.\n@param executionDataVisitor visitor to store execution data.\n@param sessionInfoStore visitor to store info session.\n@return true if binary format is the latest one.\n@throws IOException in case of error or binary format not supported.",
"Get the FieldDescriptors of the extent based on the FieldDescriptors of the parent.",
"Does the slice contain only 7-bit ASCII characters.",
"Read the version number.\n\n@param is input stream",
"Gets a list of any tasks on this file with requested fields.\n\n@param fields optional fields to retrieve for this task.\n@return a list of tasks on this file.",
"Invalidate layout setup."
] |
private void appendDefaultValue(StringBuilder sb, FieldType fieldType, Object defaultValue) {
if (fieldType.isEscapedDefaultValue()) {
appendEscapedWord(sb, defaultValue.toString());
} else {
sb.append(defaultValue);
}
} | [
"Output the SQL type for the default value for the type."
] | [
"Use this API to add nsip6.",
"Use this API to fetch all the vpnsessionaction resources that are configured on netscaler.",
"Retrieves the avatar of a user as an InputStream.\n\n@return InputStream representing the user avater.",
"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",
"We have received an update that invalidates the waveform preview for a player, so clear it and alert\nany listeners if this represents a change. This does not affect the hot cues; they will stick around until the\nplayer loads a new track that overwrites one or more of them.\n\n@param update the update which means we have no waveform preview for the associated player",
"Run through the map and remove any references that have been null'd out by the GC.",
"Check that the ranges and sizes add up, otherwise we have lost some data somewhere",
"Use this API to add sslcipher resources.",
"Assign target number of partitions per node to specific node IDs. Then,\nseparates Nodes into donorNodes and stealerNodes based on whether the\nnode needs to donate or steal primary partitions.\n\n@param nextCandidateCluster\n@param numPartitionsPerNodePerZone\n@return a Pair. First element is donorNodes, second element is\nstealerNodes. Each element in the pair is a HashMap of Node to\nInteger where the integer value is the number of partitions to\nstore."
] |
protected synchronized PersistenceBroker getBroker() throws PBFactoryException
{
/*
mkalen:
NB! The loadProfileIfNeeded must be called _before_ acquiring a broker below,
since some methods in PersistenceBrokerImpl will keep a local reference to
the descriptor repository that was active during broker construction/refresh
(not checking the repository beeing used on method invocation).
PersistenceBrokerImpl#getClassDescriptor(Class clazz) is such a method,
that will throw ClassNotPersistenceCapableException on the following scenario:
(All happens in one thread only):
t0: activate per-thread metadata changes
t1: load, register and activate profile A
t2: load object O1 witch collection proxy C to objects {O2} (C stores profile key K(A))
t3: close broker from t2
t4: load, register and activate profile B
t5: reference O1.getO2Collection, causing C loadData() to be invoked
t6: C calls getBroker
broker B is created and descriptorRepository is set to descriptors from profile B
t7: C calls loadProfileIfNeeded, re-activating profile A
t8: C calls B.getCollectionByQuery
t9: B gets callback (via QueryReferenceBroker) to getClassDescriptor
the local descriptorRepository from t6 is used!
=> We will now try to query for {O2} with profile B
(even though we re-activated profile A in t7)
=> ClassNotPersistenceCapableException
Keeping loadProfileIfNeeded() at the start of this method changes everything from t6:
t6: C calls loadProfileIfNeeded, re-activating profile A
t7: C calls getBroker,
broker B is created and descriptorRepository is set to descriptors from profile A
t8: C calls B.getCollectionByQuery
t9: B gets callback to getClassDescriptor,
the local descriptorRepository from t6 is used
=> We query for {O2} with profile A
=> All good :-)
*/
if (_perThreadDescriptorsEnabled)
{
loadProfileIfNeeded();
}
PersistenceBroker broker;
if (getBrokerKey() == null)
{
/*
arminw:
if no PBKey is set we throw an exception, because we don't
know which PB (connection) should be used.
*/
throw new OJBRuntimeException("Can't find associated PBKey. Need PBKey to obtain a valid" +
"PersistenceBroker instance from intern resources.");
}
// first try to use the current threaded broker to avoid blocking
broker = PersistenceBrokerThreadMapping.currentPersistenceBroker(getBrokerKey());
// current broker not found or was closed, create a intern new one
if (broker == null || broker.isClosed())
{
broker = PersistenceBrokerFactory.createPersistenceBroker(getBrokerKey());
// signal that we use a new internal obtained PB instance to read the
// data and that this instance have to be closed after use
_needsClose = true;
}
return broker;
} | [
"Acquires a broker instance. If no PBKey is available a runtime exception will be thrown.\n\n@return A broker instance"
] | [
"Remove any mapping for this key, and return any previously\nmapped value.\n\n@param key the key whose mapping is to be removed\n@return the value removed, or null",
"Performs a Bulk Documents insert request.\n\n@param objects The {@link List} of objects.\n@param allOrNothing Indicates whether the request has <tt>all-or-nothing</tt> semantics.\n@return {@code List<Response>} Containing the resulted entries.",
"backing bootstrap method with all parameters",
"Set the association in the entry state.\n\n@param collectionRole the role of the association\n@param association the association",
"Send message to all connections connected to the same URL of this context\n\n@param message the message to be sent\n@param excludeSelf whether the connection of this context should be sent to\n@return this context",
"Creates the container for a bundle descriptor.\n@return the container for a bundle descriptor.",
"Use this API to fetch sslfipskey resources of given names .",
"Remove a previously registered requirement for a capability.\n\n@param requirementRegistration the requirement. Cannot be {@code null}\n@see #registerAdditionalCapabilityRequirement(org.jboss.as.controller.capability.registry.RuntimeRequirementRegistration)",
"Return a public static method of a class.\n@param methodName the static method name\n@param clazz the class which defines the method\n@param args the parameter types to the method\n@return the static method, or {@code null} if no static method was found\n@throws IllegalArgumentException if the method name is blank or the clazz is null"
] |
void bootTimeScan(final DeploymentOperations deploymentOperations) {
// WFCORE-1579: skip the scan if deployment dir is not available
if (!checkDeploymentDir(this.deploymentDir)) {
DeploymentScannerLogger.ROOT_LOGGER.bootTimeScanFailed(deploymentDir.getAbsolutePath());
return;
}
this.establishDeployedContentList(this.deploymentDir, deploymentOperations);
deployedContentEstablished = true;
if (acquireScanLock()) {
try {
scan(true, deploymentOperations);
} finally {
releaseScanLock();
}
}
} | [
"Perform a one-off scan during boot to establish deployment tasks to execute during boot"
] | [
"Convert this lattice to store data in the given convention.\nConversion involving receiver premium assumes zero wide collar.\n\n@param targetConvention The convention to store the data in.\n@param displacement The displacement to use, if applicable.\n@param model The model for context.\n\n@return The converted lattice.",
"Initialization that parses the String to a JSON object.\n@param configString The JSON as string.\n@param baseConfig The optional basic search configuration to overwrite (partly) by the JSON configuration.\n@throws JSONException thrown if parsing fails.",
"Helper function to return the minimum size of the index space to be passed to the reduction given the input and\noutput tensors",
"Checks whether table name and key column names of the given joinable and inverse collection persister match.",
"open a readable or writeable FileChannel\n\n@param file file object\n@param mutable writeable\n@return open the FileChannel\n@throws IOException any io exception",
"Serialize this `AppDescriptor` and output byte array\n\n@return\nserialize this `AppDescriptor` into byte array",
"Use this API to fetch the statistics of all dos_stats resources that are configured on netscaler.",
"Use this API to fetch filtered set of vpnclientlessaccesspolicy resources.\nset the filter parameter values in filtervalue object.",
"Unpause the server, allowing it to resume normal operations"
] |
private String dumpZoneNAryDetails(StoreRoutingPlan storeRoutingPlan) {
StringBuilder sb = new StringBuilder();
sb.append("\tDetailed Dump (Zone N-Aries):").append(Utils.NEWLINE);
for(Node node: storeRoutingPlan.getCluster().getNodes()) {
int zoneId = node.getZoneId();
int nodeId = node.getId();
sb.append("\tNode ID: " + nodeId + " in zone " + zoneId).append(Utils.NEWLINE);
List<Integer> naries = storeRoutingPlan.getZoneNAryPartitionIds(nodeId);
Map<Integer, List<Integer>> zoneNaryTypeToPartitionIds = new HashMap<Integer, List<Integer>>();
for(int nary: naries) {
int zoneReplicaType = storeRoutingPlan.getZoneNaryForNodesPartition(zoneId,
nodeId,
nary);
if(!zoneNaryTypeToPartitionIds.containsKey(zoneReplicaType)) {
zoneNaryTypeToPartitionIds.put(zoneReplicaType, new ArrayList<Integer>());
}
zoneNaryTypeToPartitionIds.get(zoneReplicaType).add(nary);
}
for(int replicaType: new TreeSet<Integer>(zoneNaryTypeToPartitionIds.keySet())) {
sb.append("\t\t" + replicaType + " : ");
sb.append(zoneNaryTypeToPartitionIds.get(replicaType).toString());
sb.append(Utils.NEWLINE);
}
}
return sb.toString();
} | [
"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."
] | [
"Converts a string representation of an integer into an Integer object.\nSilently ignores any parse exceptions and returns null.\n\n@param value String representation of an integer\n@return Integer instance",
"Unregister the mbean with the given name\n\n@param server The server to unregister from\n@param name The name of the mbean to unregister",
"Return the most appropriate log type. This should _never_ return null.",
"Sets the bottom padding character for all cells in the row.\n@param paddingBottomChar new padding character, ignored if null\n@return this to allow chaining",
"Add server redirect to a profile, using current active ServerGroup\n\n@param region region\n@param srcUrl source URL\n@param destUrl destination URL\n@param hostHeader host header\n@param profileId profile ID\n@return ID of added ServerRedirect\n@throws Exception exception",
"Checks if this has the passed suffix\n\n@param suffix is a Bytes object to compare to this\n@return true or false\n@since 1.1.0",
"Decode long from byte array at offset\n\n@param ba byte array\n@param offset Offset\n@return long value",
"Register a new DropPasteWorkerInterface.\n@param worker The new worker",
"Read ClassDescriptors from the given repository file.\n@see #mergeDescriptorRepository"
] |
public void visitExport(String packaze, int access, String... modules) {
if (mv != null) {
mv.visitExport(packaze, access, modules);
}
} | [
"Visit an exported package of the current module.\n\n@param packaze the qualified name of the exported package.\n@param access the access flag of the exported package,\nvalid values are among {@code ACC_SYNTHETIC} and\n{@code ACC_MANDATED}.\n@param modules the qualified names of the modules that can access to\nthe public classes of the exported package or\n<tt>null</tt>."
] | [
"2-D Integer array to double array.\n\n@param array Integer array.\n@return Double array.",
"Return a long value from a prepared query.",
"Return the area polygon as the only feature in the feature collection.\n\n@param mapAttributes the attributes that this aoi is part of.",
"Verifies that the received image is identical to the original one.\n@param xopOriginal\n@param xopResponse",
"return a HashMap with all properties, name as key, value as value\n@return the properties",
"FOR internal use. This method was called after the external transaction was completed.\n\n@see javax.transaction.Synchronization",
"Provisions a new app user in an enterprise with additional user information 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@param params additional user information.\n@return the created user's info.",
"Use this API to unset the properties of inatparam resource.\nProperties that need to be unset are specified in args array.",
"Convenience wrapper for message parameters\n@param params\n@return"
] |
public ValueContainer[] getValuesForObject(FieldDescriptor[] fields, Object obj, boolean convertToSql, boolean assignAutoincrement) throws PersistenceBrokerException
{
ValueContainer[] result = new ValueContainer[fields.length];
for(int i = 0; i < fields.length; i++)
{
FieldDescriptor fd = fields[i];
Object cv = fd.getPersistentField().get(obj);
/*
handle autoincrement attributes if
- is a autoincrement field
- field represents a 'null' value, is nullified
and generate a new value
*/
if(assignAutoincrement && fd.isAutoIncrement() && representsNull(fd, cv))
{
/*
setAutoIncrementValue returns a value that is
properly typed for the java-world. This value
needs to be converted to it's corresponding
sql type so that the entire result array contains
objects that are properly typed for sql.
*/
cv = setAutoIncrementValue(fd, obj);
}
if(convertToSql)
{
// apply type and value conversion
cv = fd.getFieldConversion().javaToSql(cv);
}
// create ValueContainer
result[i] = new ValueContainer(cv, fd.getJdbcType());
}
return result;
} | [
"Get the values of the fields for an obj\nAutoincrement values are automatically set.\n@param fields\n@param obj\n@throws PersistenceBrokerException"
] | [
"Compares two annotated types and returns true if they are the same",
"get target hosts from line by line.\n\n@param sourcePath\nthe source path\n@param sourceType\nthe source type\n@return the list\n@throws TargetHostsLoadException\nthe target hosts load exception",
"Process the deployment root for the manifest.\n\n@param phaseContext the deployment unit context\n@throws DeploymentUnitProcessingException",
"An invalid reference or references. The verification of the digest of a\nreference failed. This can be caused by a change to the referenced data\nsince the signature was generated.\n\n@param aInvalidReferences\nThe indices to the invalid references.\n@return Result object",
"Verify that all OGM custom externalizers are present.\nN.B. even if some Externalizer is only needed in specific configuration,\nit is not safe to start a CacheManager without one as the same CacheManager\nmight be used, or have been used in the past, to store data using a different\nconfiguration.\n\n@see ExternalizerIds\n@see AdvancedExternalizer\n@param externalCacheManager the provided CacheManager to validate",
"Removes a parameter from this configuration.\n\n@param key the parameter to remove",
"returns controller if a new device is found",
"Gets the prefix from value.\n\n@param value the value\n@return the prefix from value",
"Return true if the connection being released is the one that has been saved."
] |
public GroovyFieldDoc[] fields() {
Collections.sort(fields);
return fields.toArray(new GroovyFieldDoc[fields.size()]);
} | [
"returns a sorted array of fields"
] | [
"Store a comment based on comment text, gavc and user information\n\n@param gavc - entity id\n@param commentText - comment text\n@param credential - user credentials\n@param entityType - type of the entity",
"Counts each property for which there is a statement in the given item\ndocument, ignoring the property thisPropertyIdValue to avoid properties\ncounting themselves.\n\n@param statementDocument\n@param usageRecord\n@param thisPropertyIdValue",
"Get a property as a json array or throw exception.\n\n@param key the property name",
"Updates the indices in the index buffer from a Java int array.\nAll of the entries of the input int array are copied into\nthe storage for the index buffer. The new indices must be the\nsame size as the old indices - the index buffer size cannot be changed.\n@param data char array containing the new values\n@throws IllegalArgumentException if int array is wrong size",
"Use this API to add sslaction resources.",
"Extract Primavera project data and export in another format.\n\n@param driverClass JDBC driver class name\n@param connectionString JDBC connection string\n@param projectID project ID\n@param outputFile output file\n@throws Exception",
"Determines the constraints relating to a task.\n\n@param row row data\n@param task Task instance",
"Resolves a conflict between a synchronized document's local and remote state. The resolution\nwill result in either the document being desynchronized or being replaced with some resolved\nstate based on the conflict resolver specified for the document. Uses the last uncommitted\nlocal event as the local state.\n\n@param nsConfig the namespace synchronization config of the namespace where the document\nlives.\n@param docConfig the configuration of the document that describes the resolver and current\nstate.\n@param remoteEvent the remote change event that is conflicting.",
"Set the order in which sets are returned for the user.\n\nThis method requires authentication with 'write' permission.\n\n@param photosetIds\nAn array of Ids\n@throws FlickrException"
] |
public static Double getDistanceWithinThresholdOfCoordinates(
Tuple2<Double, Double> point1, Tuple2<Double, Double> point2) {
throw new NotImplementedError();
} | [
"Not implemented.\n@param point1 Point1\n@param point2 Point2\n@return Throws an exception."
] | [
"Shortcut for mapping an arbitrary observable to void, using the IO scheduler.\n@param fromObservable the source observable\n@return a void-emitting observable",
"Fill the buffer of the specified range with a given value\n@param offset\n@param length\n@param value",
"Sums up the square of each element in the matrix. This is equivalent to the\nFrobenius norm squared.\n\n@param m Matrix.\n@return Sum of elements squared.",
"Reads the entity hosting the association from the datastore and applies any property changes from the server\nside.",
"Adds a metadata classification to the specified file.\n\n@param classificationType the metadata classification type.\n@return the metadata classification type added to the file.",
"If supported by the WMS server, a parameter \"angle\" can be set on \"customParams\" or \"mergeableParams\".\nIn this case the rotation will be done natively by the WMS.",
"Check real offset.\n\n@return the boolean",
"Get image Id from imageTag using DockerBuildInfoHelper client.\n\n@param imageTag\n@param host\n@return",
"Updates the exceptions.\n@param exceptions the exceptions to set"
] |
@SuppressWarnings({ "rawtypes", "unchecked" })
public void blacklistNode(int nodeId) {
Collection<Node> nodesInCluster = adminClient.getAdminClientCluster().getNodes();
if(blackListedNodes == null) {
blackListedNodes = new ArrayList();
}
blackListedNodes.add(nodeId);
for(Node node: nodesInCluster) {
if(node.getId() == nodeId) {
nodesToStream.remove(node);
break;
}
}
for(String store: storeNames) {
try {
SocketAndStreams sands = nodeIdStoreToSocketAndStreams.get(new Pair(store, nodeId));
close(sands.getSocket());
SocketDestination destination = nodeIdStoreToSocketRequest.get(new Pair(store,
nodeId));
streamingSocketPool.checkin(destination, sands);
} catch(Exception ioE) {
logger.error(ioE);
}
}
} | [
"mark a node as blacklisted\n\n@param nodeId Integer node id of the node to be blacklisted"
] | [
"Use this API to add route6.",
"Send JSON representation of given data object to all connections of a user\n@param data the data object\n@param username the username",
"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",
"Register the DAO with the cache. This will allow folks to build a DAO externally and then register so it can be\nused internally as necessary.\n\n<p>\n<b>NOTE:</b> By default this registers the DAO to be associated with the class that it uses. If you need to\nregister multiple dao's that use different {@link DatabaseTableConfig}s then you should use\n{@link #registerDaoWithTableConfig(ConnectionSource, Dao)}.\n</p>\n\n<p>\n<b>NOTE:</b> You should maybe use the {@link DatabaseTable#daoClass()} and have the DaoManager construct the DAO\nif possible.\n</p>",
"Use this API to add dnsview resources.",
"Process a device update once it has been received. Track it as the most recent update from its address,\nand notify any registered listeners, including master listeners if it results in changes to tracked state,\nsuch as the current master player and tempo. Also handles the Baroque dance of handing off the tempo master\nrole from or to another device.",
"Clears the handler hierarchy.",
"Print duration in thousandths of minutes.\n\n@param duration Duration instance\n@return duration in thousandths of minutes",
"another media scan way"
] |
public List<StepCandidate> prioritise(String stepAsText, List<StepCandidate> candidates) {
return prioritisingStrategy.prioritise(stepAsText, candidates);
} | [
"Prioritises the list of step candidates that match a given step.\n\n@param stepAsText\nthe textual step to match\n@param candidates\nthe List of StepCandidate\n@return The prioritised list according to the\n{@link PrioritisingStrategy}."
] | [
"Gets the URL of the service with the given name that has been created during the current session.\n\n@param name to return its URL\n@return URL of the service.",
"Use this API to unset the properties of nslimitselector resources.\nProperties that need to be unset are specified in args array.",
"Method used to read the sub project details from a byte array.\n\n@param data byte array\n@param uniqueIDOffset offset of unique ID\n@param filePathOffset offset of file path\n@param fileNameOffset offset of file name\n@param subprojectIndex index of the subproject, used to calculate unique id offset\n@return new SubProject instance",
"Evaluates the filter, returns true if the supplied Task or Resource\ninstance matches the filter criteria.\n\n@param container Task or Resource instance\n@param promptValues respose to prompts\n@return boolean flag",
"Retrieves and validates the content length from the REST request.\n\n@return true if has content length",
"Checks that arguments and parameter types match.\n@param params method parameters\n@param args type arguments\n@return -1 if arguments do not match, 0 if arguments are of the exact type and >0 when one or more argument is\nnot of the exact type but still match",
"Put a value if and only if the map has not changed since the given snapshot was taken. If the put fails,\nit is the caller's responsibility to retry.\n\n@param instance the instance with the map field\n@param key the key\n@param value the value\n@param snapshot the map snapshot\n@return {@code false} if the snapshot is out of date and we could not update, {@code true} if the put succeeded",
"Build and return the complete URI containing values\nsuch as the document ID, attachment ID, and query syntax.",
"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 TransformersSubRegistration getServerRegistration(final ModelVersionRange range) {
final PathAddress address = PathAddress.EMPTY_ADDRESS.append(HOST, SERVER);
return new TransformersSubRegistrationImpl(range, domain, address);
} | [
"Get the sub registry for the servers.\n\n@param range the version range\n@return the sub registry"
] | [
"This method must be called on the start of the component. Initialize and start the directory monitor.\n\n@param monitoredDirectory\n@param pollingTime",
"Convenience method for retrieving an Object resource.\n\n@param locale locale identifier\n@param key resource key\n@return resource value",
"Retrieves an existing resource assignment if one is present,\nto prevent duplicate resource assignments being added.\n\n@param resource resource to test for\n@return existing resource assignment",
"Adds an option to the Jvm options\n\n@param value the option to add",
"Determine which daughter of the current parse tree is the head.\n\n@param t The parse tree to examine the daughters of.\nIf this is a leaf, <code>null</code> is returned\n@param parent The parent of t\n@return The daughter parse tree that is the head of <code>t</code>.\nReturns null for leaf nodes.\n@see Tree#percolateHeads(HeadFinder)\nfor a routine to call this and spread heads throughout a tree",
"Gets the index of a ExpandableWrapper within the helper item list based on\nthe index of the ExpandableWrapper.\n\n@param parentPosition The index of the parent in the list of parents\n@return The index of the parent in the merged list of children and parents",
"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",
"Use this API to add snmpuser resources.",
"Use this API to fetch a vpnglobal_appcontroller_binding resources."
] |
protected void ensureDJStyles() {
//first of all, register all parent styles if any
for (Style style : getReport().getStyles().values()) {
addStyleToDesign(style);
}
Style defaultDetailStyle = getReport().getOptions().getDefaultDetailStyle();
Style defaultHeaderStyle = getReport().getOptions().getDefaultHeaderStyle();
for (AbstractColumn column : report.getColumns()) {
if (column.getStyle() == null)
column.setStyle(defaultDetailStyle);
if (column.getHeaderStyle() == null)
column.setHeaderStyle(defaultHeaderStyle);
}
} | [
"Sets a default style for every element that doesn't have one\n\n@throws JRException"
] | [
"Use this API to clear configuration on netscaler.\n@param force clear confirmation without prompting.\n@param level clear config according to the level. eg: basic, extended, full\n@return status of the operation performed.\n@throws Exception Nitro exception is thrown.",
"Parse JSON parameters from this request.\n\n@param jsonRequest The request in the JSON format.\n@return CmsSpellcheckingRequest object that contains parsed parameters or null, if JSON input is not well\ndefined.",
"Given a string which is either the name of a predefined tab configuration or a configuration string, returns\nthe corresponding tab configuration.\n\n@param configStr a configuration string or predefined configuration name\n\n@return the gallery tab configuration",
"Returns the coordinates of the vertex points of this hull.\n\n@param coords\nreturns the x, y, z coordinates of each vertex. This length of\nthis array must be at least three times the number of\nvertices.\n@return the number of vertices\n@see QuickHull3D#getVertices()\n@see QuickHull3D#getFaces()",
"Set HTTP headers to allow caching for the given number of seconds.\n\n@param response where to set the caching settings\n@param seconds number of seconds into the future that the response should be cacheable for",
"called periodically to check that the heartbeat has been received\n\n@return {@code true} if we have received a heartbeat recently",
"Called on mouse down in the caption area, begins the dragging loop by\nturning on event capture.\n\n@see DOM#setCapture\n@see #continueDragging\n@param event the mouse down event that triggered dragging",
"Retrieves the overallocated flag.\n\n@return overallocated flag",
"Creates a new access control entry and stores it for later write out.\n\n@param res the resource\n@param id the id of the principal\n@param allowed the allowed permissions\n@param denied the denied permissions\n@param flags the flags\n\n@return the created ACE"
] |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.