query
stringlengths 74
6.1k
| positive
sequencelengths 1
1
| negative
sequencelengths 9
9
|
---|---|---|
public Operation.Info create( char op , Variable input ) {
switch( op ) {
case '\'':
return Operation.transpose(input, managerTemp);
default:
throw new RuntimeException("Unknown operation " + op);
}
} | [
"Create a new instance of a single input function from an operator character\n@param op Which operation\n@param input Input variable\n@return Resulting operation"
] | [
"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 exception type map",
"Set a callback to handle any exceptions in the chain of execution.\n\n@param callback\nInstance of {@link ErrorCallback}.\n@return Reference to the {@code ExecutionChain}\n@throws IllegalStateException\nif the chain of execution has already been {@link #execute()\nstarted}.",
"Returns a presentable version of the given PTB-tokenized text.\nPTB tokenization splits up punctuation and does various other things\nthat makes simply joining the tokens with spaces look bad. So join\nthe tokens with space and run it through this method to produce nice\nlooking text. It's not perfect, but it works pretty well.\n\n@param ptbText A String in PTB3-escaped form\n@return An approximation to the original String",
"Removes a design document using the id and rev from the database.\n\n@param id the document id (optionally prefixed with \"_design/\")\n@param rev the document revision\n@return {@link DesignDocument}",
"Sets the initial MoificationState of the wrapped object myObj. The initial state will be StateNewDirty if myObj\nis not persisten already. The state will be set to StateOldClean if the object is already persistent.",
"Commit all changes if there are uncommitted changes.\n\n@param msg the commit message.\n@throws GitAPIException",
"Returns an attribute's value from a non-main section of this JAR's manifest.\n\n@param section the manifest's section\n@param name the attribute's name",
"Use this API to add vpnsessionaction.",
"A convenient way of creating a map on the fly.\n\n@param <K> the key type\n@param <V> the value type\n@param entries\nMap.Entry objects to be added to the map\n@return a LinkedHashMap with the supplied entries"
] |
private RecurrenceType getRecurrenceType(int value)
{
RecurrenceType result;
if (value < 0 || value >= RECURRENCE_TYPES.length)
{
result = null;
}
else
{
result = RECURRENCE_TYPES[value];
}
return result;
} | [
"Retrieve the recurrence type.\n\n@param value integer value\n@return RecurrenceType instance"
] | [
"Remove an read lock.",
"Extracts the nullity of a matrix using a preexisting decomposition.\n\n@see #singularThreshold(SingularValueDecomposition_F64)\n\n@param svd A precomputed decomposition. Not modified.\n@param threshold Tolerance used to determine of a singular value is singular.\n@return The nullity of the decomposed matrix.",
"Creates new row in table\n@param broker\n@param field\n@param sequenceName\n@param maxKey\n@throws Exception",
"Turn a resultset into EndpointOverride\n\n@param results results containing relevant information\n@return EndpointOverride\n@throws Exception exception",
"Parse a duration value.\n\n@param value duration value\n@return Duration instance",
"Return the score of the specified element of the sorted set at key.\n@param member\n@return The score value or <code>null</code> if the element does not exist in the set.",
"todo move to commonops",
"Create the exception assignment map.\n\n@param rows calendar rows\n@return exception assignment map",
"Returns the vertex points in this hull.\n\n@return array of vertex points\n@see QuickHull3D#getVertices(double[])\n@see QuickHull3D#getFaces()"
] |
public static Authentication build(String crypt) throws IllegalArgumentException {
if(crypt == null) {
return new PlainAuth(null);
}
String[] value = crypt.split(":");
if(value.length == 2 ) {
String type = value[0].trim();
String password = value[1].trim();
if(password!=null&&password.length()>0) {
if("plain".equals(type)) {
return new PlainAuth(password);
}
if("md5".equals(type)) {
return new Md5Auth(password);
}
if("crc32".equals(type)) {
return new Crc32Auth(Long.parseLong(password));
}
}
}
throw new IllegalArgumentException("error password: "+crypt);
} | [
"build an Authentication.\n\nTypes:\n<ul>\n<li>plain:jafka</li>\n<li>md5:77be29f6d71ec4e310766ddf881ae6a0</li>\n<li>crc32:1725717671</li>\n</ul>\n@param crypt password style\n@return an authentication\n@throws IllegalArgumentException password error"
] | [
"Sets the day of the month that matches the condition, i.e., the day of month of the 2nd Saturday.\nIf the day does not exist in the current month, the last possible date is set, i.e.,\ninstead of the fifth Saturday, the fourth is chosen.\n\n@param date date that has the correct year and month already set.\n@param week the number of the week to choose.",
"Boyer Moore scan that proceeds forwards from the end of the file looking for the first LOCSIG",
"Use this API to fetch a vpnglobal_auditnslogpolicy_binding resources.",
"To read an object in a quick & dirty way. Prepare to handle failures when object serialization changes!",
"Creates metadata on this folder using a specified scope and template.\n\n@param templateName the name of the metadata template.\n@param scope the scope of the template (usually \"global\" or \"enterprise\").\n@param metadata the new metadata values.\n@return the metadata returned from the server.",
"Run a task once, after a delay.\n\n@param task\nTask to run.\n@param delay\nUnit is seconds.\n@return An interface that lets you query the status; cancel; or\nreschedule the event.",
"Sets the left padding for all cells in the table.\n@param paddingLeft new padding, ignored if smaller than 0\n@return this to allow chaining",
"Get the relative path.\n\n@return the relative path",
"Utility method to register a proxy has a Service in OSGi."
] |
private void processClientId(HttpServletRequest httpServletRequest, History history) {
// get the client id from the request header if applicable.. otherwise set to default
// also set the client uuid in the history object
if (httpServletRequest.getHeader(Constants.PROFILE_CLIENT_HEADER_NAME) != null &&
!httpServletRequest.getHeader(Constants.PROFILE_CLIENT_HEADER_NAME).equals("")) {
history.setClientUUID(httpServletRequest.getHeader(Constants.PROFILE_CLIENT_HEADER_NAME));
} else {
history.setClientUUID(Constants.PROFILE_CLIENT_DEFAULT_ID);
}
logger.info("Client UUID is: {}", history.getClientUUID());
} | [
"Apply the matching client UUID for the request\n\n@param httpServletRequest\n@param history"
] | [
"Read a single field alias from an extended attribute.\n\n@param attribute extended attribute",
"Finds the magnitude of the largest element in the row\n@param A Complex matrix\n@param row Row in A\n@param col0 First column in A to be copied\n@param col1 Last column in A + 1 to be copied\n@return magnitude of largest element",
"Init after constructor",
"Attaches a pre-existing set of hours to the correct\nday within the calendar.\n\n@param hours calendar hours instance",
"Attempts to detect the provided pattern as an exact match.\n@param pattern the pattern to find in the reader stream\n@return the number of times the pattern is found,\nor an error code\n@throws MalformedPatternException if the pattern is invalid\n@throws Exception if a generic error is encountered",
"Delete inactive contents.",
"Parses command-line and verifies metadata versions on all the cluster\nnodes\n\n@param args Command-line input\n@param printHelp Tells whether to print help only or execute command\nactually\n@throws IOException",
"Use this API to create sslfipskey.",
"Reads primary key information from current RS row and generates a\n\ncorresponding Identity, and returns a proxy from the Identity.\n\n@throws PersistenceBrokerException\nif there was an error creating the proxy class"
] |
public static base_response clear(nitro_service client, Interface resource) throws Exception {
Interface clearresource = new Interface();
clearresource.id = resource.id;
return clearresource.perform_operation(client,"clear");
} | [
"Use this API to clear Interface."
] | [
"detect if WS Addressing feature already enabled.\n\n@param provider the interceptor provider\n@param bus the bus\n@return true, if successful",
"Pauses a given deployment\n\n@param deployment The deployment to pause\n@param listener The listener that will be notified when the pause is complete",
"Get logs for an app by specifying additional parameters.\n@param logRequest See {LogRequestBuilder}\n@return log stream response",
"Writes the details of a recurring exception.\n\n@param mpxjException source MPXJ calendar exception\n@param xmlException target MSPDI exception",
"Initialize the domain registry.\n\n@param registry the domain registry",
"Generates a download id for the request and adds the download request to the download request queue for the dispatchers pool to act on immediately.\n\n@param request\n@return downloadId",
"Get or create the log context based on the logging profile.\n\n@param loggingProfile the logging profile to get or create the log context for\n\n@return the log context that was found or a new log context",
"Start the actual migration. Take the version of the database, get all required migrations and execute them or do\nnothing if the DB is already up to date.\n\nAt the end the underlying database instance is closed.\n\n@throws MigrationException if a migration fails",
"performs a DELETE operation against RDBMS.\n@param cld ClassDescriptor providing mapping information.\n@param obj The object to be deleted."
] |
public static int read(ReadableByteChannel channel, ByteBuffer buffer) throws IOException {
int count = channel.read(buffer);
if (count == -1) throw new EOFException("Received -1 when reading from channel, socket has likely been closed.");
return count;
} | [
"read data from channel to buffer\n\n@param channel readable channel\n@param buffer bytebuffer\n@return read size\n@throws IOException any io exception"
] | [
"Resize picture to desired size.\n\n@param width Desired width.\n@param height Desired height.\n@throws IllegalArgumentException if {@code width} or {@code height} is less than 0 or both are\n0.",
"Sets the name of the designated bone.\n\n@param boneindex zero based index of bone to rotate.\n@param bonename string with name of bone.\n. * @see #getBoneName",
"Parse the json string to the diagram model, assumes that the json is\nhierarchical ordered\n@param json\n@return Model with all shapes defined in JSON\n@throws org.json.JSONException",
"Populates data in this Options from the character stream.\n@param in The Reader\n@throws IOException If there is a problem reading data",
"Calculates a md5 hash for an url\n\nIf a passed in url is absent then this method will return absent as well\n\n@param url - an url to a soy template file\n@return - md5 checksum of a template file\n@throws IOException - in a case there is an IO error calculating md5 checksum",
"Returns an iterator over the items in this folder.\n\n@return an iterator over the items in this folder.",
"Appends the indentation string at the current position of the parent and adds a new composite node, indicating the same indentation for\nsubsequent lines.\n\n@return an indentation node, using the given indentString, appended as a child on the given parent",
"This is a temporary measure until we have a type-safe solution for\nretrieving serializers from a SerializerFactory. It avoids warnings all\nover the codebase while making it easy to verify who calls it.",
"Use this API to fetch all the bridgetable resources that are configured on netscaler."
] |
public static String createUnquotedConstant(String str) {
if (str == null || str.isEmpty()) {
return str;
}
if (str.startsWith("\"")) {
str = str.substring(1);
}
if (str.endsWith("\"")) {
str = str.substring(0,
str.length() - 1);
}
return str;
} | [
"Removes double-quotes from around a string\n@param str\n@return"
] | [
"Retrieve and validate vector clock value from the REST request.\n\"X_VOLD_VECTOR_CLOCK\" is the vector clock header.\n\n@return true if present, false if missing",
"Adds version information.",
"Called when the surface is created or recreated. Avoided because this can\nbe called twice at the beginning.",
"Compute a Catmull-Rom spline for RGB values, but with variable knot spacing.\n@param x the input parameter\n@param numKnots the number of knots in the spline\n@param xknots the array of knot x values\n@param yknots the array of knot y values\n@return the spline value",
"This method is used to configure the primary and alternative\nformat patterns.\n\n@param primaryPattern new format pattern\n@param alternativePatterns alternative format patterns\n@param decimalSeparator Locale specific decimal separator to replace placeholder\n@param groupingSeparator Locale specific grouping separator to replace placeholder",
"Add a column to be set to a value for UPDATE statements. This will generate something like columnName = 'value'\nwith the value escaped if necessary.",
"Generates a column for the given field and adds it to the table.\n\n@param fieldDef The field\n@param tableDef The table\n@return The column def",
"Reads Phoenix resource assignments.\n\n@param mpxjResource MPXJ resource\n@param res Phoenix resource",
"A simple helper method that creates a pool of connections to Redis using\nthe supplied configurations.\n\n@param jesqueConfig the config used to create the pooled Jedis connections\n@param poolConfig the config used to create the pool\n@return a configured Pool of Jedis connections"
] |
public String format() {
if (getName().equals("*")) {
return "*";
}
else {
StringBuilder sb = new StringBuilder();
if (isWeak()) {
sb.append("W/");
}
return sb.append('"').append(getName()).append('"').toString();
}
} | [
"Returns tag formatted as an HTTP tag string.\n\n@return The formatted HTTP tag string.\n\n@see <a\nhref=\"http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.11\">HTTP\nEntity Tags</a>"
] | [
"Gets or creates the a resource for the sub-deployment on the parent deployments resource.\n\n@param deploymentName the name of the deployment\n@param parent the parent deployment used to find the parent resource\n\n@return the already registered resource or a newly created resource",
"Exchanges the final messages which politely report our intention to disconnect from the dbserver.",
"Queries database meta data to check for the existence of\nspecific tables.",
"Returns the configured fields of the current field configuration.\n\n@return the configured fields of the current field configuration",
"Returns a set of the distinct colours used in this image.\n\n@return the set of distinct Colors",
"Mapping originator.\n\n@param originator the originator\n@return the originator type",
"Handles Multi Instance Encapsulation message. Decapsulates\nan Application Command message and handles it using the right\ninstance.\n@param serialMessage the serial message to process.\n@param offset the offset at which to start procesing.",
"Add the final assignment of the property to the partial value object's source code.",
"Read the given source byte array, then overwrite this buffer's contents\n\n@param src source byte array\n@param srcOffset offset in source byte array to read from\n@param destOffset offset in this buffer to read to\n@param length max number of bytes to read\n@return the number of bytes read"
] |
public static appfwlearningdata[] get(nitro_service service, appfwlearningdata_args args) throws Exception{
appfwlearningdata obj = new appfwlearningdata();
options option = new options();
option.set_args(nitro_util.object_to_string_withoutquotes(args));
appfwlearningdata[] response = (appfwlearningdata[])obj.get_resources(service, option);
return response;
} | [
"Use this API to fetch all the appfwlearningdata resources that are configured on netscaler.\nThis uses appfwlearningdata_args which is a way to provide additional arguments while fetching the resources."
] | [
"This method returns the existing folder, and if it does not exist, the\nmethod generates it.\n\n@param path\n@param dest_dir\n@return the folder\n@throws BeastException",
"Extracts a set of interceptor bindings from a collection of annotations.\n@param beanManager\n@param annotations\n@return",
"Initialize the metadata cache with system store list",
"Validates the return value\n\n@param instance The instance to validate",
"Converts a collection of dates to a JSON array with the long representation of the dates as strings.\n@param dates the list to convert.\n@return JSON array with long values of dates as string",
"Calling this twice will not actually overwrite the gauge\n\n@param collectionSizeGauge",
"Sets the specified integer attribute to the specified value.\n\n@param name name of the attribute\n@param value value of the attribute\n@since 1.9.0",
"Create a counter if one is not defined already, otherwise return the existing one.\n\n@param counterName unique name for the counter\n@param initialValue initial value for the counter\n@return a {@link StrongCounter}",
"Invokes the given configurator, obtaining the correct global context type via the datastore configuration type of\nthe current datastore provider.\n\n@param configurator the configurator to invoke\n@return a context object containing the options set via the given configurator"
] |
public static void mark(DeploymentUnit unit) {
unit = DeploymentUtils.getTopDeploymentUnit(unit);
unit.putAttachment(MARKER, Boolean.TRUE);
} | [
"Mark the top level deployment as being a JPA deployment. If the deployment is not a top level deployment the parent is\nmarked instead"
] | [
"This method retrieves an int value from a String instance.\nIt returns zero by default if a null value or an empty string is supplied.\n\n@param value string representation of an integer\n@return int value",
"Get the label distance..\n\n@param settings Parameters for rendering the scalebar.",
"performs a DELETE operation against RDBMS.\n@param cld ClassDescriptor providing mapping information.\n@param obj The object to be deleted.",
"Print a day.\n\n@param day Day instance\n@return day value",
"Deletes an email alias from this user's account.\n\n<p>The IDs of the user's email aliases can be found by calling {@link #getEmailAliases}.</p>\n\n@param emailAliasID the ID of the email alias to delete.",
"Formats an IPTC string for this reference using information obtained from\nSubject Reference System.\n\n@param srs\nreference subject reference system\n@return IPTC formatted reference",
"Print the method parameter p",
"Use this API to update gslbservice resources.",
"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."
] |
public Token add( Variable variable ) {
Token t = new Token(variable);
push( t );
return t;
} | [
"Adds a variable to the end of the token list\n@param variable Variable which is to be added\n@return The new Token created around variable"
] | [
"Answer true if an Iterator for a Table is already available\n@param aTable\n@return",
"Process TestCaseEvent. You can change current testCase context\nusing this method.\n\n@param event to process",
"Emit a event object with parameters and force all listeners to be called asynchronously.\n\n@param event\nthe target event\n@param args\nthe arguments passed in\n@see #emit(EventObject, Object...)",
"Physically close off the internal connection.\n@param conn",
"Adds a word to the end of the token list\n@param word word which is to be added\n@return The new Token created around symbol",
"If credentials are incorrect or not provided for Basic Auth, then Android\nmay throw this exception when an HTTP 401 is received. A separate exception\nis thrown for proxy authentication errors. Checking for this response and\nreturning the proper status.\n@param ex the exception raised from Android\n@return HTTP Status Code",
"Assembles the exception message when the value received by a CellProcessor isn't of the correct type.\n\n@param expectedType\nthe expected type\n@param actualValue\nthe value received by the CellProcessor\n@return the message\n@throws NullPointerException\nif expectedType is null",
"Initializes the service.\n\nStores the <code>Service.Context</code> in instance variables and calls the {@link #init()} method.\n\n@param context Service context.\n@return The list of configuration issues found during initialization, an empty list if none.",
"Determines the mutator method name based on a field name.\n\n@param fieldName\na field name\n@return the resulting method name"
] |
public static int[] randomSubset(int k, int n) {
assert(0 < k && k <= n);
Random r = new Random();
int t = 0, m = 0;
int[] result = new int[k];
while (m < k) {
double u = r.nextDouble();
if ( (n - t) * u < k - m ) {
result[m] = t;
m++;
}
t++;
}
return result;
} | [
"Get a random sample of k out of n elements.\n\nSee Algorithm S, D. E. Knuth, The Art of Computer Programming, Vol. 2, p.142."
] | [
"Called by implementation class once websocket connection established\nat networking layer.\n@param context the websocket context",
"Allows testsuites to shorten the domain timeout adder",
"Set the refresh frequency of this scene object.\nUse NONE for improved performance when the text is set initially and never\nchanged.\n\n@param frequency\nThe refresh frequency of this TextViewSceneObject.",
"Sets the delegate of the service, that gets notified of the\nstatus of message delivery.\n\nNote: This option has no effect when using non-blocking\nconnections.",
"Creates a copy with verbose mode enabled.\n\n@param serverSetups the server setups.\n@return copies of server setups with verbose mode enabled.",
"Use this API to update Interface resources.",
"Identifies the canonical type of an object heuristically.\n\n@return the canonical type identifier of the object's class\naccording to Jackson's type format (see {@link TypeFactory#constructFromCanonical(String)})",
"Whether the address is IPv4-mapped\n\n::ffff:x:x/96 indicates IPv6 address mapped to IPv4",
"this callback is invoked after an Object is materialized\nwithin an IndirectionHandler.\nthis callback allows to defer registration of objects until\nit's really neccessary.\n@param handler the invoking handler\n@param materializedObject the materialized Object"
] |
@Override
public ModelNode resolveValue(ExpressionResolver resolver, ModelNode value) throws OperationFailedException {
// Pass non-OBJECT values through the superclass so it can reject weird values and, in the odd chance
// that's how this object is set up, turn undefined into a default list value.
ModelNode superResult = value.getType() == ModelType.OBJECT ? value : super.resolveValue(resolver, value);
// If it's not an OBJECT (almost certainly UNDEFINED), then nothing more we can do
if (superResult.getType() != ModelType.OBJECT) {
return superResult;
}
// Resolve each field.
// Don't mess with the original value
ModelNode clone = superResult == value ? value.clone() : superResult;
ModelNode result = new ModelNode();
for (AttributeDefinition field : valueTypes) {
String fieldName = field.getName();
if (clone.has(fieldName)) {
result.get(fieldName).set(field.resolveValue(resolver, clone.get(fieldName)));
} else {
// Input doesn't have a child for this field.
// Don't create one in the output unless the AD produces a default value.
// TBH this doesn't make a ton of sense, since any object should have
// all of its fields, just some may be undefined. But doing it this
// way may avoid breaking some code that is incorrectly checking node.has("xxx")
// instead of node.hasDefined("xxx")
ModelNode val = field.resolveValue(resolver, new ModelNode());
if (val.isDefined()) {
result.get(fieldName).set(val);
}
}
}
// Validate the entire object
getValidator().validateParameter(getName(), result);
return result;
} | [
"Overrides the superclass implementation to allow the AttributeDefinition for each field in the\nobject to in turn resolve that field.\n\n{@inheritDoc}"
] | [
"Remove a DAO from the cache. This is necessary if we've registered it already but it throws an exception during\nconfiguration.",
"Mark new or deleted reference elements\n@param broker",
"Reset the Where object so it can be re-used.",
"Returns the list of nodes which match the expression xpathExpr in the Document dom.\n\n@param dom the Document to search in\n@param xpathExpr the xpath query\n@return the list of nodes which match the query\n@throws XPathExpressionException On error.",
"Returns an integer array that contains the current values for all the\ntexture parameters.\n\n@return an integer array that contains the current values for all the\ntexture parameters.",
"Applies the given codec registry to be used alongside the default codec registry.\n\n@param codecRegistry the codec registry to merge in.\n@return an {@link StitchObjectMapper} with the merged codec registries.",
"Registers your facet filters, adding them to this InstantSearch's widgets.\n\n@param filters a List of facet filters.",
"Copies the jdb log files, with additional verification of the checksums.\n\n@param sourceFile\n@param destFile\n@throws IOException",
"Sets the HTML entity translator for all cells in the table.\nIt will also remove any other translator set.\nNothing will happen if the argument is null.\n@param htmlElementTranslator translator\n@return this to allow chaining"
] |
private void processStages() {
// Locate the next step to execute.
ModelNode primaryResponse = null;
Step step;
do {
step = steps.get(currentStage).pollFirst();
if (step == null) {
if (currentStage == Stage.MODEL && addModelValidationSteps()) {
continue;
}
// No steps remain in this stage; give subclasses a chance to check status
// and approve moving to the next stage
if (!tryStageCompleted(currentStage)) {
// Can't continue
resultAction = ResultAction.ROLLBACK;
executeResultHandlerPhase(null);
return;
}
// Proceed to the next stage
if (currentStage.hasNext()) {
currentStage = currentStage.next();
if (currentStage == Stage.VERIFY) {
// a change was made to the runtime. Thus, we must wait
// for stability before resuming in to verify.
try {
awaitServiceContainerStability();
} catch (InterruptedException e) {
cancelled = true;
handleContainerStabilityFailure(primaryResponse, e);
executeResultHandlerPhase(null);
return;
} catch (TimeoutException te) {
// The service container is in an unknown state; but we don't require restart
// because rollback may allow the container to stabilize. We force require-restart
// in the rollback handling if the container cannot stabilize (see OperationContextImpl.releaseStepLocks)
//processState.setRestartRequired(); // don't use our restartRequired() method as this is not reversible in rollback
handleContainerStabilityFailure(primaryResponse, te);
executeResultHandlerPhase(null);
return;
}
}
}
} else {
// The response to the first step is what goes to the outside caller
if (primaryResponse == null) {
primaryResponse = step.response;
}
// Execute the step, but make sure we always finalize any steps
Throwable toThrow = null;
// Whether to return after try/finally
boolean exit = false;
try {
CapabilityRegistry.RuntimeStatus stepStatus = getStepExecutionStatus(step);
if (stepStatus == RuntimeCapabilityRegistry.RuntimeStatus.NORMAL) {
executeStep(step);
} else {
String header = stepStatus == RuntimeCapabilityRegistry.RuntimeStatus.RESTART_REQUIRED
? OPERATION_REQUIRES_RESTART : OPERATION_REQUIRES_RELOAD;
step.response.get(RESPONSE_HEADERS, header).set(true);
}
} catch (RuntimeException | Error re) {
resultAction = ResultAction.ROLLBACK;
toThrow = re;
} finally {
// See if executeStep put us in a state where we shouldn't do any more
if (toThrow != null || !canContinueProcessing()) {
// We're done.
executeResultHandlerPhase(toThrow);
exit = true; // we're on the return path
}
}
if (exit) {
return;
}
}
} while (currentStage != Stage.DONE);
assert primaryResponse != null; // else ModelControllerImpl executed an op with no steps
// All steps ran and canContinueProcessing returned true for the last one, so...
executeDoneStage(primaryResponse);
} | [
"Perform the work of processing the various OperationContext.Stage queues, and then the DONE stage."
] | [
"This method tells you if a ClassNode implements or extends a certain class.\n@param node\nthe node\n@param target\nthe class\n@return\ntrue if the class node 'is a' target",
"Returns the classpath for executable jar.",
"Cretae a BufferedImage from an ImageProducer.\n@param producer the ImageProducer\n@return a new TYPE_INT_ARGB BufferedImage",
"Returns the current transaction for the calling thread.\n\n@throws org.odmg.TransactionNotInProgressException\n{@link org.odmg.TransactionNotInProgressException} if no transaction was found.",
"Parses the result and returns the failure description. If the result was successful, an empty string is\nreturned.\n\n@param result the result of executing an operation\n\n@return the failure message or an empty string",
"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",
"Creates a temporary folder using the given prefix to generate its name.\n@param prefix the prefix string to be used in generating the directory's name; may be <i>null</i>\n@return the <code>File</code> to the newly created folder\n@throws IOException",
"Apply modifications to a content task definition.\n\n@param patchId the patch id\n@param modifications the modifications\n@param definitions the task definitions\n@param filter the content item filter",
"Returns a description a block of work, or \"exit\" if no more blocks exist\n\n@param name the assigned name of the consumer requesting a block of work\n@return a description a block of work, or \"exit\" if no more blocks exist"
] |
public BeanDefinition toInternal(BeanDefinitionInfo beanDefinitionInfo) {
if (beanDefinitionInfo instanceof GenericBeanDefinitionInfo) {
GenericBeanDefinitionInfo genericInfo = (GenericBeanDefinitionInfo) beanDefinitionInfo;
GenericBeanDefinition def = new GenericBeanDefinition();
def.setBeanClassName(genericInfo.getClassName());
if (genericInfo.getPropertyValues() != null) {
MutablePropertyValues propertyValues = new MutablePropertyValues();
for (Entry<String, BeanMetadataElementInfo> entry : genericInfo.getPropertyValues().entrySet()) {
BeanMetadataElementInfo info = entry.getValue();
propertyValues.add(entry.getKey(), toInternal(info));
}
def.setPropertyValues(propertyValues);
}
return def;
} else if (beanDefinitionInfo instanceof ObjectBeanDefinitionInfo) {
ObjectBeanDefinitionInfo objectInfo = (ObjectBeanDefinitionInfo) beanDefinitionInfo;
return createBeanDefinitionByIntrospection(objectInfo.getObject());
} else {
throw new IllegalArgumentException("Conversion to internal of " + beanDefinitionInfo.getClass().getName()
+ " not implemented");
}
} | [
"Convert from a DTO to an internal Spring bean definition.\n\n@param beanDefinitionDto The DTO object.\n@return Returns a Spring bean definition."
] | [
"Retrieve the number of minutes per month for this calendar.\n\n@return minutes per month",
"Reads a single day for a calendar.\n\n@param mpxjCalendar ProjectCalendar instance\n@param day ConceptDraw PROJECT week day",
"Use this API to fetch rnat6_nsip6_binding resources of given name .",
"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\nsession.\n\ncopied form Loader#registerNonExists",
"Register the given mbean with the server\n\n@param server The server to register with\n@param mbean The mbean to register\n@param name The name to register under",
"Check that all nodes in the new cluster have a corresponding entry in\nstoreRepository and innerStores. add a NodeStore if not present, is\nneeded as with rebalancing we can add new nodes on the fly.",
"Detect numbers using comma as a decimal separator and replace with period.\n\n@param value original numeric value\n@return corrected numeric value",
"Fetches the current online data for the given item, and fixes the\nprecision of integer quantities if necessary.\n\n@param itemIdValue\nthe id of the document to inspect\n@param propertyId\nid of the property to consider",
"Checks String to see if the parameter is null.\n@param paramValue Object that will be checked if null.\n@return this.true if the parameter that is being checked is not null"
] |
private void reply(final String response, final boolean error,
final String errorMessage, final String stackTrace,
final String statusCode, final int statusCodeInt) {
if (!sentReply) {
//must update sentReply first to avoid duplicated msg.
sentReply = true;
// Close the connection. Make sure the close operation ends because
// all I/O operations are asynchronous in Netty.
if(channel!=null && channel.isOpen())
channel.close().awaitUninterruptibly();
final ResponseOnSingeRequest res = new ResponseOnSingeRequest(
response, error, errorMessage, stackTrace, statusCode,
statusCodeInt, PcDateUtils.getNowDateTimeStrStandard(), null);
if (!getContext().system().deadLetters().equals(sender)) {
sender.tell(res, getSelf());
}
if (getContext() != null) {
getContext().stop(getSelf());
}
}
} | [
"First close the connection. Then reply.\n\n@param response\nthe response\n@param error\nthe error\n@param errorMessage\nthe error message\n@param stackTrace\nthe stack trace\n@param statusCode\nthe status code\n@param statusCodeInt\nthe status code int"
] | [
"gets a class from the class cache. This cache contains only classes loaded through\nthis class loader or an InnerLoader instance. If no class is stored for a\nspecific name, then the method should return null.\n\n@param name of the class\n@return the class stored for the given name\n@see #removeClassCacheEntry(String)\n@see #setClassCacheEntry(Class)\n@see #clearCache()",
"Try to get the line number associated with the given member.\n\nThe reflection API does not expose such an info and so we need to analyse the bytecode. Unfortunately, it seems there is no way to get this kind of\ninformation for fields. Moreover, the <code>LineNumberTable</code> attribute is just optional, i.e. the compiler is not required to store this\ninformation at all. See also <a href=\"http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html#jvms-4.1\">Java Virtual Machine Specification</a>\n\nImplementation note: it wouldn't be appropriate to add a bytecode scanning dependency just for this functionality, therefore Apache BCEL included in\nOracle JDK 1.5+ and OpenJDK 1.6+ is used. Other JVMs should not crash as we only use it if it's on the classpath and by means of reflection calls.\n\n@param member\n@param resourceLoader\n@return the line number or 0 if it's not possible to find it",
"The Cost Variance field shows the difference between the baseline cost\nand total cost for a task. The total cost is the current estimate of costs\nbased on actual costs and remaining costs.\n\n@return amount",
"Requests that the given namespace be started listening to for change events.\n\n@param namespace the namespace to listen for change events on.",
"Make a list value containing the specified values.",
"Use this API to delete gslbsite resources of given names.",
"Analyze all source code using the specified RuleSet and return the report results.\n\n@param ruleSet - the RuleSet to apply to each source component; must not be null.\n@return the results from applying the RuleSet to all of the source",
"Use this API to add nspbr6 resources.",
"Insert a value into the right bucket of the histogram. If the value is\nlarger than any bound, insert into the last bucket. If the value is less\nthan zero, then ignore it.\n\n@param data The value to insert into the histogram"
] |
public static String createFirstLowCaseName(String scenarioDescription) {
String[] words = scenarioDescription.trim().split(" ");
String name = "";
for (int i = 0; i < words.length; i++) {
name += changeFirstLetterToCapital(words[i]);
}
return changeFirstLetterToLowerCase(name);
} | [
"Given a string with method or package name, creates a Class Name with no\nspaces and first letter lower case\n\n@param String\n- The name of the scenario/story. It should be in lower case.\n@returns String - The class name"
] | [
"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",
"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",
"Check that an array only contains elements that are not null.\n@param values, can't be null\n@return",
"Scans the jar file and returns the paths that match the includes and excludes.\n\n@return A List of paths\n@throws An IllegalStateException when an I/O error occurs in reading the jar file.",
"Update max.\n\n@param n the n\n@param c the c",
"Change contrast of the image\n\n@param contrast default is 0, pos values increase contrast, neg. values decrease contrast",
"Method used to instantiate the appropriate input stream reader,\na standard one, or one which can deal with \"encrypted\" data.\n\n@param directory directory entry\n@param name file name\n@return new input stream\n@throws IOException",
"Use this API to delete dnspolicylabel of given name.",
"The period of time to ban a node that gives an error on an operation.\n\n@param nodeBannagePeriod The period of time to ban the node\n@param unit The time unit of the given value\n\n@deprecated Use {@link #setFailureDetectorBannagePeriod(long)} instead"
] |
protected boolean computeOffset(CacheDataSet cache) {
// offset computation: update offset for all items in the cache
float startDataOffset = getStartingOffset((cache.getTotalSizeWithPadding()));
float layoutOffset = getLayoutOffset();
boolean inBounds = startDataOffset < -layoutOffset;
for (int pos = 0; pos < cache.count(); ++pos) {
int id = cache.getId(pos);
if (id != -1) {
float endDataOffset = cache.setDataAfter(id, startDataOffset);
inBounds = inBounds &&
endDataOffset > layoutOffset &&
startDataOffset < -layoutOffset;
startDataOffset = endDataOffset;
Log.d(LAYOUT, TAG, "computeOffset [%d] = %f" , id, cache.getDataOffset(id));
}
}
return inBounds;
} | [
"Compute the offset for the item in the layout based on the offsets of neighbors\nin the layout. The other offsets are not patched. If neighbors offsets have not\nbeen computed the offset of the item will not be set.\n@return true if the item fits the container, false otherwise"
] | [
"Takes a String and converts it to a Date\n\n@param dateString the date\n@return Date denoted by dateString",
"Parses the date or returns null if it fails to do so.",
"get the last segment at the moment\n\n@return the last segment",
"Creates a spin wrapper for a data input. The data format of the\ninput is assumed to be JSON.\n\n@param input the input to wrap\n@return the spin wrapper for the input\n\n@throws IllegalArgumentException in case an argument of illegal type is provided (such as 'null')",
"Creates a map of identifiers or page titles to documents retrieved via\nthe APIs.\n\n@param numOfEntities\nnumber of entities that should be retrieved\n@param properties\nWbGetEntitiesProperties object that includes all relevant\nparameters for the wbgetentities action\n@return map of document identifiers or titles to documents retrieved via\nthe API URL\n@throws MediaWikiApiErrorException\n@throws IOException",
"Adds all rows from the file specified, using the provided parser.\n\n@param file File to read the data from.\n@param fileParser Parser to be used to parse the file.\n@return {@code this}",
"sets the initialization method for this descriptor",
"Get the names of all current registered providers.\n\n@return the names of all current registered providers, never null.",
"This implementation returns whether the underlying asset exists."
] |
public static int rank( DMatrixRMaj A ) {
SingularValueDecomposition_F64<DMatrixRMaj> svd = DecompositionFactory_DDRM.svd(A.numRows,A.numCols,false,true,true);
if( svd.inputModified() ) {
A = A.copy();
}
if( !svd.decompose(A)) {
throw new RuntimeException("SVD Failed!");
}
int N = svd.numberOfSingularValues();
double sv[] = svd.getSingularValues();
double threshold = singularThreshold(sv,N);
int count = 0;
for (int i = 0; i < sv.length; i++) {
if( sv[i] >= threshold ) {
count++;
}
}
return count;
} | [
"Returns the matrix's rank. Automatic selection of threshold\n\n@param A Matrix. Not modified.\n@return The rank of the decomposed matrix."
] | [
"Pretty-print the object.",
"Creates a copy with verbose mode enabled.\n\n@param serverSetups the server setups.\n@return copies of server setups with verbose mode enabled.",
"common utility method for adding a statement to a record",
"Read data from the table. Return a reference to the current\ninstance to allow method chaining.\n\n@return reader instance",
"Create servlet deployment.\n\nCan be overridden with custom servlet deployment. e.g. exact resources listing in restricted env like GAE\n\n@param context the servlet context\n@param bootstrap the bootstrap\n@return new servlet deployment",
"Instantiates the templates specified by @Template within @Templates",
"Use this API to update vpnclientlessaccesspolicy.",
"Populates a calendar exception instance.\n\n@param record MPX record\n@param calendar calendar to which the exception will be added\n@throws MPXJException",
"Creates a new Box Developer Edition connection with enterprise token leveraging BoxConfig.\n@param boxConfig box configuration settings object\n@return a new instance of BoxAPIConnection."
] |
public boolean containsNonZeroHosts(IPAddressSection other) {
if(!other.isPrefixed()) {
return contains(other);
}
int otherPrefixLength = other.getNetworkPrefixLength();
if(otherPrefixLength == other.getBitCount()) {
return contains(other);
}
return containsNonZeroHostsImpl(other, otherPrefixLength);
} | [
"Returns whether this address contains the non-zero host addresses in other.\n@param other\n@return"
] | [
"Use this API to delete gslbservice of given name.",
"Return the value from the field in the object that is defined by this FieldType. If the field is a foreign object\nthen the ID of the field is returned instead.",
"Get components list for current instance\n@return components",
"Gets the actual type arguments of a Type\n\n@param type The type to examine\n@return The type arguments",
"Stops the playback of a sound and destroys the corresponding Sound Object or Soundfield.",
"Stops the scavenger.",
"Internal initialization.\n@throws ParserConfigurationException",
"Returns true if a List literal that contains only entries that are constants.\n@param expression - any expression",
"Sum of all elements\n\n@param A (Input) Matrix. Not modified.\n@return scalar"
] |
static int[] toIntArray(List<Integer> integers) {
int[] ints = new int[integers.size()];
int i = 0;
for (Integer n : integers) {
ints[i++] = n;
}
return ints;
} | [
"Transforms a list of Integer objects to an array of primitive int values.\n\n@param integers\n@return"
] | [
"Converts the string of given content to an input stream.\n\n@param content the string content.\n@param charset the charset for conversion.\n@return the stream (should be closed by invoker).",
"Returns the \"short rate\" from timeIndex to timeIndex+1.\n\n@param timeIndex The time index (corresponding to {@link getTime()).\n@return The \"short rate\" from timeIndex to timeIndex+1.\n@throws CalculationException Thrown if simulation failed.",
"When creating image columns\n@return",
"returns an Array with an Objects PK VALUES, with any java-to-sql\nFieldConversion applied. If the Object is a Proxy or a VirtualProxy NO\nconversion is necessary.\n\n@param objectOrProxy\n@return Object[]\n@throws PersistenceBrokerException",
"Try to open a file at the given position.",
"Adds BETWEEN criteria,\ncustomer_id between 1 and 10\n\n@param attribute The field name to be used\n@param value1 The lower boundary\n@param value2 The upper boundary",
"Access all of the elements of the collection that evaluate to true for the\nprovided query predicate.\n@param\tpredicate\tAn OQL boolean query predicate.\n@return\tAn iterator used to iterate over the elements that evaluated true for the predicate.\n@exception\torg.odmg.QueryInvalidException\tThe query predicate is invalid.",
"Calculates the bar width and bar margin based on the _DataSize and settings and starts the boundary\ncalculation in child classes.\n@param _DataSize Amount of data sets",
"Get all registration points associated with this registration.\n\n@return all registration points. Will not be {@code null} but may be empty"
] |
public static Key toKey(RowColumn rc) {
if ((rc == null) || (rc.getRow().equals(Bytes.EMPTY))) {
return null;
}
Text row = ByteUtil.toText(rc.getRow());
if ((rc.getColumn().equals(Column.EMPTY)) || !rc.getColumn().isFamilySet()) {
return new Key(row);
}
Text cf = ByteUtil.toText(rc.getColumn().getFamily());
if (!rc.getColumn().isQualifierSet()) {
return new Key(row, cf);
}
Text cq = ByteUtil.toText(rc.getColumn().getQualifier());
if (!rc.getColumn().isVisibilitySet()) {
return new Key(row, cf, cq);
}
Text cv = ByteUtil.toText(rc.getColumn().getVisibility());
return new Key(row, cf, cq, cv);
} | [
"Converts from a Fluo RowColumn to a Accumulo Key\n\n@param rc RowColumn\n@return Key"
] | [
"Add a column to be set to a value for UPDATE statements. This will generate something like 'columnName =\nexpression' where the expression is built by the caller.\n\n<p>\nThe expression should have any strings escaped using the {@link #escapeValue(String)} or\n{@link #escapeValue(StringBuilder, String)} methods and should have any column names escaped using the\n{@link #escapeColumnName(String)} or {@link #escapeColumnName(StringBuilder, String)} methods.\n</p>",
"Returns a new instance of the given class, using the constructor with the specified parameter types.\n\n@param target The class to instantiate\n@param types The parameter types\n@param args The arguments\n@return The instance",
"Should the URI explicitly not be cached.\n\n@param requestUri request URI\n@return true when caching is prohibited",
"Mbeans for FETCH_ENTRIES",
"Sets the lower limits for the \"moving\" body translation relative to joint point.\n\n@param limitX the X axis lower translation limit\n@param limitY the Y axis lower translation limit\n@param limitZ the Z axis lower translation limit",
"get the TypeSignature corresponding to given class with given type\narguments\n\n@param clazz\n@param typeArgs\n@return",
"Helper method to synchronously invoke a callback\n\n@param call",
"Use this API to fetch sslocspresponder resource of given name .",
"Set the amount of padding between child objects.\n@param axis {@link Axis}\n@param padding"
] |
public static String encodeQuery(String query, String encoding) throws UnsupportedEncodingException {
return HierarchicalUriComponents.encodeUriComponent(query, encoding, HierarchicalUriComponents.Type.QUERY);
} | [
"Encodes the given URI query with the given encoding.\n@param query the query to be encoded\n@param encoding the character encoding to encode to\n@return the encoded query\n@throws UnsupportedEncodingException when the given encoding parameter is not supported"
] | [
"Verifies that the connection is still alive. Returns true if it\nis, false if it is not. If the connection is broken we try\nclosing everything, too, so that the caller need only open a new\nconnection.",
"Obtains a local date in Ethiopic 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 Ethiopic local date, not null\n@throws DateTimeException if unable to create the date",
"Undeletes the selected files\n\n@return the ids of the modified resources\n\n@throws CmsException if something goes wrong",
"scroll only once",
"allow extension only for testing",
"Create the exception assignment map.\n\n@param rows calendar rows\n@return exception assignment map",
"convert selector used in an upsert statement into a document",
"Pretty prints a task list of rebalancing tasks.\n\n@param infos list of rebalancing tasks (RebalancePartitionsInfo)\n@return pretty-printed string",
"Shut down the input manager.\n\nAfter this call, GearVRf will not be able to access IO devices."
] |
public Duration getDuration(Date startDate, Date endDate)
{
Calendar cal = DateHelper.popCalendar(startDate);
int days = getDaysInRange(startDate, endDate);
int duration = 0;
Day day = Day.getInstance(cal.get(Calendar.DAY_OF_WEEK));
while (days > 0)
{
if (isWorkingDate(cal.getTime(), day) == true)
{
++duration;
}
--days;
day = day.getNextDay();
cal.set(Calendar.DAY_OF_YEAR, cal.get(Calendar.DAY_OF_YEAR) + 1);
}
DateHelper.pushCalendar(cal);
return (Duration.getInstance(duration, TimeUnit.DAYS));
} | [
"This method is provided to allow an absolute period of time\nrepresented by start and end dates into a duration in working\ndays based on this calendar instance. This method takes account\nof any exceptions defined for this calendar.\n\n@param startDate start of the period\n@param endDate end of the period\n@return new Duration object"
] | [
"Returns the name of the current object on the specified level.\n\n@param attributes The attributes of the tag\n@return The property value\n@exception XDocletException If an error occurs\[email protected] type=\"content\"\[email protected] name=\"level\" optional=\"false\" description=\"The level for the current object\"\nvalues=\"class,field,reference,collection\"",
"Extract resource type from a resource ID string.\n@param id the resource ID string\n@return the resource type",
"Hashes a path, if the path points to a directory then hashes the contents recursively.\n@param messageDigest the digest used to hash.\n@param path the file/directory we want to hash.\n@return the resulting hash.\n@throws IOException",
"Sets the lower limits for the \"moving\" body rotation relative to joint point.\n\n@param limitX the X axis lower rotation limit (in radians)\n@param limitY the Y axis lower rotation limit (in radians)\n@param limitZ the Z axis lower rotation limit (in radians)",
"Populate a milestone from a Row instance.\n\n@param row Row instance\n@param task Task instance",
"Handles subscription verification callback from Facebook.\n@param subscription The subscription name.\n@param challenge A challenge that Facebook expects to be returned.\n@param verifyToken A verification token that must match with the subscription's token given when the controller was created.\n@return The challenge if the verification token matches; blank string otherwise.",
"Parse a duration in minutes form a number of hours.\n\n@param value String representation\n@return Integer instance",
"Sets left and right padding for all cells in the table.\n@param padding new padding for left and right, ignored if smaller than 0\n@return this to allow chaining",
"Writes a resource's cost rate tables.\n\n@param xml MSPDI resource\n@param mpx MPXJ resource"
] |
public synchronized Set<RegistrationPoint> getRegistrationPoints() {
Set<RegistrationPoint> result = new HashSet<>();
for (List<RegistrationPoint> registrationPoints : registrationPoints.values()) {
result.addAll(registrationPoints);
}
return Collections.unmodifiableSet(result);
} | [
"Get all registration points associated with this registration.\n\n@return all registration points. Will not be {@code null} but may be empty"
] | [
"Locates the services in the context classloader of the current thread.\n\n@param serviceType the type of the services to locate\n@param <X> the type of the service\n@return the service type loader",
"Remove all non replica clock entries from the list of versioned values\nprovided\n\n@param vals list of versioned values to prune replicas from\n@param keyReplicas list of current replicas for the given key\n@param didPrune flag to mark if we did actually prune something\n@return pruned list",
"Remove a path\n\n@param pathId ID of path",
"Return all valid tenors for a given moneyness and maturity.\n\n@param moneynessBP The moneyness in bp for which to get the tenors.\n@param maturityInMonths The maturities in months for which to get the tenors.\n@return The tenors in months.",
"Selects a specific vertex and fragment shader to use for rendering.\n\nIf a shader template has been specified, it is used to generate\na vertex and fragment shader based on mesh attributes, bound textures\nand light sources. If the textures bound to the material are changed\nor a new light source is added, this function must be called again\nto select the appropriate shaders. This function may cause recompilation\nof shaders which is quite slow.\n\n@param scene scene being rendered\n@see GVRShaderTemplate GVRMaterialShader.getShaderType",
"Gets the JsonObject representation of the given field object.\n@param field represents a template field\n@return the json object",
"Returns whether this host should ignore operations from the master domain controller that target\nthe given address.\n\n@param address the resource address. Cannot be {@code null}\n\n@return {@code true} if the operation should be ignored; {@code false} otherwise",
"This method lists all tasks defined in the file in a hierarchical\nformat, reflecting the parent-child relationships between them.\n\n@param file MPX file",
"Store a comment based on comment text, gavc and user information\n\n@param gavc - entity id\n@param commentText - comment text\n@param credential - user credentials\n@param entityType - type of the entity"
] |
public void setShiftOrientation(OrientedLayout.Orientation orientation) {
if (mShiftLayout.getOrientation() != orientation &&
orientation != OrientedLayout.Orientation.STACK) {
mShiftLayout.setOrientation(orientation);
requestLayout();
}
} | [
"Sets page shift orientation. The pages might be shifted horizontally or vertically relative\nto each other to make the content of each page on the screen at least partially visible\n@param orientation"
] | [
"Issue the database statements to drop the table associated with a table configuration.\n\n<p>\n<b>WARNING:</b> This is [obviously] very destructive and is unrecoverable.\n</p>\n\n@param connectionSource\nAssociated connection source.\n@param tableConfig\nHand or spring wired table configuration. If null then the class must have {@link DatabaseField}\nannotations.\n@param ignoreErrors\nIf set to true then try each statement regardless of {@link SQLException} thrown previously.\n@return The number of statements executed to do so.",
"Connects to the comm port and starts send and receive threads.\n@param serialPortName the port name to open\n@throws SerialInterfaceException when a connection error occurs.",
"Use this API to fetch snmpalarm resource of given name .",
"Builder method for specifying the stack an app should be created on.\n@param stack Stack to create the app on.\n@return A copy of the {@link App}",
"Runs Crawljax with the given configuration.\n\n@return The {@link CrawlSession} once the Crawl is done.",
"Configure the mapping between a database column and a field, including definition of\nan alias.\n\n@param container column to field map\n@param name column name\n@param type field type\n@param alias field alias",
"Stop the service and end the program",
"Constructs and sets the layout parameters to have some gravity.\n\n@param gravity the gravity of the Crouton\n@return <code>this</code>, for chaining.\n@see android.view.Gravity",
"Convenience method which allows all projects in the database to\nbe read in a single operation.\n\n@return list of ProjectFile instances\n@throws MPXJException"
] |
protected ServiceName serviceName(final String name) {
return baseServiceName != null ? baseServiceName.append(name) : null;
} | [
"The service name to be removed. Can be overridden for unusual service naming patterns\n@param name The name of the resource being removed\n@return The service name to remove. May return {@code null} if only removal based on {@code unavailableCapabilities}\npassed to the constructor are to be performed"
] | [
"Converts a list of dates to a Json array with the long representation of the dates as strings.\n@param individualDates the list to convert.\n@return Json array with long values of dates as string",
"Gets a list of any tasks on this file with requested fields.\n\n@param fields optional fields to retrieve for this task.\n@return a list of tasks on this file.",
"Syncronously creates a Renderscript context if none exists.\nCreating a Renderscript context takes about 20 ms in Nexus 5\n\n@return",
"Propagates the names of all facets to each single facet.",
"Adds multiple observers using unique integer prefixes for each.\n\n@deprecated since 1.1.0. Replaced by {@link #setObserverProvider(String)} and\n{@link #getObserverProvider()}",
"Use this API to fetch all the dnssuffix resources that are configured on netscaler.",
"Append data to JSON response.\n@param param\n@param value",
"Gets a list of AssignmentRows based on the current Assignments\n@return",
"Sets the drawable used as the drawer indicator.\n\n@param drawable The drawable used as the drawer indicator."
] |
private String toSQLClause(FieldCriteria c, ClassDescriptor cld)
{
String colName = toSqlClause(c.getAttribute(), cld);
return colName + c.getClause() + c.getValue();
} | [
"Answer the SQL-Clause for a FieldCriteria\n\n@param c FieldCriteria\n@param cld ClassDescriptor"
] | [
"Gets an iterable of all the groups in the enterprise that are starting with the given name string.\n@param api the API connection to be used when retrieving the groups.\n@param name the name prefix of the groups. If the groups need to searched by full name that has spaces,\nthen the parameter string should have been wrapped with \"\".\n@return an iterable containing info about all the groups.",
"Compares two fields given by their names.\n\n@param objA The name of the first field\n@param objB The name of the second field\n@return\n@see java.util.Comparator#compare(java.lang.Object, java.lang.Object)",
"Flag that the processor has started execution.\n\n@param processorGraphNode the node that has started.",
"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",
"Get a bean value from the context.\n\n@param name bean name\n@return bean value or null",
"Convert a Java String instance into the equivalent array of single or\ndouble bytes.\n\n@param value Java String instance representing text\n@param unicode true if double byte characters are required\n@return byte array representing the supplied text",
"Create an error image should an error occur while fetching a WMS map.\n\n@param width image width\n@param height image height\n@param e exception\n@return error image\n@throws java.io.IOException oops",
"Use this API to rename a nsacl6 resource.",
"prefix the this class fk columns with the indirection table"
] |
public void setHighlightStrength(float _highlightStrength) {
mHighlightStrength = _highlightStrength;
for (PieModel model : mPieData) {
highlightSlice(model);
}
invalidateGlobal();
} | [
"Sets the highlight strength for the InnerPaddingOutline.\n\n@param _highlightStrength The highlighting value for the outline."
] | [
"Wrap an operation's parameters in a simple encapsulating object\n@param operation the operation\n@param messageHandler the message handler\n@param attachments the attachments\n@return the encapsulating object",
"Extract resource type from a resource ID string.\n@param id the resource ID string\n@return the resource type",
"Adds error correction data to the specified binary string, which already contains the primary data",
"Clears all scopes. Useful for testing and not getting any leak...",
"Reads a quoted string value from the request.",
"Parse a string representation of a Boolean value.\nXER files sometimes have \"N\" and \"Y\" to indicate boolean\n\n@param value string representation\n@return Boolean value",
"Create a table model from an object's properties.\n\n@param object target object\n@param excludedMethods method names to exclude\n@return table model",
"Returns the value for a given key from the database properties.\n\n@param key the property key\n\n@return the string value for a given key",
"Returns all the pixels for the image\n\n@return an array of pixels for this image"
] |
public void setOnCloseListener(@NonNull final android.support.v7.widget.SearchView.OnCloseListener listener) {
if (searchView != null) {
searchView.setOnCloseListener(new SearchView.OnCloseListener() {
@Override public boolean onClose() {
return listener.onClose();
}
});
} else if (supportView != null) {
supportView.setOnCloseListener(listener);
} else {
throw new IllegalStateException(ERROR_NO_SEARCHVIEW);
}
} | [
"Sets a listener to inform when the user closes the SearchView.\n\n@param listener the listener to call when the user closes the SearchView."
] | [
"Returns the total count of partitions across all stores.\n\n@return returns the total count of partitions across all stores.",
"Use this API to delete dnsview of given name.",
"Apply the remote read domain model result.\n\n@param result the domain model result\n@return whether it was applied successfully or not",
"convert a param object to a multimap.\n\n@param objectParams the parameters to convert.\n@return the corresponding Multimap.",
"Sets the specified range of elements in the specified array to the specified value.\n\n@param from the index of the first element (inclusive) to be filled with the specified value.\n@param to the index of the last element (inclusive) to be filled with the specified value.\n@param val the value to be stored in the specified elements of the receiver.",
"Map the Primavera UDF to a custom field.\n\n@param fieldType parent object type\n@param dataType UDF data type\n@param name UDF name\n@return FieldType instance",
"Gets the value for the key.\n\n@param key the key to check for the value\n\n@return the value or an empty collection if no values were set",
"Add an additional compilation unit into the loop\n-> build compilation unit declarations, their bindings and record their results.",
"Abort the daemon\n\n@param error the error causing the abortion"
] |
public static CssSel sel(String selector, String value) {
return j.sel(selector, value);
} | [
"Create a Css Selector Transform"
] | [
"Get the service implementations for a given type name.\n\n@param serviceTypeName the type name\n@return the possibly empty list of services",
"Adds labels to the item\n\n@param labels\nthe labels to add",
"Add a new check box.\n@param date the date for the check box\n@param checkState the initial check state.",
"Sets the offset for the animation.\n\n@param startOffset animation will start at the specified offset value\n\n@return {@code this}, so you can chain setProperty() calls.\n@throws IllegalArgumentException\nIf {@code startOffset} is either negative or greater than\nthe animation duration",
"Turns a series of strings into their corresponding license entities\nby using regular expressions\n\n@param licStrings The list of license strings\n@return A set of license entities",
"Whether the address is IPv4-compatible\n\n@see java.net.Inet6Address#isIPv4CompatibleAddress()",
"Retrieves the value component of a criteria expression.\n\n@param field field type\n@param block block data\n@return field value",
"Create and return a new Violation for this rule and the specified import\n@param sourceCode - the SourceCode\n@param importNode - the ImportNode for the import triggering the violation\n@return a new Violation object",
"Copy the given Collection into a Class array.\nThe Collection must contain Class elements only.\n@param collection the Collection to copy\n@return the Class array ({@code null} if the passed-in\nCollection was {@code null})"
] |
public ProviderContextBuilder setRateTypes(Collection<RateType> rateTypes) {
Objects.requireNonNull(rateTypes);
if (rateTypes.isEmpty()) {
throw new IllegalArgumentException("At least one RateType is required.");
}
Set<RateType> rtSet = new HashSet<>(rateTypes);
set(ProviderContext.KEY_RATE_TYPES, rtSet);
return this;
} | [
"Set the rate types.\n\n@param rateTypes the rate types, not null and not empty.\n@return this, for chaining.\n@throws IllegalArgumentException when not at least one {@link RateType} is provided."
] | [
"Internal method used to test for the existence of a relationship\nwith a task.\n\n@param task target task\n@param list list of relationships\n@return boolean flag",
"Update an object in the database to change its id to the newId parameter.",
"Stop finding beat grids for all active players.",
"Sets the underlying read timeout in milliseconds.\nA value of 0 specifies an infinite timeout.\n@see okhttp3.OkHttpClient.Builder#readTimeout(long, TimeUnit)",
"Removes CRs but returns LFs",
"Send a media details response to all registered listeners.\n\n@param details the response that has just arrived",
"Gets container with alls groups of a certain user.\n\n@param cms cmsobject\n@param user to find groups for\n@param caption caption property\n@param iconProp property\n@param ou ou\n@param propStatus status property\n@param iconProvider the icon provider\n@return Indexed Container",
"removes an Object from the cache.\n\n@param oid the Identity of the object to be removed.",
"Populates a calendar exception instance.\n\n@param record MPX record\n@param calendar calendar to which the exception will be added\n@throws MPXJException"
] |
public static rnatip_stats get(nitro_service service, String Rnatip) throws Exception{
rnatip_stats obj = new rnatip_stats();
obj.set_Rnatip(Rnatip);
rnatip_stats response = (rnatip_stats) obj.stat_resource(service);
return response;
} | [
"Use this API to fetch statistics of rnatip_stats resource of given name ."
] | [
"This method retrieves a byte array containing the data at the\ngiven index in the block. If no data is found at the given index\nthis method returns null.\n\n@param index index of the data item to be retrieved\n@return byte array containing the requested data",
"Executes the API action \"wbsetaliases\" for the given parameters.\n\n@param id\nthe id of the entity to be edited; if used, the site and title\nparameters must be null\n@param site\nwhen selecting an entity by title, the site key for the title,\ne.g., \"enwiki\"; if used, title must also be given but id must\nbe null\n@param title\nstring used to select an entity by title; if used, site must\nalso be given but id must be null\n@param newEntity\nused for creating a new entity of a given type; the value\nindicates the intended entity type; possible values include\n\"item\" and \"property\"; if used, the parameters id, site, and\ntitle must be null\n@param language\nthe language code for the label\n@param add\nthe values of the aliases to add. They will be merged with the\nexisting aliases. This parameter cannot be used in conjunction\nwith \"set\".\n@param remove\nthe values of the aliases to remove. Other aliases will be retained.\nThis parameter cannot be used in conjunction with \"set\".\n@param set\nthe values of the aliases to set. This will erase any existing\naliases in this language and replace them by the given list.\n@param bot\nif true, edits will be flagged as \"bot edits\" provided that\nthe logged in user is in the bot group; for regular users, the\nflag will just be ignored\n@param baserevid\nthe revision of the data that the edit refers to or 0 if this\nshould not be submitted; when used, the site will ensure that\nno edit has happened since this revision to detect edit\nconflicts; it is recommended to use this whenever in all\noperations where the outcome depends on the state of the\nonline data\n@param summary\nsummary for the edit; will be prepended by an automatically\ngenerated comment; the length limit of the autocomment\ntogether with the summary is 260 characters: everything above\nthat limit will be cut off\n@return the JSON response from the API\n@throws IOException\nif there was an IO problem. such as missing network\nconnection\n@throws MediaWikiApiErrorException\nif the API returns an error\n@throws IOException\n@throws MediaWikiApiErrorException",
"Stop finding beat grids for all active players.",
"Remove a server mapping from current profile by ID\n\n@param serverMappingId server mapping ID\n@return Collection of updated ServerRedirects",
"Release transaction that was acquired in a thread with specified permits.",
"Use this API to update snmpmanager.",
"Checks the foreignkeys of all collections in the model.\n\n@param modelDef The model\n@param checkLevel The current check level (this constraint is checked in basic and strict)\n@exception ConstraintException If the value for foreignkey is invalid",
"Creates the default editor state for editing a bundle with descriptor.\n@return the default editor state for editing a bundle with descriptor.",
"Sets the promotion state.\n\n<P>INFO: This method updates automatically all the contained artifacts.\n\n@param promoted boolean"
] |
public static <R extends Resource<?>, U extends PaginatedResponse<R>> Flux<R> getResources(U response) {
return Flux.fromIterable(response.getResources());
} | [
"Return a stream of resources from a response\n\n@param response the response\n@param <R> the resource type\n@param <U> the response type\n@return a stream of resources from the response"
] | [
"Layout which gets displayed if table is empty.\n\n@see org.opencms.ui.apps.user.I_CmsFilterableTable#getEmptyLayout()",
"Use this API to fetch all the snmpoption resources that are configured on netscaler.",
"Adds this vector to v1 and places the result in this vector.\n\n@param v1\nright-hand vector",
"disables the responses for a given pathname and user id\n\n@param model\n@param path_id\n@param clientUUID\n@return\n@throws Exception",
"Stores a new certificate and its associated private key in the keystore.\n@param hostname\n@param cert\n@param privKey @throws KeyStoreException\n@throws CertificateException\n@throws NoSuchAlgorithmException",
"Used to create a new indefinite retention policy.\n@param api the API connection to be used by the created user.\n@param name the name of the retention policy.\n@return the created retention policy's info.",
"Compares two vectors and determines if they are numeric equals,\nindependent of its type.\n\n@param vector1\nthe first vector\n@param vector2\nthe second vector\n@return true if the vectors are numeric equals",
"Created a fresh CancelIndicator",
"Calculate Euclidean distance between two points.\n\n@param anotherPoint Point to calculate distance to.\n@return Euclidean distance between this point and anotherPoint points."
] |
public static Diagram parseJson(String json,
Boolean keepGlossaryLink) throws JSONException {
JSONObject modelJSON = new JSONObject(json);
return parseJson(modelJSON,
keepGlossaryLink);
} | [
"Parse the json string to the diagram model, assumes that the json is\nhierarchical ordered\n@param json\n@return Model with all shapes defined in JSON\n@throws org.json.JSONException"
] | [
"Gets the bytes for the highest address in the range represented by this address.\n\n@return",
"Evalutes AND and OR operators.\n\n@param container data context\n@param promptValues responses to prompts\n@return operator result",
"Trim and append a file separator to the string",
"Find a node in the tree. The node must be \"visible\" to be found.\n@param address The full address of the node matching ManagementModelNode.addressPath()\n@return The node, or null if not found.",
"Determines if the version should be incremented based on the module resources' modification dates.\n\n@param cms the CMS context\n@return true if the version number should be incremented\n\n@throws CmsException if something goes wrong",
"This method retrieves the calendar hours for the specified day.\nNote that if this is a derived calendar, then this method\nwill refer to the base calendar where no hours are specified\nin the derived calendar.\n\n@param day Day instance\n@return calendar hours",
"Format the label text.\n\n@param scaleUnit The unit used for the scalebar.\n@param value The scale value.\n@param intervalUnit The scaled unit for the intervals.",
"Initialize. create the httpClientStore, tcpClientStore",
"low-level Graph API operations"
] |
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 is a change in master, so report it to any registered listeners
deliverMasterChangedAnnouncement(newMaster);
}
} | [
"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."
] | [
"This method extracts data for a single resource from a GanttProject file.\n\n@param gpResource resource data",
"Ensure that a tool object is valid for creation. The API requires certain fields to be filled out.\nThrows an IllegalArgumentException if the conditions are not met.\n@param tool The external tool object we are trying to create",
"Each schema set has its own database cluster. The template1 database has the schema preloaded so that\neach test case need only create a new database and not re-invoke Migratory.",
"Process data for an individual calendar.\n\n@param row calendar data",
"Returns the compact project records for all projects in the team.\n\n@param team The team to find projects in.\n@return Request object",
"Gets the Symmetric Chi-square divergence.\n\n@param p P vector.\n@param q Q vector.\n@return The Symmetric chi-square divergence between p and q.",
"Adds a new metadata value.\n@param path the path that designates the key. Must be prefixed with a \"/\".\n@param value the value.\n@return this metadata object.",
"Sets the matrix 'inv' equal to the inverse of the matrix that was decomposed.\n\n@param inv Where the value of the inverse will be stored. Modified.",
"Returns the name from the inverse side if the given property de-notes a one-to-one association."
] |
private String FCMGetFreshToken(final String senderID) {
String token = null;
try {
if(senderID != null){
getConfigLogger().verbose(getAccountId(), "FcmManager: Requesting a FCM token with Sender Id - "+senderID);
token = FirebaseInstanceId.getInstance().getToken(senderID, FirebaseMessaging.INSTANCE_ID_SCOPE);
}else {
getConfigLogger().verbose(getAccountId(), "FcmManager: Requesting a FCM token");
token = FirebaseInstanceId.getInstance().getToken();
}
getConfigLogger().info(getAccountId(),"FCM token: "+token);
} catch (Throwable t) {
getConfigLogger().verbose(getAccountId(), "FcmManager: Error requesting FCM token", t);
}
return token;
} | [
"request token from FCM"
] | [
"Shuts down the server. Active connections are not affected.",
"Use this API to disable clusterinstance of given name.",
"A smoothed pulse function. A cubic function is used to smooth the step between two thresholds.\n@param a1 the lower threshold position for the start of the pulse\n@param a2 the upper threshold position for the start of the pulse\n@param b1 the lower threshold position for the end of the pulse\n@param b2 the upper threshold position for the end of the pulse\n@param x the input parameter\n@return the output value",
"Visit all child nodes but not this one.\n\n@param visitor The visitor to use.",
"Get a property as a double or null.\n\n@param key the property name",
"Returns the value of the specified matrix element. Performs a bounds check to make sure\nthe requested element is part of the matrix.\n\n@param row The row of the element.\n@param col The column of the element.\n@return The value of the element.",
"Evaluates the body if value for the member tag equals the specified value.\n\n@param template The body of the block tag\n@param attributes The attributes of the template tag\n@exception XDocletException If an error occurs\[email protected] type=\"block\"\[email protected] name=\"tagName\" optional=\"false\" description=\"The tag name.\"\[email protected] name=\"paramName\" description=\"The parameter name. If not specified, then the raw\ncontent of the tag is returned.\"\[email protected] name=\"paramNum\" description=\"The zero-based parameter number. It's used if the user\nused the space-separated format for specifying parameters.\"\[email protected] name=\"value\" optional=\"false\" description=\"The expected value.\"",
"Validates a String to be a valid name to be used in MongoDB for a collection name.\n\n@param collectionName",
"High-accuracy Normal cumulative distribution function.\n\n@param x Value.\n@return Result."
] |
@SuppressWarnings("deprecation")
private static WriteConcern mergeWriteConcern(WriteConcern original, WriteConcern writeConcern) {
if ( original == null ) {
return writeConcern;
}
else if ( writeConcern == null ) {
return original;
}
else if ( original.equals( writeConcern ) ) {
return original;
}
Object wObject;
int wTimeoutMS;
boolean fsync;
Boolean journal;
if ( original.getWObject() instanceof String ) {
wObject = original.getWString();
}
else if ( writeConcern.getWObject() instanceof String ) {
wObject = writeConcern.getWString();
}
else {
wObject = Math.max( original.getW(), writeConcern.getW() );
}
wTimeoutMS = Math.min( original.getWtimeout(), writeConcern.getWtimeout() );
fsync = original.getFsync() || writeConcern.getFsync();
if ( original.getJournal() == null ) {
journal = writeConcern.getJournal();
}
else if ( writeConcern.getJournal() == null ) {
journal = original.getJournal();
}
else {
journal = original.getJournal() || writeConcern.getJournal();
}
if ( wObject instanceof String ) {
return new WriteConcern( (String) wObject, wTimeoutMS, fsync, journal );
}
else {
return new WriteConcern( (int) wObject, wTimeoutMS, fsync, journal );
}
} | [
"As we merge several operations into one operation, we need to be sure the write concern applied to the aggregated\noperation respects all the requirements expressed for each separate operation.\n\nThus, for each parameter of the write concern, we keep the stricter one for the resulting merged write concern."
] | [
"The ARP is additional request parameters, which must be sent once\nreceived after any HTTP call. This is sort of a proxy for cookies.\n\n@return A JSON object containing the ARP key/values. Can be null.",
"Remove the trailing line end from an RTF block.\n\n@param text source text\n@param formalRTF true if this is a real RTF block\n@return text with line end stripped",
"Creates a color item that represents a color field found for a track based on a dbserver message.\n\n@param menuItem the rendered menu item containing the color metadata field\n\n@return the color metadata field",
"Process events in the order as they were received.\n\n<p/>\n\nThe overall time to process the events must be within the bounds of the\ntimeout or an {@link InsufficientOperationalNodesException} will be\nthrown.",
"Perform a one-off scan during boot to establish deployment tasks to execute during boot",
"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",
"Iterates through the given InputStream line by line using the specified\nencoding, splitting each line using the given separator. The list of tokens\nfor each line is then passed to the given closure. Finally, the stream\nis closed.\n\n@param stream an InputStream\n@param regex the delimiting regular expression\n@param charset opens the stream with a specified charset\n@param closure a closure\n@return the last value returned by the closure\n@throws IOException if an IOException occurs.\n@throws java.util.regex.PatternSyntaxException\nif the regular expression's syntax is invalid\n@see #splitEachLine(java.io.Reader, java.lang.String, groovy.lang.Closure)\n@since 1.5.5",
"Use this API to fetch sslservicegroup_sslcertkey_binding resources of given name .",
"Use this API to fetch authorizationpolicylabel_binding resource of given name ."
] |
private String formatCurrency(Number value)
{
return (value == null ? null : m_formats.getCurrencyFormat().format(value));
} | [
"This method is called to format a currency value.\n\n@param value numeric value\n@return currency value"
] | [
"Returns a list of your geo-tagged photos.\n\nThis method requires authentication with 'read' permission.\n\n@param minUploadDate\nMinimum upload date. Photos with an upload date greater than or equal to this value will be returned. Set to null to not specify a date.\n@param maxUploadDate\nMaximum upload date. Photos with an upload date less than or equal to this value will be returned. Set to null to not specify a date.\n@param minTakenDate\nMinimum taken date. Photos with an taken date greater than or equal to this value will be returned. Set to null to not specify a date.\n@param maxTakenDate\nMaximum taken date. Photos with an taken date less than or equal to this value will be returned. Set to null to not specify a date.\n@param privacyFilter\nReturn photos only matching a certain privacy level. Valid values are:\n<ul>\n<li>1 public photos</li>\n<li>2 private photos visible to friends</li>\n<li>3 private photos visible to family</li>\n<li>4 private photos visible to friends & family</li>\n<li>5 completely private photos</li>\n</ul>\nSet to 0 to not specify a privacy Filter.\n\n@see com.flickr4java.flickr.photos.Extras\n@param sort\nThe order in which to sort returned photos. Deafults to date-posted-desc. The possible values are: date-posted-asc, date-posted-desc,\ndate-taken-asc, date-taken-desc, interestingness-desc, and interestingness-asc.\n@param extras\nA set of Strings controlling the extra information to fetch for each returned record. Currently supported fields are: license, date_upload,\ndate_taken, owner_name, icon_server, original_format, last_update, geo. Set to null or an empty set to not specify any extras.\n@param perPage\nNumber of photos to return per page. If this argument is 0, it defaults to 100. The maximum allowed value is 500.\n@param page\nThe page of results to return. If this argument is 0, it defaults to 1.\n@return photos\n@throws FlickrException",
"A specific, existing project can be deleted by making a DELETE request\non the URL for that project.\n\nReturns an empty data record.\n\n@param project The project to delete.\n@return Request object",
"Print all relations for a given's class's tag\n@param tagname the tag containing the given relation\n@param from the source class\n@param edgetype the dot edge specification",
"Specify a specific index to run the query against\n\n@param designDocument set the design document to use\n@param indexName set the index name to use\n@return this to set additional options",
"Read a long int from an input stream.\n\n@param is input stream\n@return long value",
"Returns a site record for the site of the given name, creating a new one\nif it does not exist yet.\n\n@param siteKey\nthe key of the site\n@return the suitable site record",
"Populate the properties indicating the source of this schedule.\n\n@param properties project properties",
"Use this API to fetch all the responderhtmlpage resources that are configured on netscaler.",
"Set the value for a floating point 4x4 matrix.\n@param key name of uniform to set.\n@see #getFloatVec(String)"
] |
private CmsSpellcheckingRequest parseJsonRequest(JSONObject jsonRequest) {
final String id = jsonRequest.optString(JSON_ID);
final JSONObject params = jsonRequest.optJSONObject(JSON_PARAMS);
if (null == params) {
LOG.debug("Invalid JSON request: No field \"params\" defined. ");
return null;
}
final JSONArray words = params.optJSONArray(JSON_WORDS);
final String lang = params.optString(JSON_LANG, LANG_DEFAULT);
if (null == words) {
LOG.debug("Invalid JSON request: No field \"words\" defined. ");
return null;
}
// Convert JSON array to array of type String
final List<String> wordsToCheck = new LinkedList<String>();
for (int i = 0; i < words.length(); i++) {
final String word = words.opt(i).toString();
wordsToCheck.add(word);
if (Character.isUpperCase(word.codePointAt(0))) {
wordsToCheck.add(word.toLowerCase());
}
}
return new CmsSpellcheckingRequest(wordsToCheck.toArray(new String[wordsToCheck.size()]), lang, id);
} | [
"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."
] | [
"Redirect URL to the specified profile ID\n\n@param model\n@param profileId\n@return\n@throws Exception",
"Print rate.\n\n@param rate Rate instance\n@return rate value",
"Output method responsible for sending the updated content to the Subscribers.\n\n@param cn",
"Find the channel in the animation that animates the named bone.\n@param boneName name of bone to animate.",
"Sets the alias. By default the entire attribute path participates in the alias\n@param alias The name of the alias to set",
"Return true if the two connections seem to one one connection under the covers.",
"The Baseline Start field shows the planned beginning date for a task at\nthe time you saved a baseline. Information in this field becomes available\nwhen you set a baseline.\n\n@return Date",
"Iterates over all tags of current member and evaluates the template for each one.\n\n@param template The template to be evaluated\n@param attributes The attributes of the template tag\n@exception XDocletException If an error occurs\[email protected] type=\"block\"\[email protected] name=\"tagName\" optional=\"false\" description=\"The tag name.\"\[email protected] name=\"paramName\" optional=\"true\" description=\"The parameter name.\"",
"Reads the given text stream and compressed its content.\n\n@param stream The input stream\n@return A byte array containing the GZIP-compressed content of the stream\n@throws IOException If an error ocurred"
] |
public static <T, ID> int dropTable(ConnectionSource connectionSource, Class<T> dataClass, boolean ignoreErrors)
throws SQLException {
Dao<T, ID> dao = DaoManager.createDao(connectionSource, dataClass);
return dropTable(dao, ignoreErrors);
} | [
"Issue the database statements to drop the table associated with a class.\n\n<p>\n<b>WARNING:</b> This is [obviously] very destructive and is unrecoverable.\n</p>\n\n@param connectionSource\nAssociated connection source.\n@param dataClass\nThe class for which a table will be dropped.\n@param ignoreErrors\nIf set to true then try each statement regardless of {@link SQLException} thrown previously.\n@return The number of statements executed to do so."
] | [
"Returns a site record for the site of the given name, creating a new one\nif it does not exist yet.\n\n@param siteKey\nthe key of the site\n@return the suitable site record",
"Whether the address is IPv4-compatible\n\n@see java.net.Inet6Address#isIPv4CompatibleAddress()",
"Checks if maintenance mode is enabled for the given app\n\n@param appName See {@link #listApps} for a list of apps that can be used.\n@return true if maintenance mode is enabled",
"Create a temporary directory with the same attributes as its parent directory.\n@param dir\nthe path to directory in which to create the directory\n@param prefix\nthe prefix string to be used in generating the directory's name;\nmay be {@code null}\n@return the path to the newly created directory that did not exist before\nthis method was invoked\n@throws IOException",
"Sets the bottom padding for all cells in the row.\n@param paddingBottom new padding, ignored if smaller than 0\n@return this to allow chaining",
"Generate JSON format as result of the scan.\n\n@since 1.2",
"Generate the next combination and return an array containing\nthe appropriate elements.\n@see #nextCombinationAsArray(Object[])\n@see #nextCombinationAsList()\n@return An array containing the elements that make up the next combination.",
"Use this API to fetch a vpnglobal_intranetip_binding resources.",
"Extracts the elements from the source matrix by their 1D index.\n\n@param src Source matrix. Not modified.\n@param indexes array of row indexes\n@param length maximum element in row array\n@param dst output matrix. Must be a vector of the correct length."
] |
protected byte[] getUpperBytesInternal() {
byte cached[];
if(hasNoValueCache()) {
ValueCache cache = valueCache;
cache.upperBytes = cached = getBytesImpl(false);
if(!isMultiple()) {
cache.lowerBytes = cached;
}
} else {
ValueCache cache = valueCache;
if((cached = cache.upperBytes) == null) {
if(!isMultiple()) {
if((cached = cache.lowerBytes) != null) {
cache.upperBytes = cached;
} else {
cache.lowerBytes = cache.upperBytes = cached = getBytesImpl(false);
}
} else {
cache.upperBytes = cached = getBytesImpl(false);
}
}
}
return cached;
} | [
"Gets the bytes for the highest address in the range represented by this address.\n\n@return"
] | [
"Gets the index to use in the search.\n\n@return the index to use in the search",
"Producers returned from this method are not validated. Internal use only.",
"Get a loader that lists the files in the current path,\nand monitors changes.",
"Executes a HTTP request and parses the JSON response into a Response instance.\n\n@param connection The HTTP request to execute.\n@return Response object of the deserialized JSON response",
"Stop listening for beats.",
"Set the TimeSensor's cycleInterval property\nCurrently, this does not change the duration of the animation.\n@param newCycleInterval",
"Gets the favorite entries corresponding to the currently displayed favorite widgets.\n\n@return the list of favorite entries",
"Import user from file.",
"Give next index i where i and i+timelag is valid"
] |
public static final Rate parseRate(BigDecimal value)
{
Rate result = null;
if (value != null)
{
result = new Rate(value, TimeUnit.HOURS);
}
return (result);
} | [
"Parse rate.\n\n@param value rate value\n@return Rate instance"
] | [
"Unmarshals the descriptor content.\n\n@throws CmsXmlException thrown if the XML structure of the descriptor is wrong.\n@throws CmsException thrown if reading the descriptor file fails.",
"Mark the top level deployment as being a JPA deployment. If the deployment is not a top level deployment the parent is\nmarked instead",
"Harvest any values that may have been returned during the execution\nof a procedure.\n\n@param proc the procedure descriptor that provides info about the procedure\nthat was invoked.\n@param obj the object that was persisted\n@param stmt the statement that was used to persist the object.\n\n@throws PersistenceBrokerSQLException if a problem occurs.",
"Parses btch api response to create a list of BoxAPIResponse objects.\n@param batchResponse response of a batch api request\n@return list of BoxAPIResponses",
"Set the value for a floating point 4x4 matrix.\n@param key name of uniform to set.\n@see #getFloatVec(String)",
"Creates metadata on this file in the specified template type.\n\n@param typeName the metadata template type name.\n@param metadata the new metadata values.\n@return the metadata returned from the server.",
"Facade method for operating the Shell.\n\nRun the obtained Shell with commandLoop().\n\n@see org.gearvrf.debug.cli.Shell#Shell(org.gearvrf.debug.cli.Shell.Settings, org.gearvrf.debug.cli.CommandTable, java.util.List)\n\n@param prompt Prompt to be displayed\n@param appName The app name string\n@param mainHandler Command handler\n@return Shell that can be either further customized or run directly by calling commandLoop().",
"Serialize a parameterized object to an OutputStream.\n\n@param object The object to serialize.\n@param parameterizedType The ParameterizedType describing the object. Ex: LoganSquare.serialize(object, new ParameterizedType<MyModel<OtherModel>>() { }, os);\n@param os The OutputStream being written to.",
"Sets the left padding for all cells in the row.\n@param paddingLeft new padding, ignored if smaller than 0\n@return this to allow chaining"
] |
private void processResourceAssignments(Task task, List<MapRow> assignments)
{
for (MapRow row : assignments)
{
processResourceAssignment(task, row);
}
} | [
"Extract resource assignments for a task.\n\n@param task parent task\n@param assignments list of Synchro resource assignment data"
] | [
"Find out which method to call on the service bean.",
"Commits the working copy.\n\n@param commitMessage@return The commit info upon successful operation.\n@throws IOException On IO of SVN failure",
"Obtains a Symmetry010 zoned date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the Symmetry010 zoned date-time, not null\n@throws DateTimeException if unable to create the date-time",
"Calls beforeMaterialization on all registered listeners in the reverse\norder of registration.",
"Generates timephased costs from the assignment's cost value. Used for Cost type Resources.\n\n@return timephased cost",
"Check that the parameter string is not null or empty\n\n@param value\nString value to be checked.\n@param parameterName\nThe name of the user-supplied parameter that we are validating\nso that the user can easily find the error in their code.\n@throws IllegalArgumentException\nIf the key is null or empty.",
"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",
"Execute blocking for a prepared result.\n\n@param operation the operation to execute\n@param client the protocol client\n@return the prepared operation\n@throws IOException\n@throws InterruptedException",
"Fling the content\n\n@param velocityX The initial velocity in the X direction. Positive numbers mean that the\nfinger/cursor is moving to the left on the screen, which means we want to\nscroll towards the beginning.\n@param velocityY The initial velocity in the Y direction. Positive numbers mean that the\nfinger/cursor is moving down the screen, which means we want to scroll\ntowards the top.\n@param velocityZ TODO: Z-scrolling is currently not supported\n@return"
] |
private void findScrollView(ViewGroup viewGroup) {
scrollChild = viewGroup;
if (viewGroup.getChildCount() > 0) {
int count = viewGroup.getChildCount();
View child;
for (int i = 0; i < count; i++) {
child = viewGroup.getChildAt(i);
if (child instanceof AbsListView || child instanceof ScrollView || child instanceof ViewPager || child instanceof WebView) {
scrollChild = child;
return;
}
}
}
} | [
"Find out the scrollable child view from a ViewGroup.\n\n@param viewGroup"
] | [
"Use this API to fetch cachepolicylabel_binding resource of given name .",
"Called on mouse up in the caption area, ends dragging by ending event\ncapture.\n\n@param event the mouse up event that ended dragging\n\n@see DOM#releaseCapture\n@see #beginDragging\n@see #endDragging",
"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",
"Add the string representation of the given object to this sequence. The given indentation will be prepended to\neach line except the first one if the object has a multi-line string representation.\n\n@param object\nthe appended object.\n@param indentation\nthe indentation string that should be prepended. May not be <code>null</code>.",
"Returns the active logged in user.",
"Private used static method for creation of a RemoteWebDriver. Taking care of the default\nCapabilities and using the HttpCommandExecutor.\n\n@param hubUrl the url of the hub to use.\n@return the RemoteWebDriver instance.",
"Converts the given dislect to a human-readable datasource type.",
"Returns the directory of the file.\n\n@param filePath Path of the file.\n@return The directory string or {@code null} if\nthere is no parent directory.\n@throws IllegalArgumentException if path is bad",
"Use this API to fetch nd6ravariables resource of given name ."
] |
public static cmppolicylabel_stats get(nitro_service service, String labelname) throws Exception{
cmppolicylabel_stats obj = new cmppolicylabel_stats();
obj.set_labelname(labelname);
cmppolicylabel_stats response = (cmppolicylabel_stats) obj.stat_resource(service);
return response;
} | [
"Use this API to fetch statistics of cmppolicylabel_stats resource of given name ."
] | [
"Check all abstract methods are declared by the decorated types.\n\n@param type\n@param beanManager\n@param delegateType\n@throws DefinitionException If any of the abstract methods is not declared by the decorated types",
"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.",
"Infer app name from scan package\n\n@param packageName\nthe package name\n@return\napp name inferred from the package name",
"Get the AuthInterface.\n\n@return The AuthInterface",
"Notify our own event listeners of a Z-Wave event.\n@param event the event to send.",
"Use this API to fetch all the nsip6 resources that are configured on netscaler.",
"Calculates the Boundedness value to given confinement radius, diffusion coefficient, timlag and number of steps.\n@param D diffusion coefficient\n@param N Number of steps\n@param timelag Timelag\n@param confRadius Confinement radius\n@return Boundedness value",
"Initializes the upper left component. Does not show the mode switch.",
"Looks up the EJB in the container and executes the method on it\n\n@param self the proxy instance.\n@param method the overridden method declared in the super class or\ninterface.\n@param proceed the forwarder method for invoking the overridden method. It\nis null if the overridden method is abstract or declared in the\ninterface.\n@param args an array of objects containing the values of the arguments\npassed in the method invocation on the proxy instance. If a\nparameter type is a primitive type, the type of the array\nelement is a wrapper class.\n@return the resulting value of the method invocation.\n@throws Throwable if the method invocation fails."
] |
public SingleProfileBackup getProfileBackupData(int profileID, String clientUUID) throws Exception {
SingleProfileBackup singleProfileBackup = new SingleProfileBackup();
List<PathOverride> enabledPaths = new ArrayList<>();
List<EndpointOverride> paths = PathOverrideService.getInstance().getPaths(profileID, clientUUID, null);
for (EndpointOverride override : paths) {
if (override.getRequestEnabled() || override.getResponseEnabled()) {
PathOverride pathOverride = new PathOverride();
pathOverride.setPathName(override.getPathName());
if (override.getRequestEnabled()) {
pathOverride.setRequestEnabled(true);
}
if (override.getResponseEnabled()) {
pathOverride.setResponseEnabled(true);
}
pathOverride.setEnabledEndpoints(override.getEnabledEndpoints());
enabledPaths.add(pathOverride);
}
}
singleProfileBackup.setEnabledPaths(enabledPaths);
Client backupClient = ClientService.getInstance().findClient(clientUUID, profileID);
ServerGroup activeServerGroup = ServerRedirectService.getInstance().getServerGroup(backupClient.getActiveServerGroup(), profileID);
singleProfileBackup.setActiveServerGroup(activeServerGroup);
return singleProfileBackup;
} | [
"Get the active overrides with parameters and the active server group for a client\n\n@param profileID Id of profile to get configuration for\n@param clientUUID Client Id to export configuration\n@return SingleProfileBackup containing active overrides and active server group\n@throws Exception exception"
] | [
"Calculates the vega 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@param optionStrike The option strike.\n@return The vega of the digital option",
"Filter event if word occurs in wordsToFilter.\n\n@param event the event\n@return true, if successful",
"Returns the instance.\n@return InterceptorFactory",
"get the getter method corresponding to given property",
"We have obtained a beat grid for a device, so store it and alert any listeners.\n\n@param update the update which caused us to retrieve this beat grid\n@param beatGrid the beat grid which we retrieved",
"Returns whether this address contains the non-zero host addresses in other.\n@param other\n@return",
"Calculate the layout offset",
"returns a sorted array of nested classes and interfaces",
"Processes the template for all indices of the current table.\n\n@param template The template\n@param attributes The attributes of the tag\n@exception XDocletException if an error occurs\[email protected] type=\"block\"\[email protected] name=\"unique\" optional=\"true\" description=\"Whether to process the unique indices or not\"\nvalues=\"true,false\""
] |
public static boolean updateImageParentOnAgents(final JenkinsBuildInfoLog log, final String imageTag, final String host, final int buildInfoId) throws IOException, InterruptedException {
boolean parentUpdated = updateImageParent(log, imageTag, host, buildInfoId);
List<Node> nodes = Jenkins.getInstance().getNodes();
for (Node node : nodes) {
if (node == null || node.getChannel() == null) {
continue;
}
boolean parentNodeUpdated = node.getChannel().call(new MasterToSlaveCallable<Boolean, IOException>() {
public Boolean call() throws IOException {
return updateImageParent(log, imageTag, host, buildInfoId);
}
});
parentUpdated = parentUpdated ? parentUpdated : parentNodeUpdated;
}
return parentUpdated;
} | [
"Updates property of parent id for the image provided.\nReturns false if image was not captured true otherwise.\n\n@param log\n@param imageTag\n@param host\n@param buildInfoId\n@return\n@throws IOException\n@throws InterruptedException"
] | [
"Copy one Gradient into another.\n@param g the Gradient to copy into",
"Compute a Catmull-Rom spline for RGB values, but with variable knot spacing.\n@param x the input parameter\n@param numKnots the number of knots in the spline\n@param xknots the array of knot x values\n@param yknots the array of knot y values\n@return the spline value",
"Get a compatible constructor\n\n@param type\nClass to look for constructor in\n@param argumentType\nArgument type for constructor\n@return the compatible constructor or null if none found",
"Adds the content info for the collected resources used in the \"This page\" publish dialog.",
"Handle unbind service event.\n@param service Service instance\n@param props Service reference properties",
"Returns the rank of the decomposed matrix.\n\n@see SingularOps_DDRM#rank(SingularValueDecomposition_F64, double)\n\n@return The matrix's rank",
"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",
"Use this API to fetch all the gslbldnsentries resources that are configured on netscaler.",
"Get all components of a specific class from this scene object and its descendants.\n@param type component type (as returned from getComponentType())\n@return ArrayList of components with the specified class."
] |
private String buildAliasKey(String aPath, List hintClasses)
{
if (hintClasses == null || hintClasses.isEmpty())
{
return aPath;
}
StringBuffer buf = new StringBuffer(aPath);
for (Iterator iter = hintClasses.iterator(); iter.hasNext();)
{
Class hint = (Class) iter.next();
buf.append(" ");
buf.append(hint.getName());
}
return buf.toString();
} | [
"Build the key for the TableAlias based on the path and the hints\n@param aPath\n@param hintClasses\n@return the key for the TableAlias"
] | [
"Parses an RgbaColor from an rgb value.\n\n@return the parsed color",
"Verify that the given channels are all valid.\n\n@param channels\nthe given channels",
"Gets id of a link and creates the new one if necessary.\n\n@param linkName name of the link.\n@param allowCreate if set to true and if there is no link named as linkName,\ncreate the new id for the linkName.\n@return < 0 if there is no such link and create=false, else id of the link",
"The Baseline Duration field shows the original span of time planned\nto complete a task.\n\n@return - duration string",
"Look up all recorded playback state information.\n\n@return the playback state recorded for any player\n@since 0.5.0",
"Sends a dummy statement to the server to keep the connection alive\n@param connection Connection handle to perform activity on\n@return true if test query worked, false otherwise",
"Creates a new block box from the given element with the given parent. No style is assigned to the resulting box.\n@param parent The parent box in the tree of boxes.\n@param n The element that this box belongs to.\n@param replaced When set to <code>true</code>, a replaced block box will be created. Otherwise, a normal non-replaced block will be created.\n@return The new block box.",
"We have obtained album art for a device, so store it and alert any listeners.\n\n@param update the update which caused us to retrieve this art\n@param art the album art which we retrieved",
"Calls the provided closure for a \"page\" of rows from the table represented by this DataSet.\nA page is defined as starting at a 1-based offset, and containing a maximum number of rows.\n\n@param offset the 1-based offset for the first row to be processed\n@param maxRows the maximum number of rows to be processed\n@param closure called for each row with a GroovyResultSet\n@throws SQLException if a database access error occurs\n@see groovy.sql.Sql#eachRow(String, java.util.List, int, int, groovy.lang.Closure)"
] |
private static void invokeSetter(final Object bean, final Method setMethod, final Object fieldValue) {
try {
setMethod.setAccessible(true);
setMethod.invoke(bean, fieldValue);
}
catch(final Exception e) {
throw new SuperCsvReflectionException(String.format("error invoking method %s()", setMethod.getName()), e);
}
} | [
"Invokes the setter on the bean with the supplied value.\n\n@param bean\nthe bean\n@param setMethod\nthe setter method for the field\n@param fieldValue\nthe field value to set\n@throws SuperCsvException\nif there was an exception invoking the setter"
] | [
"Returns details of a previously-requested Organization export.\n\n@param organizationExport Globally unique identifier for the Organization export.\n@return Request object",
"convenience method for setting working or non-working days.\n\n@param day required day\n@param working flag indicating if the day is a working day",
"Get the object responsible for printing to the correct output format.\n\n@param specJson the request json from the client",
"Looks up the object from the cache\n\n@param oid The Identity to look up the object for\n@return The object if found, otherwise null",
"Indicate to the RecyclerView the type of Renderer used to one position using a numeric value.\n\n@param position to analyze.\n@return the id associated to the Renderer used to render the content given a position.",
"Use this API to fetch statistics of gslbdomain_stats resource of given name .",
"Sets the transformations to be applied to the shape before indexing it.\n\n@param transformations the sequence of transformations\n@return this with the specified sequence of transformations",
"Replaces the model used to depict the controller in the scene.\n\n@param controllerModel root of hierarchy to use for controller model\n@see #getControllerModel()\n@see #showControllerModel(boolean)",
"Returns the active logged in user."
] |
protected void writeBody(HttpURLConnection connection, ProgressListener listener) {
if (this.body == null) {
return;
}
connection.setDoOutput(true);
try {
OutputStream output = connection.getOutputStream();
if (listener != null) {
output = new ProgressOutputStream(output, listener, this.bodyLength);
}
int b = this.body.read();
while (b != -1) {
output.write(b);
b = this.body.read();
}
output.close();
} catch (IOException e) {
throw new BoxAPIException("Couldn't connect to the Box API due to a network error.", e);
}
} | [
"Writes the body of this request to an HttpURLConnection.\n\n<p>Subclasses overriding this method must remember to close the connection's OutputStream after writing.</p>\n\n@param connection the connection to which the body should be written.\n@param listener an optional listener for monitoring the write progress.\n@throws BoxAPIException if an error occurs while writing to the connection."
] | [
"disables the responses for a given pathname and user id\n\n@param model\n@param path_id\n@param clientUUID\n@return\n@throws Exception",
"Use this API to delete onlinkipv6prefix of given name.",
"Paint a check pattern, used for a background to indicate image transparency.\n@param c the component to draw into\n@param g the Graphics objects\n@param x the x position\n@param y the y position\n@param width the width\n@param height the height",
"Commit all written data to the physical disk\n\n@throws IOException any io exception",
"alert, prompt, and confirm behave as if the OK button is always clicked.",
"Get the information for a specified photoset.\n\nThis method does not require authentication.\n\n@param photosetId\nThe photoset ID\n@return The Photoset\n@throws FlickrException",
"Use this API to add tmtrafficaction resources.",
"Answer the SQL-Clause for a BetweenCriteria\n\n@param alias\n@param pathInfo\n@param c BetweenCriteria\n@param buf",
"Called by the engine to trigger the cleanup at the end of a payload thread."
] |
public boolean needMerge(@NotNull final BasePage left, @NotNull final BasePage right) {
final int leftSize = left.getSize();
final int rightSize = right.getSize();
return leftSize == 0 || rightSize == 0 ||
leftSize + rightSize <= (((isDupTree(left) ? getDupPageMaxSize() : getPageMaxSize()) * 7) >> 3);
} | [
"Is invoked on the leaf deletion only.\n\n@param left left page.\n@param right right page.\n@return true if the left page ought to be merged with the right one."
] | [
"Return a collection of product descriptors for each option in the smile.\n\n@param referenceDate The reference date (translating the maturity floating point date to dates.\n@return a collection of product descriptors for each option in the smile.",
"Adds the contents of a Java package to this JAR.\n\n@param clazz a class whose package we wish to add to the JAR.\n@param filter a filter to select particular classes\n@return {@code this}",
"Generates timephased actual costs from the assignment's cost value. Used for Cost type Resources.\n\n@return timephased cost",
"Registers a new site for specific data collection. If null is used as a\nsite key, then all data is collected.\n\n@param siteKey\nthe site to collect geo data for",
"Stop an animation.",
"Adds all fields declared in the object's class and its superclasses to the output.\n@return this",
"Get layer style by name.\n\n@param name layer style name\n@return layer style",
"High-accuracy Normal cumulative distribution function.\n\n@param x Value.\n@return Result.",
"Reads the header data from a block.\n\n@param buffer block data\n@param offset current offset into block data\n@param postHeaderSkipBytes bytes to skip after reading the header\n@return current BlockHeader instance"
] |
@Override
public void detachScriptFile(IScriptable target) {
IScriptFile scriptFile = mScriptMap.remove(target);
if (scriptFile != null) {
scriptFile.invokeFunction("onDetach", new Object[] { target });
}
} | [
"Detach any script file from a scriptable target.\n\n@param target The scriptable target."
] | [
"List the indexes in the database. The returned object allows for listing indexes by type.\n\n@return indexes object with methods for getting indexes of a particular type",
"Accessor method used to retrieve a String object representing the\ncontents of an individual field. If the field does not exist in the\nrecord, null is returned.\n\n@param field the index number of the field to be retrieved\n@return the value of the required field",
"Merges the item from the resultLocaleValues into the corresponding item of the localeValues.\n@param item the item to merge\n@param localeValues the values where the item gets merged into\n@param resultLocaleValues the values where the item to merge is read from\n@return the modified localeValues with the merged item",
"Lookup an object via its name.\n@param name The name of an object.\n@return The object with that name.\n@exception ObjectNameNotFoundException There is no object with the specified name.\nObjectNameNotFoundException",
"Creates a resource key with id defined as enumeration value name and bundle specified by given class.\n@param clazz the class owning the bundle\n@param value enumeration value used to define key id\n@return the resource key",
"Adds a slash to a path if it doesn't end with a slash.\n\n@param folderName The path to append a possible slash.\n@return The new, correct path.",
"If a and b are not null, returns a new duration of a + b.\nIf a is null and b is not null, returns b.\nIf a is not null and b is null, returns a.\nIf a and b are null, returns null.\nIf needed, b is converted to a's time unit using the project properties.\n\n@param a first duration\n@param b second duration\n@param defaults project properties containing default values\n@return a + b",
"Convert a Planner date-time value into a Java date.\n\n20070222T080000Z\n\n@param value Planner date-time\n@return Java Date instance",
"Returns the y-coordinate of a vertex bitangent.\n\n@param vertex the vertex index\n@return the y coordinate"
] |
private void animateIndicatorInvalidate() {
if (mIndicatorScroller.computeScrollOffset()) {
mIndicatorOffset = mIndicatorScroller.getCurr();
invalidate();
if (!mIndicatorScroller.isFinished()) {
postOnAnimation(mIndicatorRunnable);
return;
}
}
completeAnimatingIndicator();
} | [
"Callback when each frame in the indicator animation should be drawn."
] | [
"Return the releaseId\n\n@return releaseId",
"This method is used to process an MPP8 file. This is the file format\nused by Project 98.\n\n@param reader parent file reader\n@param file Parent MPX file\n@param root Root of the POI file system.\n@throws MPXJException\n@throws IOException",
"Writes task predecessor links to a PM XML file.\n\n@param task MPXJ Task instance",
"Checks if a new version of the file can be uploaded with the specified name and size.\n@param name the new name for the file.\n@param fileSize the size of the new version content in bytes.\n@return whether or not the file version can be uploaded.",
"Use this API to unset the properties of systemcollectionparam resource.\nProperties that need to be unset are specified in args array.",
"Get the root path where the build is located, the project may be checked out to\na sub-directory from the root workspace location.\n\n@param globalEnv EnvVars to take the workspace from, if workspace is not found\nthen it is take from project.getSomeWorkspace()\n@return The location of the root of the Gradle build.\n@throws IOException\n@throws InterruptedException",
"Reports that a node is resolved hence other nodes depends on it can consume it.\n\n@param completed the node ready to be consumed",
"Prints a debug log message that details the time taken for the Http\nrequest to be parsed by the coordinator\n\n@param operationType\n@param receivedTimeInMs",
"Returns the bounding sphere of the vertices.\n@param sphere destination array to get bounding sphere.\nThe first entry is the radius, the next\nthree are the center.\n@return radius of bounding sphere or 0.0 if no vertices"
] |
@SuppressWarnings("unchecked")
public static <E> TypeConverter<E> typeConverterFor(Class<E> cls) throws NoSuchTypeConverterException {
TypeConverter<E> typeConverter = TYPE_CONVERTERS.get(cls);
if (typeConverter == null) {
throw new NoSuchTypeConverterException(cls);
}
return typeConverter;
} | [
"Returns a TypeConverter for a given class.\n\n@param cls The class for which the TypeConverter should be fetched."
] | [
"Returns true if required properties for FluoAdmin are set",
"This method writes project property data to a JSON file.",
"Sets a custom response on an endpoint using default profile and client\n\n@param pathValue path (endpoint) value\n@param requestType path request type. \"GET\", \"POST\", etc\n@param customData custom response data\n@return true if success, false otherwise",
"Builds a instance of the class for a map containing the values, without specifying the handler for differences\n\n@param clazz The class to build instance\n@param values The values map\n@return The instance\n@throws InstantiationException Error instantiating\n@throws IllegalAccessException Access error\n@throws IntrospectionException Introspection error\n@throws IllegalArgumentException Argument invalid\n@throws InvocationTargetException Invalid target",
"Read holidays from the database and create calendar exceptions.",
"Calculates the Black-Scholes option value of an atm call option.\n\n@param volatility The Black-Scholes volatility.\n@param optionMaturity The option maturity T.\n@param forward The forward, i.e., the expectation of the index under the measure associated with payoff unit.\n@param payoffUnit The payoff unit, i.e., the discount factor or the anuity associated with the payoff.\n@return Returns the value of a European at-the-money call option under the Black-Scholes model",
"Determine if a task field contains data.\n\n@param task task instance\n@param field target field\n@return true if the field contains data",
"Add an object into cache by key with expiration time specified\n\n@param key\nthe key to index the object within the cache\n@param obj\nthe object to be cached\n@param expiration\nthe seconds after which the object will be evicted from the cache",
"Gets all checked widgets in the group\n@return list of checked widgets"
] |
public App on(Heroku.Stack stack) {
App newApp = copy();
newApp.stack = new App.Stack(stack);
return newApp;
} | [
"Builder method for specifying the stack an app should be created on.\n@param stack Stack to create the app on.\n@return A copy of the {@link App}"
] | [
"appends a WHERE-clause to the Statement\n@param where\n@param crit\n@param stmt",
"An extension point so we can control how the query gets executed.\nThis exists for testing purposes, not because we believe it will\nactually be used for real.",
"Unescape and unquote the path. Ready for translation.",
"Computes the ratio of the smallest value to the largest. Does not assume\nthe array is sorted first\n@param sv array\n@return smallest / largest",
"Determine if a CharSequence can be parsed as a BigInteger.\n\n@param self a CharSequence\n@return true if the CharSequence can be parsed\n@see #isBigInteger(String)\n@since 1.8.2",
"convert Event bean to EventType manually.\n\n@param event the event\n@return the event type",
"Retrieve a UUID from an input stream.\n\n@param is input stream\n@return UUID instance",
"Use this API to fetch all the policydataset resources that are configured on netscaler.",
"Use this API to fetch filtered set of sslcipher_individualcipher_binding resources.\nset the filter parameter values in filtervalue object."
] |
@SuppressWarnings("unchecked")
public T[] nextCombinationAsArray()
{
T[] combination = (T[]) Array.newInstance(elements.getClass().getComponentType(),
combinationIndices.length);
return nextCombinationAsArray(combination);
} | [
"Generate the next combination and return an array containing\nthe appropriate elements.\n@see #nextCombinationAsArray(Object[])\n@see #nextCombinationAsList()\n@return An array containing the elements that make up the next combination."
] | [
"Decode the String from Base64 into a byte array.\n\n@param value the string to be decoded\n@return the decoded bytes as an array\n@since 1.0",
"Given a filesystem, path and buffer-size, read the file contents and\npresents it as a string\n\n@param fs Underlying filesystem\n@param path The file to read\n@param bufferSize The buffer size to use for reading\n@return The contents of the file as a string\n@throws IOException",
"Set the value for a floating point vector of length 3.\n@param key name of uniform to set.\n@param x new X value\n@param y new Y value\n@param z new Z value\n@see #getVec3\n@see #getFloatVec(String)",
"Get the art available for all tracks currently loaded in any player, either on the play deck, or in a hot cue.\n\n@return the album art associated with all current players, including for any tracks loaded in their hot cue slots\n\n@throws IllegalStateException if the ArtFinder is not running",
"Process the scheduling project property from PROJPROP. This table only seems to exist\nin P6 databases, not XER files.\n\n@throws SQLException",
"return null if the operation has no params to validate",
"Returns the class of datatype URI that best characterizes the range of\nthe given property based on its datatype.\n\n@param propertyIdValue\nthe property for which to get a range\n@return the range URI or null if the datatype could not be identified.",
"Returns the rendered element content for all the given containers.\n\n@param element the element to render\n@param containers the containers the element appears in\n\n@return a map from container names to rendered page contents",
"key function to execute a parallel task.\n\n@param task the parallel task\n@return the batch response from manager"
] |
public static base_response update(nitro_service client, cachecontentgroup resource) throws Exception {
cachecontentgroup updateresource = new cachecontentgroup();
updateresource.name = resource.name;
updateresource.weakposrelexpiry = resource.weakposrelexpiry;
updateresource.heurexpiryparam = resource.heurexpiryparam;
updateresource.relexpiry = resource.relexpiry;
updateresource.relexpirymillisec = resource.relexpirymillisec;
updateresource.absexpiry = resource.absexpiry;
updateresource.absexpirygmt = resource.absexpirygmt;
updateresource.weaknegrelexpiry = resource.weaknegrelexpiry;
updateresource.hitparams = resource.hitparams;
updateresource.invalparams = resource.invalparams;
updateresource.ignoreparamvaluecase = resource.ignoreparamvaluecase;
updateresource.matchcookies = resource.matchcookies;
updateresource.invalrestrictedtohost = resource.invalrestrictedtohost;
updateresource.polleverytime = resource.polleverytime;
updateresource.ignorereloadreq = resource.ignorereloadreq;
updateresource.removecookies = resource.removecookies;
updateresource.prefetch = resource.prefetch;
updateresource.prefetchperiod = resource.prefetchperiod;
updateresource.prefetchperiodmillisec = resource.prefetchperiodmillisec;
updateresource.prefetchmaxpending = resource.prefetchmaxpending;
updateresource.flashcache = resource.flashcache;
updateresource.expireatlastbyte = resource.expireatlastbyte;
updateresource.insertvia = resource.insertvia;
updateresource.insertage = resource.insertage;
updateresource.insertetag = resource.insertetag;
updateresource.cachecontrol = resource.cachecontrol;
updateresource.quickabortsize = resource.quickabortsize;
updateresource.minressize = resource.minressize;
updateresource.maxressize = resource.maxressize;
updateresource.memlimit = resource.memlimit;
updateresource.ignorereqcachinghdrs = resource.ignorereqcachinghdrs;
updateresource.minhits = resource.minhits;
updateresource.alwaysevalpolicies = resource.alwaysevalpolicies;
updateresource.persist = resource.persist;
updateresource.pinned = resource.pinned;
updateresource.lazydnsresolve = resource.lazydnsresolve;
updateresource.hitselector = resource.hitselector;
updateresource.invalselector = resource.invalselector;
return updateresource.update_resource(client);
} | [
"Use this API to update cachecontentgroup."
] | [
"Gets the name for the getter for this property\n\n@return The name of the property. The name is \"get\"+ the capitalized propertyName\nor, in the case of boolean values, \"is\" + the capitalized propertyName",
"compute Sinh using Taylor Series.\n\n@param x An angle, in radians.\n@param nTerms Number of terms.\n@return Result.",
"Helper method to convert seed bytes into the long value required by the\nsuper class.",
"Operates on one dimension at a time.",
"Utility method to read a percentage value.\n\n@param data data block\n@param offset offset into data block\n@return percentage value",
"Create a new DirectByteBuffer from a given address and size.\nThe returned DirectByteBuffer does not release the memory by itself.\n\n@param addr\n@param size\n@param att object holding the underlying memory to attach to the buffer.\nThis will prevent the garbage collection of the memory area that's\nassociated with the new <code>DirectByteBuffer</code>\n@return",
">>>>>> measureUntilFull helper methods",
"Create the work pattern assignment map.\n\n@param rows calendar rows\n@return work pattern assignment map",
"Constructs a relative path between this path and a given path.\n\n<p> Relativization is the inverse of {@link #getAbsolutePath(Path) resolution}.\nThis method attempts to construct a {@link #isAbsolute relative} path\nthat when {@link #getAbsolutePath(Path) resolved} against this path, yields a\npath that locates the same file as the given path. For example, on UNIX,\nif this path is {@code \"/a/b\"} and the given path is {@code \"/a/b/c/d\"}\nthen the resulting relative path would be {@code \"c/d\"}.\nBoth paths must be absolute and and either this path or the given path must be a\n{@link #startsWith(Path) prefix} of the other.\n\n@param other\nthe path to relativize against this path\n\n@return the resulting relative path or null if neither of the given paths is a prefix of the other\n\n@throws IllegalArgumentException\nif this path and {@code other} are not both absolute or relative"
] |
public static Method getBridgeMethodTarget(Method someMethod) {
TraitBridge annotation = someMethod.getAnnotation(TraitBridge.class);
if (annotation==null) {
return null;
}
Class aClass = annotation.traitClass();
String desc = annotation.desc();
for (Method method : aClass.getDeclaredMethods()) {
String methodDescriptor = BytecodeHelper.getMethodDescriptor(method.getReturnType(), method.getParameterTypes());
if (desc.equals(methodDescriptor)) {
return method;
}
}
return null;
} | [
"Reflection API to find the method corresponding to the default implementation of a trait, given a bridge method.\n@param someMethod a method node\n@return null if it is not a method implemented in a trait. If it is, returns the method from the trait class."
] | [
"Add an order on the given column\n\n@param columnName the name of the column\n@param ascending whether the sorting is ascending or descending",
"This method writes data for a single resource to a Planner file.\n\n@param mpxjResource MPXJ Resource instance\n@param plannerResource Planner Resource instance",
"This snapshot is meant to be used when updating data.",
"Removes a node meta data entry.\n\n@param key - the meta data key\n@throws GroovyBugError if the key is null",
"Retrieve the version number",
"Stops the background data synchronization thread and releases the local client.",
"Ensures that the specified fields are present in the given class.\n\n@param classDef The class to copy the fields into\n@param fields The fields to copy\n@throws ConstraintException If there is a conflict between the new fields and fields in the class",
"Returns the end time of the event.\n@return the end time of the event.",
"Given a list of store definitions return a list of store names\n\n@param storeDefList The list of store definitions\n@return Returns a list of store names"
] |
public void add(IConverter converter, Object sourceObject,
TypeReference<?> destinationType, Object convertedObject) {
convertedObjects.put(new ConvertedObjectsKey(converter, sourceObject,
destinationType), convertedObject);
} | [
"add a converted object to the pool\n\n@param converter\nthe converter that made the conversion\n@param sourceObject\nthe source object that has been converted\n@param destinationType\nthe destination type\n@param convertedObject\nthe converted object"
] | [
"Return given duration in a human-friendly format. For example, \"4\nminutes\" or \"1 second\". Returns only largest meaningful unit of time,\nfrom seconds up to hours.\n\nThe longest duration it supports is hours.\n\nThis method assumes that there are 60 minutes in an hour,\n60 seconds in a minute and 1000 milliseconds in a second.\nAll currently supplied chronologies use this definition.",
"Invoke to find all services for given service type using specified class loader\n\n@param classLoader specified class loader\n@param serviceType given service type\n@return List of found services",
"Return the count of all objects found\nfor given class, using the PB-api within\nODMG - this may change in further versions.",
"Use this API to unset the properties of Interface resource.\nProperties that need to be unset are specified in args array.",
"Returns an ArrayList of String URLs of the Carousel Images\n@return ArrayList of Strings",
"generate a message for loglevel WARN\n\n@param pObject the message Object",
"Checks that the data starting at startLocRecord looks like a local file record header.\n\n@param channel the channel\n@param startLocRecord offset into channel of the start of the local record\n@param compressedSize expected compressed size of the file, or -1 to indicate this isn't known",
"Counts a single page of the specified gender. If this is the first page\nof that gender on this site, a suitable key is added to the list of the\nsite's genders.\n\n@param gender\nthe gender to count\n@param siteRecord\nthe site record to count it for",
"Executes a query using the given parameters. The query results will be added to the\nExecutionResults using the given identifier.\n\n@param identifier\nThe identifier to be used for the results when added to the ExecutionResults\n@param name\nThe name of the query to execute\n@param arguments\nThe arguments to be used for the query parameters\n@return"
] |
protected void getBatch(int batchSize){
// if (numCalls == 0) {
// for (int i = 0; i < 1538*\15; i++) {
// randGenerator.nextInt(this.dataDimension());
// }
// }
// numCalls++;
if (thisBatch == null || thisBatch.length != batchSize){
thisBatch = new int[batchSize];
}
//-----------------------------
//RANDOM WITH REPLACEMENT
//-----------------------------
if (sampleMethod.equals(SamplingMethod.RandomWithReplacement)){
for(int i = 0; i<batchSize;i++){
thisBatch[i] = randGenerator.nextInt(this.dataDimension()); //Just generate a random index
// System.err.println("numCalls = "+(numCalls++));
}
//-----------------------------
//ORDERED
//-----------------------------
}else if(sampleMethod.equals(SamplingMethod.Ordered)){
for(int i = 0; i<batchSize;i++){
thisBatch[i] = (curElement + i) % this.dataDimension() ; //Take the next batchSize points in order
}
curElement = (curElement + batchSize) % this.dataDimension(); //watch out for overflow
//-----------------------------
//RANDOM WITHOUT REPLACEMENT
//-----------------------------
}else if(sampleMethod.equals(SamplingMethod.RandomWithoutReplacement)){
//Declare the indices array if needed.
if (allIndices == null || allIndices.size()!= this.dataDimension()){
allIndices = new ArrayList<Integer>();
for(int i=0;i<this.dataDimension();i++){
allIndices.add(i);
}
Collections.shuffle(allIndices,randGenerator);
}
for(int i = 0; i<batchSize;i++){
thisBatch[i] = allIndices.get((curElement + i) % allIndices.size()); //Grab the next batchSize indices
}
if (curElement + batchSize > this.dataDimension()){
Collections.shuffle(Arrays.asList(allIndices),randGenerator); //Shuffle if we got to the end of the list
}
//watch out for overflow
curElement = (curElement + batchSize) % allIndices.size(); //Rollover
}else{
System.err.println("NO SAMPLING METHOD SELECTED");
System.exit(1);
}
} | [
"private int numCalls = 0;"
] | [
"Log a byte array as a hex dump.\n\n@param data byte array",
"Handling out request.\n\n@param message\nthe message\n@throws Fault\nthe fault",
"Remove a path\n\n@param pathId ID of path",
"Cancels all the pending & running requests and releases all the dispatchers.",
"The nullity of the decomposed matrix.\n\n@see SingularOps_DDRM#nullity(SingularValueDecomposition_F64, double)\n\n@return The matrix's nullity",
"With this impl, it only returns the same credentials once. Otherwise it's possible that a loop will occur.\nWhen server returns status code 401, the HTTP client provides the same credentials forever.\nSince we create a new HTTP client for every request, we can handle it this way.",
"Gets the node meta data.\n\n@param key - the meta data key\n@return the node meta data value for this key",
"Return the item view type used by the adapter to implement recycle mechanism.\n\n@param content to be rendered.\n@return an integer that represents the renderer inside the adapter.",
"This continuously tries to reconnect in a separate thread and will only stop if the connection was established\nsuccessfully or the server gets shutdown. If there is currently a reconnect task active the connection paramaters\nand callback will get updated.\n\n@param reconnectUri the updated connection uri\n@param authKey the updated authentication key\n@param callback the current callback"
] |
private static String getFileName(@Nullable final MapPrinter mapPrinter, final PJsonObject spec) {
String fileName = spec.optString(Constants.OUTPUT_FILENAME_KEY);
if (fileName != null) {
return fileName;
}
if (mapPrinter != null) {
final Configuration config = mapPrinter.getConfiguration();
final String templateName = spec.getString(Constants.JSON_LAYOUT_KEY);
final Template template = config.getTemplate(templateName);
if (template.getOutputFilename() != null) {
return template.getOutputFilename();
}
if (config.getOutputFilename() != null) {
return config.getOutputFilename();
}
}
return "mapfish-print-report";
} | [
"Read filename from spec."
] | [
"Updates the template with the specified id.\n\n@param id id of the template to update\n@param options a Map of options to update/add.\n@return {@link Response}\n\n@throws RequestException if request to transloadit server fails.\n@throws LocalOperationException if something goes wrong while running non-http operations.",
"Use this API to Import sslfipskey resources.",
"Release the rebalancing permit for a particular node id\n\n@param nodeId The node id whose permit we want to release",
"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.",
"Converts SMatrixTriplet_64 into a SMatrixCC_64.\n\n@param src Original matrix which is to be copied. Not modified.\n@param dst Destination. Will be a copy. Modified.\n@param hist Workspace. Should be at least as long as the number of columns. Can be null.",
"Creates a decorator bean\n\n@param <T> The type\n@param clazz The class\n@param beanManager the current manager\n@return a Bean",
"Generic method to extract Primavera fields and assign to MPXJ fields.\n\n@param map map of MPXJ field types and Primavera field names\n@param row Primavera data container\n@param container MPXJ data contain",
"Use this API to fetch aaagroup_aaauser_binding resources of given name .",
"Emit a string event with parameters and force all listeners to be called asynchronously.\n\n@param event\nthe target event\n@param args\nthe arguments passed in\n@see #emit(String, Object...)"
] |
public static ModelControllerClient createReceiving(final Channel channel, final ExecutorService executorService) {
final ManagementClientChannelStrategy strategy = ManagementClientChannelStrategy.create(channel);
final ManagementChannelHandler handler = new ManagementChannelHandler(strategy, executorService);
final ExistingChannelModelControllerClient client = new ExistingChannelModelControllerClient(handler);
handler.addHandlerFactory(client);
channel.addCloseHandler(new CloseHandler<Channel>() {
@Override
public void handleClose(Channel closed, IOException exception) {
handler.shutdown();
try {
handler.awaitCompletion(1, TimeUnit.SECONDS);
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
} finally {
handler.shutdownNow();
}
}
});
channel.receiveMessage(handler.getReceiver());
return client;
} | [
"Create a model controller client which is exclusively receiving messages on an existing channel.\n\n@param channel the channel\n@param executorService an executor\n@return the created client"
] | [
"Converts from RGB to Hexadecimal notation.",
"Extracts the row from a matrix.\n@param a Input matrix\n@param row Which row is to be extracted\n@param out output. Storage for the extracted row. If null then a new vector will be returned.\n@return The extracted row.",
"callers of doLogin should be serialized before calling in.",
"Get a list of referring domains for a collection.\n\n@param date\n(Required) Stats will be returned for this date. A day according to Flickr Stats starts at midnight GMT for all users, and timestamps will\nautomatically be rounded down to the start of the day.\n@param collectionId\n(Optional) The id of the collection to get stats for. If not provided, stats for all collections will be returned.\n@param perPage\n(Optional) Number of domains to return per page. If this argument is omitted, it defaults to 25. The maximum allowed value is 100.\n@param page\n(Optional) The page of results to return. If this argument is omitted, it defaults to 1.\n@see \"http://www.flickr.com/services/api/flickr.stats.getCollectionDomains.html\"",
"Gets the task from in progress map.\n\n@param jobId\nthe job id\n@return the task from in progress map",
"Converts url path to the Transloadit full url.\nReturns the url passed if it is already full.\n\n@param url\n@return String",
"This method is used to initiate a release staging process using the Artifactory Release Staging API.",
"Retrieve a specific row by index number, creating a blank row if this row does not exist.\n\n@param index index number\n@return MapRow instance",
"Decode the password from the given data. Will decode the data block as well.\n\n@param data encrypted data block\n@param encryptionCode encryption code\n\n@return password"
] |
public static java.sql.Time getTime(Object value) {
try {
return toTime(value);
} catch (ParseException pe) {
pe.printStackTrace();
return null;
}
} | [
"Convert an Object to a Time, without an Exception"
] | [
"Add a new server mapping to current profile\n\n@param sourceHost source hostname\n@param destinationHost destination hostname\n@param hostHeader host header\n@return ServerRedirect",
"Adds search fields from elements on a container page to a container page's document.\n@param document The document for the container page\n@param cms The current CmsObject\n@param resource The resource of the container page\n@param systemFields The list of field names for fields where mappings to should be discarded, since these fields are used system internally.\n@return the manipulated document",
"Get an extent aware RsIterator based on the Query\n\n@param query\n@param cld\n@param factory the Factory for the RsIterator\n@return OJBIterator",
"Creates a non-binary media type with the given type, subtype, and UTF-8 encoding\n@throws com.tngtech.jgiven.exception.JGivenWrongUsageException if any of the given arguments is {@code null}",
"Print a date time value.\n\n@param value date time value\n@return string representation",
"Stop the drag action.",
"Designate the vertex attribute and shader variable for the texture coordinates\nassociated with the named texture.\n\n@param texName name of texture\n@param texCoordAttr name of vertex attribute with texture coordinates.\n@param shaderVarName name of shader variable to get texture coordinates.",
"Creates a statement with parameters that should work with most RDBMS.",
"Gets the URL of the route with given name.\n@param routeName to return its URL\n@return URL backed by the route with given name."
] |
private void writeAssignments()
{
Allocations allocations = m_factory.createAllocations();
m_plannerProject.setAllocations(allocations);
List<Allocation> allocationList = allocations.getAllocation();
for (ResourceAssignment mpxjAssignment : m_projectFile.getResourceAssignments())
{
Allocation plannerAllocation = m_factory.createAllocation();
allocationList.add(plannerAllocation);
plannerAllocation.setTaskId(getIntegerString(mpxjAssignment.getTask().getUniqueID()));
plannerAllocation.setResourceId(getIntegerString(mpxjAssignment.getResourceUniqueID()));
plannerAllocation.setUnits(getIntegerString(mpxjAssignment.getUnits()));
m_eventManager.fireAssignmentWrittenEvent(mpxjAssignment);
}
} | [
"This method writes assignment data to a Planner file."
] | [
"Start the initialization.\n\n@param id\n@param manager\n@param bootstrap\n@return the initialized Weld container",
"Configure the HTTP response to switch off caching.\n\n@param response response to configure\n@since 1.9.0",
"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.",
"Determines a histogram of contiguous runs of partitions within a zone.\nI.e., for each run length of contiguous partitions, how many such runs\nare there.\n\nDoes not correctly address \"wrap around\" of partition IDs (i.e., the fact\nthat partition ID 0 is \"next\" to partition ID 'max')\n\n@param cluster\n@param zoneId\n@return map of length of contiguous run of partitions to count of number\nof such runs.",
"Generating the input vertices is quite complex. Therefore there are multiple methods that handles the input vertices\nbased on the attribute specified in specific order. This method generates all the vertices if there is no other way how to handle\nthe input.",
"Encodes the given URI fragment with the given encoding.\n@param fragment the fragment to be encoded\n@param encoding the character encoding to encode to\n@return the encoded fragment\n@throws UnsupportedEncodingException when the given encoding parameter is not supported",
"Create an import declaration and delegates its registration for an upper class.",
"default visibility for unit test",
"Creates a remove operation.\n\n@param address the address for the operation\n@param recursive {@code true} if the remove should be recursive, otherwise {@code false}\n\n@return the operation"
] |
public static base_responses enable(nitro_service client, String acl6name[]) throws Exception {
base_responses result = null;
if (acl6name != null && acl6name.length > 0) {
nsacl6 enableresources[] = new nsacl6[acl6name.length];
for (int i=0;i<acl6name.length;i++){
enableresources[i] = new nsacl6();
enableresources[i].acl6name = acl6name[i];
}
result = perform_operation_bulk_request(client, enableresources,"enable");
}
return result;
} | [
"Use this API to enable nsacl6 resources of given names."
] | [
"Extracts baseline cost from the MPP file for a specific baseline.\nReturns null if no baseline cost is present, otherwise returns\na list of timephased work items.\n\n@param calendar baseline calendar\n@param normaliser normaliser associated with this data\n@param data timephased baseline work data block\n@param raw flag indicating if this data is to be treated as raw\n@return timephased work",
"Generate a schedule for the given start and end date.\n\n@param referenceDate The reference date (corresponds to \\( t = 0 \\).\n@param startDate The start date.\n@param endDate The end date.\n@return The schedule",
"This is the main entry point used to convert the internal representation\nof timephased baseline work into an external form which can\nbe displayed to the user.\n\n@param file parent project file\n@param work timephased resource assignment data\n@param rangeUnits timescale units\n@param dateList timescale date ranges\n@return list of durations, one per timescale date range",
"Sets a custom configuration attribute.\n@param attributeName the attribute name. Names starting with\n{@link #JDBC_PROPERTY_NAME_PREFIX} will be used (without the prefix) by the\nConnectionFactory when creating connections from DriverManager\n(not used for external DataSource connections). Names starting with\n{@link #DBCP_PROPERTY_NAME_PREFIX} to Commons DBCP (if used, also without prefix).\n@param attributeValue the attribute value",
"Obtains a Julian zoned date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the Julian zoned date-time, not null\n@throws DateTimeException if unable to create the date-time",
"Instantiates an instance of input Java shader class,\nwhich must be derived from GVRShader or GVRShaderTemplate.\n@param id Java class which implements shaders of this type.\n@param ctx GVRContext shader belongs to\n@return GVRShader subclass which implements this shader type",
"Return the parent outline number, or an empty string if\nwe have a root task.\n\n@param outlineNumber child outline number\n@return parent outline number",
"Prepare the document before rendering.\n\n@param outputStream output stream to render to, null if only for layout\n@param format format\n@throws DocumentException oops\n@throws IOException oops\n@throws PrintingException oops",
"Returns an URI which represents the statement rank in a triple.\n\n@param rank\n@return"
] |
public static boolean streamHasText(InputStream in, String text) {
final byte[] readBuffer = new byte[8192];
StringBuffer sb = new StringBuffer();
try {
if (in.available() > 0) {
int bytesRead = 0;
while ((bytesRead = in.read(readBuffer)) != -1) {
sb.append(new String(readBuffer, 0, bytesRead));
if (sb.toString().contains(text)) {
sb = null;
return true;
}
}
}
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
in.close();
} catch (IOException e) {
e.printStackTrace();
}
}
return false;
} | [
"Checks if the InputStream have the text\n\n@param in InputStream to read\n@param text Text to check\n@return whether the inputstream has the text"
] | [
"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 {@link Class#getField(String)}\n@throws SecurityException see {@link Class#getField(String)}\n@throws IllegalAccessException see {@link Field#get(Object)}\n@throws IllegalArgumentException see {@link Field#get(Object)}",
"Read the project data and return a ProjectFile instance.\n\n@return ProjectFile instance",
"Set the Log4j appender.\n\n@param appender the log4j appender",
"Responsible for executing file rolls as and when required, in addition to\ndelegating to the super class to perform the actual append operation.\nSynchronized for safety during enforced file roll.\n\n@see org.apache.log4j.WriterAppender#subAppend(org.apache.log4j.spi.LoggingEvent)",
"Unlinks a set of dependents from this task.\n\n@param task The task to remove dependents from.\n@return Request object",
"Use this API to fetch gslbservice resource of given name .",
"Stores the gathered usage statistics about term uses by language to a CSV\nfile.\n\n@param usageStatistics\nthe statistics to store\n@param fileName\nthe name of the file to use",
"Gets a byte within this sequence of bytes\n\n@param i index into sequence\n@return byte\n@throws IllegalArgumentException if i is out of range",
"Returns the complete record for a single section.\n\n@param section The section to get.\n@return Request object"
] |
public final void draw() {
AffineTransform transform = new AffineTransform(this.transform);
transform.concatenate(getAlignmentTransform());
// draw the background box
this.graphics2d.setTransform(transform);
this.graphics2d.setColor(this.params.getBackgroundColor());
this.graphics2d.fillRect(0, 0, this.settings.getSize().width, this.settings.getSize().height);
//draw the labels
this.graphics2d.setColor(this.params.getFontColor());
drawLabels(transform, this.params.getOrientation(), this.params.getLabelRotation());
//sets the transformation for drawing the bar and do it
final AffineTransform lineTransform = new AffineTransform(transform);
setLineTranslate(lineTransform);
if (this.params.getOrientation() == Orientation.VERTICAL_LABELS_LEFT ||
this.params.getOrientation() == Orientation.VERTICAL_LABELS_RIGHT) {
final AffineTransform rotate = AffineTransform.getQuadrantRotateInstance(1);
lineTransform.concatenate(rotate);
}
this.graphics2d.setTransform(lineTransform);
this.graphics2d.setStroke(new BasicStroke(this.settings.getLineWidth()));
this.graphics2d.setColor(this.params.getColor());
drawBar();
} | [
"Start the rendering of the scalebar."
] | [
"Prepare a parallel UDP Task.\n\n@param command\nthe command\n@return the parallel task builder",
"Submit a command to the server.\n\n@param command The CLI command\n@return The DMR response as a ModelNode\n@throws CommandFormatException\n@throws IOException",
"Notification that the configuration has been written, and its current content should be stored to the .last file",
"Process the hours and exceptions for an individual calendar.\n\n@param calendar project calendar\n@param calendarData hours and exception rows for this calendar",
"Replaces the proxy url with the correct url from the tileMap.\n\n@return correct url to TMS service",
"Upload a file and attach it to a task\n\n@param task Globally unique identifier for the task.\n@param fileContent Content of the file to be uploaded\n@param fileName Name of the file to be uploaded\n@param fileType MIME type of the file to be uploaded\n@return Request object",
"Returns the path to java executable.",
"Allocates a database connection.\n\n@throws SQLException",
"Use this API to unset the properties of aaaparameter resource.\nProperties that need to be unset are specified in args array."
] |
public void value2x2_fast( double a11 , double a12, double a21 , double a22 )
{
double left = (a11+a22)/2.0;
double inside = 4.0*a12*a21 + (a11-a22)*(a11-a22);
if( inside < 0 ) {
value0.real = value1.real = left;
value0.imaginary = Math.sqrt(-inside)/2.0;
value1.imaginary = -value0.imaginary;
} else {
double right = Math.sqrt(inside)/2.0;
value0.real = (left+right);
value1.real = (left-right);
value0.imaginary = value1.imaginary = 0.0;
}
} | [
"Computes the eigenvalues of a 2 by 2 matrix using a faster but more prone to errors method. This\nis the typical method."
] | [
"Returns the y-coordinate of a vertex position.\n\n@param vertex the vertex index\n@return the y coordinate",
"Handles incoming Send Data Request. Send Data request are used\nto acknowledge or cancel failed messages.\n@param incomingMessage the request message to process.",
"Wrap getOperationStatus to avoid throwing exception over JMX",
"Layout which gets displayed if table is empty.\n\n@see org.opencms.ui.apps.user.I_CmsFilterableTable#getEmptyLayout()",
"Finds \"Y\" coordinate value in which more elements could be added in the band\n@param band\n@return",
"Multiply two complex numbers.\n\n@param z1 Complex Number.\n@param z2 Complex Number.\n@return Returns new ComplexNumber instance containing the multiply of specified complex numbers.",
"Determines whether the boolean value of the given string value.\n\n@param value The value\n@param defaultValue The boolean value to use if the string value is neither 'true' nor 'false'\n@return The boolean value of the string",
"Calculates the column width according to its type.\n@param _property the property.\n@return the column width.",
"Method to get the file writer required for the .story files\n\n@param scenarioName\n@param aux_package_path\n@param dest_dir\n@return The file writer that generates the .story files for each test\n@throws BeastException"
] |
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."
] | [
"Set the value of one or more fields based on the contents of a database row.\n\n@param map column to field map\n@param row database row\n@param container field container",
"Gets the Java subclass of GVRShader which implements\nthis shader type.\n@param ctx GVRContext shader is associated with\n@return GVRShader class implementing the shader type",
"Sends all events to the web service. Events will be transformed with mapper before sending.\n\n@param events the events",
"Main executable method of Crawljax CLI.\n\n@param args\nthe arguments.",
"Move this rectangle to the specified bottom-left point.\n\n@param rect rectangle to move\n@param x new x origin\n@param y new y origin",
"Ensures that no more than maxContiguousPartitionsPerZone partitions are\ncontiguous within a single zone.\n\nMoves the necessary partitions to break up contiguous runs from each zone\nto some other random zone/node. There is some chance that such random\nmoves could result in contiguous partitions in other zones.\n\n@param nextCandidateCluster cluster metadata\n@param maxContiguousPartitionsPerZone See RebalanceCLI.\n@return Return updated cluster metadata.",
"Notifies all registered BufferChangeLogger instances of a change.\n\n@param newData the buffer that contains the new data being added\n@param numChars the number of valid characters in the buffer",
"Return the serialized form of this Identity.\n\n@return The serialized representation\n@see #fromByteArray\n@deprecated",
"The only indication that a task is a SubProject is the contents\nof the subproject file name field. We test these here then add a skeleton\nsubproject structure to match the way we do things with MPP files."
] |
public static String parseRoot(String zookeepers) {
int slashIndex = zookeepers.indexOf("/");
if (slashIndex != -1) {
return zookeepers.substring(slashIndex).trim();
}
return "/";
} | [
"Parses chroot section of Zookeeper connection string\n\n@param zookeepers Zookeeper connection string\n@return Returns root path or \"/\" if none found"
] | [
"Returns the supplied string with any trailing '\\n' removed.",
"Creates the stats type.\n\n@param statsItems\nthe stats items\n@param sortType\nthe sort type\n@param functionParser\nthe function parser\n@return the string",
"Converts the key to the format in which it is stored for searching\n\n@param key Byte array of the key\n@return The format stored in the index file",
"Default implementation returns unmodified original Query\n\n@see org.apache.ojb.broker.accesslayer.QueryCustomizer#customizeQuery",
"Change the currentState to the nextState if possible. The next state should already be\npresent in the graph.\n\n@param nextState the next state.\n@return true if currentState is successfully changed.",
"Returns a diagonal matrix with the specified diagonal elements.\n@param values values of diagonal elements\n@return A diagonal matrix",
"Copy the contents of this buffer to the destination LBuffer\n@param srcOffset\n@param dest\n@param destOffset\n@param size",
"Use this API to clear route6 resources.",
"Returns the value of the identified field as a String.\n@param fieldName the name of the field\n@return the value of the field as a String"
] |
public static <T> T[] sort(T[] self, Comparator<T> comparator) {
return sort(self, true, comparator);
} | [
"Sorts the given array into sorted order using the given comparator.\n\n@param self the array to be sorted\n@param comparator a Comparator used for the comparison\n@return the sorted array\n@since 1.5.5"
] | [
"Use this API to fetch servicegroup_lbmonitor_binding resources of given name .",
"If requested, adjust the bounds to the nearest scale and the map size.\n\n@param mapValues Map parameters.\n@param paintArea The size of the painting area.\n@param bounds The map bounds.\n@param dpi the DPI.",
"object -> xml\n\n@param object\n@param childClass",
"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",
"Use this API to clear nspbr6.",
"Test for convergence by seeing if the element with the largest change\nis smaller than the tolerance. In some test cases it alternated between\nthe + and - values of the eigen vector. When this happens it seems to have \"converged\"\nto a non-dominant eigen vector. At least in the case I looked at. I haven't devoted\na lot of time into this issue...",
"Gets the matching beans for binding criteria from a list of beans\n\n@param resolvable the resolvable\n@return A set of filtered beans",
"Extracts the service name from a Server.\n@param server\n@return",
"Add a listener to be invoked when the checked button changes in this group.\n@param listener\n@param <T>\n@return"
] |
public static int e(ISubsystem subsystem, String tag, String msg) {
return isEnabled(subsystem) ?
currentLog.e(tag, getMsg(subsystem,msg)) : 0;
} | [
"Send an ERROR log message with specified subsystem. If subsystem is not enabled the message\nwill not be logged\n@param subsystem logging subsystem\n@param tag Used to identify the source of a log message. It usually identifies the class or\nactivity where the log call occurs.\n@param msg The message you would like logged.\n@return"
] | [
"Use this API to fetch statistics of service_stats resource of given name .",
"Returns true if the specified name is NOT allowed. It isn't allowed if it matches a built in operator\nor if it contains a restricted character.",
"For every String key, it registers the object as a parameter to make it available\nin the report.\n\n@param jd\n@param _parameters",
"Bean types of a session bean.",
"Apply content type to response with result provided.\n\nIf `result` is an error then it might not apply content type as requested:\n* If request is not ajax request, then use `text/html`\n* If request is ajax request then apply requested content type only when `json` or `xml` is requested\n* otherwise use `text/html`\n\n@param result\nthe result used to check if it is error result\n@return this `ActionContext`.",
"This method is used to automatically generate a value\nfor the WBS field of this task.\n\n@param parent Parent Task",
"Compares two double values up to some delta.\n\n@param a\n@param b\n@param delta\n@return The value 0 if a equals b, a value greater than 0 if if a > b, and a value less than 0 if a < b.",
"Add classes to the map file.\n\n@param writer XML stream writer\n@param jarFile jar file\n@param mapClassMethods true if we want to produce .Net style class method names\n@throws IOException\n@throws ClassNotFoundException\n@throws XMLStreamException\n@throws IntrospectionException",
"Rehashes the contents of the receiver into a new table\nwith a smaller or larger capacity.\nThis method is called automatically when the\nnumber of keys in the receiver exceeds the high water mark or falls below the low water mark."
] |
void reportError(Throwable throwable) {
if (logger != null)
logger.error("Timer reported error", throwable);
status = "Thread blocked on error: " + throwable;
error_skips = error_factor;
} | [
"called by timer thread"
] | [
"Configures the given annotation as a tag.\n\nThis is useful if you want to treat annotations as tags in JGiven that you cannot or want not\nto be annotated with the {@link com.tngtech.jgiven.annotation.IsTag} annotation.\n\n@param tagAnnotation the tag to be configured\n@return a configuration builder for configuring the tag",
"Convert the Primavera string representation of a UUID into a Java UUID instance.\n\n@param value Primavera UUID\n@return Java UUID instance",
"If the String argument defaultLocatorSelectionStrategy is as key in the map representing the locatorSelectionStrategies, the\ncorresponding strategy is selected and set as default strategy, else both the selected strategy and the default strategy remain\nunchanged.\n@param defaultLocatorSelectionStrategy",
"Log unexpected column structure.",
"Checks the preconditions for creating a new ForbidSubStr processor with a List of forbidden substrings.\n\n@param forbiddenSubStrings\nthe forbidden substrings\n@throws NullPointerException\nif forbiddenSubStrings is null\n@throws IllegalArgumentException\nif forbiddenSubStrings is empty",
"This method extracts task data from a Planner file.\n\n@param plannerProject Root node of the Planner file",
"Returns the complete project record for a single project.\n\n@param project The project to get.\n@return Request object",
"Get the rate types set.\n\n@return the rate types set, or an empty array, but never null.",
"Executes an operation on the controller latching onto an existing transaction\n\n@param operation the operation\n@param handler the handler\n@param control the transaction control\n@param prepareStep the prepare step to be executed before any other steps\n@param operationId the id of the current transaction\n@return the result of the operation"
] |
public Class getSearchClass()
{
Object obj = getExampleObject();
if (obj instanceof Identity)
{
return ((Identity) obj).getObjectsTopLevelClass();
}
else
{
return obj.getClass();
}
} | [
"Answer the search class.\nThis is the class of the example object or\nthe class represented by Identity.\n@return Class"
] | [
"A package of the specified class will be scanned and found classes will be added to the set of bean classes for the synthetic bean archive.\n\n@param scanRecursively\n@param packageClass\n@return self",
"Use this API to unset the properties of sslcertkey resources.\nProperties that need to be unset are specified in args array.",
"Obtain the name of the caller, most likely a user but could also be a remote process.\n\n@return The name of the caller.",
"Boyer Moore scan that proceeds forwards from the end of the file looking for the first LOCSIG",
"This method takes an array of data and uses this to populate the\nfield map.\n\n@param defaultData field map default data",
"Enables a custom response\n\n@param model\n@param custom\n@param path_id\n@param clientUUID\n@return\n@throws Exception",
"Constructs a relative path between this path and a given path.\n\n<p> Relativization is the inverse of {@link #getAbsolutePath(Path) resolution}.\nThis method attempts to construct a {@link #isAbsolute relative} path\nthat when {@link #getAbsolutePath(Path) resolved} against this path, yields a\npath that locates the same file as the given path. For example, on UNIX,\nif this path is {@code \"/a/b\"} and the given path is {@code \"/a/b/c/d\"}\nthen the resulting relative path would be {@code \"c/d\"}.\nBoth paths must be absolute and and either this path or the given path must be a\n{@link #startsWith(Path) prefix} of the other.\n\n@param other\nthe path to relativize against this path\n\n@return the resulting relative path or null if neither of the given paths is a prefix of the other\n\n@throws IllegalArgumentException\nif this path and {@code other} are not both absolute or relative",
"Set a proxy for REST-requests.\n\n@param proxyHost\n@param proxyPort",
"This is generally only useful for extensions that delegate some of their functionality to other \"internal\"\nextensions of their own that they need to configure.\n\n@param configuration the configuration to be supplied with the returned analysis context.\n@return an analysis context that is a clone of this instance but its configuration is replaced with the provided\none."
] |
public StackTraceElement[] asStackTrace() {
int i = 1;
StackTraceElement[] list = new StackTraceElement[this.size()];
for (Eventable e : this) {
list[this.size() - i] =
new StackTraceElement(e.getEventType().toString(), e.getIdentification()
.toString(), e.getElement().toString(), i);
i++;
}
return list;
} | [
"Build a stack trace for this path. This can be used in generating more meaningful exceptions\nwhile using Crawljax in conjunction with JUnit for example.\n\n@return a array of StackTraceElements denoting the steps taken by this path. The first\nelement [0] denotes the last {@link Eventable} on this path while the last item\ndenotes the first {@link Eventable} executed."
] | [
"a small static helper to set the text color to a textView null save\n\n@param colorHolder\n@param textView\n@param colorDefault",
"Sets the bean store\n\n@param beanStore The bean store",
"If the column name is a dotted column, returns the first part.\nReturns null otherwise.\n\n@param column the column that might have a prefix\n@return the first part of the prefix of the column or {@code null} if the column does not have a prefix.",
"Removes a set of calendar hours from the day to which they\nare currently attached.\n\n@param hours calendar hours instance",
"Sets the specified long attribute to the specified value.\n\n@param name name of the attribute\n@param value value of the attribute\n@since 1.9.0",
"Similar to masking, checks that the range resulting from the bitwise or is contiguous.\n\n@param maskValue\n@param segmentPrefixLength\n@return\n@throws PrefixLenException",
"Disable all overrides for a specified path with overrideType\n\n@param pathID ID of path containing overrides\n@param clientUUID UUID of client\n@param overrideType Override type identifier",
"Iterates through the given CharSequence line by line, splitting each line using\nthe given separator Pattern. The list of tokens for each line is then passed to\nthe given closure.\n\n@param self a CharSequence\n@param pattern the regular expression Pattern for the delimiter\n@param closure a closure\n@return the last value returned by the closure\n@throws java.io.IOException if an error occurs\n@since 1.8.2",
"Auto re-initialize external resourced\nif resources have been already released."
] |
@Deprecated
public void parseAndSetParameter(String value, ModelNode operation, XMLStreamReader reader) throws XMLStreamException {
//we use manual parsing here, and not #getParser().. to preserve backward compatibility.
if (value != null) {
for (String element : value.split(",")) {
parseAndAddParameterElement(element.trim(), operation, reader);
}
}
} | [
"Parses whole value as list attribute\n@deprecated in favour of using {@link AttributeParser attribute parser}\n@param value String with \",\" separated string elements\n@param operation operation to with this list elements are added\n@param reader xml reader from where reading is be done\n@throws XMLStreamException if {@code value} is not valid"
] | [
"Retrieve the configuration of the named template.\n\n@param name the template name;",
"Use this API to enable nsacl6 of given name.",
"Write each predecessor for a task.\n\n@param record Task instance",
"Template method for verification of lazy initialisation.",
"Examines the list of variables for any unknown variables and throws an exception if one is found",
"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@param optionStrike The option strike.\n@return The rho of the digital option",
"Extract the subscription ID from a resource ID string.\n@param id the resource ID string\n@return the subscription ID",
"Escapes control characters with a preceding backslash.\nOptionally encodes special chars as unicode escape sequence.\nThe resulting string is safe to be put into a Java string literal between\nthe quotes.",
"Gets the end.\n\n@return the end"
] |
public static sslcipher[] get(nitro_service service, String ciphergroupname[]) throws Exception{
if (ciphergroupname !=null && ciphergroupname.length>0) {
sslcipher response[] = new sslcipher[ciphergroupname.length];
sslcipher obj[] = new sslcipher[ciphergroupname.length];
for (int i=0;i<ciphergroupname.length;i++) {
obj[i] = new sslcipher();
obj[i].set_ciphergroupname(ciphergroupname[i]);
response[i] = (sslcipher) obj[i].get_resource(service);
}
return response;
}
return null;
} | [
"Use this API to fetch sslcipher resources of given names ."
] | [
"Check that the ranges and sizes add up, otherwise we have lost some data somewhere",
"Returns the query string currently in the text field.\n\n@return the query string",
"OR operation which takes 2 arguments and OR's them together.\n\n<p>\n<b>NOTE:</b> There is no guarantee of the order of the clauses that are generated in the final query.\n</p>\n<p>\n<b>NOTE:</b> I can't remove the generics code warning that can be associated with this method. You can instead\nuse the {@link #or(int)} method.\n</p>",
"Set a proxy with authentication for REST-requests.\n\n@param proxyHost\n@param proxyPort\n@param username\n@param password",
"1-D Double array to integer array.\n\n@param array Double array.\n@return Integer array.",
"Sets the day of the month.\n@param day the day to set.",
"Use this API to fetch all the vrid6 resources that are configured on netscaler.",
"Add a channel to the animation to animate the named bone.\n@param boneName name of bone to animate.\n@param channel The animation channel.",
"Add a module.\n\n@param moduleName the module name\n@param slot the module slot\n@param newHash the new hash of the added content\n@return the builder"
] |
private Revision uncachedHeadRevision() {
try (RevWalk revWalk = new RevWalk(jGitRepository)) {
final ObjectId headRevisionId = jGitRepository.resolve(R_HEADS_MASTER);
if (headRevisionId != null) {
final RevCommit revCommit = revWalk.parseCommit(headRevisionId);
return CommitUtil.extractRevision(revCommit.getFullMessage());
}
} catch (CentralDogmaException e) {
throw e;
} catch (Exception e) {
throw new StorageException("failed to get the current revision", e);
}
throw new StorageException("failed to determine the HEAD: " + jGitRepository.getDirectory());
} | [
"Returns the current revision."
] | [
"Sets the bean store\n\n@param beanStore The bean store",
"Creates a statement with parameters that should work with most RDBMS.",
"Get a list of modules regarding filters\n\n@param filters Map<String,String>\n@return List<Module>\n@throws GrapesCommunicationException",
"Use this API to fetch a aaaglobal_binding resource .",
"This is a generic function for retrieving any config value. The returned value\nis the one the server is operating with, no matter whether it comes from defaults\nor from the user-supplied configuration.\n\nThis function only provides access to configs which are deemed safe to share\npublicly (i.e.: not security-related configs). The list of configs which are\nconsidered off-limit can itself be configured via '{@value #RESTRICTED_CONFIGS}'.\n\n@param key config key for which to retrieve the value.\n@return the value for the requested config key, in String format.\nMay return null if the key exists and its value is explicitly set to null.\n@throws UndefinedPropertyException if the requested key does not exist in the config.\n@throws ConfigurationException if the requested key is not publicly available.",
"Add an appliable dependency for this task item.\n\n@param appliable the appliable dependency.\n@return the key to be used as parameter to taskResult(string) method to retrieve updated dependency",
"Get a list of comments made for a particular entity\n\n@param entityId - id of the commented entity\n@param entityType - type of the entity\n@return list of comments",
"Read ClassDescriptors from the given InputStream.\n@see #mergeDescriptorRepository",
"Returns the tags that were root in the definition files. These serve as entry point shortcuts when browsing the graph. We could reduce this to\njust fewer as the root tags may be connected through parents=\"...\"."
] |
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))));
this.isPaused = isPaused;
} catch (IllegalStateException e) {
// eat this
} finally {
docLock.writeLock().unlock();
}
} | [
"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"
] | [
"Gets or creates the a resource for the sub-deployment on the parent deployments resource.\n\n@param deploymentName the name of the deployment\n@param parent the parent deployment used to find the parent resource\n\n@return the already registered resource or a newly created resource",
"Merges two lists of references, eliminating duplicates in the process.\n\n@param references1\n@param references2\n@return merged list",
"Return the class's name, possibly by stripping the leading path",
"Use this API to clear gslbldnsentries resources.",
"Inserts a String array value into the mapping of the underlying Bundle, replacing any existing\nvalue for the given key. Either key or value may be null.\n\n@param key a String, or null\n@param value a String array object, or null\n@return this bundler instance to chain method calls",
"Moves to the next step.",
"Prioritises the list of step candidates that match a given step.\n\n@param stepAsText\nthe textual step to match\n@param candidates\nthe List of StepCandidate\n@return The prioritised list according to the\n{@link PrioritisingStrategy}.",
"Load the windows resize handler with initial view port detection.",
"Send a request to another handler internal to the server, getting back the response body and response code.\n\n@param request request to send to another handler.\n@return {@link InternalHttpResponse} containing the response code and body."
] |
public void load(InputStream in) {
try {
PropertiesConfiguration config = new PropertiesConfiguration();
// disabled to prevent accumulo classpath value from being shortened
config.setDelimiterParsingDisabled(true);
config.load(in);
((CompositeConfiguration) internalConfig).addConfiguration(config);
} catch (ConfigurationException e) {
throw new IllegalArgumentException(e);
}
} | [
"Loads configuration from InputStream. Later loads have lower priority.\n\n@param in InputStream to load from\n@since 1.2.0"
] | [
"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 should be prepended. May not be <code>null</code>.\n@param index\nthe index in the list of segments.",
"Creates an upper triangular matrix whose values are selected from a uniform distribution. If hessenberg\nis greater than zero then a hessenberg matrix of the specified degree is created instead.\n\n@param dimen Number of rows and columns in the matrix..\n@param hessenberg 0 for triangular matrix and > 0 for hessenberg matrix.\n@param min minimum value an element can be.\n@param max maximum value an element can be.\n@param rand random number generator used.\n@return The randomly generated matrix.",
"Set a status message in the JTextComponent passed to this\nmodel.\n@param message The message that should be displayed.",
"Checks whether the property of the given name is allowed for the model element.\n\n@param defClass The class of the model element\n@param propertyName The name of the property\n@return <code>true</code> if the property is allowed for this type of model elements",
"Sets the distance from the origin to the far clipping plane for the\nwhole camera rig.\n\n@param far\nDistance to the far clipping plane.",
"Creates an IBlur instance for the given algorithm enum\n\n@param algorithm\n@param contextWrapper\n@return",
"Get the element at the index as a string.\n\n@param i the index of the element to access",
"Converts the Conditionals into real headers.\n@return real headers.",
"Core implementation of matchPath. It is isolated so that it can be called\nfrom TokenizedPattern."
] |
static <K, V> PageMetadata<K, V> mergeTokenAndQueryParameters(String paginationToken, final
ViewQueryParameters<K, V> initialParameters) {
// Decode the base64 token into JSON
String json = new String(Base64.decodeBase64(paginationToken), Charset.forName("UTF-8"));
// Get a suitable Gson, we need any adapter registered for the K key type
Gson paginationTokenGson = getGsonWithKeyAdapter(initialParameters);
// Deserialize the pagination token JSON, using the appropriate K, V types
PaginationToken token = paginationTokenGson.fromJson(json, PaginationToken.class);
// Create new query parameters using the initial ViewQueryParameters as a starting point.
ViewQueryParameters<K, V> tokenPageParameters = initialParameters.copy();
// Merge the values from the token into the new query parameters
tokenPageParameters.descending = token.descending;
tokenPageParameters.endkey = token.endkey;
tokenPageParameters.endkey_docid = token.endkey_docid;
tokenPageParameters.inclusive_end = token.inclusive_end;
tokenPageParameters.startkey = token.startkey;
tokenPageParameters.startkey_docid = token.startkey_docid;
return new PageMetadata<K, V>(token.direction, token
.pageNumber, tokenPageParameters);
} | [
"Generate a PageMetadata object for the page represented by the specified pagination token.\n\n@param paginationToken opaque pagination token\n@param initialParameters the initial view query parameters (i.e. for the page 1 request).\n@param <K> the view key type\n@param <V> the view value type\n@return PageMetadata object for the given page"
] | [
"Expands all tabs into spaces. Assumes the CharSequence represents a single line of text.\n\n@param self A line to expand\n@param tabStop The number of spaces a tab represents\n@return The expanded toString() of this CharSequence\n@see #expandLine(String, int)\n@since 1.8.2",
"Tests correctness.",
"Converts a time represented as an integer to a Date instance.\n\n@param time integer time\n@return Date instance",
"Queries database meta data to check for the existence of\nspecific tables.",
"Returns the query string of a URL from a parameter list.\n\n@param params\nMap with parameters\n@return query string",
"Start the initialization.\n\n@param id\n@param manager\n@param bootstrap\n@return the initialized Weld container",
"helper to calculate the actionBar height\n\n@param context\n@return",
"get the underlying wrapped connection\n@return OTMConnection raw connection to the OTM.",
"When it is time to actually close a client, do so, and clean up the related data structures.\n\n@param client the client which has been idle for long enough to be closed"
] |
public Task add()
{
Task task = new Task(m_projectFile, (Task) null);
add(task);
m_projectFile.getChildTasks().add(task);
return task;
} | [
"Add a task to the project.\n\n@return new task instance"
] | [
"Creates a scatter query from the given user query\n\n@param query the user's query.\n@param numSplits the number of splits to create.",
"Creates a file\n\n@param folder File\n@param fileName String\n@throws IOException",
"Add a clause where the ID is from an existing object.",
"Create an index of base font numbers and their associated base\nfont instances.\n@param data property data",
"Returns the given text with the first letter in upper case.\n\n<h2>Examples:</h2>\n<pre>\ncapitalize(\"hi\") == \"Hi\"\ncapitalize(\"Hi\") == \"Hi\"\ncapitalize(\"hi there\") == \"hi there\"\ncapitalize(\"\") == \"\"\ncapitalize(null) == null\n</pre>\n@param text the text to capitalize\n@return text with the first letter in upper case",
"Use this API to delete ntpserver.",
"Find documents using an index\n\n@param selectorJson String representation of a JSON object describing criteria used to\nselect documents. For example:\n{@code \"{ \\\"selector\\\": {<your data here>} }\"}.\n@param classOfT The class of Java objects to be returned\n@param <T> the type of the Java object to be returned\n@return List of classOfT objects\n@see #findByIndex(String, Class, FindByIndexOptions)\n@see <a\nhref=\"https://console.bluemix.net/docs/services/Cloudant/api/cloudant_query.html#selector-syntax\"\ntarget=\"_blank\">selector syntax</a>\n@deprecated Use {@link #query(String, Class)} instead",
"Gets an exception reporting an unexpected XML element.\n\n@param reader a reference to the stream reader.\n@return the constructed {@link javax.xml.stream.XMLStreamException}.",
"performs a DELETE operation against RDBMS.\n@param cld ClassDescriptor providing mapping information.\n@param obj The object to be deleted."
] |
public static Priority getInstance(int priority)
{
Priority result;
if (priority >= LOWEST && priority <= DO_NOT_LEVEL && (priority % 100 == 0))
{
result = VALUE[(priority / 100) - 1];
}
else
{
result = new Priority(priority);
}
return (result);
} | [
"This method takes an integer enumeration of a priority\nand returns an appropriate instance of this class. Note that unrecognised\nvalues are treated as medium priority.\n\n@param priority int version of the priority\n@return Priority class instance"
] | [
"Get the list of store names from a list of store definitions\n\n@param list\n@param ignoreViews\n@return list of store names",
"Checks if a newly created action wants to write output to stdout, and\nlogs a warning if other actions are doing the same.\n\n@param newAction\nthe new action to be checked",
"Sets reference to the graph owning this node.\n\n@param ownerGraph the owning graph",
"Copies entries in the source map to target map.\n\n@param source source map\n@param target target map",
"Parses chroot section of Zookeeper connection string\n\n@param zookeepers Zookeeper connection string\n@return Returns root path or \"/\" if none found",
"Checks the widget by index\n@param checkableIndex The index is in the range from 0 to size -1, where size is the number of\nCheckable widgets in the group. It does not take into account any\nnon-Checkable widgets added to the group widget.\n@return {@code True} if {@code checkableWidget} is a child of this {@code CheckableGroup} and\nwas not already checked; {@code false} otherwise.",
"Decomposes the provided matrix and stores the result in the same matrix.\n\n@param A Matrix that is to be decomposed. Modified.\n@return If it succeeded or not.",
"Parses a record containing hours and add them to a container.\n\n@param ranges hours container\n@param hoursRecord hours record",
"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 {@link Class#getField(String)}\n@throws SecurityException see {@link Class#getField(String)}\n@throws IllegalAccessException see {@link Field#get(Object)}\n@throws IllegalArgumentException see {@link Field#get(Object)}"
] |
public void setOfflineState(boolean setToOffline) {
// acquire write lock
writeLock.lock();
try {
String currentState = ByteUtils.getString(get(SERVER_STATE_KEY, null).get(0).getValue(),
"UTF-8");
if(setToOffline) {
// from NORMAL_SERVER to OFFLINE_SERVER
if(currentState.equals(VoldemortState.NORMAL_SERVER.toString())) {
put(SERVER_STATE_KEY, VoldemortState.OFFLINE_SERVER);
initCache(SERVER_STATE_KEY);
put(SLOP_STREAMING_ENABLED_KEY, false);
initCache(SLOP_STREAMING_ENABLED_KEY);
put(PARTITION_STREAMING_ENABLED_KEY, false);
initCache(PARTITION_STREAMING_ENABLED_KEY);
put(READONLY_FETCH_ENABLED_KEY, false);
initCache(READONLY_FETCH_ENABLED_KEY);
} else if(currentState.equals(VoldemortState.OFFLINE_SERVER.toString())) {
logger.warn("Already in OFFLINE_SERVER state.");
return;
} else {
logger.error("Cannot enter OFFLINE_SERVER state from " + currentState);
throw new VoldemortException("Cannot enter OFFLINE_SERVER state from "
+ currentState);
}
} else {
// from OFFLINE_SERVER to NORMAL_SERVER
if(currentState.equals(VoldemortState.NORMAL_SERVER.toString())) {
logger.warn("Already in NORMAL_SERVER state.");
return;
} else if(currentState.equals(VoldemortState.OFFLINE_SERVER.toString())) {
put(SERVER_STATE_KEY, VoldemortState.NORMAL_SERVER);
initCache(SERVER_STATE_KEY);
put(SLOP_STREAMING_ENABLED_KEY, true);
initCache(SLOP_STREAMING_ENABLED_KEY);
put(PARTITION_STREAMING_ENABLED_KEY, true);
initCache(PARTITION_STREAMING_ENABLED_KEY);
put(READONLY_FETCH_ENABLED_KEY, true);
initCache(READONLY_FETCH_ENABLED_KEY);
init();
initNodeId(getNodeIdNoLock());
} else {
logger.error("Cannot enter NORMAL_SERVER state from " + currentState);
throw new VoldemortException("Cannot enter NORMAL_SERVER state from "
+ currentState);
}
}
} finally {
writeLock.unlock();
}
} | [
"change server state between OFFLINE_SERVER and NORMAL_SERVER\n\n@param setToOffline True if set to OFFLINE_SERVER"
] | [
"Checks if the given String is null or contains only whitespaces.\nThe String is trimmed before the empty check.\n\n@param argument the String to check for null or emptiness\n@param argumentName the name of the argument to check.\nThis is used in the exception message.\n@return the String that was given as argument\n@throws IllegalArgumentException in case argument is null or empty",
"Wrap an existing setter.",
"Get the element at the index as an integer.\n\n@param i the index of the element to access",
"Retrieves the amount of time between two date time values. Note that\nthese values are converted into canonical values to remove the\ndate component.\n\n@param start start time\n@param end end time\n@return length of time",
"Declares additional internal data structures.",
"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",
"Invalidate layout setup.",
"Renames this folder.\n\n@param newName the new name of the folder.",
"Gets the currency codes, or the regular expression to select codes.\n\n@return the query for chaining."
] |
public GVRCursorController findCursorController(GVRControllerType type) {
for (int index = 0, size = cache.size(); index < size; index++)
{
int key = cache.keyAt(index);
GVRCursorController controller = cache.get(key);
if (controller.getControllerType().equals(type)) {
return controller;
}
}
return null;
} | [
"Get the first controller of a specified type\n@param type controller type to search for\n@return controller found or null if no controllers of the given type"
] | [
"Vend a SessionVar with the default value",
"Creates an upper triangular matrix whose values are selected from a uniform distribution. If hessenberg\nis greater than zero then a hessenberg matrix of the specified degree is created instead.\n\n@param dimen Number of rows and columns in the matrix..\n@param hessenberg 0 for triangular matrix and > 0 for hessenberg matrix.\n@param min minimum value an element can be.\n@param max maximum value an element can be.\n@param rand random number generator used.\n@return The randomly generated matrix.",
"Mbeans for FETCH_ENTRIES",
"Get a message bundle of the given type.\n\n@param type the bundle type class\n\n@return the bundle",
"Adds the given value to the list of values that should still be\nserialized. The given RDF resource will be used as a subject.\n\n@param value\nthe value to be serialized\n@param resource\nthe RDF resource that is used as a subject for serialization",
"Applies the given codec registry to be used alongside the default codec registry.\n\n@param codecRegistry the codec registry to merge in.\n@return an {@link StitchObjectMapper} with the merged codec registries.",
"Finds the parent address, everything before the last address part.\n\n@param address the address to get the parent\n\n@return the parent address\n\n@throws IllegalArgumentException if the address is not of type {@link ModelType#LIST} or is empty",
"Abort an active extern transaction associated with the given PB.",
"Return true if the expression is a constructor call on a class that matches the supplied.\n@param expression - the expression\n@param classNamePattern - the possible List of class names\n@return as described"
] |
public static Identity fromByteArray(final byte[] anArray) throws PersistenceBrokerException
{
// reverse of the serialize() algorithm:
// read from byte[] with a ByteArrayInputStream, decompress with
// a GZIPInputStream and then deserialize by reading from the ObjectInputStream
try
{
final ByteArrayInputStream bais = new ByteArrayInputStream(anArray);
final GZIPInputStream gis = new GZIPInputStream(bais);
final ObjectInputStream ois = new ObjectInputStream(gis);
final Identity result = (Identity) ois.readObject();
ois.close();
gis.close();
bais.close();
return result;
}
catch (Exception ex)
{
throw new PersistenceBrokerException(ex);
}
} | [
"Factory method that returns an Identity object created from a serializated representation.\n\n@param anArray The serialized representation\n@return The identity\n@see {@link #serialize}.\n@deprecated"
] | [
"Get the Json Schema of the input path, assuming the path contains just one\nschema version in all files under that path.",
"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",
"Remove all unnecessary comments from a lexer or parser file",
"Returns the query string currently in the text field.\n\n@return the query string",
"After obtaining a connection, perform additional tasks.\n@param handle\n@param statsObtainTime",
"This method retrieves the data at the given offset and returns\nit as a String, assuming the underlying data is composed of\nsingle byte characters.\n\n@param offset offset of required data\n@return string containing required data",
"Runs the given method with the specified arguments, substituting with proxies where necessary\n@param method\n@param target proxy target\n@param args\n@return Proxy-fied result for statements, actual call result otherwise\n@throws IllegalAccessException\n@throws InvocationTargetException",
"Gets the listener classes to which dispatching should be prevented while\nthis event is being dispatched.\n\n@return The listener classes marked to prevent.\n@see #preventCascade(Class)",
"Disallow the job type from being executed.\n@param jobType the job type to disallow"
] |
public void retrieveProxyCollections(Object newObj, ClassDescriptor cld, boolean forced) throws PersistenceBrokerException
{
doRetrieveCollections(newObj, cld, forced, true);
} | [
"Retrieve all Collection attributes of a given instance, and make all of the Proxy Collections\n\n@param newObj the instance to be loaded or refreshed\n@param cld the ClassDescriptor of the instance\n@param forced if set to true, loading is forced even if cld differs"
] | [
"Adds a collection of listeners to the current project.\n\n@param listeners collection of listeners",
"Performs an implicit double step given the set of two imaginary eigenvalues provided.\nSince one eigenvalue is the complex conjugate of the other only one set of real and imaginary\nnumbers is needed.\n\n@param x1 upper index of submatrix.\n@param x2 lower index of submatrix.\n@param real Real component of each of the eigenvalues.\n@param img Imaginary component of one of the eigenvalues.",
"Populates date time settings.\n\n@param record MPX record\n@param properties project properties",
"Check the version of a command class by sending a VERSION_COMMAND_CLASS_GET message to the node.\n@param commandClass the command class to check the version for.",
"Returns all scripts\n\n@param model\n@param type - optional to specify type of script to return\n@return\n@throws Exception",
"By default all bean archives see each other.",
"Publish the bundle resources directly.",
"Sets the yearly absolute date.\n\n@param date yearly absolute date",
"Create a field map for enterprise custom fields.\n\n@param props props data\n@param c target class"
] |
private boolean processRecord(List<String> record) throws MPXJException
{
boolean done = false;
XerRecordType type = RECORD_TYPE_MAP.get(record.get(0));
if (type == null)
{
throw new MPXJException(MPXJException.INVALID_FORMAT);
}
switch (type)
{
case HEADER:
{
processHeader(record);
break;
}
case TABLE:
{
m_currentTableName = record.get(1).toLowerCase();
m_skipTable = !REQUIRED_TABLES.contains(m_currentTableName);
if (m_skipTable)
{
m_currentTable = null;
}
else
{
m_currentTable = new LinkedList<Row>();
m_tables.put(m_currentTableName, m_currentTable);
}
break;
}
case FIELDS:
{
if (m_skipTable)
{
m_currentFieldNames = null;
}
else
{
m_currentFieldNames = record.toArray(new String[record.size()]);
for (int loop = 0; loop < m_currentFieldNames.length; loop++)
{
m_currentFieldNames[loop] = m_currentFieldNames[loop].toLowerCase();
}
}
break;
}
case DATA:
{
if (!m_skipTable)
{
Map<String, Object> map = new HashMap<String, Object>();
for (int loop = 1; loop < record.size(); loop++)
{
String fieldName = m_currentFieldNames[loop];
String fieldValue = record.get(loop);
XerFieldType fieldType = FIELD_TYPE_MAP.get(fieldName);
if (fieldType == null)
{
fieldType = XerFieldType.STRING;
}
Object objectValue;
if (fieldValue.length() == 0)
{
objectValue = null;
}
else
{
switch (fieldType)
{
case DATE:
{
try
{
objectValue = m_df.parseObject(fieldValue);
}
catch (ParseException ex)
{
objectValue = fieldValue;
}
break;
}
case CURRENCY:
case DOUBLE:
case DURATION:
{
try
{
objectValue = Double.valueOf(m_numberFormat.parse(fieldValue.trim()).doubleValue());
}
catch (ParseException ex)
{
objectValue = fieldValue;
}
break;
}
case INTEGER:
{
objectValue = Integer.valueOf(fieldValue.trim());
break;
}
default:
{
objectValue = fieldValue;
break;
}
}
}
map.put(fieldName, objectValue);
}
Row currentRow = new MapRow(map);
m_currentTable.add(currentRow);
//
// Special case - we need to know the default currency format
// ahead of time, so process each row as we get it so that
// we can correctly parse currency values in later tables.
//
if (m_currentTableName.equals("currtype"))
{
processCurrency(currentRow);
}
}
break;
}
case END:
{
done = true;
break;
}
default:
{
break;
}
}
return done;
} | [
"Handles a complete record at a time, stores it in a form ready for\nfurther processing.\n\n@param record record to be processed\n@return flag indicating if this is the last record in the file to be processed\n@throws MPXJException"
] | [
"Get the possible beans for the given element\n\n@param resolvable The resolving criteria\n@return An unmodifiable set of matching beans",
"Get the service implementations for a given type name.\n\n@param serviceTypeName the type name\n@return the possibly empty list of services",
"Called by determineHead and may be overridden in subclasses\nif special treatment is necessary for particular categories.",
"Set the String-representation of size.\n\nLike: Square, Thumbnail, Small, Medium, Large, Original.\n\n@param label",
"Static factory method.\n\n@param targetVariable\nthe variable to find the effective {@code putfield} or\n{@code putstatic} instruction for.\n@param controlFlowBlocks\nall control flow blocks of an initialising constructor or\nmethod.\n@return a new instance of this class.",
"Use this API to unset the properties of nslimitselector resources.\nProperties that need to be unset are specified in args array.",
"Sleeps if necessary to slow down the caller.\n\n@param eventsSeen Number of events seen since last invocation. Basis for\ndetermining whether its necessary to sleep.",
"Resolve the single type argument of the given generic interface against the given\ntarget method which is assumed to return the given interface or an implementation\nof it.\n@param method the target method to check the return type of\n@param genericIfc the generic interface or superclass to resolve the type argument from\n@return the resolved parameter type of the method return type, or {@code null}\nif not resolvable or if the single argument is of type {@link WildcardType}.",
"This method extracts project properties from a Phoenix file.\n\n@param phoenixSettings Phoenix settings\n@param storepoint Current storepoint"
] |
public void bindDelete(PreparedStatement stmt, ClassDescriptor cld, Object obj) throws SQLException
{
if (cld.getDeleteProcedure() != null)
{
this.bindProcedure(stmt, cld, obj, cld.getDeleteProcedure());
}
else
{
int index = 1;
ValueContainer[] values, currentLockingValues;
currentLockingValues = cld.getCurrentLockingValues(obj);
// parameters for WHERE-clause pk
values = getKeyValues(m_broker, cld, obj);
for (int i = 0; i < values.length; i++)
{
setObjectForStatement(stmt, index, values[i].getValue(), values[i].getJdbcType().getType());
index++;
}
// parameters for WHERE-clause locking
values = currentLockingValues;
for (int i = 0; i < values.length; i++)
{
setObjectForStatement(stmt, index, values[i].getValue(), values[i].getJdbcType().getType());
index++;
}
}
} | [
"binds the objects primary key and locking values to the statement, BRJ"
] | [
"Draw text in the center of the specified box.\n\n@param text text\n@param font font\n@param box box to put text int\n@param fontColor colour",
"Converts a sequence of Java characters to a sequence of unicode code points.\n\n@return the number of code points written to the destination buffer",
"Use this API to update dospolicy.",
"returns an Array with an Objects PK VALUES, with any java-to-sql\nFieldConversion applied. If the Object is a Proxy or a VirtualProxy NO\nconversion is necessary.\n\n@param objectOrProxy\n@return Object[]\n@throws PersistenceBrokerException",
"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.hashCode() if\nthe referent represents a value and not a key",
"Get a View that displays the data at the specified\nposition in the data set. In this case, if we are at\nthe end of the list and we are still in append mode, we\nask for a pending view and return it, plus kick off the\nbackground task to append more data to the wrapped\nadapter.\n\n@param position Position of the item whose data we want\n@param convertView View to recycle, if not null\n@param parent ViewGroup containing the returned View",
"This method is called by the ++ operator for the class CharSequence.\nIt increments the last character in the given CharSequence. If the last\ncharacter in the CharSequence is Character.MAX_VALUE a Character.MIN_VALUE\nwill be appended. The empty CharSequence is incremented to a string\nconsisting of the character Character.MIN_VALUE.\n\n@param self a CharSequence\n@return a value obtained by incrementing the toString() of the CharSequence\n@since 1.8.2",
"Use this API to fetch systemsession resources of given names .",
"Returns the JSON datatype for the property datatype as represented by\nthe given WDTK datatype IRI string.\n\n@param datatypeIri\nthe WDTK datatype IRI string; case-sensitive\n@throws IllegalArgumentException\nif the given datatype string is not known"
] |
public void setAttributeEditable(Attribute attribute, boolean editable) {
attribute.setEditable(editable);
if (!(attribute instanceof LazyAttribute)) { // should not instantiate lazy attributes!
if (attribute instanceof ManyToOneAttribute) {
setAttributeEditable(((ManyToOneAttribute) attribute).getValue(), editable);
} else if (attribute instanceof OneToManyAttribute) {
List<AssociationValue> values = ((OneToManyAttribute) attribute).getValue();
for (AssociationValue value : values) {
setAttributeEditable(value, editable);
}
}
}
} | [
"Set editable state on an attribute. This needs to also set the state on the associated attributes.\n\n@param attribute attribute for which the editable state needs to be set\n@param editable new editable state"
] | [
"Notification that the server process finished.",
"Update database schema\n\n@param migrationPath path to migrations",
"dataType in weight descriptors and input descriptors is used to describe storage",
"Removes from this set all of its elements that are contained in the specified members array\n@param members the members to remove\n@return the number of members actually removed",
"Internal used method which start the real store work.",
"Use this API to update dospolicy resources.",
"Gets information about all of the group memberships for this group.\nDoes not support paging.\n@return a collection of information about the group memberships for this group.",
"This is a convenience method which reads the first project\nfrom the named MPD file using the JDBC-ODBC bridge driver.\n\n@param accessDatabaseFileName access database file name\n@return ProjectFile instance\n@throws MPXJException",
"Writes the content of an input stream to an output stream\n\n@throws IOException"
] |
public static void writeShortString(ByteBuffer buffer, String s) {
if (s == null) {
buffer.putShort((short) -1);
} else if (s.length() > Short.MAX_VALUE) {
throw new IllegalArgumentException("String exceeds the maximum size of " + Short.MAX_VALUE + ".");
} else {
byte[] data = getBytes(s); //topic support non-ascii character
buffer.putShort((short) data.length);
buffer.put(data);
}
} | [
"Write a size prefixed string where the size is stored as a 2 byte\nshort\n\n@param buffer The buffer to write to\n@param s The string to write"
] | [
"Build control archive of the deb\n\n@param packageControlFile the package control file\n@param controlFiles the other control information files (maintainer scripts, etc)\n@param dataSize the size of the installed package\n@param checksums the md5 checksums of the files in the data archive\n@param output\n@return\n@throws java.io.FileNotFoundException\n@throws java.io.IOException\n@throws java.text.ParseException",
"Runs the example program.\n\n@param args\n@throws IOException\nif there was a problem in writing the output file",
"Adds the List of Lists of CRFDatums to the data and labels arrays, treating\neach datum as if it were its own document. Adds context labels in addition\nto the target label for each datum, meaning that for a particular document,\nthe number of labels will be windowSize-1 greater than the number of\ndatums.\n\n@param processedData\na List of Lists of CRFDatums",
"Sets currency symbol.\n\n@param symbol currency symbol",
"Always returns the original proxy object that was serialized.\n\n@return the proxy object\n@throws java.io.ObjectStreamException",
"Write flow id to message.\n\n@param message the message\n@param flowId the flow id",
"Parses a string of space delimited command line parameters and returns a\nlist of parameters which doesn't contain any special quoting either for\nvalues or whole parameter.\n\n@param param string containing a list\n@return the list",
"Convert given value to given target\n\n@param fromValue\nthe value to convert\n@param toType\ntarget target\n@param <T>\ntarget of the result\n@return the value converted to given target\n@throws TypeCastException\nif conversion was not possible",
"Adds all fields declared directly in the object's class to the output\n@return this"
] |
public static base_response unset(nitro_service client, nsconfig resource, String[] args) throws Exception{
nsconfig unsetresource = new nsconfig();
return unsetresource.unset_resource(client,args);
} | [
"Use this API to unset the properties of nsconfig resource.\nProperties that need to be unset are specified in args array."
] | [
"Create a plan. The plan consists of batches. Each batch involves the\nmovement of no more than batchSize primary partitions. The movement of a\nsingle primary partition may require migration of other n-ary replicas,\nand potentially deletions. Migrating a primary or n-ary partition\nrequires migrating one partition-store for every store hosted at that\npartition.",
"Should the URI explicitly not be cached.\n\n@param requestUri request URI\n@return true when caching is prohibited",
"Use this API to update clusternodegroup resources.",
"Parse a currency symbol position from a string representation.\n\n@param value String representation\n@return CurrencySymbolPosition instance",
"Checks all data sets in a given record for constraint violations.\n\n@param record\nIIM record (1,2,3, ...) to check\n\n@return list of constraint violations, empty set if IIM file is valid",
"Load a configuration in from a text file.\n\n@return A config if any of the fields were set otherwise null on EOF.",
"Creates a new Box Developer Edition connection with enterprise token leveraging BoxConfig.\n@param boxConfig box configuration settings object\n@return a new instance of BoxAPIConnection.",
"Assemble and send a packet that performs sync control, turning a device's sync mode on or off, or telling it\nto become the tempo master.\n\n@param target an update from the device whose sync state is to be set\n@param command the byte identifying the specific sync command to be sent\n\n@throws IOException if there is a problem sending the command to the device",
"Use this API to delete sslfipskey resources of given names."
] |
public static onlinkipv6prefix[] get(nitro_service service, String ipv6prefix[]) throws Exception{
if (ipv6prefix !=null && ipv6prefix.length>0) {
onlinkipv6prefix response[] = new onlinkipv6prefix[ipv6prefix.length];
onlinkipv6prefix obj[] = new onlinkipv6prefix[ipv6prefix.length];
for (int i=0;i<ipv6prefix.length;i++) {
obj[i] = new onlinkipv6prefix();
obj[i].set_ipv6prefix(ipv6prefix[i]);
response[i] = (onlinkipv6prefix) obj[i].get_resource(service);
}
return response;
}
return null;
} | [
"Use this API to fetch onlinkipv6prefix resources of given names ."
] | [
"Adds a class to the unit.",
"Sets the stream for a resource.\nThis function allows you to provide a stream that is already open to\nan existing resource. It will throw an exception if that resource\nalready has an open stream.\n@param s InputStream currently open stream to use for I/O.",
"Handles a complete record at a time, stores it in a form ready for\nfurther processing.\n\n@param record record to be processed\n@return flag indicating if this is the last record in the file to be processed\n@throws MPXJException",
"Reads a string from input stream saved as a sequence of UTF chunks.\n\n@param stream stream to read from.\n@return output string\n@throws IOException if something went wrong",
"Throws an IllegalStateException when the given value is null.\n@return the value",
"Merges two lists of references, eliminating duplicates in the process.\n\n@param references1\n@param references2\n@return merged list",
"Not used.",
"Get the script for a given ID\n\n@param id ID of script\n@return Script if found, otherwise null",
"Check if there is an attribute which tells us which concrete class is to be instantiated."
] |
private void beginInternTransaction()
{
if (log.isDebugEnabled()) log.debug("beginInternTransaction was called");
J2EETransactionImpl tx = (J2EETransactionImpl) super.currentTransaction();
if (tx == null) tx = newInternTransaction();
if (!tx.isOpen())
{
// start the transaction
tx.begin();
tx.setInExternTransaction(true);
}
} | [
"Here we start a intern odmg-Transaction to hide transaction demarcation\nThis method could be invoked several times within a transaction, but only\nthe first call begin a intern odmg transaction"
] | [
"Return true if the processor of the node is currently being executed.\n\n@param processorGraphNode the node to test.",
"May have to be changed to let multiple touch",
"Returns a RowColumn following the current one\n\n@return RowColumn following this one",
"Generate a currency format.\n\n@param position currency symbol position\n@return currency format",
"Creates a player wrapper for the Android MediaPlayer.",
"Authenticates the API connection for Box Developer Edition.",
"Updates value of entity in the table.",
"Update the anchor based on arcore best knowledge of the world\n\n@param scale",
"Write a standard CoNLL format output file.\n\n@param doc The document: A List of CoreLabel\n@param out Where to send the answers to"
] |
public AiTextureInfo getTextureInfo(AiTextureType type, int index) {
return new AiTextureInfo(type, index, getTextureFile(type, index),
getTextureUVIndex(type, index), getBlendFactor(type, index),
getTextureOp(type, index), getTextureMapModeW(type, index),
getTextureMapModeW(type, index),
getTextureMapModeW(type, index));
} | [
"Returns all information related to a single texture.\n\n@param type the texture type\n@param index the index in the texture stack\n@return the texture information"
] | [
"Resets the state of the scope.\nUseful for automation testing when we want to reset the scope used to install test modules.",
"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",
"Set the month.\n@param monthStr the month to set.",
"Build control archive of the deb\n\n@param packageControlFile the package control file\n@param controlFiles the other control information files (maintainer scripts, etc)\n@param dataSize the size of the installed package\n@param checksums the md5 checksums of the files in the data archive\n@param output\n@return\n@throws java.io.FileNotFoundException\n@throws java.io.IOException\n@throws java.text.ParseException",
"Checks whether given class descriptor has a primary key.\n\n@param classDef The class descriptor\n@param checkLevel The current check level (this constraint is only checked in strict)\n@exception ConstraintException If the constraint has been violated",
"Replaces the model used to depict the controller in the scene.\n\n@param controllerModel root of hierarchy to use for controller model\n@see #getControllerModel()\n@see #showControllerModel(boolean)",
"Indicates if this file represents a file on the underlying file system.\n\n@param filePath\n@return",
"This method lists any notes attached to resources.\n\n@param file MPX file",
"Read data for a single table and store it.\n\n@param is input stream\n@param table table header"
] |
public static appflowpolicy_appflowpolicylabel_binding[] get(nitro_service service, String name) throws Exception{
appflowpolicy_appflowpolicylabel_binding obj = new appflowpolicy_appflowpolicylabel_binding();
obj.set_name(name);
appflowpolicy_appflowpolicylabel_binding response[] = (appflowpolicy_appflowpolicylabel_binding[]) obj.get_resources(service);
return response;
} | [
"Use this API to fetch appflowpolicy_appflowpolicylabel_binding resources of given name ."
] | [
"This method is called if the data set has been scrolled.",
"Return a list of 'Files' of downloaded or uploaded files. Filters build files without local and remote paths.\n\n@param buildFilesStream - Stream of build Artifacts or Dependencies.\n@return - List of build files.",
"Subtract a complex number.\n\n@param z1 Complex Number.\n@param scalar Scalar value.\n@return Returns new ComplexNumber instance containing the subtract of specified complex number with a scalar value.",
"Sets the hostname and port to connect to.\n\n@param hostname the host name\n@param port the port\n\n@return the builder",
"Convert a URL Encoded name back to the original form.\n@param name the name to URL urlDecode.\n@param encoding the string encoding to be used (i.e. UTF-8)\n@return the name in original form.\n@throws UnsupportedEncodingException if the encoding is not supported.",
"Use this API to fetch all the nsdiameter resources that are configured on netscaler.",
"Create an object of the given type using a constructor that matches the\nsupplied arguments.\n\n@param <T> the object type\n@param clazz\nthe type to create\n@param args\nthe arguments to the constructor\n@return a new object of the given type, initialized with the given\narguments\n@throws NoSuchConstructorException\nif there is not a constructor that matches the given\narguments\n@throws AmbiguousConstructorException\nif there is more than one constructor that matches the given\narguments\n@throws ReflectiveOperationException\nif any of the reflective operations throw an exception",
"Creates a collaboration whitelist for a Box User with a given ID.\n@param api the API connection to be used by the collaboration whitelist.\n@param userID the ID of the Box User to add to the collaboration whitelist.\n@return information about the collaboration whitelist created for user.",
"Randomly generates matrix with the specified number of non-zero elements filled with values from min to max.\n\n@param numRows Number of rows\n@param numCols Number of columns\n@param nz_total Total number of non-zero elements in the matrix\n@param min Minimum element value, inclusive\n@param max Maximum element value, inclusive\n@param rand Random number generator\n@return Randomly generated matrix"
] |
protected Object transformEntity(Entity entity) {
PropertyColumn propertyColumn = (PropertyColumn) entity;
JRDesignField field = new JRDesignField();
ColumnProperty columnProperty = propertyColumn.getColumnProperty();
field.setName(columnProperty.getProperty());
field.setValueClassName(columnProperty.getValueClassName());
log.debug("Transforming column: " + propertyColumn.getName() + ", property: " + columnProperty.getProperty() + " (" + columnProperty.getValueClassName() +") " );
field.setDescription(propertyColumn.getFieldDescription()); //hack for XML data source
for (String key : columnProperty.getFieldProperties().keySet()) {
field.getPropertiesMap().setProperty(key, columnProperty.getFieldProperties().get(key));
}
return field;
} | [
"Receives a PropertyColumn and returns a JRDesignField"
] | [
"Remove a license from an artifact\n\n@param gavc String The artifact GAVC\n@param licenseId String The license id to be removed.",
"Returns an MBeanServer with the specified name\n\n@param name\n@return",
"Obtain newline-delimited headers from request\n\n@param request HttpServletRequest to scan\n@return newline-delimited headers",
"Set the pointer on the bar. With the Value value.\n\n@param value float between 0 and 1",
"Given a key and a list of steal infos give back a list of stealer node\nids which will steal this.\n\n@param key Byte array of key\n@param stealerNodeToMappingTuples Pairs of stealer node id to their\ncorresponding [ partition - replica ] tuples\n@param cluster Cluster metadata\n@param storeDef Store definitions\n@return List of node ids",
"Gets the instance associated with the current thread.",
"Add an additional binary type",
"Obtain newline-delimited headers from response\n\n@param response HttpServletResponse to scan\n@return newline-delimited headers",
"Sanity check precondition for above setters"
] |
public HashMap<String, Object> getFirstResult(String query)
throws Exception {
HashMap<String, Object> result = null;
Statement queryStatement = null;
ResultSet results = null;
try (Connection sqlConnection = getConnection()) {
queryStatement = sqlConnection.createStatement();
results = queryStatement.executeQuery(query);
if (results.next()) {
result = new HashMap<>();
String[] columns = getColumnNames(results.getMetaData());
for (String column : columns) {
result.put(column, results.getObject(column));
}
}
} catch (Exception e) {
} finally {
try {
if (results != null) {
results.close();
}
} catch (Exception e) {
}
try {
if (queryStatement != null) {
queryStatement.close();
}
} catch (Exception e) {
}
}
return result;
} | [
"Gets the first row for a query\n\n@param query query to execute\n@return result or NULL"
] | [
"Use this API to flush nssimpleacl.",
"Obtain instance of the SQL Service\n\n@return instance of SQLService\n@throws Exception exception",
"Resolve the given class if it is a primitive class,\nreturning the corresponding primitive wrapper type instead.\n@param clazz the class to check\n@return the original class, or a primitive wrapper for the original primitive type",
"Use this API to fetch all the nsrollbackcmd resources that are configured on netscaler.",
"Use this API to add route6.",
"Accessor method used to retrieve an Duration object representing the\ncontents of an individual field. If the field does not exist in the\nrecord, null is returned.\n\n@param field the index number of the field to be retrieved\n@return the value of the required field\n@throws MPXJException normally thrown when parsing fails",
"Configures a worker pool for the converter.\n\n@param corePoolSize The core pool size of the worker pool.\n@param maximumPoolSize The maximum pool size of the worker pool.\n@param keepAliveTime The keep alive time of the worker pool.\n@param unit The time unit of the specified keep alive time.\n@return This builder instance.",
"to check availability, then class name is truncated to bundle id",
"Get a configured database connection via JNDI."
] |
public static String getPunctClass(String punc) {
if(punc.equals("%") || punc.equals("-PLUS-"))//-PLUS- is an escape for "+" in the ATB
return "perc";
else if(punc.startsWith("*"))
return "bullet";
else if(sfClass.contains(punc))
return "sf";
else if(colonClass.contains(punc) || pEllipsis.matcher(punc).matches())
return "colon";
else if(commaClass.contains(punc))
return "comma";
else if(currencyClass.contains(punc))
return "curr";
else if(slashClass.contains(punc))
return "slash";
else if(lBracketClass.contains(punc))
return "lrb";
else if(rBracketClass.contains(punc))
return "rrb";
else if(quoteClass.contains(punc))
return "quote";
return "";
} | [
"Return the equivalence class of the argument. If the argument is not contained in\nand equivalence class, then an empty string is returned.\n\n@param punc\n@return The class name if found. Otherwise, an empty string."
] | [
"Remove paths with no active overrides\n\n@throws Exception",
"Delete rows that match the prepared statement.",
"Combines weighted crf with this crf\n\n@param crf\n@param weight",
"Compress a directory into a zip file\n\n@param dir Directory\n@param zipFile ZIP file to create\n@throws IOException I/O Error",
"Lift a Java Func2 to a Scala Function2\n\n@param f the function to lift\n\n@returns the Scala function",
"Checks if the name of the file follows the version-n format\n\n@param versionDir The directory\n@return Returns true if the name is correct, else false",
"Configures a worker pool for the converter.\n\n@param corePoolSize The core pool size of the worker pool.\n@param maximumPoolSize The maximum pool size of the worker pool.\n@param keepAliveTime The keep alive time of the worker pool.\n@param unit The time unit of the specified keep alive time.\n@return This builder instance.",
"returns a collection of Reader LockEntries for object obj.\nIf no LockEntries could be found an empty Vector is returned.",
"Use this API to fetch gslbservice resource of given name ."
] |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.