query stringlengths 74 6.1k | positive listlengths 1 1 | negative listlengths 9 9 |
|---|---|---|
public Channel sessionConnectGenerateChannel(Session session)
throws JSchException {
// set timeout
session.connect(sshMeta.getSshConnectionTimeoutMillis());
ChannelExec channel = (ChannelExec) session.openChannel("exec");
channel.setCommand(sshMeta.getCommandLine());
... | [
"Session connect generate channel.\n\n@param session\nthe session\n@return the channel\n@throws JSchException\nthe j sch exception"
] | [
"Process the scheduling project property from PROJPROP. This table only seems to exist\nin P6 databases, not XER files.\n\n@throws SQLException",
"Boyer Moore scan that proceeds backwards from the end of the file looking for ENDSIG\n@throws NonScannableZipException",
"Returns the Java executable command.\n\n@pa... |
public final void reset()
{
for (int i = 0; i < combinationIndices.length; i++)
{
combinationIndices[i] = i;
}
remainingCombinations = totalCombinations;
} | [
"Reset the combination generator."
] | [
"Join N sets.",
"Returns the plugins classpath elements.",
"a small helper to set the text color to a textView null save\n\n@param textView\n@param colorDefault",
"Get the context for the specified photo.\n\nThis method does not require authentication.\n\n@param photoId\nThe photo ID\n@return The PhotoContext... |
public String interpolate( String input, RecursionInterceptor recursionInterceptor )
throws InterpolationException
{
try
{
return interpolate( input, recursionInterceptor, new HashSet<String>() );
}
finally
{
if ( !cacheAnswers )
... | [
"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."
] | [
"2-D Forward Discrete Cosine Transform.\n\n@param data Data.",
"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.",
"Called on mouse down in the capti... |
public static final long getLong6(byte[] data, int offset)
{
long result = 0;
int i = offset;
for (int shiftBy = 0; shiftBy < 48; shiftBy += 8)
{
result |= ((long) (data[i] & 0xff)) << shiftBy;
++i;
}
return result;
} | [
"This method reads a six byte long 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"
] | [
"Adds a file to your assembly but automatically generates the field name of the file.\n\n@param file {@link File} the file to be uploaded.",
"Invoke the setters for the given variables on the given instance.\n@param <T> the instance type\n@param instance the instance to inject with the variables\n@param vars the ... |
public static void acceptsDir(OptionParser parser) {
parser.acceptsAll(Arrays.asList(OPT_D, OPT_DIR), "directory path for input/output")
.withRequiredArg()
.describedAs("dir-path")
.ofType(String.class);
} | [
"Adds OPT_D | OPT_DIR option to OptionParser, with one argument.\n\n@param parser OptionParser to be modified\n@param required Tells if this option is required or optional"
] | [
"This method is called to format a units value.\n\n@param value numeric value\n@return currency value",
"Apply the layout to the each page in the list\n@param itemLayout item layout in the page\n@return true if the new layout is applied successfully, otherwise - false",
"Get a File path list from configuration.... |
public Widget addControl(String name, int resId, Widget.OnTouchListener listener) {
return addControl(name, resId, null, listener, -1);
} | [
"Add new control at the end of control bar with specified touch listener and resource.\nSize of control bar is updated based on new number of controls.\n@param name name of the control to remove\n@param resId the control face\n@param listener touch listener"
] | [
"Adds a logical operator block.\n\n@param list parent criteria list\n@param block current block\n@param operator logical operator represented by this block",
"Obtains a Pax local date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the Pax local date-time... |
public void takeNoteOfGradient(IntDoubleVector gradient) {
gradient.iterate(new FnIntDoubleToVoid() {
@Override
public void call(int index, double value) {
gradSumSquares[index] += value * value;
assert !Double.isNaN(gradSumSquares[index]);
... | [
"A tie-in for subclasses such as AdaGrad."
] | [
"Use this API to apply nspbr6 resources.",
"Retrieves the value of the given accessible field of the given receiver.\n\n@param receiver the container of the field, not <code>null</code>\n@param fieldName the field's name, not <code>null</code>\n@return the value of the field\n\n@throws NoSuchFieldException see {@... |
public static void closeScope(Object name) {
//we remove the scope first, so that other threads don't see it, and see the next snapshot of the tree
ScopeNode scope = (ScopeNode) MAP_KEY_TO_SCOPE.remove(name);
if (scope != null) {
ScopeNode parentScope = scope.getParentScope();
if (parentScope !=... | [
"Detach a scope from its parent, this will trigger the garbage collection of this scope and it's\nsub-scopes\nif they are not referenced outside of Toothpick.\n\n@param name the name of the scope to close."
] | [
"Find the path.\n\n@param start key of first node in the path\n@param end key of last node in the path\n@return string containing the nodes keys in the path separated by arrow symbol",
"Goes through the token lists and adds all the variables which can be used to define a sub-matrix. If anything\nelse is found an... |
public static appfwwsdl get(nitro_service service, String name) throws Exception{
appfwwsdl obj = new appfwwsdl();
obj.set_name(name);
appfwwsdl response = (appfwwsdl) obj.get_resource(service);
return response;
} | [
"Use this API to fetch appfwwsdl resource of given name ."
] | [
"Get the sub registry for the domain.\n\n@param range the version range\n@return the sub registry",
"This method is called to format a time value.\n\n@param value time value\n@return formatted time value",
"Helper method to set a value in the internal header list.\n\n@param headers the headers to set the value ... |
public void setMaxConnectionAge(long maxConnectionAge, TimeUnit timeUnit) {
this.maxConnectionAgeInSeconds = TimeUnit.SECONDS.convert(maxConnectionAge, timeUnit);
} | [
"Sets the maxConnectionAge. Any connections older than this setting will be closed\noff whether it is idle or not. Connections currently in use will not be affected until they\nare returned to the pool.\n\n@param maxConnectionAge the maxConnectionAge to set.\n@param timeUnit the unit of the maxConnectionAge argumen... | [
"Gets the top of thread-local shell stack, or null if it is empty.\n\n@return the top of the shell stack",
"Enable the use of the given controller type by\nadding it to the cursor controller types list.\n@param controllerType GVRControllerType to add to the list",
"Read hints from a file and merge with the give... |
public void restoreSecurityContext(CacheContext context) {
SavedAuthorization cached = context.get(CacheContext.SECURITY_CONTEXT_KEY, SavedAuthorization.class);
if (cached != null) {
log.debug("Restoring security context {}", cached);
securityManager.restoreSecurityContext(cached);
} else {
securityManag... | [
"Puts the cached security context in the thread local.\n\n@param context the cache context"
] | [
"This utility displays a list of available task filters, and a\nlist of available resource filters.\n\n@param project project file",
"Sets the node meta data.\n\n@param key - the meta data key\n@param value - the meta data value\n@throws GroovyBugError if key is null or there is already meta\ndata under that key"... |
public static int countNonZero(DMatrixRMaj A){
int total = 0;
for (int row = 0, index=0; row < A.numRows; row++) {
for (int col = 0; col < A.numCols; col++,index++) {
if( A.data[index] != 0 ) {
total++;
}
}
}
ret... | [
"Counts the number of elements in A which are not zero.\n@param A A matrix\n@return number of non-zero elements"
] | [
"Post-configure retreival of server engine.",
"Determines the field name based on an accessor method name.\n\n@param methodName\nan accessor method name\n@return the resulting field name",
"Return a set of all the Declaration matching the DeclarationFilter of the.\nLinker.\n\n@return a set of all the Declaratio... |
public CollectionRequest<Section> findByProject(String project) {
String path = String.format("/projects/%s/sections", project);
return new CollectionRequest<Section>(this, Section.class, path, "GET");
} | [
"Returns the compact records for all sections in the specified project.\n\n@param project The project to get sections from.\n@return Request object"
] | [
"Set the amount of padding between child objects.\n@param axis {@link Axis}\n@param padding",
"Return the text box for the specified text and font.\n\n@param text text\n@param font font\n@return text box",
"Calculate the signature by which we can reliably recognize a loaded track.\n\n@param title the track titl... |
public String get(final long index) {
return doWithJedis(new JedisCallable<String>() {
@Override
public String call(Jedis jedis) {
return jedis.lindex(getKey(), index);
}
});
} | [
"Get the element value in the list by index\n@param index the position in the list from which to get the element\n@return the element value"
] | [
"Returns real unquoted value for a DisplayValue\n@param key\n@return",
"Returns an integer between interval\n@param min Minimum value\n@param max Maximum value\n@return int number",
"Make a copy.",
"Connect sync.\n\n@param configuration the protocol configuration\n@return the connection\n@throws IOException",... |
private void renderAsLI(Writer writer, ProjectModel project, Iterator<Link> links, boolean wrap) throws IOException
{
if (!links.hasNext())
return;
if (wrap)
writer.append("<ul>");
while (links.hasNext())
{
Link link = links.next();
wr... | [
"Renders in LI tags, Wraps with UL tags optionally."
] | [
"Create a random permutation of the numbers 0, ..., size - 1.\n\nsee Algorithm P, D.E. Knuth: The Art of Computer Programming, Vol. 2, p. 145",
"Build a compact representation of the ModelNode.\n@param node The model\n@return A single line containing the multi lines ModelNode.toString() content.",
"Create a Map... |
public void setQueryExecuteTimeLimit(long queryExecuteTimeLimit, TimeUnit timeUnit) {
this.queryExecuteTimeLimitInMs = TimeUnit.MILLISECONDS.convert(queryExecuteTimeLimit, timeUnit);
} | [
"Queries taking longer than this limit to execute are logged.\n@param queryExecuteTimeLimit the limit to set in milliseconds.\n@param timeUnit"
] | [
"resolves any lazy cross references in this resource, adding Issues for unresolvable elements to this resource.\nThis resource might still contain resolvable proxies after this method has been called.\n\n@param mon a {@link CancelIndicator} can be used to stop the resolution.",
"Compress contiguous partitions int... |
public static String detokenize(List<String> tokens) {
return TwitterKoreanProcessor.detokenize(JavaConversions.iterableAsScalaIterable(tokens));
} | [
"Detokenize the input list of words.\n\n@param tokens List of words.\n@return Detokenized string."
] | [
"Get a property as a json object or null.\n\n@param key the property name",
"Throws an IllegalStateException when the given value is not null.\n@return the value",
"Use this API to fetch appfwhtmlerrorpage resource of given name .",
"Add a property.",
"Adds a value to the list if does not already exists.\n\... |
public ConfigBuilder withHost(final String host) {
if (host == null || "".equals(host)) {
throw new IllegalArgumentException("host must not be null or empty: " + host);
}
this.host = host;
return this;
} | [
"Configs created by this ConfigBuilder will have the given Redis hostname.\n\n@param host the Redis hostname\n@return this ConfigBuilder"
] | [
"Set the color at \"index\" to \"color\". Entries are interpolated linearly from\nthe existing entries at \"firstIndex\" and \"lastIndex\" to the new entry.\nfirstIndex < index < lastIndex must hold.\n@param index the position to set\n@param firstIndex the position of the first color from which to interpolate\n@par... |
public BufferedImage getNewImageInstance() {
BufferedImage buf = new BufferedImage(image.getWidth(), image.getHeight(), image.getType());
buf.setData(image.getData());
return buf;
} | [
"Return a new instance of the BufferedImage\n\n@return BufferedImage"
] | [
"Return key Values of an Identity\n@param cld\n@param oid\n@param convertToSql\n@return Object[]\n@throws PersistenceBrokerException",
"Convert this buffer to a java array.\n@return",
"create a path structure representing the object graph",
"Carry out any post-processing required to tidy up\nthe data read fro... |
private void setTempoMaster(DeviceUpdate newMaster) {
DeviceUpdate oldMaster = tempoMaster.getAndSet(newMaster);
if ((newMaster == null && oldMaster != null) ||
(newMaster != null && ((oldMaster == null) || !newMaster.getAddress().equals(oldMaster.getAddress())))) {
// This i... | [
"Establish a new tempo master, and if it is a change from the existing one, report it to the listeners.\n\n@param newMaster the packet which caused the change of masters, or {@code null} if there is now no master."
] | [
"Adds a class to the unit.",
"Find the path.\n\n@param start key of first node in the path\n@param end key of last node in the path\n@return string containing the nodes keys in the path separated by arrow symbol",
"Allows this closeable to be used within the closure, ensuring that it\nis closed once the closure... |
private void digestInteger(MessageDigest digest, int value) {
byte[] valueBytes = new byte[4];
Util.numberToBytes(value, valueBytes, 0, 4);
digest.update(valueBytes);
} | [
"Helper method to add a Java integer value to a message digest.\n\n@param digest the message digest being built\n@param value the integer whose bytes should be included in the digest"
] | [
"Computes execution time\n@param extra",
"Write a comma to the output stream if required.",
"Formats a resource type.\n\n@param resource MPXJ resource\n@return Primavera resource type",
"Use this API to update inat.",
"Reads characters until the 'end' character is encountered.\n\n@param out\nThe StringBuild... |
public static LBuffer loadFrom(File file) throws IOException {
FileChannel fin = new FileInputStream(file).getChannel();
long fileSize = fin.size();
if (fileSize > Integer.MAX_VALUE)
throw new IllegalArgumentException("Cannot load from file more than 2GB: " + file);
LBuffer b... | [
"Create an LBuffer from a given file.\n@param file\n@return\n@throws IOException"
] | [
"Marks the given list of statements for deletion. It is verified that the\ncurrent document actually contains the statements before doing so. This\ncheck is based on exact statement equality, including qualifier order and\nstatement id.\n\n@param currentDocument\nthe document with the current statements\n@param del... |
public boolean mapsCell(String cell) {
return mappers.values().stream().anyMatch(mapper -> mapper.mapsCell(cell));
} | [
"Returns if this has any mapping for the specified cell.\n\n@param cell the cell name\n@return {@code true} if there is any mapping for the cell, {@code false} otherwise"
] | [
"Launch Sample Activity residing in the same module",
"Returns the adapter position of the Parent associated with this ChildViewHolder\n\n@return The adapter position of the Parent if it still exists in the adapter.\nRecyclerView.NO_POSITION if item has been removed from the adapter,\nRecyclerView.Adapter.notifyD... |
public double getDegrees() {
double kms = getValue(GeoDistanceUnit.KILOMETRES);
return DistanceUtils.dist2Degrees(kms, DistanceUtils.EARTH_MEAN_RADIUS_KM);
} | [
"Return the numeric distance value in degrees.\n\n@return the degrees"
] | [
"This method is called to format a date. It will return the null text\nif a null value is supplied.\n\n@param value date value\n@return formatted date value",
"Starts all streams.",
"Remove the sequence for given sequence name.\n\n@param sequenceName Name of the sequence to remove.",
"Sets the target translat... |
private Iterable<PersistentNoSqlIdentifierGenerator> getPersistentGenerators() {
Map<String, EntityPersister> entityPersisters = factory.getMetamodel().entityPersisters();
Set<PersistentNoSqlIdentifierGenerator> persistentGenerators = new HashSet<PersistentNoSqlIdentifierGenerator>( entityPersisters.size() );
fo... | [
"Returns all the persistent id generators which potentially require the creation of an object in the schema."
] | [
"Reverses all the TransitionControllers managed by this TransitionManager",
"Create the work pattern assignment map.\n\n@param rows calendar rows\n@return work pattern assignment map",
"Use this API to fetch all the responderhtmlpage resources that are configured on netscaler.",
"Handle bind service event.\n@... |
public void update(int number) {
byte[] numberInBytes = new byte[ByteUtils.SIZE_OF_INT];
ByteUtils.writeInt(numberInBytes, number, 0);
update(numberInBytes);
} | [
"Update the underlying buffer using the integer\n\n@param number number to be stored in checksum buffer"
] | [
"Sets the HTTP poller processor to handle Async API.\nWill auto enable the pollable mode with this call\n\n@param httpPollerProcessor\nthe http poller processor\n@return the parallel task builder",
"Read all configuration files.\n@return the list with all available configurations",
"Returns a compact representa... |
public void setValue(float value) {
mBarPointerPosition = Math.round((mSVToPosFactor * (1 - value))
+ mBarPointerHaloRadius + (mBarLength / 2));
calculateColor(mBarPointerPosition);
mBarPointerPaint.setColor(mColor);
// Check whether the Saturation/Value bar is added to the ColorPicker
// wheel
if (mPic... | [
"Set the pointer on the bar. With the Value value.\n\n@param value float between 0 and 1"
] | [
"Export the modules that should be checked in into git.",
"Constructs a new FastEvent instance\n@param type the event type\n@param manager the bean manager\n@param notifier the notifier to be used for observer method resolution\n@param qualifiers the event qualifiers\n@return",
"Returns the version of Jenkins A... |
private CmsSpellcheckingRequest parseHttpRequest(final ServletRequest req, final CmsObject cms) {
if ((null != cms) && OpenCms.getRoleManager().hasRole(cms, CmsRole.ROOT_ADMIN)) {
try {
if (null != req.getParameter(HTTP_PARAMETER_CHECKREBUILD)) {
if (CmsSpellchec... | [
"Parse parameters from this request using HTTP.\n\n@param req The ServletRequest containing all request parameters.\n@param cms The OpenCms object.\n@return CmsSpellcheckingRequest object that contains parsed parameters."
] | [
"Writes all data that was collected about properties to a json file.",
"Returns the y-coordinate of a vertex normal.\n\n@param vertex the vertex index\n@return the y coordinate",
"Returns formatted version of Iban.\n\n@return A string representing formatted Iban for printing.",
"Process a text-based PP file.\... |
public BsonDocument toUpdateDocument() {
final List<BsonElement> unsets = new ArrayList<>();
for (final String removedField : this.removedFields) {
unsets.add(new BsonElement(removedField, new BsonBoolean(true)));
}
final BsonDocument updateDocument = new BsonDocument();
if (this.updatedField... | [
"Convert this update description to an update document.\n\n@return an update document with the appropriate $set and $unset documents."
] | [
"Use this API to unset the properties of nstimeout resource.\nProperties that need to be unset are specified in args array.",
"Performs a transpose across block sub-matrices. Reduces\nthe number of cache misses on larger matrices.\n\n*NOTE* If this is beneficial is highly dependent on the computer it is run on. ... |
private List<DumpProcessingAction> handleArguments(String[] args) {
CommandLine cmd;
CommandLineParser parser = new GnuParser();
try {
cmd = parser.parse(options, args);
} catch (ParseException e) {
logger.error("Failed to parse arguments: " + e.getMessage());
return Collections.emptyList();
}
//... | [
"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}"
] | [
"Main render algorithm based on render the video thumbnail, render the title, render the marker\nand the label.",
"Reads a single record from the table.\n\n@param buffer record data\n@param table parent table",
"Performs a transpose across block sub-matrices. Reduces\nthe number of cache misses on larger matri... |
public static BufferedImage cloneImage( BufferedImage image ) {
BufferedImage newImage = new BufferedImage( image.getWidth(), image.getHeight(), BufferedImage.TYPE_INT_ARGB );
Graphics2D g = newImage.createGraphics();
g.drawRenderedImage( image, null );
g.dispose();
return newImage;
} | [
"Clones a BufferedImage.\n@param image the image to clone\n@return the cloned image"
] | [
"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... |
public static Info rng( final Variable A , ManagerTempVariables manager) {
Info ret = new Info();
if( A instanceof VariableInteger ) {
ret.op = new Operation("rng") {
@Override
public void process() {
int seed = ((VariableInteger)A).value... | [
"Sets the seed for random number generator"
] | [
"Optimized version of the Wagner & Fischer algorithm that only\nkeeps a single column in the matrix in memory at a time. It\nimplements the simple cutoff, but otherwise computes the entire\nmatrix. It is roughly twice as fast as the original function.",
"Returns data tree structured as Transloadit expects it.\n\n... |
private static int getContainerPort(Service service, Annotation... qualifiers) {
for (Annotation q : qualifiers) {
if (q instanceof Port) {
Port port = (Port) q;
if (port.value() > 0) {
return port.value();
}
}
}... | [
"Find the the qualfied container port of the target service\nUses java annotations first or returns the container port.\n\n@param service\nThe target service.\n@param qualifiers\nThe set of qualifiers.\n\n@return Returns the resolved containerPort of '0' as a fallback."
] | [
"Use this API to delete cacheselector of given name.",
"Synchronize the scroll positions of the scrollbars with the actual scroll\nposition of the content.",
"Add all elements in the iterable to the collection.\n\n@param target\n@param iterable\n@return true if the target was modified, false otherwise",
"Crea... |
protected static BigInteger getRadixPower(BigInteger radix, int power) {
long key = (((long) radix.intValue()) << 32) | power;
BigInteger result = radixPowerMap.get(key);
if(result == null) {
if(power == 1) {
result = radix;
} else if((power & 1) == 0) {
BigInteger halfPower = getRadixPower(radix, p... | [
"Caches the results of radix to the given power.\n\n@param radix\n@param power\n@return"
] | [
"Make all elements of a String array lower case.\n@param strings string array, may contain null item but can't be null\n@return array containing all provided elements lower case",
"Use this API to fetch a vpnglobal_binding resource .",
"Update a feature object in the Hibernate session.\n\n@param feature feature... |
public void setBaselineStartText(int baselineNumber, String value)
{
set(selectField(TaskFieldLists.BASELINE_STARTS, baselineNumber), value);
} | [
"Sets the baseline start text value.\n\n@param baselineNumber baseline number\n@param value baseline start text value"
] | [
"Generates an artifact regarding the parameters.\n\n<P> <b>WARNING:</b> The parameters grId/arId/version should be filled!!! Only classifier and type are not mandatory.\n\n@param groupId String\n@param artifactId String\n@param version String\n@param classifier String\n@param type String\n@param extension String\n@... |
public static <E> Set<E> union(Set<E> s1, Set<E> s2) {
Set<E> s = new HashSet<E>();
s.addAll(s1);
s.addAll(s2);
return s;
} | [
"Returns the union of sets s1 and s2."
] | [
"Convert raw value as read from the MPP file into a Java type.\n\n@param type MPP value type\n@param value raw value data\n@return Java object",
"Set the query parameter values overriding all existing query values for\nthe same parameter. If no values are given, the query parameter is removed.\n@param name the qu... |
public ServerRedirect updateServerRedirectHost(int serverMappingId, String hostHeader) {
ServerRedirect redirect = new ServerRedirect();
BasicNameValuePair[] params = {
new BasicNameValuePair("hostHeader", hostHeader),
new BasicNameValuePair("profileIdentifier", this._profileName... | [
"Update server mapping's host header\n\n@param serverMappingId ID of server mapping\n@param hostHeader value of host header\n@return updated ServerRedirect"
] | [
"End building the script\n@param config the configuration for the script to build\n@return the new {@link LuaScript} instance",
"Provides a method that compares two comparables using Groovy's\ndefault number aware comparator.\n\n@param self a Comparable\n@param other another Comparable\n@return a -ve number, 0 or... |
@SuppressWarnings("unchecked")
public static <T extends Serializable> T makeClone(T from) {
return (T) SerializationUtils.clone(from);
} | [
"Creates a clone using java serialization\n\n@param from Object to be cloned\n@param <T> type of the cloned object\n@return Clone of the object"
] | [
"Function to delete the specified store from Metadata store. This involves\n\n1. Remove entry from the ConfigurationStorageEngine for STORES.\n\n2. Update the metadata cache.\n\n3. Re-create the 'stores.xml' key\n\n@param storeName specifies name of the store to be deleted.",
"Pretty prints a task list of rebalan... |
public boolean putAtomic(C instance, K key, V value, Map<K, V> snapshot) {
Assert.checkNotNullParam("key", key);
final Map<K, V> newMap;
final int oldSize = snapshot.size();
if (oldSize == 0) {
newMap = Collections.singletonMap(key, value);
} else if (oldSize == 1) {
... | [
"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 snapsh... | [
"Mbeans for SLOP_UPDATE",
"Returns the value of the sum of discounted cash flows of the bond where\nthe discounting is done with the given reference curve and an additional spread.\nThis method can be used for optimizer.\n\n@param evaluationTime The evaluation time as double. Cash flows prior and including this t... |
public double computeLikelihoodP() {
double ret = 1.0;
for( int i = 0; i < r.numRows; i++ ) {
double a = r.get(i,0);
ret *= Math.exp(-a*a/2.0);
}
return ret;
} | [
"Computes the likelihood of the random draw\n\n@return The likelihood."
] | [
"Inserts the specified array into the specified original array at the specified index.\n\n@param original the original array into which we want to insert another array\n@param index the index at which we want to insert the array\n@param inserted the array that we want to insert\n@return the combined array",
"Retu... |
public static void validateInterimFinalCluster(final Cluster interimCluster,
final Cluster finalCluster) {
validateClusterPartitionCounts(interimCluster, finalCluster);
validateClusterZonesSame(interimCluster, finalCluster);
validateClusterNodeC... | [
"Interim and final clusters ought to have same partition counts, same\nzones, and same node state. Partitions per node may of course differ.\n\n@param interimCluster\n@param finalCluster"
] | [
"Remove a notification message. Recursive until all pending removals have been completed.",
"Makes it possible to uniquify a collection of objects which are normally\nnon-hashable. Alternatively, it lets you define an alternate hash function\nfor them for limited-use hashing.",
"Parse a list of Photos from give... |
public CollectionRequest<ProjectMembership> findByProject(String project) {
String path = String.format("/projects/%s/project_memberships", project);
return new CollectionRequest<ProjectMembership>(this, ProjectMembership.class, path, "GET");
} | [
"Returns the compact project membership records for the project.\n\n@param project The project for which to fetch memberships.\n@return Request object"
] | [
"if |a11-a22| >> |a12+a21| there might be a better way. see pg371",
"Adds a chain of vertices to the end of this list.",
"Return a collection of Photo objects not in part of any sets.\n\nThis method requires authentication with 'read' permission.\n\n@param perPage\nThe per page\n@param page\nThe page\n@return ... |
public static BoxAPIConnection getTransactionConnection(String accessToken, String scope, String resource) {
BoxAPIConnection apiConnection = new BoxAPIConnection(accessToken);
URL url;
try {
url = new URL(apiConnection.getTokenURL());
} catch (MalformedURLException e) {
... | [
"Request a scoped transactional token for a particular resource.\n@param accessToken application access token.\n@param scope scope of transactional token.\n@param resource resource transactional token has access to.\n@return a BoxAPIConnection which can be used to perform transactional requests."
] | [
"Replace default values will null, allowing them to be ignored.\n\n@param value value to test\n@return filtered value",
"This method retrieves a byte array containing the data at the\ngiven offset in the block. If no data is found at the given offset\nthis method returns null.\n\n@param offset offset of required ... |
public ItemRequest<Story> delete(String story) {
String path = String.format("/stories/%s", story);
return new ItemRequest<Story>(this, Story.class, path, "DELETE");
} | [
"Deletes a story. A user can only delete stories they have created. Returns an empty data record.\n\n@param story Globally unique identifier for the story.\n@return Request object"
] | [
"Sets the bootstrap URLs used by the different Fat clients inside the\nCoordinator\n\n@param bootstrapUrls list of bootstrap URLs defining which cluster to\nconnect to\n@return modified CoordinatorConfig",
"Sets a header per-request\n\n@param key Header key\n@param value Header value\n@return The request itself... |
public static boolean isConstantVal(DMatrixRMaj mat , double val , double tol )
{
// see if the result is an identity matrix
int index = 0;
for( int i = 0; i < mat.numRows; i++ ) {
for( int j = 0; j < mat.numCols; j++ ) {
if( !(Math.abs(mat.get(index++)-val) <= to... | [
"Checks to see if every value in the matrix is the specified value.\n\n@param mat The matrix being tested. Not modified.\n@param val Checks to see if every element in the matrix has this value.\n@param tol True if all the elements are within this tolerance.\n@return true if the test passes."
] | [
"Moves a particular enum option to be either before or after another specified enum option in the custom field.\n\n@param customField Globally unique identifier for the custom field.\n@return Request object",
"Records the result of updating a server group.\n\n@param serverGroup the server group's name. Cannot be... |
public DbOrganization getMatchingOrganization(final DbModule dbModule) {
if(dbModule.getOrganization() != null
&& !dbModule.getOrganization().isEmpty()){
return getOrganization(dbModule.getOrganization());
}
for(final DbOrganization organization: repositoryHandler.ge... | [
"Returns an Organization that suits the Module or null if there is none\n\n@param dbModule DbModule\n@return DbOrganization"
] | [
"Given the key, figures out which partition on the local node hosts the key.\n\n@param key\n@return",
"Adds an item to the list box, specifying an initial value for the item.\n\n@param value the item's value, to be submitted if it is part of a\n{@link FormPanel}; cannot be <code>null</code>\n@param text the te... |
public static String readFlowId(Message message) {
String flowId = null;
Map<String, List<String>> headers = getOrCreateProtocolHeader(message);
List<String> flowIds = headers.get(FLOWID_HTTP_HEADER_NAME);
if (flowIds != null && flowIds.size() > 0) {
flowId = flowIds.get(0);
... | [
"Read flow id from message.\n\n@param message the message\n@return the FlowId as string"
] | [
"callers of doLogin should be serialized before calling in.",
"This method is called to format a duration.\n\n@param value duration value\n@return formatted duration value",
"Helper method to convert seed bytes into the long value required by the\nsuper class.",
"Gets the publisher of the specified type, if i... |
public static boolean xpathExists(Node document, String xpathExpression, Map<String, String> namespaceMapping) throws XPathException,
MarshallingException
{
Boolean result = (Boolean) executeXPath(document, xpathExpression, namespaceMapping, XPathConstants.BOOLEAN);
return result != ... | [
"Runs the given xpath and returns a boolean result."
] | [
"Use this API to fetch appfwwsdl resource of given name .",
"Get FieldDescriptor from Reference",
"Adds parameters contained in the annotation into the annotation type reference\n\n@param typeRef\n@param node",
"Clean up the environment object for the given storage engine",
"Shut down actor system force.",
... |
public static ProctorLoadResult verify(
@Nonnull final TestMatrixArtifact testMatrix,
final String matrixSource,
@Nonnull final Map<String, TestSpecification> requiredTests,
@Nonnull final FunctionMapper functionMapper,
final ProvidedContext providedContext,
... | [
"Does not mutate the TestMatrix.\nVerifies that the test matrix contains all the required tests and that\neach required test is valid.\n\n@param testMatrix the {@link TestMatrixArtifact} to be verified.\n@param matrixSource a {@link String} of the source of proctor artifact. For example a path of proctor ar... | [
"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",
"Use this API to delete dnsaaaarec resources of given names.",
"Returns the current revision.",
"Notify all WorkerListeners currently registered for the given WorkerEvent.\n@param event ... |
private void recordTime(Tracked op,
long timeNS,
long numEmptyResponses,
long valueSize,
long keySize,
long getAllAggregateRequests) {
counters.get(op).addRequest(timeNS,
... | [
"Method to service public recording APIs\n\n@param op Operation being tracked\n@param timeNS Duration of operation\n@param numEmptyResponses Number of empty responses being sent back,\ni.e.: requested keys for which there were no values (GET and GET_ALL only)\n@param valueSize Size in bytes of the value\n@param key... | [
"Return the coding scheme to IOB1 coding, regardless of what was used\ninternally. This is useful for scoring against CoNLL test output.\n\n@param tokens List of tokens in some NER encoding",
"Inspects the object and all superclasses for public, non-final, accessible methods and returns a\ncollection containing a... |
public boolean measureAll(List<Widget> measuredChildren) {
boolean changed = false;
for (int i = 0; i < mContainer.size(); ++i) {
if (!isChildMeasured(i)) {
Widget child = measureChild(i, false);
if (child != null) {
if (measuredChildren !... | [
"Measure all children from container if needed\n@param measuredChildren the list of measured children\nmeasuredChildren list can be passed as null if it's not needed to\ncreate the list of the measured items\n@return true if the layout was recalculated, otherwise - false"
] | [
"Determine if a job name and job type are valid.\n@param jobName the name of the job\n@param jobType the class of the job\n@throws IllegalArgumentException if the name or type are invalid",
"Calculate the child size along the axis and measure the offset inside the\nlayout container\n@param dataIndex of child in C... |
public Script updateName(int id, String name) throws Exception {
PreparedStatement statement = null;
try (Connection sqlConnection = SQLService.getInstance().getConnection()) {
statement = sqlConnection.prepareStatement(
"UPDATE " + Constants.DB_TABLE_SCRIPT +
... | [
"Update the name of a script\n\n@param id ID of script\n@param name new name\n@return updated script\n@throws Exception exception"
] | [
"Performs the conversion from standard XPath to xpath with parameterization support.",
"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.",
"get TypeSignature given the signature\n... |
public static SimpleFeatureType createGridFeatureType(
@Nonnull final MapfishMapContext mapContext,
@Nonnull final Class<? extends Geometry> geomClass) {
final SimpleFeatureTypeBuilder typeBuilder = new SimpleFeatureTypeBuilder();
CoordinateReferenceSystem projection = mapContext... | [
"Create the grid feature type.\n\n@param mapContext the map context containing the information about the map the grid will be\nadded to.\n@param geomClass the geometry type"
] | [
"Writes assignment baseline data.\n\n@param xml MSPDI assignment\n@param mpxj MPXJ assignment",
"Use this API to add authenticationradiusaction resources.",
"Generates a change event for a local deletion of a document in the given namespace referring\nto the given document _id.\n\n@param namespace the namespace... |
public static final GVRPickedObject[] pickObjects(GVRScene scene, float ox, float oy, float oz, float dx,
float dy, float dz) {
sFindObjectsLock.lock();
try {
final GVRPickedObject[] result = NativePicker.pickObjects(scene.getNative(), 0L... | [
"Casts a ray into the scene graph, and returns the objects it intersects.\n\nThe ray is defined by its origin {@code [ox, oy, oz]} and its direction\n{@code [dx, dy, dz]}.\n\n<p>\nThe ray origin may be [0, 0, 0] and the direction components should be\nnormalized from -1 to 1: Note that the y direction runs from -1 ... | [
"Sets an element in at the specified index.",
"Backup the current configuration as part of the patch history.\n\n@throws IOException for any error",
"Get an active operation.\n\n@param header the request header\n@return the active operation, {@code null} if if there is no registered operation",
"adds a value ... |
public Number getMinutesPerMonth()
{
return Integer.valueOf(NumberHelper.getInt(getMinutesPerDay()) * NumberHelper.getInt(getDaysPerMonth()));
} | [
"Retrieve the default number of minutes per month.\n\n@return minutes per month"
] | [
"For each node in specified zones, tries swapping some minimum number of\nrandom partitions per node with some minimum number of random partitions\nfrom other specified nodes. Chooses the best swap in each iteration.\nLarge values of the greedSwapMaxPartitions... arguments make this method\nequivalent to comparing ... |
public float getTangentY(int vertex) {
if (!hasTangentsAndBitangents()) {
throw new IllegalStateException("mesh has no bitangents");
}
checkVertexIndexBounds(vertex);
return m_tangents.getFloat((vertex * 3 + 1) * SIZEOF_FLOAT);
} | [
"Returns the y-coordinate of a vertex bitangent.\n\n@param vertex the vertex index\n@return the y coordinate"
] | [
"Removes the row with the specified key from this association.\n\n@param key the key of the association row to remove",
"True if deleted, false if not found.",
"Reads primary key information from current RS row and generates a\n\ncorresponding Identity, and returns a proxy from the Identity.\n\n@throws Persiste... |
public void appendImmediate(Object object, String indentation) {
for (int i = segments.size() - 1; i >= 0; i--) {
String segment = segments.get(i);
for (int j = 0; j < segment.length(); j++) {
if (!WhitespaceMatcher.isWhitespace(segment.charAt(j))) {
append(object, indentation, i + 1);
return;
... | [
"Add the string representation of the given object to this sequence immediately. That is, all the trailing\nwhitespace of this sequence will be ignored and the string is appended directly after the last segment that\ncontains something besides whitespace. The given indentation will be prepended to each line except ... | [
"Adds a port that serves the HTTP requests. If unspecified, cleartext HTTP on port 36462 is used.\n\n@param localAddress the TCP/IP load address to bind\n@param protocol {@link SessionProtocol#HTTP} or {@link SessionProtocol#HTTPS}",
"Checks if a parameter exists. If it exists, it is updated. If it doesn't, it is... |
@Override
public Map<String, Set<String>> cleanObsoleteContent() {
if(!readWrite) {
return Collections.emptyMap();
}
Map<String, Set<String>> cleanedContents = new HashMap<>(2);
cleanedContents.put(MARKED_CONTENT, new HashSet<>());
cleanedContents.put(DELETED_CONT... | [
"Clean obsolete contents from the content repository. It will first mark contents as obsolete then after some time\nif these contents are still obsolete they will be removed.\n\n@return a map containing the list of marked contents and the list of deleted contents."
] | [
"radi otsu da dobije spojena crna slova i ra\n\n@param input\n@return the processed image",
"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.",
"Formats a vertex using it's properties.... |
public static base_responses add(nitro_service client, dospolicy resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
dospolicy addresources[] = new dospolicy[resources.length];
for (int i=0;i<resources.length;i++){
addresources[i] = new dospolicy(... | [
"Use this API to add dospolicy resources."
] | [
"Merges a specialized archetype with its parent. Merge will be done in-place on the specialized parameter.\n\n@param flatParent Flat parent archetype\n@param specialized Specialized archetype",
"Iterates over all tags of current member and evaluates the template for each one.\n\n@param template The ... |
public static Timer getNamedTimer(String timerName, int todoFlags,
long threadId) {
Timer key = new Timer(timerName, todoFlags, threadId);
registeredTimers.putIfAbsent(key, key);
return registeredTimers.get(key);
} | [
"Get a timer of the given string name for the given 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\n@return timer"
] | [
"Sets the character 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 charTranslator translator\n@return this to allow chaining",
"Handle exceptions thrown by the storage. Exceptions specific to DELETE go\nhere. Pass other e... |
public BoxFile.Info uploadFile(FileUploadParams uploadParams) {
URL uploadURL = UPLOAD_FILE_URL.build(this.getAPI().getBaseUploadURL());
BoxMultipartRequest request = new BoxMultipartRequest(getAPI(), uploadURL);
JsonObject fieldJSON = new JsonObject();
JsonObject parentIdJSON = new Jso... | [
"Uploads a new file to this folder with custom upload parameters.\n\n@param uploadParams the custom upload parameters.\n@return the uploaded file's info."
] | [
"Handles a faulted task.\n\n@param faultedEntry the entry holding faulted task\n@param throwable the reason for fault\n@param context the context object shared across all the task entries in this group during execution\n\n@return an observable represents asynchronous operation in the next stage",
"Converts the ke... |
public static int findFirstNonAnnotationLine(ASTNode node, SourceCode sourceCode) {
if (node instanceof AnnotatedNode && !((AnnotatedNode) node).getAnnotations().isEmpty()) {
// HACK: Groovy line numbers are broken when annotations have a parameter :(
// so we must look at the lineN... | [
"gets the first non annotation line number of a node, taking into account annotations."
] | [
"Iterate and insert each of the elements of the Collection.\n\n@param objects\nThe objects to insert\n@param outIdentifier\nIdentifier to lookup the returned objects\n@param returnObject\nboolean to specify whether the inserted Collection is part of the ExecutionResults\n@param entryPoint\nOptional EntryPoint for t... |
private static File getUserDirectory(final String prefix, final String suffix, final File parent) {
final String dirname = formatDirName(prefix, suffix);
return new File(parent, dirname);
} | [
"Returns a File object whose path is the expected user directory.\nDoes not create or check for existence.\n@param prefix\n@param suffix\n@param parent\n@return"
] | [
"Creates a non-binary text media type with the given subtype and a specified encoding",
"Utility function that converts a list to a map.\n\n@param list The list in which even elements are keys and odd elements are\nvalues.\n@rturn The map container that maps even elements to odd elements, e.g.\n0->1, 2->3, etc.",... |
public static appfwprofile[] get(nitro_service service) throws Exception{
appfwprofile obj = new appfwprofile();
appfwprofile[] response = (appfwprofile[])obj.get_resources(service);
return response;
} | [
"Use this API to fetch all the appfwprofile resources that are configured on netscaler."
] | [
"Extract calendar data.",
"This handler will be triggered when there's no search result",
"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",
"Updates a metadata classification on the specified file.\n\n@param ... |
public static Attachment fromBinaryBytes( byte[] bytes, MediaType mediaType ) {
if( !mediaType.isBinary() ) {
throw new IllegalArgumentException( "MediaType must be binary" );
}
return new Attachment(BaseEncoding.base64().encode( bytes ), mediaType, null );
} | [
"Creates an attachment from a given array of bytes.\nThe bytes will be Base64 encoded.\n@throws java.lang.IllegalArgumentException if mediaType is not binary"
] | [
"Crop the image between two points.\n\n@param top Top bound.\n@param left Left bound.\n@param bottom Bottom bound.\n@param right Right bound.\n@throws IllegalArgumentException if {@code top} or {@code left} are less than zero or {@code\nbottom} or {@code right} are less than one or less than {@code top} or {@code l... |
public static cacheselector get(nitro_service service, String selectorname) throws Exception{
cacheselector obj = new cacheselector();
obj.set_selectorname(selectorname);
cacheselector response = (cacheselector) obj.get_resource(service);
return response;
} | [
"Use this API to fetch cacheselector resource of given name ."
] | [
"Returns flag whose value indicates if the string is null, empty or\nonly contains whitespace characters\n\n@param s a string\n@return true if the string is null, empty or only contains whitespace characters",
"Retrieves state and metrics information for all nodes in the cluster.\n\n@return list of nodes in the c... |
public static vpnsessionaction[] get(nitro_service service) throws Exception{
vpnsessionaction obj = new vpnsessionaction();
vpnsessionaction[] response = (vpnsessionaction[])obj.get_resources(service);
return response;
} | [
"Use this API to fetch all the vpnsessionaction resources that are configured on netscaler."
] | [
"Give an embedded association, creates all the nodes and relationships required to represent it.\nIt assumes that the entity node containing the association already exists in the db.\n\n@param executionEngine the {@link GraphDatabaseService} to run the query\n@param associationKey the {@link AssociationKey} identif... |
public static <K, V> Map<K, V> immutableMapView(Map<K, V> map) {
if (map instanceof ImmutableMap<?, ?>) {
return map;
}
return Collections.unmodifiableMap(map);
} | [
"Returns an immutable view of a given map."
] | [
"Retrieve timephased baseline work. Note that index 0 represents \"Baseline\",\nindex 1 represents \"Baseline1\" and so on.\n\n@param index baseline index\n@return timephased work, or null if no baseline is present",
"once animation is setup, start the animation record the beginning and\nending time for the anima... |
public RandomVariable[] getValues(double[] times) {
RandomVariable[] values = new RandomVariable[times.length];
for(int i=0; i<times.length; i++) {
values[i] = getValue(null, times[i]);
}
return values;
} | [
"Return a vector of values corresponding to a given vector of times.\n@param times A given vector of times.\n@return A vector of values corresponding to the given vector of times."
] | [
"Return a capitalized version of the specified property name.\n\n@param s\nThe property name",
"Generate a Jongo query regarding a set of parameters.\n\n@param params Map<queryKey, queryValue> of query parameters\n@return String",
"Load a list of entities using the information in the context\n\n@param session T... |
public void setStartTime(final Date date) {
if (!Objects.equals(m_model.getStart(), date)) {
removeExceptionsOnChange(new Command() {
public void execute() {
m_model.setStart(date);
setPatternDefaultValues(date);
... | [
"Set the start time.\n@param date the start time to set."
] | [
"Pad or trim so as to produce a string of exactly a certain length.\n\n@param str The String to be padded or truncated\n@param num The desired length",
"Gets an iterable of all the assignments of this task.\n@param fields the fields to retrieve.\n@return an iterable containing info about all the assignments."... |
private void validateQuery(Query query) throws IllegalArgumentException {
if (query.getKindCount() != 1) {
throw new IllegalArgumentException("Query must have exactly one kind.");
}
if (query.getOrderCount() != 0) {
throw new IllegalArgumentException("Query cannot have any sort orders.");
}
... | [
"Verifies that the given query can be properly scattered.\n\n@param query the query to verify\n@throws IllegalArgumentException if the query is invalid."
] | [
"Merges two lists of references, eliminating duplicates in the process.\n\n@param references1\n@param references2\n@return merged list",
"Sets a client option per-request\n\n@param key Option name\n@param value Option value\n@return The request itself",
"Adds and returns a document with a new version to the g... |
public static Command newInsert(Object object,
String outIdentifier) {
return getCommandFactoryProvider().newInsert( object,
outIdentifier );
} | [
"Inserts a new instance but references via the outIdentifier, which is returned as part of the ExecutionResults\n\n@param object\n@param outIdentifier\n@return"
] | [
"Adds a new leap second to these rules.\n\n@param mjDay the Modified Julian Day that the leap second occurs at the end of\n@param leapAdjustment the leap seconds to add/remove at the end of the day, either -1 or 1\n@throws IllegalArgumentException if the leap adjustment is invalid\n@throws IllegalArgumentExceptio... |
synchronized boolean markReadMessageForId(String messageId, String userId){
if(messageId == null || userId == null) return false;
final String tName = Table.INBOX_MESSAGES.getName();
try{
final SQLiteDatabase db = dbHelper.getWritableDatabase();
ContentValues cv = new Co... | [
"Marks inbox message as read for given messageId\n@param messageId String messageId\n@return boolean value depending on success of operation"
] | [
"Plots the MSD curve with the trajectory t and adds the fitted model for anomalous diffusion above.\n@param t\n@param lagMin Minimum timelag (e.g. 1,2,3..) lagMin*timelag = elapsed time in seconds\n@param lagMax lagMax Maximum timelag (e.g. 1,2,3..) lagMax*timelag = elapsed time in seconds\n@param timelag Elapsed t... |
public void removeFilter(String filterName)
{
Filter filter = getFilterByName(filterName);
if (filter != null)
{
if (filter.isTaskFilter())
{
m_taskFilters.remove(filter);
}
if (filter.isResourceFilter())
{
m_resourceFilters.remo... | [
"Removes a filter from this project file.\n\n@param filterName The name of the filter"
] | [
"Perform a post-boot scan to remove any deployments added during boot that failed to deploy properly.\nThis method isn't private solely to allow a unit test in the same package to call it.",
"Creates the publish button.\n\n@param updateListener the update listener\n@return the publish button",
"Returns the perm... |
public void generateTracedFile(final IFileSystemAccess2 fsa, final String path, final EObject rootTrace, final StringConcatenationClient code) {
final CompositeGeneratorNode node = this.trace(rootTrace, code);
this.generateTracedFile(fsa, path, node);
} | [
"Convenience extension, to generate traced code."
] | [
"Creates a real valued diagonal matrix of the specified type",
"Add a new download. The download will start automatically once the download manager is\nready to execute it and connectivity is available.\n\n@param request the parameters specifying this download\n@return an ID for the download, unique across the a... |
public void setValue(String constantValue)
{
this.fieldSource = SOURCE_VALUE;
this.fieldRefName = null;
this.returnedByProcedure = false;
this.constantValue = constantValue;
} | [
"Sets up this object to represent an argument that will be set to a\nconstant value.\n\n@param constantValue the constant value."
] | [
"check if MessageID exists in the message, if not, only generate new MessageID for outbound message.\n@param message",
"Use this API to fetch nstrafficdomain_binding resources of given names .",
"Returns an integer array that contains the default values for all the\ntexture parameters.\n\n@return an integer arr... |
public static CmsShell getTopShell() {
ArrayList<CmsShell> shells = SHELL_STACK.get();
if (shells.isEmpty()) {
return null;
}
return shells.get(shells.size() - 1);
} | [
"Gets the top of thread-local shell stack, or null if it is empty.\n\n@return the top of the shell stack"
] | [
"all objects in list1 that are not in list2\n\n@param <T>\n@param list1\nFirst collection\n@param list2\nSecond collection\n@return The collection difference list1 - list2",
"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 ... |
public static policydataset get(nitro_service service, String name) throws Exception{
policydataset obj = new policydataset();
obj.set_name(name);
policydataset response = (policydataset) obj.get_resource(service);
return response;
} | [
"Use this API to fetch policydataset resource of given name ."
] | [
"Convert custom info.\n\n@param customInfo the custom info map\n@return the custom info type",
"Use this API to fetch gslbservice resource of given name .",
"Set whether we should obtain color versions of waveforms and previews when they are available. This will only\naffect waveforms loaded after the setting h... |
public void setPatternScheme(final boolean isWeekDayBased) {
if (isWeekDayBased ^ (null != m_model.getWeekDay())) {
removeExceptionsOnChange(new Command() {
public void execute() {
if (isWeekDayBased) {
m_model.setWeekDay(getPatternDefau... | [
"Set the pattern scheme.\n@param isWeekDayBased flag, indicating if the week day based scheme should be set."
] | [
"Init the headers of the table regarding the filters\n\n@return String[]",
"handles when a member leaves and hazelcast partition data is lost. We want\nto find the Futures that are waiting on lost data and error them",
"Use this API to add dospolicy.",
"Sets the replace var map to single target from map.\n\n... |
public static HttpResponse getResponse(String urls, HttpRequest request,
HttpMethod method, int connectTimeoutMillis, int readTimeoutMillis) throws IOException {
OutputStream out = null;
InputStream content = null;
HttpResponse response = null;
... | [
"Get http response"
] | [
"Joins the given list into a single string.",
"Creates a converter function that converts value into primitive type.\n\n@return A converter function or {@code null} if the given type is not primitive type or boxed type",
"Print a constraint type.\n\n@param value ConstraintType instance\n@return constraint type ... |
public static int cudnnSoftmaxForward(
cudnnHandle handle,
int algo,
int mode,
Pointer alpha,
cudnnTensorDescriptor xDesc,
Pointer x,
Pointer beta,
cudnnTensorDescriptor yDesc,
Pointer y)
{
return checkResult(cudnnSoftmaxForward... | [
"Function to perform forward softmax"
] | [
"Gets type from super class's type parameter.",
"Trim the trailing spaces.\n\n@param line",
"get the type erasure signature",
"Provides a consistent ordering over lists. First compares by the first\nelement. If that element is equal, the next element is considered, and so\non.",
"Retrieve a single field val... |
public static List<Artifact> getAllArtifacts(final Module module){
final List<Artifact> artifacts = new ArrayList<Artifact>();
for(final Module subModule: module.getSubmodules()){
artifacts.addAll(getAllArtifacts(subModule));
}
artifacts.addAll(module.getArtifacts());
... | [
"Returns all the Artifacts of the module\n\n@param module Module\n@return List<Artifact>"
] | [
"Determine the raw type for the given generic parameter type.\n@param genericType the generic type to resolve\n@param typeVariableMap the TypeVariable Map to resolved against\n@return the resolved raw type",
"Generate a sql where-clause for the array of fields\n\n@param fields array containing all columns used in... |
@Override
public void putAll(Map<? extends K, ? extends V> in) {
if (fast) {
synchronized (this) {
Map<K, V> temp = cloneMap(map);
temp.putAll(in);
map = temp;
}
} else {
synchronized (map) {
... | [
"Copy all of the mappings from the specified map to this one, replacing\nany mappings with the same keys.\n\n@param in the map whose mappings are to be copied"
] | [
"Given the histogram of columns compute the col_idx for the matrix. nz_length is automatically set and\nnz_values will grow if needed.\n@param histogram histogram of column values in the sparse matrix. modified, see above.",
"Get the literal value for an expression.\n\n@param expression expression\n@return liter... |
public AccrueType getAccrueType(int field)
{
AccrueType result;
if ((field < m_fields.length) && (m_fields[field].length() != 0))
{
result = AccrueTypeUtility.getInstance(m_fields[field], m_locale);
}
else
{
result = null;
}
return (result);
} | [
"Accessor method to retrieve an accrue type instance.\n\n@param field the index number of the field to be retrieved\n@return the value of the required field"
] | [
"Set the named roles which may be defined.\n\n@param roles map with roles, keys are the values for {@link #rolesAttribute}, probably DN values\n@since 1.10.0",
"Gets a JSON string containing any pending changes to this object that can be sent back to the Box API.\n@return a JSON string containing the pending chan... |
public void growMaxColumns( int desiredColumns , boolean preserveValue ) {
if( col_idx.length < desiredColumns+1 ) {
int[] c = new int[ desiredColumns+1 ];
if( preserveValue )
System.arraycopy(col_idx,0,c,0,col_idx.length);
col_idx = c;
}
} | [
"Increases the maximum number of columns in the matrix.\n@param desiredColumns Desired number of columns.\n@param preserveValue If the array needs to be expanded should it copy the previous values?"
] | [
"Helper method to copy the contents of a stream to a file.\n@param outputDirectory The directory in which the new file is created.\n@param stream The stream to copy.\n@param targetFileName The file to write the stream contents to.\n@throws IOException If the stream cannot be copied.",
"Might not fill all of dst."... |
public static Iterable<BoxFileVersionRetention.Info> getRetentions(
final BoxAPIConnection api, QueryFilter filter, String ... fields) {
filter.addFields(fields);
return new BoxResourceIterable<BoxFileVersionRetention.Info>(api,
ALL_RETENTIONS_URL_TEMPLATE.buildWithQuery(api.... | [
"Retrieves all file version retentions matching given filters as an Iterable.\n@param api the API connection to be used by the resource.\n@param filter filters for the query stored in QueryFilter object.\n@param fields the fields to retrieve.\n@return an iterable contains information about all file version retentio... | [
"Get's the user's current upload limits, User object only contains user_id\n\n@return Media Limits",
"Internal method used to retrieve a byte array from one\nor more embedded data blocks. Consecutive data blocks may\nneed to be concatenated by this method in order to retrieve\nthe complete set of data.\n\n@param ... |
public String getInvalidMessage(String key) {
return invalidMessageOverride == null ? messageMixin.lookup(key, messageValueArgs) : MessageFormat.format(
invalidMessageOverride, messageValueArgs);
} | [
"Gets the invalid message.\n\n@param key the key\n@return the invalid message"
] | [
"Find the number of Strings matched to the given Matcher.\n\n@param matcher a Matcher\n@return int the number of Strings matched to the given matcher.\n@since 1.0",
"Clean wait task queue.",
"This function computes which reduce task to shuffle a record to.",
"Start a timer of the given string name for the cu... |
public List<com.groupon.odo.proxylib.models.Method> getMethodsNotInGroup(int groupId) throws Exception {
List<com.groupon.odo.proxylib.models.Method> allMethods = getAllMethods();
List<com.groupon.odo.proxylib.models.Method> methodsNotInGroup = new ArrayList<com.groupon.odo.proxylib.models.Method>();
... | [
"returns all methods not in the group\n\n@param groupId Id of group\n@return List of Methods for a group\n@throws Exception exception"
] | [
"Set the HomeAsUpIndicator that is visible when user navigate to a fragment child\n@param indicator the resource drawable to use as indicator",
"Deletes all of the Directories in root that match the FileFilter\n\n@param root\n@param filter",
"This should be called from a subclass constructor, if offset or lengt... |
private void executeResult() throws Exception {
result = createResult();
String timerKey = "executeResult: " + getResultCode();
try {
UtilTimerStack.push(timerKey);
if (result != null) {
result.execute(this);
} else if (resultCode != null && !Action.NONE.equals(resultCode)) {
throw new Configura... | [
"Uses getResult to get the final Result and executes it\n\n@throws ConfigurationException\nIf not result can be found with the returned code"
] | [
"Legacy conversion.\n@param map\n@return Properties",
"Parses an item IRI\n\n@param iri\nthe item IRI like http://www.wikidata.org/entity/Q42\n@throws IllegalArgumentException\nif the IRI is invalid or does not ends with an item id",
"Retrieve the date range at the specified index.\nThe index is zero based, and... |
public Number getPercentageWorkComplete()
{
Number pct = (Number) getCachedValue(AssignmentField.PERCENT_WORK_COMPLETE);
if (pct == null)
{
Duration actualWork = getActualWork();
Duration work = getWork();
if (actualWork != null && work != null && work.getDuration() != 0)... | [
"The % Work Complete field contains the current status of a task,\nexpressed as the percentage of the task's work that has been completed.\nYou can enter percent work complete, or you can have Microsoft Project\ncalculate it for you based on actual work on the task.\n\n@return percentage as float"
] | [
"Add the string representation of the given object to this sequence at the given index. The given indentation will\nbe prepended to each line except the first one if the object has a multi-line string representation.\n\n@param object\nthe to-be-appended object.\n@param indentation\nthe indentation string that shoul... |
public static authenticationvserver_authenticationlocalpolicy_binding[] get(nitro_service service, String name) throws Exception{
authenticationvserver_authenticationlocalpolicy_binding obj = new authenticationvserver_authenticationlocalpolicy_binding();
obj.set_name(name);
authenticationvserver_authenticationloc... | [
"Use this API to fetch authenticationvserver_authenticationlocalpolicy_binding resources of given name ."
] | [
"Helper method to track storage operations & time via StreamingStats.\n\n@param startNs",
"Concats an element and an array.\n\n@param firstElement the first element\n@param array the array\n@param <T> the type of the element in the array\n@return a new array created adding the element in the second array after th... |
private TreeMap<Integer, Integer> createTaskMap(FieldMap fieldMap, FixedMeta taskFixedMeta, FixedData taskFixedData, Var2Data taskVarData)
{
TreeMap<Integer, Integer> taskMap = new TreeMap<Integer, Integer>();
int uniqueIdOffset = fieldMap.getFixedDataOffset(TaskField.UNIQUE_ID);
Integer taskNameKe... | [
"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 ... | [
"Used to add exceptions to the calendar. The MPX standard defines\na limit of 250 exceptions per calendar.\n\n@param fromDate exception start date\n@param toDate exception end date\n@return ProjectCalendarException instance",
"Calculate the pointer's coordinates on the color wheel using the supplied\nangle.\n\n@p... |
public static void writeCorrelationId(Message message, String correlationId) {
Map<String, List<String>> headers = getOrCreateProtocolHeader(message);
headers.put(CORRELATIONID_HTTP_HEADER_NAME, Collections.singletonList(correlationId));
if (LOG.isLoggable(Level.FINE)) {
LOG.fine("HT... | [
"Write correlation id.\n\n@param message the message\n@param correlationId the correlation id"
] | [
"Put a new value in map.\n\n@param key id of the value for looking up.\n@param value the value.",
"Converts an update description BSON document from a MongoDB Change Event into an\nUpdateDescription object.\n\n@param document the\n@return the converted UpdateDescription",
"Copies entries in the source map to ta... |
private void updateScheduleSource(ProjectProperties properties)
{
// Rudimentary identification of schedule source
if (properties.getCompany() != null && properties.getCompany().equals("Synchro Software Ltd"))
{
properties.setFileApplication("Synchro");
}
else
{
... | [
"Populate the properties indicating the source of this schedule.\n\n@param properties project properties"
] | [
"Renumbers all entity unique IDs.",
"Creates the save and exit button UI Component.\n@return the save and exit button.",
"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 whe... |
public URL getDownloadURL() {
URL url = CONTENT_URL_TEMPLATE.build(this.getAPI().getBaseURL(), this.getID());
BoxAPIRequest request = new BoxAPIRequest(this.getAPI(), url, "GET");
request.setFollowRedirects(false);
BoxRedirectResponse response = (BoxRedirectResponse) request.send();
... | [
"Gets an expiring URL for downloading a file directly from Box. This can be user,\nfor example, for sending as a redirect to a browser to cause the browser\nto download the file directly from Box.\n\n@return the temporary download URL"
] | [
"Reads a single resource from a ConceptDraw PROJECT file.\n\n@param resource ConceptDraw PROJECT resource",
"set custom request for profile's default client\n\n@param profileName profileName to modify\n@param pathName friendly name of path\n@param customData custom request data\n@return true if success, false oth... |
@Override
@SuppressWarnings("unchecked")
public ChronoLocalDateTime<BritishCutoverDate> localDateTime(TemporalAccessor temporal) {
return (ChronoLocalDateTime<BritishCutoverDate>) super.localDateTime(temporal);
} | [
"Obtains a British Cutover local date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the British Cutover local date-time, not null\n@throws DateTimeException if unable to create the date-time"
] | [
"Finish initializing service.\n\n@throws IOException oop",
"Returns a single parent of the given tag. If there are multiple parents, throws a WindupException.",
"Parse a string representation of password spec.\n\nA password spec string should be `<trait spec><length spec>`.\n\nWhere \"trait spec\" should be a c... |
public static boolean decomposeSafe(DecompositionInterface<ZMatrixRMaj> decomposition, ZMatrixRMaj a) {
if( decomposition.inputModified() ) {
a = a.copy();
}
return decomposition.decompose(a);
} | [
"Decomposes the input matrix 'a' and makes sure it isn't modified."
] | [
"Print work units.\n\n@param value TimeUnit instance\n@return work units value",
"Registers the resource to the parent deployment resource. The model returned is that of the resource parameter.\n\n@param subsystemName the subsystem name\n@param resource the resource to be used for the subsystem on the deploy... |
public void close() throws SQLException {
try {
if (this.resetConnectionOnClose /*FIXME: && !getAutoCommit() && !isTxResolved() */){
/*if (this.autoCommitStackTrace != null){
logger.debug(this.autoCommitStackTrace);
this.autoCommitStackTrace = null;
} else {
logger.debug(DISABL... | [
"Release the connection back to the pool.\n\n@throws SQLException Never really thrown"
] | [
"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",
"Reads entries from transforms.xml.\n\n@pa... |
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);
}
DataSetInf... | [
"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 enco... | [
"Notifies that an existing content item is moved to another position.\n\n@param fromPosition the original position.\n@param toPosition the new position.",
"Delete a record.\n\n@param referenceId the reference ID.",
"Returns new boolean matrix with true or false values selected with equal probability.\n\n@para... |
final public void addPositionRange(int start, int end) {
if (tokenPosition == null) {
tokenPosition = new MtasPosition(start, end);
} else {
int[] positions = new int[end - start + 1];
for (int i = start; i <= end; i++) {
positions[i - start] = i;
}
tokenPosition.add(positi... | [
"Adds the position range.\n\n@param start the start\n@param end the end"
] | [
"Set a range of the colormap to a single color.\n@param firstIndex the position of the first color\n@param lastIndex the position of the second color\n@param color the color",
"Returns a client object for a clientId\n\n@param clientId ID of client to return\n@return Client or null\n@throws Exception exception",
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.