query
stringlengths 74
6.1k
| positive
sequencelengths 1
1
| negative
sequencelengths 9
9
|
---|---|---|
protected DateTimeException _peelDTE(DateTimeException e) {
while (true) {
Throwable t = e.getCause();
if (t != null && t instanceof DateTimeException) {
e = (DateTimeException) t;
continue;
}
break;
}
return e;
} | [
"Helper method used to peel off spurious wrappings of DateTimeException\n\n@param e DateTimeException to peel\n\n@return DateTimeException that does not have another DateTimeException as its cause."
] | [
"Gets a SerialMessage with the WAKE_UP_NO_MORE_INFORMATION command.\n@return the serial message",
"alert, prompt, and confirm behave as if the OK button is always clicked.",
"Set the week day.\n@param weekDayStr the week day to set.",
"Construct new path by replacing file directory part. No\nfiles are actually modified.\n@param file path to move\n@param target new path directory",
"Parse an extended attribute value.\n\n@param file parent file\n@param mpx parent entity\n@param value string value\n@param mpxFieldID field ID\n@param durationFormat duration format associated with the extended attribute",
"Pause component timer for current instance\n@param type - of component",
"Converts the string representation of a Planner duration into\nan MPXJ Duration instance.\n\nPlanner represents durations as a number of seconds in its\nfile format, however it displays durations as days and hours,\nand seems to assume that a working day is 8 hours.\n\n@param value string representation of a duration\n@return Duration instance",
"Init the licenses cache\n\n@param licenses",
"Returns true if the default profile for the specified uuid is active\n\n@return true if active, otherwise false"
] |
private int[] readColorTable(int ncolors) {
int nbytes = 3 * ncolors;
int[] tab = null;
byte[] c = new byte[nbytes];
try {
rawData.get(c);
// Max size to avoid bounds checks.
tab = new int[MAX_BLOCK_SIZE];
int i = 0;
int j = 0;
while (i < ncolors) {
int r = ((int) c[j++]) & 0xff;
int g = ((int) c[j++]) & 0xff;
int b = ((int) c[j++]) & 0xff;
tab[i++] = 0xff000000 | (r << 16) | (g << 8) | b;
}
} catch (BufferUnderflowException e) {
//if (Log.isLoggable(TAG, Log.DEBUG)) {
Logger.d(TAG, "Format Error Reading Color Table", e);
//}
header.status = GifDecoder.STATUS_FORMAT_ERROR;
}
return tab;
} | [
"Reads color table as 256 RGB integer values.\n\n@param ncolors int number of colors to read.\n@return int array containing 256 colors (packed ARGB with full alpha)."
] | [
"Returns the editable columns for the provided edit mode.\n@param mode the edit mode.\n@return the editable columns for the provided edit mode.",
"Creates a new section in a project.\n\nReturns the full record of the newly created section.\n\n@param project The project to create the section in\n@return Request object",
"Checks that excess arguments match the vararg signature parameter.\n@param params\n@param args\n@return -1 if no match, 0 if all arguments matches the vararg type and >0 if one or more vararg argument is\nassignable to the vararg type, but still not an exact match",
"Sign in a connection to the registry by key.\n\nNote multiple connections can be attached to the same key\n\n@param key\nthe key\n@param connection\nthe websocket connection\n@see #register(String, WebSocketConnection)",
"Animate de-selection of visible views and clear\nselected set.",
"Enter information into the hidden input field.\n\n@param input The input to enter into the hidden field.",
"Use this API to fetch statistics of nslimitidentifier_stats resource of given name .",
"Stores the gathered usage statistics about property uses to a CSV file.\n\n@param usageStatistics\nthe statistics to store\n@param fileName\nthe name of the file to use",
"use the design parameters to compute the constraint equation to get the value"
] |
public void forAllIndexDescriptorDefinitions(String template, Properties attributes) throws XDocletException
{
for (Iterator it = _curClassDef.getIndexDescriptors(); it.hasNext(); )
{
_curIndexDescriptorDef = (IndexDescriptorDef)it.next();
generate(template);
}
_curIndexDescriptorDef = null;
} | [
"Processes the template for all index descriptors of the current class definition.\n\n@param template The template\n@param attributes The attributes of the tag\n@exception XDocletException if an error occurs\[email protected] type=\"block\""
] | [
"Delivers the correct JSON Object for the target\n\n@param target\n@throws org.json.JSONException",
"Adds a constructor for the proxy for each constructor declared by the base\nbean type.\n\n@param proxyClassType the Javassist class for the proxy\n@param initialValueBytecode",
"Confirm that all nodes shared between clusters host exact same partition\nIDs and that nodes only in the super set cluster have no partition IDs.\n\n@param subsetCluster\n@param supersetCluster",
"Given a String the method uses Regex to check if the String only contains punctuation characters\n\n@param s a String to check using regex\n@return true if the String is valid",
"Internal function that uses recursion to create the list",
"Get unique values form the array.\n\n@param values Array of values.\n@return Unique values.",
"Returns an array with the width of the longest word per column calculated from the given table.\nDefault padding will be added per column.\nPadding for individual columns will be added if defined.\n@param rows the table rows for calculations\n@param colNumbers number of columns in the table\n@return array with width of longest word for each column, null if input table was null",
"Tests if this partition has hit a threshold and signal to the pool watch thread to create new connections\n@param connectionPartition to test for.",
"Sort and order steps to avoid unwanted generation"
] |
public void addRegexRoute(String urlPattern, Class<? extends Actor> actorClass) throws RouteAlreadyMappedException {
addRoute(new Route(urlPattern, true), actorClass);
} | [
"Add a URL pattern to the routing table.\n\n@param urlPattern A regular expression\n@throws RouteAlreadyMappedException"
] | [
"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",
"Use this API to clear route6.",
"Generates a mapping between attribute names and data types.\n\n@param name name of the map\n@param types types to write",
"Create and bind a server socket\n\n@return the server socket\n@throws IOException",
"Return the index associated to the Renderer.\n\n@param renderer used to search in the prototypes collection.\n@return the prototype index associated to the renderer passed as argument.",
"Retrieves the notes text for this resource.\n\n@return notes text",
"Set the HomeAsUpIndicator that is visible when user navigate to a fragment child\n@param indicator the resource drawable to use as indicator",
"Sets the publish queue shutdown time.\n\n@param publishQueueShutdowntime the shutdown time to set, parsed as <code>int</code>",
"Get the set of metadata providers that can offer metadata for tracks loaded from the specified media.\n\n@param sourceMedia the media whose metadata providers are desired, or {@code null} to get the set of\nmetadata providers that can offer metadata for all media.\n\n@return any registered metadata providers that reported themselves as supporting tracks from that media"
] |
private void addHours(ProjectCalendarDateRanges ranges, Record hoursRecord)
{
if (hoursRecord.getValue() != null)
{
String[] wh = hoursRecord.getValue().split("\\|");
try
{
String startText;
String endText;
if (wh[0].equals("s"))
{
startText = wh[1];
endText = wh[3];
}
else
{
startText = wh[3];
endText = wh[1];
}
// for end time treat midnight as midnight next day
if (endText.equals("00:00"))
{
endText = "24:00";
}
Date start = m_calendarTimeFormat.parse(startText);
Date end = m_calendarTimeFormat.parse(endText);
ranges.addRange(new DateRange(start, end));
}
catch (ParseException e)
{
// silently ignore date parse exceptions
}
}
} | [
"Parses a record containing hours and add them to a container.\n\n@param ranges hours container\n@param hoursRecord hours record"
] | [
"Initializes the mode switcher.\n@param current the current edit mode",
"Orders first by word, then by tag.\n\n@param wordTag object to compare to\n@return result (positive if <code>this</code> is greater than\n<code>obj</code>, 0 if equal, negative otherwise)",
"Creates an encryptor for queryable text strings that uses standard password-based encryption. Uses a shared, or\nconstant 16 byte initialization vector so encrypting the same data results in the same encryption result. This is\ndone to allow encrypted data to be queried against. Encrypted text is hex-encoded.\n\n@param password the password used to generate the encryptor's secret key; should not be shared\n@param salt a hex-encoded, random, site-global salt value to use to generate the secret key",
"Removes the given value to the set.\n\n@return true if the value was actually removed",
"Visit all child nodes but not this one.\n\n@param visitor The visitor to use.",
"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.",
"Remove a connection from all keys.\n\n@param connection\nthe connection",
"Use this API to add cachecontentgroup.",
"Gets the data by id.\n\n@param id the id\n@return the data by id\n@throws IOException Signals that an I/O exception has occurred."
] |
public static int findLastIndexOf(Object self, int startIndex, Closure closure) {
int result = -1;
int i = 0;
BooleanClosureWrapper bcw = new BooleanClosureWrapper(closure);
for (Iterator iter = InvokerHelper.asIterator(self); iter.hasNext(); i++) {
Object value = iter.next();
if (i < startIndex) {
continue;
}
if (bcw.call(value)) {
result = i;
}
}
return result;
} | [
"Iterates over the elements of an iterable collection of items, starting\nfrom a specified startIndex, and returns the index of the last item that\nmatches the condition specified in the closure.\n\n@param self the iteration object over which to iterate\n@param startIndex start matching from this index\n@param closure the filter to perform a match on the collection\n@return an integer that is the index of the last matched object or -1 if no match was found\n@since 1.5.2"
] | [
"Checks if the dependency server is available\n\n@return true if the server is reachable, false otherwise",
"Add new control at the control bar with specified touch listener, resource and position.\nSize of control bar is updated based on new number of controls.\n@param name name of the control to remove\n@param resId the control face\n@param listener touch listener\n@param position control position in the bar",
"Converts B and X into block matrices and calls the block matrix solve routine.\n\n@param B A matrix ℜ <sup>m × p</sup>. Not modified.\n@param X A matrix ℜ <sup>n × p</sup>, where the solution is written to. Modified.",
"Finish the initialization.\n\n@param container\n@param isShutdownHookEnabled",
"Shifts are performed based upon singular values computed previously. If it does not converge\nusing one of those singular values it uses a Wilkinson shift instead.",
"Performs a standard bidiagonal decomposition just on the outer blocks of the provided matrix\n\n@param blockLength\n@param A\n@param gammasU",
"Returns the zero rates for a given vector maturities.\n\n@param maturities The given maturities.\n@return The zero rates.",
"generate a message for loglevel WARN\n\n@param pObject the message Object",
"I pulled this out of internal store so that when doing multiple table\ninheritance, i can recurse this function.\n\n@param obj\n@param cld\n@param oid BRJ: what is it good for ???\n@param insert\n@param ignoreReferences"
] |
public synchronized void insert(long data) {
resetIfNeeded();
long index = 0;
if(data >= this.upperBound) {
index = nBuckets - 1;
} else if(data < 0) {
logger.error(data + " can't be bucketed because it is negative!");
return;
} else {
index = data / step;
}
if(index < 0 || index >= nBuckets) {
// This should be dead code. Defending against code changes in
// future.
logger.error(data + " can't be bucketed because index is not in range [0,nBuckets).");
return;
}
buckets[(int) index]++;
sum += data;
size++;
} | [
"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"
] | [
"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}",
"Commits the working copy.\n\n@param commitMessage@return The commit info upon successful operation.\n@throws IOException On IO of SVN failure",
"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",
"Create the navigation frame.\n@param outputDirectory The target directory for the generated file(s).",
"Merge the given maps.\n\n<p>\nThe replied map is a view on the given two maps.\nIf a key exists in the two maps, the replied value is the value of the right operand.\n</p>\n\n<p>\nEven if the key of the right operand exists in the left operand, the value in the right operand is preferred.\n</p>\n\n<p>\nThe replied map is unmodifiable.\n</p>\n\n@param <K> type of the map keys.\n@param <V> type of the map values.\n@param left the left map.\n@param right the right map.\n@return a map with the merged contents from the two maps.\n@since 2.15",
"This method dumps the entire contents of a file to an output\nprint writer as ascii data.\n\n@param is Input Stream\n@param pw Output PrintWriter\n@return number of bytes read\n@throws Exception Thrown on file read errors",
"Record the checkout queue length\n\n@param dest Destination of the socket to checkout. Will actually record\nif null. Otherwise will call this on self and corresponding child\nwith this param null.\n@param queueLength The number of entries in the \"synchronous\" checkout\nqueue.",
"Unregister all servlets registered by this exporter.",
"Returns the total count of the specified event\n@param event The event for which you want to get the total count\n@return Total count in int"
] |
public MwDumpFile findMostRecentDump(DumpContentType dumpContentType) {
List<MwDumpFile> dumps = findAllDumps(dumpContentType);
for (MwDumpFile dump : dumps) {
if (dump.isAvailable()) {
return dump;
}
}
return null;
} | [
"Finds the most recent dump of the given type that is actually available.\n\n@param dumpContentType\nthe type of the dump to look for\n@return most recent main dump or null if no such dump exists"
] | [
"Use this API to delete nsacl6 of given name.",
"Get information about this database.\n\n@return DbInfo encapsulating the database info\n@see <a\nhref=\"https://console.bluemix.net/docs/services/Cloudant/api/database.html#getting-database-details\"\ntarget=\"_blank\">Databases - read</a>",
"Removes the duplicate node list.\n\n@param list\nthe list\n@return the int",
"returns an Array with an Objects PK VALUES\n@throws PersistenceBrokerException if there is an erros accessing o field values",
"This method allows us to peek into the OLE compound document to extract the file format.\nThis allows the UniversalProjectReader to determine if this is an MPP file, or if\nit is another type of OLE compound document.\n\n@param fs POIFSFileSystem instance\n@return file format name\n@throws IOException",
"Use this API to delete ntpserver of given name.",
"Updates the indices in the index buffer from a Java char array.\nAll of the entries of the input char array are copied into\nthe storage for the index buffer. The new indices must be the\nsame size as the old indices - the index buffer size cannot be changed.\n@param data char array containing the new values\n@throws IllegalArgumentException if char array is wrong size",
"Checks to see if all the diagonal elements in the matrix are positive.\n\n@param a A matrix. Not modified.\n@return true if all the diagonal elements are positive, false otherwise.",
"Look for the closing parenthesis corresponding to the one at position\nrepresented by the opening index.\n\n@param text input expression\n@param opening opening parenthesis index\n@return closing parenthesis index"
] |
private int getIndicatorStartPos() {
switch (getPosition()) {
case TOP:
return mIndicatorClipRect.left;
case RIGHT:
return mIndicatorClipRect.top;
case BOTTOM:
return mIndicatorClipRect.left;
default:
return mIndicatorClipRect.top;
}
} | [
"Returns the start position of the indicator.\n\n@return The start position of the indicator."
] | [
"Output the SQL type for a Java String.",
"This function looks for files with the \"wrong\" replica type in their name, and\nif it finds any, renames them.\n\nThose files may have ended up on this server either because:\n- 1. We restored them from another server, where they were named according to\nanother replica type. Or,\n- 2. The {@link voldemort.store.readonly.mr.azkaban.VoldemortBuildAndPushJob}\nand the {@link voldemort.store.readonly.fetcher.HdfsFetcher} are\noperating in 'build.primary.replicas.only' mode, so they only ever built\nand fetched replica 0 of any given file.\n\nNote: This is an implementation detail of the READONLY_V2 naming scheme, and should\nnot be used outside of that scope.\n\n@param masterPartitionId partition ID of the \"primary replica\"\n@param correctReplicaType replica number which should be found on the current\nnode for the provided masterPartitionId.",
"Get the type created by selecting only a subset of properties from this\ntype. The type must be a map for this to work\n\n@param properties The properties to select\n@return The new type definition",
"Copies all available data from in to out without closing any stream.\n\n@return number of bytes copied",
"Post the specified photo to a blog.\n\n@param photo\nThe photo metadata\n@param blogId\nThe blog ID\n@throws FlickrException",
"Retrieve a value from the map, ensuring that a key exists in the map\nwith the specified name.\n\n@param name column name\n@return column value",
"Filter on a search term. Can be course name, code or full ID. Must be at least 3 characters\n@param searchTerm Search term to filter by\n@return This object to allow adding more options",
"Returns the texture magnification filter\n\nIf missing, defaults to {@link GL_LINEAR }\n\n@param type the texture type\n@param index the index in the texture stack\n@return the texture magnification filter",
"Send an announcement packet so the other devices see us as being part of the DJ Link network and send us\nupdates."
] |
@Pure
public static <P1, P2, P3, P4, RESULT> Function3<P2, P3, P4, RESULT> curry(
final Function4<? super P1, ? super P2, ? super P3, ? super P4, ? extends RESULT> function, final P1 argument) {
if (function == null)
throw new NullPointerException("function");
return new Function3<P2, P3, P4, RESULT>() {
@Override
public RESULT apply(P2 p2, P3 p3, P4 p4) {
return function.apply(argument, p2, p3, p4);
}
};
} | [
"Curries a function that takes four arguments.\n\n@param function\nthe original function. May not be <code>null</code>.\n@param argument\nthe fixed first argument of {@code function}.\n@return a function that takes three arguments. Never <code>null</code>."
] | [
"Counts the packages prefixes appearing in this project and if some of them make more than half of the total of existing packages, this prefix\nis returned. Otherwise, returns null.\n\nThis is just a helper, it isn't something really hard-setting the package. It's something to use if the user didn't specify using\n--mavenize.groupId, and the archive or project name is something insane, like few sencences paragraph (a description) or a number or such.",
"Creates a converter function that converts value using a constructor that accepts a single String argument.\n\n@return A converter function or {@code null} if the given type doesn't have a public constructor that accepts\na single String argument.",
"Set the ambient light intensity.\n\nThis designates the color of the ambient reflection.\nIt is multiplied by the material ambient color to derive\nthe hue of the ambient reflection for that material.\nThe built-in phong shader {@link GVRPhongShader} uses a {@code vec4} uniform named\n{@code ambient_intensity} to control the intensity of ambient light reflected.\n\n@param r red component (0 to 1)\n@param g green component (0 to 1)\n@param b blue component (0 to 1)\n@param a alpha component (0 to 1)",
"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.",
"Parses formatter attributes.\n\n@param formatterLoc the node location\n@return the map of formatter attributes (unmodifiable)",
"Override the thread context ClassLoader with the environment's bean ClassLoader\nif necessary, i.e. if the bean ClassLoader is not equivalent to the thread\ncontext ClassLoader already.\n@param classLoaderToUse the actual ClassLoader to use for the thread context\n@return the original thread context ClassLoader, or {@code null} if not overridden",
"Use this API to add snmpmanager.",
"Populates a recurring task.\n\n@param record MPX record\n@param task recurring task\n@throws MPXJException",
"Create the ResourceIgnoredTransformationRegistry when fetching missing content, only including relevant pieces\nto a server-config.\n\n@param rc the resolution context\n@param delegate the delegate ignored resource transformation registry for manually ignored resources\n@return"
] |
public static base_responses update(nitro_service client, inat resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
inat updateresources[] = new inat[resources.length];
for (int i=0;i<resources.length;i++){
updateresources[i] = new inat();
updateresources[i].name = resources[i].name;
updateresources[i].privateip = resources[i].privateip;
updateresources[i].tcpproxy = resources[i].tcpproxy;
updateresources[i].ftp = resources[i].ftp;
updateresources[i].tftp = resources[i].tftp;
updateresources[i].usip = resources[i].usip;
updateresources[i].usnip = resources[i].usnip;
updateresources[i].proxyip = resources[i].proxyip;
updateresources[i].mode = resources[i].mode;
}
result = update_bulk_request(client, updateresources);
}
return result;
} | [
"Use this API to update inat resources."
] | [
"Read an int from an input stream.\n\n@param is input stream\n@return int value",
"Randomly generates matrix with the specified number of matrix elements filled with values from min to max.\n\n@param numRows Number of rows\n@param numCols Number of columns\n@param nz_total Total number of non-zero elements in the matrix\n@param min Minimum value\n@param max maximum value\n@param rand Random number generated\n@return Randomly generated matrix",
"Synthesize and forward a KeyEvent to the library.\n\nThis call is made from the native layer.\n\n@param code id of the button\n@param action integer representing the action taken on the button",
"Gets Widget bounds width\n@return width",
"Internal initialization.\n@throws ParserConfigurationException",
"Encodes the given URI host with the given encoding.\n@param host the host to be encoded\n@param encoding the character encoding to encode to\n@return the encoded host\n@throws UnsupportedEncodingException when the given encoding parameter is not supported",
"delete of files more than 1 day old",
"Parses values out of the header text.\n\n@param header header text",
"Use this API to fetch the statistics of all spilloverpolicy_stats resources that are configured on netscaler."
] |
public void insertAfter(Token before, TokenList list ) {
Token after = before.next;
before.next = list.first;
list.first.previous = before;
if( after == null ) {
last = list.last;
} else {
after.previous = list.last;
list.last.next = after;
}
size += list.size;
} | [
"Inserts the LokenList immediately following the 'before' token"
] | [
"Read the table from the file and populate the supplied Table instance.\n\n@param file database file\n@param table Table instance",
"Get a list of collaborators that are allowed access to an app.\n@param appName App name. See {@link #listApps} for a list of apps that can be used.\n@return list of collaborators",
"Initialize the various DAO configurations after the various setters have been called.",
"Sets the body filter for this ID\n\n@param pathId ID of path\n@param bodyFilter Body filter to set",
"Add several jvm metrics.",
"Returns a list of all parts that have been uploaded to an upload session.\n@param offset paging marker for the list of parts.\n@param limit maximum number of parts to return.\n@return the list of parts.",
"Use this API to update dospolicy resources.",
"Loads a classifier from the file specified. If the file's name ends in .gz,\nuses a GZIPInputStream, else uses a regular FileInputStream. This method\ncloses the File when done.\n\n@param file\nLoads a classifier from this file.\n@param props\nProperties in this object will be used to overwrite those\nspecified in the serialized classifier\n\n@throws IOException\nIf there are problems accessing the input stream\n@throws ClassCastException\nIf there are problems interpreting the serialized data\n@throws ClassNotFoundException\nIf there are problems interpreting the serialized data",
"Returns a geoquery."
] |
private double[] formatTargetValuesForOptimizer() {
//Put all values in an array for the optimizer.
int numberOfMaturities = surface.getMaturities().length;
double mats[] = surface.getMaturities();
ArrayList<Double> vals = new ArrayList<Double>();
for(int t = 0; t<numberOfMaturities; t++) {
double mat = mats[t];
double[] myStrikes = surface.getSurface().get(mat).getStrikes();
OptionSmileData smileOfInterest = surface.getSurface().get(mat);
for(int k = 0; k < myStrikes.length; k++) {
vals.add(smileOfInterest.getSmile().get(myStrikes[k]).getValue());
}
}
Double[] targetVals = new Double[vals.size()];
return ArrayUtils.toPrimitive(vals.toArray(targetVals));
} | [
"This is a service method that takes care of putting al the target values in a single array.\n@return"
] | [
"Declaration of the variable within a block",
"Use this API to update onlinkipv6prefix.",
"Get a property as a double or null.\n\n@param key the property name",
"Sets a single element of this vector. Elements 0, 1, and 2 correspond to\nx, y, and z.\n\n@param i\nelement index\n@param value\nelement value\n@return element value throws ArrayIndexOutOfBoundsException if i is not\nin the range 0 to 2.",
"Use this API to fetch all the dbdbprofile resources that are configured on netscaler.",
"Throws an IllegalArgumentException when the given value is not false.\n@param value the value to assert if false\n@param message the message to display if the value is false\n@return the value",
"Returns the corporate dependencies of a module\n\n@param module Module\n@param corporateFilters List<String>\n@return List<Dependency>",
"List all the environment variables for an app.\n@param appName App name. See {@link #listApps} for a list of apps that can be used.\n@return map of config vars",
"Returns the set of synchronized documents in a namespace.\n\n@param namespace the namespace to get synchronized documents for.\n@return the set of synchronized documents in a namespace."
] |
public List<CRFCliqueTree> getCliqueTrees(String filename, DocumentReaderAndWriter<IN> readerAndWriter) {
// only for the OCR data does this matter
flags.ocrTrain = false;
List<CRFCliqueTree> cts = new ArrayList<CRFCliqueTree>();
ObjectBank<List<IN>> docs = makeObjectBankFromFile(filename, readerAndWriter);
for (List<IN> doc : docs) {
cts.add(getCliqueTree(doc));
}
return cts;
} | [
"Want to make arbitrary probability queries? Then this is the method for\nyou. Given the filename, it reads it in and breaks it into documents, and\nthen makes a CRFCliqueTree for each document. you can then ask the clique\ntree for marginals and conditional probabilities of almost anything you\nwant."
] | [
"Checks to see if a subsystem resource has already been registered for the deployment.\n\n@param subsystemName the name of the subsystem\n\n@return {@code true} if the subsystem exists on the deployment otherwise {@code false}",
"Given a GanttProject priority value, turn this into an MPXJ Priority instance.\n\n@param gpPriority GanttProject priority\n@return Priority instance",
"Convert maturity given as offset in months to year fraction.\n\n@param maturityInMonths The maturity as offset in months.\n@return The maturity as year fraction.",
"Get the real Object for already materialized Handler\n\n@param objectOrProxy\n@return Object or null if the Handel is not materialized",
"Creates a Bytes object by copying the value of the given String",
"Record a new event.",
"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",
"If UPDATE, INSERT or DELETE, return BatchPreparedStatement,\notherwise return null.",
"Invoked periodically."
] |
public static void directoryCheck(String dir) throws IOException {
final File file = new File(dir);
if (!file.exists()) {
FileUtils.forceMkdir(file);
}
} | [
"Checks the existence of the directory. If it does not exist, the method creates it.\n\n@param dir the directory to check.\n@throws IOException if fails."
] | [
"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",
"Append this message to the message set\n@param messages message to append\n@return the written size and first offset\n@throws IOException file write exception",
"Return the first header value for the given header name, if any.\n@param headerName the header name\n@return the first header value, or {@code null} if none",
"Use this API to enable clusterinstance resources of given names.",
"Get the spatial object from the cache.\n\n@param key key to get object for\n@param type type of object which should be returned\n@return object for key or null if object does not exist or is a different type",
"Walk through the object graph of the specified delete object. Was used for\nrecursive object graph walk.",
"Tells you if the given ASTNode is a VariableExpression with the given name.\n@param expression\nany AST Node\n@param pattern\na string pattern to match\n@return\ntrue if the node is a variable with the specified name",
"Uncompresses the textual contents in the given map and and writes them to the files\ndenoted by the keys of the map.\n\n@param dir The base directory into which the files will be written\n@param contents The map containing the contents indexed by the filename\n@throws IOException If an error occurred",
"parse the outgoings form an json object and add all shape references to\nthe current shapes, add new shapes to the shape array\n@param shapes\n@param modelJSON\n@param current\n@throws org.json.JSONException"
] |
public EventBus emit(String event, Object... args) {
return _emitWithOnceBus(eventContext(event, args));
} | [
"Emit a string event with parameters.\n\nThis will invoke all {@link SimpleEventListener} bound to the specified\nstring value given the listeners has the matching argument list.\n\nFor example, suppose we have the following simple event listener methods:\n\n```java\n{@literal @}On(\"USER-LOGIN\")\npublic void logUserLogin(User user, long timestamp) {...}\n\n{@literal @}On(\"USER-LOGIN\")\npublic void checkDuplicateLoginAttempts(User user, Object... args) {...}\n\n{@literal @}On(\"USER-LOGIN\")\npublic void foo(User user) {...}\n```\n\nThe following code will invoke `logUserLogin` and `checkDuplicateLoginAttempts` methods:\n\n```java\nUser user = ...;\neventBus.emit(\"USER-LOGIN\", user, System.currentTimeMills());\n```\n\nThe `foo(User)` will not invoked because:\n\n* The parameter list `(User, long)` does not match the declared argument list `(User)`.\nHere the `String` in the parameter list is taken out because it is used to indicate\nthe event, instead of being passing through to the event handler method.\n* The method `checkDuplicateLoginAttempts(User, Object ...)` will be invoked because\nit declares a varargs typed arguments, meaning it matches any parameters passed in.\n\n@param event\nthe target event\n@param args\nthe arguments passed in\n@see SimpleEventListener"
] | [
"Init the licenses cache\n\n@param licenses",
"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",
"Add an object into cache by key. The key will be used in conjunction with session id if\nthere is a session instance\n\n@param key\nthe key to index the object within the cache\n@param obj\nthe object to be cached",
"Add all elements in the iterator to the collection.\n\n@param target\n@param iterator\n@return true if the target was modified, false otherwise",
"Retrieves a CodePage instance. Defaults to ANSI.\n\n@param field the index number of the field to be retrieved\n@return the value of the required field",
"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",
"Generate and return the list of statements to drop a database table.",
"Sets the baseline start text value.\n\n@param baselineNumber baseline number\n@param value baseline start text value",
"Add a \"post-run\" dependent for this model.\n\n@param dependent the \"post-run\" dependent.\n@return key to be used as parameter to taskResult(string) method to retrieve result of root\ntask in the given dependent task group"
] |
public final void notifyHeaderItemChanged(int position) {
if (position < 0 || position >= headerItemCount) {
throw new IndexOutOfBoundsException("The given position " + position + " is not within the position bounds for header items [0 - " + (headerItemCount - 1) + "].");
}
notifyItemChanged(position);
} | [
"Notifies that a header item is changed.\n\n@param position the position."
] | [
"Set the pattern scheme.\n@param isWeekDayBased flag, indicating if the week day based scheme should be set.",
"Write a Byte Order Mark at the beginning of the file\n\n@param stream the FileOutputStream to write the BOM to\n@param bigEndian true if UTF 16 Big Endian or false if Low Endian\n@throws IOException if an IOException occurs.\n@since 1.0",
"Allocates a new next buffer and pending fetch.",
"Installs a provider either in the scope or the pool of unbound providers.\n\n@param clazz the class for which to install the provider.\n@param bindingName the name, possibly {@code null}, for which to install the scoped provider.\n@param internalProvider the internal provider to install.\n@param isBound whether or not the provider is bound to the scope or belongs to the pool of unbound providers.\n@param isTestProvider whether or not is a test provider, installed through a Test Module that should override\nexisting providers for the same class-bindingname.\n@param <T> the type of {@code clazz}.\n\nNote to maintainers : we don't use this method directly, both {@link #installBoundProvider(Class, String, InternalProviderImpl, boolean)}\nand {@link #installUnBoundProvider(Class, String, InternalProviderImpl)}\nare a facade of this method and make the calls more clear.",
"The conditional expectation is calculated using a Monte-Carlo regression technique.\n\n@param exerciseTime The exercise time\n@param model The valuation model\n@return The condition expectation estimator\n@throws CalculationException Thrown if underlying model failed to calculate stochastic process.",
"Parse the string representation of a double.\n\n@param value string representation\n@return Java representation\n@throws ParseException",
"Stop listening for device announcements. Also discard any announcements which had been received, and\nnotify any registered listeners that those devices have been lost.",
"Obtain the destination hostname for a source host\n\n@param hostName\n@return",
"Serialize the Document object.\n\n@param dom the document to serialize\n@return the serialized dom String"
] |
@SafeVarargs
public static <K, V> Map<K, V> map(final Entry<? extends K, ? extends V>... entries) {
final Map<K, V> map = new LinkedHashMap<K, V>(entries.length);
for (final Entry<? extends K, ? extends V> entry : entries) {
map.put(entry.getKey(), entry.getValue());
}
return map;
} | [
"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"
] | [
"Writes the value key to the serialized characteristic\n\n@param builder The JSON builder to add the value to\n@param value The value to add",
"Return the project name or the default project name.",
"Traces the duration between origin time in the http Request and time just\nbefore being processed by the fat client\n\n@param operationType\n@param originTimeInMS - origin time in the Http Request\n@param requestReceivedTimeInMs - System Time in ms\n@param keyString",
"Formats a resource type.\n\n@param resource MPXJ resource\n@return Primavera resource type",
"Creates, writes and loads a new keystore and CA root certificate.",
"Write a priority field to the JSON file.\n\n@param fieldName field name\n@param value field value",
"Use this API to fetch appfwprofile_xmlvalidationurl_binding resources of given name .",
"Updates the indices in the index buffer from a Java IntBuffer.\nAll of the entries of the input int buffer are copied into\nthe storage for the index buffer. The new indices must be the\nsame size as the old indices - the index buffer size cannot be changed.\n@param data char array containing the new values\n@throws IllegalArgumentException if int buffer is wrong size",
"Returns the docker version.\n\n@param serverUrl\nThe serverUrl to use."
] |
public static void addHeaders(BoundRequestBuilder builder,
Map<String, String> headerMap) {
for (Entry<String, String> entry : headerMap.entrySet()) {
String name = entry.getKey();
String value = entry.getValue();
builder.addHeader(name, value);
}
} | [
"Adds the headers.\n\n@param builder\nthe builder\n@param headerMap\nthe header map"
] | [
"Assembles an avro format string of single store config from store\nproperties\n\n@param props Store properties\n@return String in avro format that contains single store configs",
"Should only called on a column that is being set to null.\n\nReturns the most outer embeddable containing {@code column} that is entirely null.\nReturn null otherwise i.e. not embeddable.\n\nThe implementation lazily compute the embeddable state and caches it.\nThe idea behind the lazy computation is that only some columns will be set to null\nand only in some situations.\nThe idea behind caching is that an embeddable contains several columns, no need to recompute its state.",
"Use this API to fetch onlinkipv6prefix resource of given name .",
"Sets the timeout used when connecting to the server.\n\n@param timeout the time out to use\n\n@return the builder",
"Scans the scene graph to collect picked items\nand generates appropriate pick and touch events.\nThis function is called by the cursor controller\ninternally but can also be used to funnel a\nstream of Android motion events into the picker.\n@see #pickObjects(GVRScene, float, float, float, float, float, float)\n@param touched true if the \"touched\" button is pressed.\nWhich button indicates touch is controller dependent.\n@param event Android MotionEvent which caused the pick\n@see IPickEvents\n@see ITouchEvents",
"Resolves a path relative to the base path.\n\n@param base the base path\n@param paths paths relative to the base directory\n\n@return the resolved path",
"Checks if Docker Machine is installed by running docker-machine and inspect the result.\n\n@param cliPathExec\nlocation of docker-machine or null if it is on PATH.\n\n@return true if it is installed, false otherwise.",
"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",
"Joins the given iterable objects using the given separator into a single string.\n\n@return the joined string or an empty string if iterable is null"
] |
private StyleFilter findStyleFilter(Object feature, List<StyleFilter> styles) {
for (StyleFilter styleFilter : styles) {
if (styleFilter.getFilter().evaluate(feature)) {
return styleFilter;
}
}
return new StyleFilterImpl();
} | [
"Find the style filter that must be applied to this feature.\n\n@param feature\nfeature to find the style for\n@param styles\nstyle filters to select from\n@return a style filter"
] | [
"Obtain collection of headers to remove\n\n@return\n@throws Exception",
"Will create a JNDI Context and register it as the initial context factory builder\n\n@return the context\n@throws NamingException\non any issue during initial context factory builder registration",
"Joins the given list into a single string.",
"Get informations about a place.\n\n<p>\nThis method does not require authentication.\n</p>\n\n@param placeId\nA Flickr Places ID. Optional, can be null. (While optional, you must pass either a valid Places ID or a WOE ID.)\n@param woeId\nA Where On Earth (WOE) ID. Optional, can be null. (While optional, you must pass either a valid Places ID or a WOE ID.)\n@return A Location\n@throws FlickrException",
"The grammar elements that may occur at the given offset.",
"Handle a value change.\n@param propertyId the column in which the value has changed.",
"Add the specified files in reverse order.",
"Add sub-deployment units to the container\n\n@param bdaMapping",
"Set brightness to eg. darken the resulting image for use as background\n\n@param brightness default is 0, pos values increase brightness, neg. values decrease brightness\n.-100 is black, positive goes up to 1000+"
] |
public static base_response unset(nitro_service client, responderparam resource, String[] args) throws Exception{
responderparam unsetresource = new responderparam();
return unsetresource.unset_resource(client,args);
} | [
"Use this API to unset the properties of responderparam resource.\nProperties that need to be unset are specified in args array."
] | [
"Adds the includes of the fileset to the handling.\n\n@param handling The handling\n@param fileSet The fileset",
"This method extracts resource data from a GanttProject file.\n\n@param ganttProject parent node for resources",
"Print work units.\n\n@param value TimeUnit instance\n@return work units value",
"set custom response for profile's default client\n\n@param profileName profileName to modify\n@param pathName friendly name of path\n@param customData custom request data\n@return true if success, false otherwise",
"Prints dependencies recovered from the methods of a class. A\ndependency is inferred only if another relation between the two\nclasses is not already in the graph.\n@param classes",
"This filter changes the amount of color in each of the three channels.\n\n@param r The amount of redness in the picture. Can range from -100 to 100 in percentage.\n@param g The amount of greenness in the picture. Can range from -100 to 100 in percentage.\n@param b The amount of blueness in the picture. Can range from -100 to 100 in percentage.\n@throws IllegalArgumentException if {@code r}, {@code g}, or {@code b} are outside of bounds.",
"Plots the MSD curve for trajectory t\n@param t Trajectory to calculate the msd curve\n@param lagMin Minimum timelag (e.g. 1,2,3..) lagMin*timelag = elapsed time in seconds\n@param lagMax Maximum timelag (e.g. 1,2,3..) lagMax*timelag = elapsed time in seconds\n@param msdeval Evaluates the mean squared displacment",
"Create a transactional protocol client.\n\n@param channelAssociation the channel handler\n@return the transactional protocol client",
"Checks whether the compilation has been canceled and reports the given work increment to the compiler progress."
] |
public ParallelTaskBuilder prepareUdp(String command) {
reinitIfClosed();
ParallelTaskBuilder cb = new ParallelTaskBuilder();
cb.setProtocol(RequestProtocol.UDP);
cb.getUdpMeta().setCommand(command);
return cb;
} | [
"Prepare a parallel UDP Task.\n\n@param command\nthe command\n@return the parallel task builder"
] | [
"Convenience method dispatches the specified event to the source appender,\nwhich will result in the custom event data being appended to the new file.\n\n@param customLoggingEvent\nThe custom Log4J event to be appended.",
"Call the appropriate handler for handling the httprequest. 404 if path is not found. 405 if path is found but\nhttpMethod does not match what's configured.\n\n@param request instance of {@code HttpRequest}\n@param responder instance of {@code HttpResponder} to handle the request.",
"This produces a string with no compressed segments and all segments of full length,\nwhich is 3 characters for IPv4 segments.",
"Read exceptions for a calendar.\n\n@param table calendar exception data\n@param calendar calendar\n@param exceptionID first exception ID",
"Create a string from bytes using the given encoding\n\n@param bytes The bytes to create a string from\n@param encoding The encoding of the string\n@return The created string",
"Gets the list of failed invocations that has been collected by this collector.\n\n@return The failed invocations.",
"Flushes all changes to disk.",
"Send ourselves \"updates\" about any tracks that were loaded before we started, since we missed them.",
"From the set of classes a new set is built containing all indexed\nsubclasses, but removing then all subtypes of indexed entities.\n\n@param selection\n\n@return a new set of entities"
] |
protected String addDependency(TaskGroup.HasTaskGroup dependency) {
Objects.requireNonNull(dependency);
this.taskGroup().addDependencyTaskGroup(dependency.taskGroup());
return dependency.taskGroup().key();
} | [
"Add a dependency task group for this model.\n\n@param dependency the dependency.\n@return key to be used as parameter to taskResult(string) method to retrieve result of root\ntask in the given dependency task group"
] | [
"Appends the key and value to the address and sets the address on the operation.\n\n@param operation the operation to set the address on\n@param base the base address\n@param key the key for the new address\n@param value the value for the new address",
"Transits a float propertyId from the start value to the end value.\n\n@param propertyId\n@param vals\n@return self",
"create a HashMap form the json properties and add it to the shape\n@param modelJSON\n@param current\n@throws org.json.JSONException",
"Parse a string representation of an Integer value.\n\n@param value string representation\n@return Integer value",
"Obtains a local date in Accounting 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 Accounting local date, not null\n@throws DateTimeException if unable to create the date",
"adds a CmsJspImageBean as hi-DPI variant to this image\n@param factor the variant multiplier, e.g. \"2x\" (the common retina multiplier)\n@param image the image to be used for this variant",
"Associate an input stream with the operation. Closing the input stream\nis the responsibility of the caller.\n\n@param in the input stream. Cannot be {@code null}\n@return a builder than can be used to continue building the operation",
"Converts an image in BINARY mode to RGB mode\n\n@param img image\n@return new MarvinImage instance in RGB mode",
"Adds the HIBC prefix and check digit to the specified data, returning the resultant data string.\n\n@see <a href=\"https://sourceforge.net/p/zint/code/ci/master/tree/backend/library.c\">Corresponding Zint code</a>"
] |
private void uncheckAll(CmsList<? extends I_CmsListItem> list) {
for (Widget it : list) {
CmsTreeItem treeItem = (CmsTreeItem)it;
treeItem.getCheckBox().setChecked(false);
uncheckAll(treeItem.getChildren());
}
} | [
"Uncheck all items in the list including all sub-items.\n@param list list of CmsTreeItem entries."
] | [
"Process calendar hours.\n\n@param calendar parent calendar\n@param row calendar hours data\n@param dayIndex day index",
"We have received an update that invalidates the waveform detail for a player, so clear it and alert\nany listeners if this represents a change. This does not affect the hot cues; they will stick around until the\nplayer loads a new track that overwrites one or more of them.\n\n@param update the update which means we have no waveform preview for the associated player",
"Seeks forward or backwards to a particular season based on the current date\n\n@param seasonString The season to seek to\n@param direction The direction to seek\n@param seekAmount The number of years to seek",
"Performs a standard bidiagonal decomposition just on the outer blocks of the provided matrix\n\n@param blockLength\n@param A\n@param gammasU",
"Gets the progress.\n\n@return the progress",
"We have identified that we have a zip file. Extract the contents into\na temporary directory and process.\n\n@param stream schedule data\n@return ProjectFile instance",
"Returns the configured sort options, or the empty list if no such options are configured.\n@return The configured sort options, or the empty list if no such options are configured.",
"Use this API to fetch dnssuffix resources of given names .",
"Used to NOT the argument clause specified."
] |
public static ZMatrixRMaj hermitian(int length, double min, double max, Random rand) {
ZMatrixRMaj A = new ZMatrixRMaj(length,length);
fillHermitian(A, min, max, rand);
return A;
} | [
"Creates a random Hermitian matrix with elements from min to max value.\n\n@param length Width and height of the matrix.\n@param min Minimum value an element can have.\n@param max Maximum value an element can have.\n@param rand Random number generator.\n@return A symmetric matrix."
] | [
"Mark a PersistenceBroker as preferred choice for current Thread\n\n@param key The PBKey the broker is associated to\n@param broker The PersistenceBroker to mark as current",
"Returns the ending used by the Wikimedia-provided dumpfile names of the\ngiven type.\n\n@param dumpContentType\nthe type of dump\n@return postfix of the dumpfile name\n@throws IllegalArgumentException\nif the given dump file type is not known",
"Adds a new row after the given one.\n\n@param row the row after which a new one should be added",
"Read the top level tasks from GanttProject.\n\n@param gpProject GanttProject project",
"Retrieves a ProjectReader instance which can read a file of the\ntype specified by the supplied file name.\n\n@param name file name\n@return ProjectReader instance",
"Rethrows platform specific OperationCanceledExceptions and unwraps OperationCanceledErrors. Does nothing for any other type of Throwable.",
"Reduce the given value to the nearest smaller 1 significant digit number starting with 1, 2 or 5.\n\n@param value the value to find a nice number for.\n@param scaleUnit the unit of the value.\n@param lockUnits if set, the values are not scaled to a \"nicer\" unit.",
"Merges two lists of references, eliminating duplicates in the process.\n\n@param references1\n@param references2\n@return merged list",
"Sends a user a password reset email for the given email.\n\n@param email the email of the user.\n@return A {@link Task} that completes when the reqest request completes/fails."
] |
protected BoxWatermark applyWatermark(URLTemplate itemUrl, String imprint) {
URL watermarkUrl = itemUrl.build(this.getAPI().getBaseURL(), this.getID());
URL url = WATERMARK_URL_TEMPLATE.build(watermarkUrl.toString());
BoxJSONRequest request = new BoxJSONRequest(this.getAPI(), url, "PUT");
JsonObject body = new JsonObject()
.add(BoxWatermark.WATERMARK_JSON_KEY, new JsonObject()
.add(BoxWatermark.WATERMARK_IMPRINT_JSON_KEY, imprint));
request.setBody(body.toString());
BoxJSONResponse response = (BoxJSONResponse) request.send();
return new BoxWatermark(response.getJSON());
} | [
"Used to apply or update the watermark for the item.\n@param itemUrl url template for the item.\n@param imprint the value must be \"default\", as custom watermarks is not yet supported.\n@return the watermark associated with the item."
] | [
"Returns the version document of the given document, if any; returns null otherwise.\n@param document the document to get the version from.\n@return the version of the given document, if any; returns null otherwise.",
"Returns the classpath for executable jar.",
"Alias accessor provided for JSON serialization only",
"Calculate start dates for a monthly absolute recurrence.\n\n@param calendar current date\n@param frequency frequency\n@param dates array of start dates",
"when divisionPrefixLen is null, isAutoSubnets has no effect",
"Prepare a parallel HTTP HEAD Task.\n\n@param url\nthe UrlPostfix: e.g. in http://localhost:8080/index.html.,the url is \"/index.html\"\n@return the parallel task builder",
"Allows this closeable to be used within the closure, ensuring that it\nis closed once the closure has been executed and before this method returns.\n\n@param self the Closeable\n@param action the closure taking the Closeable as parameter\n@return the value returned by the closure\n@throws IOException if an IOException occurs.\n@since 2.4.0",
"Utility method used to convert a Number into a BigInteger.\n\n@param value Number instance\n@return BigInteger instance",
"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."
] |
public void setFarClippingDistance(float far) {
if(leftCamera instanceof GVRCameraClippingDistanceInterface &&
centerCamera instanceof GVRCameraClippingDistanceInterface &&
rightCamera instanceof GVRCameraClippingDistanceInterface) {
((GVRCameraClippingDistanceInterface)leftCamera).setFarClippingDistance(far);
centerCamera.setFarClippingDistance(far);
((GVRCameraClippingDistanceInterface)rightCamera).setFarClippingDistance(far);
}
} | [
"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."
] | [
"Executes the API action \"wbsetlabel\" for the given parameters.\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 value\nthe value of the label to set. Set it to null to remove the label.\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 label as returned by 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",
"Mark for creation all newly introduced dependent references.\nMark for deletion all nullified dependent references.\n@return the list of created objects",
"Use this API to update vridparam.",
"Not used.",
"Recursively builds the VFS entry bean for the quick filtering function in the folder tab.<p<\n\n@param resource the resource\n@param childMap map from parent to child resources\n@param filterMatches the resources matching the filter\n@param parentPaths root paths of resources which are not leaves\n@param isRoot true if this the root node\n\n@return the VFS entry bean for the client\n\n@throws CmsException if something goes wrong",
"Returns a string that should be used as a label for the given property.\n\n@param propertyIdValue\nthe property to label\n@return the label",
"Gets the property by key converted to lowercase if requested\n@param key property key\n@param lowerCase convert property to lowercase if it is true, keep the original one if it is\nfalse\n@return node property",
"Common mechanism to convert Synchro commentary recorss into notes.\n\n@param rows commentary table rows\n@return note text",
"Applies the kubernetes json url to the configuration.\n\n@param map\nThe arquillian configuration."
] |
protected void appendTableWithJoins(TableAlias alias, StringBuffer where, StringBuffer buf)
{
int stmtFromPos = 0;
byte joinSyntax = getJoinSyntaxType();
if (joinSyntax == SQL92_JOIN_SYNTAX)
{
stmtFromPos = buf.length(); // store position of join (by: Terry Dexter)
}
if (alias == getRoot())
{
// BRJ: also add indirection table to FROM-clause for MtoNQuery
if (getQuery() instanceof MtoNQuery)
{
MtoNQuery mnQuery = (MtoNQuery)m_query;
buf.append(getTableAliasForPath(mnQuery.getIndirectionTable(), null).getTableAndAlias());
buf.append(", ");
}
buf.append(alias.getTableAndAlias());
}
else if (joinSyntax != SQL92_NOPAREN_JOIN_SYNTAX)
{
buf.append(alias.getTableAndAlias());
}
if (!alias.hasJoins())
{
return;
}
for (Iterator it = alias.iterateJoins(); it.hasNext();)
{
Join join = (Join) it.next();
if (joinSyntax == SQL92_JOIN_SYNTAX)
{
appendJoinSQL92(join, where, buf);
if (it.hasNext())
{
buf.insert(stmtFromPos, "(");
buf.append(")");
}
}
else if (joinSyntax == SQL92_NOPAREN_JOIN_SYNTAX)
{
appendJoinSQL92NoParen(join, where, buf);
}
else
{
appendJoin(where, buf, join);
}
}
} | [
"Appends to the statement table and all tables joined to it.\n@param alias the table alias\n@param where append conditions for WHERE clause here"
] | [
"Set the current playback position. This method can only be used in situations where the component is\ntied to a single player, and therefore always has a single playback position.\n\nWill cause part of the component to be redrawn if the position has\nchanged. This will be quickly overruled if a player is being monitored, but\ncan be used in other contexts.\n\n@param milliseconds how far into the track has been played\n\n@see #setPlaybackState",
"Reads characters into a portion of an array, then replace invalid XML characters\n\n@throws IOException If an I/O error occurs\n@see ru.yandex.qatools.allure.config.AllureNamingUtils#isBadXmlCharacter(char) by space",
"Return all objects for the given class.",
"Use this API to update vridparam.",
"Add a point to this curveFromInterpolationPoints. The method will throw an exception if the point\nis already part of the curveFromInterpolationPoints.\n\n@param time The x<sub>i</sub> in <sub>i</sub> = f(x<sub>i</sub>).\n@param value The y<sub>i</sub> in <sub>i</sub> = f(x<sub>i</sub>).\n@param isParameter If true, then this point is served via {@link #getParameter()} and changed via {@link #getCloneForParameter(RandomVariable[])}, i.e., it can be calibrated.",
"Returns the URL of the first route.\n@return URL backed by the first route.",
"Send get request.\n\n@param url the url\n@param customHeaders the customHeaders\n@param params the params\n@return the string\n@throws URISyntaxException the uri syntax exception\n@throws IOException the io exception",
"Returns script view\n\n@param model\n@return\n@throws Exception",
"Use this API to delete route6 resources."
] |
public static base_response update(nitro_service client, ipv6 resource) throws Exception {
ipv6 updateresource = new ipv6();
updateresource.ralearning = resource.ralearning;
updateresource.routerredirection = resource.routerredirection;
updateresource.ndbasereachtime = resource.ndbasereachtime;
updateresource.ndretransmissiontime = resource.ndretransmissiontime;
updateresource.natprefix = resource.natprefix;
updateresource.dodad = resource.dodad;
return updateresource.update_resource(client);
} | [
"Use this API to update ipv6."
] | [
"Processes the template for all extents of the current class.\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\"",
"Internal method which is called when the user has finished editing the title.\n\n@param box the text box which has been edited",
"Returns the key of the entity targeted by the represented association, retrieved from the given tuple.\n\n@param tuple the tuple from which to retrieve the referenced entity key\n@return the key of the entity targeted by the represented association",
"Parses an RgbaColor from an rgb value.\n\n@return the parsed color",
"Determines whether or not two axially aligned bounding boxes in\nthe same coordinate space intersect.\n@param bv1 first bounding volume to test.\n@param bv2 second bounding volume to test.\n@return true if the boxes intersect, false if not.",
"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.",
"Passes the Socket's InputStream and OutputStream to the closure. The\nstreams will be closed after the closure returns, even if an exception\nis thrown.\n\n@param socket a Socket\n@param closure a Closure\n@return the value returned by the closure\n@throws IOException if an IOException occurs.\n@since 1.5.2",
"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.",
"1.5 and on, 2.0 and on, 3.0 and on."
] |
public static Optional<Variable> freshBuilder(SourceBuilder code, Datatype datatype) {
if (!datatype.getBuilderFactory().isPresent()) {
return Optional.empty();
}
return Optional.of(code.scope().computeIfAbsent(Declaration.FRESH_BUILDER, () -> {
Variable defaults = new Variable("defaults");
code.addLine("%s %s = %s;",
datatype.getGeneratedBuilder(),
defaults,
datatype.getBuilderFactory().get()
.newBuilder(datatype.getBuilder(), TypeInference.INFERRED_TYPES));
return defaults;
}));
} | [
"Declares a fresh Builder to copy default property values from.\n\n<p>Reuses an existing fresh Builder instance if one was already declared in this scope.\n\n@returns a variable holding a fresh Builder, if a no-args factory method is available to\ncreate one with"
] | [
"Returns true if the string is a valid Java full qualified class name.\n\n@param str the string to be examined\n@return true if str is a valid Java Fqcn",
"Returns the compact records for all attachments on the task.\n\n@param task Globally unique identifier for the task.\n@return Request object",
"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",
"Process calendar hours and exception data from the database.\n\n@param calendars all calendars for the project",
"Read all task relationships from a ConceptDraw PROJECT file.\n\n@param cdp ConceptDraw PROJECT file",
"Creates a block matrix the same size as A_inv, inverts the matrix and copies the results back\nonto A_inv.\n\n@param A_inv Where the inverted matrix saved. Modified.",
"Returns the start of this resource assignment.\n\n@return start date",
"Inserts the information about the dateStamp of a dump and the project\nname into a pattern.\n\n@param pattern\nString with wildcards\n@param dateStamp\n@param project\n@return String with injected information.",
"Retrieve the number of minutes per week for this calendar.\n\n@return minutes per week"
] |
public int[] argb(int x, int y) {
Pixel p = pixel(x, y);
return new int[]{p.alpha(), p.red(), p.green(), p.blue()};
} | [
"Returns the ARGB components for the pixel at the given coordinates\n\n@param x the x coordinate of the pixel component to grab\n@param y the y coordinate of the pixel component to grab\n@return an array containing ARGB components in that order."
] | [
"Performs a null edit on a property. This has some effects on Wikibase,\nsuch as refreshing the labels of the referred items in the UI.\n\n@param propertyId\nthe document to perform a null edit on\n@throws MediaWikiApiErrorException\nif the API returns errors\n@throws IOException\nif there are any IO errors, such as missing network connection",
"Process task dependencies.",
"Generates a Map of query parameters for Artifact regarding the filters\n\n@return Map<String, Object>",
"Pauses the file upload. This is a blocking function that would try to wait till the assembly file uploads\nhave actually been paused if possible.\n\n@throws LocalOperationException if the method is called while no upload is going on.",
"Retrieve the number of minutes per week for this calendar.\n\n@return minutes per week",
"Get the service name of a top-level deployment unit.\n\n@param name the simple name of the deployment\n@param phase the deployment phase\n@return the service name",
"Reads basic summary details from the project properties.\n\n@param file MPX file",
"Creates a new fixed size ThreadPoolExecutor\n\n@param threads\nthe number of threads\n@param groupname\na label to identify the threadpool; useful for profiling.\n@param queueSize\nthe size of the queue to store Runnables when all threads are busy\n@return the new ExecutorService",
"Use this API to update sslocspresponder resources."
] |
protected synchronized ResourceRoot getSeamIntResourceRoot() throws DeploymentUnitProcessingException {
try {
if (seamIntResourceRoot == null) {
final ModuleLoader moduleLoader = Module.getBootModuleLoader();
Module extModule = moduleLoader.loadModule(EXT_CONTENT_MODULE);
URL url = extModule.getExportedResource(SEAM_INT_JAR);
if (url == null)
throw ServerLogger.ROOT_LOGGER.noSeamIntegrationJarPresent(extModule);
File file = new File(url.toURI());
VirtualFile vf = VFS.getChild(file.toURI());
final Closeable mountHandle = VFS.mountZip(file, vf, TempFileProviderService.provider());
Service<Closeable> mountHandleService = new Service<Closeable>() {
public void start(StartContext startContext) throws StartException {
}
public void stop(StopContext stopContext) {
VFSUtils.safeClose(mountHandle);
}
public Closeable getValue() throws IllegalStateException, IllegalArgumentException {
return mountHandle;
}
};
ServiceBuilder<Closeable> builder = serviceTarget.addService(ServiceName.JBOSS.append(SEAM_INT_JAR),
mountHandleService);
builder.setInitialMode(ServiceController.Mode.ACTIVE).install();
serviceTarget = null; // our cleanup service install work is done
MountHandle dummy = MountHandle.create(null); // actual close is done by the MSC service above
seamIntResourceRoot = new ResourceRoot(vf, dummy);
}
return seamIntResourceRoot;
} catch (Exception e) {
throw new DeploymentUnitProcessingException(e);
}
} | [
"Lookup Seam integration resource loader.\n@return the Seam integration resource loader\n@throws DeploymentUnitProcessingException for any error"
] | [
"Exchange an auth token from the old Authentication API, to an OAuth access token.\n\nCalling this method will delete the auth token used to make the request.\n\n@param authToken\n@throws FlickrException\n@see \"http://www.flickr.com/services/api/flickr.auth.oauth.getAccessToken.html\"",
"Create a TableAlias for path or userAlias\n@param aTable\n@param aPath\n@param aUserAlias\n@return TableAlias",
"Returns a PreparedStatementCreator that returns a page of the underlying\nresult set.\n\n@param dialect\nDatabase dialect to use.\n@param limit\nMaximum number of rows to return.\n@param offset\nIndex of the first row to return.",
"Called on mouse down in the caption area, begins the dragging loop by\nturning on event capture.\n\n@see DOM#setCapture\n@see #continueDragging\n@param event the mouse down event that triggered dragging",
"Determine the raw type for the given generic parameter type.\n@param genericType the generic type to resolve\n@param typeVariableMap the TypeVariable Map to resolved against\n@return the resolved raw type",
"Extract a list of time entries.\n\n@param shiftData string representation of time entries\n@return list of time entry rows",
"This is the main entry point used to convert the internal representation\nof timephased work into an external form which can\nbe displayed to the user.\n\n@param projectCalendar calendar used by the resource assignment\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",
"Uncompresses the given textual content and writes it to the given file.\n\n@param file The file to write to\n@param compressedContent The content\n@throws IOException If an error occurred",
"A modified version of abs that always returns a non-negative value.\nMath.abs returns Integer.MIN_VALUE if a == Integer.MIN_VALUE and this\nmethod returns Integer.MAX_VALUE in that case."
] |
public final int getJdbcType()
{
switch (this.fieldSource)
{
case SOURCE_FIELD :
return this.getFieldRef().getJdbcType().getType();
case SOURCE_NULL :
return java.sql.Types.NULL;
case SOURCE_VALUE :
return java.sql.Types.VARCHAR;
default :
return java.sql.Types.NULL;
}
} | [
"Retrieve the jdbc type for the field descriptor that is related\nto this argument."
] | [
"Get global hotkey provider for current platform\n\n@param useSwingEventQueue whether the provider should be using Swing Event queue or a regular thread\n@return new instance of Provider, or null if platform is not supported\n@see X11Provider\n@see WindowsProvider\n@see CarbonProvider",
"This is private because the execute is the only method that should be called here.",
"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",
"This method takes the textual version of a relation type\nand returns an appropriate class instance. Note that unrecognised\nvalues will cause this method to return null.\n\n@param locale target locale\n@param type text version of the relation type\n@return RelationType instance",
"Removes the observation that fits the model the worst and recomputes the coefficients.\nThis is done efficiently by using an adjustable solver. Often times the elements with\nthe largest errors are outliers and not part of the system being modeled. By removing them\na more accurate set of coefficients can be computed.",
"Factory method that builds the appropriate matcher for @match tags",
"Set the amount of offset between child objects and parent.\n@param axis {@link Axis}\n@param offset",
"Populates currency settings.\n\n@param record MPX record\n@param properties project properties",
"This method writes predecessor data to a Planner file.\nWe have to deal with a slight anomaly in this method that is introduced\nby the MPX file format. It would be possible for someone to create an\nMPX file with both the predecessor list and the unique ID predecessor\nlist populated... which means that we must process both and avoid adding\nduplicate predecessors. Also interesting to note is that MSP98 populates\nthe predecessor list, not the unique ID predecessor list, as you might\nexpect.\n\n@param mpxjTask MPXJ task instance\n@param plannerTask planner task instance"
] |
public static String createLabel(final double value, final String unit, final GridLabelFormat format) {
final double zero = 0.000000001;
if (format != null) {
return format.format(value, unit);
} else {
if (Math.abs(value - Math.round(value)) < zero) {
return String.format("%d %s", Math.round(value), unit);
} else if ("m".equals(unit)) {
// meter: no decimals
return String.format("%1.0f %s", value, unit);
} else if (NonSI.DEGREE_ANGLE.toString().equals(unit)) {
// degree: by default 6 decimals
return String.format("%1.6f %s", value, unit);
} else {
return String.format("%f %s", value, unit);
}
}
} | [
"Create the label for a grid line.\n\n@param value the value of the line\n@param unit the unit that the value is in"
] | [
"Gets information about a trashed folder.\n@param folderID the ID of the trashed folder.\n@return info about the trashed folder.",
"Use this API to fetch filtered set of dospolicy resources.\nset the filter parameter values in filtervalue object.",
"Refresh's this connection's access token using its refresh token.\n@throws IllegalStateException if this connection's access token cannot be refreshed.",
"Gets an app client by its client app id if it has been initialized; throws if none can be\nfound.\n\n@param clientAppId the client app id of the app client to get.\n@return the app client associated with the client app id.",
"Sends a text message using given server setup for SMTP.\n\n@param to the to address.\n@param from the from address.\n@param subject the subject.\n@param msg the test message.\n@param setup the SMTP setup.",
"Calculate the layout offset",
"Prepare a model JSON for analyze, resolves the hierarchical structure\ncreates a HashMap which contains all resourceIds as keys and for each key\nthe JSONObject, all id are keys of this map\n@param object\n@return a HashMap keys: all ressourceIds values: all child JSONObjects\n@throws org.json.JSONException",
"Utility function that constructs AdminClient.\n\n@param url URL pointing to the bootstrap node\n@return Newly constructed AdminClient",
"Return overall per token accuracy"
] |
public static void abortSystem(final Throwable error) {
DaemonStarter.currentPhase.set(LifecyclePhase.ABORTING);
try {
DaemonStarter.getLifecycleListener().aborting();
} catch (Exception e) {
DaemonStarter.rlog.error("Custom abort failed", e);
}
if (error != null) {
DaemonStarter.rlog.error("Unrecoverable error encountered --> Exiting : {}", error.getMessage());
DaemonStarter.getLifecycleListener().exception(LifecyclePhase.ABORTING, error);
} else {
DaemonStarter.rlog.error("Unrecoverable error encountered --> Exiting");
}
// Exit system with failure return code
System.exit(1);
} | [
"Abort the daemon\n\n@param error the error causing the abortion"
] | [
"Build the operation transformers.\n\n@param registry the shared resource registry\n@return the operation transformers",
"Accessor method used to retrieve a Boolean object representing the\ncontents of an individual field. If the field does not exist in the\nrecord, null is returned.\n\n@param field the index number of the field to be retrieved\n@return the value of the required field",
"Return overall per token accuracy",
"Puts strings inside quotes and numerics are left as they are.\n@param str\n@return",
"Get a value as a string.\n\n@param key the key for looking up the value.\n@param type the type of the object\n@param <V> the type",
"Calculates the maximum text height which is possible based on the used Paint and its settings.\n\n@param _Paint Paint object which will be used to display a text.\n@param _Text The text which should be measured. If null, a default text is chosen, which\nhas a maximum possible height\n@return Maximum text height in px.",
"Returns true if the context has access to any given permissions.",
"Method signature without \"public void\" prefix\n\n@return The method signature in String format",
"The document field must not exist in the list provided\n@param rhs The argument - one or more values\n@return PredicateExpression: $nin rhs"
] |
private static void registerImage(String imageId, String imageTag, String targetRepo,
ArrayListMultimap<String, String> artifactsProps, int buildInfoId) throws IOException {
DockerImage image = new DockerImage(imageId, imageTag, targetRepo, buildInfoId, artifactsProps);
images.add(image);
} | [
"Registers an image to the images cache, so that it can be captured by the build-info proxy.\n\n@param imageId\n@param imageTag\n@param targetRepo\n@param buildInfoId\n@throws IOException"
] | [
"Generate an ordered set of column definitions from an ordered set of column names.\n\n@param columns column definitions\n@param order column names\n@return ordered set of column definitions",
"Use this API to fetch all the sslservice resources that are configured on netscaler.\nThis uses sslservice_args which is a way to provide additional arguments while fetching the resources.",
"Quits server by closing server socket and closing client socket handlers.",
"Returns the coupon payment of the period with the given index. The analytic model is needed in case of floating bonds.\n\n@param periodIndex The index of the period of interest.\n@param model The model under which the product is valued.\n@return The value of the coupon payment in the given period.",
"Locate the no arg constructor for the class.",
"Delivers the correct JSON Object for the Stencilset\n\n@param stencilSet\n@throws org.json.JSONException",
"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",
"Image scale method\n@param imageToScale The image to be scaled\n@param dWidth Desired width, the new image object is created to this size\n@param dHeight Desired height, the new image object is created to this size\n@param fWidth What to multiply the width by. value < 1 scales down, and value > one scales up\n@param fHeight What to multiply the height by. value < 1 scales down, and value > one scales up\n@return A scaled image",
"Runs a Story with the given configuration and steps.\n\n@param configuration the Configuration used to run story\n@param candidateSteps the List of CandidateSteps containing the candidate\nsteps methods\n@param story the Story to run\n@throws Throwable if failures occurred and FailureStrategy dictates it to\nbe re-thrown."
] |
public static StringTemplateGroup readStringTemplateGroup(InputStream stream) {
try {
return new StringTemplateGroup(
new InputStreamReader(stream, "UTF-8"),
DefaultTemplateLexer.class,
new StringTemplateErrorListener() {
@SuppressWarnings("synthetic-access")
public void error(String arg0, Throwable arg1) {
LOG.error(arg0 + ": " + arg1.getMessage(), arg1);
}
@SuppressWarnings("synthetic-access")
public void warning(String arg0) {
LOG.warn(arg0);
}
});
} catch (Exception e) {
LOG.error(e.getLocalizedMessage(), e);
return new StringTemplateGroup("dummy");
}
} | [
"Reads a stringtemplate group from a stream.\n\nThis will always return a group (empty if necessary), even if reading it from the stream fails.\n\n@param stream the stream to read from\n@return the string template group"
] | [
"Write a single resource.\n\n@param mpxj Resource instance",
"Specialized version of readValue just for reading map keys, because the StdDeserializer methods like\n_parseIntPrimitive blow up when the current JsonToken is FIELD_NAME",
"This method is called to format a units value.\n\n@param value numeric value\n@return currency value",
"Use this API to add vpnclientlessaccesspolicy.",
"Within a single zone, tries swapping some minimum number of random\npartitions per node with some minimum number of random partitions from\nother nodes within the zone. Chooses the best swap in each iteration.\nLarge values of the greedSwapMaxPartitions... arguments make this method\nequivalent to comparing every possible swap. This is very expensive.\n\nNormal case should be :\n\n#zones X #nodes/zone X max partitions/node X max partitions/zone\n\n@param nextCandidateCluster cluster object.\n@param greedyAttempts See RebalanceCLI.\n@param greedySwapMaxPartitionsPerNode See RebalanceCLI.\n@param greedySwapMaxPartitionsPerZone See RebalanceCLI.\n@param greedySwapZoneIds The set of zoneIds to consider. Each zone is done\nindependently.\n@param storeDefs\n@return updated cluster",
"This method can be called to ensure that the IDs of all\nentities are sequential, and start from an\nappropriate point. If entities are added to and removed from\nthis list, then the project is loaded into Microsoft\nproject, if the ID values have gaps in the sequence, there will\nbe blank rows shown.",
"Utility method to convert an array of bytes into a long. Byte ordered is\nassumed to be big-endian.\n@param bytes The data to read from.\n@param offset The position to start reading the 8-byte long from.\n@return The 64-bit integer represented by the eight bytes.\n@since 1.1",
"Bhattacharyya distance between two normalized histograms.\n\n@param histogram1 Normalized histogram.\n@param histogram2 Normalized histogram.\n@return The Bhattacharyya distance between the two histograms.",
"Returns the y-coordinate of a vertex bitangent.\n\n@param vertex the vertex index\n@return the y coordinate"
] |
public void register() {
synchronized (loaders) {
loaders.add(this);
maximumHeaderLength = 0;
for (GVRCompressedTextureLoader loader : loaders) {
int headerLength = loader.headerLength();
if (headerLength > maximumHeaderLength) {
maximumHeaderLength = headerLength;
}
}
}
} | [
"Register a loader with the 'sniffer'.\n\n'Factory loaders' are pre-registered. To load a format we don't support,\ncreate a {@link GVRCompressedTextureLoader} descendant. Then, before\ntrying to load any files in that format, create an instance and call\n{@link #register()}:\n\n<pre>\n\nnew MyCompressedFormat().register();\n</pre>"
] | [
"New SOAP client uses new SOAP service.",
"Get viewport size along the axis\n@param axis {@link Axis}\n@return size",
"defines the KEY in the parent report parameters map where to get the subreport parameters map.\n@param path where to get the parameter map for the subrerpot.\n@return",
"Record a content loader for a given patch id.\n\n@param patchID the patch id\n@param contentLoader the content loader",
"Set the replace of the uri and return the new URI.\n\n@param initialUri the starting URI, the URI to update\n@param path the path to set on the baeURI",
"Optionally specify the variable name to use for the output of this condition",
"Retrieve the request History based on the specified filters.\nIf no filter is specified, return the default size history.\n\n@param filters filters to be applied\n@return array of History items\n@throws Exception exception",
"This method finds the start of the next working period.\n\n@param cal current Calendar instance",
"This method performs a set of queries to retrieve information\nfrom the an MPP or an MPX file.\n\n@param filename name of the MPX file\n@throws Exception on file read error"
] |
public static List<String> splitAndTrimAsList(String text, String sep) {
ArrayList<String> answer = new ArrayList<>();
if (text != null && text.length() > 0) {
for (String v : text.split(sep)) {
String trim = v.trim();
if (trim.length() > 0) {
answer.add(trim);
}
}
}
return answer;
} | [
"splits a string into a list of strings. Trims the results and ignores empty strings"
] | [
"Returns true if the information in this link should take\nprecedence over the information in the other link.",
"Add sub-deployment units to the container\n\n@param bdaMapping",
"Returns an entry of kind snippet with the given proposal and label and the prefix from the context, or null if the proposal is not valid.\n@since 2.16",
"Convert a drawable object into a Bitmap.\n@param drawable Drawable to extract a Bitmap from.\n@return A Bitmap created from the drawable parameter.",
"Core write attribute implementation.\n\n@param name attribute name\n@param value attribute value",
"Parses a reflection modifier to a list of string\n\n@param modifiers The modifier to parse\n@return The resulting string list",
"Deletes a user from an enterprise account.\n@param notifyUser whether or not to send an email notification to the user that their account has been deleted.\n@param force whether or not this user should be deleted even if they still own files.",
"Get unique values form the array.\n\n@param values Array of values.\n@return Unique values.",
"Adds a constructor for the proxy for each constructor declared by the base\nbean type.\n\n@param proxyClassType the Javassist class for the proxy\n@param initialValueBytecode"
] |
private void sendEmptyRequest(String path, String method) throws DatastoreEmulatorException {
HttpURLConnection connection = null;
try {
URL url = new URL(this.host + path);
connection = (HttpURLConnection) url.openConnection();
connection.setDoOutput(true);
connection.setRequestMethod(method);
connection.getOutputStream().close();
if (connection.getResponseCode() != HttpURLConnection.HTTP_OK) {
throw new DatastoreEmulatorException(
String.format(
"%s request to %s returned HTTP status %s",
method, path, connection.getResponseCode()));
}
} catch (IOException e) {
throw new DatastoreEmulatorException(
String.format("Exception connecting to emulator on %s request to %s", method, path), e);
} finally {
if (connection != null) {
connection.disconnect();
}
}
} | [
"Send an empty request using a standard HTTP connection."
] | [
"Discards any tracks from the hot cache that were loaded from a now-unmounted media slot, because they are no\nlonger valid.",
"Removes the key and its associated value from this map.\n\n@param key the key to remove\n@return the value associated with that key, or null if\nthe key was not in the map",
"Pause between cluster change in metadata and starting server rebalancing\nwork.",
"Copy all of the mappings from the specified map to this one, replacing\nany mappings with the same keys.\n\n@param in the map whose mappings are to be copied",
"Generates a License regarding the parameters.\n\n@param name String\n@param longName String\n@param comments String\n@param regexp String\n@param url String\n@return License",
"Read the values from the output object and write them to the values object.\n\n@param output the output object from a processor\n@param processor the processor the output if from\n@param values the object for sharing values between processors",
"Parses the comma delimited address into model nodes.\n\n@param profileName the profile name for the domain or {@code null} if not a domain\n@param inputAddress the address.\n\n@return a collection of the address nodes.",
"Lift a Java Func2 to a Scala Function2\n\n@param f the function to lift\n\n@returns the Scala function",
"Answer the SQL-Clause for a SelectionCriteria\nIf the Criteria references a class with extents an OR-Clause is\nadded for each extent\n@param c SelectionCriteria"
] |
protected void sendMessage(DataOutputStream outputStream, Message message) throws IOException {
long startNs = System.nanoTime();
ProtoUtils.writeMessage(outputStream, message);
if(streamStats != null) {
streamStats.reportNetworkTime(operation,
Utils.elapsedTimeNs(startNs, System.nanoTime()));
}
} | [
"Helper method to send message on outputStream and account for network\ntime stats.\n\n@param outputStream\n@param message\n@throws IOException"
] | [
"Returns all accessible projects of the given organizational unit.\n\nThat is all projects which are owned by the current user or which are\naccessible for the group of the user.<p>\n\n@param cms the opencms context\n@param ouFqn the fully qualified name of the organizational unit to get projects for\n@param includeSubOus if all projects of sub-organizational units should be retrieved too\n\n@return all <code>{@link org.opencms.file.CmsProject}</code> objects in the organizational unit\n\n@throws CmsException if operation was not successful",
"Record the duration of a get_all operation, along with how many values\nwere requested, how may were actually returned and the size of the values\nreturned.",
"Merge the source skeleton with this one.\nThe result will be that this skeleton has all of its\noriginal bones and all the bones in the new skeleton.\n\n@param newSkel skeleton to merge with this one",
"Use this API to fetch all the appfwlearningsettings resources that are configured on netscaler.",
"Replaces the first substring of this CharSequence that matches the given\nregular expression with the given replacement.\n\n@param self a CharSequence\n@param regex the capturing regex\n@param replacement the CharSequence to be substituted for each match\n@return a CharSequence with replaced content\n@throws java.util.regex.PatternSyntaxException if the regular expression's syntax is invalid\n@see String#replaceFirst(String, String)\n@since 1.8.2",
"Checks the status of one or more asynchronous photo upload tickets. This method does not require authentication.\n\n@param tickets\na set of ticket ids (Strings) or {@link Ticket} objects containing ids\n@return a list of {@link Ticket} objects.\n@throws FlickrException",
"Returns true if the string matches the name of a function",
"Return the trimmed source line corresponding to the specified AST node\n\n@param node - the Groovy AST node",
"Parses int value and returns the provided default if the value can't be parsed.\n@param value the int to parse.\n@param defaultValue the default value.\n@return the parsed int, or the default value if parsing fails."
] |
public static <T extends Annotation> List<T> searchForAnnotation(Method method, Class<T> annotation) {
if (method == null) {
return Lists.newArrayList();
}
return searchClasses(method, annotation, method.getDeclaringClass());
} | [
"Searches for all annotations of the given type on this method or on type level for all interfaces and superclasses\n\n@param method the method to scan\n@param annotation the annotation to search for\n@param <T> the type of the annotation\n@return the list of all method or type level annotations in the type hierarchy"
] | [
"Obtains a local date in Symmetry010 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 Symmetry010 local date, not null\n@throws DateTimeException if unable to create the date",
"Returns the next power of 2 after the input value x.\n\n@param x Input value x.\n@return Returns the next power of 2 after the input value x.",
"Populates a resource.\n\n@param resource resource instance\n@param record MPX record\n@throws MPXJException",
"Append Join for non SQL92 Syntax",
"This method writes calendar data to a Planner file.\n\n@throws JAXBException on xml creation errors",
"Extract site path, base name and locale from the resource opened with the editor.",
"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",
"Get information about a partition in this database.\n\n@param partitionKey database partition key\n@return {@link com.cloudant.client.api.model.PartitionInfo} encapsulating the database partition info.\n@throws UnsupportedOperationException if called with {@code null} partition key.",
"Use this API to fetch dnsview resources of given names ."
] |
public void createEnvironment(@Observes(precedence = 10) BeforeClass event, OpenShiftAdapter client,
CubeOpenShiftConfiguration cubeOpenShiftConfiguration) {
final TestClass testClass = event.getTestClass();
log.info(String.format("Creating environment for %s", testClass.getName()));
OpenShiftResourceFactory.createResources(testClass.getName(), client, testClass.getJavaClass(),
cubeOpenShiftConfiguration.getProperties());
classTemplateProcessor = new ClassTemplateProcessor(client, cubeOpenShiftConfiguration, testClass);
final List<? extends OpenShiftResource> templateResources = classTemplateProcessor.processTemplateResources();
templateDetailsProducer.set(() -> templateResources);
} | [
"Create the environment as specified by @Template or\narq.extension.ce-cube.openshift.template.* properties.\n<p>\nIn the future, this might be handled by starting application Cube\nobjects, e.g. CreateCube(application), StartCube(application)\n<p>\nNeeds to fire before the containers are started."
] | [
"For the given service name return list of endpoint references currently\nregistered at the service locator server endpoints.\n\n@param serviceName\nthe name of the service for which to get the endpoints, must\nnot be <code>null</code>\n@return EndpointReferenceListType encapsulate list of endpoint references\nor <code>null</code>",
"Store the versioned values\n\n@param values list of versioned bytes\n@return the list of versioned values rolled into an array of bytes",
"Check that a list allowing null and empty item contains at least one element that is\nnot blank.\n@param list can't be null\n@return",
"a helper method to enable the keyboardUtil for a specific activity\nor disable it. note this will cause some frame drops because of the\nlistener.\n\n@param activity\n@param enable",
"Renders a given graphic into a new image, scaled to fit the new size and rotated.",
"Obtain override ID\n\n@param overrideIdentifier can be the override ID or class name\n@return\n@throws Exception",
"Adds listeners and reads from a stream.\n\n@param reader reader for file type\n@param stream schedule data\n@return ProjectFile instance",
"Read a long int from a byte array.\n\n@param data byte array\n@param offset start offset\n@return long value",
"Creates an operation to deploy existing deployment content to the runtime.\n\n@param deployment the deployment to deploy\n\n@return the deploy operation"
] |
public static void setBackgroundDrawable(View view, Drawable drawable) {
if (android.os.Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.JELLY_BEAN) {
view.setBackgroundDrawable(drawable);
} else {
view.setBackground(drawable);
}
} | [
"Set a Background Drawable using the appropriate Android version api call\n\n@param view\n@param drawable"
] | [
"Returns the getter method associated with the object's field.\n\n@param object\nthe object\n@param fieldName\nthe name of the field\n@return the getter method\n@throws NullPointerException\nif object or fieldName is null\n@throws SuperCsvReflectionException\nif the getter doesn't exist or is not visible",
"Get range around median containing specified percentage of values.\n@param values Values.\n@param percent Values percentage around median.\n@return Returns the range which containes specifies percentage of values.",
"Add a partition to the node provided\n\n@param node The node to which we'll add the partition\n@param donatedPartition The partition to add\n@return The new node with the new partition",
"New REST client uses new REST service",
"Sends a request to the API with the given parameters and the given\nrequest method and returns the result string. It automatically fills the\ncookie map with cookies in the result header after the request.\n\nWarning: You probably want to use ApiConnection.sendJsonRequest\nthat execute the request using JSON content format,\nthrows the errors and logs the warnings.\n\n@param requestMethod\neither POST or GET\n@param parameters\nMaps parameter keys to values. Out of this map the function\nwill create a query string for the request.\n@return API result\n@throws IOException",
"Modifies the \"msgCount\" belief\n\n@param int - the number to add or remove",
"Cancels all requests still waiting for a response.\n\n@return this {@link Searcher} for chaining.",
"Converts a gwt Date in the timezone of the current browser to a time in\nUTC.\n\n@return A Long corresponding to the number of milliseconds since January\n1, 1970, 00:00:00 GMT or null if the specified Date is null.",
"Returns the bill for the month specified.\n\n@param month for which bill to retrieve.\n@param year for which bill to retrieve.\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."
] |
private static MessageInfo mapMessageInfo(MessageInfoType messageInfoType) {
MessageInfo messageInfo = new MessageInfo();
if (messageInfoType != null) {
messageInfo.setFlowId(messageInfoType.getFlowId());
messageInfo.setMessageId(messageInfoType.getMessageId());
messageInfo.setOperationName(messageInfoType.getOperationName());
messageInfo.setPortType(messageInfoType.getPorttype() == null
? "" : messageInfoType.getPorttype().toString());
messageInfo.setTransportType(messageInfoType.getTransport());
}
return messageInfo;
} | [
"Map message info.\n\n@param messageInfoType the message info type\n@return the message info"
] | [
"Get a View that displays the data at the specified\nposition in the data set.\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",
"Adds a module to the modules that should be exported.\nIf called at least once, the explicitly added modules will be exported\ninstead of the default modules.\n\n@param moduleName the name of the module to export.",
"Finds and sets up the Listeners in the given rootView.\n\n@param rootView a View to traverse looking for listeners.\n@return the list of refinement attributes found on listeners.",
"Returns an empty Search object in Json\n@return String\n@throws IOException",
"Only meant to be called once\n\n@throws Exception exception",
"Move the SQL value to the next one for version processing.",
"Use this API to fetch vlan_interface_binding resources of given name .",
"compute Exp using Taylor Series.\n\n@param x An angle, in radians.\n@param nTerms Number of terms.\n@return Result.",
"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"
] |
private void printPropertyRecord(PrintStream out,
PropertyRecord propertyRecord, PropertyIdValue propertyIdValue) {
printTerms(out, propertyRecord.propertyDocument, propertyIdValue, null);
String datatype = "Unknown";
if (propertyRecord.propertyDocument != null) {
datatype = getDatatypeLabel(propertyRecord.propertyDocument
.getDatatype());
}
out.print(","
+ datatype
+ ","
+ propertyRecord.statementCount
+ ","
+ propertyRecord.itemCount
+ ","
+ propertyRecord.statementWithQualifierCount
+ ","
+ propertyRecord.qualifierCount
+ ","
+ propertyRecord.referenceCount
+ ","
+ (propertyRecord.statementCount
+ propertyRecord.qualifierCount + propertyRecord.referenceCount));
printRelatedProperties(out, propertyRecord);
out.println("");
} | [
"Prints the data of one property to the given output. This will be a\nsingle line in CSV.\n\n@param out\nthe output to write to\n@param propertyRecord\nthe data to write\n@param propertyIdValue\nthe property that the data refers to"
] | [
"resolves any lazy cross references in this resource, adding Issues for unresolvable elements to this resource.\nThis resource might still contain resolvable proxies after this method has been called.\n\n@param mon a {@link CancelIndicator} can be used to stop the resolution.",
"Handles incoming Application Update Request.\n@param incomingMessage the request message to process.",
"Create a classname from a given path\n\n@param path\n@return",
"The user making this call must be a member of the team in order to add others.\nThe user to add must exist in the same organization as the team in order to be added.\nThe user to add can be referenced by their globally unique user ID or their email address.\nReturns the full user record for the added user.\n\n@param team Globally unique identifier for the team.\n@return Request object",
"Delete an artifact in the Grapes server\n\n@param gavc\n@throws GrapesCommunicationException\n@throws javax.naming.AuthenticationException",
"Read in lines and execute them.\n\n@param reader the reader from which to get the groovy source to exec\n@param out the outputstream to use\n@throws java.io.IOException if something goes wrong",
"Provides a normalized string which is lowercase for host strings, and which is a normalized string for addresses.\n@return",
"Adds a classpath source which contains the given resource.\n\nTODO: [GH-213] this is extremely ugly; separate the code required to run on the\nforked JVM into an isolated bundle and either create it on-demand (in temp.\nfiles location?) or locate it in classpath somehow (in a portable way).",
"Given the byte buffer containing album art, build an actual image from it for easy rendering.\n\n@return the newly-created image, ready to be drawn"
] |
private static String createImageStreamRequest(String name, String version, String image, boolean insecure) {
JSONObject imageStream = new JSONObject();
JSONObject metadata = new JSONObject();
JSONObject annotations = new JSONObject();
metadata.put("name", name);
annotations.put("openshift.io/image.insecureRepository", insecure);
metadata.put("annotations", annotations);
// Definition of the image
JSONObject from = new JSONObject();
from.put("kind", "DockerImage");
from.put("name", image);
JSONObject importPolicy = new JSONObject();
importPolicy.put("insecure", insecure);
JSONObject tag = new JSONObject();
tag.put("name", version);
tag.put("from", from);
tag.put("importPolicy", importPolicy);
JSONObject tagAnnotations = new JSONObject();
tagAnnotations.put("version", version);
tag.put("annotations", tagAnnotations);
JSONArray tags = new JSONArray();
tags.add(tag);
// Add image definition to image stream
JSONObject spec = new JSONObject();
spec.put("tags", tags);
imageStream.put("kind", "ImageStream");
imageStream.put("apiVersion", "v1");
imageStream.put("metadata", metadata);
imageStream.put("spec", spec);
return imageStream.toJSONString();
} | [
"Creates image stream request and returns it in JSON formatted string.\n\n@param name Name of the image stream\n@param insecure If the registry where the image is stored is insecure\n@param image Image name, includes registry information and tag\n@param version Image stream version.\n@return JSON formatted string"
] | [
"Record the duration of a put operation, along with the size of the values\nreturned.",
"Gets constructors with given annotation type\n\n@param annotationType The annotation type to match\n@return A set of abstracted constructors with given annotation type. If\nthe constructors set is empty, initialize it first. Returns an\nempty set if there are no matches.\n@see org.jboss.weld.annotated.enhanced.EnhancedAnnotatedType#getEnhancedConstructors(Class)",
"Starts the one and only job instance in a separate Thread. Should be called exactly one time before\nthe operation is stopped.\n\n@param arguments {@inheritDoc}",
"Evict cached object\n\n@param key\nthe key indexed the cached object to be evicted",
"Use this API to add dospolicy.",
"Sets the number of ms to wait before attempting to obtain a connection again after a failure.\n@param acquireRetryDelay the acquireRetryDelay to set\n@param timeUnit time granularity",
"Register a new PerformanceMonitor with Spring if it does not already exist.\n\n@param beanName The name of the bean that this performance monitor is wrapped around\n@param registry The registry where all the spring beans are registered",
"Checks if the artifact is dependency of an dependent idl artifact\n@returns true if the artifact was a dependency of idl artifact",
"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"
] |
@RequestMapping(value="/{subscription}", method=GET, params="hub.mode=subscribe")
public @ResponseBody String verifySubscription(
@PathVariable("subscription") String subscription,
@RequestParam("hub.challenge") String challenge,
@RequestParam("hub.verify_token") String verifyToken) {
logger.debug("Received subscription verification request for '" + subscription + "'.");
return tokens.containsKey(subscription) && tokens.get(subscription).equals(verifyToken) ? challenge : "";
} | [
"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."
] | [
"Reload a managed server.\n\n@param permit the controller permit\n@return whether the state was changed successfully or not",
"Initializes OJB for the purposes of this task.\n\n@return The metadata manager used by OJB",
"Return the first header value for the given header name, if any.\n@param headerName the header name\n@return the first header value, or {@code null} if none",
"Change the color of the center which indicates the new color.\n\n@param color int of the color.",
"Replace full request content.\n\n@param requestContentTemplate\nthe request content template\n@param replacementString\nthe replacement string\n@return the string",
"Return a string representation of the object.",
"Use this API to fetch all the sslfipskey resources that are configured on netscaler.",
"Create and get actor system.\n\n@return the actor system",
"Return a public static method of a class.\n@param methodName the static method name\n@param clazz the class which defines the method\n@param args the parameter types to the method\n@return the static method, or {@code null} if no static method was found\n@throws IllegalArgumentException if the method name is blank or the clazz is null"
] |
public static HorizontalBandAlignment buildAligment(byte aligment){
if (aligment == RIGHT.getAlignment())
return RIGHT;
else if (aligment == LEFT.getAlignment())
return LEFT;
else if (aligment == CENTER.getAlignment())
return CENTER;
return LEFT;
} | [
"To be used with AutoText class constants ALIGMENT_LEFT, ALIGMENT_CENTER and ALIGMENT_RIGHT\n@param aligment\n@return"
] | [
"Returns all the dependencies of a module\n\n@param module Module\n@return List<Dependency>",
"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",
"This method is called if the data set has been changed. Subclasses might want to override\nthis method to add some extra logic.\n\nGo through all items in the list:\n- reuse the existing views in the list\n- add new views in the list if needed\n- trim the unused views\n- request re-layout\n\n@param preferableCenterPosition the preferable center position. If it is -1 - keep the\ncurrent center position.",
"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",
"Use this API to fetch nsrpcnode resources of given names .",
"Increases the internal array's length by the specified amount. Previous values are preserved.\nThe length value is not modified since this does not change the 'meaning' of the array, just\nincreases the amount of data which can be stored in it.\n\nthis.data = new data_type[ data.length + amount ]\n\n\n@param amount Number of elements added to the internal array's length",
"Token Info\nReturns the Token Information\n@return ApiResponse<TokenInfoSuccessResponse>\n@throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body",
"Sets the provided square matrix to be a random symmetric matrix whose values are selected from an uniform distribution\nfrom min to max, inclusive.\n\n@param A The matrix that is to be modified. Must be square. Modified.\n@param min Minimum value an element can have.\n@param max Maximum value an element can have.\n@param rand Random number generator.",
"May have to be changed to let multiple touch"
] |
private List<Versioned<byte[]>> disassembleValues(byte[] values) throws IOException {
if(values == null)
return new ArrayList<Versioned<byte[]>>(0);
List<Versioned<byte[]>> returnList = new ArrayList<Versioned<byte[]>>();
ByteArrayInputStream stream = new ByteArrayInputStream(values);
DataInputStream dataStream = new DataInputStream(stream);
while(dataStream.available() > 0) {
byte[] object = new byte[dataStream.readInt()];
dataStream.read(object);
byte[] clockBytes = new byte[dataStream.readInt()];
dataStream.read(clockBytes);
VectorClock clock = new VectorClock(clockBytes);
returnList.add(new Versioned<byte[]>(object, clock));
}
return returnList;
} | [
"Splits up value into multiple versioned values\n\n@param value\n@return\n@throws IOException"
] | [
"Reads color table as 256 RGB integer values.\n\n@param ncolors int number of colors to read.\n@return int array containing 256 colors (packed ARGB with full alpha).",
"Runs the given xpath and returns a boolean result.",
"Post the specified photo to a blog.\n\n@param photo\nThe photo metadata\n@param blogId\nThe blog ID\n@throws FlickrException",
"Read a FastTrack file.\n\n@param file FastTrack file",
"Use this API to clear gslbldnsentries.",
"sets the initialization method for this descriptor",
"Signals that the processor to finish and waits until it finishes.",
"Used to retrieve the watermark for the item.\nIf the item does not have a watermark applied to it, a 404 Not Found will be returned by API.\n@param itemUrl url template for the item.\n@param fields the fields to retrieve.\n@return the watermark associated with the item.",
"Try to get an attribute value from two elements.\n\n@param firstElement\n@param secondElement\n@return attribute value"
] |
protected Object getProxyFromResultSet() throws PersistenceBrokerException
{
// 1. get Identity of current row:
Identity oid = getIdentityFromResultSet();
// 2. return a Proxy instance:
return getBroker().createProxy(getItemProxyClass(), oid);
} | [
"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"
] | [
"Get an exception reporting an unexpected end tag for an XML element.\n@param reader the stream reader\n@return the exception",
"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",
"Attaches locale groups to the copied page.\n@param copiedPage the copied page.\n@throws CmsException thrown if the root cms cannot be retrieved.",
"Generate a set of datetime patterns to accommodate variations in MPX files.\n\n@param datePattern date pattern element\n@param timePatterns time patterns\n@return datetime patterns",
"Use this API to update vserver.",
"Get photos from the user's contacts.\n\nThis method requires authentication with 'read' permission.\n\n@param count\nThe number of photos to return\n@param justFriends\nSet to true to only show friends photos\n@param singlePhoto\nSet to true to get a single photo\n@param includeSelf\nSet to true to include self\n@return The Collection of photos\n@throws FlickrException",
"Add resources to the tree.\n\n@param parentNode parent tree node\n@param file resource container",
"Sends the error to responder.",
"Determines the mutator method name based on a field name.\n\n@param fieldName\na field name\n@return the resulting method name"
] |
public double getDegrees() {
double kms = getValue(GeoDistanceUnit.KILOMETRES);
return DistanceUtils.dist2Degrees(kms, DistanceUtils.EARTH_MEAN_RADIUS_KM);
} | [
"Return the numeric distance value in degrees.\n\n@return the degrees"
] | [
"Writes all auxiliary triples that have been buffered recently. This\nincludes OWL property restrictions but it also includes any auxiliary\ntriples required by complex values that were used in snaks.\n\n@throws RDFHandlerException\nif there was a problem writing the RDF triples",
"The main method. See the class documentation.",
"Retrieves the time at which work finishes on the given date, or returns\nnull if this is a non-working day.\n\n@param date Date instance\n@return finish time, or null for non-working day",
"trim \"act.\" from conf keys",
"allow extension only for testing",
"Return the content from an URL in byte array\n\n@param stringUrl URL to get\n@return byte array\n@throws IOException I/O error happened",
"Update the underlying buffer using the integer\n\n@param number number to be stored in checksum buffer",
"Sets a quota for a users.\n\n@param user the user.\n@param quota the quota.",
"Confirms a user with the given token and token id.\n\n@param token the confirmation token.\n@param tokenId the id of the confirmation token.\n@return A {@link Task} that completes when confirmation completes/fails."
] |
public <CT> CT callBatchTasks(ConnectionSource connectionSource, Callable<CT> callable) throws SQLException {
if (connectionSource.isSingleConnection(tableInfo.getTableName())) {
synchronized (this) {
return doCallBatchTasks(connectionSource, callable);
}
} else {
return doCallBatchTasks(connectionSource, callable);
}
} | [
"Call batch tasks inside of a connection which may, or may not, have been \"saved\"."
] | [
"FastJSON does not provide the API so we have to create our own",
"Update artifact provider\n\n@param gavc String\n@param provider String",
"moves to the next row of the underlying ResultSet and returns the\ncorresponding Object materialized from this row.",
"Use this API to update appfwlearningsettings.",
"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",
"Blocks until the server has started successfully or an exception is\nthrown.\n\n@throws VoldemortException if a problem occurs during start-up wrapping\nthe original exception.",
"Tells you if an expression is the expected constant.\n@param expression\nany expression\n@param expected\nthe expected int or String\n@return\nas described",
"Apply a filter to the list of all resources, and show the results.\n\n@param project project file\n@param filter filter",
"Adapt the size of the tiles so that we have the same amount of tiles as we would have had with maxWidth\nand maxHeight, but with the smallest tiles as possible."
] |
public Response updateTemplate(String id, Map<String, Object> options)
throws RequestException, LocalOperationException {
Request request = new Request(this);
return new Response(request.put("/templates/" + id, options));
} | [
"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."
] | [
"Make a copy of this Area of Interest.",
"Returns the current version info for a provided remote document.\n@param remoteDocument the remote BSON document from which to extract version info\n@return a DocumentVersionInfo",
"Mark the top level deployment as being a JPA deployment. If the deployment is not a top level deployment the parent is\nmarked instead",
"Validates specialization if this bean specializes another bean.",
"Set the degrees of rotation. Value will be set to -1, if not available.\n\n@param rotation",
"Gets the instance associated with the current thread.",
"Sets that there are some pending writes that occurred at a time for an associated\nlocally emitted change event. This variant maintains the last version set.\n\n@param atTime the time at which the write occurred.\n@param changeEvent the description of the write/change.",
"This method writes data for a single calendar to an MSPDI file.\n\n@param bc Base calendar data\n@return New MSPDI calendar instance",
"Log a trace message."
] |
public List<CmsCategory> getLeafItems() {
List<CmsCategory> result = new ArrayList<CmsCategory>();
if (m_categories.isEmpty()) {
return result;
}
Iterator<CmsCategory> it = m_categories.iterator();
CmsCategory current = it.next();
while (it.hasNext()) {
CmsCategory next = it.next();
if (!next.getPath().startsWith(current.getPath())) {
result.add(current);
}
current = next;
}
result.add(current);
return result;
} | [
"Returns only the leaf categories of the wrapped categories.\n\nThe method assumes that categories are ordered in the list, i.e., parents are directly followed by their children.\n\nNOTE: In the complete category tree a leaf of the wrapped tree part may not be a leaf.\n\n@return only the leaf categories of the wrapped categories."
] | [
"Use this API to fetch all the vpath resources that are configured on netscaler.",
"Returns the compact representations of all of the dependents of a task.\n\n@param task The task to get dependents on.\n@return Request object",
"This version assumes relativeIndices array no longer needs to\nbe copied. Further it is assumed that it has already been\nchecked or assured by construction that relativeIndices\nis sorted.",
"Searches for all annotations of the given type on this method or on type level for all interfaces and superclasses\n\n@param method the method to scan\n@param annotation the annotation to search for\n@param <T> the type of the annotation\n@return the list of all method or type level annotations in the type hierarchy",
"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.",
"Decompiles the given .class file and creates the specified output source file.\n\n@param classFilePath the .class file to be decompiled.\n@param outputDir The directory where decompiled .java files will be placed.",
"Converts this address to a prefix length\n\n@return the prefix of the indicated IP type represented by this address or null if this address is valid but cannot be represented by a network prefix length\n@throws AddressStringException if the address is invalid",
"Removes a value from the list.\n\n@param list the list\n@param value value to remove",
"Creates a \"delta clone\" of this Map, where only the differences are\nrepresented."
] |
public static void main(String[] args) throws Exception {
System.err.println("CRFBiasedClassifier invoked at " + new Date()
+ " with arguments:");
for (String arg : args) {
System.err.print(" " + arg);
}
System.err.println();
Properties props = StringUtils.argsToProperties(args);
CRFBiasedClassifier crf = new CRFBiasedClassifier(props);
String testFile = crf.flags.testFile;
String loadPath = crf.flags.loadClassifier;
if (loadPath != null) {
crf.loadClassifierNoExceptions(loadPath, props);
} else if (crf.flags.loadJarClassifier != null) {
crf.loadJarClassifier(crf.flags.loadJarClassifier, props);
} else {
crf.loadDefaultClassifier();
}
if(crf.flags.classBias != null) {
StringTokenizer biases = new java.util.StringTokenizer(crf.flags.classBias,",");
while (biases.hasMoreTokens()) {
StringTokenizer bias = new java.util.StringTokenizer(biases.nextToken(),":");
String cname = bias.nextToken();
double w = Double.parseDouble(bias.nextToken());
crf.setBiasWeight(cname,w);
System.err.println("Setting bias for class "+cname+" to "+w);
}
}
if (testFile != null) {
DocumentReaderAndWriter readerAndWriter = crf.makeReaderAndWriter();
if (crf.flags.printFirstOrderProbs) {
crf.printFirstOrderProbs(testFile, readerAndWriter);
} else if (crf.flags.printProbs) {
crf.printProbs(testFile, readerAndWriter);
} else if (crf.flags.useKBest) {
int k = crf.flags.kBest;
crf.classifyAndWriteAnswersKBest(testFile, k, readerAndWriter);
} else {
crf.classifyAndWriteAnswers(testFile, readerAndWriter);
}
}
} | [
"The main method, which is essentially the same as in CRFClassifier. See the class documentation."
] | [
"Use this API to fetch all the systemcollectionparam resources that are configured on netscaler.",
"Tell a device to turn sync on or off.\n\n@param deviceNumber the device whose sync state is to be set\n@param synced {@code} true if sync should be turned on, else it will be turned off\n\n@throws IOException if there is a problem sending the command to the device\n@throws IllegalStateException if the {@code VirtualCdj} is not active\n@throws IllegalArgumentException if {@code deviceNumber} is not found on the network",
"Returns the perma link for the given resource and optional detail content.<p<\n\n@param cms the CMS context to use\n@param resourceName the page to generate the perma link for\n@param detailContentId the structure id of the detail content (may be null)\n\n@return the perma link",
"Initializes class data structures and parameters",
"Convert a wavelength to an RGB value.\n@param wavelength wavelength in nanometres\n@return the RGB value",
"Validate ipv4 address with regular expression\n\n@param ip\naddress for validation\n\n@return true valid ip address, false invalid ip address",
"Take a string and make it an iterable ContentStream",
"This method is called from Javascript, passing in the previously created\ncallback key. It uses that to find the correct handler and then passes on\nthe call. State events in the Google Maps API don't pass any parameters.\n\n@param callbackKey Key generated by the call to registerHandler.",
"Checks to see if a handler is disabled\n\n@param handlerName the name of the handler to enable."
] |
public void beforeBatch(PreparedStatement stmt) throws PlatformException
{
// Check for Oracle batching support
final Method methodSetExecuteBatch;
final Method methodSendBatch;
methodSetExecuteBatch = ClassHelper.getMethod(stmt, "setExecuteBatch", PARAM_TYPE_INTEGER);
methodSendBatch = ClassHelper.getMethod(stmt, "sendBatch", null);
final boolean statementBatchingSupported = methodSetExecuteBatch != null && methodSendBatch != null;
if (statementBatchingSupported)
{
try
{
// Set number of statements per batch
methodSetExecuteBatch.invoke(stmt, PARAM_STATEMENT_BATCH_SIZE);
m_batchStatementsInProgress.put(stmt, methodSendBatch);
}
catch (Exception e)
{
throw new PlatformException(e.getLocalizedMessage(), e);
}
}
else
{
super.beforeBatch(stmt);
}
} | [
"Try Oracle update batching and call setExecuteBatch or revert to\nJDBC update batching. See 12-2 Update Batching in the Oracle9i\nJDBC Developer's Guide and Reference.\n@param stmt the prepared statement to be used for batching\n@throws PlatformException upon JDBC failure"
] | [
"Obtain collection of Parameters from request\n\n@param dataArray request parameters\n@return Map of parameters\n@throws Exception exception",
"Add a management request handler factory to this context.\n\n@param factory the request handler to add",
"Adds Editor specific UI components to the toolbar.\n@param context The context that provides access to the toolbar.",
"This method calculates the absolute number of days between two dates.\nNote that where two date objects are provided that fall on the same\nday, this method will return one not zero. Note also that this method\nassumes that the dates are passed in the correct order, i.e.\nstartDate < endDate.\n\n@param startDate Start date\n@param endDate End date\n@return number of days in the date range",
"Answers the ClassDescriptor referenced by 'super' ReferenceDescriptor.\n@return ClassDescriptor or null",
"Use this API to update snmpmanager.",
"Converts url path to the Transloadit full url.\nReturns the url passed if it is already full.\n\n@param url\n@return String",
"Gets the default configuration for Freemarker within Windup.",
"Find out the scrollable child view from a ViewGroup.\n\n@param viewGroup"
] |
public static String resourceTypeFromResourceId(String id) {
return (id != null) ? ResourceId.fromString(id).resourceType() : null;
} | [
"Extract resource type from a resource ID string.\n@param id the resource ID string\n@return the resource type"
] | [
"Assigns this retention policy to folder.\n@param folder the folder to assign policy to.\n@return info about created assignment.",
"Converts a vector from sample space into eigen space.\n\n@param sampleData Sample space data.\n@return Eigen space projection.",
"Removes the row with the specified key from this association.\n\n@param key the key of the association row to remove",
"Progress info message\n\n@param tag Message that precedes progress info. Indicate 'keys' or\n'entries'.",
"Parses the field facet configurations.\n@param fieldFacetObject The JSON sub-node with the field facet configurations.\n@return The field facet configurations.",
"generate random velocities in the given range\n@return",
"retrieve a collection of type collectionClass matching the Query query\n\n@see org.apache.ojb.broker.PersistenceBroker#getCollectionByQuery(Class, Query)",
"Retrieves state and metrics information for individual client connection.\n\n@param name connection name\n@return connection information",
"Write the patch.xml\n\n@param rollbackPatch the patch\n@param file the target file\n@throws IOException"
] |
protected int readInt(InputStream is) throws IOException
{
byte[] data = new byte[4];
if (is.read(data) != data.length)
{
throw new EOFException();
}
return (MPPUtility.getInt(data, 0));
} | [
"This method reads a four byte integer from the input stream.\n\n@param is the input stream\n@return byte value\n@throws IOException on file read error or EOF"
] | [
"get the default profile\n\n@return representation of default profile\n@throws Exception exception",
"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",
"This method writes project properties to a Planner file.",
"Helper method to copy the contents of a stream to a file.\n@param outputDirectory The directory in which the new file is created.\n@param stream The stream to copy.\n@param targetFileName The file to write the stream contents to.\n@throws IOException If the stream cannot be copied.",
"Returns whether this subnet or address has alphabetic digits when printed.\n\nNote that this method does not indicate whether any address contained within this subnet has alphabetic digits,\nonly whether the subnet itself when printed has alphabetic digits.\n\n@return whether the section has alphabetic digits when printed.",
"Returns current selenium version from JAR set in classpath.\n\n@return Version of Selenium.",
"Get a writer implementation to push data into Canvas.\n@param type Interface type you wish to get an implementation for\n@param oauthToken An OAuth token to use for authentication when making API calls\n@param <T> A writer implementation\n@return A writer implementation class",
"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",
"Set the default styles. the case of the keys are not important. The retrieval will be case\ninsensitive.\n\n@param defaultStyle the mapping from geometry type name (point, polygon, etc...) to the style\nto use for that type."
] |
public static double blackScholesDigitalOptionValue(
double initialStockValue,
double riskFreeRate,
double volatility,
double optionMaturity,
double optionStrike)
{
if(optionStrike <= 0.0)
{
// The Black-Scholes model does not consider it being an option
return 1.0;
}
else
{
// Calculate analytic value
double dPlus = (Math.log(initialStockValue / optionStrike) + (riskFreeRate + 0.5 * volatility * volatility) * optionMaturity) / (volatility * Math.sqrt(optionMaturity));
double dMinus = dPlus - volatility * Math.sqrt(optionMaturity);
double valueAnalytic = Math.exp(- riskFreeRate * optionMaturity) * NormalDistribution.cumulativeDistribution(dMinus);
return valueAnalytic;
}
} | [
"Calculates the Black-Scholes option value of a digital call option.\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 Returns the value of a European call option under the Black-Scholes model"
] | [
"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",
"Register child resources associated with this resource.\n\n@param resourceRegistration a {@link org.jboss.as.controller.registry.ManagementResourceRegistration} created from this definition",
"Add groups for given group parent item.\n\n@param type the tree type\n@param ouItem group parent item",
"Used when setting the \"visible\" field in the response. See the \"List Conversations\" docs for details\n@param filters Filter strings to be applied to the visibility of conversations\n@return this to continue building options",
"Use this API to add dnsview resources.",
"Write notes.\n\n@param recordNumber record number\n@param text note text\n@throws IOException",
"Returns true if super class of the parameter exists and is abstract and package private. In such case we want to omit such method.\n\nSee WELD-2507 and Oracle issue - https://bugs.java.com/view_bug.do?bug_id=6342411\n\n@return true if the super class exists and is abstract and package private",
"Export data base contents to a directory using supplied connection.\n\n@param connection database connection\n@param directory target directory\n@throws Exception",
"Adds an access constraint to the set used with the attribute\n@param accessConstraint the constraint\n@return a builder that can be used to continue building the attribute definition"
] |
private static JsonArray getJsonArray(List<String> keys) {
JsonArray array = new JsonArray();
for (String key : keys) {
array.add(key);
}
return array;
} | [
"Gets the Json Array representation of the given list of strings.\n@param keys List of strings\n@return the JsonArray represents the list of keys"
] | [
"Parses the given XML doc to extract the properties and return them into a java.util.Properties.\n@param doc to parse\n@param sectionName which section to extract\n@return Properties map",
"Make log segment file name from offset bytes. All this does is pad out the offset number\nwith zeros so that ls sorts the files numerically\n@param offset offset value (padding with zero)\n@return filename with offset",
"Returns the latest change events for a given namespace.\n\n@param namespace the namespace to get events for.\n@return the latest change events for a given namespace.",
"Use this API to fetch all the route6 resources that are configured on netscaler.",
"Set the pickers selection type.",
"Scans a path on the filesystem for resources inside the given classpath location.\n\n@param location The system-independent location on the classpath.\n@param locationUri The system-specific physical location URI.\n@return a sorted set containing all the resources inside the given location\n@throws IOException if an error accessing the filesystem happens",
"Creates the container for a bundle with descriptor.\n@return the container for a bundle with descriptor.\n@throws IOException thrown if reading the bundle fails.\n@throws CmsException thrown if reading the bundle fails.",
"Prepare a parallel HTTP POST Task.\n\n@param url\nthe UrlPostfix: e.g. in http://localhost:8080/index.html.,the url is \"/index.html\"\n@return the parallel task builder",
"Informs this sequence model that the value of the element at position pos has changed.\nThis allows this sequence model to update its internal model if desired."
] |
public void createEnterpriseCustomFieldMap(Props props, Class<?> c)
{
byte[] fieldMapData = null;
for (Integer key : ENTERPRISE_CUSTOM_KEYS)
{
fieldMapData = props.getByteArray(key);
if (fieldMapData != null)
{
break;
}
}
if (fieldMapData != null)
{
int index = 4;
while (index < fieldMapData.length)
{
//Looks like the custom fields have varying types, it may be that the last byte of the four represents the type?
//System.out.println(ByteArrayHelper.hexdump(fieldMapData, index, 4, false));
int typeValue = MPPUtility.getInt(fieldMapData, index);
FieldType type = getFieldType(typeValue);
if (type != null && type.getClass() == c && type.toString().startsWith("Enterprise Custom Field"))
{
int varDataKey = (typeValue & 0xFFFF);
FieldItem item = new FieldItem(type, FieldLocation.VAR_DATA, 0, 0, varDataKey, 0, 0);
m_map.put(type, item);
//System.out.println(item);
}
//System.out.println((type == null ? "?" : type.getClass().getSimpleName() + "." + type) + " " + Integer.toHexString(typeValue));
index += 4;
}
}
} | [
"Create a field map for enterprise custom fields.\n\n@param props props data\n@param c target class"
] | [
"Resize and return the image passing the new height and width\n\n@param height\n@param width\n@return",
"Use this API to unset the properties of snmpalarm resources.\nProperties that need to be unset are specified in args array.",
"Use this API to update sslcertkey.",
"Use this API to clear bridgetable.",
"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",
"Try to get a system property for obsolete keys. The value is automatically converted - a runtime exception may be thrown during conversion.\n\n@return all the properties whose system property keys were different in previous versions",
"Return the number of arguments associated with the specified option.\nThe return value includes the actual option.\nWill return 0 if the option is not supported.",
"Convert an Object to a DateTime, without an Exception",
"Determine if a CharSequence can be parsed as an Integer.\n\n@param self a CharSequence\n@return true if the CharSequence can be parsed\n@see #isInteger(String)\n@since 1.8.2"
] |
public ServerGroup updateServerGroupName(int serverGroupId, String name) {
ServerGroup serverGroup = null;
BasicNameValuePair[] params = {
new BasicNameValuePair("name", name),
new BasicNameValuePair("profileIdentifier", this._profileName)
};
try {
JSONObject response = new JSONObject(doPost(BASE_SERVERGROUP + "/" + serverGroupId, params));
serverGroup = getServerGroupFromJSON(response);
} catch (Exception e) {
e.printStackTrace();
return null;
}
return serverGroup;
} | [
"Update the server group's name\n\n@param serverGroupId ID of server group\n@param name new name of server group\n@return updated ServerGroup"
] | [
"Finishes the process of attaching a metadata cache file once it has been opened and validated.\n\n@param slot the slot to which the cache should be attached\n@param cache the opened, validated metadata cache file",
"Provides a type-specific Meta class for the given TinyType.\n\n@param <T> the TinyType class type\n@param candidate the TinyType class to obtain a Meta for\n@return a Meta implementation suitable for the candidate\n@throws IllegalArgumentException for null or a non-TinyType",
"Checks whether the compilation has been canceled and reports the given progress to the compiler progress.",
"resolves any lazy cross references in this resource, adding Issues for unresolvable elements to this resource.\nThis resource might still contain resolvable proxies after this method has been called.\n\n@param mon a {@link CancelIndicator} can be used to stop the resolution.",
"This method reads a four byte integer from the input stream.\n\n@param is the input stream\n@return byte value\n@throws IOException on file read error or EOF",
"Curries a function that takes two arguments.\n\n@param function\nthe original function. May not be <code>null</code>.\n@param argument\nthe fixed first argument of {@code function}.\n@return a function that takes one argument. Never <code>null</code>.",
"Returns list of files matches specified regex in specified directories\n\n@param regex to match file names\n@param directories to find\n@return list of files matches specified regex in specified directories",
"Converts a vector from eigen space into sample space.\n\n@param eigenData Eigen space data.\n@return Sample space projection.",
"Sets the position vector of the keyframe."
] |
public void removeFilter(String filterName)
{
Filter filter = getFilterByName(filterName);
if (filter != null)
{
if (filter.isTaskFilter())
{
m_taskFilters.remove(filter);
}
if (filter.isResourceFilter())
{
m_resourceFilters.remove(filter);
}
m_filtersByName.remove(filterName);
m_filtersByID.remove(filter.getID());
}
} | [
"Removes a filter from this project file.\n\n@param filterName The name of the filter"
] | [
"Look up a shaper by a short String name.\n\n@param name Shaper name. Known names have patterns along the lines of:\ndan[12](bio)?(UseLC)?, jenny1(useLC)?, chris[1234](useLC)?.\n@return An integer constant for the shaper",
"Read an optional JSON array.\n@param json the JSON Object that has the array as element\n@param key the key for the array in the provided JSON object\n@return the array or null if reading the array fails.",
"Update the Target Filter of the ImporterService.\nApply the induce modifications on the links of the ImporterService\n\n@param serviceReference",
"Returns values aggregated from all the delegates, without overriding\nvalues that already exist.\n\n@return The Map of aggregated values",
"Add the currentSceneObject to an active Level-of-Detail",
"Creates a clone using java serialization\n\n@param from Object to be cloned\n@param <T> type of the cloned object\n@return Clone of the object",
"Use this API to unset the properties of systemuser resources.\nProperties that need to be unset are specified in args array.",
"resumed a given deployment\n\n@param deployment The deployment to resume",
"Use this API to add clusterinstance resources."
] |
void close(Supplier<CentralDogmaException> failureCauseSupplier) {
requireNonNull(failureCauseSupplier, "failureCauseSupplier");
if (closePending.compareAndSet(null, failureCauseSupplier)) {
repositoryWorker.execute(() -> {
rwLock.writeLock().lock();
try {
if (commitIdDatabase != null) {
try {
commitIdDatabase.close();
} catch (Exception e) {
logger.warn("Failed to close a commitId database:", e);
}
}
if (jGitRepository != null) {
try {
jGitRepository.close();
} catch (Exception e) {
logger.warn("Failed to close a Git repository: {}",
jGitRepository.getDirectory(), e);
}
}
} finally {
rwLock.writeLock().unlock();
commitWatchers.close(failureCauseSupplier);
closeFuture.complete(null);
}
});
}
closeFuture.join();
} | [
"Waits until all pending operations are complete and closes this repository.\n\n@param failureCauseSupplier the {@link Supplier} that creates a new {@link CentralDogmaException}\nwhich will be used to fail the operations issued after this method is called"
] | [
"Returns a TypeConverter for a given class.\n\n@param cls The class for which the TypeConverter should be fetched.",
"Poll for the next N waiting jobs in line.\n\n@param size maximum amount of jobs to poll for\n@return up to \"size\" jobs",
"Delete an artifact in the Grapes server\n\n@param gavc\n@throws GrapesCommunicationException\n@throws javax.naming.AuthenticationException",
"Called when the layout is applied to the data\n@param container WidgetContainer to access the org.gearvrf.org.gearvrf.widgetlib in the layout\n@param viewPortSize View port for data set",
"Display web page, but no user interface - close",
"Finishes the process of attaching a metadata cache file once it has been opened and validated.\n\n@param slot the slot to which the cache should be attached\n@param cache the opened, validated metadata cache file",
"Append a SubQuery the SQL-Clause\n@param subQuery the subQuery value of SelectionCriteria",
"Flush output streams.",
"Set new point coordinates somewhere on screen and apply new direction\n\n@param position the point position to apply new values to"
] |
public final void reset()
{
for (int i = 0; i < combinationIndices.length; i++)
{
combinationIndices[i] = i;
}
remainingCombinations = totalCombinations;
} | [
"Reset the combination generator."
] | [
"Parse a string representation of an Integer value.\n\n@param value string representation\n@return Integer value",
"Lift a Java Func1 to a Scala Function1\n\n@param f the function to lift\n\n@returns the Scala function",
"Operations to do after all subthreads finished their work on index\n\n@param backend",
"You should use the server's time here. Otherwise you might get unexpected results.\n\nThe typical use case is:\n\n\n<pre>\nHTTPResponse response = ....\nHTTPRequest request = createRequest();\nrequest = request.conditionals(new Conditionals().ifModifiedSince(response.getLastModified());\n</pre>\n\n@param time the time to check.\n@return the conditionals with the If-Modified-Since date set.",
"Use this API to sync gslbconfig.",
"Generate the next permutation and return a list containing\nthe elements in the appropriate order.\n@see #nextPermutationAsList(java.util.List)\n@see #nextPermutationAsArray()\n@return The next permutation as a list.",
"Iterates over all tokens in current member tag with the name tagName and evaluates the body for every token.\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=\"delimiter\" description=\"delimiter for the StringTokenizer. consult javadoc for\njava.util.StringTokenizer default is ','\"\[email protected] name=\"skip\" description=\"how many tokens to skip on start\"",
"Setting the type of Checkbox.",
"Calculates the radius to a given boundedness value\n@param D Diffusion coefficient\n@param N Number of steps\n@param timelag Timelag\n@param B Boundedeness\n@return Confinement radius"
] |
public void registerComponent(java.awt.Component c)
{
unregisterComponent(c);
if (recognizerAbstractClass == null)
{
hmDragGestureRecognizers.put(c,
dragSource.createDefaultDragGestureRecognizer(c,
dragWorker.getAcceptableActions(c), dgListener)
);
}
else
{
hmDragGestureRecognizers.put(c,
dragSource.createDragGestureRecognizer (recognizerAbstractClass,
c, dragWorker.getAcceptableActions(c), dgListener)
);
}
} | [
"add a Component to this Worker. After the call dragging is enabled for this\nComponent.\n@param c the Component to register"
] | [
"Return all URI schemes that are supported in the system.",
"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.",
"Called to reset current sensor data.\n\n@param timeStamp\ncurrent time stamp\n@param rotationW\nQuaternion rotation W\n@param rotationX\nQuaternion rotation X\n@param rotationY\nQuaternion rotation Y\n@param rotationZ\nQuaternion rotation Z\n@param gyroX\nGyro rotation X\n@param gyroY\nGyro rotation Y\n@param gyroZ\nGyro rotation Z",
"Convert gallery name to not found error key.\n@param gallery gallery name for example \"downloadgallery\"\n@return key as string \"ERR_REASON_NO_DOWNLOADGALLERY_0\"",
"Returns the coupon payment of the period with the given index. The analytic model is needed in case of floating bonds.\n\n@param periodIndex The index of the period of interest.\n@param model The model under which the product is valued.\n@return The value of the coupon payment in the given period.",
"Sets a property on this Javascript object for which the value is a\nJavascript object itself.\n\n@param propertyName The name of the property.\n@param propertyValue The value of the property.",
"Adds OPT_FORMAT option to OptionParser, with one argument.\n\n@param parser OptionParser to be modified\n@param required Tells if this option is required or optional",
"Converts the passed list of inners to unmodifiable map of impls.\n@param innerList list of the inners.\n@return map of the impls",
"Get unique values form the array.\n\n@param values Array of values.\n@return Unique values."
] |
public static File[] getVersionDirs(File rootDir, final long minId, final long maxId) {
return rootDir.listFiles(new FileFilter() {
public boolean accept(File pathName) {
if(checkVersionDirName(pathName)) {
long versionId = getVersionId(pathName);
if(versionId != -1 && versionId <= maxId && versionId >= minId) {
return true;
}
}
return false;
}
});
} | [
"Returns all the version directories present in the root directory\nspecified\n\n@param rootDir The parent directory\n@param maxId The\n@return An array of version directories"
] | [
"Returns the given dialect, narrowed down to the given dialect facet in case it is implemented by the dialect.\n\n@param gridDialect the dialect of interest\n@param facetType the dialect facet type of interest\n@return the given dialect, narrowed down to the given dialect facet or {@code null} in case the given dialect\ndoes not implement the given facet",
"Convert any number class to array of integer.\n\n@param <T> Type.\n@param array Array.\n@return Integer array.",
"Return the area polygon as the only feature in the feature collection.\n\n@param mapAttributes the attributes that this aoi is part of.",
"Get User application properties\nGet application properties of a user\n@param userId User Id (required)\n@param aid Application ID (optional)\n@return PropertiesEnvelope\n@throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body",
"Informs this sequence model that the value of the whole sequence is initialized to sequence",
"Use this API to update vridparam.",
"Close the connection atomically.\n\n@return true if state changed to closed; false if nothing changed.",
"This method writes data for a single calendar to a Planner file.\n\n@param mpxjCalendar MPXJ calendar instance\n@param plannerCalendar Planner calendar instance\n@throws JAXBException on xml creation errors",
"Calculates Tangent value of the complex number.\n\n@param z1 A ComplexNumber instance.\n@return Returns new ComplexNumber instance containing the Tangent value of the specified complex number."
] |
public GetSingleConversationOptions filters(List<String> filters) {
if(filters.size() == 1) { //Canvas API doesn't want the [] if it is only one value
addSingleItem("filter", filters.get(0));
} else {
optionsMap.put("filter[]", filters);
}
return this;
} | [
"Used when setting the \"visible\" field in the response. See the \"List Conversations\" docs for details\n@param filters Filter strings to be applied to the visibility of conversations\n@return this to continue building options"
] | [
"Lookup Seam integration resource loader.\n@return the Seam integration resource loader\n@throws DeploymentUnitProcessingException for any error",
"if |a11-a22| >> |a12+a21| there might be a better way. see pg371",
"Split string content into list, ignoring matches of the pattern\n@param content String content\n@param ignorePattern Pattern to ignore\n@return list",
"This method is used by non-blocking code to determine if the give buffer\nrepresents a complete request. Because the non-blocking code can by\ndefinition not just block waiting for more data, it's possible to get\npartial reads, and this identifies that case.\n\n@param buffer Buffer to check; the buffer is reset to position 0 before\ncalling this method and the caller must reset it after the call\nreturns\n@return True if the buffer holds a complete request, false otherwise",
"Use this API to fetch cachepolicylabel_binding resource of given name .",
"This internal method is used to convert from a Date instance to an\ninteger representing the number of minutes past midnight.\n\n@param date date instance\n@return minutes past midnight as an integer",
"Triggers a replication request, blocks while the replication is in progress.\n@return ReplicationResult encapsulating the result",
"Return primary key values of given Identity object.\n\n@param cld\n@param oid\n@return Object[]\n@throws PersistenceBrokerException",
"This method maps the encoded height of a Gantt bar to\nthe height in pixels.\n\n@param height encoded height\n@return height in pixels"
] |
public static <T> List<T> copyOf(Collection<T> source) {
Preconditions.checkNotNull(source);
if (source instanceof ImmutableList<?>) {
return (ImmutableList<T>) source;
}
if (source.isEmpty()) {
return Collections.emptyList();
}
return ofInternal(source.toArray());
} | [
"Creates an immutable list that consists of the elements in the given collection. If the given collection is already an immutable list,\nit is returned directly.\n\n@param source the given collection\n@return an immutable list"
] | [
"Use this API to update nsip6.",
"This method converts an offset value into an array index, which in\nturn allows the data present in the fixed block to be retrieved. Note\nthat if the requested offset is not found, then this method returns -1.\n\n@param offset Offset of the data in the fixed block\n@return Index of data item within the fixed data block",
"Helper method that encapsulates the minimum logic for adding a job to a\nqueue.\n\n@param jedis\nthe connection to Redis\n@param namespace\nthe Resque namespace\n@param queue\nthe Resque queue name\n@param jobJson\nthe job serialized as JSON",
"Constraint that ensures that the proxy-prefetching-limit has a valid value.\n\n@param def The descriptor (class, reference, collection)\n@param checkLevel The current check level (this constraint is checked in basic and strict)",
"Delete any log segments matching the given predicate function\n\n@throws IOException",
"Pops the top event off the current event stack. This action has to be\nperformed immediately after the event has been dispatched to all\nlisteners.\n\n@param <L> Type of the listener.\n@param expected The Event which is expected at the top of the stack.\n@see #pushEvent(Event)",
"Returns a list of metadata property paths.\n@return the list of metdata property paths.",
"Use this API to disable nsacl6 resources of given names.",
"Resolves current full path with .yml and .yaml extensions\n\n@param fullpath\nwithout extension.\n\n@return Path of existing definition or null"
] |
public static SPIProviderResolver getInstance(ClassLoader cl)
{
SPIProviderResolver resolver = (SPIProviderResolver)ServiceLoader.loadService(SPIProviderResolver.class.getName(), DEFAULT_SPI_PROVIDER_RESOLVER, cl);
return resolver;
} | [
"Get the SPIProviderResolver instance using the provided classloader for lookup\n\n@param cl classloader to use for lookup\n@return instance of this class"
] | [
"Returns true if we should skip this bar, i.e. the bar only has a single child task.\n\n@param row bar row to test\n@return true if this bar should be skipped",
"Add a \"post-run\" dependent task item for this task item.\n\n@param dependent the \"post-run\" dependent task item.\n@return key to be used as parameter to taskResult(string) method to retrieve result of root\ntask in the given dependent task group",
"Calculate the value of a CMS strike using the Black-Scholes model for the swap rate together with\nthe Hunt-Kennedy convexity adjustment.\n\n@param forwardSwaprate The forward swap rate\n@param volatility Volatility of the log of the swap rate\n@param swapAnnuity The swap annuity\n@param optionMaturity The option maturity\n@param swapMaturity The swap maturity\n@param payoffUnit The payoff unit, e.g., the discount factor corresponding to the payment date\n@param optionStrike The option strike\n@return Value of the CMS strike",
"This method is called to format a relation list.\n\n@param value relation list instance\n@return formatted relation list",
"1.0 version of parser is different at simple mapperParser",
"Resolves a conflict between a synchronized document's local and remote state. The resolution\nwill result in either the document being desynchronized or being replaced with some resolved\nstate based on the conflict resolver specified for the document. Uses the last uncommitted\nlocal event as the local state.\n\n@param nsConfig the namespace synchronization config of the namespace where the document\nlives.\n@param docConfig the configuration of the document that describes the resolver and current\nstate.\n@param remoteEvent the remote change event that is conflicting.",
"Evalutes AND and OR operators.\n\n@param container data context\n@param promptValues responses to prompts\n@return operator result",
"Use this API to fetch vpnvserver_appcontroller_binding resources of given name .",
"Split a span into two by adding a knot in the middle.\n@param n the span index"
] |
protected void emitWithBurstCheck(float[] particlePositions, float[] particleVelocities,
float[] particleTimeStamps)
{
if ( burstMode )
{
if ( executeOnce )
{
emit(particlePositions, particleVelocities, particleTimeStamps);
executeOnce = false;
}
}
else
{
emit(particlePositions, particleVelocities, particleTimeStamps);
}
} | [
"If the burst mode is on, emit the particles only once.\n\n@param particlePositions\n@param particleVelocities\n@param particleTimeStamps"
] | [
"Hides the original Java-style method name using an attribute\nwhich should be respected by Visual Studio, the creates a new\nwrapper method using a .Net style method name.\n\nNote that this does not work for VB as it is case insensitive. Even\nthough Visual Studio won't show you the Java-style method name,\nthe VB compiler sees both and thinks they are the same... which\ncauses it to fail.\n\n@param writer output stream\n@param aClass class being processed\n@param methodSet set of methods which have been processed.\n@throws XMLStreamException",
"Append Join for SQL92 Syntax without parentheses",
"Returns values aggregated from all the delegates, without overriding\nvalues that already exist.\n\n@return The Map of aggregated values",
"Within a single zone, swaps one random partition on one random node with\nanother random partition on different random node.\n\n@param nextCandidateCluster\n@param zoneId Zone ID within which to shuffle partitions\n@return updated cluster",
"Add a content modification.\n\n@param modification the content modification",
"Callback when each frame in the indicator animation should be drawn.",
"Formats a logging event to a writer.\n\n@param event\nlogging event to be formatted.",
"Parse priority.\n\n\n@param priority priority value\n@return Priority instance",
"Create a container in the platform\n\n@param container\nThe name of the container"
] |
private void updateMaxMin(IntervalRBTreeNode<T> n, IntervalRBTreeNode<T> c) {
if (c != null) {
if (n.max < c.max) {
n.max = c.max;
}
if (n.min > c.min) {
n.min = c.min;
}
}
} | [
"Update max min.\n\n@param n the n\n@param c the c"
] | [
"Called by determineHead and may be overridden in subclasses\nif special treatment is necessary for particular categories.",
"Whether the address is IPv4-mapped\n\n::ffff:x:x/96 indicates IPv6 address mapped to IPv4",
"Tests correctness.",
"Print a date.\n\n@param value Date instance\n@return string representation of a date",
"Sets the Base Calendar field indicates which calendar is the base calendar\nfor a resource calendar. The list includes the three built-in calendars,\nas well as any new base calendars you have created in the Change Working\nTime dialog box.\n\n@param val calendar name",
"Creates a resource key with given id for bundle specified by given class.\n@param clazz the class owning the bundle.\n@param id value identifier\n@return the resource key",
"Return the name of the current conf set\n@return the conf set name",
"Convert the Primavera string representation of a UUID into a Java UUID instance.\n\n@param value Primavera UUID\n@return Java UUID instance",
"Initializes the alarm sensor command class. Requests the supported alarm types."
] |
public <S extends AddressSegment> void getSplitSegments(S segs[], int index, AddressSegmentCreator<S> creator) {
if(!isMultiple()) {
int bitSizeSplit = IPv6Address.BITS_PER_SEGMENT >>> 1;
Integer myPrefix = getSegmentPrefixLength();
Integer highPrefixBits = getSplitSegmentPrefix(bitSizeSplit, myPrefix, 0);
Integer lowPrefixBits = getSplitSegmentPrefix(bitSizeSplit, myPrefix, 1);
if(index >= 0 && index < segs.length) {
segs[index] = creator.createSegment(highByte(), highPrefixBits);
}
if(++index >= 0 && index < segs.length) {
segs[index] = creator.createSegment(lowByte(), lowPrefixBits);
}
} else {
getSplitSegmentsMultiple(segs, index, creator);
}
} | [
"Converts this IPv6 address segment into smaller segments,\ncopying them into the given array starting at the given index.\n\nIf a segment does not fit into the array because the segment index in the array is out of bounds of the array,\nthen it is not copied.\n\n@param segs\n@param index"
] | [
"Over simplistic helper to compare two strings to check radio buttons.\n\n@param value1 the first value\n@param value2 the second value\n@return \"checked\" if both values are equal, the empty String \"\" otherwise",
"Generate the body of a toString method that uses plain concatenation.\n\n<p>Conventionally, we join properties with comma separators. If all of the properties are\nalways present, this can be done with a long block of unconditional code. We could use a\nStringBuilder for this, but in fact the Java compiler will do this for us under the hood\nif we use simple string concatenation, so we use the more readable approach.",
"This function compares style ID's between features. Features are usually sorted by style.",
"Sets the package pattern to match against.",
"Checks if the selected template context is \"templatemapper\".\n\n@param request the current request\n@return true if the selected template context is \"templatemapper\"",
"Return true if the processor of the node has previously been executed.\n\n@param processorGraphNode the node to test.",
"Use this API to unset the properties of sslcertkey resource.\nProperties that need to be unset are specified in args array.",
"Set the week day.\n@param weekDayStr the week day to set.",
"This can be called to adjust the size of the dialog glass. It\nis implemented using JSNI to bypass the \"private\" keyword on\nthe glassResizer."
] |
public RenderScript getRenderScript() {
if (renderScript == null) {
renderScript = RenderScript.create(context, renderScriptContextType);
}
return renderScript;
} | [
"Syncronously creates a Renderscript context if none exists.\nCreating a Renderscript context takes about 20 ms in Nexus 5\n\n@return"
] | [
"Obtains the transform for a specific time in animation.\n\n@param animationTime The time in animation.\n\n@return The transform.",
"Find out the scrollable child view from a ViewGroup.\n\n@param viewGroup",
"Populate data for analytics.",
"Curries a procedure that takes two arguments.\n\n@param procedure\nthe original procedure. May not be <code>null</code>.\n@param argument\nthe fixed first argument of {@code procedure}.\n@return a procedure that takes one argument. Never <code>null</code>.",
"Populates default settings.\n\n@param record MPX record\n@param properties project properties\n@throws MPXJException",
"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",
"Converts the transpose of a row major matrix into a row major block matrix.\n\n@param src Original DMatrixRMaj. Not modified.\n@param dst Equivalent DMatrixRBlock. Modified.",
"Read the projects from a ConceptDraw PROJECT file as top level tasks.\n\n@param cdp ConceptDraw PROJECT file",
"Group results by the specified field.\n\n@param fieldName by which to group results\n@param isNumber whether field isNumeric.\n@return this for additional parameter setting or to query"
] |
public Set<String> getSupportedUriSchemes() {
Set<String> schemes = new HashSet<>();
for (ConfigFileLoaderPlugin loaderPlugin: this.getLoaderPlugins()) {
schemes.add(loaderPlugin.getUriScheme());
}
return schemes;
} | [
"Return all URI schemes that are supported in the system."
] | [
"Removes the given row.\n\n@param row the row to remove",
"Add a console pipeline to the Redwood handler tree,\nprinting to stderr.\nCalling this multiple times will result in messages being printed\nmultiple times.\n@return this",
"Triggers a new search with the given text.\n\n@param query the text to search for.",
"not start with another option name",
"Computes the longest common contiguous substring of s and t.\nThe LCCS is the longest run of characters that appear consecutively in\nboth s and t. For instance, the LCCS of \"color\" and \"colour\" is 4, because\nof \"colo\".",
"Update the installed identity using the modified state from the modification.\n\n@param name the identity name\n@param modification the modification\n@param state the installation state\n@return the installed identity",
"Constructs the appropriate MenuDrawer based on the position.",
"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",
"Get the Attribute metadata for an MBean by name.\n@return the {@link Map} of {@link String} attribute names to {@link MBeanAttributeInfo} values."
] |
public static Command newStartProcess(String processId,
Map<String, Object> parameters) {
return getCommandFactoryProvider().newStartProcess( processId,
parameters );
} | [
"Start a process using the given parameters.\n\n@param processId\n@param parameters\n@return"
] | [
"Vend a SessionVar with the function to create the default value",
"Merge the contents of the given plugin.xml into this one.",
"Retrieves the formatted parent WBS value.\n\n@return formatted parent WBS value",
"Configs created by this ConfigBuilder will use the given Redis master name.\n\n@param masterName the Redis set of sentinels\n@return this ConfigBuilder",
"Writes and reads the XOP attachment using a CXF JAX-RS Proxy\nThe proxy automatically sets the \"mtom-enabled\" property by checking\nthe CXF EndpointProperty set on the XopAttachment interface.\n\n@throws Exception",
"Returns the coordinates of the vertex points of this hull.\n\n@param coords\nreturns the x, y, z coordinates of each vertex. This length of\nthis array must be at least three times the number of\nvertices.\n@return the number of vertices\n@see QuickHull3D#getVertices()\n@see QuickHull3D#getFaces()",
"Use this API to add nsacl6.",
"Prepare a parallel PING Task.\n\n@return the parallel task builder",
"Converts the text stream data to HTML form.\n\n@param content the content to convert\n@return the HTML version of the content"
] |
public static double Entropy( int[] values ){
int n = values.length;
int total = 0;
double entropy = 0;
double p;
// calculate total amount of hits
for ( int i = 0; i < n; i++ )
{
total += values[i];
}
if ( total != 0 )
{
// for all values
for ( int i = 0; i < n; i++ )
{
// get item's probability
p = (double) values[i] / total;
// calculate entropy
if ( p != 0 )
entropy += ( -p * (Math.log10(p)/Math.log10(2)) );
}
}
return entropy;
} | [
"Calculate entropy value.\n@param values Values.\n@return Returns entropy value of the specified histogram array."
] | [
"Extracts a flat set of interception bindings from a given set of interceptor bindings.\n\n@param addTopLevelInterceptorBindings add top level interceptor bindings to the result set.\n@param addInheritedInterceptorBindings add inherited level interceptor bindings to the result set.\n@return",
"returns an Enumeration of PrimaryKey Objects for objects of class DataClass.\nThe Elements returned come from a SELECT ... WHERE Statement\nthat is defined by the fields and their coresponding values of listFields\nand listValues.\nUseful for EJB Finder Methods...\n@param primaryKeyClass the pk class for the searched objects\n@param query the query",
"Set the default host running the Odo instance to configure. Allows default profile methods and PathValueClient to\noperate on remote hosts\n\n@param hostName name of host",
"Assign an ID value to this field.",
"Handles the change of a value in the current translation.\n@param propertyId the property id of the column where the value has changed.",
"Created a fresh CancelIndicator",
"Convert from Hadoop Text to Bytes",
"Process a device update once it has been received. Track it as the most recent update from its address,\nand notify any registered listeners, including master listeners if it results in changes to tracked state,\nsuch as the current master player and tempo. Also handles the Baroque dance of handing off the tempo master\nrole from or to another device.",
"Figure out, based on how much time has elapsed since we received an update, and the playback position,\nspeed, and direction at the time of that update, where the player will be now.\n\n@param update the most recent update received from a player\n@param currentTimestamp the nanosecond timestamp representing when we want to interpolate the track's position\n\n@return the playback position we believe that player has reached now"
] |
public static base_response save(nitro_service client, cachecontentgroup resource) throws Exception {
cachecontentgroup saveresource = new cachecontentgroup();
saveresource.name = resource.name;
return saveresource.perform_operation(client,"save");
} | [
"Use this API to save cachecontentgroup."
] | [
"Checks if the categoryfolder setting needs to be updated.\n\n@return true if the categoryfolder setting needs to be updated",
"Writes a number to the specified byte array field, breaking it into its component bytes in big-endian order.\nIf the number is too large to fit in the specified number of bytes, only the low-order bytes are written.\n\n@param number the number to be written to the array\n@param buffer the buffer to which the number should be written\n@param start where the high-order byte should be written\n@param length how many bytes of the number should be written",
"Adds a type to collection with inheriting base type properties.\n\n@param type the type definition to add\n\n@return true if the type definition was added",
"low level http operations",
"Updates the information about this collaboration with any info fields that have been modified locally.\n\n@param info the updated info.",
"Randomize the gradient.",
"Accessor method used to retrieve an Rate object representing the\ncontents of an individual field. If the field does not exist in the\nrecord, null is returned.\n\n@param field the index number of the field to be retrieved\n@return the value of the required field\n@throws MPXJException normally thrown when parsing fails",
"Print a work contour.\n\n@param value WorkContour instance\n@return work contour value",
"Return an artifact regarding its gavc\n\n@param gavc String\n@return DbArtifact"
] |
public void orderSets(String[] photosetIds) throws FlickrException {
Map<String, Object> parameters = new HashMap<String, Object>();
parameters.put("method", METHOD_ORDER_SETS);
;
parameters.put("photoset_ids", StringUtilities.join(photosetIds, ","));
Response response = transportAPI.post(transportAPI.getPath(), parameters, apiKey, sharedSecret);
if (response.isError()) {
throw new FlickrException(response.getErrorCode(), response.getErrorMessage());
}
} | [
"Set the order in which sets are returned for the user.\n\nThis method requires authentication with 'write' permission.\n\n@param photosetIds\nAn array of Ids\n@throws FlickrException"
] | [
"Use this API to export appfwlearningdata resources.",
"Checks whether a property can be added to a Properties.\n\n@param typeManager\n@param properties the properties object\n@param typeId the type id\n@param filter the property filter\n@param id the property id\n\n@return true if the property should be added",
"Finish configuration.",
"Sanity checks the input or declares a new matrix. Return matrix is an identity matrix.",
"Enable the use of the given controller type by\nadding it to the cursor controller types list.\n@param controllerType GVRControllerType to add to the list",
"Calculate the value of a swaption assuming the Black'76 model.\n\n@param forwardSwaprate The forward (spot)\n@param volatility The Black'76 volatility.\n@param optionMaturity The option maturity.\n@param optionStrike The option strike.\n@param swapAnnuity The swap annuity corresponding to the underlying swap.\n@return Returns the value of a Swaption under the Black'76 model",
"Reads an argument of type \"number\" from the request.",
"Builds the path for a closed arc, returning a PolygonOptions that can be\nfurther customised before use.\n\n@param center\n@param start\n@param end\n@param arcType Pass in either ArcType.CHORD or ArcType.ROUND\n@return PolygonOptions with the paths element populated.",
"Use this API to fetch all the systemcore resources that are configured on netscaler."
] |
protected boolean hasVectorClock(boolean isVectorClockOptional) {
boolean result = false;
String vectorClockHeader = this.request.getHeader(RestMessageHeaders.X_VOLD_VECTOR_CLOCK);
if(vectorClockHeader != null) {
ObjectMapper mapper = new ObjectMapper();
try {
VectorClockWrapper vcWrapper = mapper.readValue(vectorClockHeader,
VectorClockWrapper.class);
this.parsedVectorClock = new VectorClock(vcWrapper.getVersions(),
vcWrapper.getTimestamp());
result = true;
} catch(Exception e) {
logger.error("Exception while parsing and constructing vector clock", e);
RestErrorHandler.writeErrorResponse(this.messageEvent,
HttpResponseStatus.BAD_REQUEST,
"Invalid Vector Clock");
}
} else if(!isVectorClockOptional) {
logger.error("Error when validating request. Missing Vector Clock");
RestErrorHandler.writeErrorResponse(this.messageEvent,
HttpResponseStatus.BAD_REQUEST,
"Missing Vector Clock");
} else {
result = true;
}
return result;
} | [
"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"
] | [
"Creates an object instance from the Groovy resource\n\n@param resource the Groovy resource to parse\n@return An Object instance",
"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}",
"Give an embedded association, creates all the nodes and relationships required to represent it.\nIt assumes that the entity node containing the association already exists in the db.\n\n@param executionEngine the {@link GraphDatabaseService} to run the query\n@param associationKey the {@link AssociationKey} identifying the association\n@param embeddedKey the {@link EntityKey} identifying the embedded component\n@return the created {@link Relationship} that represents the association",
"Get the original-image using the specified URL suffix.\n\n@deprecated\n@see PhotosInterface#getImage(Photo, int)\n@param suffix\nThe URL suffix, including the .extension\n@return The BufferedImage object\n@throws IOException\n@throws FlickrException",
"changes the color of the image - more red and less blue\n\n@return new pixel array",
"Create a Vendor from a Callable",
"Returns an array of non-empty ids from the given list of ids or values.\n\n@param idsOrValues\nlist of ids and/or values\n@return array of non-empty ids",
"Converts assignment duration values from minutes to hours.\n\n@param list assignment data",
"Get an InputStream for the original image. Callers must close the stream upon completion.\n\n@deprecated\n@see PhotosInterface#getImageAsStream(Photo, int)\n@return The InputStream\n@throws IOException"
] |
@SuppressWarnings("SameParameterValue")
private void assembleAndSendPacket(Util.PacketType kind, byte[] payload, InetAddress destination, int port) throws IOException {
DatagramPacket packet = Util.buildPacket(kind,
ByteBuffer.wrap(announcementBytes, DEVICE_NAME_OFFSET, DEVICE_NAME_LENGTH).asReadOnlyBuffer(),
ByteBuffer.wrap(payload));
packet.setAddress(destination);
packet.setPort(port);
socket.get().send(packet);
} | [
"Finish the work of building and sending a protocol packet.\n\n@param kind the type of packet to create and send\n@param payload the content which will follow our device name in the packet\n@param destination where the packet should be sent\n@param port the port to which the packet should be sent\n\n@throws IOException if there is a problem sending the packet"
] | [
"Get the bar size.\n\n@param settings Parameters for rendering the scalebar.",
"Acquires a read lock on a specific key.\n@param key The key to lock\n@param timeout in milliseconds; -1 means wait indefinitely, 0 means no wait.",
"Create content assist proposals and pass them to the given acceptor.",
"Add a \"post-run\" dependent task item for this task item.\n\n@param dependent the \"post-run\" dependent task item.\n@return key to be used as parameter to taskResult(string) method to retrieve result of root\ntask in the given dependent task group",
"Request the list of all tracks in the specified slot, given a dbserver connection to a player that has already\nbeen set up.\n\n@param slot identifies the media slot we are querying\n@param client the dbserver client that is communicating with the appropriate player\n\n@return the retrieved track list entry items\n\n@throws IOException if there is a communication problem\n@throws InterruptedException if the thread is interrupted while trying to lock the client for menu operations\n@throws TimeoutException if we are unable to lock the client for menu operations",
"Removes file from your assembly.\n\n@param name field name of the file to remove.",
"Use this API to fetch all the nsip6 resources that are configured on netscaler.",
"Extract site path, base name and locale from the resource opened with the editor.",
"Gets a tokenizer from a reader."
] |
public void setScale(final float scale) {
if (equal(mScale, scale) != true) {
Log.d(TAG, "setScale(): old: %.2f, new: %.2f", mScale, scale);
mScale = scale;
setScale(mSceneRootObject, scale);
setScale(mMainCameraRootObject, scale);
setScale(mLeftCameraRootObject, scale);
setScale(mRightCameraRootObject, scale);
for (OnScaledListener listener : mOnScaledListeners) {
try {
listener.onScaled(scale);
} catch (Exception e) {
e.printStackTrace();
Log.e(TAG, e, "setScale()");
}
}
}
} | [
"Scale all widgets in Main Scene hierarchy\n@param scale"
] | [
"Returns a BoxStoragePolicyAssignment information.\n@param api the API connection to be used by the resource.\n@param resolvedForType the assigned entity type for the storage policy.\n@param resolvedForID the assigned entity id for the storage policy.\n@return information about this {@link BoxStoragePolicyAssignment}.",
"Starts the loading process and creates a timer that sets of the callback after a given tiime if it hasn't already been triggered.\n\n@param timeout number of milliseconds after which the callback should be called if it hasn't already been",
"Retrieve the number of minutes per year for this calendar.\n\n@return minutes per year",
"Decode PKWare Compression Library stream.\n\nFormat notes:\n\n- First byte is 0 if literals are uncoded or 1 if they are coded. Second\nbyte is 4, 5, or 6 for the number of extra bits in the distance code.\nThis is the base-2 logarithm of the dictionary size minus six.\n\n- Compressed data is a combination of literals and length/distance pairs\nterminated by an end code. Literals are either Huffman coded or\nuncoded bytes. A length/distance pair is a coded length followed by a\ncoded distance to represent a string that occurs earlier in the\nuncompressed data that occurs again at the current location.\n\n- A bit preceding a literal or length/distance pair indicates which comes\nnext, 0 for literals, 1 for length/distance.\n\n- If literals are uncoded, then the next eight bits are the literal, in the\nnormal bit order in the stream, i.e. no bit-reversal is needed. Similarly,\nno bit reversal is needed for either the length extra bits or the distance\nextra bits.\n\n- Literal bytes are simply written to the output. A length/distance pair is\nan instruction to copy previously uncompressed bytes to the output. The\ncopy is from distance bytes back in the output stream, copying for length\nbytes.\n\n- Distances pointing before the beginning of the output data are not\npermitted.\n\n- Overlapped copies, where the length is greater than the distance, are\nallowed and common. For example, a distance of one and a length of 518\nsimply copies the last byte 518 times. A distance of four and a length of\ntwelve copies the last four bytes three times. A simple forward copy\nignoring whether the length is greater than the distance or not implements\nthis correctly.\n\n@param input InputStream instance\n@param output OutputStream instance\n@return status code",
"Search for rectangles which have the same width and x position, and\nwhich join together vertically and merge them together to reduce the\nnumber of rectangles needed to describe a symbol.",
"Given a cluster and a node id checks if the node exists\n\n@param nodeId The node id to search for\n@return True if cluster contains the node id, else false",
"Convert one project file format to another.\n\n@param inputFile input file\n@param outputFile output file\n@throws Exception",
"Deserializes a variable, checking whether the datatype is custom or not\n@param s\n@param variableType\n@param dataTypes\n@return",
"Returns whether the given host matches this one. For hosts to match, they must represent the same addresses or have the same host names.\nHosts are not resolved when matching. Also, hosts must have the same port and service. They must have the same masks if they are host names.\nEven if two hosts are invalid, they match if they have the same invalid string.\n\n@param host\n@return"
] |
public void setFloatAttribute(String name, Float value) {
ensureValue();
Attribute attribute = new FloatAttribute(value);
attribute.setEditable(isEditable(name));
getValue().getAllAttributes().put(name, attribute);
} | [
"Sets the specified float attribute to the specified value.\n\n@param name name of the attribute\n@param value value of the attribute\n@since 1.9.0"
] | [
"Set the named arguments.\n\n@param vars\nthe new named arguments",
"Determine if a CharSequence can be parsed as a Double.\n\n@param self a CharSequence\n@return true if the CharSequence can be parsed\n@see #isDouble(String)\n@since 1.8.2",
"Use this API to unset the properties of bridgetable resource.\nProperties that need to be unset are specified in args array.",
"Overrides the superclass implementation to allow the value type's AttributeDefinition to in turn\nresolve each element.\n\n{@inheritDoc}",
"Format a cue countdown indicator in the same way as the CDJ would at this point in the track.\n\n@return the value that the CDJ would display to indicate the distance to the next cue\n@see #getCueCountdown()",
"End building the script\n@param config the configuration for the script to build\n@return the new {@link LuaScript} instance",
"Method that takes an inputstream, read it preserving the end lines, and subtitute using commons-lang-3 calls\nthe variables, first searching as system properties vars and then in environment var list.\nIn case of missing the property is replaced by white space.\n@param stream\n@return",
"Updates the polling state from a DELETE or POST operation.\n\n@param response the response from Retrofit REST call\n@throws IOException thrown by deserialization",
"Compute the CRC32 of the segment of the byte array given by the\nspecificed size and offset\n\n@param bytes The bytes to checksum\n@param offset the offset at which to begin checksumming\n@param size the number of bytes to checksum\n@return The CRC32"
] |
public static base_response flush(nitro_service client, nssimpleacl resource) throws Exception {
nssimpleacl flushresource = new nssimpleacl();
flushresource.estsessions = resource.estsessions;
return flushresource.perform_operation(client,"flush");
} | [
"Use this API to flush nssimpleacl."
] | [
"Helper method fro providers to fire hotkey event in a separate thread\n\n@param hotKey hotkey to fire",
"Register the given Converter objects with the given target ConverterRegistry.\n@param converters the converter objects: implementing {@link Converter},\n{@link ConverterFactory}, or {@link GenericConverter}\n@param registry the target registry",
"Do some magic to turn request parameters into a context object",
"Use this API to fetch statistics of streamidentifier_stats resource of given name .",
"The % Work Complete field contains the current status of a task,\nexpressed as the percentage of the task's work that has been completed.\nYou can enter percent work complete, or you can have Microsoft Project\ncalculate it for you based on actual work on the task.\n\n@return percentage as float",
"delete of files more than 1 day old",
"Read all task relationships from a GanttProject.\n\n@param gpProject GanttProject project",
"Close all HTTP clients created by this factory\n@throws IOException if an I/O error occurs",
"return a generic Statement for the given ClassDescriptor"
] |
public int getVersion() {
ResultSet resultSet = session.execute(format(VERSION_QUERY, getTableName()));
Row result = resultSet.one();
if (result == null) {
return 0;
}
return result.getInt(0);
} | [
"Gets the current version of the database schema. This version is taken\nfrom the migration table and represent the latest successful entry.\n\n@return the current schema version"
] | [
"Remove a management request handler factory from this context.\n\n@param instance the request handler factory\n@return {@code true} if the instance was removed, {@code false} otherwise",
"Retrieves and validates the content type from the REST requests\n\n@return true if has content type.",
"Launches the client with the specified parameters.\n\n@param args\ncommand line parameters\n@throws ParseException\n@throws IOException",
"currently does not support paths with name constrains",
"create a consumer\n\n@param zookeeperConfig connect config of zookeeper; ex: 127.0.0.1:2181/jafka\n@param topic the topic to be watched\n@param groupId grouping the consumer clients\n@param listener message listener\n@return the real consumer",
"Attempts to insert a colon so that a value without a colon can\nbe parsed.",
"Gets the groupby for ReportQueries of all Criteria and Sub Criteria\nthe elements are of class FieldHelper\n@return List of FieldHelper",
"Checks each available roll strategy in turn, starting at the per-minute\nstrategy, next per-hour, and so on for increasing units of time until a\nmatch is found. If no match is found, the error strategy is returned.\n\n@param properties\n@return The appropriate roll strategy.",
"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"
] |
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"
] | [
"Use this API to fetch all the bridgetable resources that are configured on netscaler.",
"Generate date patterns based on the project configuration.\n\n@param properties project properties\n@return date patterns",
"Performs the filtering of the expired entries based on retention time.\nOptionally, deletes them also\n\n@param key the key whose value is to be deleted if needed\n@param vals set of values to be filtered out\n@return filtered list of values which are currently valid",
"Adapt a file path to the current file system.\n@param filePath The input file path string.\n@return File path compatible with the file system of this {@link GVRResourceVolume}.",
"Get the short exception message using the requested locale. This does not include the cause exception message.\n\n@param locale locale for message\n@return (short) exception message",
"Use this API to fetch csvserver_cspolicy_binding resources of given name .",
"Queries a Search Index and returns grouped results in a map where key\nof the map is the groupName. In case the query didnt use grouping,\nan empty map is returned\n\n@param <T> Object type T\n@param query the Lucene query to be passed to the Search index\n@param classOfT The class of type T\n@return The result of the grouped search query as a ordered {@code Map<String,T> }",
"Returns the default hidden preference for the user.\n\n@return boolean hidden or not\n@throws FlickrException",
"Returns a PreparedStatementCreator that returns a page of the underlying\nresult set.\n\n@param dialect\nDatabase dialect to use.\n@param limit\nMaximum number of rows to return.\n@param offset\nIndex of the first row to return."
] |
private void cascadeInsertFor(ObjectEnvelope mod, List alreadyPrepared)
{
// avoid endless recursion, so use List for registration
if(alreadyPrepared.contains(mod.getIdentity())) return;
alreadyPrepared.add(mod.getIdentity());
ClassDescriptor cld = getTransaction().getBroker().getClassDescriptor(mod.getObject().getClass());
List refs = cld.getObjectReferenceDescriptors(true);
cascadeInsertSingleReferences(mod, refs, alreadyPrepared);
List colls = cld.getCollectionDescriptors(true);
cascadeInsertCollectionReferences(mod, colls, alreadyPrepared);
} | [
"Walk through the object graph of the specified insert object. Was used for\nrecursive object graph walk."
] | [
"Get a collection of all of the user's groups.\n\n@return A Collection of Group objects\n@throws FlickrException",
"Extract data for a single task.\n\n@param parent task parent\n@param row Synchro task data",
"This is the main entry point used to convert the internal representation\nof timephased work into an external form which can\nbe displayed to the user.\n\n@param projectCalendar calendar used by the resource assignment\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",
"Returns all factory instances that match the query.\n\n@param query the factory query, not null.\n@return the instances found, never null.",
"Add the string representation of the given object to this sequence immediately. That is, all the trailing\nwhitespace of this sequence will be ignored and the string is appended directly after the last segment that\ncontains something besides whitespace. The given indentation will be prepended to each line except the first one\nif 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>.",
"Adds an extent relation to the current class definition.\n\n@param attributes The attributes of the tag\n@return An empty string\n@exception XDocletException If an error occurs\[email protected] type=\"content\"\[email protected] name=\"name\" optional=\"false\" description=\"The fully qualified name of the extending\nclass\"",
"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",
"Examines the error data returned from Facebook and throws the most applicable exception.\n@param errorDetails a Map containing a \"type\" and a \"message\" corresponding to the Graph API's error response structure.",
"Update the underlying buffer using the short\n\n@param number number to be stored in checksum buffer"
] |
private static RemoteWebDriver buildRemoteWebDriver(String hubUrl) {
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setPlatform(Platform.ANY);
URL url;
try {
url = new URL(hubUrl);
} catch (MalformedURLException e) {
LOGGER.error("The given hub url of the remote server is malformed can not continue!",
e);
return null;
}
HttpCommandExecutor executor = null;
try {
executor = new HttpCommandExecutor(url);
} catch (Exception e) {
// TODO Stefan; refactor this catch, this will definitely result in
// NullPointers, why
// not throw RuntimeException direct?
LOGGER.error(
"Received unknown exception while creating the "
+ "HttpCommandExecutor, can not continue!",
e);
return null;
}
return new RemoteWebDriver(executor, capabilities);
} | [
"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."
] | [
"Use this API to fetch snmpalarm resource of given name .",
"Get the element at the index as a json array.\n\n@param i the index of the element to access",
"Fetches a list of available photo licenses for Flickr.\n\nThis method does not require authentication.\n\n@return A collection of License objects\n@throws FlickrException",
"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>",
"Use this API to fetch wisite_binding resource of given name .",
"Copies entries in the source map to target map.\n\n@param source source map\n@param target target map",
"This method extracts assignment data from an MSPDI file.\n\n@param project Root node of the MSPDI file",
"Reads filter parameters.\n\n@param params the params\n@return the criterias",
"Sets the elements of this vector to uniformly distributed random values\nin a specified range, using a supplied random number generator.\n\n@param lower\nlower random value (inclusive)\n@param upper\nupper random value (exclusive)\n@param generator\nrandom number generator"
] |
public void rollback() throws GitAPIException {
try (Git git = getGit()) {
git.reset().setMode(ResetCommand.ResetType.HARD).setRef(HEAD).call();
}
} | [
"Reset hard on HEAD.\n\n@throws GitAPIException"
] | [
"This method extracts byte arrays from the embedded object data\nand converts them into RTFEmbeddedObject instances, which\nit then adds to the supplied list.\n\n@param offset offset into the RTF document\n@param text RTF document\n@param objects destination for RTFEmbeddedObject instances\n@return new offset into the RTF document",
"Use this API to fetch csvserver_appflowpolicy_binding resources of given name .",
"Returns the y-coordinate of a vertex normal.\n\n@param vertex the vertex index\n@return the y coordinate",
"Creates a new immutable set that consists of given elements.\n\n@param elements the given elements\n@return a new immutable set that consists of given elements",
"Put a value if and only if the map has not changed since the given snapshot was taken. If the put fails,\nit is the caller's responsibility to retry.\n\n@param instance the instance with the map field\n@param key the key\n@param value the value\n@param snapshot the map snapshot\n@return {@code false} if the snapshot is out of date and we could not update, {@code true} if the put succeeded",
"Build a valid datastore URL.",
"makes object obj persistent to the Objectcache under the key oid.",
"Use this API to unset the properties of nstimeout resource.\nProperties that need to be unset are specified in args array.",
"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"
] |
private void executeRequest(HttpMethod httpMethodProxyRequest,
HttpServletRequest httpServletRequest,
PluginResponse httpServletResponse,
History history) throws Exception {
int intProxyResponseCode = 999;
// Create a default HttpClient
HttpClient httpClient = new HttpClient();
HttpState state = new HttpState();
try {
httpMethodProxyRequest.setFollowRedirects(false);
ArrayList<String> headersToRemove = getRemoveHeaders();
httpClient.getParams().setSoTimeout(60000);
httpServletRequest.setAttribute("com.groupon.odo.removeHeaders", headersToRemove);
// exception handling for httpclient
HttpMethodRetryHandler noretryhandler = new HttpMethodRetryHandler() {
public boolean retryMethod(
final HttpMethod method,
final IOException exception,
int executionCount) {
return false;
}
};
httpMethodProxyRequest.getParams().setParameter(HttpMethodParams.RETRY_HANDLER, noretryhandler);
intProxyResponseCode = httpClient.executeMethod(httpMethodProxyRequest.getHostConfiguration(), httpMethodProxyRequest, state);
} catch (Exception e) {
// Return a gateway timeout
httpServletResponse.setStatus(504);
httpServletResponse.setHeader(Constants.HEADER_STATUS, "504");
httpServletResponse.flushBuffer();
return;
}
logger.info("Response code: {}, {}", intProxyResponseCode,
HttpUtilities.getURL(httpMethodProxyRequest.getURI().toString()));
// Pass the response code back to the client
httpServletResponse.setStatus(intProxyResponseCode);
// Pass response headers back to the client
Header[] headerArrayResponse = httpMethodProxyRequest.getResponseHeaders();
for (Header header : headerArrayResponse) {
// remove transfer-encoding header. The http libraries will handle this encoding
if (header.getName().toLowerCase().equals("transfer-encoding")) {
continue;
}
httpServletResponse.setHeader(header.getName(), header.getValue());
}
// there is no data for a HTTP 304 or 204
if (intProxyResponseCode != HttpServletResponse.SC_NOT_MODIFIED &&
intProxyResponseCode != HttpServletResponse.SC_NO_CONTENT) {
// Send the content to the client
httpServletResponse.resetBuffer();
httpServletResponse.getOutputStream().write(httpMethodProxyRequest.getResponseBody());
}
// copy cookies to servlet response
for (Cookie cookie : state.getCookies()) {
javax.servlet.http.Cookie servletCookie = new javax.servlet.http.Cookie(cookie.getName(), cookie.getValue());
if (cookie.getPath() != null) {
servletCookie.setPath(cookie.getPath());
}
if (cookie.getDomain() != null) {
servletCookie.setDomain(cookie.getDomain());
}
// convert expiry date to max age
if (cookie.getExpiryDate() != null) {
servletCookie.setMaxAge((int) ((cookie.getExpiryDate().getTime() - System.currentTimeMillis()) / 1000));
}
servletCookie.setSecure(cookie.getSecure());
servletCookie.setVersion(cookie.getVersion());
if (cookie.getComment() != null) {
servletCookie.setComment(cookie.getComment());
}
httpServletResponse.addCookie(servletCookie);
}
} | [
"Execute a request\n\n@param httpMethodProxyRequest\n@param httpServletRequest\n@param httpServletResponse\n@param history\n@throws Exception"
] | [
"get the bean property type\n\n@param clazz\n@param propertyName\n@param originalType\n@return",
"Process calendar hours.\n\n@param calendar parent calendar\n@param row calendar hours data\n@param dayIndex day index",
"Creates a new empty HTML document tree.\n@throws ParserConfigurationException",
"Obtains a International Fixed zoned date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the International Fixed zoned date-time, not null\n@throws DateTimeException if unable to create the date-time",
"Write exceptions in the format used by MSPDI files prior to Project 2007.\n\n@param dayList list of calendar days\n@param exceptions list of exceptions",
"Computes the cross product of v1 and v2 and places the result in this\nvector.\n\n@param v1\nleft-hand vector\n@param v2\nright-hand vector",
"Use this API to fetch all the nslimitselector resources that are configured on netscaler.",
"Lookup the data-type associated with the class.\n\n@return The associated data-type interface or null if none found.",
"Mark root of this task task group depends on the given TaskItem.\nThis ensure this task group's root get picked for execution only after the completion\nof invocation of provided TaskItem.\n\n@param dependencyTaskItem the task item that this task group depends on\n@return the key of the dependency"
] |
public AdminClient checkout() {
if (isClosed.get()) {
throw new IllegalStateException("Pool is closing");
}
AdminClient client;
// Try to get one from the Cache.
while ((client = clientCache.poll()) != null) {
if (!client.isClusterModified()) {
return client;
} else {
// Cluster is Modified, after the AdminClient is created. Close it
client.close();
}
}
// None is available, create new one.
return createAdminClient();
} | [
"get an AdminClient from the cache if exists, if not create new one\nand return it. This method is non-blocking.\n\nAll AdminClient returned from checkout, once after the completion of\nusage must be returned to the pool by calling checkin. If not,\nthere will be leak of AdminClients (connections, threads and file handles).\n\n@return AdminClient"
] | [
"Sets the target hosts from line by line text.\n\n@param sourcePath\nthe source path\n@param sourceType\nthe source type\n@return the parallel task builder\n@throws TargetHostsLoadException\nthe target hosts load exception",
"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",
"Tells you if the expression is the false expression, either literal or constant.\n@param expression\nexpression\n@return\nas described",
"Helper for parsing properties\n@param p The properties object\n@param key The key to retrieve\n@param defaultValue The default value if the key does not exist\n@param used The set of keys we have seen\n@return The value of the property at the key",
"Readable yyyyMMdd representation of a day, which is also sortable.",
"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",
"Create a MfClientHttpRequestFactory for adding the specified headers.\n\n@param requestFactory the basic request factory. It should be unmodified and just wrapped with\na proxy class.\n@param matchers The matchers.\n@param headers The headers.\n@return",
"Validates aliases.\n\n@param uuid The structure id for which the aliases should be valid\n@param aliasPaths a map from id strings to alias paths\n@param callback the callback which should be called with the validation results",
"Returns the given collection persister for the inverse side in case the given persister represents the main side\nof a bi-directional many-to-many association.\n\n@param mainSidePersister the collection persister on the main side of a bi-directional many-to-many association\n@return the collection persister for the inverse side of the given persister or {@code null} in case it\nrepresents the inverse side itself or the association is uni-directional"
] |
private YearQuarter with(int newYear, Quarter newQuarter) {
if (year == newYear && quarter == newQuarter) {
return this;
}
return new YearQuarter(newYear, newQuarter);
} | [
"Returns a copy of this year-quarter with the new year and quarter, checking\nto see if a new object is in fact required.\n\n@param newYear the year to represent, validated from MIN_YEAR to MAX_YEAR\n@param newQuarter the quarter-of-year to represent, validated not null\n@return the year-quarter, not null"
] | [
"Adds the file to the tar archive represented by output stream. It's caller's responsibility to close output stream\nproperly.\n\n@param out target archive.\n@param source file to be added.\n@param fileSize size of the file (which is known in most cases).\n@throws IOException in case of any issues with underlying store.",
"Use this API to Force hafailover.",
"Sends a request to the API with the given parameters and the given\nrequest method and returns the result string. It automatically fills the\ncookie map with cookies in the result header after the request.\n\nWarning: You probably want to use ApiConnection.sendJsonRequest\nthat execute the request using JSON content format,\nthrows the errors and logs the warnings.\n\n@param requestMethod\neither POST or GET\n@param parameters\nMaps parameter keys to values. Out of this map the function\nwill create a query string for the request.\n@return API result\n@throws IOException",
"Set the names of six images in the zip file. The default names of the six\nimages are \"posx.png\", \"negx.png\", \"posy.png\", \"negx.png\", \"posz.png\",\nand \"negz.png\". If the names of the six images in the zip file are\ndifferent to the default ones, this function must be called before load\nthe zip file.\n\n@param nameArray\nAn array containing six strings which are names of images\ncorresponding to +x, -x, +y, -y, +z, and -z faces of the cube\nmap texture respectively.",
"Swap the current version folder for a new one\n\n@param newStoreDirectory The path to the new version directory",
"Updates the story and returns the full record for the updated story.\nOnly comment stories can have their text updated, and only comment stories and\nattachment stories can be pinned. Only one of `text` and `html_text` can be specified.\n\n@param story Globally unique identifier for the story.\n@return Request object",
"Notifies that a header item is changed.\n\n@param position the position.",
"Adds two complex numbers.\n\n@param z1 Complex Number.\n@param z2 Complex Number.\n@return Returns new ComplexNumber instance containing the sum of specified complex numbers.",
"Use this API to count sslvserver_sslciphersuite_binding resources configued on NetScaler."
] |
public static base_response unset(nitro_service client, tmsessionparameter resource, String[] args) throws Exception{
tmsessionparameter unsetresource = new tmsessionparameter();
return unsetresource.unset_resource(client,args);
} | [
"Use this API to unset the properties of tmsessionparameter resource.\nProperties that need to be unset are specified in args array."
] | [
"Position the child inside the layout based on the offset and axis-s factors\n@param dataIndex data index",
"Start transaction on the underlying connection.",
"Reads each token from a single record and adds it to a list.\n\n@param tk tokenizer\n@param record list of tokens\n@throws IOException",
"Converts a submatrix into an extract matrix operation.\n@param variableTarget The variable in which the submatrix is extracted from",
"Initialize the key set for an xml bundle.",
"If a given x is into an interval of the partition, this method returns the reference point of the corresponding interval.\nIf the given x is not contained in any interval of the partition, this method returns x.\n\n@param x The point of interest.\n@return The discretized value.",
"Recovers the state of synchronization for a namespace in case a system failure happened.\nThe goal is to revert the namespace to a known, good state. This method itself is resilient\nto failures, since it doesn't delete any documents from the undo collection until the\ncollection is in the desired state with respect to those documents.",
"Load the layers based on the default setup.\n\n@param jbossHome the jboss home directory\n@param productConfig the product config\n@param repoRoots the repository roots\n@return the available layers\n@throws IOException",
"Given counters of true positives, false positives, and false\nnegatives, prints out precision, recall, and f1 for each key."
] |
public void setDatesWithCheckState(Collection<CmsPair<Date, Boolean>> datesWithCheckInfo) {
SortedSet<Date> dates = new TreeSet<>();
m_checkBoxes.clear();
for (CmsPair<Date, Boolean> p : datesWithCheckInfo) {
addCheckBox(p.getFirst(), p.getSecond().booleanValue());
dates.add(p.getFirst());
}
reInitLayoutElements();
setDatesInternal(dates);
} | [
"Set dates with the provided check states.\n@param datesWithCheckInfo the dates to set, accompanied with the check state to set."
] | [
"Sets the baseline start text value.\n\n@param baselineNumber baseline number\n@param value baseline start text value",
"Put the core auto-code algorithm here so an external class can call it",
"Returns an interval representing the subtraction of the\ngiven interval from this one.\n@param other interval to subtract from this one\n@return result of subtraction",
"SuppressWarnings I really want to return HazeltaskTasks instead of Runnable",
"Returns the boolean value of the specified property.\n\n@param name The name of the property\n@param defaultValue The value to use if the property is not set or not a boolean\n@return The value",
"Returns an array of all declared fields in the given class and all\nsuper-classes.",
"Append environment variables and system properties from othre PipelineEvn object",
"Calculate the screen size of a tile. Normally the screen size is expressed in pixels and should therefore be\nintegers, but for the sake of accuracy we try to keep a double value as long as possible.\n\n@param worldSize\nThe width and height of a tile in the layer's world coordinate system.\n@param scale\nThe current client side scale.\n@return Returns an array of double values where the first value is the tile screen width and the second value is\nthe tile screen height.",
"Calls a method from editService to update the repeat number for a path\n\n@param model\n@param newNum\n@param path_id\n@param clientUUID\n@return\n@throws Exception"
] |
public static aaauser_binding get(nitro_service service, String username) throws Exception{
aaauser_binding obj = new aaauser_binding();
obj.set_username(username);
aaauser_binding response = (aaauser_binding) obj.get_resource(service);
return response;
} | [
"Use this API to fetch aaauser_binding resource of given name ."
] | [
"Uploads bytes to an open upload session.\n@param data data\n@param offset the byte position where the chunk begins in the file.\n@param partSize the part size returned as part of the upload session instance creation.\nOnly the last chunk can have a lesser value.\n@param totalSizeOfFile The total size of the file being uploaded.\n@return the part instance that contains the part id, offset and part size.",
"Swap the current version folder for a new one\n\n@param newStoreDirectory The path to the new version directory",
"Convert an object to a collection.\n\n@param mapper the object mapper\n@param source the source object\n@param targetCollectionType the target collection type\n@param targetElementType the target collection element type\n@return collection",
"Use this API to restore appfwprofile.",
"Use this API to delete ntpserver resources of given names.",
"Called when the surface is created or recreated. Avoided because this can\nbe called twice at the beginning.",
"Gets the name of the shader variable to get the texture\ncoordinates for the named texture.\n\n@param texName name of texture\n@return name of shader variable",
"if you want to parse an argument, you need a converter from String to Object\n\n@param commandLineOption specification of the command line options\n@param converter how to convert your String value to a castable Object",
"Create a new builder for multiple unpaginated requests on the view.\n\n@param keyType {@link com.cloudant.client.api.views.Key.Type} of the key emitted by the\nview\n@param valueType class of the type of value emitted by the view\n@param <K> type of key emitted by the view\n@param <V> type of value emitted by the view\n@return a new {@link MultipleRequestBuilder} for the database view specified by this\nViewRequestBuilder"
] |
private void addUserDefinedField(FieldTypeClass fieldType, UserFieldDataType dataType, String name)
{
try
{
switch (fieldType)
{
case TASK:
TaskField taskField;
do
{
taskField = m_taskUdfCounters.nextField(TaskField.class, dataType);
}
while (m_taskFields.containsKey(taskField) || m_wbsFields.containsKey(taskField));
m_project.getCustomFields().getCustomField(taskField).setAlias(name);
break;
case RESOURCE:
ResourceField resourceField;
do
{
resourceField = m_resourceUdfCounters.nextField(ResourceField.class, dataType);
}
while (m_resourceFields.containsKey(resourceField));
m_project.getCustomFields().getCustomField(resourceField).setAlias(name);
break;
case ASSIGNMENT:
AssignmentField assignmentField;
do
{
assignmentField = m_assignmentUdfCounters.nextField(AssignmentField.class, dataType);
}
while (m_assignmentFields.containsKey(assignmentField));
m_project.getCustomFields().getCustomField(assignmentField).setAlias(name);
break;
default:
break;
}
}
catch (Exception ex)
{
//
// SF#227: If we get an exception thrown here... it's likely that
// we've run out of user defined fields, for example
// there are only 30 TEXT fields. We'll ignore this: the user
// defined field won't be mapped to an alias, so we'll
// ignore it when we read in the values.
//
}
} | [
"Configure a new user defined field.\n\n@param fieldType field type\n@param dataType field data type\n@param name field name"
] | [
"Adds a tag to a task. Returns an empty data block.\n\n@param task The task to add a tag to.\n@return Request object",
"Read phases and activities from the Phoenix file to create the task hierarchy.\n\n@param phoenixProject all project data\n@param storepoint storepoint containing current project data",
"Use this API to add dnspolicylabel.",
"Add a Comparator to the end of the chain using the provided sort order.\n@param comparator the Comparator to add to the end of the chain\n@param ascending the sort order: ascending (true) or descending (false)",
"Parse a percent complete value.\n\n@param value sting representation of a percent complete value.\n@return Double instance",
"Exceptions specific to each operation is handled in the corresponding\nsubclass. At this point we don't know the reason behind this exception.\n\n@param exception",
"Encrypt a string with AES-128 using the specified key.\n\n@param message Input string.\n@param key Encryption key.\n@return Encrypted output.",
"Returns a list of the compact representation of all of the custom fields in a workspace.\n\n@param workspace The workspace or organization to find custom field definitions in.\n@return Request object",
"apply the base fields to other views if configured to do so."
] |
private void convertJdkPath(Launcher launcher, EnvVars extendedEnv) {
String separator = launcher.isUnix() ? "/" : "\\";
String java_home = extendedEnv.get("JAVA_HOME");
if (StringUtils.isNotEmpty(java_home)) {
if (!StringUtils.endsWith(java_home, separator)) {
java_home += separator;
}
extendedEnv.put("PATH+JDK", java_home + "bin");
}
} | [
"The Maven3Builder class is looking for the PATH+JDK environment variable due to legacy code.\nIn The pipeline flow we need to convert the JAVA_HOME to PATH+JDK in order to reuse the code."
] | [
"Sets the value associated with the given key; if the the key is one\nof the hashable keys, throws an exception.\n\n@throws HashableCoreMapException Attempting to set the value for an\nimmutable, hashable key.",
"Creates the adapter for the target database.",
"Finds the next valid line of words in the stream and extracts them.\n\n@return List of valid words on the line. null if the end of the file has been reached.\n@throws java.io.IOException",
"Insert a new value prior to the index location in the existing value array,\nincreasing the field length accordingly.\n@param index - where the new values in an SFVec2f object will be placed in the array list\n@param newValue - the new x, y value for the array list",
"Saves the loaded XML bundle as property bundle.\n@throws UnsupportedEncodingException thrown if localizations from the XML bundle could not be loaded correctly.\n@throws CmsException thrown if any of the interactions with the VFS fails.\n@throws IOException thrown if localizations from the XML bundle could not be loaded correctly.",
"Set a status message in the JTextComponent passed to this\nmodel.\n@param message The message that should be displayed.",
"Returns the link for the given workplace resource.\n\nThis should only be used for resources under /system or /shared.<p<\n\n@param cms the current OpenCms user context\n@param resourceName the resource to generate the online link for\n@param forceSecure forces the secure server prefix\n\n@return the link for the given resource",
"Send a packet to the target player telling it to load the specified track from the specified source player.\n\n@param targetPlayer the device number of the player that you want to have load a track\n@param rekordboxId the identifier of a track within the source player's rekordbox database\n@param sourcePlayer the device number of the player from which the track should be loaded\n@param sourceSlot the media slot from which the track should be loaded\n@param sourceType the type of track to be loaded\n\n@throws IOException if there is a problem sending the command\n@throws IllegalStateException if the {@code VirtualCdj} is not active or the target device cannot be found",
"Closes a Closeable and swallows any exceptions that might occur in the\nprocess.\n\n@param closeable"
] |
public ItemRequest<Attachment> findById(String attachment) {
String path = String.format("/attachments/%s", attachment);
return new ItemRequest<Attachment>(this, Attachment.class, path, "GET");
} | [
"Returns the full record for a single attachment.\n\n@param attachment Globally unique identifier for the attachment.\n@return Request object"
] | [
"Adds a value to the list if does not already exists.\n\n@param list the list\n@param value value to add if not exists in the list",
"Create a WebMBeanAdaptor for a specified MBean name.\n@param mBeanName the MBean name (can be URL-encoded).\n@param encoding the string encoding to be used (i.e. UTF-8)\n@return the created WebMBeanAdaptor.\n@throws JMException Java Management Exception\n@throws UnsupportedEncodingException if the encoding is not supported.",
"Initializes class data structures and parameters",
"Inserts a single document locally and being to synchronize it based on its _id. Inserting\na document with the same _id twice will result in a duplicate key exception.\n\n@param namespace the namespace to put the document in.\n@param document the document to insert.",
"Extract a Class from the given Type.",
"Use this API to delete ntpserver resources.",
"The fields returned by default. Typically the output is done via display formatters and hence nearly no\nfield is necessary. Returning all fields might cause performance problems.\n\n@return the default return fields.",
"Use this API to fetch all the dospolicy resources that are configured on netscaler.",
"Returns the description of the running container.\n\n@param client the client used to query the server\n\n@return the description of the running container\n\n@throws IOException if an error occurs communicating with the server\n@throws OperationExecutionException if the operation used to query the container fails"
] |
private Envelope getBoundsLocal(Filter filter) throws LayerException {
try {
Session session = getSessionFactory().getCurrentSession();
Criteria criteria = session.createCriteria(getFeatureInfo().getDataSourceName());
CriteriaVisitor visitor = new CriteriaVisitor((HibernateFeatureModel) getFeatureModel(), dateFormat);
Criterion c = (Criterion) filter.accept(visitor, criteria);
if (c != null) {
criteria.add(c);
}
criteria.setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY);
List<?> features = criteria.list();
Envelope bounds = new Envelope();
for (Object f : features) {
Envelope geomBounds = getFeatureModel().getGeometry(f).getEnvelopeInternal();
if (!geomBounds.isNull()) {
bounds.expandToInclude(geomBounds);
}
}
return bounds;
} catch (HibernateException he) {
throw new HibernateLayerException(he, ExceptionCode.HIBERNATE_LOAD_FILTER_FAIL, getFeatureInfo()
.getDataSourceName(), filter.toString());
}
} | [
"Bounds are calculated locally, can use any filter, but slower than native.\n\n@param filter\nfilter which needs to be applied\n@return the bounds of the specified features\n@throws LayerException\noops"
] | [
"Use this API to fetch statistics of nslimitidentifier_stats resource of given name .",
"Sorts the fields.",
"Used to NOT the argument clause specified.",
"Adds an edge between the current and new state.\n\n@return true if the new state is not found in the state machine.",
"Use this API to add sslaction resources.",
"Tells you if the given ASTNode is a VariableExpression with the given name.\n@param expression\nany AST Node\n@param pattern\na string pattern to match\n@return\ntrue if the node is a variable with the specified name",
"Calculate start dates for a daily recurrence.\n\n@param calendar current date\n@param frequency frequency\n@param dates array of start dates",
"Populates the project header.\n\n@param record MPX record\n@param properties project properties\n@throws MPXJException",
"Provides the scrollableList implementation for page scrolling\n@return {@link LayoutScroller.ScrollableList} implementation, passed to {@link LayoutScroller}\nfor the processing the scrolling"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.