query stringlengths 74 6.1k | positive listlengths 1 1 | negative listlengths 9 9 |
|---|---|---|
private void writeAllEnvelopes(boolean reuse)
{
// perform remove of m:n indirection table entries first
performM2NUnlinkEntries();
Iterator iter;
// using clone to avoid ConcurentModificationException
iter = ((List) mvOrderOfIds.clone()).iterator();
while(it... | [
"commit all envelopes against the current broker"
] | [
"Retrieves the configured message by property key\n@param key The key in the file\n@return The associated value in case the key is found in the message bundle file. If\nno such key is defined, the returned value would be the key itself.",
"Return the inverse cumulative distribution function at x.\n\n@param x Argu... |
public static base_response add(nitro_service client, ipset resource) throws Exception {
ipset addresource = new ipset();
addresource.name = resource.name;
addresource.td = resource.td;
return addresource.add_resource(client);
} | [
"Use this API to add ipset."
] | [
"The point that is the GOLDEN_SECTION along the way from a to b.\na may be less or greater than b, you find the point 60-odd percent\nof the way from a to b.\n\n@param a Interval minimum\n@param b Interval maximum\n@return The GOLDEN_SECTION along the way from a to b.",
"Solve the using the lower triangular matri... |
protected void addPoint(double time, RandomVariable value, boolean isParameter) {
synchronized (rationalFunctionInterpolationLazyInitLock) {
if(interpolationEntity == InterpolationEntity.LOG_OF_VALUE_PER_TIME && time == 0) {
boolean containsOne = false; int index=0;
for(int i = 0; i< value.size(); i++){if(... | [
"Add a point to this curveFromInterpolationPoints. The method will throw an exception if the point\nis already part of the curveFromInterpolationPoints.\n\n@param time The x<sub>i</sub> in <sub>i</sub> = f(x<sub>i</sub>).\n@param value The y<sub>i</sub> in <sub>i</sub> = f(x<sub>i</sub>).\n@param isParameter If tru... | [
"Sends all events to the web service. Events will be transformed with mapper before sending.\n\n@param events the events",
"Starts the ephemeral node and waits for it to be created\n\n@param node Node to start\n@param maxWaitSec Maximum time in seconds to wait",
"Adds columns for the specified properties.\n@par... |
@Override public void setID(Integer val)
{
ProjectFile parent = getParentFile();
Integer previous = getID();
if (previous != null)
{
parent.getTasks().unmapID(previous);
}
parent.getTasks().mapID(val, this);
set(TaskField.ID, val);
} | [
"The ID field contains the identifier number that Microsoft Project\nautomatically assigns to each task as you add it to the project.\nThe ID indicates the position of a task with respect to the other tasks.\n\n@param val ID"
] | [
"gets the first non annotation line number of a node, taking into account annotations.",
"Computes the unbiased standard deviation of all the elements.\n\n@return standard deviation",
"Adds the given property and value to the constructed reference.\n\n@param propertyIdValue\nthe property to add\n@param value\nt... |
public void fatal(Throwable throwable, String msg, Object[] argArray) {
logIfEnabled(Level.FATAL, throwable, msg, UNKNOWN_ARG, UNKNOWN_ARG, UNKNOWN_ARG, argArray);
} | [
"Log a fatal message with a throwable."
] | [
"Adds a new Site matcher object to the map of server names.\n\n@param matcher the SiteMatcher of the server\n@param site the site to add",
"GENERIC!!! HELPER FUNCION FOR REPLACEMENT\n\nupdate the var: DYNAMIC REPLACEMENT of VAR.\n\nEvery task must have matching command data and task result\n\n@param task\nthe tas... |
private String dbProp(String name) {
String dbType = m_setupBean.getDatabase();
Object prop = m_setupBean.getDatabaseProperties().get(dbType).get(dbType + "." + name);
if (prop == null) {
return "";
}
return prop.toString();
} | [
"Accesses a property from the DB configuration for the selected DB.\n\n@param name the name of the property\n@return the value of the property"
] | [
"We have a non-null date, try each format in turn to see if it can be parsed.\n\n@param str date to parse\n@param pos position at which to start parsing\n@return Date instance",
"Adds a new child widget to the panel, attaching its Element to the\nspecified container Element.\n\n@param child the child widget to be... |
public static void executeCommand(String[] args) throws IOException {
OptionParser parser = getParser();
String url = null;
Boolean confirm = false;
// parse command-line input
OptionSet options = parser.parse(args);
if(options.has(AdminParserUti... | [
"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"
] | [
"Decomposes the matrix using the QR algorithm. Care was taken to minimize unnecessary memory copying\nand cache skipping.\n\n@param orig The matrix which is being decomposed. Not modified.\n@return true if it decomposed the matrix or false if an error was detected. This will not catch all errors.",
"Use this A... |
@Override
public QueryBuilderFind excludingType(final Class<? extends WindupVertexFrame> type)
{
pipelineCriteria.add(new QueryGremlinCriterion()
{
@Override
public void query(GraphRewrite event, GraphTraversal<?, Vertex> pipeline)
{
pipeline.f... | [
"Excludes Vertices that are of the provided type."
] | [
"Facade method facilitating the creation of subshell.\nSubshell is created and run inside Command method and shares the same IO and naming strategy.\n\nRun the obtained Shell with commandLoop().\n\n@param pathElement sub-prompt\n@param parent Shell to be subshell'd\n@param appName The app name string\n@param mainHa... |
public static Set<String> commaDelimitedListToSet(String str) {
Set<String> set = new TreeSet<String>();
String[] tokens = commaDelimitedListToStringArray(str);
Collections.addAll(set, tokens);
return set;
} | [
"Convenience method to convert a CSV string list to a set. Note that this\nwill suppress duplicates.\n\n@param str the input String\n@return a Set of String entries in the list"
] | [
"Use this API to fetch all the gslbsite resources that are configured on netscaler.",
"Joins the given iterable objects using the given separator into a single string.\n\n@return the joined string or an empty string if iterable is null",
"Refresh the layout element.",
"Read a Synchro string from an input stre... |
public static base_response rename(nitro_service client, nsacl6 resource, String new_acl6name) throws Exception {
nsacl6 renameresource = new nsacl6();
renameresource.acl6name = resource.acl6name;
return renameresource.rename_resource(client,new_acl6name);
} | [
"Use this API to rename a nsacl6 resource."
] | [
"given the groupName, it returns the groupId\n\n@param groupName name of group\n@return ID of group",
"Pump events from event stream.",
"Sets the name of the base calendar associated with this task.\nNote that this attribute appears in MPP9 and MSPDI files.\n\n@param calendar calendar instance",
"Return a lis... |
public static base_response rename(nitro_service client, cmppolicylabel resource, String new_labelname) throws Exception {
cmppolicylabel renameresource = new cmppolicylabel();
renameresource.labelname = resource.labelname;
return renameresource.rename_resource(client,new_labelname);
} | [
"Use this API to rename a cmppolicylabel resource."
] | [
"Restores a trashed folder back to its original location.\n@param folderID the ID of the trashed folder.\n@return info about the restored folder.",
"Use this API to fetch appfwprofile_crosssitescripting_binding resources of given name .",
"Get a reader implementation class to perform API calls with.\n... |
public static <T> void notNull(final String name, final T value) {
if (value == null) {
throw new IllegalArgumentException(name + " can not be null");
}
} | [
"Throw IllegalArgumentException if the value is null.\n\n@param name the parameter name.\n@param value the value that should not be null.\n@param <T> the value type.\n@throws IllegalArgumentException if value is null."
] | [
"Check if a position is within a circle\n\n@param x x position\n@param y y position\n@param centerX center x of circle\n@param centerY center y of circle\n@return true if within circle, false otherwise",
"Log a trace message with a throwable.",
"Returns the y-coordinate of a vertex position.\n\n@par... |
public static void changeSign(DMatrixSparseCSC A , DMatrixSparseCSC B ) {
if( A != B ) {
B.copyStructure(A);
}
for (int i = 0; i < A.nz_length; i++) {
B.nz_values[i] = -A.nz_values[i];
}
} | [
"B = -A. Changes the sign of elements in A and stores it in B. A and B can be the same instance.\n\n@param A (Input) Matrix. Not modified.\n@param B (Output) Matrix. Modified."
] | [
"Sets the text alignment for all cells in the table.\n@param textAlignment new text alignment\n@throws NullPointerException if the argument was null\n@return this to allow chaining\n@throws {@link NullPointerException} if the argument was null",
"Create a model mbean from an object using the description given in ... |
private void readRoleDefinitions(Project gpProject)
{
m_roleDefinitions.put("Default:1", "project manager");
for (Roles roles : gpProject.getRoles())
{
if ("Default".equals(roles.getRolesetName()))
{
continue;
}
for (Role role : roles.getRole())
... | [
"Read the role definitions from a GanttProject project.\n\n@param gpProject GanttProject project"
] | [
"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 changes.",
"helper to calculate the actionBar height\n\n@param context\n@return",
"Sets the appropriate OpenCms context.\n@param cms The OpenCms instance object."... |
void setPaused(final boolean isPaused) {
docLock.writeLock().lock();
try {
docsColl.updateOne(
getDocFilter(namespace, documentId),
new BsonDocument("$set",
new BsonDocument(
ConfigCodec.Fields.IS_PAUSED,
new BsonBoolean(isPaused))));
... | [
"A document that is paused no longer has remote updates applied to it.\nAny local updates to this document cause it to be thawed. An example of pausing a document\nis when a conflict is being resolved for that document and the handler throws an exception.\n\n@param isPaused whether or not this config is frozen"
] | [
"Returns the full record for a single team.\n\n@param team Globally unique identifier for the team.\n@return Request object",
"Combines two trajectories by adding the corresponding positions. The trajectories have to have the same length.\n@param a The first trajectory\n@param b The second trajectory\n@return Th... |
protected MetaMatcher createMetaMatcher(String filterAsString, Map<String, MetaMatcher> metaMatchers) {
for ( String key : metaMatchers.keySet() ){
if ( filterAsString.startsWith(key)){
return metaMatchers.get(key);
}
}
if (filterAsString.startsWith(GROOVY)) {
return new... | [
"Creates a MetaMatcher based on the filter content.\n\n@param filterAsString the String representation of the filter\n@param metaMatchers the Map of custom MetaMatchers\n@return A MetaMatcher used to match the filter content"
] | [
"Function to serialize the given Vector clock into a string. If something\ngoes wrong, it returns an empty string.\n\n@param vc The Vector clock to serialize\n@return The string (JSON) version of the specified Vector clock",
"Optionally specify the variable name to use for the output of this condition",
"Collap... |
public void addResourceAssignment(ResourceAssignment assignment)
{
if (getExistingResourceAssignment(assignment.getResource()) == null)
{
m_assignments.add(assignment);
getParentFile().getResourceAssignments().add(assignment);
Resource resource = assignment.getResource();
... | [
"Add a resource assignment which has been populated elsewhere.\n\n@param assignment resource assignment"
] | [
"Sort by time bucket, then backup count, and by compression state.",
"Set the payload to the fileModel of the given instance even though the variable is not directly referencing it. This is mainly to simplify the\ncreation of the rule, when the FileModel itself is not being iterated but just a model referencing i... |
@Override
public boolean add(E o) {
Integer index = indexes.get(o);
if (index == null && ! locked) {
index = objects.size();
objects.add(o);
indexes.put(o, index);
return true;
}
return false;
} | [
"Adds an object to the Index. If it was already in the Index,\nthen nothing is done. If it is not in the Index, then it is\nadded iff the Index hasn't been locked.\n\n@return true if the item was added to the index and false if the\nitem was already in the index or if the index is locked"
] | [
"Only call with the read lock held",
"Returns values aggregated from all the delegates, without overriding\nvalues that already exist.\n\n@return The Map of aggregated values",
"Get the log if exists or return null\n\n@param topic topic name\n@param partition partition index\n@return a log for the topic or ... |
private void init() {
logger.info("metadata init().");
writeLock.lock();
try {
// Required keys
initCache(CLUSTER_KEY);
// If stores definition storage engine is not null, initialize metadata
// Add the mapping from key to the storage engine used
if(this... | [
"Initializes the metadataCache for MetadataStore"
] | [
"Removes a tag from the resource.\n@param key the key of the tag to remove\n@return the next stage of the definition/update",
"Creates a new indirection handler instance.\n\n@param brokerKey The associated {@link PBKey}.\n@param id The subject's ids\n@return The new instance",
"Open the connection to the server... |
public Where<T, ID> rawComparison(String columnName, String rawOperator, Object value) throws SQLException {
addClause(new SimpleComparison(columnName, findColumnFieldType(columnName), value, rawOperator));
return this;
} | [
"Make a comparison where the operator is specified by the caller. It is up to the caller to specify an appropriate\noperator for the database and that it be formatted correctly."
] | [
"Add \"GROUP BY\" clause to the SQL query statement. This can be called multiple times to add additional \"GROUP BY\"\nclauses.\n\n<p>\nNOTE: Use of this means that the resulting objects may not have a valid ID column value so cannot be deleted or\nupdated.\n</p>",
"Returns the screen height in pixels\n\n@param c... |
public Set<MetadataProvider> getMetadataProviders(MediaDetails sourceMedia) {
String key = (sourceMedia == null)? "" : sourceMedia.hashKey();
Set<MetadataProvider> result = metadataProviders.get(key);
if (result == null) {
return Collections.emptySet();
}
return Colle... | [
"Get the set of metadata providers that can offer metadata for tracks loaded from the specified media.\n\n@param sourceMedia the media whose metadata providers are desired, or {@code null} to get the set of\nmetadata providers that can offer metadata for all media.\n\n@return any registered metadata providers that ... | [
"Clear the selection of all items.\n@param requestLayout request layout after clear selection if the flag is true, no layout\nrequested otherwise\n@return {@code true} if at least one item was deselected,\n{@code false} otherwise.",
"Creates a combined list of Entries using the provided mapping file, and sorts th... |
public void processCalendar(Row calendarRow, Map<Integer, Row> workPatternMap, Map<Integer, List<Row>> workPatternAssignmentMap, Map<Integer, List<Row>> exceptionAssignmentMap, Map<Integer, List<Row>> timeEntryMap, Map<Integer, DayType> exceptionTypeMap)
{
//
// Create the calendar and add the default wo... | [
"Creates a ProjectCalendar instance from the Asta data.\n\n@param calendarRow basic calendar data\n@param workPatternMap work pattern map\n@param workPatternAssignmentMap work pattern assignment map\n@param exceptionAssignmentMap exception assignment map\n@param timeEntryMap time entry map\n@param exceptionTypeMap ... | [
"Use this API to clear nspbr6.",
"Sets the invalid values for the TextBox\n@param invalidValues\n@param isCaseSensitive\n@param invalidValueErrorMessage",
"Find out which field in the incoming message contains the payload that is.\ndelivered to the service method.",
"Use this API to fetch spilloverpolicy reso... |
@Beta
public MSICredentials withIdentityId(String identityId) {
this.identityId = identityId;
this.clientId = null;
this.objectId = null;
return this;
} | [
"Specifies the ARM resource id of the user assigned managed service identity resource that\nshould be used to retrieve the access token.\n\n@param identityId the ARM resource id of the user assigned identity resource\n@return MSICredentials"
] | [
"returns the values of the orientation tag",
"Process any StepEvent. You can change last added to stepStorage\nstep using this method.\n\n@param event to process",
"Returns the compact task records for all tasks within the given project,\nordered by their priority within the project. Tasks can exist in more tha... |
public static Method findGetter(final Object object, final String fieldName) {
if( object == null ) {
throw new NullPointerException("object should not be null");
} else if( fieldName == null ) {
throw new NullPointerException("fieldName should not be null");
}
final Class<?> clazz = object.getClass();... | [
"Returns the getter method associated with the object's field.\n\n@param object\nthe object\n@param fieldName\nthe name of the field\n@return the getter method\n@throws NullPointerException\nif object or fieldName is null\n@throws SuperCsvReflectionException\nif the getter doesn't exist or is not visible"
] | [
"Locate the no arg constructor for the class.",
"URLDecode a string\n@param s\n@return",
"1.0 version of parser is different at simple mapperParser",
"Adds OPT_U | OPT_URL option to OptionParser, with one argument.\n\n@param parser OptionParser to be modified\n@param required Tells if this option is required ... |
public DbLicense getLicense(final String name) {
final DbLicense license = repoHandler.getLicense(name);
if (license == null) {
throw new WebApplicationException(Response.status(Response.Status.NOT_FOUND)
.entity("License " + name + " does not exist.").build());
... | [
"Return a html view that contains the targeted license\n\n@param name String\n@return DbLicense"
] | [
"Removes all elems in the given Collection that aren't accepted by the given Filter.",
"Process data for an individual calendar.\n\n@param row calendar data",
"Use this API to fetch statistics of appfwpolicy_stats resource of given name .",
"Add data for a column to this table.\n\n@param column column data",
... |
public static double blackScholesDigitalOptionRho(
double initialStockValue,
double riskFreeRate,
double volatility,
double optionMaturity,
double optionStrike)
{
if(optionMaturity <= 0.0)
{
// The Black-Scholes model does not consider it being an option
return 0.0;
}
else if(optionStrike ... | [
"Calculates the rho of a digital option under a Black-Scholes model\n\n@param initialStockValue The initial value of the underlying, i.e., the spot.\n@param riskFreeRate The risk free rate of the bank account numerarie.\n@param volatility The Black-Scholes volatility.\n@param optionMaturity The option maturity T.\n... | [
"Take four bytes from the specified position in the specified\nblock and convert them into a 32-bit int, using the big-endian\nconvention.\n@param bytes The data to read from.\n@param offset The position to start reading the 4-byte int from.\n@return The 32-bit integer represented by the four bytes.",
"Set the du... |
public static base_response delete(nitro_service client, dnsaaaarec resource) throws Exception {
dnsaaaarec deleteresource = new dnsaaaarec();
deleteresource.hostname = resource.hostname;
deleteresource.ipv6address = resource.ipv6address;
return deleteresource.delete_resource(client);
} | [
"Use this API to delete dnsaaaarec."
] | [
"Use this API to fetch aaauser_aaagroup_binding resources of given name .",
"Use this API to add autoscaleaction.",
"Checks if a given number is in the range of a byte.\n\n@param number\na number which should be in the range of a byte (positive or negative)\n\n@see java.lang.Byte#MIN_VALUE\n@see java.lang.Byte#... |
public Story storyOfText(Configuration configuration, String storyAsText, String storyId) {
return configuration.storyParser().parseStory(storyAsText, storyId);
} | [
"Returns the parsed story from the given text\n\n@param configuration the Configuration used to run story\n@param storyAsText the story text\n@param storyId the story Id, which will be returned as story path\n@return The parsed Story"
] | [
"Obtains a local date in Pax calendar system from the\nproleptic-year, month-of-year and day-of-month fields.\n\n@param prolepticYear the proleptic-year\n@param month the month-of-year\n@param dayOfMonth the day-of-month\n@return the Pax local date, not null\n@throws DateTimeException if unable to create the dat... |
@Override public void onBindViewHolder(RendererViewHolder viewHolder, int position) {
T content = getItem(position);
Renderer<T> renderer = viewHolder.getRenderer();
if (renderer == null) {
throw new NullRendererBuiltException("RendererBuilder have to return a not null renderer");
}
renderer.s... | [
"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."
] | [
"Adds an item to the list box, specifying its direction and an initial\nvalue 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 dir the item's direction\n@param text the text of the item to be added",
"Log a warning for th... |
public void printProbs(String filename,
DocumentReaderAndWriter<IN> readerAndWriter) {
// only for the OCR data does this matter
flags.ocrTrain = false;
ObjectBank<List<IN>> docs =
makeObjectBankFromFile(filename, readerAndWriter);
printProbsDocuments(docs);
} | [
"Takes the file, reads it in, and prints out the likelihood of each possible\nlabel at each point.\n\n@param filename\nThe path to the specified file"
] | [
"Convert a Java LinkedList to a Scala Iterable.\n@param linkedList Java LinkedList to convert\n@return Scala Iterable",
"Adds a redeploy step to the composite operation.\n\n@param builder the builder to add the step to\n@param deployment the deployment being redeployed",
"Record the checkout wait time in us\... |
public Iterable<BoxItem.Info> getChildren(String sort, SortDirection direction, final String... fields) {
QueryStringBuilder builder = new QueryStringBuilder()
.appendParam("sort", sort)
.appendParam("direction", direction.toString());
if (fields.length > 0) {
... | [
"Returns an iterable containing the items in this folder sorted by name and direction.\n@param sort the field to sort by, can be set as `name`, `id`, and `date`.\n@param direction the direction to display the item results.\n@param fields the fields to retrieve.\n@return an iterable containing the items in this fold... | [
"Opens the favorite dialog.\n\n@param explorer the explorer instance (null if not currently in explorer)",
"Dumps the contents of a structured block made up from a header\nand fixed sized records.\n\n@param headerSize header zie\n@param blockSize block size\n@param data data block",
"Returns a factory that vend... |
public static Cluster createUpdatedCluster(Cluster currentCluster,
int stealerNodeId,
List<Integer> donatedPartitions) {
Cluster updatedCluster = Cluster.cloneCluster(currentCluster);
// Go over every donated p... | [
"Updates the existing cluster such that we remove partitions mentioned\nfrom the stealer node and add them to the donor node\n\n@param currentCluster Existing cluster metadata. Both stealer and donor\nnode should already exist in this metadata\n@param stealerNodeId Id of node for which we are stealing the partition... | [
"Schedule at most one task.\n\nThe scheduled task *must* invoke 'doneTask()' upon\ncompletion/termination.\n\n@param executeService flag to control execution of the service, some tests pass\nin value 'false'\n@return The task scheduled or null if not possible to schedule a task at\nthis time.",
"Deletes the disab... |
public void useXopAttachmentServiceWithProxy() throws Exception {
final String serviceURI = "http://localhost:" + port + "/services/attachments";
XopAttachmentService proxy = JAXRSClientFactory.create(serviceURI,
XopAttachmentServ... | [
"Writes and reads the XOP attachment using a CXF JAX-RS Proxy\nThe proxy automatically sets the \"mtom-enabled\" property by checking\nthe CXF EndpointProperty set on the XopAttachment interface.\n\n@throws Exception"
] | [
"Returns a ReportWriter that which will use memory or a file depending on the parameter PAGES_THRESHOLD\n@param _jasperPrint\n@param _format\n@param _parameters\n@return",
"For missing objects associated by one-to-one with another object in the\nresult set, register the fact that the object is missing with the\n... |
@Override
public SuggestAccountsRequest suggestAccounts() throws RestApiException {
return new SuggestAccountsRequest() {
@Override
public List<AccountInfo> get() throws RestApiException {
return AccountsRestClient.this.suggestAccounts(this);
}
};
... | [
"Added in Gerrit 2.11."
] | [
"Set the url for the shape file.\n\n@param url shape file url\n@throws LayerException file cannot be accessed\n@since 1.7.1",
"Throws an IllegalStateException when the given value is not null.\n@return the value",
"Translate the given byte array into a string of 1s and 0s\n\n@param bytes The bytes to translate\... |
private SpellCheckResponse performSpellcheckQuery(CmsSpellcheckingRequest request) {
if ((null == request) || !request.isInitialized()) {
return null;
}
final String[] wordsToCheck = request.m_wordsToCheck;
final ModifiableSolrParams params = new ModifiableSolrParams();
... | [
"Performs the actual spell check query using Solr.\n\n@param request the spell check request\n\n@return Results of the Solr spell check of type SpellCheckResponse or null if something goes wrong."
] | [
"Sends the collected dependencies over to the master and record them.",
"This method reads a four byte integer from the input stream.\n\n@param is the input stream\n@return byte value\n@throws IOException on file read error or EOF",
"Attribute name and value are not escaped or modified in any way.\n\n@param nam... |
protected void createBulge( int x1 , double p , boolean byAngle ) {
double a11 = diag[x1];
double a22 = diag[x1+1];
double a12 = off[x1];
double a23 = off[x1+1];
if( byAngle ) {
c = Math.cos(p);
s = Math.sin(p);
c2 = c*c;
s2 = s*s... | [
"Performs a similar transform on A-pI"
] | [
"Check if this request is part of the specified request. This is the case if both requests have equal properties\nand the specified request is asking for the same or more paint operations than this one.\n\n@param request another request\n@return true if the current request is contained in the specified request\n@si... |
protected void swapColumns( int j ) {
// find the column with the largest norm
int largestIndex = j;
double largestNorm = normsCol[j];
for( int col = j+1; col < numCols; col++ ) {
double n = normsCol[col];
if( n > largestNorm ) {
largestNorm = n;
... | [
"Finds the column with the largest normal and makes that the first column\n\n@param j Current column being inspected"
] | [
"Returns the full path of the resource file with extension.\n\n@return path of the GVRAndroidResource. May return null if the\nresource is not associated with any file",
"Get the last modified time for a set of files.",
"Shows error dialog, manually supplying details instead of getting them from an exception st... |
private void setRequestSitefilter(WbGetEntitiesActionData properties) {
if (this.filter.excludeAllSiteLinks()
|| this.filter.getSiteLinkFilter() == null) {
return;
}
properties.sitefilter = ApiConnection.implodeObjects(this.filter
.getSiteLinkFilter());
} | [
"Sets the value for the API's \"sitefilter\" parameter based on the current\nsettings.\n\n@param properties\ncurrent setting of parameters"
] | [
"Use this API to fetch all the vlan resources that are configured on netscaler.",
"Updates the information about this weblink with any info fields that have been modified locally.\n\n<p>The only fields that will be updated are the ones that have been modified locally. For example, the following\ncode won't update... |
public static <K, V> QueuedKeyedResourcePool<K, V> create(ResourceFactory<K, V> factory,
ResourcePoolConfig config) {
return new QueuedKeyedResourcePool<K, V>(factory, config);
} | [
"Create a new queued pool with key type K, request type R, and value type\nV.\n\n@param factory The factory that creates objects\n@param config The pool config\n@return The created pool"
] | [
"Returns the value of an option, or the default if the value is null or the key is not part of the map.\n@param configOptions the map with the config options.\n@param optionKey the option to get the value of\n@param defaultValue the default value to return if the option is not set.\n@return the value of an option, ... |
public void unlinkFK(Object targetObject, ClassDescriptor cld, ObjectReferenceDescriptor rds)
{
setFKField(targetObject, cld, rds, null);
} | [
"Unkink FK fields of target object.\n\n@param targetObject real (non-proxy) target object\n@param cld {@link ClassDescriptor} of the real target object\n@param rds An {@link ObjectReferenceDescriptor} or {@link CollectionDescriptor}\nassociated with the real object."
] | [
"Returns IMAP formatted String of MessageFlags for named user",
"Return an input stream to read the data from the named table.\n\n@param name table name\n@return InputStream instance\n@throws IOException",
"Converts a time in milliseconds to the appropriate x coordinate for drawing something at that time.\n\n@p... |
public boolean getHidden() throws FlickrException {
Map<String, Object> parameters = new HashMap<String, Object>();
parameters.put("method", METHOD_GET_HIDDEN);
Response response = transportAPI.get(transportAPI.getPath(), parameters, apiKey, sharedSecret);
if (response.isError()) {... | [
"Returns the default hidden preference for the user.\n\n@return boolean hidden or not\n@throws FlickrException"
] | [
"This method is used to push install referrer via UTM source, medium & campaign parameters\n@param source The UTM source parameter\n@param medium The UTM medium parameter\n@param campaign The UTM campaign parameter",
"Use this API to fetch aaauser_vpntrafficpolicy_binding resources of given name .",
"Returns th... |
public void setEnable(boolean flag)
{
if (mEnabled == flag)
{
return;
}
mEnabled = flag;
if (flag)
{
mContext.registerDrawFrameListener(this);
mContext.getApplication().getEventReceiver().addListener(this);
mAudioEngine.... | [
"Enables or disables sound.\nWhen sound is disabled, nothing is played but the\naudio sources remain intact.\n@param flag true to enable sound, false to disable."
] | [
"This method extracts data for a single day from an MSPDI file.\n\n@param calendar Calendar data\n@param day Day data\n@param readExceptionsFromDays read exceptions form day definitions",
"Calculates the smallest value between the three inputs.\n@param first value\n@param second value\n@param third value\n@return... |
public DbInfo info() {
return client.couchDbClient.get(new DatabaseURIHelper(db.getDBUri()).getDatabaseUri(),
DbInfo.class);
} | [
"Get information about this database.\n\n@return DbInfo encapsulating the database info\n@see <a\nhref=\"https://console.bluemix.net/docs/services/Cloudant/api/database.html#getting-database-details\"\ntarget=\"_blank\">Databases - read</a>"
] | [
"Returns the bundle jar classpath element.",
"Return a new client that may be cached or not. Given properties are always use when not cached, and only used at creation time for\ncached clients.\n\n@param name\nif null, default client. Otherwise, helpful to retrieve cached clients later.\n@param p\na set of proper... |
@SuppressForbidden("legitimate sysstreams.")
private Execute forkProcess(ForkedJvmInfo slaveInfo, EventBus eventBus,
CommandlineJava commandline,
TailInputStream eventStream, OutputStream sysout, OutputStream syserr, RandomAccessFile streamsBuffer) {
try {
String tempDir = commandline.getSyste... | [
"Execute a slave process. Pump events to the given event bus."
] | [
"Gets the Square Euclidean distance between two points.\n\n@param x A point in space.\n@param y A point in space.\n@return The Square Euclidean distance between x and y.",
"Captures System.out and System.err and redirects them\nto Redwood logging.\n@param captureOut True is System.out should be captured\n@param c... |
public static IntRange GetRange( int[] values, double percent ){
int total = 0, n = values.length;
// for all values
for ( int i = 0; i < n; i++ )
{
// accumalate total
total += values[i];
}
int min, max, hits;
int h = (int) ( total * ( p... | [
"Get range around median containing specified percentage of values.\n@param values Values.\n@param percent Values percentage around median.\n@return Returns the range which containes specifies percentage of values."
] | [
"This method is called to format a rate.\n\n@param value rate value\n@return formatted rate",
"If we have a class Foo with a collection of Bar's then we go through Bar's DAO looking for a Foo field. We need\nthis field to build the query that is able to find all Bar's that have foo_id that matches our id.",
"Ad... |
private String joinElements(int length)
{
StringBuilder sb = new StringBuilder();
for (int index = 0; index < length; index++)
{
sb.append(m_elements.get(index));
}
return sb.toString();
} | [
"Joins the individual WBS elements to make the formated value.\n\n@param length number of elements to join\n@return formatted WBS value"
] | [
"Scans the given file looking for a complete zip file format end of central directory record.\n\n@param file the file\n\n@return true if a complete end of central directory record could be found\n\n@throws IOException",
"Main file parser. Reads GIF content blocks. Stops after reading maxFrames",
"Given an AVRO ... |
public static void ensureNotSingular( DMatrixSparseCSC A , Random rand ) {
// if( A.numRows < A.numCols ) {
// throw new IllegalArgumentException("Fewer equations than variables");
// }
int []s = UtilEjml.shuffled(A.numRows,rand);
Arrays.sort(s);
int N = Math.min(A.num... | [
"Modies the matrix to make sure that at least one element in each column has a value"
] | [
"Prepare a parallel HTTP PUT Task.\n\n@param url\nthe UrlPostfix: e.g. in http://localhost:8080/index.html.,the url is \"/index.html\"\n@return the parallel task builder",
"Gets an enhanced protection domain for a proxy based on the given protection domain.\n@param domain the given protection domain\n@return prot... |
@SuppressWarnings("unchecked")
public void setVars(final Map<String, ? extends Object> vars) {
this.vars = (Map<String, Object>)vars;
} | [
"Set the named arguments.\n\n@param vars\nthe new named arguments"
] | [
"Inserts the result of the migration into the migration table\n\n@param migration the migration that was executed\n@param wasSuccessful indicates if the migration was successful or not",
"Builds the Join for columns if they are not found among the existingColumns.\n@param columns the list of columns represent... |
public void setDefaultCalendarName(String calendarName)
{
if (calendarName == null || calendarName.length() == 0)
{
calendarName = DEFAULT_CALENDAR_NAME;
}
set(ProjectField.DEFAULT_CALENDAR_NAME, calendarName);
} | [
"Sets the Calendar used. 'Standard' if no value is set.\n\n@param calendarName Calendar name"
] | [
"Suite end.",
"Builds a new instance for the class represented by the given class descriptor.\n\n@param cld The class descriptor\n@return The instance",
"Return the NTSC gray level of an RGB value.\n@param rgb1 the input pixel\n@return the gray level (0-255)",
"convert selector used in an upsert statement int... |
static boolean isInCircle(float x, float y, float centerX, float centerY, float
radius) {
return Math.abs(x - centerX) < radius && Math.abs(y - centerY) < radius;
} | [
"Check if a position is within a circle\n\n@param x x position\n@param y y position\n@param centerX center x of circle\n@param centerY center y of circle\n@return true if within circle, false otherwise"
] | [
"creates a scope using the passed function to compute the names and sets the passed scope as the parent scope",
"Use this API to fetch appflowpolicy_binding resource of given name .",
"Checks whether the given field definition is used as the primary key of a class referenced by\na reference.\n\n@param modelDef ... |
static BsonDocument getFreshVersionDocument() {
final BsonDocument versionDoc = new BsonDocument();
versionDoc.append(Fields.SYNC_PROTOCOL_VERSION_FIELD, new BsonInt32(1));
versionDoc.append(Fields.INSTANCE_ID_FIELD, new BsonString(UUID.randomUUID().toString()));
versionDoc.append(Fields.VERSION_COUNTE... | [
"Returns a BSON version document representing a new version with a new instance ID, and\nversion counter of zero.\n@return a BsonDocument representing a synchronization version"
] | [
"Take a string and make it an iterable ContentStream",
"Used to finish up pushing the bulge off the matrix.",
"Get the time zone for a specific exchange suffix\n\n@param suffix suffix for the exchange in YahooFinance\n@return time zone of the exchange",
"Parses coordinates into a Spatial4j point shape.",
"G... |
public QueryStringBuilder getQueryParameters() {
QueryStringBuilder builder = new QueryStringBuilder();
if (this.isNullOrEmpty(this.query) && this.metadataFilter == null) {
throw new BoxAPIException(
"BoxSearchParameters requires either a search query or Metadata filter to b... | [
"Get the Query Paramaters to be used for search request.\n@return this.QueryStringBuilder."
] | [
"Creates instance of the entity class. This method is called to create the object\ninstances when returning query results.",
"Creates a new form session to edit the file with the given name using the given form configuration.\n\n@param configPath the site path of the form configuration\n@param fileName the name (... |
static ChangeEvent<BsonDocument> changeEventForLocalReplace(
final MongoNamespace namespace,
final BsonValue documentId,
final BsonDocument document,
final boolean writePending
) {
return new ChangeEvent<>(
new BsonDocument(),
OperationType.REPLACE,
document,
... | [
"Generates a change event for a local replacement of a document in the given namespace referring\nto the given document _id.\n\n@param namespace the namespace where the document was inserted.\n@param documentId the _id of the document that was updated.\n@param document the replacement document.\n@return a change ev... | [
"Get the filters ImporterServiceFilter and ImportDeclarationFilter from the properties, stop the instance if one of.\nthem is invalid.",
"Restores a saved connection state into this BoxAPIConnection.\n\n@see #save\n@param state the saved state that was created with {@link #save}.",
"Saves the list of curren... |
public static CombinedInterceptorAndDecoratorStackMethodHandler peekIfNotEmpty() {
Stack stack = interceptionContexts.get();
if (stack == null) {
return null;
}
return stack.peek();
} | [
"Peeks the current top of the stack or returns null if the stack is empty\n@return the current top of the stack or returns null if the stack is empty"
] | [
"add a foreign key field",
"Get the response headers for URL, following redirects\n\n@param stringUrl URL to use\n@param followRedirects whether to follow redirects\n@return headers HTTP Headers\n@throws IOException I/O error happened",
"Enables or disabled shadow casting for a spot light.\nEnabling shadows att... |
public static Resource getSetupPage(I_SetupUiContext context, String name) {
String path = CmsStringUtil.joinPaths(context.getSetupBean().getContextPath(), CmsSetupBean.FOLDER_SETUP, name);
Resource resource = new ExternalResource(path);
return resource;
} | [
"Gets external resource for an HTML page in the setup-resources folder.\n\n@param context the context\n@param name the file name\n\n@return the resource for the HTML page"
] | [
"Retrieves the timephased breakdown of actual cost.\n\n@return timephased actual cost",
"Use this API to fetch rnat6_nsip6_binding resources of given name .",
"Method which performs strength checks on password. It returns outcome which can be used by CLI.\n\n@param isAdminitrative - administrative checks are le... |
private Entry getEntry(Object key)
{
if (key == null) return null;
int hash = hashCode(key);
int index = indexFor(hash);
for (Entry entry = table[index]; entry != null; entry = entry.next)
{
if ((entry.hash == hash) && equals(key, entry.getKey()))
... | [
"Returns the entry associated with the given key.\n\n@param key the key of the entry to look up\n@return the entry associated with that key, or null\nif the key is not in this map"
] | [
"Show or hide the options column dependent on the provided edit mode.\n@param oldMode the old edit mode\n@param newMode the edit mode for which the options column's visibility should be adjusted.",
"Provisions a new user in an enterprise with additional user information.\n@param api the API connection to be u... |
public static base_response reset(nitro_service client, Interface resource) throws Exception {
Interface resetresource = new Interface();
resetresource.id = resource.id;
return resetresource.perform_operation(client,"reset");
} | [
"Use this API to reset Interface."
] | [
"Use the universal project reader to open the file.\nThrow an exception if we can't determine the file type.\n\n@param inputFile file name\n@return ProjectFile instance",
"Use this API to fetch all the appfwhtmlerrorpage resources that are configured on netscaler.",
"Fires the event.\n\n@param source the event ... |
protected Declaration createDeclaration(String property, Term<?> term)
{
Declaration d = CSSFactory.getRuleFactory().createDeclaration();
d.unlock();
d.setProperty(property);
d.add(term);
return d;
} | [
"Creates a single property declaration.\n@param property Property name.\n@param term Property value.\n@return The resulting declaration."
] | [
"Build the operation transformers.\n\n@param registry the shared resource registry\n@return the operation transformers",
"Runs calls in a background thread so that the results will actually be asynchronous.\n\n@see com.google.appengine.tools.cloudstorage.RawGcsService#continueObjectCreationAsync(\ncom.google.appe... |
private Boolean readOptionalBoolean(JSONValue val) {
JSONBoolean b = null == val ? null : val.isBoolean();
if (b != null) {
return Boolean.valueOf(b.booleanValue());
}
return null;
} | [
"Read an optional boolean value form a JSON value.\n@param val the JSON value that should represent the boolean.\n@return the boolean from the JSON or null if reading the boolean fails."
] | [
"Constructs a reference of the given type to the given\nreferent. The reference is registered with the queue\nfor later purging.\n\n@param type HARD, SOFT or WEAK\n@param referent the object to refer to\n@param hash the hash code of the <I>key</I> of the mapping;\nthis number might be different from referent.ha... |
public static base_responses unset(nitro_service client, String trapname[], String args[]) throws Exception {
base_responses result = null;
if (trapname != null && trapname.length > 0) {
snmpalarm unsetresources[] = new snmpalarm[trapname.length];
for (int i=0;i<trapname.length;i++){
unsetresources[i] = n... | [
"Use this API to unset the properties of snmpalarm resources.\nProperties that need to be unset are specified in args array."
] | [
"Returns true if the string matches the name of a function",
"Checks if a document exist in the database.\n\n@param id The document _id field.\n@return true If the document is found, false otherwise.",
"Use this API to delete nsip6 resources of given names.",
"Call the Coverage Task.",
"Generates a unique s... |
public double getValueWithGivenSpreadOverCurve(double evaluationTime,Curve referenceCurve, double spread, AnalyticModel model) {
double value=0;
for(int periodIndex=0; periodIndex<schedule.getNumberOfPeriods();periodIndex++) {
double paymentDate = schedule.getPayment(periodIndex);
value+= paymentDate>evaluati... | [
"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 time are not considered.\n@pa... | [
"Build a request URL.\n\n@param host\nThe host\n@param port\nThe port\n@param path\nThe path\n@param parameters\nThe parameters\n@return The URL\n@throws MalformedURLException\n@deprecated use {@link #buildSecureUrl(java.lang.String, int, java.lang.String, java.util.Map) }",
"Creates the udpClient with proper han... |
public static void stopService() {
DaemonStarter.currentPhase.set(LifecyclePhase.STOPPING);
final CountDownLatch cdl = new CountDownLatch(1);
Executors.newSingleThreadExecutor().execute(() -> {
DaemonStarter.getLifecycleListener().stopping();
DaemonStarter.daemon.stop();
... | [
"Stop the service and end the program"
] | [
"Sets up this object to represent an argument that will be set to a\nconstant value.\n\n@param constantValue the constant value.",
"resumed a given deployment\n\n@param deployment The deployment to resume",
"Abort and close the transaction.\nCalling abort abandons all persistent object modifications and release... |
public static base_response unset(nitro_service client, csparameter resource, String[] args) throws Exception{
csparameter unsetresource = new csparameter();
return unsetresource.unset_resource(client,args);
} | [
"Use this API to unset the properties of csparameter resource.\nProperties that need to be unset are specified in args array."
] | [
"Extract the DatabaseTableConfig for a particular class by looking for class and field annotations. This is used\nby internal classes to configure a class.",
"Builds the Join for columns if they are not found among the existingColumns.\n@param columns the list of columns represented by Criteria.Field to ensure\n@... |
public static URL codeLocationFromPath(String filePath) {
try {
return new File(filePath).toURI().toURL();
} catch (Exception e) {
throw new InvalidCodeLocation(filePath);
}
} | [
"Creates a code location URL from a file path\n\n@param filePath the file path\n@return A URL created from File\n@throws InvalidCodeLocation if URL creation fails"
] | [
"Initialize; cached threadpool is safe as it is releasing resources automatically if idle",
"Sets the value for the API's \"sitefilter\" parameter based on the current\nsettings.\n\n@param properties\ncurrent setting of parameters",
"Generate the body of a toString method that uses plain concatenation.\n\n<p>Co... |
public Version putWithCustomTimeout(CompositeVoldemortRequest<K, V> requestWrapper) {
validateTimeout(requestWrapper.getRoutingTimeoutInMs());
List<Versioned<V>> versionedValues;
long startTime = System.currentTimeMillis();
String keyHexString = "";
if(logger.isDebugEnabled()) {
... | [
"Performs a put operation with the specified composite request object\n\n@param requestWrapper A composite request object containing the key and\nvalue\n@return Version of the value for the successful put"
] | [
"Reads OAuth 2.0 with JWT app configurations from the reader. The file should be in JSON format.\n\n@param reader a reader object which points to a JSON formatted configuration file\n@return a new Instance of BoxConfig\n@throws IOException when unable to access the mapping file's content of the reader",
"Separate... |
protected Integer getCorrectIndex(Integer index) {
Integer size = jsonNode.size();
Integer newIndex = index;
// reverse walking through the array
if(index < 0) {
newIndex = size + index;
}
// the negative index would be greater than the size a second time!
if(newIndex < 0) {
th... | [
"fetch correct array index if index is less than 0\n\nArrayNode will convert all negative integers into 0...\n\n@param index wanted index\n@return {@link Integer} new index"
] | [
"Sets the value of the setting with the specified key.\n\n@param key name of the setting\n@param value the setting value\n@return this {@code EnvironmentConfig} instance",
"Execute a partitioned query using an index and a query selector.\n\nOnly available in partitioned databases. To verify a database is partit... |
private void throwOrWarnAboutDescriptorProblem(String message) {
if (validateDescriptions) {
throw new IllegalArgumentException(message);
}
ControllerLogger.ROOT_LOGGER.warn(message);
} | [
"Throws an exception or logs a message\n\n@param message The message for the exception or the log message. Must be internationalized"
] | [
"Parse the XML for a collection as returned by getTree call.\n\n@param collectionElement\n@return",
"This method returns the actual raw class associated with the specified\ntype.",
"Either a single file extension or a comma-separated list of extensions for which the language\nshall be registered.",
"Gets the ... |
public void addProcedureArgument(ProcedureArgumentDef argDef)
{
argDef.setOwner(this);
_procedureArguments.put(argDef.getName(), argDef);
} | [
"Adds a procedure argument definition to this class descriptor.\n\n@param argDef The procedure argument definition"
] | [
"Build call for postUiAutopilotWaypoint\n\n@param addToBeginning\nWhether this solar system should be added to the beginning of\nall waypoints (required)\n@param clearOtherWaypoints\nWhether clean other waypoints beforing adding this one\n(required)\n@param destinationId\nThe destination to travel to, can be solar ... |
private void initAdapter()
{
Connection tmp = null;
DatabaseMetaData meta = null;
try
{
tmp = _ds.getConnection();
meta = tmp.getMetaData();
product = meta.getDatabaseProductName().toLowerCase();
}
catch (SQLException e)
{
... | [
"Creates the adapter for the target database."
] | [
"this method will be invoked after methodToBeInvoked is invoked",
"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",
"Gets the actual type arguments of a class\n\n@param clazz The class to exa... |
public static nsrpcnode get(nitro_service service, String ipaddress) throws Exception{
nsrpcnode obj = new nsrpcnode();
obj.set_ipaddress(ipaddress);
nsrpcnode response = (nsrpcnode) obj.get_resource(service);
return response;
} | [
"Use this API to fetch nsrpcnode resource of given name ."
] | [
"Create the service name for a channel\n\n@param channelName\nthe channel name\n@return the service name",
"Read metadata by populating an instance of the target class\nusing SAXParser.",
"Print a resource UID.\n\n@param value resource UID value\n@return resource UID string",
"Use this API to fetch all the cl... |
public BoxFile.Info upload(BoxAPIConnection boxApi, String folderId, InputStream stream, URL url,
String fileName, long fileSize) throws InterruptedException, IOException {
//Create a upload session
BoxFileUploadSession.Info session = this.createUploadSession(boxApi, folde... | [
"Uploads a new large file.\n@param boxApi the API connection to be used by the upload session.\n@param folderId the id of the folder in which the file will be uploaded.\n@param stream the input stream that feeds the content of the file.\n@param url the upload session URL.\n@param fileName the name of the file to be... | [
"Sets all elements in this matrix to their absolute values. Note\nthat this operation is in-place.\n@see MatrixFunctions#abs(DoubleMatrix)\n@return this matrix",
"Gets the JsonObject representation of the given field object.\n@param field represents a template field\n@return the json object",
"Create and serial... |
protected void postDestroyConnection(ConnectionHandle handle){
ConnectionPartition partition = handle.getOriginatingPartition();
if (this.finalizableRefQueue != null && handle.getInternalConnection() != null){ //safety
this.finalizableRefs.remove(handle.getInternalConnection());
// assert o != null : ... | [
"Update counters and call hooks.\n@param handle connection handle."
] | [
"This method writes data for a single calendar to a Planner file.\n\n@param mpxjCalendar MPXJ calendar instance\n@param plannerCalendar Planner calendar instance\n@throws JAXBException on xml creation errors",
"Create a unique signature for this shader.\nThe signature for simple shaders is just the class name.\nF... |
protected void createSetterMethod(ClassNode declaringClass, PropertyNode propertyNode, String setterName, Statement setterBlock) {
MethodNode setter = new MethodNode(
setterName,
propertyNode.getModifiers(),
ClassHelper.VOID_TYPE,
params(param... | [
"Creates a setter method with the given body.\n\n@param declaringClass the class to which we will add the setter\n@param propertyNode the field to back the setter\n@param setterName the name of the setter\n@param setterBlock the statement representing the setter block"
] | [
"Create a clone of this LevenbergMarquardt optimizer with a new vector for the\ntarget values and weights.\n\nThe clone will use the same objective function than this implementation,\ni.e., the implementation of {@link #setValues(RandomVariable[], RandomVariable[])} and\nthat of {@link #setDerivatives(RandomVariabl... |
public List<Module> getModules(final Map<String, String> filters) throws GrapesCommunicationException {
final Client client = getClient();
WebResource resource = client.resource(serverURL).path(RequestUtils.getAllModulesPath());
for(final Map.Entry<String,String> queryParam: filters.entrySet()){... | [
"Get a list of modules regarding filters\n\n@param filters Map<String,String>\n@return List<Module>\n@throws GrapesCommunicationException"
] | [
"returns controller if a new device is found",
"Return a string that ensures that no line is longer then 512 characters\nand lines are broken according to manifest specification.\n\n@param input The buffer containing the content that should be made safe\n@param newline The string to use to create newlines (usuall... |
public void setVelocityRange( final Vector3f minV, final Vector3f maxV )
{
if (null != mGVRContext) {
mGVRContext.runOnGlThread(new Runnable() {
@Override
public void run() {
minVelocity = minV;
maxVelocity = maxV;
... | [
"The range of velocities that a particle generated from this emitter can have.\n@param minV Minimum velocity that a particle can have\n@param maxV Maximum velocity that a particle can have"
] | [
"Gets the flags associated with this attribute.\n@return the flags. Will not return {@code null}",
"Returns s if it's at most maxWidth chars, otherwise chops right side to fit.",
"Use this API to add autoscaleaction resources.",
"Use this API to add snmpmanager.",
"Use this API to fetch vpnvserver_authentic... |
public boolean isRunning(final ProcessorGraphNode processorGraphNode) {
this.processorLock.lock();
try {
return this.runningProcessors.containsKey(processorGraphNode.getProcessor());
} finally {
this.processorLock.unlock();
}
} | [
"Return true if the processor of the node is currently being executed.\n\n@param processorGraphNode the node to test."
] | [
"Note that if there is sleep in this method.\n\n@param stopCount\nthe stop count",
"we have only one implementation on classpath.",
"Set the group name\n\n@param name new name of server group\n@param id ID of group",
"Return a stream of resources from a response\n\n@param response the response\n@param <R> ... |
@Override
public void sendResponse(StoreStats performanceStats,
boolean isFromLocalZone,
long startTimeInMs) throws Exception {
ChannelBuffer responseContent = ChannelBuffers.dynamicBuffer(this.responseValue.length);
responseContent.writeByt... | [
"Sends a normal HTTP response containing the serialization information in\na XML format"
] | [
"Starts advertising on Hyperbahn at a fixed interval.\n\n@return a future that resolves to the response of the first advertise request",
"Creates and returns a matrix which is idential to this one.\n\n@return A new identical matrix.",
"Notifies that a content item is changed.\n\n@param position the position.",
... |
@SuppressWarnings({"unchecked", "unused"})
public static <T> T[] object2Array(final Class<T> clazz, final Object obj) {
return (T[]) obj;
} | [
"We try to convert an Object to an Array and this is not easy in Java so we need a little bit of nasty magic.\n\n@param <T> Type of elements\n@param clazz Clazz of the Objct elements\n@param obj Object\n@return Array"
] | [
"Creates a setter method with the given body.\n\n@param declaringClass the class to which we will add the setter\n@param propertyNode the field to back the setter\n@param setterName the name of the setter\n@param setterBlock the statement representing the setter block",
"Create a Count-Query for Q... |
public static NodeList evaluateXpathExpression(String domStr, String xpathExpr)
throws XPathExpressionException, IOException {
Document dom = DomUtils.asDocument(domStr);
return evaluateXpathExpression(dom, xpathExpr);
} | [
"Returns the list of nodes which match the expression xpathExpr in the String domStr.\n\n@return the list of nodes which match the query\n@throws XPathExpressionException\n@throws IOException"
] | [
"Deal with streams attached to an operation response from a proxied domain process.\n\n@param context the context of the operation\n@param responseNode the DMR response from the proxied process\n@param streams the streams associated with the response",
"Return true if the values of the two vectors are equal when ... |
public static Chart getMSDLineWithConfinedModelChart(Trajectory t, int lagMin,
int lagMax, double timelag, double a, double b, double c, double d) {
double[] xData = new double[lagMax - lagMin + 1];
double[] yData = new double[lagMax - lagMin + 1];
double[] modelData = new double[lagMax - lagMin + 1];
MeanS... | [
"Plots the MSD curve with the trajectory t and adds the fitted model for confined diffusion above.\n@param t Trajectory to calculate the msd curve\n@param lagMin Minimum timelag (e.g. 1,2,3..) lagMin*timelag = elapsed time in seconds\n@param lagMax Maximum timelag (e.g. 1,2,3..) lagMax*timelag = elapsed time in sec... | [
"Creates the udpClient with proper handler.\n\n@return the bound request builder\n@throws HttpRequestCreateException\nthe http request create exception",
"Creates the default editor state for editing a bundle with descriptor.\n@return the default editor state for editing a bundle with descriptor.",
"Use this AP... |
@Pure
public static <P1, P2, P3, RESULT> Function2<P2, P3, RESULT> curry(final Function3<? super P1, ? super P2, ? super P3, ? extends RESULT> function,
final P1 argument) {
if (function == null)
throw new NullPointerException("function");
return new Function2<P2, P3, RESULT>() {
@Override
public RESUL... | [
"Curries a function that takes three arguments.\n\n@param function\nthe original function. May not be <code>null</code>.\n@param argument\nthe fixed first argument of {@code function}.\n@return a function that takes two arguments. Never <code>null</code>."
] | [
"Convert the MSPDI representation of a UUID into a Java UUID instance.\n\n@param value MSPDI UUID\n@return Java UUID instance",
"Gets all checked widget indexes in the group. The indexes are counted from 0 to size -1,\nwhere size is the number of Checkable widgets in the group. It does not take into account\nany ... |
public static String[] tokenizeUnquoted(String s) {
List tokens = new LinkedList();
int first = 0;
while (first < s.length()) {
first = skipWhitespace(s, first);
int last = scanToken(s, first);
if (first < last) {
tokens.add(s.substring(... | [
"This method tokenizes a string by space characters,\nbut ignores spaces in quoted parts,that are parts in\n'' or \"\". The method does allows the usage of \"\" in ''\nand '' in \"\". The space character between tokens is not\nreturned.\n\n@param s the string to tokenize\n@return the tokens"
] | [
"Additional bean deployment archives are used for extentions, synthetic annotated types and beans which do not come from a bean archive.\n\n@param beanClass\n@return the additional bean deployment archive",
"Sets the global. Does not add the global to the ExecutionResults.\n\n@param identifier\nThe identifier of ... |
@SuppressWarnings("serial")
private Button createSaveExitButton() {
Button saveExitBtn = CmsToolBar.createButton(
FontOpenCms.SAVE_EXIT,
m_messages.key(Messages.GUI_BUTTON_SAVE_AND_EXIT_0));
saveExitBtn.addClickListener(new ClickListener() {
public void buttonCl... | [
"Creates the save and exit button UI Component.\n@return the save and exit button."
] | [
"Returns the configured page sizes, or the default page size if no core is configured.\n@return The configured page sizes, or the default page size if no core is configured.",
"Returns the list of user defined attribute names.\n\n@return the list of user defined attribute names, if there are none it returns an em... |
public NRShape makeShape(Date from, Date to) {
UnitNRShape fromShape = tree.toUnitShape(from);
UnitNRShape toShape = tree.toUnitShape(to);
return tree.toRangeShape(fromShape, toShape);
} | [
"Makes an spatial shape representing the time range defined by the two specified dates.\n\n@param from the start {@link Date}\n@param to the end {@link Date}\n@return a shape"
] | [
"Get the directory where the compiled jasper reports should be put.\n\n@param configuration the configuration for the current app.",
"Get an interpolated value for a given argument x.\n\n@param x The abscissa at which the interpolation should be performed.\n@return The interpolated value (ordinate).",
"Finds th... |
public void setPerms(String photoId, Permissions permissions) throws FlickrException {
Map<String, Object> parameters = new HashMap<String, Object>();
parameters.put("method", METHOD_SET_PERMS);
parameters.put("photo_id", photoId);
parameters.put("is_public", permissions.isPublicFl... | [
"Set the permissions for the photo.\n\nThis method requires authentication with 'write' permission.\n\n@param photoId\nThe photo ID\n@param permissions\nThe permissions object\n@throws FlickrException"
] | [
"Updates the terms and statements of the item document identified by the\ngiven item id. The updates are computed with respect to the current data\nfound online, making sure that no redundant deletions or duplicate insertions\nhappen. The references of duplicate statements will be merged. The labels\nand aliases in... |
public static base_response add(nitro_service client, vlan resource) throws Exception {
vlan addresource = new vlan();
addresource.id = resource.id;
addresource.aliasname = resource.aliasname;
addresource.ipv6dynamicrouting = resource.ipv6dynamicrouting;
return addresource.add_resource(client);
} | [
"Use this API to add vlan."
] | [
"Answer the orderBy of all Criteria and Sub Criteria\nthe elements are of class Criteria.FieldHelper\n@return List",
"Read data for a single column.\n\n@param startIndex block start\n@param length block length",
"I promise that this is always a collection of HazeltaskTasks",
"Get info for a given topic\n\n@pa... |
protected int _countPeriods(String str)
{
int commas = 0;
for (int i = 0, end = str.length(); i < end; ++i) {
int ch = str.charAt(i);
if (ch < '0' || ch > '9') {
if (ch == '.') {
++commas;
} else {
return... | [
"Helper method to find Strings of form \"all digits\" and \"digits-comma-digits\""
] | [
"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",
"This method maps the currency symbol position from the\nrepresentation used in the MPP file to the representation\nuse... |
public static base_response delete(nitro_service client, systementitydata resource) throws Exception {
systementitydata deleteresource = new systementitydata();
deleteresource.type = resource.type;
deleteresource.name = resource.name;
deleteresource.alldeleted = resource.alldeleted;
deleteresource.allinactive... | [
"Use this API to delete systementitydata."
] | [
"Given a layer ID, search for the WMS layer.\n\n@param layerId layer id\n@return WMS layer or null if layer is not a WMS layer",
"Not used.",
"Uses an IdentityMap to make sure we don't recurse infinitely on the same object in a cyclic object model.\nProxies\n@param obj\n@return",
"Checks the preconditions for... |
protected String getIsolationLevelAsString()
{
if (defaultIsolationLevel == IL_READ_UNCOMMITTED)
{
return LITERAL_IL_READ_UNCOMMITTED;
}
else if (defaultIsolationLevel == IL_READ_COMMITTED)
{
return LITERAL_IL_READ_COMMITTED;
}
... | [
"returns IsolationLevel literal as matching\nto the corresponding id\n@return the IsolationLevel literal"
] | [
"append multi clickable SpecialUnit or String\n\n@param specialClickableUnit SpecialClickableUnit\n@param specialUnitOrStrings Unit Or String\n@return",
"Parse currency.\n\n@param value currency value\n@return currency value",
"Creates an temporary directory. The created directory will be deleted when\ncommand ... |
protected void appenHtmlFooter(StringBuffer buffer) {
if (m_configuredFooter != null) {
buffer.append(m_configuredFooter);
} else {
buffer.append(" </body>\r\n" + "</html>");
}
} | [
"Append the html-code to finish a html mail message to the given buffer.\n\n@param buffer The StringBuffer to add the html code to."
] | [
"Return the list of module ancestors\n\n@param moduleName\n@param moduleVersion\n@return List<Dependency>\n@throws GrapesCommunicationException",
"Computes the square root of the complex number.\n\n@param input Input complex number.\n@param root Output. The square root of the input",
"Use this API to fetch the ... |
protected String getJavaExecutablePath() {
String executableName = isWindows() ? "bin/java.exe" : "bin/java";
return PROPERTIES.getJavaHome().resolve(executableName).toAbsolutePath().toString();
} | [
"Returns the path to java executable."
] | [
"Checks whether table name and key column names of the given joinable and inverse collection persister match.",
"Sets the provided filters.\n@param filters a map \"column id -> filter\".",
"Returns a SimpleConfiguration clientConfig with properties set from this configuration\n\n@return SimpleConfiguration",
... |
private void clearQueues(final Context context) {
synchronized (eventLock) {
DBAdapter adapter = loadDBAdapter(context);
DBAdapter.Table tableName = DBAdapter.Table.EVENTS;
adapter.removeEvents(tableName);
tableName = DBAdapter.Table.PROFILE_EVENTS;
... | [
"Only call async"
] | [
"Gets all tags that are \"prime\" tags.",
"Add an extension to the set of extensions.\n\n@param extension an extension",
"Gracefully stop the engine",
"Acquire the exclusive lock allowing the acquisition to be interrupted.\n@param permit - the permit Integer for this operation. May not be {@code null}.\n@thro... |
protected String failMsg(final Throwable thrwbl, final String queue, final Job job) throws IOException {
final JobFailure failure = new JobFailure();
failure.setFailedAt(new Date());
failure.setWorker(this.name);
failure.setQueue(queue);
failure.setPayload(job);
failure.s... | [
"Create and serialize a JobFailure.\n\n@param thrwbl the Throwable that occurred\n@param queue the queue the job came from\n@param job the Job that failed\n@return the JSON representation of a new JobFailure\n@throws IOException if there was an error serializing the JobFailure"
] | [
"generate a message for loglevel FATAL\n\n@param pObject the message Object",
"Gets the Jensen Shannon divergence.\n\n@param p U vector.\n@param q V vector.\n@return The Jensen Shannon divergence between u and v.",
"If the given result is not cudnnStatus.CUDNN_STATUS_SUCCESS\nand exceptions have been enabled, t... |
public static synchronized DeckReference getDeckReference(int player, int hotCue) {
Map<Integer, DeckReference> playerMap = instances.get(player);
if (playerMap == null) {
playerMap = new HashMap<Integer, DeckReference>();
instances.put(player, playerMap);
}
DeckR... | [
"Get a unique reference to a place where a track is currently loaded in a player.\n\n@param player the player in which the track is loaded\n@param hotCue hot cue number in which the track is loaded, or 0 if it is actively loaded on the playback deck\n\n@return the instance that will always represent a reference to ... | [
"Get the relative path of an application\n\n@param root the root to relativize against\n@param path the path to relativize\n@return the relative path",
"Gives the \"roots\" of a list of folders, i.e. the list of folders which are not descendants of any other folders in the original list\n@param folders the origin... |
private IndexedContainer createContainerForBundleWithoutDescriptor() throws IOException, CmsException {
IndexedContainer container = new IndexedContainer();
// create properties
container.addContainerProperty(TableProperty.KEY, String.class, "");
container.addContainerProperty(TablePro... | [
"Creates the container for a bundle without descriptor.\n@return the container for a bundle without descriptor.\n@throws IOException thrown if reading the bundle fails.\n@throws CmsException thrown if reading the bundle fails."
] | [
"1.5 and on, 2.0 and on, 3.0 and on.",
"Set an outline code value.\n\n@param index outline code index (1-10)\n@param value outline code value",
"Check the version to assure it is allowed.\n\n@param pluginName plugin name which needs the dependency\n@param dependency dependency which needs to be verified\n@param... |
public static String createFirstLowCaseName(String scenarioDescription) {
String[] words = scenarioDescription.trim().split(" ");
String name = "";
for (int i = 0; i < words.length; i++) {
name += changeFirstLetterToCapital(words[i]);
}
return changeFirstLetterToLower... | [
"Given a string with method or package name, creates a Class Name with no\nspaces and first letter lower case\n\n@param String\n- The name of the scenario/story. It should be in lower case.\n@returns String - The class name"
] | [
"Returns the site path for the edited bundle file.\n\n@return the site path for the edited bundle file.",
"Extract raw table data from the input stream.\n\n@param is input stream",
"Transform the given bytes into an object.\n\n@param bytes The bytes to construct the object from\n@return The object constructed",... |
public Map<String, String> getUploadParameters() {
Map<String, String> parameters = new TreeMap<>();
String title = getTitle();
if (title != null) {
parameters.put("title", title);
}
String description = getDescription();
if (description != null) ... | [
"Get the upload parameters.\n@return"
] | [
"This handler will be triggered when there's no search result",
"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",
"A specific, existi... |
@Override
public Result getResult() throws Exception {
Result returnResult = result;
// If we've chained to other Actions, we need to find the last result
while (returnResult instanceof ActionChainResult) {
ActionProxy aProxy = ((ActionChainResult) returnResult).getProxy();
if (aProxy != null) {
Resu... | [
"If the DefaultActionInvocation has been executed before and the Result is\nan instance of ActionChainResult, this method will walk down the chain of\nActionChainResults until it finds a non-chain result, which will be\nreturned. If the DefaultActionInvocation's result has not been executed\nbefore, the Result inst... | [
"Determines if entry is accepted. For normal usage, this means confirming that the key is\nneeded. For orphan usage, this simply means confirming the key belongs to the node.\n\n@param key\n@return true iff entry is accepted.",
"Look up record by identity.",
"This should be called from a subclass constructor, i... |
private <T extends Index> List<T> listIndexType(String type, Class<T> modelType) {
List<T> indexesOfType = new ArrayList<T>();
Gson g = new Gson();
for (JsonElement index : indexes) {
if (index.isJsonObject()) {
JsonObject indexDefinition = index.getAsJsonObject();
... | [
"Utility to list indexes of a given type.\n\n@param type the type of index to list, null means all types\n@param modelType the class to deserialize the index into\n@param <T> the type of the index\n@return the list of indexes of the specified type"
] | [
"Creates an immutable list that consists of the elements in the given collection. If the given collection is already an immutable list,\nit is returned directly.\n\n@param source the given collection\n@return an immutable list",
"Parse a map of objects from a JsonParser.\n\n@param jsonParser The JsonParser, preco... |
static void endInitialization(WeldContainer container, boolean isShutdownHookEnabled) {
container.complete();
// If needed, register one shutdown hook for all containers
if (shutdownHook == null && isShutdownHookEnabled) {
synchronized (LOCK) {
if (shutdownHook == nul... | [
"Finish the initialization.\n\n@param container\n@param isShutdownHookEnabled"
] | [
"Arrange to become the tempo master. Starts a sequence of interactions with the other players that should end\nup with us in charge of the group tempo and beat alignment.\n\n@throws IllegalStateException if we are not sending status updates\n@throws IOException if there is a problem sending the master yield request... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.