query stringlengths 74 6.1k | positive listlengths 1 1 | negative listlengths 9 9 |
|---|---|---|
public static base_response update(nitro_service client, snmpalarm resource) throws Exception {
snmpalarm updateresource = new snmpalarm();
updateresource.trapname = resource.trapname;
updateresource.thresholdvalue = resource.thresholdvalue;
updateresource.normalvalue = resource.normalvalue;
updateresource.ti... | [
"Use this API to update snmpalarm."
] | [
"Return the basis functions for the regression suitable for this product.\n\n@param fixingDate The condition time.\n@param model The model\n@return The basis functions for the regression suitable for this product.\n@throws net.finmath.exception.CalculationException Thrown if the valuation fails, specific cause may ... |
public static nsfeature get(nitro_service service) throws Exception{
nsfeature obj = new nsfeature();
nsfeature[] response = (nsfeature[])obj.get_resources(service);
return response[0];
} | [
"Use this API to fetch all the nsfeature resources that are configured on netscaler."
] | [
"Pause between cluster change in metadata and starting server rebalancing\nwork.",
"Use this API to change sslcertkey resources.",
"Determine whether we should use the normal repaint process, or delegate that to another component that is\nhosting us in a soft-loaded manner to save memory.\n\n@param x the left e... |
@Nullable
private static Object valueOf(String value, Class<?> cls) {
if (cls == Boolean.TYPE) {
return Boolean.valueOf(value);
}
if (cls == Character.TYPE) {
return value.length() >= 1 ? value.charAt(0) : defaultValue(char.class);
}
if (cls == Byte.TYPE) {
return Byte.valueOf(va... | [
"Returns the value of the primitive type from the given string value.\n\n@param value the value to parse\n@param cls the primitive type class\n@return the boxed type value or {@code null} if the given class is not a primitive type"
] | [
"Construct a new simple attachment key.\n\n@param valueClass the value class\n@param <T> the attachment type\n@return the new instance",
"Deletes a vertex from this list.",
"Read data for an individual task.\n\n@param row task data from database\n@param task Task instance",
"Multiply scalar value to a complex... |
public void postPhoto(Photo photo, String blogId) throws FlickrException {
postPhoto(photo, blogId, null);
} | [
"Post the specified photo to a blog.\n\n@param photo\nThe photo metadata\n@param blogId\nThe blog ID\n@throws FlickrException"
] | [
"Write the table configuration to a buffered writer.",
"Returns the index of the eigenvalue which has the smallest magnitude.\n\n@return index of the smallest magnitude eigen value.",
"Simple info message for status\n\n@param tag Message to print out at start of info message",
"Gets a string attribute from a ... |
DeleteResult deleteMany(final MongoNamespace namespace,
final Bson filter) {
this.waitUntilInitialized();
try {
ongoingOperationsGroup.enter();
final List<ChangeEvent<BsonDocument>> eventsToEmit = new ArrayList<>();
final DeleteResult result;
final NamespaceSyn... | [
"Removes all documents from the collection that match the given query filter. If no documents\nmatch, the collection is not modified.\n\n@param filter the query filter to apply the the delete operation\n@return the result of the remove many operation"
] | [
"Use this API to update nspbr6 resources.",
"Sets the node meta data but allows overwriting values.\n\n@param key - the meta data key\n@param value - the meta data value\n@return the old node meta data value for this key\n@throws GroovyBugError if key is null",
"Start a timer of the given string name for the ... |
public List<TimephasedWork> getTimephasedOvertimeWork()
{
if (m_timephasedOvertimeWork == null && m_timephasedWork != null && getOvertimeWork() != null)
{
double perDayFactor = getRemainingOvertimeWork().getDuration() / (getRemainingWork().getDuration() - getRemainingOvertimeWork().getDuration()... | [
"Retrieves the timephased breakdown of the planned overtime work for this\nresource assignment.\n\n@return timephased planned work"
] | [
"Remove a handler from the list\n@param toRemove The handler to remove. Any handler object that\nmatches this class will be removed.\n@return true if this handler was in the list.",
"Unmark a PersistenceBroker as preferred choice for current Thread\n\n@param key The PBKey the broker is associated to\n@param br... |
public AbstractVolatilitySurfaceParametric getCloneCalibrated(final AnalyticModel calibrationModel, final Vector<AnalyticProduct> calibrationProducts, final List<Double> calibrationTargetValues, Map<String,Object> calibrationParameters, final ParameterTransformation parameterTransformation, OptimizerFactory optimizerFa... | [
"Create a clone of this volatility surface using a generic calibration\nof its parameters to given market data.\n\n@param calibrationModel The model used during calibration (contains additional objects required during valuation, e.g. curves).\n@param calibrationProducts The calibration products.\n@param calibration... | [
"Retrieve the value from the REST request body.\n\nTODO: REST-Server value cannot be null ( null/empty string ?)",
"Shutdown task scheduler.",
"Parses whole value as list attribute\n@deprecated in favour of using {@link AttributeParser attribute parser}\n@param value String with \",\" separated string elements... |
private void setQR(DMatrixRMaj Q , DMatrixRMaj R , int growRows ) {
if( Q.numRows != Q.numCols ) {
throw new IllegalArgumentException("Q should be square.");
}
this.Q = Q;
this.R = R;
m = Q.numRows;
n = R.numCols;
if( m+growRows > maxRows || n > max... | [
"Provides the results of a QR decomposition. These will be modified by adding or removing\nrows from the original 'A' matrix.\n\n@param Q The Q matrix which is to be modified. Is modified later and reference saved.\n@param R The R matrix which is to be modified. Is modified later and reference saved."
] | [
"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}",
"Registers all custom Externalizer implementations that Hibernate OGM needs into an Infinispan CacheManager\nconfigurat... |
public static int cudnnGetCTCLossWorkspaceSize(
cudnnHandle handle,
cudnnTensorDescriptor probsDesc, /** Tensor descriptor for probabilities, the dimensions are T,N,A (T is the
timing steps, N is the mini batch size, A is the alphabet size) */
cud... | [
"return the workspace size needed for ctc"
] | [
"Records the result of updating a server group.\n\n@param serverGroup the server group's name. Cannot be <code>null</code>\n@param failed <code>true</code> if the server group update failed;\n<code>false</code> if it succeeded",
"Finds the first mesh in the given model.\n@param model root of a model loaded by the... |
private void readTask(ChildTaskContainer mpxjParent, net.sf.mpxj.ganttproject.schema.Task gpTask)
{
Task mpxjTask = mpxjParent.addTask();
mpxjTask.setUniqueID(Integer.valueOf(NumberHelper.getInt(gpTask.getId()) + 1));
mpxjTask.setName(gpTask.getName());
mpxjTask.setPercentageComplete(gpTask.g... | [
"Recursively read a task, and any sub tasks.\n\n@param mpxjParent Parent for the MPXJ tasks\n@param gpTask GanttProject task"
] | [
"Populate a resource assignment workgroup instance.\n\n@param record MPX record\n@param workgroup workgroup instance\n@throws MPXJException",
"performs an INSERT operation against RDBMS.\n@param obj The Object to be inserted as a row of the underlying table.\n@param cld ClassDescriptor providing mapping informati... |
ValidationResult cleanObjectKey(String name) {
ValidationResult vr = new ValidationResult();
name = name.trim();
for (String x : objectKeyCharsNotAllowed)
name = name.replace(x, "");
if (name.length() > Constants.MAX_KEY_LENGTH) {
name = name.substring(0, Constan... | [
"Cleans the object key.\n\n@param name Name of the object key\n@return The {@link ValidationResult} object containing the object,\nand the error code(if any)"
] | [
"Internal method used to test for the existence of a relationship\nwith a task.\n\n@param task target task\n@param list list of relationships\n@return boolean flag",
"Called whenever a rebalance task completes. This means one task is done\nand some number of partition stores have been migrated.\n\n@param taskId\n... |
public <G extends T> RendererBuilder<T> bind(Class<G> clazz, Renderer<? extends G> prototype) {
if (clazz == null || prototype == null) {
throw new IllegalArgumentException(
"The binding RecyclerView binding can't be configured using null instances");
}
prototypes.add(prototype);
binding... | [
"Given a class configures the binding between a class and a Renderer class.\n\n@param clazz to bind.\n@param prototype used as Renderer.\n@return the current RendererBuilder instance."
] | [
"Reads a stringtemplate group from a stream.\n\nThis will always return a group (empty if necessary), even if reading it from the stream fails.\n\n@param stream the stream to read from\n@return the string template group",
"Build the operation transformers.\n\n@param registry the shared resource registry\n@return ... |
public static void setField(Object object, String field, Object value) throws NoSuchMethodException, InvocationTargetException, IllegalAccessException {
Class<?> clazz = object.getClass();
Method m = clazz.getMethod( PROPERTY_ACCESSOR_PREFIX_SET + capitalize( field ), value.getClass() );
m.invoke( object, value )... | [
"Set value for given object field.\n\n@param object object to be updated\n@param field field name\n@param value field value\n\n@throws NoSuchMethodException if property writer is not available\n@throws InvocationTargetException if property writer throws an exception\n@throws IllegalAccessException if property write... | [
"Attach a metadata cache file to a particular player media slot, so the cache will be used instead of querying\nthe player for metadata. This supports operation with metadata during shows where DJs are using all four player\nnumbers and heavily cross-linking between them.\n\nIf the media is ejected from that player... |
private Double getPercentage(Number number)
{
Double result = null;
if (number != null)
{
result = Double.valueOf(number.doubleValue() / 100);
}
return result;
} | [
"Formats a percentage value.\n\n@param number MPXJ percentage value\n@return Primavera percentage value"
] | [
"This method extracts predecessor data from a Planner file.\n\n@param plannerTask Task data",
"Initializes the fields on the changes file with the values of the specified\nbinary package control file.\n\n@param packageControlFile",
"Calculate the arc length by angle and radius\n@param angle\n@return arc length"... |
public void addColumnPair(String localColumn, String remoteColumn)
{
if (!_localColumns.contains(localColumn))
{
_localColumns.add(localColumn);
}
if (!_remoteColumns.contains(remoteColumn))
{
_remoteColumns.add(remoteColumn);
... | [
"Adds a column pair to this foreignkey.\n\n@param localColumn The column in the local table\n@param remoteColumn The column in the remote table"
] | [
"Get a store definition from the given list of store definitions\n\n@param list A list of store definitions\n@param name The name of the store\n@return The store definition",
"Returns true if \"file\" is a subfile or subdirectory of \"dir\".\n\nFor example with the directory /path/to/a, the following return value... |
@Override
protected void _acceptTimestampVisitor(JsonFormatVisitorWrapper visitor, JavaType typeHint)
throws JsonMappingException
{
SerializerProvider prov = visitor.getProvider();
if ((prov != null) && useNanoseconds(prov)) {
JsonNumberFormatVisitor v2 = visitor.expectNumber... | [
"Overridden to ensure that our timestamp handling is as expected"
] | [
"Auto re-initialize external resourced\nif resources have been already released.",
"Read a block of data from the FastTrack file and determine if\nit contains a table definition, or columns.\n\n@param blockIndex index of the current block\n@param startIndex start index of the block in the file\n@param blockLength... |
protected <E> E read(Supplier<E> sup) {
try {
this.lock.readLock().lock();
return sup.get();
} finally {
this.lock.readLock().unlock();
}
} | [
"Executes the given supplier within the context of a read lock.\n\n@param <E> The result type.\n@param sup The supplier.\n@return The result of {@link Supplier#get()}."
] | [
"Remove all children that have been added to the owner object of this camera rig; except the\ncamera objects.",
"get the ClassTypeSignature corresponding to given parameterized type\n\n@param parameterizedType\n@return",
"Determines if still WRITING or COMPLETE.\n\n@param itemTag mad libs style string to insert... |
@Override
public String toFullString() {
String result;
if(hasNoStringCache() || (result = stringCache.fullString) == null) {
stringCache.fullString = result = toNormalizedString(IPv4StringCache.fullParams);
}
return result;
} | [
"This produces a string with no compressed segments and all segments of full length,\nwhich is 3 characters for IPv4 segments."
] | [
"The quick way to detect for a tier of devices.\nThis method detects for devices which can\ndisplay iPhone-optimized web content.\nIncludes iPhone, iPod Touch, Android, Windows Phone 7 and 8, BB10, WebOS, Playstation Vita, etc.\n@return detection of any device in the iPhone/Android/Windows Phone/BlackBerry/WebOS Ti... |
public void signOff(String key, Collection<WebSocketConnection> connections) {
if (connections.isEmpty()) {
return;
}
ConcurrentMap<WebSocketConnection, WebSocketConnection> bag = ensureConnectionList(key);
bag.keySet().removeAll(connections);
} | [
"Sign off a group of connections from the registry by key\n\n@param key\nthe key\n@param connections\na collection of websocket connections"
] | [
"Appends to the statement table and all tables joined to it.\n@param alias the table alias\n@param where append conditions for WHERE clause here",
"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... |
public static base_responses reset(nitro_service client, Interface resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
Interface resetresources[] = new Interface[resources.length];
for (int i=0;i<resources.length;i++){
resetresources[i] = new Inte... | [
"Use this API to reset Interface resources."
] | [
"Try to delegate the responsibility of sending slops to master\n\n@param node The node that slop should eventually be pushed to\n@return true if master accept the responsibility; false if master does\nnot accept",
"Add a EXISTS clause with a sub-query inside of parenthesis.\n\n<p>\n<b>NOTE:</b> The sub-query will... |
@Override
public List<InstalledIdentity> getInstalledIdentities() throws PatchingException {
List<InstalledIdentity> installedIdentities;
final File metadataDir = installedImage.getInstallationMetadata();
if(!metadataDir.exists()) {
installedIdentities = Collections.singletonLi... | [
"This method will return a list of installed identities for which\nthe corresponding .conf file exists under .installation directory.\nThe list will also include the default identity even if the .conf\nfile has not been created for it."
] | [
"Returns the key of the entity targeted by the represented association, retrieved from the given tuple.\n\n@param tuple the tuple from which to retrieve the referenced entity key\n@return the key of the entity targeted by the represented association",
"Add tables to the tree.\n\n@param parentNode parent tree node... |
public void revertWorkingCopy() throws IOException, InterruptedException {
build.getWorkspace()
.act(new RevertWorkingCopyCallable(getLocation(), getSvnAuthenticationProvider(build), buildListener));
} | [
"Revert all the working copy changes."
] | [
"Gathers information, that couldn't be collected while tree traversal.",
"Sets the protocol, hostname and port to connect to.\n\n@param protocol the protocol to use\n@param hostname the host name\n@param port the port\n\n@return the builder",
"Update the underlying buffer using the integer\n\n@param number ... |
public void printAnswers(List<CoreLabel> doc, PrintWriter out) {
// boolean tagsMerged = flags.mergeTags;
// boolean useHead = flags.splitOnHead;
if ( ! "iob1".equalsIgnoreCase(flags.entitySubclassification)) {
deEndify(doc);
}
for (CoreLabel fl : doc) {
String word = fl.word(... | [
"Write a standard CoNLL format output file.\n\n@param doc The document: A List of CoreLabel\n@param out Where to send the answers to"
] | [
"Use this API to fetch systemsession resource of given name .",
"Convert the Phoenix representation of a duration into a Duration instance.\n\n@param value Phoenix duration\n@return Duration instance",
"get the setter method corresponding to given property",
"Extract the DatabaseTableConfig for a particular c... |
public BeatGrid requestBeatGridFrom(final DataReference track) {
for (BeatGrid cached : hotCache.values()) {
if (cached.dataReference.equals(track)) { // Found a hot cue hit, use it.
return cached;
}
}
return requestBeatGridInternal(track, false);
} | [
"Ask the specified player for the beat grid of the track in the specified slot with the specified rekordbox ID,\nfirst checking if we have a cache we can use instead.\n\n@param track uniquely identifies the track whose beat grid is desired\n\n@return the beat grid, if any"
] | [
"Copies the non-zero structure of orig into \"this\"\n@param orig Matrix who's structure is to be copied",
"Use this API to fetch nd6ravariables resources of given names .",
"Loads the columns for this table into the alChildren list.",
"Execute a CLI command. This can be any command that you might execute on\... |
public Metadata add(String path, List<String> values) {
JsonArray arr = new JsonArray();
for (String value : values) {
arr.add(value);
}
this.values.add(this.pathToProperty(path), arr);
this.addOp("add", path, arr);
return this;
} | [
"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."
] | [
"Parse a list of String into a list of Integer.\nIf one element can not be parsed, the behavior depends on the value of failOnException.\n@param strList can't be null\n@param failOnException if an element can not be parsed should we return null or add a null element to the list.\n@return list of all String parsed a... |
void saveAction() {
Map<Object, Object> filters = getFilters();
m_table.clearFilters();
try {
m_model.save();
disableSaveButtons();
} catch (CmsException e) {
LOG.error(m_messages.key(Messages.ERR_SAVING_CHANGES_0), e);
CmsErrorDialog.s... | [
"Save the changes."
] | [
"Translate the operation address.\n\n@param op the operation\n@return the new operation",
"Main method for testing fetching",
"Recovers the state of synchronization in case a system failure happened. The goal is to revert\nto a known, good state.",
"Use this API to fetch the statistics of all dos_stats resour... |
protected void addLineContent(BufferedReader bufferedFileReader, List<String> content, String line) throws IOException {
content.add(line);
} | [
"Add the line to the content\n\n@param bufferedFileReader The file reader\n@param content The content of the file\n@param line The current read line\n@throws IOException"
] | [
"Parses command-line and synchronizes metadata versions 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",
"Use this API to fetch all the transformpolicylabel resources that are configured on netscaler.",
"U... |
public static cacheobject[] get(nitro_service service) throws Exception{
cacheobject obj = new cacheobject();
cacheobject[] response = (cacheobject[])obj.get_resources(service);
return response;
} | [
"Use this API to fetch all the cacheobject resources that are configured on netscaler."
] | [
"Utility function that fetches quota types.",
"Adds an index to the table for the given index descriptor.\n\n@param indexDescDef The index descriptor\n@param tableDef The table",
"Iterate and insert each of the elements of the Collection.\n\n@param objects\nThe objects to insert\n@param outIdentifier\nIdent... |
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.");
... | [
"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."
] | [
"Record the checkout wait time in us\n\n@param dest Destination of the socket to checkout. Will actually record\nif null. Otherwise will call this on self and corresponding child\nwith this param null.\n@param checkoutTimeUs The number of us to wait before getting a socket",
"Randomly generates matrix with the sp... |
CueList getCueList(int rekordboxId, CdjStatus.TrackSourceSlot slot, Client client)
throws IOException {
Message response = client.simpleRequest(Message.KnownType.CUE_LIST_REQ, null,
client.buildRMST(Message.MenuIdentifier.DATA, slot), new NumberField(rekordboxId));
if (respon... | [
"Requests the cue list for a specific track ID, given a dbserver connection to a player that has already\nbeen set up.\n\n@param rekordboxId the track of interest\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 th... | [
"Add a 'IS NOT NULL' clause so the column must not be null. '<>' NULL does not work.",
"Adds the given reference to the list of references that should still be\nserialized, and returns the RDF resource that will be used as a subject.\n\n@param reference\nthe reference to be serialized\n@return RDF resource ... |
public static int byteSizeOf(Bitmap bitmap) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
return bitmap.getAllocationByteCount();
} else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR1) {
return bitmap.getByteCount();
} else {
ret... | [
"returns the bytesize of the give bitmap"
] | [
"A safe wrapper to destroy the given resource request.",
"Transform the given object into an array of bytes\n\n@param object The object to be serialized\n@return The bytes created from serializing the object",
"Release the broker instance.",
"Adds a foreignkey to this table.\n\n@param relationName The name o... |
public void recordServerResult(ServerIdentity server, ModelNode response) {
if (!serverGroupName.equals(server.getServerGroupName()) || !servers.contains(server)) {
throw DomainControllerLogger.HOST_CONTROLLER_LOGGER.unknownServer(server);
}
boolean serverFailed = response.has(FAIL... | [
"Records the result of updating a server.\n\n@param server the id of the server. Cannot be <code>null</code>\n@param response the result of the updates"
] | [
"Call batch tasks inside of a connection which may, or may not, have been \"saved\".",
"Add a property.",
"Generate a string with all selected checkboxes separated with ','.\n\n@return a string with all selected checkboxes",
"Checks if there is an annotation of the given type on this method or on type level f... |
public void setValue(Quaternionf rot) {
mX = rot.x;
mY = rot.y;
mZ = rot.z;
mW = rot.w;
} | [
"Sets the quaternion of the keyframe."
] | [
"Returns a string to resolve apostrophe issue in xpath\n\n@param text\n@return the apostrophe resolved xpath value string",
"Get a collection of methods declared on this object by method name and parameter count.\n\n@param name the name of the method\n@param paramCount the number of parameters\n@return the ... |
Map<String, String> packageNameMap() {
if (packageNames == null) {
return emptyMap();
}
Map<String, String> names = new LinkedHashMap<String, String>();
for (PackageName name : packageNames) {
names.put(name.getUri(), name.getPackage());
}
return ... | [
"Returns a map of URIs to package name, as specified by the packageNames\nparameter."
] | [
"crates a StencilSet object and add it to the current diagram\n@param modelJSON\n@param current\n@throws org.json.JSONException",
"Gets id of a property and creates the new one if necessary.\n\n@param txn transaction\n@param propertyName name of the property.\n@param allowCreate if set to true and if th... |
public void remove(Identity oid)
{
if(log.isDebugEnabled()) log.debug("Remove object " + oid);
sessionCache.remove(oid);
getApplicationCache().remove(oid);
} | [
"Remove the corresponding object from session AND application cache."
] | [
"Find the latest task finish date. We treat this as the\nfinish date for the project.\n\n@return finish date",
"This method is used to change the credentials of CleverTap account Id, token and region programmatically\n@param accountID CleverTap Account Id\n@param token CleverTap Account Token\n@param region Cleve... |
public static Method getGetterPropertyMethod(Class<?> type,
String propertyName) {
String sourceMethodName = "get"
+ BeanUtils.capitalizePropertyName(propertyName);
Method sourceMethod = BeanUtils.getMethod(type, sourceMethodName);
if (sourceMethod == null) {
sourceMethodName = "is"
+ Be... | [
"get the getter method corresponding to given property"
] | [
"Set the menu's width in pixels.",
"Processes the template for all columns of the current table index.\n\n@param template The template\n@param attributes The attributes of the tag\n@exception XDocletException if an error occurs\n@doc.tag type=\"block\"",
"Load a list... |
public void setVariable(String name, Object value) {
if (variables == null)
variables = new LinkedHashMap();
variables.put(name, value);
} | [
"Sets the value of the given variable\n\n@param name the name of the variable to set\n@param value the new value for the given variable"
] | [
"Sets a listener for user actions within the SearchView.\n\n@param listener the listener object that receives callbacks when the user performs\nactions in the SearchView such as clicking on buttons or typing a query.",
"Returns a single sort option configuration as configured via the methods parameter, or null if... |
protected AllowableActions collectAllowableActions(CmsObject cms, CmsResource file) {
try {
if (file == null) {
throw new IllegalArgumentException("File must not be null!");
}
CmsLock lock = cms.getLock(file);
CmsUser user = cms.getReques... | [
"Compiles the allowable actions for a file or folder.\n\n@param cms the current CMS context\n@param file the resource for which we want the allowable actions\n\n@return the allowable actions for the given resource"
] | [
"Join the Collection of Strings using the specified delimter and optionally quoting each\n\n@param s\nThe String collection\n@param delimiter\nthe delimiter String\n@param doQuote\nwhether or not to quote the Strings\n@return The joined String",
"Find the number of Strings matched to the given Matcher.\n\n@param ... |
@SuppressWarnings("unchecked")
public <T extends Annotation> T getAnnotation(Class<T> annotationType) {
for (Annotation annotation : this.annotations) {
if (annotation.annotationType().equals(annotationType)) {
return (T) annotation;
}
}
for (Annotation metaAnn : this.annotations) {
T ann = metaAnn.... | [
"Obtain the annotation associated with this type descriptor of the specified type.\n@param annotationType the annotation type\n@return the annotation, or {@code null} if no such annotation exists on this type descriptor"
] | [
"Returns a query filter for the given document _id and version. The version is allowed to be\nnull. The query will match only if there is either no version on the document in the database\nin question if we have no reference of the version or if the version matches the database's\nversion.\n\n@param documentId the ... |
public List<Message> requestTrackMenuFrom(final SlotReference slotReference, final int sortOrder)
throws Exception {
ConnectionManager.ClientTask<List<Message>> task = new ConnectionManager.ClientTask<List<Message>>() {
@Override
public List<Message> useClient(Client client)... | [
"Ask the specified player for a Track menu.\n\n@param slotReference the player and slot for which the menu is desired\n@param sortOrder the order in which responses should be sorted, 0 for default, see Section 6.11.1 of the\n<a href=\"https://github.com/Deep-Symmetry/dysentery/blob/master/doc/Analysis.pdf\">Packet ... | [
"Given a cluster and a node id checks if the node exists\n\n@param nodeId The node id to search for\n@return True if cluster contains the node id, else false",
"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 ov... |
public void put(String key, Object object, Envelope envelope) {
index.put(key, envelope);
cache.put(key, object);
} | [
"Put a spatial object in the cache and index it.\n\n@param key key for object\n@param object object itself\n@param envelope envelope for object"
] | [
"Calculates the next snapshot version based on the current release version\n\n@param fromVersion The version to bump to next development version\n@return The next calculated development (snapshot) version",
"Returns the complete record for a single status update.\n\n@param projectStatus The project status update... |
protected void addArguments(FieldDescriptor field[])
{
for (int i = 0; i < field.length; i++)
{
ArgumentDescriptor arg = new ArgumentDescriptor(this);
arg.setValue(field[i].getAttributeName(), false);
this.addArgument(arg);
}
} | [
"Set up arguments for each FieldDescriptor in an array."
] | [
"Returns the perma link for the given resource and optional detail content.<p<\n\n@param cms the CMS context to use\n@param resourceName the page to generate the perma link for\n@param detailContentId the structure id of the detail content (may be null)\n\n@return the perma link",
"We have obtained metadata for a... |
public static void writeFlowId(Message message, String flowId) {
Map<String, List<String>> headers = getOrCreateProtocolHeader(message);
headers.put(FLOWID_HTTP_HEADER_NAME, Collections.singletonList(flowId));
if (LOG.isLoggable(Level.FINE)) {
LOG.fine("HTTP header '" + FLOWID_HTTP_H... | [
"Write flow id.\n\n@param message the message\n@param flowId the flow id"
] | [
"Emit a event object with parameters and force all listeners to be called synchronously.\n\n@param event\nthe target event\n@param args\nthe arguments passed in\n@see #emit(EventObject, Object...)",
"Get all field attributes in an unmodifiable Map, or null if no attributes have been added\n\n@return all field att... |
private void populateRecurringException(ProjectCalendarException mpxjException, Exceptions.Exception xmlException)
{
RecurringData data = mpxjException.getRecurring();
xmlException.setEnteredByOccurrences(Boolean.TRUE);
xmlException.setOccurrences(NumberHelper.getBigInteger(data.getOccurrences()));... | [
"Writes the details of a recurring exception.\n\n@param mpxjException source MPXJ calendar exception\n@param xmlException target MSPDI exception"
] | [
"Generates timephased actual costs from the assignment's cost value. Used for Cost type Resources.\n\n@return timephased cost",
"Returns the context the view is running in, through which it can\naccess the current theme, resources, etc.\n\n@return The view's Context.",
"Converts the http entity to string. If en... |
private static Map<String, Object> processConf(Map<String, ?> conf) {
Map<String, Object> m = new HashMap<String, Object>(conf.size());
for (String s : conf.keySet()) {
Object o = conf.get(s);
if (s.startsWith("act.")) s = s.substring(4);
m.put(s, o);
m.pu... | [
"trim \"act.\" from conf keys"
] | [
"Handle an end time change.\n@param event the change event.",
"Get a property as a boolean or default value.\n\n@param key the property name\n@param defaultValue the default",
"Tells you if the date part of a datetime is in a certain time range.",
"StartMain passes in the command line args here.\n\n@param arg... |
public static BufferedImage convertImageToARGB( Image image ) {
if ( image instanceof BufferedImage && ((BufferedImage)image).getType() == BufferedImage.TYPE_INT_ARGB )
return (BufferedImage)image;
BufferedImage p = new BufferedImage( image.getWidth(null), image.getHeight(null), BufferedImage.TYPE_INT_ARGB);
G... | [
"Convert an Image into a TYPE_INT_ARGB BufferedImage. If the image is already of this type, the original image is returned unchanged.\n@param image the image to convert\n@return the converted image"
] | [
"Helper method to remove invalid children that don't have a corresponding CmsSitemapClientEntry.",
"Populate the properties indicating the source of this schedule.\n\n@param properties project properties",
"Determines if this connection's access token has expired and needs to be refreshed.\n@return true if the ... |
public static vrid_nsip6_binding[] get(nitro_service service, Long id) throws Exception{
vrid_nsip6_binding obj = new vrid_nsip6_binding();
obj.set_id(id);
vrid_nsip6_binding response[] = (vrid_nsip6_binding[]) obj.get_resources(service);
return response;
} | [
"Use this API to fetch vrid_nsip6_binding resources of given name ."
] | [
"Populate the properties indicating the source of this schedule.\n\n@param properties project properties",
"This may cost twice what it would in the original Map because we have to find\nthe original value for this key.\n\n@param key key with which the specified value is to be associated.\n@param value value to... |
public static Shell createConsoleShell(String prompt, String appName, Object... handlers) {
ConsoleIO io = new ConsoleIO();
List<String> path = new ArrayList<String>(1);
path.add(prompt);
MultiMap<String, Object> modifAuxHandlers = new ArrayHashMultiMap<String, Object>();
modif... | [
"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 handle... | [
"Returns the configured fields of the current field configuration.\n\n@return the configured fields of the current field configuration",
"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 li... |
private List<Entry> sortEntries(List<Entry> loadedEntries) {
Collections.sort(loadedEntries, new Comparator<Entry>() {
@Override
public int compare(Entry entry1, Entry entry2) {
int result = (int) (entry1.cuePosition - entry2.cuePosition);
if (result == 0)... | [
"Sorts the entries into the order we want to present them in, which is by position, with hot cues coming after\nordinary memory points if both exist at the same position, which often happens.\n\n@param loadedEntries the unsorted entries we have loaded from a dbserver message, metadata cache, or rekordbox\ndatabase ... | [
"Get the collection of contacts for the calling user.\n\n@return The Collection of Contact objects",
"Creates an appropriate HSGE for a domain-wide resource of a type that is mappable to server groups",
"Callback from the worker when it terminates",
"We have reason to believe we might have enough information ... |
private SiteRecord getSiteRecord(String siteKey) {
SiteRecord siteRecord = this.siteRecords.get(siteKey);
if (siteRecord == null) {
siteRecord = new SiteRecord(siteKey);
this.siteRecords.put(siteKey, siteRecord);
}
return siteRecord;
} | [
"Returns a site record for the site of the given name, creating a new one\nif it does not exist yet.\n\n@param siteKey\nthe key of the site\n@return the suitable site record"
] | [
"Clones the given collection.\n\n@param collDef The collection descriptor\n@param prefix A prefix for the name\n@return The cloned collection",
"Creates the adapter for the target database.",
"Build the key for the TableAlias based on the path and the hints\n@param aPath\n@param hintClasses\n@return the key fo... |
public FullTypeSignature getTypeErasureSignature() {
if (typeErasureSignature == null) {
typeErasureSignature = new ClassTypeSignature(binaryName,
new TypeArgSignature[0], ownerTypeSignature == null ? null
: (ClassTypeSignature) ownerTypeSignature
.getTypeErasureSignature());
}
retu... | [
"get the type erasure signature"
] | [
"Sets a parameter for the creator.",
"Check if the current version match the last release or the last snapshot one\n\n@param artifact\n@return boolean",
"Broadcast a packet that tells some players to start playing and others to stop. If a player number is in\nboth sets, it will be told to stop. Numbers outside ... |
public void setIntegerAttribute(String name, Integer value) {
ensureValue();
Attribute attribute = new IntegerAttribute(value);
attribute.setEditable(isEditable(name));
getValue().getAllAttributes().put(name, attribute);
} | [
"Sets the specified integer 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"
] | [
"read all objects of this iterator. objects will be placed in cache",
"This method is used to change the credentials of CleverTap account Id, token and region programmatically\n@param accountID CleverTap Account Id\n@param token CleverTap Account Token\n@param region Clever Tap Account Region",
"set the layout ... |
public static vpnclientlessaccesspolicy get(nitro_service service, String name) throws Exception{
vpnclientlessaccesspolicy obj = new vpnclientlessaccesspolicy();
obj.set_name(name);
vpnclientlessaccesspolicy response = (vpnclientlessaccesspolicy) obj.get_resource(service);
return response;
} | [
"Use this API to fetch vpnclientlessaccesspolicy resource of given name ."
] | [
"Use this API to delete dnstxtrec.",
"Retrieve the default number of minutes per year.\n\n@return minutes per year",
"The file we are working with has a byte order mark. Skip this and try again to read the file.\n\n@param stream schedule data\n@param length length of the byte order mark\n@param charset charset ... |
private void addToInverseAssociations(
Tuple resultset,
int tableIndex,
Serializable id,
SharedSessionContractImplementor session) {
new EntityAssociationUpdater( this )
.id( id )
.resultset( resultset )
.session( session )
.tableIndex( tableIndex )
.propertyMightRequireInverseAssociat... | [
"Adds the given entity to the inverse associations it manages."
] | [
"Retrieve a string value.\n\n@param data byte array\n@param offset offset into byte array\n@return string value",
"Add the given entries of the input map into the output map.\n\n<p>\nIf a key in the inputMap already exists in the outputMap, its value is\nreplaced in the outputMap by the value from the inputMap.\n... |
public void setInitialSequence(int[] sequence) {
if(models != null){
for(int i = 0; i < models.length; i++)
models[i].setInitialSequence(sequence);
return;
}
model1.setInitialSequence(sequence);
model2.setInitialSequence(sequence);
} | [
"Informs this sequence model that the value of the whole sequence is initialized to sequence"
] | [
"Retrieve any resource field aliases defined in the MPP file.\n\n@param map index to field map\n@param data resource field name alias data",
"Read configuration from zookeeper",
"Returns an array of the names of all atributes of this descriptor.\n\n@return The list of attribute names (will not be <code>null</co... |
private void checkInitializationMethod(ClassDescriptorDef classDef, String checkLevel) throws ConstraintException
{
if (!CHECKLEVEL_STRICT.equals(checkLevel))
{
return;
}
String initMethodName = classDef.getProperty(PropertyHelper.OJB_PROPERTY_INITIALIZATI... | [
"Checks the initialization-method of given class descriptor.\n\n@param classDef The class descriptor\n@param checkLevel The current check level (this constraint is only checked in strict)\n@exception ConstraintException If the constraint has been violated"
] | [
"Determines how many primary partitions each node within each zone should\nhave. The list of integers returned per zone is the same length as the\nnumber of nodes in that zone.\n\n@param nextCandidateCluster\n@param targetPartitionsPerZone\n@return A map of zoneId to list of target number of partitions per node\nwi... |
public Map<String, String> readPropertiesFromActiveProfiles( final String prefix,
final String... properties ) {
if (settings == null) {
console.debug("No maven setting injected");
return Collections.emptyMap();
}
... | [
"Read properties from the active profiles.\n\nGoes through all active profiles (in the order the\nprofiles are defined in settings.xml) and extracts\nthe desired properties (if present). The prefix is\nused when looking up properties in the profile but\nnot in the returned map.\n\n@param prefix The prefix to use or... | [
"Returns all ApplicationProjectModels.",
"Simple context menu handler for multi-select tables.\n\n@param table the table\n@param menu the table's context menu\n@param event the click event\n@param entries the context menu entries",
"Load the layers based on the default setup.\n\n@param jbossHome the jboss h... |
@SuppressWarnings("unchecked") private boolean isFieldPopulated(Task task, TaskField field)
{
boolean result = false;
if (field != null)
{
Object value = task.getCachedValue(field);
switch (field)
{
case PREDECESSORS:
case SUCCESSORS:
{... | [
"Determine if a task field contains data.\n\n@param task task instance\n@param field target field\n@return true if the field contains data"
] | [
"Find the style filter that must be applied to this feature.\n\n@param feature\nfeature to find the style for\n@param styles\nstyle filters to select from\n@return a style filter",
"Determine which field the Activity ID has been mapped to.\n\n@param map field map\n@return field",
"Generate Allure report data fr... |
static <T, ID> Dao<T, ID> createDao(ConnectionSource connectionSource, Class<T> clazz) throws SQLException {
return new BaseDaoImpl<T, ID>(connectionSource, clazz) {
};
} | [
"Helper method to create a Dao object without having to define a class. Dao classes are supposed to be convenient\nbut if you have a lot of classes, they can seem to be a pain.\n\n<p>\n<b>NOTE:</b> You should use {@link DaoManager#createDao(ConnectionSource, DatabaseTableConfig)} instead of this\nmethod so you won'... | [
"If converters are set on a table, this function tests if these can convert a cell value. The first\nconverter, which claims that it can convert, will be used to do the conversion.",
"Return a set of all DeclarationBinder matching the DeclarationBinderFilter of the Linker.\n\n@return a Set of all DeclarationBinde... |
public ItemDocumentBuilder withSiteLink(String title, String siteKey,
ItemIdValue... badges) {
withSiteLink(factory.getSiteLink(title, siteKey, Arrays.asList(badges)));
return this;
} | [
"Adds an additional site link to the constructed document.\n\n@param title\nthe title of the linked page\n@param siteKey\nidentifier of the site, e.g., \"enwiki\"\n@param badges\none or more badges"
] | [
"Returns the steps instances associated to CandidateSteps\n\n@param candidateSteps\nthe List of CandidateSteps\n@return The List of steps instances",
"Make a copy of this Area of Interest.",
"Returns the compact records for all sections in the specified project.\n\n@param project The project to get sections fr... |
public synchronized List<String> propertyListOf(Class<?> c) {
String cn = c.getName();
List<String> ls = repo.get(cn);
if (ls != null) {
return ls;
}
Set<Class<?>> circularReferenceDetector = new HashSet<>();
ls = propertyListOf(c, circularReferenceDetector, n... | [
"Returns the complete property list of a class\n@param c the class\n@return the property list of the class"
] | [
"Use this API to fetch all the dnstxtrec resources that are configured on netscaler.",
"Dump the contents of a row from an MPD file.\n\n@param row row data",
"Adds a property to report design, this properties are mostly used by\nexporters to know if any specific configuration is needed\n\n@param name\n@param va... |
private static FieldType getPlaceholder(final Class<?> type, final int fieldID)
{
return new FieldType()
{
@Override public FieldTypeClass getFieldTypeClass()
{
return FieldTypeClass.UNKNOWN;
}
@Override public String name()
{
return "... | [
"Generate a placeholder for an unknown type.\n\n@param type expected type\n@param fieldID field ID\n@return placeholder"
] | [
"Determines the component type for a given array type.\n\n@param type the given array type\n@return the component type of a given array type",
"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 ... |
public static Chart getTrajectoryChart(String title, Trajectory t){
if(t.getDimension()==2){
double[] xData = new double[t.size()];
double[] yData = new double[t.size()];
for(int i = 0; i < t.size(); i++){
xData[i] = t.get(i).x;
yData[i] = t.get(i).y;
}
// Create Char... | [
"Plots the trajectory\n@param title Title of the plot\n@param t Trajectory to be plotted"
] | [
"Use this API to fetch all the nspbr6 resources that are configured on netscaler.",
"You should use the server's time here. Otherwise you might get unexpected results.\n\nThe typical use case is:\n\n\n<pre>\nHTTPResponse response = ....\nHTTPRequest request = createRequest();\nrequest = request.conditionals(new C... |
public void fireResourceWrittenEvent(Resource resource)
{
if (m_projectListeners != null)
{
for (ProjectListener listener : m_projectListeners)
{
listener.resourceWritten(resource);
}
}
} | [
"This method is called to alert project listeners to the fact that\na resource has been written to a project file.\n\n@param resource resource instance"
] | [
"Given a RendererViewHolder passed as argument and a position renders the view using the\nRenderer previously stored into the RendererViewHolder.\n\n@param viewHolder with a Renderer class inside.\n@param position to render.",
"Start a server.\n\n@return the http server\n@throws Exception the exception",
"Disab... |
public static void putUnsignedInt(ByteBuffer buffer, int index, long value) {
buffer.putInt(index, (int) (value & 0xffffffffL));
} | [
"Write the given long value as a 4 byte unsigned integer. Overflow is\nignored.\n\n@param buffer The buffer to write to\n@param index The position in the buffer at which to begin writing\n@param value The value to write"
] | [
"Given a DocumentVersionInfo, returns a BSON document representing the next version. This means\nand incremented version count for a non-empty version, or a fresh version document for an\nempty version.\n@return a BsonDocument representing a synchronization version",
"This intro hides the system bars.",
"Gets t... |
public static Set<String> listAllLinks(OperationContext context, String overlay) {
Set<String> serverGoupNames = listServerGroupsReferencingOverlay(context.readResourceFromRoot(PathAddress.EMPTY_ADDRESS), overlay);
Set<String> links = new HashSet<>();
for (String serverGoupName : serverGoupNames... | [
"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."
] | [
"Returns iterable with all non-deleted file version legal holds for this legal hold 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 file version legal holds info.",
"Add the collection of elements to this col... |
void setRightChild(final byte b, @NotNull final MutableNode child) {
final ChildReference right = children.getRight();
if (right == null || (right.firstByte & 0xff) != (b & 0xff)) {
throw new IllegalArgumentException();
}
children.setAt(children.size() - 1, new ChildReference... | [
"Sets in-place the right child with the same first byte.\n\n@param b next byte of child suffix.\n@param child child node."
] | [
"Read in the configuration properties.",
"Use this API to fetch all the spilloverpolicy resources that are configured on netscaler.",
"Set the horizontal and vertical alignment for the image when image gets cropped by resizing.\n\n@param valign Vertical alignment.\n@param halign Horizontal alignment.\n@throws I... |
public Metadata updateMetadata(Metadata metadata) {
String scope;
if (metadata.getScope().equals(Metadata.GLOBAL_METADATA_SCOPE)) {
scope = Metadata.GLOBAL_METADATA_SCOPE;
} else {
scope = Metadata.ENTERPRISE_METADATA_SCOPE;
}
URL url = METADATA_URL_TEMPL... | [
"Updates the file metadata.\n\n@param metadata the new metadata values.\n@return the metadata returned from the server."
] | [
"Make log segment file name from offset bytes. All this does is pad out the offset number\nwith zeros so that ls sorts the files numerically\n@param offset offset value (padding with zero)\n@return filename with offset",
"Searches for a declared method with a given name. If the class declares multiple methods wit... |
public static String extractFromResourceId(String id, String identifier) {
if (id == null || identifier == null) {
return id;
}
Pattern pattern = Pattern.compile(identifier + "/[-\\w._]+");
Matcher matcher = pattern.matcher(id);
if (matcher.find()) {
retur... | [
"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"
] | [
"Creates a window visually showing the matrix's state. Block means an element is zero.\nRed positive and blue negative. More intense the color larger the element's absolute value\nis.\n\n@param A A matrix.\n@param title Name of the window.",
"Use this API to add ipset.",
"1-D Forward Discrete Cosine Transform... |
static <K, V> PageMetadata<K, V> mergeTokenAndQueryParameters(String paginationToken, final
ViewQueryParameters<K, V> initialParameters) {
// Decode the base64 token into JSON
String json = new String(Base64.decodeBase64(paginationToken), Charset.forName("UTF-8"));
// Get a suitable Gson, ... | [
"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 va... | [
"Remove a connection from all keys.\n\n@param connection\nthe connection",
"Produces a string identifying this half-edge by the point index values of\nits tail and head vertices.\n\n@return identifying string",
"Will spawn a thread for each type in rootEntities, they will all re-join\non endAllSignal when finis... |
private String filterTag(String tag) {
AttributeValues answerAV = TagSet.getTagSet().fromTag(tag);
answerAV.removeNonlexicalAttributes();
return TagSet.getTagSet().toTag(answerAV);
} | [
"LV morphology helper functions"
] | [
"Processes the template for all indices of the current table.\n\n@param template The template\n@param attributes The attributes of the tag\n@exception XDocletException if an error occurs\n@doc.tag type=\"block\"\n@doc.param name=\"unique\" optional=\"tr... |
private static String convertISO88591toUTF8(String value) {
try {
return new String(value.getBytes(CharEncoding.ISO_8859_1), CharEncoding.UTF_8);
}
catch (UnsupportedEncodingException ex) {
// ignore and fallback to original encoding
return value;
}
} | [
"Converts a string from ISO-8559-1 encoding to UTF-8.\n@param value ISO-8559-1 value\n@return UTF-8 value"
] | [
"Retrieves the column title for the given locale.\n\n@param locale required locale for the default column title\n@return column title",
"Get a writer implementation to push data into Canvas while being able to control the behavior of blank values.\nIf the serializeNulls parameter is set to true, this writer will ... |
public static final String printTaskUID(Integer value)
{
ProjectFile file = PARENT_FILE.get();
if (file != null)
{
file.getEventManager().fireTaskWrittenEvent(file.getTaskByUniqueID(value));
}
return (value.toString());
} | [
"Print a task UID.\n\n@param value task UID\n@return task UID string"
] | [
"Creates a polling state.\n\n@param response the response from Retrofit REST call that initiate the long running operation.\n@param lroOptions long running operation options.\n@param defaultRetryTimeout the long running operation retry timeout.\n@param resourceType the type of the resource the long running operatio... |
@Deprecated
public Location resolvePlaceId(String placeId) throws FlickrException {
Map<String, Object> parameters = new HashMap<String, Object>();
parameters.put("method", METHOD_RESOLVE_PLACE_ID);
parameters.put("place_id", placeId);
Response response = transportAPI.get(tr... | [
"Find Flickr Places information by Place ID.\n\n@deprecated This method has been deprecated. It won't be removed but you should use {@link #getInfo(String, String)} instead.\n@param placeId\n@return A Location\n@throws FlickrException"
] | [
"Converts the bytes that make up an internet address into the corresponding integer value to make\nit easier to perform bit-masking operations on them.\n\n@param address an address whose integer equivalent is desired\n\n@return the integer corresponding to that address",
"Waits the given amount of time in seconds... |
public static void setFieldValue(Object object, String fieldName, Object value) {
try {
getDeclaredFieldInHierarchy(object.getClass(), fieldName).set(object, value);
} catch (IllegalArgumentException e) {
throw new RuntimeException(e);
} catch (IllegalAccessException e) {... | [
"Convenience method for setting the value of a private object field,\nwithout the stress of checked exceptions in the reflection API.\n\n@param object\nObject containing the field.\n@param fieldName\nName of the field to set.\n@param value\nValue to which to set the field."
] | [
"Returns the nested object definition with the specified name.\n\n@param name The name of the attribute of the nested object\n@return The nested object definition or <code>null</code> if there is no such nested object",
"Recursively sort the supplied child tasks.\n\n@param container child tasks",
"Generate a ca... |
private void updateRemoveR() {
for( int i = 1; i < n+1; i++ ) {
for( int j = 0; j < n; j++ ) {
double sum = 0;
for( int k = i-1; k <= j; k++ ) {
sum += U_tran.data[i*m+k] * R.data[k*n+j];
}
R.data[(i-1)*n+j] = sum;
... | [
"Updates the R matrix to take in account the removed row."
] | [
"Appends a String to the string representation of this number.\n\n@param value a Number\n@param right a String\n@return a String\n@since 1.0",
"Curries a function that takes one argument.\n\n@param function\nthe original function. May not be <code>null</code>.\n@param argument\nthe fixed argument.\n@return a func... |
public <T extends Widget & Checkable> boolean addOnCheckChangedListener
(OnCheckChangedListener listener) {
final boolean added;
synchronized (mListeners) {
added = mListeners.add(listener);
}
if (added) {
List<T> c = getCheckableChildren();
... | [
"Add a listener to be invoked when the checked button changes in this group.\n@param listener\n@param <T>\n@return"
] | [
"Loads the properties file using the classloader provided. Creating a string from the properties\n\"user.agent.name\" and \"user.agent.version\".\n@param loader The class loader to use to load the resource.\n@param filename The name of the file to load.\n@return A string that represents the first part of the UA str... |
public File getStylesheetPath()
{
String path = System.getProperty(STYLESHEET_KEY);
return path == null ? null : new File(path);
} | [
"If a custom CSS file has been specified, returns the path. Otherwise\nreturns null.\n@return A {@link File} pointing to the stylesheet, or null if no stylesheet\nis specified."
] | [
"Computes the tree edit distance between trees t1 and t2.\n\n@param t1\n@param t2\n@return tree edit distance between trees t1 and t2",
"Inserts a Serializable value into the mapping of the underlying Bundle, replacing any existing\nvalue for the given key. Either key or value may be null.\n\n@param key a String,... |
synchronized long storeUserProfile(String id, JSONObject obj) {
if (id == null) return DB_UPDATE_ERROR;
if (!this.belowMemThreshold()) {
getConfigLogger().verbose("There is not enough space left on the device to store data, data discarded");
return DB_OUT_OF_MEMORY_ERROR;
... | [
"Adds a JSON string representing to the DB.\n\n@param obj the JSON to record\n@return the number of rows in the table, or DB_OUT_OF_MEMORY_ERROR/DB_UPDATE_ERROR"
] | [
"URL-Decodes a given string using UTF-8. No UnsupportedEncodingException to handle as it is dealt with in this\nmethod.",
"Returns the simple name of the builder class that should be generated for the given type.\n\n<p>This is simply the {@link #BUILDER_SIMPLE_NAME_TEMPLATE} with the original type name\nsubstitut... |
public void setSeed(String randomSeed) {
if (!Strings.isNullOrEmpty(getProject().getUserProperty(SYSPROP_RANDOM_SEED()))) {
String userProperty = getProject().getUserProperty(SYSPROP_RANDOM_SEED());
if (!userProperty.equals(randomSeed)) {
log("Ignoring seed attribute because it is overridden by ... | [
"Initial random seed used for shuffling test suites and other sources\nof pseudo-randomness. If not set, any random value is set.\n\n<p>The seed's format is compatible with {@link RandomizedRunner} so that\nseed can be fixed for suites and methods alike."
] | [
"Create a Map composed of the entries of the first map minus the\nentries of the given map.\n\n@param self a map object\n@param removeMe the entries to remove from the map\n@return the resulting map\n@since 1.7.4",
"Return an artifact regarding its gavc\n\n@param gavc String\n@return DbArtifact",
"Gets the ... |
public void shutdown() {
final Connection connection;
synchronized (this) {
if(shutdown) return;
shutdown = true;
connection = this.connection;
if(connectTask != null) {
connectTask.shutdown();
}
}
if (connection... | [
"Shutdown the connection manager."
] | [
"Associate the specified value with the specified key in this map.\nIf the map previously contained a mapping for this key, the old\nvalue is replaced and returned.\n\n@param key the key with which the value is to be associated\n@param value the value to be associated with this key\n@return the value previously m... |
private int getPositiveInteger(String number) {
try {
return Math.max(0, Integer.parseInt(number));
} catch (NumberFormatException e) {
return 0;
}
} | [
"Gets the positive integer.\n\n@param number the number\n@return the positive integer"
] | [
"Returns a list of resource wrappers created from the input list of resources.\n\n@param cms the current OpenCms user context\n@param list the list to create the resource wrapper list from\n\n@return the list of wrapped resources.",
"Replaces an existing metadata value.\n@param path the path that designates the k... |
private List<Long> collectLongMetric(String metricGetterName) {
List<Long> vals = new ArrayList<Long>();
for(BdbEnvironmentStats envStats: environmentStatsTracked) {
vals.add((Long) ReflectUtils.callMethod(envStats,
BdbEnvironmentStats.clas... | [
"Calls the provided metric getter on all the tracked environments and\nobtains their values\n\n@param metricGetterName\n@return"
] | [
"Gets JmsDestinationType from java class name\n\nReturns null for unrecognized class",
"Renders in LI tags, Wraps with UL tags optionally.",
"Read a four byte integer from the data.\n\n@param offset current offset into data block\n@param data data block\n@return int value",
"This method takes the textual vers... |
public static void initialize(final Context context) {
if (!initialized.compareAndSet(false, true)) {
return;
}
applicationContext = context.getApplicationContext();
final String packageName = applicationContext.getPackageName();
localAppName = packageName;
final PackageManager manager ... | [
"Initializes the Stitch SDK so that app clients can be created.\n\n@param context An Android context value."
] | [
"Configure properties needed to connect to a Fluo application\n\n@param conf Job configuration\n@param config use {@link FluoConfiguration} to configure programmatically",
"Retrieves the text value for the baseline duration.\n\n@return baseline duration text",
"Makes a CRFDatum by producing features and a label... |
public AsciiTable setHtmlElementTranslator(HtmlElementTranslator htmlElementTranslator) {
for(AT_Row row : this.rows){
if(row.getType()==TableRowType.CONTENT){
row.setHtmlElementTranslator(htmlElementTranslator);
}
}
return this;
} | [
"Sets the HTML entity translator for all cells in the table.\nIt will also remove any other translator set.\nNothing will happen if the argument is null.\n@param htmlElementTranslator translator\n@return this to allow chaining"
] | [
"Allows the closure to be called for NullObject\n\n@param closure the closure to call on the object\n@return result of calling the closure",
"Searches for a sequence of integers\n\nexample:\n1 2 3 4 6 7 -3",
"Extracts the row from a matrix.\n@param a Input matrix\n@param row Which row is to be extracted\n@param... |
public static String fillLogParams(String sql, Map<Object, Object> logParams) {
StringBuilder result = new StringBuilder();
Map<Object, Object> tmpLogParam = (logParams == null ? new HashMap<Object, Object>() : logParams);
Iterator<Object> it = tmpLogParam.values().iterator();
boolean inQuote = false;
boolea... | [
"Returns sql statement used in this prepared statement together with the parameters.\n@param sql base sql statement\n@param logParams parameters to print out\n@return returns printable statement"
] | [
"Responsible for executing file rolls as and when required, in addition to\ndelegating to the super class to perform the actual append operation.\nSynchronized for safety during enforced file roll.\n\n@see org.apache.log4j.WriterAppender#subAppend(org.apache.log4j.spi.LoggingEvent)",
"Ensure that the node is not ... |
protected String createGlobalStyle()
{
StringBuilder ret = new StringBuilder();
ret.append(createFontFaces());
ret.append("\n");
ret.append(defaultStyle);
return ret.toString();
} | [
"Generate the global CSS style for the whole document.\n@return the CSS code used in the generated document header"
] | [
"Use this API to fetch appfwjsoncontenttype resources of given names .",
"Acquire a permit for a particular node id so as to allow rebalancing\n\n@param nodeId The id of the node for which we are acquiring a permit\n@return Returns true if permit acquired, false if the permit is already\nheld by someone",
"Read... |
protected void queryTimerEnd(String sql, long queryStartTime) {
if ((this.queryExecuteTimeLimit != 0)
&& (this.connectionHook != null)){
long timeElapsed = (System.nanoTime() - queryStartTime);
if (timeElapsed > this.queryExecuteTimeLimit){
this.connectionHook.onQueryExecuteTimeLimitExceeded(... | [
"Call the onQueryExecuteTimeLimitExceeded hook if necessary\n@param sql sql statement that took too long\n@param queryStartTime time when query was started."
] | [
"Returns the error correction codewords for the specified data codewords.\n\n@param codewords the codewords that we need error correction codewords for\n@param ecclen the number of error correction codewords needed\n@return the error correction codewords for the specified data codewords",
"Returns a query filter ... |
public MACAddressSection toEUI(boolean extended) {
MACAddressSegment[] segs = toEUISegments(extended);
if(segs == null) {
return null;
}
MACAddressCreator creator = getMACNetwork().getAddressCreator();
return createSectionInternal(creator, segs, Math.max(0, addressSegmentIndex - 4) << 1, extended);
} | [
"Returns the corresponding mac section, or null if this address section does not correspond to a mac section.\nIf this address section has a prefix length it is ignored.\n\n@param extended\n@return"
] | [
"Picks out a File from `thriftFiles` corresponding to a given artifact ID\nand file name. Returns null if `artifactId` and `fileName` do not map to a\nthrift file path.\n\n@parameter artifactId The artifact ID of which to look up the path\n@parameter fileName the name of the thrift file for which to extract a path\... |
public Map<Integer, RandomVariable> getGradient(){
int numberOfCalculationSteps = getFunctionList().size();
RandomVariable[] omegaHat = new RandomVariable[numberOfCalculationSteps];
omegaHat[numberOfCalculationSteps-1] = new RandomVariableFromDoubleArray(1.0);
for(int variableIndex = numberOfCalcula... | [
"Implements the AAD Algorithm\n@return HashMap where the key is the internal index of the random variable with respect to which the partial derivative was computed. This key then gives access to the actual derivative."
] | [
"Get maximum gray value in the image.\n\n@param fastBitmap Image to be processed.\n@param startX Initial X axis coordinate.\n@param startY Initial Y axis coordinate.\n@param width Width.\n@param height Height.\n@return Maximum gray.",
"Recursively write tasks.\n\n@param tasks list of tasks\n@thro... |
private static String makeAsciiTableCell(Object obj, int padLeft, int padRight, boolean tsv) {
String result = obj.toString();
if (padLeft > 0) {
result = padLeft(result, padLeft);
}
if (padRight > 0) {
result = pad(result, padRight);
}
if (tsv) {
result = result + '\t... | [
"The cell String is the string representation of the object.\nIf padLeft is greater than 0, it is padded. Ditto right"
] | [
"Use this API to unset the properties of nstimeout resource.\nProperties that need to be unset are specified in args array.",
"Read an optional boolean value form a JSON Object.\n@param json the JSON object to read from.\n@param key the key for the boolean value in the provided JSON object.\n@return the boolean o... |
public double getDouble(Integer id, Integer type)
{
double result = Double.longBitsToDouble(getLong(id, type));
if (Double.isNaN(result))
{
result = 0;
}
return result;
} | [
"This method retrieves a double of the specified type,\nbelonging to the item with the specified unique ID.\n\n@param id unique ID of entity to which this data belongs\n@param type data type identifier\n@return required double data"
] | [
"Starts the named animation.\n@see GVRAvatar#stop(String)\n@see GVRAnimationEngine#start(GVRAnimation)",
"Print a booking type.\n\n@param value BookingType instance\n@return booking type value",
"Use this API to add ntpserver.",
"Entry point for this example\nUses HDFS ToolRunner to wrap processing of\n\n@par... |
private synchronized void closeIdleClients() {
List<Client> candidates = new LinkedList<Client>(openClients.values());
logger.debug("Scanning for idle clients; " + candidates.size() + " candidates.");
for (Client client : candidates) {
if ((useCounts.get(client) < 1) &&
... | [
"Finds any clients which are not currently in use, and which have been idle for longer than the\nidle timeout, and closes them."
] | [
"Executes a given SPARQL query and returns a stream with the result in\nJSON format.\n\n@param query\n@return\n@throws IOException",
"Adds new holes to the polygon.\n\n@param holes holes, must be contained in the exterior ring and must not overlap or\nintersect another hole\n@return this for chaining",
"Registe... |
public DependencyReport getDependencyReport(final String moduleId, final FiltersHolder filters) {
final DbModule module = moduleHandler.getModule(moduleId);
final DbOrganization organization = moduleHandler.getOrganization(module);
filters.setCorporateFilter(new CorporateFilter(organization));
... | [
"Generate a report about the targeted module dependencies\n\n@param moduleId String\n@param filters FiltersHolder\n@return DependencyReport"
] | [
"Translate the operation address.\n\n@param op the operation\n@return the new operation",
"Retrieves the index of a cost rate table entry active on a given date.\n\n@param date target date\n@return cost rate table entry index",
"Creates a clone of the current automatonEng instance for\niteration alternative pur... |
public Set<DeviceAnnouncement> findUnreachablePlayers() {
ensureRunning();
Set<DeviceAnnouncement> result = new HashSet<DeviceAnnouncement>();
for (DeviceAnnouncement candidate: DeviceFinder.getInstance().getCurrentDevices()) {
if (!Util.sameNetwork(matchedAddress.getNetworkPrefixLen... | [
"Checks if we can see any players that are on a different network than the one we chose for the Virtual CDJ.\nIf so, we are not going to be able to communicate with them, and they should all be moved onto a single\nnetwork.\n\n@return the device announcements of any players which are on unreachable networks, or hop... | [
"Transform a TMS layer description object into a raster layer info object.\n\n@param tileMap\nThe TMS layer description object.\n@return The raster layer info object as used by Geomajas.",
"Convert string to qname.\n\n@param str the string\n@return the qname",
"Process the standard working hours for a given day... |
@Override
public V remove(Object key) {
if (fast) {
synchronized (this) {
Map<K, V> temp = cloneMap(map);
V result = temp.remove(key);
map = temp;
return (result);
}
} else {
synchronized (m... | [
"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"
] | [
"Open the given url in default system browser.",
"Flag that the processor has completed execution.\n\n@param processorGraphNode the node that has finished.",
"we can't call this method 'of', cause it won't compile on JDK7",
"Used to read the domain model when a slave host connects to the DC\n\n@param transfor... |
public void reset(int profileId, String clientUUID) throws Exception {
PreparedStatement statement = null;
// TODO: need a better way to do this than brute force.. but the iterative approach is too slow
try (Connection sqlConnection = sqlService.getConnection()) {
// first remove a... | [
"Resets all override settings for the clientUUID and disables it\n\n@param profileId profile ID of the client\n@param clientUUID UUID of the client\n@throws Exception exception"
] | [
"Utility method used to convert a Number into a BigInteger.\n\n@param value Number instance\n@return BigInteger instance",
"Return a list of contacts for a user who have recently uploaded photos along with the total count of photos uploaded.\n\n@param lastUpload\nLimits the resultset to contacts that have uploade... |
public static List<String> splitAsList(String text, String delimiter) {
List<String> answer = new ArrayList<String>();
if (text != null && text.length() > 0) {
answer.addAll(Arrays.asList(text.split(delimiter)));
}
return answer;
} | [
"splits a string into a list of strings, ignoring the empty string"
] | [
"Replaces all characters in the second parameter found in the first\nparameter with the final character.\n@param value the string to replace characters in\n@param chars the characters to replace\n@param replacement the character to insert as replacement",
"Returns list of files matches specified regex in specifie... |
public static TransactionalProtocolClient createClient(final ManagementChannelHandler channelAssociation) {
final TransactionalProtocolClientImpl client = new TransactionalProtocolClientImpl(channelAssociation);
channelAssociation.addHandlerFactory(client);
return client;
} | [
"Create a transactional protocol client.\n\n@param channelAssociation the channel handler\n@return the transactional protocol client"
] | [
"Create the required services according to the server setup\n\n@param config Service configuration\n@return Services map",
"Transforms a position according to the current transformation matrix and current page transformation.\n@param x\n@param y\n@return",
"Issue the database statements to drop the table associ... |
private void addAssignments(MpxjTreeNode parentNode, ProjectFile file)
{
for (ResourceAssignment assignment : file.getResourceAssignments())
{
final ResourceAssignment a = assignment;
MpxjTreeNode childNode = new MpxjTreeNode(a)
{
@Override public String toString()
... | [
"Add assignments to the tree.\n\n@param parentNode parent tree node\n@param file assignments container"
] | [
"Use this API to fetch vrid6 resource of given name .",
"Determines storage overhead and returns pretty printed summary.\n\n@param finalNodeToOverhead Map of node IDs from final cluster to number\nof partition-stores to be moved to the node.\n@return pretty printed string summary of storage overhead.",
"Deletes... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.