query
stringlengths 74
6.1k
| positive
sequencelengths 1
1
| negative
sequencelengths 9
9
|
---|---|---|
public void purge(String cacheKey) {
try {
if (useMemoryCache) {
if (memoryCache != null) {
memoryCache.remove(cacheKey);
}
}
if (useDiskCache) {
if (diskLruCache != null) {
diskLruCache.remove(cacheKey);
}
}
} catch (Exception e) {
Log.w(TAG, "Could not remove entry in cache purge", e);
}
} | [
"Removes the value connected to the given key\nfrom all levels of the cache. Will not throw an\nexception on fail.\n\n@param cacheKey"
] | [
"Change the color of the center which indicates the new color.\n\n@param color int of the color.",
"Infer app name from entry class\n\n@param entryClass\nthe entry class\n@return\napp name inferred from the entry class",
"Ensures that the primary keys required by the given collection with indirection table are present in\nthe element class.\n\n@param modelDef The model\n@param collDef The collection\n@throws ConstraintException If there is a problem with the fitting collection (if any) or the primary keys",
"Returns a description String based on the defined command and options.\nUseful when printing \"help\" info etc.",
"returns controller if a new device is found",
"This method removes all RTF formatting from a given piece of text.\n\n@param text Text from which the RTF formatting is to be removed.\n@return Plain text",
"Returns the foreignkey to the specified table.\n\n@param name The name of the foreignkey\n@param tableName The name of the referenced table\n@return The foreignkey def or <code>null</code> if it does not exist",
"Make a copy of this Area of Interest.",
"Manually set the breaker to be reset and ready for use. This\nis only useful after a manual trip otherwise the breaker will\ntrip automatically again if the service is still unavailable.\nJust like a real breaker. WOOT!!!"
] |
public static double HighAccuracyComplemented(double x) {
double[] R =
{
1.25331413731550025, 0.421369229288054473, 0.236652382913560671,
0.162377660896867462, 0.123131963257932296, 0.0990285964717319214,
0.0827662865013691773, 0.0710695805388521071, 0.0622586659950261958
};
int j = (int) (0.5 * (Math.abs(x) + 1));
double a = R[j];
double z = 2 * j;
double b = a * z - 1;
double h = Math.abs(x) - z;
double q = h * h;
double pwr = 1;
double sum = a + h * b;
double term = a;
for (int i = 2; sum != term; i += 2) {
term = sum;
a = (a + z * b) / (i);
b = (b + z * a) / (i + 1);
pwr *= q;
sum = term + pwr * (a + h * b);
}
sum *= Math.exp(-0.5 * (x * x) - 0.5 * Constants.Log2PI);
return (x >= 0) ? sum : (1.0 - sum);
} | [
"High-accuracy Complementary normal distribution function.\n\n@param x Value.\n@return Result."
] | [
"Old SOAP client uses new SOAP service with the\nredirection to the new endpoint and transformation\non the server side",
"Sets selected page implicitly\n@param page new selected page\n@return true if the page has been selected successfully",
"Remove control from the control bar. Size of control bar is updated based on new number of\ncontrols.\n@param name name of the control to remove",
"Send a device update to all registered update listeners.\n\n@param update the device update that has just arrived",
"Resolve the disposal method for the given producer method. Any resolved\nbeans will be marked as such for the purpose of validating that all\ndisposal methods are used. For internal use.\n\n@param types the types\n@param qualifiers The binding types to match\n@param declaringBean declaring bean\n@return The set of matching disposal methods",
"Calculate the duration percent complete.\n\n@param row task data\n@return percent complete",
"Handle interval change.\n@param event the change event.",
"Determines the encoding block groups for the specified data.",
"Retrieve the jdbc type for the field descriptor that is related\nto this argument."
] |
public static void convolveHV(Kernel kernel, int[] inPixels, int[] outPixels, int width, int height, boolean alpha, int edgeAction) {
int index = 0;
float[] matrix = kernel.getKernelData( null );
int rows = kernel.getHeight();
int cols = kernel.getWidth();
int rows2 = rows/2;
int cols2 = cols/2;
for (int y = 0; y < height; y++) {
for (int x = 0; x < width; x++) {
float r = 0, g = 0, b = 0, a = 0;
for (int row = -rows2; row <= rows2; row++) {
int iy = y+row;
int ioffset;
if (0 <= iy && iy < height)
ioffset = iy*width;
else if ( edgeAction == CLAMP_EDGES )
ioffset = y*width;
else if ( edgeAction == WRAP_EDGES )
ioffset = ((iy+height) % height) * width;
else
continue;
int moffset = cols*(row+rows2)+cols2;
for (int col = -cols2; col <= cols2; col++) {
float f = matrix[moffset+col];
if (f != 0) {
int ix = x+col;
if (!(0 <= ix && ix < width)) {
if ( edgeAction == CLAMP_EDGES )
ix = x;
else if ( edgeAction == WRAP_EDGES )
ix = (x+width) % width;
else
continue;
}
int rgb = inPixels[ioffset+ix];
a += f * ((rgb >> 24) & 0xff);
r += f * ((rgb >> 16) & 0xff);
g += f * ((rgb >> 8) & 0xff);
b += f * (rgb & 0xff);
}
}
}
int ia = alpha ? PixelUtils.clamp((int)(a+0.5)) : 0xff;
int ir = PixelUtils.clamp((int)(r+0.5));
int ig = PixelUtils.clamp((int)(g+0.5));
int ib = PixelUtils.clamp((int)(b+0.5));
outPixels[index++] = (ia << 24) | (ir << 16) | (ig << 8) | ib;
}
}
} | [
"Convolve with a 2D kernel.\n@param kernel the kernel\n@param inPixels the input pixels\n@param outPixels the output pixels\n@param width the width\n@param height the height\n@param alpha include alpha channel\n@param edgeAction what to do at the edges"
] | [
"Get an CollectionDescriptor by name BRJ\n@param name\n@return CollectionDescriptor or null",
"Creates a spin wrapper for a data input. The data format of the\ninput is assumed to be JSON.\n\n@param input the input to wrap\n@return the spin wrapper for the input\n\n@throws IllegalArgumentException in case an argument of illegal type is provided (such as 'null')",
"Utility function that fetches quota types.",
"Use this API to fetch lbvserver_rewritepolicy_binding resources of given name .",
"Organises the data from Asta into a hierarchy and converts this into tasks.\n\n@param bars bar data\n@param expandedTasks expanded task data\n@param tasks task data\n@param milestones milestone data",
"Unilaterally merge an update description into this update description.\n@param otherDescription the update description to merge into this\n@return this merged update description",
"Formats event output by key, usually equal to the method name.\n\n@param key the event key\n@param defaultPattern the default pattern to return if a custom pattern\nis not found\n@param args the args used to format output\n@return A formatted event output",
"Use this API to fetch lbvserver_auditnslogpolicy_binding resources of given name .",
"Use this API to fetch appfwprofile resource of given name ."
] |
public Iterable<? extends WindupVertexFrame> findVariable(String name, int maxDepth)
{
int currentDepth = 0;
Iterable<? extends WindupVertexFrame> result = null;
for (Map<String, Iterable<? extends WindupVertexFrame>> frame : deque)
{
result = frame.get(name);
if (result != null)
{
break;
}
currentDepth++;
if (currentDepth >= maxDepth)
break;
}
return result;
} | [
"Searches the variables layers, top to bottom, for given name, and returns if found; null otherwise.\n\nIf maxDepth is set to {@link Variables#SEARCH_ALL_LAYERS}, then search all layers."
] | [
"Returns the value of the sum of discounted cash flows of the bond where\nthe discounting is done with the given yield curve.\nThis method can be used for optimizer.\n\n@param evaluationTime The evaluation time as double. Cash flows prior and including this time are not considered.\n@param rate The yield which is used for discounted the coupon payments.\n@param model The model under which the product is valued.\n@return The value of the bond for the given yield.",
"Allocate a timestamp",
"Applies the given codec registry to be used alongside the default codec registry.\n\n@param codecRegistry the codec registry to merge in.\n@return an {@link StitchObjectMapper} with the merged codec registries.",
"Check if the given color string can be parsed.\n\n@param colorString The color to parse.",
"get the type signature corresponding to given class\n\n@param clazz\n@return",
"With the QR algorithm it is possible for the found singular values to be native. This\nmakes them all positive by multiplying it by a diagonal matrix that has",
"Use this API to fetch statistics of scpolicy_stats resource of given name .",
"Returns the undo collection representing the given namespace for recording documents that\nmay need to be reverted after a system failure.\n\n@param namespace the namespace referring to the undo collection.\n@return the undo collection representing the given namespace for recording documents that\nmay need to be reverted after a system failure.",
"Creates a new broker instance.\n\n@param jcdAlias The jdbc connection descriptor name as defined in the repository\n@param user The user name to be used for connecting to the database\n@param password The password to be used for connecting to the database\n@return The persistence broker\n@see org.apache.ojb.broker.core.PersistenceBrokerFactoryIF#createPersistenceBroker(java.lang.String, java.lang.String, java.lang.String)"
] |
String fetchToken(String tokenType) throws IOException, MediaWikiApiErrorException {
Map<String, String> params = new HashMap<>();
params.put(ApiConnection.PARAM_ACTION, "query");
params.put("meta", "tokens");
params.put("type", tokenType);
try {
JsonNode root = this.sendJsonRequest("POST", params);
return root.path("query").path("tokens").path(tokenType + "token").textValue();
} catch (IOException | MediaWikiApiErrorException e) {
logger.error("Error when trying to fetch token: " + e.toString());
}
return null;
} | [
"Executes a API query action to get a new token.\nThe method only executes the action, without doing any\nchecks first. If errors occur, they are logged and null is returned.\n\n@param tokenType The kind of token to retrieve like \"csrf\" or \"login\"\n@return newly retrieved token or null if no token was retrieved"
] | [
"Invokes a function defined in the script.\n\n@param funcName\nThe function name.\n@param params\nThe parameter array.\n@return\nA boolean value representing whether the function is\nexecuted correctly. If the function cannot be found, or\nparameters don't match, {@code false} is returned.",
"commit all envelopes against the current broker",
"Sets up internal data structures and creates a copy of the input matrix.\n\n@param A The input matrix. Not modified.",
"Creates a new file.\n\n@param inputStream the stream instance that contains the data.\n@param fileName the name of the file to be created.\n@param fileSize the size of the file that will be uploaded.\n@return the created file instance.\n@throws InterruptedException when a thread execution is interrupted.\n@throws IOException when reading a stream throws exception.",
"Change the color of the center which indicates the new color.\n\n@param color int of the color.",
"Stop finding signatures for all active players.",
"The token was previously determined as potentially to-be-splitted thus we\nemit additional indentation or dedenting tokens.",
"Fires given event for non-web modules. Used for @BeforeDestroyed and @Destroyed events.",
"Entry point for processing saved view state.\n\n@param file project file\n@param varData view state var data\n@param fixedData view state fixed data\n@throws IOException"
] |
public String astring(ImapRequestLineReader request) throws ProtocolException {
char next = request.nextWordChar();
switch (next) {
case '"':
return consumeQuoted(request);
case '{':
return consumeLiteral(request);
default:
return atom(request);
}
} | [
"Reads an argument of type \"astring\" from the request."
] | [
"Writes the data collected about classes to a file.",
"Use this API to add dnstxtrec resources.",
"Build filter for the request.\n\n@param layerFilter layer filter\n@param featureIds features to include in report (null for all)\n@return filter\n@throws GeomajasException filter could not be parsed/created",
"Uploads a new large file.\n@param boxApi the API connection to be used by the upload session.\n@param folderId the id of the folder in which the file will be uploaded.\n@param stream the input stream that feeds the content of the file.\n@param url the upload session URL.\n@param fileName the name of the file to be created.\n@param fileSize the total size of the file.\n@return the created file instance.\n@throws InterruptedException when a thread gets interupted.\n@throws IOException when reading a stream throws exception.",
"Splits the given string.",
"Queries taking longer than this limit to execute are logged.\n@param queryExecuteTimeLimit the limit to set in milliseconds.\n@param timeUnit",
"In this method perform the actual override in runtime.\n\n@see org.apache.log4j.spi.HierarchyEventListener#addAppenderEvent(org.apache.log4j.Category, org.apache.log4j.Appender)",
"Use this API to fetch all the transformpolicylabel resources that are configured on netscaler.",
"Search for the attribute \"id\" and return the value.\n\n@return the id of this element or null when not found"
] |
public static base_responses unset(nitro_service client, Long clid[], String args[]) throws Exception {
base_responses result = null;
if (clid != null && clid.length > 0) {
clusterinstance unsetresources[] = new clusterinstance[clid.length];
for (int i=0;i<clid.length;i++){
unsetresources[i] = new clusterinstance();
unsetresources[i].clid = clid[i];
}
result = unset_bulk_request(client, unsetresources,args);
}
return result;
} | [
"Use this API to unset the properties of clusterinstance resources.\nProperties that need to be unset are specified in args array."
] | [
"Repeat a CharSequence a certain number of times.\n\n@param self a CharSequence to be repeated\n@param factor the number of times the CharSequence should be repeated\n@return a String composed of a repetition\n@throws IllegalArgumentException if the number of repetitions is < 0\n@since 1.8.2",
"Use this API to fetch all the tunneltrafficpolicy resources that are configured on netscaler.",
"backing bootstrap method with all parameters",
"Adds a Statement.\n\n@param rank\nrank of the statement\n@param subject\nrdf resource that refers to the statement",
"So we will follow rfc 1035 and in addition allow the underscore.",
"Validate some of the properties of this layer.",
"Set HTTP client\n\n@param httpClient\nAn instance of OkHttpClient\n@return Api Client",
"Calculate start dates for a monthly relative recurrence.\n\n@param calendar current date\n@param frequency frequency\n@param dates array of start dates",
"Add a calendar node.\n\n@param parentNode parent node\n@param calendar calendar"
] |
private static boolean matches(Type from, Type to, Map<String, Type> typeMap) {
if (to.equals(from))
return true;
if (from instanceof TypeVariable) {
return to.equals(typeMap.get(((TypeVariable<?>) from).getName()));
}
return false;
} | [
"Checks if two types are the same or are equivalent under a variable\nmapping given in the type map that was provided."
] | [
"Performs validation of the observer method for compliance with the specifications.",
"generate random velocities in the given range\n@return",
"Updates this BoxJSONObject using the information in a JSON object.\n@param jsonObject the JSON object containing updated information.",
"compute Sin using Taylor Series.\n\n@param x An angle, in radians.\n@param nTerms Number of terms.\n@return Result.",
"Creates the final artifact name.\n\n@return the artifact name",
"Removes all events from table\n\n@param table the table to remove events",
"Sets the drawable used as the drawer indicator.\n\n@param drawable The drawable used as the drawer indicator.",
"Parse the string representation of a timestamp.\n\n@param value string representation\n@return Java representation",
"Sets the bounds of a UIObject, moving and sizing to match the\nbounds specified. Currently used for the itemhover and useful\nfor other absolutely positioned elements."
] |
public static base_response add(nitro_service client, dospolicy resource) throws Exception {
dospolicy addresource = new dospolicy();
addresource.name = resource.name;
addresource.qdepth = resource.qdepth;
addresource.cltdetectrate = resource.cltdetectrate;
return addresource.add_resource(client);
} | [
"Use this API to add dospolicy."
] | [
"scroll only once",
"Checks if the specified max levels is correct.\n\n@param userMaxLevels the maximum number of levels in the tree\n@param defaultMaxLevels the default max number of levels\n@return the validated max levels",
"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",
"Use this API to fetch vpnclientlessaccesspolicy_binding resource of given name .",
"Use this API to fetch csvserver_cspolicy_binding resources of given name .",
"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.",
"Checks to see if the submatrix has its boundaries along inner blocks.\n\n@param blockLength Size of an inner block.\n@param A Submatrix.\n@return If it is block aligned or not.",
"Compute the offset for the item in the layout cache\n@return true if the item fits the container, false otherwise",
"Add a console pipeline to the Redwood handler tree,\nprinting to stdout.\nCalling this multiple times will result in messages being printed\nmultiple times.\n@return this"
] |
private Statement createStatement(Connection con, boolean scrollable, int explicitFetchSizeHint)
throws java.sql.SQLException
{
Statement result;
try
{
// if necessary use JDBC1.0 methods
if (!FORCEJDBC1_0)
{
result =
con.createStatement(
scrollable
? ResultSet.TYPE_SCROLL_INSENSITIVE
: ResultSet.TYPE_FORWARD_ONLY,
ResultSet.CONCUR_READ_ONLY);
afterJdbc2CapableStatementCreate(result, explicitFetchSizeHint);
}
else
{
result = con.createStatement();
}
}
catch (AbstractMethodError err)
{
// if a JDBC1.0 driver is used, the signature
// createStatement(int, int) is not defined.
// we then call the JDBC1.0 variant createStatement()
log.warn("Used driver seems not JDBC 2.0 compatible, use the JDBC 1.0 mode", err);
result = con.createStatement();
FORCEJDBC1_0 = true;
}
catch (SQLException eSql)
{
// there are JDBC Driver that nominally implement JDBC 2.0, but
// throw DriverNotCapableExceptions. If we catch one of these
// we force usage of JDBC 1.0
if (eSql.getClass().getName()
.equals("interbase.interclient.DriverNotCapableException"))
{
log.warn("JDBC 2.0 problems with this interbase driver, we use the JDBC 1.0 mode");
FORCEJDBC1_0 = true;
result = con.createStatement();
}
else
{
throw eSql;
}
}
try
{
platform.afterStatementCreate(result);
}
catch (PlatformException e)
{
log.error("Platform dependend failure", e);
}
return result;
} | [
"Creates a statement with parameters that should work with most RDBMS."
] | [
"exposed only for tests",
"Stops all transitions.",
"Compute the offset for the item in the layout based on the offsets of neighbors\nin the layout. The other offsets are not patched. If neighbors offsets have not\nbeen computed the offset of the item will not be set.\n@return true if the item fits the container, false otherwise",
"This method is used to push install referrer via Intent\n@param intent An Intent with the install referrer parameters",
"Records that there is no media mounted in a particular media player slot, updating listeners if this is a change,\nand clearing any affected items from our in-memory caches.\n\n@param slot the slot in which no media is mounted",
"Read an int from an input stream.\n\n@param is input stream\n@return int value",
"Format a calendar instance that is parseable from JavaScript, according to ISO-8601.\n\n@param cal the calendar to format to a JSON string\n@return a formatted date in the form of a string",
"Check if the gravity and orientation are not in conflict one with other.\n@param gravity\n@param orientation\n@return true if orientation and gravity can be applied together, false - otherwise",
"Use this API to unset the properties of nsacl6 resources.\nProperties that need to be unset are specified in args array."
] |
public byte[] toArray() {
byte[] copy = new byte[length];
System.arraycopy(data, offset, copy, 0, length);
return copy;
} | [
"Returns a byte array containing a copy of the bytes"
] | [
"Queues up a callback to be removed and invoked on the next change event.",
"Compares the StoreVersionManager's internal state with the content on the file-system\nof the rootDir provided at construction time.\n\nTODO: If the StoreVersionManager supports non-RO stores in the future,\nwe should move some of the ReadOnlyUtils functions below to another Utils class.",
"List the slack values for each task.\n\n@param file ProjectFile instance",
"Old SOAP client uses new SOAP service with the\nredirection to the new endpoint and transformation\non the server side",
"Use this API to enable nsfeature.",
"Sets the timeout used when connecting to the server.\n\n@param timeout the time out to use\n\n@return the builder",
"Sets the max.\n\n@param n the new max",
"Process a beat packet, potentially updating the master tempo and sending our listeners a master\nbeat notification. Does nothing if we are not active.",
"Configs created by this ConfigBuilder will have the given Redis hostname.\n\n@param host the Redis hostname\n@return this ConfigBuilder"
] |
private String getPropertyLabel(PropertyIdValue propertyIdValue) {
PropertyRecord propertyRecord = this.propertyRecords
.get(propertyIdValue);
if (propertyRecord == null || propertyRecord.propertyDocument == null) {
return propertyIdValue.getId();
} else {
return getLabel(propertyIdValue, propertyRecord.propertyDocument);
}
} | [
"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"
] | [
"Peeks the current top of the stack or returns null if the stack is empty\n@return the current top of the stack or returns null if the stack is empty",
"Scans the given file looking for a complete zip file format end of central directory record.\n\n@param file the file\n\n@return true if a complete end of central directory record could be found\n\n@throws IOException",
"This method allows a predecessor relationship to be removed from this\ntask instance. It will only delete relationships that exactly match the\ngiven targetTask, type and lag time.\n\n@param targetTask the predecessor task\n@param type relation type\n@param lag relation lag\n@return returns true if the relation is found and removed",
"Reads all sub-categories below the provided category.\n@return The map from the provided category to it's sub-categories in a {@link CmsJspCategoryAccessBean}.",
"Use this API to fetch lbvserver_servicegroup_binding resources of given name .",
"Creates an immutable map. A copy of the given map is used. As a result, it is safe to modify the source map afterwards.\n\n@param map the given map\n@return an immutable map",
"The transform method for this DataTransformer\n@param cr a reference to DataPipe from which to read the current map",
"Return the number of days between startDate and endDate given the\nspecific daycount convention.\n\n@param startDate The start date given as a {@link org.threeten.bp.LocalDate}.\n@param endDate The end date given as a {@link org.threeten.bp.LocalDate}.\n@param convention A convention string.\n@return The number of days within the given period.",
"Checks if class package match provided list of package locators\n\n@param classPackageName\nname of class package\n@return true if class package is on the {@link #packageLocators} list"
] |
protected ViewPort load() {
resize = Window.addResizeHandler(event -> {
execute(event.getWidth(), event.getHeight());
});
execute(window().width(), (int)window().height());
return viewPort;
} | [
"Load the windows resize handler with initial view port detection."
] | [
"Run a task periodically, with a callback.\n\n@param task\nTask to run.\n@param delay\nThe first execution will happen in {@code delay} seconds.\n@param period\nSubsequent executions will happen every {@code period} seconds\nafter the first.\n@param callback\nCallback that lets you cancel the task. {@code null} means run\nindefinitely.\n@return An interface that lets you query the status; cancel; or\nreschedule the event.",
"Reads all text up to next XML tag and returns it as a String.\n\n@return the String of the text read, which may be empty.",
"Sets the target directory.",
"Use this API to fetch all the vrid6 resources that are configured on netscaler.",
"Use this API to export sslfipskey.",
"Get the days difference",
"Build call for postUiAutopilotWaypoint\n\n@param addToBeginning\nWhether this solar system should be added to the beginning of\nall waypoints (required)\n@param clearOtherWaypoints\nWhether clean other waypoints beforing adding this one\n(required)\n@param destinationId\nThe destination to travel to, can be solar system, station or\nstructure's id (required)\n@param datasource\nThe server name you would like data from (optional, default to\ntranquility)\n@param token\nAccess token to use if unable to set a header (optional)\n@param callback\nCallback for upload/download progress\n@return Call to execute\n@throws ApiException\nIf fail to serialize the request body 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",
"Starts closing the keyboard when the hits are scrolled."
] |
public static List<KoreanPhraseExtractor.KoreanPhrase> extractPhrases(Seq<KoreanToken> tokens, boolean filterSpam, boolean includeHashtags) {
return JavaConversions.seqAsJavaList(
TwitterKoreanProcessor.extractPhrases(tokens, filterSpam, includeHashtags)
);
} | [
"Extract phrases from Korean input text\n\n@param tokens Korean tokens (output of tokenize(CharSequence text)).\n@return List of phrase CharSequences."
] | [
"Refactor the method into public CXF utility and reuse it from CXF instead copy&paste",
"If the workspace for your project _is_ an organization, you must also\nsupply a `team` to share the project with.\n\nReturns the full record of the newly created project.\n\n@param workspace The workspace or organization to create the project in.\n@return Request object",
"This may cost twice what it would in the original Map.\n\n@param key key whose associated value is to be returned.\n@return the value to which this map maps the specified key, or\n<tt>null</tt> if the map contains no mapping for this key.",
"Load the view port execution.\n\n@param then callback when the view port is detected.\n@param fallback fallback when no view port detected or failure to detect the given\n{@link Boundary} (using {@link #propagateFallback(boolean)})",
"Return a list of 'Files' of downloaded or uploaded files. Filters build files without local and remote paths.\n\n@param buildFilesStream - Stream of build Artifacts or Dependencies.\n@return - List of build files.",
"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.",
"Parses a raw WBS value from the database and breaks it into\ncomponent parts ready for formatting.\n\n@param value raw WBS value",
"Use this API to add nspbr6.",
"Hide multiple channels. All other channels will be unaffected.\n@param channels The channels to hide"
] |
public void removeWorstFit() {
// find the observation with the most error
int worstIndex=-1;
double worstError = -1;
for( int i = 0; i < y.numRows; i++ ) {
double predictedObs = 0;
for( int j = 0; j < coef.numRows; j++ ) {
predictedObs += A.get(i,j)*coef.get(j,0);
}
double error = Math.abs(predictedObs- y.get(i,0));
if( error > worstError ) {
worstError = error;
worstIndex = i;
}
}
// nothing left to remove, so just return
if( worstIndex == -1 )
return;
// remove that observation
removeObservation(worstIndex);
// update A
solver.removeRowFromA(worstIndex);
// solve for the parameters again
solver.solve(y,coef);
} | [
"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."
] | [
"Reads the integer representation of calendar hours for a given\nday and populates the calendar.\n\n@param calendar parent calendar\n@param day target day\n@param hours working hours",
"Deletes all of the Directories in root that match the FileFilter\n\n@param root\n@param filter",
"Performs DBSCAN cluster analysis.\n\n@param points the points to cluster\n@return the list of clusters\n@throws NullArgumentException if the data points are null",
"Add the elements that all values objects require from the provided values object.\n\n@param sourceValues the values object containing the required elements",
"Submit a operations. Throw a run time exception if the operations is\nalready submitted\n\n@param operation The asynchronous operations to submit\n@param requestId Id of the request",
"Load the given configuration file.",
"if any item in toCheck is present in collection\n@param <T>\n@param collection\n@param toCheck\n@return",
"Look for a child view with the given id. If this view has the given\nid, return this view.\n\n@param id The id to search for.\n@return The view that has the given id in the hierarchy or null",
"A specific, existing task can be updated by making a PUT request on the\nURL for that task. Only the fields provided in the `data` block will be\nupdated; any unspecified fields will remain unchanged.\n\nWhen using this method, it is best to specify only those fields you wish\nto change, or else you may overwrite changes made by another user since\nyou last retrieved the task.\n\nReturns the complete updated task record.\n\n@param task The task to update.\n@return Request object"
] |
public boolean setMethodArguments(String pathName, String methodName, Integer ordinal, Object... arguments) {
try {
BasicNameValuePair[] params = new BasicNameValuePair[arguments.length + 2];
int x = 0;
for (Object argument : arguments) {
params[x] = new BasicNameValuePair("arguments[]", argument.toString());
x++;
}
params[x] = new BasicNameValuePair("profileIdentifier", this._profileName);
params[x + 1] = new BasicNameValuePair("ordinal", ordinal.toString());
JSONObject response = new JSONObject(doPost(BASE_PATH + uriEncode(pathName) + "/" + methodName, params));
return true;
} catch (Exception e) {
e.printStackTrace();
}
return false;
} | [
"Set the method arguments for an enabled method override\n\n@param pathName Path name\n@param methodName Fully qualified method name\n@param ordinal 1-based index of the override within the overrides of type methodName\n@param arguments Array of arguments to set(specify all arguments)\n@return true if success, false otherwise"
] | [
"Prepares this DAG for node enumeration using getNext method, each call to getNext returns next node\nin the DAG with no dependencies.",
"Reads the cost rate tables from the file.\n\n@param resource parent resource\n@param rates XML cot rate tables",
"Prints out the interceptor chain in a format that is easy to read. It\nalso filters out instances of the DemoInterceptor so you can see what the\nchain would look like in a normal invokation.\n\n@param chain",
"Converts a vector from eigen space into sample space.\n\n@param eigenData Eigen space data.\n@return Sample space projection.",
"return the squared area of the triangle defined by the half edge hedge0\nand the point at the head of hedge1.\n\n@param hedge0\n@param hedge1\n@return",
"Read JdbcConnectionDescriptors from the given repository file.\n\n@see #mergeConnectionRepository",
"Append Join for SQL92 Syntax without parentheses",
"Parse a string representation of a Boolean value.\nXER files sometimes have \"N\" and \"Y\" to indicate boolean\n\n@param value string representation\n@return Boolean value",
"The normalized string returned by this method is consistent with java.net.Inet6address.\n\nIPs are not compressed nor mixed in this representation. If this has a prefix length, that will be included in the string."
] |
@Override
public final Double optDouble(final String key, final Double defaultValue) {
Double result = optDouble(key);
return result == null ? defaultValue : result;
} | [
"Get a property as a double or defaultValue.\n\n@param key the property name\n@param defaultValue the default value"
] | [
"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",
"Use this API to fetch gslbsite resource of given name .",
"Creates a sorted list that contains the items of the given iterable. The resulting list is sorted according to\nthe order induced by applying a key function to each element which yields a comparable criteria.\n\n@param iterable\nthe elements to be sorted. May not be <code>null</code>.\n@param key\nthe key function to-be-used. May not be <code>null</code>.\n@return a sorted list as a shallow copy of the given iterable.\n@see #sort(Iterable)\n@see #sort(Iterable, Comparator)\n@see ListExtensions#sortInplaceBy(List, org.eclipse.xtext.xbase.lib.Functions.Function1)",
"get bearer token returned by IAM in JSON format",
"Initialization necessary for editing a property bundle.\n\n@throws CmsLoaderException thrown if loading a bundle file fails.\n@throws CmsException thrown if loading a bundle file fails.\n@throws IOException thrown if loading a bundle file fails.",
"Sets an attribute in a non-main section of the manifest.\n\n@param section the section's name\n@param name the attribute's name\n@param value the attribute's value\n@return {@code this}\n@throws IllegalStateException if entries have been added or the JAR has been written prior to calling this methods.",
"Return true only if the node has the named annotation\n@param node - the AST Node to check\n@param name - the name of the annotation\n@return true only if the node has the named annotation",
"Create an image of the proper size to hold a new waveform preview image and draw it.",
"Creates a Set out of the given keys\n\n@param <K> the key type\n@param keys\nthe keys\n@return a Set containing the given keys"
] |
protected TemporaryBrokerWrapper getBroker() throws PBFactoryException
{
PersistenceBrokerInternal broker;
boolean needsClose = false;
if (getBrokerKey() == null)
{
/*
arminw:
if no PBKey is set we throw an exception, because we don't
know which PB (connection) should be used.
*/
throw new OJBRuntimeException("Can't find associated PBKey. Need PBKey to obtain a valid" +
"PersistenceBroker instance from intern resources.");
}
// first try to use the current threaded broker to avoid blocking
broker = PersistenceBrokerThreadMapping.currentPersistenceBroker(getBrokerKey());
// current broker not found, create a intern new one
if ((broker == null) || broker.isClosed())
{
broker = (PersistenceBrokerInternal) PersistenceBrokerFactory.createPersistenceBroker(getBrokerKey());
/** Specifies whether we obtained a fresh broker which we have to close after we used it */
needsClose = true;
}
return new TemporaryBrokerWrapper(broker, needsClose);
} | [
"Gets the persistence broker used by this indirection handler.\nIf no PBKey is available a runtime exception will be thrown.\n\n@return a PersistenceBroker"
] | [
"Computes the eigenvalues of a 2 by 2 matrix using a faster but more prone to errors method. This\nis the typical method.",
"Private recursive helper function to actually do the type-safe checking\nof assignability.",
"Returns a description a block of work, or \"exit\" if no more blocks exist\n\n@param name the assigned name of the consumer requesting a block of work\n@return a description a block of work, or \"exit\" if no more blocks exist",
"Get an image using the specified URL suffix.\n\n@deprecated\n@param suffix\nThe URL suffix, including the .extension\n@return The BufferedImage object\n@throws IOException",
"Read the domain controller's data from an input stream.\n\n@param instream the input stream\n@throws Exception",
"Retrieve a byte array of containing the data starting at the supplied\noffset in the FixDeferFix file. Note that this method will return null\nif the requested data is not found for some reason.\n\n@param offset Offset into the file\n@return Byte array containing the requested data",
"ensures that the first invocation of a date seeking\nrule is captured",
"Draw an elliptical interior with this color.\n\n@param rect rectangle in which ellipse should fit\n@param color colour to use for filling",
"Execute for result.\n\n@param executionContext the execution context\n@return the result\n@throws IOException for any error"
] |
protected Query buildPrefetchQuery(Collection ids)
{
CollectionDescriptor cds = getCollectionDescriptor();
QueryByCriteria query = buildPrefetchQuery(ids, cds.getForeignKeyFieldDescriptors(getItemClassDescriptor()));
// check if collection must be ordered
if (!cds.getOrderBy().isEmpty())
{
Iterator iter = cds.getOrderBy().iterator();
while (iter.hasNext())
{
query.addOrderBy((FieldHelper) iter.next());
}
}
return query;
} | [
"Build the query to perform a batched read get orderBy settings from CollectionDescriptor\n\n@param ids Collection containing all identities of objects of the ONE side"
] | [
"Returns all factory instances that match the query.\n\n@param query the factory query, not null.\n@return the instances found, never null.",
"Get interfaces implemented by clazz\n\n@param clazz\n@return",
"Helper to get locale specific properties.\n\n@return the locale specific properties map.",
"Converts from a Fluo RowColumn to a Accumulo Key\n\n@param rc RowColumn\n@return Key",
"Use this API to add dnstxtrec resources.",
"Removes statement ids from a collection of statement groups.\n@param statementIds\n@param claims\n@return",
"Returns the collection definition of the given name if it exists.\n\n@param name The name of the collection\n@return The collection definition or <code>null</code> if there is no such collection",
"Retrieve the version number",
"Returns the time elapsed by the user on the app\n@return Time elapsed by user on the app in int"
] |
public static JasperPrint generateJasperPrint(DynamicReport dr, LayoutManager layoutManager, Connection con, Map<String, Object> _parameters) throws JRException {
log.info("generating JasperPrint");
JasperPrint jp;
if (_parameters == null)
_parameters = new HashMap<String, Object>();
visitSubreports(dr, _parameters);
compileOrLoadSubreports(dr, _parameters, "r");
DynamicJasperDesign jd = generateJasperDesign(dr);
Map<String, Object> params = new HashMap<String, Object>();
if (!_parameters.isEmpty()) {
registerParams(jd, _parameters);
params.putAll(_parameters);
}
registerEntities(jd, dr, layoutManager);
layoutManager.applyLayout(jd, dr);
JRPropertiesUtil.getInstance(DefaultJasperReportsContext.getInstance()).setProperty(JRCompiler.COMPILER_PREFIX, DJCompilerFactory.getCompilerClassName());
//JRProperties.setProperty(JRCompiler.COMPILER_PREFIX, DJCompilerFactory.getCompilerClassName());
JasperReport jr = JasperCompileManager.compileReport(jd);
params.putAll(jd.getParametersWithValues());
jp = JasperFillManager.fillReport(jr, params, con);
return jp;
} | [
"For running queries embebed in the report design\n\n@param dr\n@param layoutManager\n@param con\n@param _parameters\n@return\n@throws JRException"
] | [
"Flushes all changes to disk.",
"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",
"read CustomInfo list from table.\n\n@param eventId the event id\n@return the map",
"Get an extent aware RsIterator based on the Query\n\n@param query\n@param cld\n@param factory the Factory for the RsIterator\n@return OJBIterator",
"Updates the internal list of dates and fires a value change if necessary.\n\n@param dates the dates to set.",
"Throws an exception if at least one results directory is missing.",
"Use this API to fetch all the sslpolicylabel resources that are configured on netscaler.",
"EXecutes command to given container returning the inspection object as well. This method does 3 calls to\ndockerhost. Create, Start and Inspect.\n\n@param containerId\nto execute command.",
"Get the current stack trace element, skipping anything from known logging classes.\n@return The current stack trace for this thread"
] |
public void store(Object obj) throws PersistenceBrokerException
{
obj = extractObjectToStore(obj);
// only do something if obj != null
if(obj == null) return;
ClassDescriptor cld = getClassDescriptor(obj.getClass());
/*
if one of the PK fields was null, we assume the objects
was new and needs insert
*/
boolean insert = serviceBrokerHelper().hasNullPKField(cld, obj);
Identity oid = serviceIdentity().buildIdentity(cld, obj);
/*
if PK values are set, lookup cache or db to see whether object
needs insert or update
*/
if (!insert)
{
insert = objectCache.lookup(oid) == null
&& !serviceBrokerHelper().doesExist(cld, oid, obj);
}
store(obj, oid, cld, insert);
} | [
"Store an Object.\n@see org.apache.ojb.broker.PersistenceBroker#store(Object)"
] | [
"Use this API to add vpath.",
"Register opened database via the PBKey.",
"This method is used to extract the resource hyperlink attributes\nfrom a block of data and call the appropriate modifier methods\nto configure the specified task object.\n\n@param resource resource instance\n@param data hyperlink data block",
"Given a year, month, and day, find the number of occurrences of that day in the month\n\n@param year the year\n@param month the month\n@param day the day\n@return the number of occurrences of the day in the month",
"Set the payload to the fileModel of the given instance even though the variable is not directly of it's type. This is mainly to simplify the\ncreation of the rule, when the FileModel itself is not being iterated but just a model referencing it.",
"Formats a resource type.\n\n@param resource MPXJ resource\n@return Primavera resource type",
"This method determines whether the cost rate table should be written.\nA default cost rate table should not be written to the file.\n\n@param entry cost rate table entry\n@param from from date\n@return boolean flag",
"Read a single weekday from the provided JSON value.\n@param val the value to read the week day from.\n@return the week day read\n@throws IllegalArgumentException thrown if the provided JSON value is not the representation of a week day.",
"Returns the bundle jar classpath element."
] |
public boolean isRunning(final ProcessorGraphNode processorGraphNode) {
this.processorLock.lock();
try {
return this.runningProcessors.containsKey(processorGraphNode.getProcessor());
} finally {
this.processorLock.unlock();
}
} | [
"Return true if the processor of the node is currently being executed.\n\n@param processorGraphNode the node to test."
] | [
"Method which performs strength checks on password. It returns outcome which can be used by CLI.\n\n@param isAdminitrative - administrative checks are less restrictive. This means that weak password or one which violates restrictions is not indicated as failure.\nAdministrative checks are usually performed by admin changing/setting default password for user.\n@param userName - the name of user for which password is set.\n@param password - password.\n@return",
"Close the ClientRequestExecutor.",
"See if a simple sequence can be used to extract the array. A simple extent is a continuous block from\na min to max index\n\n@return true if it is a simple range or false if not",
"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.",
"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",
"Creates a map of metadata from json.\n@param jsonObject metadata json object for metadata field in get /files?fileds=,etadata.scope.template response\n@return Map of String as key a value another Map with a String key and Metadata value",
"Put everything smaller than days at 0\n@param cal calendar to be cleaned",
"Adds new holes to the polygon.\n\n@param holes holes, must be contained in the exterior ring and must not overlap or\nintersect another hole\n@return this for chaining",
"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"
] |
@SuppressWarnings("rawtypes")
private MailInboundChannelAdapterSpec getImapFlowBuilder(URLName urlName) {
return Mail.imapInboundAdapter(urlName.toString())
.shouldMarkMessagesAsRead(this.properties.isMarkAsRead());
} | [
"Method to build Mail Channel Adapter for IMAP.\n@param urlName Mail source URL.\n@return Mail Channel for IMAP"
] | [
"Given a file name and read-only storage format, tells whether the file\nname format is correct\n\n@param fileName The name of the file\n@param format The RO format\n@return true if file format is correct, else false",
"B tensor is ignored for CUDNN_OP_TENSOR_SQRT, CUDNN_OP_TENSOR_NOT.",
"compare between two points.",
"Gets an element of the matrix.\n\n@param row\nthe row\n@param col\nthe column\n@return the element at the given position",
"Converts an image in RGB mode to BINARY mode\n\n@param img image\n@param threshold grays cale threshold\n@return new MarvinImage instance in BINARY mode",
"Does the slice contain only 7-bit ASCII characters.",
"width of input section",
"List the photos with the most views, comments or favorites.\n\n@param date\n(Optional) Stats will be returned for this date. A day according to Flickr Stats starts at midnight GMT for all users, and timestamps will\nautomatically be rounded down to the start of the day. If no date is provided, all time view counts will be returned.\n@param sort\n(Optional) The order in which to sort returned photos. Defaults to views. The possible values are views, comments and favorites. Other sort\noptions are available through flickr.photos.search.\n@param perPage\n(Optional) Number of referrers to return per page. If this argument is omitted, it defaults to 25. The maximum allowed value is 100.\n@param page\n(Optional) The page of results to return. If this argument is omitted, it defaults to 1.\n@throws FlickrException\n@see \"http://www.flickr.com/services/api/flickr.stats.getPopularPhotos.html\"",
"Determines the median value of the data set.\n@return If the number of elements is odd, returns the middle element.\nIf the number of elements is even, returns the midpoint of the two\nmiddle elements.\n@since 1.0.1"
] |
protected boolean prepareClose() {
synchronized (lock) {
final State state = this.state;
if (state == State.OPEN) {
this.state = State.CLOSING;
lock.notifyAll();
return true;
}
}
return false;
} | [
"Signal that we are about to close the channel. This will not have any affect on the underlying channel, however\nprevent setting a new channel.\n\n@return whether the closing state was set successfully"
] | [
"This method processes any extended attributes associated with a task.\n\n@param xml MSPDI task instance\n@param mpx MPX task instance",
"Multiply two complex numbers.\n\n@param z1 Complex Number.\n@param z2 Complex Number.\n@return Returns new ComplexNumber instance containing the multiply of specified complex numbers.",
"Utility function that constructs AdminClient.\n\n@param url URL pointing to the bootstrap node\n@return Newly constructed AdminClient",
"Get the raw data bytes of the device update packet.\n\n@return the data sent by the device to update its status",
"Save a SVG graphic to the given path.\n\n@param graphics2d The SVG graphic to save.\n@param path The file.",
"This produces a string with no compressed segments and all segments of full length,\nwhich is 3 characters for IPv4 segments.",
"Get the Operation metadata for an MBean by name.\n@return the {@link Map} of {@link String} operation names to {@link MBeanOperationInfo} values.",
"The token was previously determined as potentially to-be-splitted thus we\nemit additional indentation or dedenting tokens.",
"Evalutes AND and OR operators.\n\n@param container data context\n@param promptValues responses to prompts\n@return operator result"
] |
public static ModelNode getParentAddress(final ModelNode address) {
if (address.getType() != ModelType.LIST) {
throw new IllegalArgumentException("The address type must be a list.");
}
final ModelNode result = new ModelNode();
final List<Property> addressParts = address.asPropertyList();
if (addressParts.isEmpty()) {
throw new IllegalArgumentException("The address is empty.");
}
for (int i = 0; i < addressParts.size() - 1; ++i) {
final Property property = addressParts.get(i);
result.add(property.getName(), property.getValue());
}
return result;
} | [
"Finds the parent address, everything before the last address part.\n\n@param address the address to get the parent\n\n@return the parent address\n\n@throws IllegalArgumentException if the address is not of type {@link ModelType#LIST} or is empty"
] | [
"Finds the parent group of the given one and returns it\n\n@param group Group for which the parent is needed\n@return The parent group of the given one. If the given one is the first one, it returns the same group",
"Set the options based on the tag elements of the ClassDoc parameter",
"Generate a new check box with the provided date and check state.\n@param date date for the check box.\n@param checkState the initial check state.\n@return the created check box",
"This method extracts data for a single resource from a GanttProject file.\n\n@param gpResource resource data",
"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.",
"Start the StatsD reporter, if configured.\n\n@throws URISyntaxException",
"Convenience method for retrieving an Integer resource.\n\n@param locale locale identifier\n@param key resource key\n@return resource value",
"Extracts the words from a string. Words are seperated by a space character.\n\n@param line The line that is being parsed.\n@return A list of words contained on the line.",
"Checks if the dependency server is available\n\n@return true if the server is reachable, false otherwise"
] |
public static String getRelativePathName(Path root, Path path) {
Path relative = root.relativize(path);
return Files.isDirectory(path) && !relative.toString().endsWith("/") ? String.format("%s/", relative.toString()) : relative.toString();
} | [
"Get the relative path of an application\n\n@param root the root to relativize against\n@param path the path to relativize\n@return the relative path"
] | [
"Bessel function of the first kind, of order n.\n\n@param n Order.\n@param x Value.\n@return I value.",
"Sets all elements in this matrix to their absolute values. Note\nthat this operation is in-place.\n@see MatrixFunctions#abs(DoubleMatrix)\n@return this matrix",
"Decomposes and overwrites the input matrix.\n\n@param A Semi-Positive Definite (SPD) system matrix. Modified. Reference saved.\n@return If the matrix can be decomposed. Will always return false of not SPD.",
"Returns a button component. On click, it triggers adding a bundle descriptor.\n@return a button for adding a descriptor to a bundle.",
"Controls whether we are currently staying in sync with the tempo master. Will only be meaningful if we are\nsending status packets.\n\n@param sync if {@code true}, our status packets will be tempo and beat aligned with the tempo master",
"Add join info to the query. This can be called multiple times to join with more than one table.",
"Resumes a given entry point type;\n\n@param entryPoint The entry point",
"If requested, adjust the bounds to the nearest scale and the map size.\n\n@param mapValues Map parameters.\n@param paintArea The size of the painting area.\n@param bounds The map bounds.\n@param dpi the DPI.",
"Reads a quoted string value from the request."
] |
public QueryBuilder<T, ID> join(QueryBuilder<?, ?> joinedQueryBuilder) throws SQLException {
addJoinInfo(JoinType.INNER, null, null, joinedQueryBuilder, JoinWhereOperation.AND);
return this;
} | [
"Join with another query builder. This will add into the SQL something close to \" INNER JOIN other-table ...\".\nEither the object associated with the current QueryBuilder or the argument QueryBuilder must have a foreign field\nof the other one. An exception will be thrown otherwise.\n\n<p>\n<b>NOTE:</b> This will do combine the WHERE statement of the two query builders with a SQL \"AND\". See\n{@link #joinOr(QueryBuilder)}.\n</p>"
] | [
"Calculate a threshold.\n\n@param x first string.\n@param y second string.\n@param p the threshold coefficient.\n@return 2 maxLength(x, y) (1-p)",
"Escapes args' string values according to format\n\n@param format the Format used by the PrintStream\n@param args the array of args to escape\n@return The cloned and escaped array of args",
"Copy a path recursively.\n@param source a Path pointing to a file or a directory that must exist\n@param target a Path pointing to a directory where the contents will be copied.\n@param overwrite overwrite existing files - if set to false fails if the target file already exists.\n@throws IOException",
"Create all the links possible between the Declaration and all the ImporterService matching the.\nImporterServiceFilter of the Linker.\n\n@param declarationSRef the ServiceReference<Declaration> of the Declaration",
"Get the aggregated result human readable string for easy display.\n\n\n@param aggregateResultMap the aggregate result map\n@return the aggregated result human",
"Find the animation associated with this avatar with the given name.\n@param name name of animation to look for\n@return {@link GVRAnimator} animation found or null if none with that name",
"Calculate the highlight color. Saturate at 0xff to make sure that high values\ndon't result in aliasing.\n\n@param _Slice The Slice which will be highlighted.",
"Set the attributes for this template.\n\n@param attributes the attribute map",
"Finds an Object of the specified type.\n\n@param <T> Object type.\n@param classType The class of type T.\n@param id The document _id field.\n@param rev The document _rev field.\n@return An object of type T.\n@throws NoDocumentException If the document is not found in the database."
] |
private void distributedProcessFinish(ResponseBuilder rb,
ComponentFields mtasFields) throws IOException {
// rewrite
Object mtasResponseRaw;
if ((mtasResponseRaw = rb.rsp.getValues().get("mtas")) != null
&& mtasResponseRaw instanceof NamedList) {
NamedList<Object> mtasResponse = (NamedList<Object>) mtasResponseRaw;
Object mtasResponseTermvectorRaw;
if ((mtasResponseTermvectorRaw = mtasResponse.get(NAME)) != null
&& mtasResponseTermvectorRaw instanceof ArrayList) {
MtasSolrResultUtil.rewrite(
(ArrayList<Object>) mtasResponseTermvectorRaw, searchComponent);
}
}
} | [
"Distributed process finish.\n\n@param rb the rb\n@param mtasFields the mtas fields\n@throws IOException Signals that an I/O exception has occurred."
] | [
"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",
"Compute 1-dimensional Perlin noise.\n@param x the x value\n@return noise value at x in the range -1..1",
"Mark content as obsolete. If content was already marked for obsolescenceTimeout ms then it is removed.\n\n@param ref the content refrence to be marked as obsolete.\n\n@return true if the content refrence is removed, fale otherwise.",
"Tokenize the the string as a package hierarchy\n\n@param str\n@return",
"Gets the metrics as a map whose keys are the metric name and whose values are the metric values.\n\n@return map",
"Translate a Wikimedia language code to its preferred value\nif this code is deprecated, or return it untouched if the string\nis not a known deprecated Wikimedia language code\n\n@param wikimediaLanguageCode\nthe language code as used by Wikimedia\n@return\nthe preferred language code corresponding to the original language code",
"Convenience method for first removing all enum style constants and then adding the single one.\n\n@see #removeEnumStyleNames(UIObject, Class)\n@see #addEnumStyleName(UIObject, Style.HasCssName)",
"Creates a spin wrapper for a data input. The data format of the\ninput is assumed to be JSON.\n\n@param input the input to wrap\n@return the spin wrapper for the input\n\n@throws IllegalArgumentException in case an argument of illegal type is provided (such as 'null')",
"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"
] |
public static auditmessages[] get(nitro_service service) throws Exception{
auditmessages obj = new auditmessages();
auditmessages[] response = (auditmessages[])obj.get_resources(service);
return response;
} | [
"Use this API to fetch all the auditmessages resources that are configured on netscaler."
] | [
"Save a SVG graphic to the given path.\n\n@param graphics2d The SVG graphic to save.\n@param path The file.",
"Returns string content of blob identified by specified blob handle. String contents cache is used.\n\n@param blobHandle blob handle\n@param txn {@linkplain Transaction} instance\n@return string content of blob identified by specified blob handle\n@throws IOException if something went wrong",
"Returns any events for the given resource ID since the last sync token\n\n@param resource Globally unique identifier for the resource.\n@param sync Sync token provided by a previous call to the events API\n@return Request object",
"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.",
"Retrieve the number of minutes per year for this calendar.\n\n@return minutes per year",
"Persists the current set of versions buffered for the current key into\nstorage, using the multiVersionPut api\n\nNOTE: Now, it could be that the stream broke off and has more pending\nversions. For now, we simply commit what we have to disk. A better design\nwould rely on in-stream markers to do the flushing to storage.",
"Await a state.\n\n@param expected the expected state\n@return {@code true} if the state was reached, {@code false} otherwise",
"convert object into another class using the JSON mapper\n\n@param <C> the generic target type\n@param object the object to convert\n@param targetClass the class of the target object\n@return the converted object\n@throws IllegalArgumentException if conversion fails",
"find all accessibility object and set active false for enable talk back."
] |
@Deprecated
@SuppressWarnings({ "rawtypes", "unchecked" })
public Map<String, PrimitiveAttribute<?>> getAttributes() {
if (!isPrimitiveOnly()) {
throw new UnsupportedOperationException("Primitive API not supported for nested association values");
}
return (Map) attributes;
} | [
"Get the primitive attributes for the associated object.\n\n@return attributes for associated objects\n@deprecated replaced by {@link #getAllAttributes()} after introduction of nested associations"
] | [
"TestNG returns a compound thread ID that includes the thread name and its numeric ID,\nseparated by an 'at' sign. We only want to use the thread name as the ID is mostly\nunimportant and it takes up too much space in the generated report.\n@param threadId The compound thread ID.\n@return The thread name.",
"Closes the outbound socket binding connection.\n\n@throws IOException",
"Given a list of keys and a number of splits find the keys to split on.\n\n@param keys the list of keys.\n@param numSplits the number of splits.",
"Retrieve the default number of minutes per month.\n\n@return minutes per month",
"Stop finding waveforms for all active players.",
"Get the time zone for a specific stock or index.\nFor stocks, the exchange suffix is extracted from the stock symbol to retrieve the time zone.\n\n@param symbol stock symbol in YahooFinance\n@return time zone of the exchange on which this stock is traded",
"Add some of the release build properties to a map.",
"Empirical data from 3.x, actual =40",
"a simple contains helper method, checks if array contains a numToCheck\n\n@param array array of ints\n@param numToCheck value to find\n@return True if found, false otherwise"
] |
public Schedule generateSchedule(LocalDate referenceDate, LocalDate startDate, LocalDate endDate) {
return ScheduleGenerator.createScheduleFromConventions(referenceDate, startDate, endDate, getFrequency(), getDaycountConvention(),
getShortPeriodConvention(), getDateRollConvention(), getBusinessdayCalendar(), getFixingOffsetDays(), getPaymentOffsetDays(), isUseEndOfMonth());
} | [
"Generate a schedule for the given start and end date.\n\n@param referenceDate The reference date (corresponds to \\( t = 0 \\).\n@param startDate The start date.\n@param endDate The end date.\n@return The schedule"
] | [
"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",
"Get the bean if it exists in the contexts.\n\n@return An instance of the bean\n@throws ContextNotActiveException if the context is not active\n@see javax.enterprise.context.spi.Context#get(BaseBean, boolean)",
"Gathers information, that couldn't be collected while tree traversal.",
"Add a raw statement as part of the where that can be anything that the database supports. Using more structured\nmethods is recommended but this gives more control over the query and allows you to utilize database specific\nfeatures.\n\n@param rawStatement\nThe statement that we should insert into the WHERE.\n\n@param args\nOptional arguments that correspond to any ? specified in the rawStatement. Each of the arguments must\nhave either the corresponding columnName or the sql-type set. <b>WARNING,</b> you cannot use the\n{@code SelectArg(\"columnName\")} constructor since that sets the _value_, not the name. Use\n{@code new SelectArg(\"column-name\", null);}.",
"Interfaces, enums, annotations, and abstract classes cannot be\ninstantiated.\n\n@param actionClass\nclass to check\n@return returns true if the class cannot be instantiated or should be\nignored",
"Expands all tabs into spaces. Assumes the CharSequence represents a single line of text.\n\n@param self A line to expand\n@param tabStop The number of spaces a tab represents\n@return The expanded toString() of this CharSequence\n@see #expandLine(String, int)\n@since 1.8.2",
"Get the filters ExporterServiceFilter and ExportDeclarationFilter from the properties, stop the instance if one of.\nthem is invalid.",
"Make a composite filter from the given sub-filters using AND to combine filters.",
"prefix the this class fk columns with the indirection table"
] |
public static nsacl6[] get(nitro_service service) throws Exception{
nsacl6 obj = new nsacl6();
nsacl6[] response = (nsacl6[])obj.get_resources(service);
return response;
} | [
"Use this API to fetch all the nsacl6 resources that are configured on netscaler."
] | [
"Creates a MetaMatcher based on the filter content.\n\n@param filterAsString the String representation of the filter\n@param metaMatchers the Map of custom MetaMatchers\n@return A MetaMatcher used to match the filter content",
"Extracts warnings that are returned in an API response.\n\n@param root\nroot node of the JSON result",
"Stops the emulator. Multiple calls are allowed.\n\n@throws DatastoreEmulatorException if the emulator cannot be stopped",
"Create a new service activator for the domain server communication services.\n\n@param endpointConfig the endpoint configuration\n@param managementURI the management connection URI\n@param serverName the server name\n@param serverProcessName the server process name\n@param authKey the authentication key\n@param managementSubsystemEndpoint whether to use the mgmt subsystem endpoint or not\n@return the service activator",
"Starts given docker machine.\n\n@param cliPathExec\nlocation of docker-machine or null if it is on PATH.\n@param machineName\nto be started.",
"Creates a replica of the node with the new partitions list\n\n@param node The node whose replica we are creating\n@param partitionsList The new partitions list\n@return Replica of node with new partitions list",
"Adds the deploy operation as a step to the composite operation.\n\n@param builder the builder to add the step to\n@param deployment the deployment to deploy",
"Takes an object and converts it to a string.\n\n@param mapper the object mapper\n@param object the object to convert\n@return json string",
"Retrieve the integer value used to represent a task field in an\nMPX file.\n\n@param value MPXJ task field value\n@return MPX field value"
] |
List<MwDumpFile> findDumpsLocally(DumpContentType dumpContentType) {
String directoryPattern = WmfDumpFile.getDumpFileDirectoryName(
dumpContentType, "*");
List<String> dumpFileDirectories;
try {
dumpFileDirectories = this.dumpfileDirectoryManager
.getSubdirectories(directoryPattern);
} catch (IOException e) {
logger.error("Unable to access dump directory: " + e.toString());
return Collections.emptyList();
}
List<MwDumpFile> result = new ArrayList<>();
for (String directory : dumpFileDirectories) {
String dateStamp = WmfDumpFile
.getDateStampFromDumpFileDirectoryName(dumpContentType,
directory);
if (dateStamp.matches(WmfDumpFileManager.DATE_STAMP_PATTERN)) {
WmfLocalDumpFile dumpFile = new WmfLocalDumpFile(dateStamp,
this.projectName, dumpfileDirectoryManager,
dumpContentType);
if (dumpFile.isAvailable()) {
result.add(dumpFile);
} else {
logger.error("Incomplete local dump file data. Maybe delete "
+ dumpFile.getDumpfileDirectory()
+ " to attempt fresh download.");
}
} // else: silently ignore directories that don't match
}
result.sort(Collections.reverseOrder(new MwDumpFile.DateComparator()));
logger.info("Found " + result.size() + " local dumps of type "
+ dumpContentType + ": " + result);
return result;
} | [
"Finds out which dump files of the given type have been downloaded\nalready. The result is a list of objects that describe the available dump\nfiles, in descending order by their date. Not all of the dumps included\nmight be actually available.\n\n@param dumpContentType\nthe type of dump to consider\n@return list of objects that provide information on available dumps"
] | [
"Deletes a specific client id for a profile\n\n@param model\n@param profileIdentifier\n@param clientUUID\n@return returns the table of the remaining clients or an exception if deletion failed for some reason\n@throws Exception",
"Checks if the object with the given identity has been deleted\nwithin the transaction.\n@param id The identity\n@return true if the object has been deleted\n@throws PersistenceBrokerException",
"Print duration in thousandths of minutes.\n\n@param duration Duration instance\n@return duration in thousandths of minutes",
"This method extracts data for a single resource from a Phoenix file.\n\n@param phoenixResource resource data\n@return Resource instance",
"region Override Methods",
"Swap the current version folder for a new one\n\n@param newStoreDirectory The path to the new version directory",
"Reads a line from the input stream, where a line is terminated by \\r, \\n, or \\r\\n\n@param trim whether to trim trailing \\r and \\ns",
"Roll the years forward or backward.\n\n@param startDate - The start date\n@param years - Negative to rollbackwards.",
"Sets the whole day flag.\n@param isWholeDay flag, indicating if the event lasts whole days."
] |
public static void popShell() {
ArrayList<CmsShell> shells = SHELL_STACK.get();
if (shells.size() > 0) {
shells.remove(shells.size() - 1);
}
} | [
"Removes top of thread-local shell stack."
] | [
"Gets a list of any tasks on this file with requested fields.\n\n@param fields optional fields to retrieve for this task.\n@return a list of tasks on this file.",
"Check if new license pattern is valid and doesn't match any existing one\n@param newComer License being added or edited\n@throws WebApplicationException if conflicts involving the newComer are detected",
"Notifies all interested subscribers of the given revision.\n\n@param mwRevision\nthe given revision\n@param isCurrent\ntrue if this is guaranteed to be the most current revision",
"Gets a SerialMessage with the BASIC GET command\n@return the serial message",
"Read correlation id.\n\n@param message the message\n@return correlation id from the message",
"Use this API to add policydataset.",
"Compute the offset for the item in the layout cache\n@return true if the item fits the container, false otherwise",
"See if a simple sequence can be used to extract the array. A simple extent is a continuous block from\na min to max index\n\n@return true if it is a simple range or false if not",
"Read an element which contains only a single list attribute of a given\ntype, returning it as an array.\n@param reader the reader\n@param attributeName the attribute name, usually \"value\"\n@param type the value type class\n@param <T> the value type\n@return the value list as an array\n@throws javax.xml.stream.XMLStreamException if an error occurs or if the\nelement does not contain the specified attribute, contains other\nattributes, or contains child elements."
] |
public void addAccessory(HomekitAccessory accessory) {
if (accessory.getId() <= 1 && !(accessory instanceof Bridge)) {
throw new IndexOutOfBoundsException(
"The ID of an accessory used in a bridge must be greater than 1");
}
addAccessorySkipRangeCheck(accessory);
} | [
"Add an accessory to be handled and advertised by this root. Any existing Homekit connections\nwill be terminated to allow the clients to reconnect and see the updated accessory list. When\nusing this for a bridge, the ID of the accessory must be greater than 1, as that ID is reserved\nfor the Bridge itself.\n\n@param accessory to advertise and handle."
] | [
"Returns all base types.\n\n@return An iterator of the base types",
"Read arguments from a file. Newline delimited, UTF-8 encoded. No fanciness to\navoid dependencies.",
"Add SQL to handle a unique=true field. THis is not for uniqueCombo=true.",
"Build filter for the request.\n\n@param layerFilter layer filter\n@param featureIds features to include in report (null for all)\n@return filter\n@throws GeomajasException filter could not be parsed/created",
"Installs the given set of URIs as the source level URIs. Does not copy the given\nset but uses it directly.",
"Utility method to retrieve the previous working date finish time, given\na date and time as a starting point.\n\n@param date date and time start point\n@return date and time of previous work finish",
"Sets an attribute in the main section of the manifest to a map.\nThe map entries will be joined with a single whitespace character, and each key-value pair will be joined with a '='.\n\n@param name the attribute's name\n@param values the attribute's value\n@return {@code this}\n@throws IllegalStateException if entries have been added or the JAR has been written prior to calling this methods.",
"Create a ModelNode representing the CPU the instance is running on.\n\n@return a ModelNode representing the CPU the instance is running on.\n@throws OperationFailedException",
"Processes one of the menu responses that jointly constitute the track metadata, updating our\nfields accordingly.\n\n@param item the menu response to be considered"
] |
public final static int readMdLink(final StringBuilder out, final String in, final int start)
{
int pos = start;
int counter = 1;
while (pos < in.length())
{
final char ch = in.charAt(pos);
if (ch == '\\' && pos + 1 < in.length())
{
pos = escape(out, in.charAt(pos + 1), pos);
}
else
{
boolean endReached = false;
switch (ch)
{
case '(':
counter++;
break;
case ' ':
if (counter == 1)
{
endReached = true;
}
break;
case ')':
counter--;
if (counter == 0)
{
endReached = true;
}
break;
}
if (endReached)
{
break;
}
out.append(ch);
}
pos++;
}
return (pos == in.length()) ? -1 : pos;
} | [
"Reads a markdown link.\n\n@param out\nThe StringBuilder to write to.\n@param in\nInput String.\n@param start\nStarting position.\n@return The new position or -1 if this is no valid markdown link."
] | [
"Log long string using verbose tag\n\n@param TAG The tag.\n@param longString The long string.",
"Method to build Mail Channel Adapter for IMAP.\n@param urlName Mail source URL.\n@return Mail Channel for IMAP",
"Swap the current version folder for a new one\n\n@param newStoreDirectory The path to the new version directory",
"Sets the country for which currencies should be requested.\n\n@param countries The ISO countries.\n@return the query for chaining.",
"Append field with quotes and escape characters added, if required.\n\n@return this",
"Check if we still need more nodes from the given zone and reduce the\nzoneReplicationFactor count accordingly.\n\n@param requiredRepFactor\n@param zoneId\n@return",
"Retrieves the class object for the given qualified class name.\n\n@param className The qualified name of the class\n@param initialize Whether the class shall be initialized\n@return The class object",
"Retrieve a map of custom document properties.\n\n@return the Document Summary Information Map",
"Retrieves state and metrics information for all channels on individual connection.\n@param connectionName the connection name to retrieve channels\n@return list of channels on the connection"
] |
public boolean contains(String id) {
assertNotEmpty(id, "id");
InputStream response = null;
try {
response = couchDbClient.head(new DatabaseURIHelper(dbUri).documentUri(id));
} catch (NoDocumentException e) {
return false;
} finally {
close(response);
}
return true;
} | [
"Checks if a document exist in the database.\n\n@param id The document _id field.\n@return true If the document is found, false otherwise."
] | [
"Obtains a Coptic zoned date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the Coptic zoned date-time, not null\n@throws DateTimeException if unable to create the date-time",
"Throws one RendererException if the content parent or layoutInflater are null.",
"Serializes this RuleSet in an XML document.\n\n@param destination The writer to which the XML document shall be written.",
"Inflate the main layout used to render videos in the list view.\n\n@param inflater LayoutInflater service to inflate.\n@param parent ViewGroup used to inflate xml.\n@return view inflated.",
"Merges information from the resource root into this resource root\n\n@param additionalResourceRoot The root to merge",
"Find the index of the specified name in field name array.",
"Returns the secret key matching the specified identifier.\n\n@param input the input stream containing the keyring collection\n@param keyId the 4 bytes identifier of the key",
"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.",
"Writes task baseline data.\n\n@param xmlTask MSPDI task\n@param mpxjTask MPXJ task"
] |
public EventBus emitAsync(String event, Object... args) {
return _emitWithOnceBus(eventContextAsync(event, args));
} | [
"Emit a string event with parameters and force all listeners to be called asynchronously.\n\n@param event\nthe target event\n@param args\nthe arguments passed in\n@see #emit(String, Object...)"
] | [
"Retrieve the result produced by a task with the given id in the group.\n\nThis method can be used to retrieve the result of invocation of both dependency\nand \"post-run\" dependent tasks. If task with the given id does not exists then\nIllegalArgumentException exception will be thrown.\n\n@param taskId the task item id\n@return the task result, null will be returned if task has not yet been invoked",
"Performs an implicit double step using the values contained in the lower right hand side\nof the submatrix for the estimated eigenvector values.\n@param x1\n@param x2",
"Mark the top level deployment as being a JPA deployment. If the deployment is not a top level deployment the parent is\nmarked instead",
"Print a task type.\n\n@param value TaskType instance\n@return task type value",
"Computes execution time\n@param extra",
"Sets the jdbc connection to use.\n\n@param jcd The connection to use\n@throws PlatformException If the target database cannot be handled with torque",
"Given a interim cluster with a previously vacated zone, constructs a new\ncluster object with the drop zone completely removed\n\n@param intermediateCluster\n@param dropZoneId\n@return adjusted cluster with the zone dropped",
"Add a IN clause so the column must be equal-to one of the objects from the list passed in.",
"Create the work pattern assignment map.\n\n@param rows calendar rows\n@return work pattern assignment map"
] |
public static DatabaseFieldConfig fromReader(BufferedReader reader) throws SQLException {
DatabaseFieldConfig config = new DatabaseFieldConfig();
boolean anything = false;
while (true) {
String line;
try {
line = reader.readLine();
} catch (IOException e) {
throw SqlExceptionUtil.create("Could not read DatabaseFieldConfig from stream", e);
}
if (line == null) {
break;
}
// we do this so we can support multiple class configs per file
if (line.equals(CONFIG_FILE_END_MARKER)) {
break;
}
// skip empty lines or comments
if (line.length() == 0 || line.startsWith("#") || line.equals(CONFIG_FILE_START_MARKER)) {
continue;
}
String[] parts = line.split("=", -2);
if (parts.length != 2) {
throw new SQLException("DatabaseFieldConfig reading from stream cannot parse line: " + line);
}
readField(config, parts[0], parts[1]);
anything = true;
}
// if we got any config lines then we return the config
if (anything) {
return config;
} else {
// otherwise we return null for none
return null;
}
} | [
"Load a configuration in from a text file.\n\n@return A config if any of the fields were set otherwise null on EOF."
] | [
"Execute our refresh query statement and then update all of the fields in data with the fields from the result.\n\n@return 1 if we found the object in the table by id or 0 if not.",
"Given a json node, find a nested node using given composed key.\n\n@param jsonNode the parent json node\n@param composedKey a key combines multiple keys using flattening dots.\nFlattening dots are dot character '.' those are not preceded by slash '\\'\nEach flattening dot represents a level with following key as field key in that level\n@return nested json node located using given composed key",
"Tell a device to become tempo master.\n\n@param deviceNumber the device we want to take over the role of tempo master\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",
"Add the specified files in reverse order.",
"Return a list of contacts for a user who have recently uploaded photos along with the total count of photos uploaded.\n\n@param lastUpload\nLimits the resultset to contacts that have uploaded photos since this date. The date should be in the form of a Unix timestamp. The default,\nand maximum, offset is (1) hour. (Optional, can be null)\n@param filter\nLimit the result set to all contacts or only those who are friends or family.<br/>\nValid options are: <b>ff</b> -> friends and family, <b>all</b> -> all your contacts. (Optional, can be null)\n\n@return List of Contacts\n@throws FlickrException",
"Searches the variables layers, top to bottom, for the iterable having all of it's items of the given type. Return\nnull if not found.",
"A specific, existing custom field can be updated by making a PUT request on the URL for that custom field. Only the fields provided in the `data` block will be updated; any unspecified fields will remain unchanged\n\nWhen using this method, it is best to specify only those fields you wish to change, or else you may overwrite changes made by another user since you last retrieved the custom field.\n\nA custom field's `type` cannot be updated.\n\nAn enum custom field's `enum_options` cannot be updated with this endpoint. Instead see \"Work With Enum Options\" for information on how to update `enum_options`.\n\nReturns the complete updated custom field record.\n\n@param customField Globally unique identifier for the custom field.\n@return Request object",
"Ranks a map based on integer values\n@param inputMap Input\n@return The ranked map",
"Gets all the enterprise events that occurred within a specified date range.\n@param api the API connection to use.\n@param after the lower bound on the timestamp of the events returned.\n@param before the upper bound on the timestamp of the events returned.\n@param types an optional list of event types to filter by.\n@return a log of all the events that met the given criteria."
] |
public static Variable deserialize(String s,
VariableType variableType) {
return deserialize(s,
variableType,
null);
} | [
"Deserializes a variable, NOT checking whether the datatype is custom\n@param s\n@param variableType\n@return"
] | [
"Add the option specifying if the categories should be displayed collapsed\nwhen the dialog opens.\n\n@see org.opencms.ui.actions.I_CmsADEAction#getParams()",
"Set the values of a set of knots.\n@param x the knot positions\n@param y the knot colors\n@param types the knot types\n@param offset the first knot to set\n@param count the number of knots",
"Recurses the given folder and adds references to these files to the graph as FileModels.\n\nWe don't set the parent file model in the case of the initial children, as the direct parent is really the archive itself. For example for file\n\"root.zip/pom.xml\" - the parent for pom.xml is root.zip, not the directory temporary directory that happens to hold it.",
"Log a byte array.\n\n@param label label text\n@param data byte array",
"Should be called after all columns have been created\n@param headerStyle\n@param totalStyle\n@param totalHeaderStyle\n@return",
"Get a property as a json object or null.\n\n@param key the property name",
"This method will add a DemoInterceptor into every in and every out phase\nof the interceptor chains.\n\n@param provider",
"Builds the radio input to set the export and secure property.\n\n@param propName the name of the property to build the radio input for\n\n@return html for the radio input\n\n@throws CmsException if the reading of a property fails",
"Gets the site label for the entry.\n\n@param cms the current CMS context\n@param entry the entry\n@return the site label for the entry"
] |
public int getCrossZonePartitionStoreMoves() {
int xzonePartitionStoreMoves = 0;
for (RebalanceTaskInfo info : batchPlan) {
Node donorNode = finalCluster.getNodeById(info.getDonorId());
Node stealerNode = finalCluster.getNodeById(info.getStealerId());
if(donorNode.getZoneId() != stealerNode.getZoneId()) {
xzonePartitionStoreMoves += info.getPartitionStoreMoves();
}
}
return xzonePartitionStoreMoves;
} | [
"Determines total number of partition-stores moved across zones.\n\n@return number of cross zone partition-store moves"
] | [
"Given a list of store definitions, makes sure that rebalance supports all\nof them. If not it throws an error.\n\n@param storeDefList List of store definitions\n@return Filtered list of store definitions which rebalancing supports",
"for testing purpose",
"Adds a shutdown hook for the process.\n\n@param process the process to add a shutdown hook for\n\n@return the thread set as the shutdown hook\n\n@throws java.lang.SecurityException If a security manager is present and it denies {@link\njava.lang.RuntimePermission <code>RuntimePermission(\"shutdownHooks\")</code>}",
"If you register a CustomExpression with the name \"customExpName\", then this will create the text needed\nto invoke it in a JRDesignExpression\n\n@param customExpName\n@param usePreviousFieldValues\n@return",
"Add the collection of elements to this collection. This will also them to the associated database table.\n\n@return Returns true if any of the items did not already exist in the collection otherwise false.",
"Fling the content\n\n@param velocityX The initial velocity in the X direction. Positive numbers mean that the\nfinger/cursor is moving to the left on the screen, which means we want to\nscroll towards the beginning.\n@param velocityY The initial velocity in the Y direction. Positive numbers mean that the\nfinger/cursor is moving down the screen, which means we want to scroll\ntowards the top.\n@param velocityZ TODO: Z-scrolling is currently not supported\n@return",
"Renders a time period in human readable form\n\n@param time the time in milliseconds\n@return the time in human readable form",
"Creates all propertyvfsbundle files for the currently loaded translations.\nThe method is used to convert xmlvfsbundle files into propertyvfsbundle files.\n\n@throws CmsIllegalArgumentException thrown if resource creation fails.\n@throws CmsLoaderException thrown if the propertyvfsbundle type can't be read from the resource manager.\n@throws CmsException thrown if creation, type retrieval or locking fails.",
"Returns the scene graph root.\n\nThis method is part of the wrapped API (see {@link AiWrapperProvider}\nfor details on wrappers).<p>\n\nThe built-in behavior is to return a {@link AiVector}.\n\n@param wrapperProvider the wrapper provider (used for type inference)\n@return the scene graph root"
] |
public static String format(ImageFormat format) {
if (format == null) {
throw new IllegalArgumentException("You must specify an image format.");
}
return FILTER_FORMAT + "(" + format.value + ")";
} | [
"Specify the output format of the image.\n\n@see ImageFormat"
] | [
"Return the filesystem path needed to mount the NFS filesystem associated with a particular media slot.\n\n@param slot the slot whose filesystem is desired\n\n@return the path to use in the NFS mount request to access the files mounted in that slot\n\n@throws IllegalArgumentException if it is a slot that we don't know how to handle",
"check max size of each message\n@param maxMessageSize the max size for each message",
"Calculate the determinant.\n\n@return Determinant.",
"Select which view to display based on the state of the promotion. Will return the form if user selects to perform\npromotion. Progress will be returned if the promotion is currently in progress.",
"Use this API to fetch filterpolicy_csvserver_binding resources of given name .",
"Read task data from a PEP file.",
"checks whether the specified Object obj is write-locked by Transaction tx.\n@param tx the transaction\n@param obj the Object to be checked\n@return true if lock exists, else false",
"Set the attributes for the associated object.\n\n@param attributes attributes for associated objects\n@deprecated replaced by {@link #setAllAttributes(Map)} after introduction of nested associations",
"Use this API to rename a nsacl6 resource."
] |
private Boolean readOptionalBoolean(JSONObject json, String key) {
try {
return Boolean.valueOf(json.getBoolean(key));
} catch (JSONException e) {
LOG.debug("Reading optional JSON boolean failed. Default to provided default value.", e);
}
return null;
} | [
"Read an optional boolean value form a JSON Object.\n@param json the JSON object to read from.\n@param key the key for the boolean value in the provided JSON object.\n@return the boolean or null if reading the boolean fails."
] | [
"Loads the script from a text string.\n@param scriptText text string containing script to execute.\n@param language language (\"js\" or \"lua\")",
"Checks if the given operator code is a valid one.\n\n@param operatorCode an operator code to evaluate\n@throws IllegalStateException if operatorCode is not a known operator code.",
"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",
"Returns a new color that has the hue adjusted by the specified\namount.",
"Intercepts calls for setting a key and value for a JSON object\n\n@param name the key name\n@param args the value associated with the key",
"Creates an immutable list that consists of the elements in the given array. A copy of the given array is used which means\nthat any modifications to the given array will not affect the immutable list.\n\n@param elements the given array of elements\n@return an immutable list",
"Called by spring on initialization.",
"Returns a count of in-window events.\n\n@return the the count of in-window events.",
"Returns an Object array of all FK field values of the specified object.\nIf the specified object is an unmaterialized Proxy, it will be materialized\nto read the FK values.\n\n@throws MetadataException if an error occours while accessing ForeingKey values on obj"
] |
public T withStatement(Statement statement) {
PropertyIdValue pid = statement.getMainSnak()
.getPropertyId();
ArrayList<Statement> pidStatements = this.statements.get(pid);
if (pidStatements == null) {
pidStatements = new ArrayList<Statement>();
this.statements.put(pid, pidStatements);
}
pidStatements.add(statement);
return getThis();
} | [
"Adds an additional statement to the constructed document.\n\n@param statement\nthe additional statement\n@return builder object to continue construction"
] | [
"Read flow id from message.\n\n@param message the message\n@return the FlowId as string",
"Calculate the signature by which we can reliably recognize a loaded track.\n\n@param title the track title\n@param artist the track artist, or {@code null} if there is no artist\n@param duration the duration of the track in seconds\n@param waveformDetail the monochrome waveform detail of the track\n@param beatGrid the beat grid of the track\n\n@return the SHA-1 hash of all the arguments supplied, or {@code null} if any either {@code waveFormDetail} or {@code beatGrid} were {@code null}",
"Terminates with a help message if the parse is not successful\n\n@param args command line arguments to\n@return the format in a correct state",
"Use this API to fetch all the nsrollbackcmd resources that are configured on netscaler.",
"Adds an additional alias to the constructed document.\n\n@param text\nthe text of the alias\n@param languageCode\nthe language code of the alias\n@return builder object to continue construction",
"Use this API to update dbdbprofile resources.",
"Gets a SerialMessage with the WAKE_UP_NO_MORE_INFORMATION command.\n@return the serial message",
"Writes the object to the specified document, optionally creating a child\nelement. The object in this case should be a point.\n\n@param o the object (of type Point).\n@param document the document to write to.\n@param asChild create child element if true.\n@throws RenderException",
"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"
] |
public HostName toHostName() {
HostName host = fromHost;
if(host == null) {
fromHost = host = toCanonicalHostName();
}
return host;
} | [
"If this address was resolved from a host, returns that host. Otherwise, does a reverse name lookup."
] | [
"Utility method to read a percentage value.\n\n@param data data block\n@param offset offset into data block\n@return percentage value",
"Returns the screen width in pixels\n\n@param context is the context to get the resources\n@return the screen width in pixels",
"Sets the bit at the specified index.\n@param index The index of the bit to set (0 is the least-significant bit).\n@param set A boolean indicating whether the bit should be set or not.\n@throws IndexOutOfBoundsException If the specified index is not a bit\nposition in this bit string.",
"Obtains a Symmetry010 local date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the Symmetry010 local date-time, not null\n@throws DateTimeException if unable to create the date-time",
"Use this API to add cachecontentgroup.",
"Returns true if the default profile for the specified uuid is active\n\n@return true if active, otherwise false",
"Checks whether the given set of properties is available.\n\n@param keys the keys to check\n@return true if all properties are available, false otherwise",
"Get all categories\nGet all tags marked as categories\n@return ApiResponse<TagsEnvelope>\n@throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body",
"Use this API to fetch sslcipher resources of given names ."
] |
public void refreshBitmapShader()
{
shader = new BitmapShader(Bitmap.createScaledBitmap(image, canvasSize, canvasSize, false), Shader.TileMode.CLAMP, Shader.TileMode.CLAMP);
} | [
"Reinitializes the shader texture used to fill in\nthe Circle upon drawing."
] | [
"Returns the bounding box of the vertices.\n@param corners destination array to get corners of bounding box.\nThe first three entries are the minimum X,Y,Z values\nand the next three are the maximum X,Y,Z.\n@return true if bounds are not empty, false if empty (no vertices)",
"Sets the promotion state.\n\n<P>INFO: This method updates automatically all the contained artifacts.\n\n@param promoted boolean",
"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.",
"Search for interesting photos using the Flickr Interestingness algorithm.\n\n@param params\nAny search parameters\n@param perPage\nNumber of items per page\n@param page\nThe page to start on\n@return A PhotoList\n@throws FlickrException",
"Get the authorization uri, where the user logs in.\n\n@param redirectUri\nUri the user is redirected to, after successful authorization.\nThis must be the same as specified at the Eve Online developer\npage.\n@param scopes\nScopes of the Eve Online SSO.\n@param state\nThis should be some secret to prevent XRSF, please read:\nhttp://www.thread-safe.com/2014/05/the-correct-use-of-state-\nparameter-in.html\n@return",
"Returns a compact representation of all of the tags the task has.\n\n@param task The task to get tags on.\n@return Request object",
"Add profile to database, return collection of profile data. Called when 'enter' is hit in the UI\ninstead of 'submit' button\n\n@param model\n@param name\n@return\n@throws Exception",
"Map custom info.\n\n@param ciType the custom info type\n@return the map",
"This method is used to push install referrer via Intent\n@param intent An Intent with the install referrer parameters"
] |
protected RollbackPatch createRollbackPatch(final String patchId, final Patch.PatchType patchType) {
// Process elements
final List<PatchElement> elements = new ArrayList<PatchElement>();
// Process layers
for (final PatchEntry entry : getLayers()) {
final PatchElement element = createRollbackElement(entry);
elements.add(element);
}
// Process add-ons
for (final PatchEntry entry : getAddOns()) {
final PatchElement element = createRollbackElement(entry);
elements.add(element);
}
final InstalledIdentity installedIdentity = modification.getUnmodifiedInstallationState();
final String name = installedIdentity.getIdentity().getName();
final IdentityImpl identity = new IdentityImpl(name, modification.getVersion());
if (patchType == Patch.PatchType.CUMULATIVE) {
identity.setPatchType(Patch.PatchType.CUMULATIVE);
identity.setResultingVersion(installedIdentity.getIdentity().getVersion());
} else if (patchType == Patch.PatchType.ONE_OFF) {
identity.setPatchType(Patch.PatchType.ONE_OFF);
}
final List<ContentModification> modifications = identityEntry.rollbackActions;
final Patch delegate = new PatchImpl(patchId, "rollback patch", identity, elements, modifications);
return new PatchImpl.RollbackPatchImpl(delegate, installedIdentity);
} | [
"Create a rollback patch based on the recorded actions.\n\n@param patchId the new patch id, depending on release or one-off\n@param patchType the current patch identity\n@return the rollback patch"
] | [
"Pause between cluster change in metadata and starting server rebalancing\nwork.",
"Iterate through dependencies",
"Returns an iterator that iterates over all elements greater or equal to key in ascending order\n\n@param key key\n@return iterator",
"given the groupId, and 2 string arrays, adds the name-responses pair to the table_override\n\n@param groupId ID of group\n@param methodName name of method\n@param className name of class\n@throws Exception exception",
"Reads all sub-categories below the provided category.\n@return The map from the provided category to it's sub-categories in a {@link CmsJspCategoryAccessBean}.",
"Extract resource type from a resource ID string.\n@param id the resource ID string\n@return the resource type",
"This method extracts task data from an MSPDI file.\n\n@param project Root node of the MSPDI file",
"Parse a list of Photos from given Element.\n\n@param photosElement\n@return PhotoList",
"Finish the oauth flow after the user was redirected back.\n\n@param code\nCode returned by the Eve Online SSO\n@param state\nThis should be some secret to prevent XRSF see\ngetAuthorizationUri\n@throws net.troja.eve.esi.ApiException"
] |
public void setEndType(final String value) {
final EndType endType = EndType.valueOf(value);
if (!endType.equals(m_model.getEndType())) {
removeExceptionsOnChange(new Command() {
public void execute() {
switch (endType) {
case SINGLE:
m_model.setOccurrences(0);
m_model.setSeriesEndDate(null);
break;
case TIMES:
m_model.setOccurrences(10);
m_model.setSeriesEndDate(null);
break;
case DATE:
m_model.setOccurrences(0);
m_model.setSeriesEndDate(m_model.getStart() == null ? new Date() : m_model.getStart());
break;
default:
break;
}
m_model.setEndType(endType);
valueChanged();
}
});
}
} | [
"Set the duration option.\n@param value the duration option to set ({@link EndType} as string)."
] | [
"Aggregates a list of templates specified by @Template",
"Set the values using the specified Properties object.\n\n@param properties Properties object containing specific property values\nfor the RESTClient config\n\nNote: We're using the same property names as that in ClientConfig\nfor backwards compatibility.",
"Gets Widget bounds depth\n@return depth",
"Get the PropertyDescriptor for aClass and aPropertyName",
"Process StepStartedEvent. New step will be created and added to\nstepStorage.\n\n@param event to process",
"Sets a custom configuration attribute.\n@param attributeName the attribute name. Names starting with\n{@link #JDBC_PROPERTY_NAME_PREFIX} will be used (without the prefix) by the\nConnectionFactory when creating connections from DriverManager\n(not used for external DataSource connections). Names starting with\n{@link #DBCP_PROPERTY_NAME_PREFIX} to Commons DBCP (if used, also without prefix).\n@param attributeValue the attribute value",
"Returns width and height that allow the given source width, height to fit inside the target width, height\nwithout losing aspect ratio",
"adds a FIELDDESCRIPTOR to this ClassDescriptor.\n@param fld",
"Get the value of the fist child element with the given name.\n\n@param element\nThe parent element\n@param name\nThe child element name\n@return The child element value or null"
] |
public static @Nullable CleverTapAPI getInstance(Context context) throws CleverTapMetaDataNotFoundException, CleverTapPermissionsNotSatisfied {
// For Google Play Store/Android Studio tracking
sdkVersion = BuildConfig.SDK_VERSION_STRING;
return getDefaultInstance(context);
} | [
"Returns an instance of the CleverTap SDK.\n\n@param context The Android context\n@return The {@link CleverTapAPI} object\n@deprecated use {@link CleverTapAPI#getDefaultInstance(Context context)}"
] | [
"Scales the brightness of a pixel.",
"Sets the target implementation type required. This can be used to explicitly acquire a specific\nimplementation\ntype and use a query to configure the instance or factory to be returned.\n\n@param type the target implementation type, not null.\n@return this query builder for chaining.",
"Replaces current Collection mapped to key with the specified Collection.\nUse carefully!",
"Selects the single element of the collection for which the provided OQL query\npredicate is true.\n@param\tpredicate\tAn OQL boolean query predicate.\n@return The element that evaluates to true for the predicate. If no element\nevaluates to true, null is returned.\n@exception\torg.odmg.QueryInvalidException\tThe query predicate is invalid.",
"Return the inverse cumulative distribution function at x.\n\n@param x Argument\n@return Inverse cumulative distribution function at x.",
"Recurses the given folder and creates the FileModels vertices for the child files to the graph.",
"Returns the timestamp for the time at which the suite finished executing.\nThis is determined by finding the latest end time for each of the individual\ntests in the suite.\n@param suite The suite to find the end time of.\n@return The end time (as a number of milliseconds since 00:00 1st January 1970 UTC).",
"Converts a TimeUnit instance to an integer value suitable for\nwriting to an MPX file.\n\n@param recurrence RecurringTask instance\n@return integer value",
"Deletes the concrete representation of the specified object in the underlying\npersistence system. This method is intended for use in top-level api or\nby internal calls.\n\n@param obj The object to delete.\n@param ignoreReferences With this flag the automatic deletion/unlinking\nof references can be suppressed (independent of the used auto-delete setting in metadata),\nexcept {@link org.apache.ojb.broker.metadata.SuperReferenceDescriptor}\nthese kind of reference (descriptor) will always be performed. If <em>true</em>\nall \"normal\" referenced objects will be ignored, only the specified object is handled.\n@throws PersistenceBrokerException"
] |
public String getFormattedParentValue()
{
String result = null;
if (m_elements.size() > 2)
{
result = joinElements(m_elements.size() - 2);
}
return result;
} | [
"Retrieves the formatted parent WBS value.\n\n@return formatted parent WBS value"
] | [
"Gets the aggregate result count summary. only list the counts for brief\nunderstanding\n\n@return the aggregate result count summary",
"Set the attributes for the associated object.\n\n@param attributes attributes for associated objects\n@deprecated replaced by {@link #setAllAttributes(Map)} after introduction of nested associations",
"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.",
"Obtain the ID associated with a profile name\n\n@param profileName profile name\n@return ID of profile",
"Gets the value of the task property.\n\n<p>\nThis accessor method returns a reference to the live list,\nnot a snapshot. Therefore any modification you make to the\nreturned list will be present inside the JAXB object.\nThis is why there is not a <CODE>set</CODE> method for the task property.\n\n<p>\nFor example, to add a new item, do as follows:\n<pre>\ngetTask().add(newItem);\n</pre>\n\n\n<p>\nObjects of the following type(s) are allowed in the list\n{@link GanttDesignerRemark.Task }",
"Returns the squared of the Euclidean distance between this vector and\nvector v.\n\n@return squared distance between this vector and v",
"Method used to extract data from the block of properties and\ninsert the key value pair into a map.\n\n@param data block of property data\n@param previousItemOffset previous offset\n@param previousItemKey item key\n@param itemOffset current item offset",
"Parses command-line and gets metadata.\n\n@param args Command-line input\n@param printHelp Tells whether to print help only or execute command\nactually\n@throws IOException",
"Escape text to ensure valid JSON.\n\n@param value value\n@return escaped value"
] |
public static NbtAddress[] getAllByAddress( NbtAddress addr )
throws UnknownHostException {
try {
NbtAddress[] addrs = CLIENT.getNodeStatus( addr );
cacheAddressArray( addrs );
return addrs;
} catch( UnknownHostException uhe ) {
throw new UnknownHostException( "no name with type 0x" +
Hexdump.toHexString( addr.hostName.hexCode, 2 ) +
((( addr.hostName.scope == null ) ||
( addr.hostName.scope.length() == 0 )) ?
" with no scope" : " with scope " + addr.hostName.scope ) +
" for host " + addr.getHostAddress() );
}
} | [
"Retrieve all addresses of a host by it's address. NetBIOS hosts can\nhave many names for a given IP address. The name and IP address make the\nNetBIOS address. This provides a way to retrieve the other names for a\nhost with the same IP address.\n\n@param addr the address to query\n@throws UnknownHostException if address cannot be resolved"
] | [
"Parses a type annotation table to find the labels, and to visit the try\ncatch block annotations.\n\n@param u\nthe start offset of a type annotation table.\n@param mv\nthe method visitor to be used to visit the try catch block\nannotations.\n@param context\ninformation about the class being parsed.\n@param visible\nif the type annotation table to parse contains runtime visible\nannotations.\n@return the start offset of each type annotation in the parsed table.",
"Add the given headers to the given HTTP request.\n@param httpRequest the request to add the headers to\n@param headers the headers to add",
"convenience factory method for the most usual case.",
"Commit an upload session after all parts have been uploaded, creating the new file or the version.\n@param digest the base64-encoded SHA-1 hash of the file being uploaded.\n@param parts the list of uploaded parts to be committed.\n@param attributes the key value pairs of attributes from the file instance.\n@param ifMatch ensures that your app only alters files/folders on Box if you have the current version.\n@param ifNoneMatch ensure that it retrieve unnecessary data if the most current version of file is on-hand.\n@return the created file instance.",
"Converts the given string to a clob object\n\n@param stringName string name to clob\n@param sqlConnection Connection object\n@return Clob object or NULL",
"Each schema set has its own database cluster. The template1 database has the schema preloaded so that\neach test case need only create a new database and not re-invoke Migratory.",
"Retrieves child nodes from a directory entry.\n\n@param parent parent directory entry\n@return list of child nodes",
"Use this API to Force hafailover.",
"Populates default settings.\n\n@param record MPX record\n@param properties project properties\n@throws MPXJException"
] |
@SuppressWarnings("WeakerAccess")
public Map<DeckReference, BeatGrid> getLoadedBeatGrids() {
ensureRunning();
// Make a copy so callers get an immutable snapshot of the current state.
return Collections.unmodifiableMap(new HashMap<DeckReference, BeatGrid>(hotCache));
} | [
"Get the beat grids available for all tracks currently loaded in any player, either on the play deck, or\nin a hot cue.\n\n@return the beat grids associated with all current players, including for any tracks loaded in their hot cue slots\n\n@throws IllegalStateException if the BeatGridFinder is not running"
] | [
"Creates a new HTML-formatted label with the given content.\n\n@param html the label content",
"Helper method that encapsulates the minimum logic for adding a high\npriority job to a queue.\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",
"Use this API to fetch filtered set of sslglobal_sslpolicy_binding resources.\nset the filter parameter values in filtervalue object.",
"Puts strings inside quotes and numerics are left as they are.\n@param str\n@return",
"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",
"Permanently close the ClientRequestExecutor pool. Resources subsequently\nchecked in will be destroyed.",
"Start a print.\n\n@param jobId the job ID\n@param specJson the client json request.\n@param out the stream to write to.",
"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.",
"Get random stub matching this user type\n@param userType User type\n@return Random stub"
] |
public synchronized static void registerImagOnAgents(Launcher launcher, final String imageTag,
final String host, final String targetRepo, final ArrayListMultimap<String, String> artifactsProps,
final int buildInfoId) throws IOException, InterruptedException {
// Master
final String imageId = getImageIdFromAgent(launcher, imageTag, host);
registerImage(imageId, imageTag, targetRepo, artifactsProps, buildInfoId);
// Agents
List<Node> nodes = Jenkins.getInstance().getNodes();
for (Node node : nodes) {
if (node == null || node.getChannel() == null) {
continue;
}
try {
node.getChannel().call(new MasterToSlaveCallable<Boolean, IOException>() {
public Boolean call() throws IOException {
registerImage(imageId, imageTag, targetRepo, artifactsProps, buildInfoId);
return true;
}
});
} catch (Exception e) {
launcher.getListener().getLogger().println("Could not register docker image " + imageTag +
" on Jenkins node '" + node.getDisplayName() + "' due to: " + e.getMessage() +
" This could be because this node is now offline."
);
}
}
} | [
"Registers an image to be captured by the build-info proxy.\n\n@param imageTag\n@param host\n@param targetRepo\n@param buildInfoId\n@throws IOException\n@throws InterruptedException"
] | [
"Apply an XMLDSig onto the passed document.\n\n@param aPrivateKey\nThe private key used for signing. May not be <code>null</code>.\n@param aCertificate\nThe certificate to be used. May not be <code>null</code>.\n@param aDocument\nThe document to be signed. The signature will always be the first\nchild element of the document element. The document may not contains\nany disg:Signature element. This element is inserted manually.\n@throws Exception\nIn case something goes wrong\n@see #createXMLSignature(X509Certificate)",
"Use this API to add cachepolicylabel resources.",
"Retrieve a table of data.\n\n@param type table type\n@return FastTrackTable instance",
"Pass the activity you use the drawer in ;)\nThis is required if you want to set any values by resource\n\n@param activity\n@return",
"Returns true of the specified matrix element is valid element inside this matrix.\n\n@param row Row index.\n@param col Column index.\n@return true if it is a valid element in the matrix.",
"Only one boolean param should be true at a time for this function to return the proper results\n\n@param hostName\n@param enable\n@param disable\n@param remove\n@param isEnabled\n@param exists\n@return\n@throws Exception",
"Handle changes of the series check box.\n@param event the change event.",
"This method is very similar to addMainHandler, except ShellFactory\nwill pass all handlers registered with this method to all this shell's subshells.\n\n@see org.gearvrf.debug.cli.Shell#addMainHandler(java.lang.Object, java.lang.String)\n\n@param handler Object which should be registered as handler.\n@param prefix Prefix that should be prepended to all handler's command names.",
"Initializes unspecified sign properties using available defaults\nand global settings."
] |
public void close()
{
if (transac_open)
{
try
{
this._cnx.rollback();
}
catch (Exception e)
{
// Ignore.
}
}
for (Statement s : toClose)
{
closeQuietly(s);
}
toClose.clear();
closeQuietly(_cnx);
_cnx = null;
} | [
"Close all JDBC objects related to this connection."
] | [
"Gets the value of the callout property.\n\n<p>\nThis accessor method returns a reference to the live list,\nnot a snapshot. Therefore any modification you make to the\nreturned list will be present inside the JAXB object.\nThis is why there is not a <CODE>set</CODE> method for the callout property.\n\n<p>\nFor example, to add a new item, do as follows:\n<pre>\ngetCallout().add(newItem);\n</pre>\n\n\n<p>\nObjects of the following type(s) are allowed in the list\n{@link Callouts.Callout }",
"Update a note.\n\n@param note\nThe Note to update\n@throws FlickrException",
"Entry point for recursive resolution of an expression and all of its\nnested expressions.\n\n@todo Ensure unresolvable expressions don't trigger infinite recursion.",
"Inserts a Parcelable 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 Parcelable object, or null\n@return this bundler instance to chain method calls",
"Retrieve and validate store name from the REST request.\n\n@return true if valid, false otherwise",
"Execute pull docker image on agent\n\n@param launcher\n@param imageTag\n@param username\n@param password\n@param host\n@return\n@throws IOException\n@throws InterruptedException",
"If the Artifact does not exist, it will add it to the database. Nothing if it already exit.\n\n@param fromClient DbArtifact",
"Checks if this child holds the current active state.\nIf the child is or contains the active state it is applied.",
"Add image in the document.\n\n@param context\nPDF context\n@param imageResult\nimage\n@throws BadElementException\nPDF construction problem\n@throws IOException\nPDF construction problem"
] |
private Set<QualifierInstance> getRequiredQualifiers(EnhancedAnnotatedParameter<?, ? super X> enhancedDisposedParameter) {
Set<Annotation> disposedParameterQualifiers = enhancedDisposedParameter.getMetaAnnotations(Qualifier.class);
if (disposedParameterQualifiers.isEmpty()) {
disposedParameterQualifiers = Collections.<Annotation> singleton(Default.Literal.INSTANCE);
}
return beanManager.getServices().get(MetaAnnotationStore.class).getQualifierInstances(disposedParameterQualifiers);
} | [
"A disposer method is bound to a producer if the producer is assignable to the disposed parameter.\n\n@param enhancedDisposedParameter\n@return the set of required qualifiers for the given disposed parameter"
] | [
"Here we specify the configuration, starting from default MostUsefulConfiguration, and changing only what is needed",
"Use this API to fetch all the ipset resources that are configured on netscaler.",
"Gets the SerialMessage as a byte array.\n@return the message",
"Checks that sequence-name is only used with autoincrement='ojb'\n\n@param fieldDef The field descriptor\n@param checkLevel The current check level (this constraint is checked in basic and strict)\n@exception ConstraintException If the constraint has been violated",
"low level http operations",
"from IsoFields in ThreeTen-Backport",
"Gets the appropriate cache dir\n\n@param ctx\n@return",
"Use this API to fetch all the appfwlearningsettings resources that are configured on netscaler.",
"Execute push docker image on agent\n\n@param launcher\n@param log\n@param imageTag\n@param username\n@param password\n@param host @return\n@throws IOException\n@throws InterruptedException"
] |
private static int checkResult(int result)
{
if (exceptionsEnabled && result !=
cudnnStatus.CUDNN_STATUS_SUCCESS)
{
throw new CudaException(cudnnStatus.stringFor(result));
}
return result;
} | [
"If the given result is not cudnnStatus.CUDNN_STATUS_SUCCESS\nand exceptions have been enabled, this method will throw a\nCudaException with an error message that corresponds to the\ngiven result code. Otherwise, the given result is simply\nreturned.\n\n@param result The result to check\n@return The result that was given as the parameter\n@throws CudaException If exceptions have been enabled and\nthe given result code is not cudnnStatus.CUDNN_STATUS_SUCCESS"
] | [
"Process the requestJsonAttributes using the attributes and the MapfishParser and add all resulting\nvalues to this values object.\n\n@param template the template of the current request.\n@param attributes the attributes that will be used to add values to this values object\n@param requestJsonAttributes the json data for populating the attribute values",
"Execute a request through Odo processing\n\n@param httpMethodProxyRequest\n@param httpServletRequest\n@param httpServletResponse\n@param history",
"This is a service method that takes care of putting al the target values in a single array.\n@return",
"Create an LBuffer from a given file.\n@param file\n@return\n@throws IOException",
"Add a new profile with the profileName given.\n\n@param profileName name of new profile\n@return newly created profile\n@throws Exception exception",
"Create a unique signature for this shader.\nThe signature for simple shaders is just the class name.\nFor the more complex shaders generated by GVRShaderTemplate\nthe signature includes information about the vertex attributes,\nuniforms, textures and lights used by the shader variant.\n\n@param defined\nnames to be defined for this shader\n@return string signature for shader\n@see GVRShaderTemplate",
"Check position type.\n\n@param type the type\n@return the boolean",
"Create an `AppDescriptor` with appName and entry class specified.\n\nIf `appName` is `null` or blank, it will try the following\napproach to get app name:\n\n1. check the {@link Version#getArtifactId() artifact id} and use it unless\n2. if artifact id is null or empty, then infer app name using {@link AppNameInferer}\n\n@param appName\nthe app name\n@param entryClass\nthe entry class\n@return\nan `AppDescriptor` instance",
"Validates a favorite entry.\n\n<p>If the favorite entry references a resource or project that can't be read, this will return false.\n\n@param entry the favorite entry\n@return the"
] |
public static DMatrixRMaj diagonal(int N , double min , double max , Random rand ) {
return diagonal(N,N,min,max,rand);
} | [
"Creates a random diagonal matrix where the diagonal elements are selected from a uniform\ndistribution that goes from min to max.\n\n@param N Dimension of the matrix.\n@param min Minimum value of a diagonal element.\n@param max Maximum value of a diagonal element.\n@param rand Random number generator.\n@return A random diagonal matrix."
] | [
"Get the beat grids available for all tracks currently loaded in any player, either on the play deck, or\nin a hot cue.\n\n@return the beat grids associated with all current players, including for any tracks loaded in their hot cue slots\n\n@throws IllegalStateException if the BeatGridFinder is not running",
"Another method to force an input string into a fixed width field\nand set it on the right with the left side filled with space ' ' characters.\n\n@param input input string\n@param width required width\n@return formatted string",
"This method is called to alert project listeners to the fact that\na task has been written to a project file.\n\n@param task task instance",
"Use this API to add ipset.",
"Extract the parent WBS from a WBS.\n\n@param wbs current WBS\n@return parent WBS",
"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",
"Update all the links of the DeclarationBinder.\n\n@param declarationBinderRef the ServiceReference<DeclarationBinder> of the DeclarationBinder",
"Get the primitive attributes for the associated object.\n\n@return attributes for associated objects\n@deprecated replaced by {@link #getAllAttributes()} after introduction of nested associations",
"Builds the mapping table."
] |
public void createLinks(ServiceReference<D> declarationSRef) {
D declaration = getDeclaration(declarationSRef);
for (ServiceReference<S> serviceReference : linkerManagement.getMatchedBinderServiceRef()) {
if (linkerManagement.canBeLinked(declaration, serviceReference)) {
linkerManagement.link(declaration, serviceReference);
}
}
} | [
"Create all the links possible between the Declaration and all the ImporterService matching the.\nImporterServiceFilter of the Linker.\n\n@param declarationSRef the ServiceReference<Declaration> of the Declaration"
] | [
"2-D Forward Discrete Cosine Transform.\n\n@param data Data.",
"The derivative of the objective function. You may override this method\nif you like to implement your own derivative.\n\n@param parameters Input value. The parameter vector.\n@param derivatives Output value, where derivatives[i][j] is d(value(j)) / d(parameters(i)\n@throws SolverException Thrown if the valuation fails, specific cause may be available via the <code>cause()</code> method.",
"Return the position of an element inside an array\n\n@param array the array where it looks for an element\n@param element the element to find in the array\n@param <T> the type of elements in the array\n@return the position of the element if it's found in the array, -1 otherwise",
"Flag that the processor has started execution.\n\n@param processorGraphNode the node that has started.",
"Quick and dirty XML text escape.\n\n@param sb working string buffer\n@param text input text\n@return escaped text",
"Apply issues tracker info to a build info builder (used by generic tasks and maven2 which doesn't use the extractor",
"Gathers all parameters' annotations for the given method, starting from the third parameter.",
"Calculate start dates for a monthly relative recurrence.\n\n@param calendar current date\n@param frequency frequency\n@param dates array of start dates",
"Returns true if the ASTNode is a declaration of a closure, either as a declaration\nor a field.\n@param expression\nthe target expression\n@return\nas described"
] |
public <T> void cleanNullReferences(Class<T> clazz) {
Map<Object, Reference<Object>> objectMap = getMapForClass(clazz);
if (objectMap != null) {
cleanMap(objectMap);
}
} | [
"Run through the map and remove any references that have been null'd out by the GC."
] | [
"Refresh children using read-resource operation.",
"Function to serialize the given list of Vector clocks into a string. If\nsomething goes wrong, it returns an empty string.\n\n@param vectorClocks The Vector clock list to serialize\n@return The string (JSON) version of the specified Vector clock",
"do delete given object. Should be used by all intern classes to delete\nobjects.",
"Extract name of the resource from a resource ID.\n@param id the resource ID\n@return the name of the resource",
"Sets the highlight strength for the InnerPaddingOutline.\n\n@param _highlightStrength The highlighting value for the outline.",
"Add all elements in the iterable to the collection.\n\n@param target\n@param iterable\n@return true if the target was modified, false otherwise",
"Adds this handler to the widget.\n\n@param <H> the type of handler to add\n@param type the event type\n@param handler the handler\n@return {@link HandlerRegistration} used to remove the handler",
"Append the given path segments to the existing path of this builder.\nEach given path segment may contain URI template variables.\n@param pathSegments the URI path segments\n@return this UriComponentsBuilder",
"currently does not support paths with name constrains"
] |
public void setClasspath(Path classpath)
{
if (_classpath == null)
{
_classpath = classpath;
}
else
{
_classpath.append(classpath);
}
log("Verification classpath is "+ _classpath,
Project.MSG_VERBOSE);
} | [
"Set the classpath for loading the driver.\n\n@param classpath the classpath"
] | [
"Updates a path table value for column columnName\n\n@param columnName name of the column to update\n@param newData new content to set\n@param path_id ID of the path to update",
"Sets the right padding for all cells in the table.\n@param paddingRight new padding, ignored if smaller than 0\n@return this to allow chaining",
"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",
"Sets the maxConnectionAge. Any connections older than this setting will be closed\noff whether it is idle or not. Connections currently in use will not be affected until they\nare returned to the pool.\n\n@param maxConnectionAge the maxConnectionAge to set.\n@param timeUnit the unit of the maxConnectionAge argument.",
"The type descriptor for a method node is a string containing the name of the method, its return type,\nand its parameter types in a canonical form. For simplicity, I'm using the format of a Java declaration\nwithout parameter names.\n\n@return the type descriptor",
"Retrieve a boolean field.\n\n@param type field type\n@return field data",
"Pretty prints the given source code.\n\n@param code\nsource code to format\n@param options\nformatter options\n@param lineEnding\ndesired line ending\n@return formatted source code",
"Use this API to fetch all the ipv6 resources that are configured on netscaler.",
"Gets an iterable of all the groups in the enterprise that are starting with the given name string.\n@param api the API connection to be used when retrieving the groups.\n@param name the name prefix of the groups. If the groups need to searched by full name that has spaces,\nthen the parameter string should have been wrapped with \"\".\n@return an iterable containing info about all the groups."
] |
public synchronized void setSendingStatus(boolean send) throws IOException {
if (isSendingStatus() == send) {
return;
}
if (send) { // Start sending status packets.
ensureRunning();
if ((getDeviceNumber() < 1) || (getDeviceNumber() > 4)) {
throw new IllegalStateException("Can only send status when using a standard player number, 1 through 4.");
}
BeatFinder.getInstance().start();
BeatFinder.getInstance().addLifecycleListener(beatFinderLifecycleListener);
final AtomicBoolean stillRunning = new AtomicBoolean(true);
sendingStatus = stillRunning; // Allow other threads to stop us when necessary.
Thread sender = new Thread(null, new Runnable() {
@Override
public void run() {
while (stillRunning.get()) {
sendStatus();
try {
Thread.sleep(getStatusInterval());
} catch (InterruptedException e) {
logger.warn("beat-link VirtualCDJ status sender thread was interrupted; continuing");
}
}
}
}, "beat-link VirtualCdj status sender");
sender.setDaemon(true);
sender.start();
if (isSynced()) { // If we are supposed to be synced, we need to respond to master beats and tempo changes.
addMasterListener(ourSyncMasterListener);
}
if (isPlaying()) { // Start the beat sender too, if we are supposed to be playing.
beatSender.set(new BeatSender(metronome));
}
} else { // Stop sending status packets, and responding to master beats and tempo changes if we were synced.
BeatFinder.getInstance().removeLifecycleListener(beatFinderLifecycleListener);
removeMasterListener(ourSyncMasterListener);
sendingStatus.set(false); // Stop the status sending thread.
sendingStatus = null; // Indicate that we are no longer sending status.
final BeatSender activeSender = beatSender.get(); // And stop the beat sender if we have one.
if (activeSender != null) {
activeSender.shutDown();
beatSender.set(null);
}
}
} | [
"Control whether the Virtual CDJ sends status packets to the other players. Most uses of Beat Link will not\nrequire this level of activity. However, if you want to be able to take over the tempo master role, and control\nthe tempo and beat alignment of other players, you will need to turn on this feature, which also requires that\nyou are using one of the standard player numbers, 1-4.\n\n@param send if {@code true} we will send status packets, and can participate in (and control) tempo and beat sync\n\n@throws IllegalStateException if the virtual CDJ is not running, or if it is not using a device number in the\nrange 1 through 4\n@throws IOException if there is a problem starting the {@link BeatFinder}"
] | [
"This method computes the eigen vector with the largest eigen value by using the\ndirect power method. This technique is the easiest to implement, but the slowest to converge.\nWorks only if all the eigenvalues are real.\n\n@param A The matrix. Not modified.\n@return If it converged or not.",
"Rotate the specified photo. The only allowed values for degrees are 90, 180 and 270.\n\n@param photoId\nThe photo ID\n@param degrees\nThe degrees to rotate (90, 170 or 270)",
"add converter at given index. The index can be changed during conversion\nif canReorder is true\n\n@param index\n@param converter",
"Establish a new master tempo, and if it is a change from the existing one, report it to the listeners.\n\n@param newTempo the newly reported master tempo.",
"Adds a directory to the collection of module paths.\n\n@param moduleDir the module directory to add\n\n@throws java.lang.IllegalArgumentException if the path is {@code null}",
"Converts the given hash code into an index into the\nhash table.",
"Use this API to enable the mode on Netscaler.\n@param mode mode to be enabled.\n@return status of the operation performed.\n@throws Exception Nitro exception.",
"Adds an object to the Index. If it was already in the Index,\nthen nothing is done. If it is not in the Index, then it is\nadded iff the Index hasn't been locked.\n\n@return true if the item was added to the index and false if the\nitem was already in the index or if the index is locked",
"Allow for the use of text shading and auto formatting."
] |
private void setCorrectDay(Calendar date) {
if (monthHasNotDay(date)) {
date.set(Calendar.DAY_OF_MONTH, date.getActualMaximum(Calendar.DAY_OF_MONTH));
} else {
date.set(Calendar.DAY_OF_MONTH, m_dayOfMonth);
}
} | [
"Set the correct day for the date with year and month already fixed.\n@param date the date, where year and month are already correct."
] | [
"Print a resource UID.\n\n@param value resource UID value\n@return resource UID string",
"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",
"A henson navigator is a class that helps a consumer to consume the navigation api that it\ndeclares in its dependencies. The henson navigator will wrap the intent builders. Thus, a\nhenson navigator, is driven by consumption of intent builders, whereas the henson classes are\ndriven by the production of an intent builder.\n\n<p>This task is created per android variant:\n\n<ul>\n<li>we scan the variant compile configuration for navigation api dependencies\n<li>we generate a henson navigator class for this variant that wraps the intent builders\n</ul>\n\n@param variant the variant for which to create a builder.\n@param hensonNavigatorPackageName the package name in which we create the class.",
"Use this API to fetch nslimitidentifier_binding resource of given name .",
"Given a container, and a set of raw data blocks, this method extracts\nthe field data and writes it into the container.\n\n@param type expected type\n@param container field container\n@param id entity ID\n@param fixedData fixed data block\n@param varData var data block",
"Called when the scene object gets a new parent.\n\n@param parent New parent of this scene object.",
"Add an individual class to the map file.\n\n@param loader jar file class loader\n@param jarEntry jar file entry\n@param writer XML stream writer\n@param mapClassMethods true if we want to produce .Net style class method names\n@throws ClassNotFoundException\n@throws XMLStreamException\n@throws IntrospectionException",
"Returns an integer array that contains the current values for all the\ntexture parameters.\n\n@return an integer array that contains the current values for all the\ntexture parameters.",
"Get the contents from the request URL.\n\n@param url URL to get the response from\n@param layer the raster layer\n@return {@link InputStream} with the content\n@throws IOException cannot get content"
] |
public static Statement open(String jndiPath) {
try {
Context ctx = new InitialContext();
DataSource ds = (DataSource) ctx.lookup(jndiPath);
Connection conn = ds.getConnection();
return conn.createStatement();
} catch (NamingException e) {
throw new DukeException("No database configuration found via JNDI at " +
jndiPath, e);
} catch (SQLException e) {
throw new DukeException("Error connecting to database via " +
jndiPath, e);
}
} | [
"Get a configured database connection via JNDI."
] | [
"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",
"Returns the Map value of the field.\n\n@return the Map value of the field. It returns a reference of the value both for <code>MAP</code> and\n<code>LIST_MAP</code>.\n@throws IllegalArgumentException if the value cannot be converted to Map.",
"Must be called with pathEntries lock taken",
"Scroll to the specific position\n@param position\n@return the new current item after the scrolling processed.",
"Extracts location result from intent object\n\n@param intent valid intent object\n@return location result.\n@since 1.1.0",
"Convenience method for getting the value of a private object field,\nwithout the stress of checked exceptions in the reflection API.\n\n@param object\nObject containing the field.\n@param fieldName\nName of the field whose value to return.",
"is ready to service requests",
"Start with specifying the artifactId",
"refresh credentials if CredentialProvider set"
] |
public static linkset get(nitro_service service, String id) throws Exception{
linkset obj = new linkset();
obj.set_id(id);
linkset response = (linkset) obj.get_resource(service);
return response;
} | [
"Use this API to fetch linkset resource of given name ."
] | [
"For creating expression columns\n@return",
"Suite prologue.",
"Creates the next permutation in the sequence.\n\n@return An array containing the permutation. The returned array is modified each time this function is called.",
"Set the depth of the cursor.\nThis is the length of the ray from the origin\nto the cursor.\n@param depth default cursor depth",
"Computes execution time\n@param extra",
"Read tasks representing the WBS.",
"page breaks should be near the bottom of the band, this method used while adding subreports\nwhich has the \"start on new page\" option.\n@param band",
"Use this API to fetch the statistics of all systemmemory_stats resources that are configured on netscaler.",
"Add a calendar node.\n\n@param parentNode parent node\n@param calendar calendar"
] |
public Collection<Photocount> getCounts(Date[] dates, Date[] takenDates) throws FlickrException {
List<Photocount> photocounts = new ArrayList<Photocount>();
Map<String, Object> parameters = new HashMap<String, Object>();
parameters.put("method", METHOD_GET_COUNTS);
if (dates == null && takenDates == null) {
throw new IllegalArgumentException("You must provide a value for either dates or takenDates");
}
if (dates != null) {
List<String> dateList = new ArrayList<String>();
for (int i = 0; i < dates.length; i++) {
dateList.add(String.valueOf(dates[i].getTime() / 1000L));
}
parameters.put("dates", StringUtilities.join(dateList, ","));
}
if (takenDates != null) {
List<String> takenDateList = new ArrayList<String>();
for (int i = 0; i < takenDates.length; i++) {
takenDateList.add(String.valueOf(takenDates[i].getTime() / 1000L));
}
parameters.put("taken_dates", StringUtilities.join(takenDateList, ","));
}
Response response = transport.get(transport.getPath(), parameters, apiKey, sharedSecret);
if (response.isError()) {
throw new FlickrException(response.getErrorCode(), response.getErrorMessage());
}
Element photocountsElement = response.getPayload();
NodeList photocountNodes = photocountsElement.getElementsByTagName("photocount");
for (int i = 0; i < photocountNodes.getLength(); i++) {
Element photocountElement = (Element) photocountNodes.item(i);
Photocount photocount = new Photocount();
photocount.setCount(photocountElement.getAttribute("count"));
photocount.setFromDate(photocountElement.getAttribute("fromdate"));
photocount.setToDate(photocountElement.getAttribute("todate"));
photocounts.add(photocount);
}
return photocounts;
} | [
"Gets a collection of photo counts for the given date ranges for the calling user.\n\nThis method requires authentication with 'read' permission.\n\n@param dates\nAn array of dates, denoting the periods to return counts for. They should be specified smallest first.\n@param takenDates\nAn array of dates, denoting the periods to return counts for. They should be specified smallest first.\n@return A Collection of Photocount objects"
] | [
"Generates a torque schema for the model.\n\n@param attributes The attributes of the tag\n@return The property value\n@exception XDocletException If an error occurs\[email protected] type=\"content\"",
"Handles incoming Serial Messages. Serial messages can either be messages\nthat are a response to our own requests, or the stick asking us information.\n@param incomingMessage the incoming message to process.",
"Sets the underlying connect timeout in milliseconds.\nA value of 0 specifies an infinite timeout.\n@see okhttp3.OkHttpClient.Builder#connectTimeout(long, TimeUnit)",
"Returns the position of the specified value in the specified array.\n\n@param value the value to search for\n@param array the array to search in\n@return the position of the specified value in the specified array",
"Create a shell object and assign its id field.",
"Alias accessor provided for JSON serialization only",
"Stop finding signatures for all active players.",
"Removes all of the markers from the map.",
"New SOAP client uses new SOAP service."
] |
private static void close(Closeable closeable) {
if (closeable != null) {
try {
closeable.close();
} catch (IOException ignored) {
logger.error("Failed to close output stream: "
+ ignored.getMessage());
}
}
} | [
"Closes a Closeable and swallows any exceptions that might occur in the\nprocess.\n\n@param closeable"
] | [
"Populates data in this Options from the character stream.\n@param in The Reader\n@throws IOException If there is a problem reading data",
"Read the work weeks associated with this calendar.\n\n@param xmlCalendar XML calendar object\n@param mpxjCalendar MPXJ calendar object",
"Returns a set of the distinct colours used in this image.\n\n@return the set of distinct Colors",
"Remember the order of execution",
"Performs the BFS and gives the results to a distributor to distribute\n\n@param distributor the distributor",
"Create a container in the platform\n\n@param container\nThe name of the container",
"Checks that all the qualifiers in the set requiredQualifiers are in the set of qualifiers. Qualifier equality rules for\nannotation members are followed.\n\n@param requiredQualifiers The required qualifiers\n@param qualifiers The set of qualifiers to check\n@return True if all matches, false otherwise",
"Computes the likelihood of the random draw\n\n@return The likelihood.",
"Adds a logical operator block.\n\n@param list parent criteria list\n@param block current block\n@param operator logical operator represented by this block"
] |
private void writeExceptions(List<ProjectCalendar> records) throws IOException
{
for (ProjectCalendar record : records)
{
if (!record.getCalendarExceptions().isEmpty())
{
// Need to move HOLI up here and get 15 exceptions per line as per USACE spec.
// for now, we'll write one line for each calendar exception, hope there aren't too many
//
// changing this would be a serious upgrade, too much coding to do today....
for (ProjectCalendarException ex : record.getCalendarExceptions())
{
writeCalendarException(record, ex);
}
}
m_eventManager.fireCalendarWrittenEvent(record); // left here from MPX template, maybe not needed???
}
} | [
"Write calendar exceptions.\n\n@param records list of ProjectCalendars\n@throws IOException"
] | [
"Add an additional SSExtension\n@param ssExt the ssextension to set",
"This should be called from a subclass constructor, if offset or length\nare unknown at a time when SubIIMInputStream constructor is called. This\nmethod shouldn't be called more than once.\n\n@param offset\nbyte offset\n@param length\nbyte length\n@throws IOException\nif underlying stream can't be read",
"Stops the compressor.",
"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",
"Gets the logger.\n\n@return Returns a Category",
"is there a faster algorithm out there? This one is a bit sluggish",
"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",
"Create the voldemort key and value from the input Avro record by\nextracting the key and value and map it out for each of the responsible\nvoldemort nodes\n\n\nThe output value is the node_id & partition_id of the responsible node\nfollowed by serialized value",
"Helper method to set a value in the internal header list.\n\n@param headers the headers to set the value in\n@param name the name to set\n@param value the value to set"
] |
public void setLocale(Locale locale)
{
List<SimpleDateFormat> formats = new ArrayList<SimpleDateFormat>();
for (SimpleDateFormat format : m_formats)
{
formats.add(new SimpleDateFormat(format.toPattern(), locale));
}
m_formats = formats.toArray(new SimpleDateFormat[formats.size()]);
} | [
"This method is called when the locale of the parent file is updated.\nIt resets the locale specific date attributes to the default values\nfor the new locale.\n\n@param locale new locale"
] | [
"Gets a single byte return or -1 if no data is available.",
"Creates a collaboration whitelist for a Box User with a given ID.\n@param api the API connection to be used by the collaboration whitelist.\n@param userID the ID of the Box User to add to the collaboration whitelist.\n@return information about the collaboration whitelist created for user.",
"Determine the common ancestor of the given classes, if any.\n@param clazz1 the class to introspect\n@param clazz2 the other class to introspect\n@return the common ancestor (i.e. common superclass, one interface\nextending the other), or {@code null} if none found. If any of the\ngiven classes is {@code null}, the other class will be returned.\n@since 2.0",
"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",
"Parse a list of String into a list of Integer.\nIf one element can not be parsed, the behavior depends on the value of failOnException.\n@param strList can't be null\n@param failOnException if an element can not be parsed should we return null or add a null element to the list.\n@return list of all String parsed as Integer or null if failOnException",
"Utility function that fetches user defined store definitions\n\n@param adminClient An instance of AdminClient points to given cluster\n@param nodeId Node id to fetch store definitions from\n@return The map container that maps store names to store definitions",
"This method retrieves a byte array containing the data at the\ngiven index in the block. If no data is found at the given index\nthis method returns null.\n\n@param index index of the data item to be retrieved\n@return byte array containing the requested data",
"Use this API to fetch cachecontentgroup resource of given name .",
"Return the command line argument\n\n@return \" --server-groups=\" plus a comma-separated list\nof selected server groups. Return empty String if none selected."
] |
public BoxAPIResponse send(ProgressListener listener) {
if (this.api == null) {
this.backoffCounter.reset(BoxGlobalSettings.getMaxRequestAttempts());
} else {
this.backoffCounter.reset(this.api.getMaxRequestAttempts());
}
while (this.backoffCounter.getAttemptsRemaining() > 0) {
try {
return this.trySend(listener);
} catch (BoxAPIException apiException) {
if (!this.backoffCounter.decrement() || !isResponseRetryable(apiException.getResponseCode())) {
throw apiException;
}
try {
this.resetBody();
} catch (IOException ioException) {
throw apiException;
}
try {
this.backoffCounter.waitBackoff();
} catch (InterruptedException interruptedException) {
Thread.currentThread().interrupt();
throw apiException;
}
}
}
throw new RuntimeException();
} | [
"Sends this request while monitoring its progress and returns a BoxAPIResponse containing the server's response.\n\n<p>A ProgressListener is generally only useful when the size of the request is known beforehand. If the size is\nunknown, then the ProgressListener will be updated for each byte sent, but the total number of bytes will be\nreported as 0.</p>\n\n<p> See {@link #send} for more information on sending requests.</p>\n\n@param listener a listener for monitoring the progress of the request.\n@throws BoxAPIException if the server returns an error code or if a network error occurs.\n@return a {@link BoxAPIResponse} containing the server's response."
] | [
"New REST client uses new REST service",
"Method used to update fields with values received from API.\n@param jsonObject JSON-encoded info about File Version object.",
"Iterates over the elements of an iterable collection of items and returns\nthe index values of the items that match the condition specified in the closure.\n\n@param self the iteration object over which to iterate\n@param closure the filter to perform a match on the collection\n@return a list of numbers corresponding to the index values of all matched objects\n@since 1.5.2",
"Parse the given file to obtains a Properties object.\n\n@param file\n@return a properties object containing all the properties present in the file.\n@throws InvalidDeclarationFileException",
"Unlinks a set of dependents from this task.\n\n@param task The task to remove dependents from.\n@return Request object",
"retrieve an Object by query\nI.e perform a SELECT ... FROM ... WHERE ... in an RDBMS",
"We have an OLE compound document... but is it an MPP file?\n\n@param stream file input stream\n@return ProjectFile instance",
"Add an accessory to be handled and advertised by this root. Any existing Homekit connections\nwill be terminated to allow the clients to reconnect and see the updated accessory list. When\nusing this for a bridge, the ID of the accessory must be greater than 1, as that ID is reserved\nfor the Bridge itself.\n\n@param accessory to advertise and handle.",
"Create a random permutation of the numbers 0, ..., size - 1.\n\nsee Algorithm P, D.E. Knuth: The Art of Computer Programming, Vol. 2, p. 145"
] |
public static String replaceVariables( final VariableResolver pResolver, final String pExpression, final String pOpen, final String pClose ) {
final char[] open = pOpen.toCharArray();
final char[] close = pClose.toCharArray();
final StringBuilder out = new StringBuilder();
StringBuilder sb = new StringBuilder();
char[] last = null;
int wo = 0;
int wc = 0;
int level = 0;
for (char c : pExpression.toCharArray()) {
if (c == open[wo]) {
if (wc > 0) {
sb.append(close, 0, wc);
}
wc = 0;
wo++;
if (open.length == wo) {
// found open
if (last == open) {
out.append(open);
}
level++;
out.append(sb);
sb = new StringBuilder();
wo = 0;
last = open;
}
} else if (c == close[wc]) {
if (wo > 0) {
sb.append(open, 0, wo);
}
wo = 0;
wc++;
if (close.length == wc) {
// found close
if (last == open) {
final String variable = pResolver.get(sb.toString());
if (variable != null) {
out.append(variable);
} else {
out.append(open);
out.append(sb);
out.append(close);
}
} else {
out.append(sb);
out.append(close);
}
sb = new StringBuilder();
level--;
wc = 0;
last = close;
}
} else {
if (wo > 0) {
sb.append(open, 0, wo);
}
if (wc > 0) {
sb.append(close, 0, wc);
}
sb.append(c);
wo = wc = 0;
}
}
if (wo > 0) {
sb.append(open, 0, wo);
}
if (wc > 0) {
sb.append(close, 0, wc);
}
if (level > 0) {
out.append(open);
}
out.append(sb);
return out.toString();
} | [
"Substitute the variables in the given expression with the\nvalues from the resolver\n\n@param pResolver\n@param pExpression"
] | [
"Inject members into this instance and register the services afterwards.\n@see #getGuiceModule()\n@see #registerInRegistry(boolean)\n@since 2.1",
"Returns the time elapsed by the user on the app\n@return Time elapsed by user on the app in int",
"Set the values using the specified Properties object.\n\n@param properties Properties object containing specific property values\nfor the RESTClient config\n\nNote: We're using the same property names as that in ClientConfig\nfor backwards compatibility.",
"Encode a path in a manner suitable for a GET request\n@param in The path to encode, eg \"a/document\"\n@return The encoded path eg \"a%2Fdocument\"",
"Increment the version info associated with the given node\n\n@param node The node",
"Attempts to detect the provided pattern as an exact match.\n@param pattern the pattern to find in the reader stream\n@return the number of times the pattern is found,\nor an error code\n@throws MalformedPatternException if the pattern is invalid\n@throws Exception if a generic error is encountered",
"Returns an array of the names of all atributes of this descriptor.\n\n@return The list of attribute names (will not be <code>null</code>)",
"try to find the first none null table name for the given class-descriptor.\nIf cld has extent classes, all of these cld's searched for the first none null\ntable name.",
"Set a colspan in a group of columns. First add the cols to the report\n\n@param colNumber the index of the col\n@param colQuantity the number of cols how i will take\n@param colspanTitle colspan title\n@return a Dynamic Report Builder\n@throws ColumnBuilderException When the index of the cols is out of\nbounds."
] |
public void setLinearUpperLimits(float limitX, float limitY, float limitZ) {
Native3DGenericConstraint.setLinearUpperLimits(getNative(), limitX, limitY, limitZ);
} | [
"Sets the upper limits for the \"moving\" body translation relative to joint point.\n\n@param limitX the X upper lower translation limit\n@param limitY the Y upper lower translation limit\n@param limitZ the Z upper lower translation limit"
] | [
"Process any StepEvent. You can change last added to stepStorage\nstep using this method.\n\n@param event to process",
"Set the payload to the fileModel of the given instance even though the variable is not directly of it's type. This is mainly to simplify the\ncreation of the rule, when the FileModel itself is not being iterated but just a model referencing it.",
"Destroys dependent instance\n\n@param instance\n@return true if the instance was destroyed, false otherwise",
"Add a new PropertyChangeListener to this node for a specific property.\nThis functionality has\nbeen borrowed from the java.beans package, though this class has\nnothing to do with a bean",
"Emits a sentence fragment combining all the merge actions.",
"Restores a trashed file back to its original location.\n@param fileID the ID of the trashed file.\n@return info about the restored file.",
"convenience method for setting working or non-working days.\n\n@param day required day\n@param working flag indicating if the day is a working day",
"Returns the associated SQL WHERE statement.",
"Acquires a write 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."
] |
public static base_responses update(nitro_service client, dbdbprofile resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
dbdbprofile updateresources[] = new dbdbprofile[resources.length];
for (int i=0;i<resources.length;i++){
updateresources[i] = new dbdbprofile();
updateresources[i].name = resources[i].name;
updateresources[i].interpretquery = resources[i].interpretquery;
updateresources[i].stickiness = resources[i].stickiness;
updateresources[i].kcdaccount = resources[i].kcdaccount;
updateresources[i].conmultiplex = resources[i].conmultiplex;
}
result = update_bulk_request(client, updateresources);
}
return result;
} | [
"Use this API to update dbdbprofile resources."
] | [
"Get a property as a double or throw an exception.\n\n@param key the property name",
"Returns true if the lattice contains an entry at the specified location.\n\n@param maturityInMonths The maturity in months to check.\n@param tenorInMonths The tenor in months to check.\n@param moneynessBP The moneyness in bp to check.\n@return True iff there is an entry at the specified location.",
"Fetch JSON from RAW resource\n\n@param context Context\n@param resource Resource int of the RAW file\n@return JSON",
"Build a URL with Query String and URL Parameters.\n@param base base URL\n@param queryString query string\n@param values URL Parameters\n@return URL",
"Invalidate layout setup.",
"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",
"The test that checks if clipping is needed.\n\n@param f\nfeature to test\n@param scale\nscale\n@return true if clipping is needed",
"Gets the URL of the service with the given name that has been created during the current session.\n\n@param name to return its URL\n@return URL of the service.",
"Updates the given integer belief\nadding the given integer\nnewBelief = previousBelief + givenValue\n\n@param String - the belief name\n@param the value to add"
] |
public String format(final LoggingEvent event) {
final StringBuffer buf = new StringBuffer();
for (PatternConverter c = head; c != null; c = c.next) {
c.format(buf, event);
}
return buf.toString();
} | [
"Formats a logging event to a writer.\n\n@param event\nlogging event to be formatted."
] | [
"Reads the categories for the given resource.\n\n@param cms the {@link CmsObject} used for reading the categories.\n@param resource the resource for which the categories should be read.\n@return the categories assigned to the given resource.",
"Retrieve the index of the table entry valid for the supplied date.\n\n@param date required date\n@return cost rate table entry index",
"Get the bone index for the bone with the given name.\n\n@param bonename string identifying the bone whose index you want\n@return 0 based bone index or -1 if bone with that name is not found.",
"Return the number of ignored or assumption-ignored tests.",
"The entity instance is not in the session cache\n\nCopied from Loader#instanceNotYetLoaded",
"Returns true if the default profile for the specified uuid is active\n\n@return true if active, otherwise false",
"Registers your facet filters, adding them to this InstantSearch's widgets.\n\n@param filters a List of facet filters.",
"Registers Jersey HeaderDelegateProviders for the specified TinyTypes.\n\n@param head a TinyType\n@param tail other TinyTypes\n@throws IllegalArgumentException when a non-TinyType is given",
"Internal method used to retrieve a integer from an\nembedded data block.\n\n@param blocks list of data blocks\n@return int value"
] |
public String computeTrackSignature(final String title, final SearchableItem artist, final int duration,
final WaveformDetail waveformDetail, final BeatGrid beatGrid) {
final String safeTitle = (title == null)? "" : title;
final String artistName = (artist == null)? "[no artist]" : artist.label;
try {
// Compute the SHA-1 hash of our fields
MessageDigest digest = MessageDigest.getInstance("SHA1");
digest.update(safeTitle.getBytes("UTF-8"));
digest.update((byte) 0);
digest.update(artistName.getBytes("UTF-8"));
digest.update((byte) 0);
digestInteger(digest, duration);
digest.update(waveformDetail.getData());
for (int i = 1; i <= beatGrid.beatCount; i++) {
digestInteger(digest, beatGrid.getBeatWithinBar(i));
digestInteger(digest, (int)beatGrid.getTimeWithinTrack(i));
}
byte[] result = digest.digest();
// Create a hex string representation of the hash
StringBuilder hex = new StringBuilder(result.length * 2);
for (byte aResult : result) {
hex.append(Integer.toString((aResult & 0xff) + 0x100, 16).substring(1));
}
return hex.toString();
} catch (NullPointerException e) {
logger.info("Returning null track signature because an input element was null.", e);
} catch (NoSuchAlgorithmException e) {
logger.error("Unable to obtain SHA-1 MessageDigest instance for computing track signatures.", e);
} catch (UnsupportedEncodingException e) {
logger.error("Unable to work with UTF-8 string encoding for computing track signatures.", e);
}
return null; // We were unable to compute a signature
} | [
"Calculate the signature by which we can reliably recognize a loaded track.\n\n@param title the track title\n@param artist the track artist, or {@code null} if there is no artist\n@param duration the duration of the track in seconds\n@param waveformDetail the monochrome waveform detail of the track\n@param beatGrid the beat grid of the track\n\n@return the SHA-1 hash of all the arguments supplied, or {@code null} if any either {@code waveFormDetail} or {@code beatGrid} were {@code null}"
] | [
"Read JdbcConnectionDescriptors from this InputStream.\n\n@see #mergeConnectionRepository",
"Returns the compact records for all users that are members of the team.\n\n@param team Globally unique identifier for the team.\n@return Request object",
"Returns all methods for a specific group\n\n@param groupId group ID to remove methods from\n@param filters array of method types to filter by, null means no filter\n@return Collection of methods found\n@throws Exception exception",
"Here the lambda in the implicit step is determined dynamically. At first\nit selects zeros to quickly reveal singular values that are zero or close to zero.\nThen it computes it using a Wilkinson shift.",
"Wait and retry.",
"find the middle point of two intersect points in circle,only one point will be correct\n\n@param center\n@param a\n@param b\n@param area\n@param radius\n@return",
"Show or hide the options column dependent on the provided edit mode.\n@param oldMode the old edit mode\n@param newMode the edit mode for which the options column's visibility should be adjusted.",
"List of releases for an app.\n@param appName App name. See {@link #listApps} for a list of apps that can be used.\n@return a list of releases",
"Get the last non-white X point\n@param img Image in memory\n@return the trimmed width"
] |
private static <T> void readTableField(DatabaseTableConfig<T> config, String field, String value) {
if (field.equals(FIELD_NAME_DATA_CLASS)) {
try {
@SuppressWarnings("unchecked")
Class<T> clazz = (Class<T>) Class.forName(value);
config.setDataClass(clazz);
} catch (ClassNotFoundException e) {
throw new IllegalArgumentException("Unknown class specified for dataClass: " + value);
}
} else if (field.equals(FIELD_NAME_TABLE_NAME)) {
config.setTableName(value);
}
} | [
"Read a field into our table configuration for field=value line."
] | [
"Display a Notification message\n@param event",
"Inserts an array of Parcelable values into the mapping of the underlying Bundle, replacing any\nexisting value for the given key. Either key or value may be null.\n\n@param key a String, or null\n@param value an array of Parcelable objects, or null\n@return this bundler instance to chain method calls",
"Gets the Correlation distance between two points.\n\n@param p A point in space.\n@param q A point in space.\n@return The Correlation distance between x and y.",
"Called when a previously created loader has finished its load.\n\n@param loader The Loader that has finished.\n@param data The data generated by the Loader.",
"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",
"Parse a currency symbol position value.\n\n@param value currency symbol position\n@return CurrencySymbolPosition instance",
"Send an empty request using a standard HTTP connection.",
"Use this API to clear Interface resources.",
"Waits the given amount of time in seconds for a standalone server to start.\n\n@param client the client used to communicate with the server\n@param startupTimeout the time, in seconds, to wait for the server start\n\n@throws InterruptedException if interrupted while waiting for the server to start\n@throws RuntimeException if the process has died\n@throws TimeoutException if the timeout has been reached and the server is still not started"
] |
public static Map<String,List<Long>> readHints(File hints) throws IOException {
Map<String,List<Long>> result = new HashMap<>();
InputStream is = new FileInputStream(hints);
mergeHints(is, result);
return result;
} | [
"Read hints from a file."
] | [
"Retrieves information for a collaboration whitelist for a given whitelist ID.\n\n@return information about this {@link BoxCollaborationWhitelistExemptTarget}.",
"Return the coding scheme to IOB1 coding, regardless of what was used\ninternally. This is useful for scoring against CoNLL test output.\n\n@param tokens List of tokens in some NER encoding",
"Prints a cluster xml to a file.\n\n@param outputDirName\n@param fileName\n@param cluster",
"Read a task from a ConceptDraw PROJECT file.\n\n@param projectIdentifier parent project identifier\n@param map outline number to task map\n@param task ConceptDraw PROJECT task",
"Get the features collection from a GeoJson inline string or URL.\n\n@param template the template\n@param features what to parse\n@return the feature collection\n@throws IOException",
"Removes and returns a random element from the set.\n@return the removed element, or <code>null</code> when the key does not exist.",
"binds the objects primary key and locking values to the statement, BRJ",
"add a foreign key field",
"Add a marker so we can recognize this as a metadata archive. I would use the ZipFile comment, but\nthat is not available until Java 7, and Beat Link is supposed to be backwards compatible with Java 6.\nSince we are doing this anyway, we can also provide information about the nature of the cache, and\nhow many metadata entries it contains, which is useful for auto-attachment.\n\n@param trackListEntries the tracks contained in the cache, so we can record the number\n@param playlistId the playlist contained in the cache, or 0 if it is all tracks from the media\n@param zos the stream to which the ZipFile is being written\n\n@throws IOException if there is a problem creating the format entry"
] |
public static void writeErrorResponse(MessageEvent messageEvent,
HttpResponseStatus status,
String message) {
// Create the Response object
HttpResponse response = new DefaultHttpResponse(HTTP_1_1, status);
response.setHeader(CONTENT_TYPE, "text/plain; charset=UTF-8");
response.setContent(ChannelBuffers.copiedBuffer("Failure: " + status.toString() + ". "
+ message + "\r\n", CharsetUtil.UTF_8));
response.setHeader(CONTENT_LENGTH, response.getContent().readableBytes());
// Write the response to the Netty Channel
messageEvent.getChannel().write(response);
} | [
"Writes all error responses to the client.\n\nTODO REST-Server 1. collect error stats\n\n@param messageEvent - for retrieving the channel details\n@param status - error code\n@param message - error message"
] | [
"This method sends the same message to many agents.\n\n@param agent_name\nThe id of the agents that receive the message\n@param msgtype\n@param message_content\nThe content of the message\n@param connector\nThe connector to get the external access",
"Copy the contents of this buffer begginning from the srcOffset to a destination byte array\n@param srcOffset\n@param destArray\n@param destOffset\n@param size",
"Returns the Java executable command.\n\n@param javaHome the java home directory or {@code null} to use the default\n\n@return the java command to use",
"Returns the artifact available versions\n\n@param gavc String\n@return List<String>",
"Gives the \"roots\" of a list of folders, i.e. the list of folders which are not descendants of any other folders in the original list\n@param folders the original list of folders\n@return the root folders of the list",
"Used to determine if the current method should be ignored.\n\n@param name method name\n@return true if the method should be ignored",
"Obtains a Julian local date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the Julian local date-time, not null\n@throws DateTimeException if unable to create the date-time",
"Creates the string mappings.\n\n@param mtasTokenIdFactory\nthe mtas token id factory\n@param level\nthe level\n@param stringValue\nthe string value\n@param offsetStart\nthe offset start\n@param offsetEnd\nthe offset end\n@param position\nthe position\n@throws IOException\nSignals that an I/O exception has occurred.",
"Process the layers.conf file.\n\n@param repoRoot the root\n@return the layers conf\n@throws java.io.IOException"
] |
private List<String> generateDateTimePatterns(String datePattern, String[] timePatterns)
{
List<String> patterns = new ArrayList<String>();
for (String timePattern : timePatterns)
{
patterns.add(datePattern + " " + timePattern);
}
// Always fall back on the date-only pattern
patterns.add(datePattern);
return patterns;
} | [
"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"
] | [
"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",
"Adds steps types from given injector and recursively its parent\n\n@param injector the current Inject\n@param types the List of steps types",
"Set the host running the Odo instance to configure\n\n@param hostName name of host",
"Decomposes the input matrix 'a' and makes sure it isn't modified.",
"Adds special accessors for private constants so that inner classes can retrieve them.",
"Attaches locale groups to the copied page.\n@param copiedPage the copied page.\n@throws CmsException thrown if the root cms cannot be retrieved.",
"Delete the partition steal information from the rebalancer state\n\n@param stealInfo The steal information to delete",
"Extract calendar data from the file.\n\n@throws SQLException",
"Assign to the data object the val corresponding to the fieldType."
] |
private void populateResource(Resource resource, Record record) throws MPXJException
{
String falseText = LocaleData.getString(m_locale, LocaleData.NO);
int length = record.getLength();
int[] model = m_resourceModel.getModel();
for (int i = 0; i < length; i++)
{
int mpxFieldType = model[i];
if (mpxFieldType == -1)
{
break;
}
String field = record.getString(i);
if (field == null || field.length() == 0)
{
continue;
}
ResourceField resourceField = MPXResourceField.getMpxjField(mpxFieldType);
switch (resourceField)
{
case OBJECTS:
{
resource.set(resourceField, record.getInteger(i));
break;
}
case ID:
{
resource.setID(record.getInteger(i));
break;
}
case UNIQUE_ID:
{
resource.setUniqueID(record.getInteger(i));
break;
}
case MAX_UNITS:
{
resource.set(resourceField, record.getUnits(i));
break;
}
case PERCENT_WORK_COMPLETE:
case PEAK:
{
resource.set(resourceField, record.getPercentage(i));
break;
}
case COST:
case COST_PER_USE:
case COST_VARIANCE:
case BASELINE_COST:
case ACTUAL_COST:
case REMAINING_COST:
{
resource.set(resourceField, record.getCurrency(i));
break;
}
case OVERTIME_RATE:
case STANDARD_RATE:
{
resource.set(resourceField, record.getRate(i));
break;
}
case REMAINING_WORK:
case OVERTIME_WORK:
case BASELINE_WORK:
case ACTUAL_WORK:
case WORK:
case WORK_VARIANCE:
{
resource.set(resourceField, record.getDuration(i));
break;
}
case ACCRUE_AT:
{
resource.set(resourceField, record.getAccrueType(i));
break;
}
case LINKED_FIELDS:
case OVERALLOCATED:
{
resource.set(resourceField, record.getBoolean(i, falseText));
break;
}
default:
{
resource.set(resourceField, field);
break;
}
}
}
if (m_projectConfig.getAutoResourceUniqueID() == true)
{
resource.setUniqueID(Integer.valueOf(m_projectConfig.getNextResourceUniqueID()));
}
if (m_projectConfig.getAutoResourceID() == true)
{
resource.setID(Integer.valueOf(m_projectConfig.getNextResourceID()));
}
//
// Handle malformed MPX files - ensure we have a unique ID
//
if (resource.getUniqueID() == null)
{
resource.setUniqueID(resource.getID());
}
} | [
"Populates a resource.\n\n@param resource resource instance\n@param record MPX record\n@throws MPXJException"
] | [
"Parse currency.\n\n@param value currency value\n@return currency value",
"Add the specified files in reverse order.",
"Use this API to export application.",
"Determine whether the user has followed bean-like naming convention or not.",
"Initialize the local plugins registry\n@param context the servlet context necessary to grab\nthe files inside the servlet.\n@return the set of local plugins organized by name",
"Use this API to update aaaparameter.",
"Extract and return the table name for a class.",
"very big duct tape",
"Gets a SerialMessage with the MULTI INSTANCE GET command.\nReturns the number of instances for this command class.\n@param the command class to return the number of instances for.\n@return the serial message."
] |
@Override
public void process(TestCaseResult context) {
context.getParameters().add(new Parameter()
.withName(getName())
.withValue(getValue())
.withKind(ParameterKind.valueOf(getKind()))
);
} | [
"Add parameter to testCase\n\n@param context which can be changed"
] | [
"This method is used to recreate the hierarchical structure of the\nproject file from scratch. The method sorts the list of all tasks,\nthen iterates through it creating the parent-child structure defined\nby the outline level field.",
"Use this API to fetch nsrpcnode resource of given name .",
"Load assertion from the provided json or throw exception if not possible.\n\n@param encodedAssertion the assertion as it was encoded in JSON.",
"Print the class's attributes fd",
"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",
"Get public photos from the user's contacts.\n\nThis method does not require authentication.\n\n@see com.flickr4java.flickr.photos.Extras\n@param userId\nThe user ID\n@param count\nThe number of photos to return\n@param justFriends\nTrue to include friends\n@param singlePhoto\nTrue to get a single photo\n@param includeSelf\nTrue to include self\n@return A collection of Photo objects\n@throws FlickrException",
"The number of bytes required to hold the given number\n\n@param number The number being checked.\n@return The required number of bytes (must be 8 or less)",
"Returns the parsed story from the given text\n\n@param configuration the Configuration used to run story\n@param storyAsText the story text\n@param storyId the story Id, which will be returned as story path\n@return The parsed Story",
"This method writes assignment data to a JSON file."
] |
@Nullable
public T getItem(final int position) {
if (position < 0 || position >= mObjects.size()) {
return null;
}
return mObjects.get(position);
} | [
"Returns the item at the specified position.\n\n@param position index of the item to return\n@return the item at the specified position or {@code null} when not found"
] | [
"Add a newline to this sequence according to the configured lineDelimiter if the last line contains\nsomething besides whitespace.",
"m is more generic than a",
"obtains the internal JDO lifecycle state of the input StatemanagerInternal.\nThis Method is helpful to display persistent objects internal state.\n@param sm the StateManager to be inspected\n@return the LifeCycleState of a StateManager instance",
"Gets the uuid from response.\n\n@param myResponse\nthe my response\n@return the uuid from response",
"Removes all resources deployed using this class.",
"get current total used capacity.\n\n@return the total used capacity",
"Computes the QR decomposition of A and store the results in A.\n\n@param A The A matrix in the linear equation. Modified. Reference saved.\n@return true if the decomposition was successful.",
"Prints a currency symbol position value.\n\n@param value CurrencySymbolPosition instance\n@return currency symbol position",
"Retrieve a calendar exception which applies to this date.\n\n@param date target date\n@return calendar exception, or null if none match this date"
] |
private static void checkPreconditions(final long min, final long max) {
if( max < min ) {
throw new IllegalArgumentException(String.format("max (%d) should not be < min (%d)", max, min));
}
} | [
"Checks the preconditions for creating a new LMinMax processor.\n\n@param min\nthe minimum value (inclusive)\n@param max\nthe maximum value (inclusive)\n@throws IllegalArgumentException\nif {@code max < min}"
] | [
"Collapse repeated records, using exact string match on the record.\nThis is generally useful for making very verbose logs more readable.\n@return this",
"Gets an iterable of all the assignments of this task.\n@param fields the fields to retrieve.\n@return an iterable containing info about all the assignments.",
"Returns the z-coordinate of a vertex normal.\n\n@param vertex the vertex index\n@return the z coordinate",
"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.",
"Copy the settings from another calendar to this calendar.\n\n@param cal calendar data source",
"Sets the global. Does not add the global to the ExecutionResults.\n\n@param identifier\nThe identifier of the global\n@param object\nThe instance to be set as the global.\n@return",
"This method skips the end-of-line markers in the RTF document.\nIt also indicates if the end of the embedded object has been reached.\n\n@param text RTF document test\n@param offset offset into the RTF document\n@return new offset",
"Create an IPv6 mixed address using the given ipv6 segments and using this address for the embedded IPv4 segments\n\n@param segs\n@return",
"Convert a document List into arrays storing the data features and labels.\n\n@param document\nTraining documents\n@return A Pair, where the first element is an int[][][] representing the\ndata and the second element is an int[] representing the labels"
] |
@SuppressWarnings("deprecation")
public static boolean timeEquals(java.util.Date d1, java.util.Date d2) {
if (d1 == null || d2 == null) {
return false;
}
return d1.getHours() == d2.getHours()
&& d1.getMinutes() == d2.getMinutes()
&& d1.getSeconds() == d2.getSeconds();
} | [
"Checks the hour, minute and second are equal."
] | [
"Guess the date of the dump from the given dump file name.\n\n@param fileName\n@return 8-digit date stamp or YYYYMMDD if none was found",
"Sets the right padding for all cells in the row.\n@param paddingRight new padding, ignored if smaller than 0\n@return this to allow chaining",
"Update the id field of the object in the database.",
"Generate a schedule for the given start and end date.\n\n@param referenceDate The reference date (corresponds to \\( t = 0 \\).\n@param startDate The start date.\n@param endDate The end date.\n@return The schedule",
"Chooses the ECI mode most suitable for the content of this symbol.",
"generate a message for loglevel DEBUG\n\n@param pObject the message Object",
"Adds the remaining tokens to the processed tokens list.\n\n@param iter An iterator over the remaining tokens",
"Map from an activity code value UUID to the actual value itself, and its\nsequence number.\n\n@param storepoint storepoint containing current project data",
"Logout the current session. After calling this method,\nthe session will be cleared"
] |
@SuppressWarnings({"unused", "WeakerAccess"})
public static void changeCredentials(String accountID, String token, String region) {
if(defaultConfig != null){
Logger.i("CleverTap SDK already initialized with accountID:"+defaultConfig.getAccountId()
+" and token:"+defaultConfig.getAccountToken()+". Cannot change credentials to "
+ accountID + " and " + token);
return;
}
ManifestInfo.changeCredentials(accountID,token,region);
} | [
"This method is used to change the credentials of CleverTap account Id, token and region programmatically\n@param accountID CleverTap Account Id\n@param token CleverTap Account Token\n@param region Clever Tap Account Region"
] | [
"Log a byte array as a hex dump.\n\n@param data byte array",
"Expensive. Creates the plan for the specific settings.",
"Append the data of another lattice to this lattice. If the other lattice follows a different quoting convention, it is automatically converted.\nHowever, this method does not check, whether the two lattices are aligned in terms of reference date, curve names and meta schedules.\nIf the two lattices have shared data points, the data from this lattice will be overwritten.\n\n@param other The lattice containing the data to be appended.\n@param model The model to use for context, in case the other lattice follows a different convention.\n\n@return The lattice with the combined swaption entries.",
"Use this API to fetch appfwjsoncontenttype resource of given name .",
"Set up arguments for each FieldDescriptor in an array.",
"Loads the configuration from file \"OBJ.properties\". If the system\nproperty \"OJB.properties\" is set, then the configuration in that file is\nloaded. Otherwise, the file \"OJB.properties\" is tried. If that is also\nunsuccessful, then the configuration is filled with default values.",
"Create a new instance of a single input function from an operator character\n@param op Which operation\n@param input Input variable\n@return Resulting operation",
"Sets the replacement var map node specific.\n\n@param replacementVarMapNodeSpecific\nthe replacement var map node specific\n@return the parallel task builder",
"Classify stdin by senteces seperated by blank line\n@param readerWriter\n@return\n@throws IOException"
] |
public static base_responses delete(nitro_service client, appfwlearningdata resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
appfwlearningdata deleteresources[] = new appfwlearningdata[resources.length];
for (int i=0;i<resources.length;i++){
deleteresources[i] = new appfwlearningdata();
deleteresources[i].profilename = resources[i].profilename;
deleteresources[i].starturl = resources[i].starturl;
deleteresources[i].cookieconsistency = resources[i].cookieconsistency;
deleteresources[i].fieldconsistency = resources[i].fieldconsistency;
deleteresources[i].formactionurl_ffc = resources[i].formactionurl_ffc;
deleteresources[i].crosssitescripting = resources[i].crosssitescripting;
deleteresources[i].formactionurl_xss = resources[i].formactionurl_xss;
deleteresources[i].sqlinjection = resources[i].sqlinjection;
deleteresources[i].formactionurl_sql = resources[i].formactionurl_sql;
deleteresources[i].fieldformat = resources[i].fieldformat;
deleteresources[i].formactionurl_ff = resources[i].formactionurl_ff;
deleteresources[i].csrftag = resources[i].csrftag;
deleteresources[i].csrfformoriginurl = resources[i].csrfformoriginurl;
deleteresources[i].xmldoscheck = resources[i].xmldoscheck;
deleteresources[i].xmlwsicheck = resources[i].xmlwsicheck;
deleteresources[i].xmlattachmentcheck = resources[i].xmlattachmentcheck;
deleteresources[i].totalxmlrequests = resources[i].totalxmlrequests;
}
result = delete_bulk_request(client, deleteresources);
}
return result;
} | [
"Use this API to delete appfwlearningdata resources."
] | [
"Execute a HTTP request and handle common error cases.\n\n@param connection the HttpConnection request to execute\n@return the executed HttpConnection\n@throws CouchDbException for HTTP error codes or if an IOException was thrown",
"Ranks a map based on integer values\n@param inputMap Input\n@return The ranked map",
"Resets the resend counter and possibly resets the\nnode stage to DONE when previous initialization was\ncomplete.",
"This method take a list of fileName of the type partitionId_Replica_Chunk\nand returns file names that match the regular expression\nmasterPartitionId_",
"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.",
"slave=true",
"Calls a function script associated with this component.\nThe function is called even if the component\nis not enabled and not attached to a scene object.\n@param funcName name of script function to call.\n@param args function parameters as an array of objects.\n@return true if function was called, false if no such function\n@see org.gearvrf.script.GVRScriptFile#invokeFunction(String, Object[]) invokeFunction",
"Performs an implicit double step given the set of two imaginary eigenvalues provided.\nSince one eigenvalue is the complex conjugate of the other only one set of real and imaginary\nnumbers is needed.\n\n@param x1 upper index of submatrix.\n@param x2 lower index of submatrix.\n@param real Real component of each of the eigenvalues.\n@param img Imaginary component of one of the eigenvalues.",
"Post an artifact to the Grapes server\n\n@param artifact The artifact to post\n@param user The user posting the information\n@param password The user password\n@throws GrapesCommunicationException\n@throws javax.naming.AuthenticationException"
] |
public String expand(String macro) {
if (!isMacro(macro)) {
return macro;
}
String definition = macros.get(Config.canonical(macro));
if (null == definition) {
warn("possible missing definition of macro[%s]", macro);
}
return null == definition ? macro : definition;
} | [
"Expand a macro.\n\nThis will look up the macro definition from {@link #macros} map.\nIf not found then return passed in `macro` itself, otherwise return\nthe macro definition found.\n\n**note** if macro definition is not found and the string\n{@link #isMacro(String) comply to macro name convention}, then a\nwarn level message will be logged.\n\n@param macro the macro name\n@return macro definition or macro itself if no definition found."
] | [
"Returns the absolute directory on the Web site where dumpfiles of the\ngiven type can be found.\n\n@param dumpContentType\nthe type of dump\n@return relative web directory for the current dumpfiles\n@throws IllegalArgumentException\nif the given dump file type is not known",
"Returns all the retention policies with specified filters.\n@param name a name to filter the retention policies by. A trailing partial match search is performed.\nSet to null if no name filtering is required.\n@param type a policy type to filter the retention policies by. Set to null if no type filtering is required.\n@param userID a user id to filter the retention policies by. Set to null if no type filtering is required.\n@param limit the limit of items per single response. The default value is 100.\n@param api the API connection to be used by the resource.\n@param fields the fields to retrieve.\n@return an iterable with all the retention policies met search conditions.",
"Filters a dot at the end of the passed package name if present.\n\n@param pkgName\na package name\n@return a filtered package name",
"updates the groupname in the table given the id\n\n@param newGroupName new group name\n@param id ID of group",
"Log a warning for the given operation at the provided address for the given attribute, using the provided detail\nmessage.\n\n@param address where warning occurred\n@param operation where which problem occurred\n@param message custom error message to append\n@param attribute attribute we that has problem",
"Checks the query-customizer setting of the given collection descriptor.\n\n@param collDef The collection descriptor\n@param checkLevel The current check level (this constraint is only checked in strict)\n@exception ConstraintException If the constraint has been violated",
"Extracts out a matrix from source given a sub matrix with arbitrary rows and columns specified in\ntwo array lists\n\n@param src Source matrix. Not modified.\n@param rows array of row indexes\n@param rowsSize maximum element in row array\n@param cols array of column indexes\n@param colsSize maximum element in column array\n@param dst output matrix. Must be correct shape.",
"Return the hostname of this address such as \"MYCOMPUTER\".",
"Upload a photo from a File.\n\n@param file\nthe photo file\n@param metaData\nThe meta data\n@return photoId or ticketId\n@throws FlickrException"
] |
@Override
public GroupDiscussInterface getDiscussionInterface() {
if (discussionInterface == null) {
discussionInterface = new GroupDiscussInterface(apiKey, sharedSecret, transport);
}
return discussionInterface;
} | [
"Get the GroupDiscussInterface.\n\n@return The GroupDiscussInterface"
] | [
"Returns a string to resolve apostrophe issue in xpath\n\n@param text\n@return the apostrophe resolved xpath value string",
"Update a variable name with a date if the variable is detected as being a date.\n\n@param variableName the variable name.\n@param date the date to replace the value with if the variable is a date variable.",
"Helper method to load a property file from class path.\n\n@param filesToLoad\nan array of paths (class path paths) designating where the files may be. All files are loaded, in the order\ngiven. Missing files are silently ignored.\n\n@return a Properties object, which may be empty but not null.",
"This procedure sets permissions to the given file to not allow everybody to read it.\n\nOnly when underlying OS allows the change.\n\n@param file File to set permissions",
"Set the TimeSensor's cycleInterval property\nCurrently, this does not change the duration of the animation.\n@param newCycleInterval",
"Sets the value for the API's \"props\" parameter based on the current\nsettings.\n\n@param properties\ncurrent setting of parameters",
"Determines if a token stream contains only numeric tokens\n@param stream\n@return true if all tokens in the given stream can be parsed as an integer",
"set the layout which will host the ScrimInsetsFrameLayout and its layoutParams\n\n@param container\n@param layoutParams\n@return",
"Stores the gathered usage statistics about term uses by language to a CSV\nfile.\n\n@param usageStatistics\nthe statistics to store\n@param fileName\nthe name of the file to use"
] |
private void readAssignmentBaselines(Project.Assignments.Assignment assignment, ResourceAssignment mpx)
{
for (Project.Assignments.Assignment.Baseline baseline : assignment.getBaseline())
{
int number = NumberHelper.getInt(baseline.getNumber());
//baseline.getBCWP()
//baseline.getBCWS()
Number cost = DatatypeConverter.parseExtendedAttributeCurrency(baseline.getCost());
Date finish = DatatypeConverter.parseExtendedAttributeDate(baseline.getFinish());
//baseline.getNumber()
Date start = DatatypeConverter.parseExtendedAttributeDate(baseline.getStart());
Duration work = DatatypeConverter.parseDuration(m_projectFile, TimeUnit.HOURS, baseline.getWork());
if (number == 0)
{
mpx.setBaselineCost(cost);
mpx.setBaselineFinish(finish);
mpx.setBaselineStart(start);
mpx.setBaselineWork(work);
}
else
{
mpx.setBaselineCost(number, cost);
mpx.setBaselineWork(number, work);
mpx.setBaselineStart(number, start);
mpx.setBaselineFinish(number, finish);
}
}
} | [
"Extracts assignment baseline data.\n\n@param assignment xml assignment\n@param mpx mpxj assignment"
] | [
"Parses the provided file, using the given libraryPaths and sourcePaths as context. The libraries may be either\njar files or references to directories containing class files.\n\nThe sourcePaths must be a reference to the top level directory for sources (eg, for a file\nsrc/main/java/org/example/Foo.java, the source path would be src/main/java).\n\nThe wildcard resolver provides a fallback for processing wildcard imports that the underlying parser was unable\nto resolve.",
"Convert a layer type to a geometry class.\n\n@param layerType\nlayer type\n@return JTS class",
"Removes all items from the list box.",
"Return the value from the field in the object that is defined by this FieldType.",
"Get the server redirects belonging to a server group\n\n@param profileId ID of profile\n@param serverGroupId ID of server group\n@return Collection of ServerRedirect for a server group",
"Start pushing the element off to the right.",
"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",
"Constructs a triangule Face from vertices v0, v1, and v2.\n\n@param v0\nfirst vertex\n@param v1\nsecond vertex\n@param v2\nthird vertex",
"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"
] |
public BoxFile.Info uploadFile(InputStream fileContent, String name, long fileSize, ProgressListener listener) {
FileUploadParams uploadInfo = new FileUploadParams()
.setContent(fileContent)
.setName(name)
.setSize(fileSize)
.setProgressListener(listener);
return this.uploadFile(uploadInfo);
} | [
"Uploads a new file to this folder while reporting the progress to a ProgressListener.\n\n@param fileContent a stream containing the contents of the file to upload.\n@param name the name to give the uploaded file.\n@param fileSize the size of the file used for determining the progress of the upload.\n@param listener a listener for monitoring the upload's progress.\n@return the uploaded file's info."
] | [
"Searches the variables layers, top to bottom, for the iterable having all of it's items of the given type. Return\nnull if not found.",
"Computes A-B\n\n@param listA\n@param listB\n@return",
"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}.",
"Retrieve the default mapping between MPXJ assignment fields and Primavera assignment field names.\n\n@return mapping",
"Returns a map of URIs to package name, as specified by the packageNames\nparameter.",
"Parse the JSON string and return the object. The string is expected to be the JSON print data from the\nclient.\n\n@param spec the JSON formatted string.\n@return The encapsulated JSON object",
"Clear all overrides, reset repeat counts for a response path\n\n@param pathId ID of path\n@param clientUUID UUID of client\n@throws Exception exception",
"Return the list of module that uses the targeted artifact\n\n@param gavc String\n@param filters FiltersHolder\n@return List<DbModule>",
"Creates the conversion server that is specified by this builder.\n\n@return The conversion server that is specified by this builder."
] |
private static boolean implementsMethod(ClassNode classNode, String methodName, Class[] argTypes) {
List methods = classNode.getMethods();
if (argTypes == null || argTypes.length ==0) {
for (Iterator i = methods.iterator(); i.hasNext();) {
MethodNode mn = (MethodNode) i.next();
boolean methodMatch = mn.getName().equals(methodName);
if(methodMatch)return true;
// TODO Implement further parameter analysis
}
}
return false;
} | [
"Tests whether the ClassNode implements the specified method name\n\n@param classNode The ClassNode\n@param methodName The method name\n@param argTypes\n@return True if it implements the method"
] | [
"Adds a criterion to given pipeline which filters out vertices representing given WindupVertexFrame.",
"Output the SQL type for a Java String.",
"Use this API to fetch tmtrafficpolicy_tmglobal_binding resources of given name .",
"Builds a instance of the class for a map containing the values, without specifying the handler for differences\n\n@param clazz The class to build instance\n@param values The values map\n@return The instance\n@throws InstantiationException Error instantiating\n@throws IllegalAccessException Access error\n@throws IntrospectionException Introspection error\n@throws IllegalArgumentException Argument invalid\n@throws InvocationTargetException Invalid target",
"Use this API to fetch dnsview_binding resource of given name .",
"Validates an operation against its description provider\n\n@param operation The operation to validate\n@throws IllegalArgumentException if the operation is not valid",
"Initializes module enablement.\n\n@see ModuleEnablement",
"Returns the DBCP DataSource for the specified connection descriptor,\nafter creating a new DataSource if needed.\n@param jcd the descriptor for which to return a DataSource\n@return a DataSource, after creating a new pool if needed.\nGuaranteed to never be null.\n@throws LookupException if pool is not in cache and cannot be created",
"Returns the HTTP status text for the HTTP or WebDav status code\nspecified by looking it up in the static mapping. This is a\nstatic function.\n\n@param nHttpStatusCode [IN] HTTP or WebDAV status code\n@return A string with a short descriptive phrase for the\nHTTP status code (e.g., \"OK\")."
] |
public Double score(final String member) {
return doWithJedis(new JedisCallable<Double>() {
@Override
public Double call(Jedis jedis) {
return jedis.zscore(getKey(), member);
}
});
} | [
"Return the score of the specified element of the sorted set at key.\n@param member\n@return The score value or <code>null</code> if the element does not exist in the set."
] | [
"Return true if this rule should be applied for the specified ClassNode, based on the\nconfiguration of this rule.\n@param classNode - the ClassNode\n@return true if this rule should be applied for the specified ClassNode",
"Is the transport secured by a policy",
"Grab random holiday from the equivalence class that falls between the two dates\n\n@param earliest the earliest date parameter as defined in the model\n@param latest the latest date parameter as defined in the model\n@return a holiday that falls between the dates",
"Note that if there is sleep in this method.\n\n@param stopCount\nthe stop count",
"Apply filter to an image.\n\n@param source FastBitmap",
"Use this API to enable clusterinstance of given name.",
"Constraint that ensures that the field has a conversion if the java type requires it. Also checks the conversion class.\n\n@param fieldDef The field descriptor\n@param checkLevel The current check level (this constraint is checked in basic (partly) and strict)\n@exception ConstraintException If the conversion class is invalid",
"Switch to a new DataSource using the given configuration.\n@param newConfig BoneCP DataSource to use.\n@throws SQLException",
"Returns true if \"file\" is a subfile or subdirectory of \"dir\".\n\nFor example with the directory /path/to/a, the following return values would occur:\n\n/path/to/a/foo.txt - true /path/to/a/bar/zoo/boo/team.txt - true /path/to/b/foo.txt - false"
] |
public static base_responses update(nitro_service client, gslbsite resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
gslbsite updateresources[] = new gslbsite[resources.length];
for (int i=0;i<resources.length;i++){
updateresources[i] = new gslbsite();
updateresources[i].sitename = resources[i].sitename;
updateresources[i].metricexchange = resources[i].metricexchange;
updateresources[i].nwmetricexchange = resources[i].nwmetricexchange;
updateresources[i].sessionexchange = resources[i].sessionexchange;
updateresources[i].triggermonitor = resources[i].triggermonitor;
}
result = update_bulk_request(client, updateresources);
}
return result;
} | [
"Use this API to update gslbsite resources."
] | [
"invoked from the jelly file\n\n@throws Exception Any exception",
"Get the sub registry for the hosts.\n\n@param range the version range\n@return the sub registry",
"Parse duration represented as an arbitrary fraction of minutes.\n\n@param properties project properties\n@param value duration value\n@param targetTimeUnit required output time units\n@param factor required fraction of a minute\n@return Duration instance",
"Use this API to fetch lbvserver_filterpolicy_binding resources of given name .",
"Use this API to fetch the statistics of all nspbr6_stats resources that are configured on netscaler.",
"Returns the JMX connector address of a child process.\n\n@param p the process to which to connect\n@param startAgent whether to installed the JMX agent in the target process if not already in place\n@return a {@link JMXServiceURL} to the process's MBean server",
"Static method to convert a binary operator into a string.\n\n@param oper is the binary comparison operator to be converted",
"Record a content loader for a given patch id.\n\n@param patchID the patch id\n@param contentLoader the content loader",
"Adds a member to this group with the specified role.\n@param user the member to be added to this group.\n@param role the role of the user in this group. Can be null to assign the default role.\n@return info about the new group membership."
] |
public static tmtrafficpolicy_lbvserver_binding[] get(nitro_service service, String name) throws Exception{
tmtrafficpolicy_lbvserver_binding obj = new tmtrafficpolicy_lbvserver_binding();
obj.set_name(name);
tmtrafficpolicy_lbvserver_binding response[] = (tmtrafficpolicy_lbvserver_binding[]) obj.get_resources(service);
return response;
} | [
"Use this API to fetch tmtrafficpolicy_lbvserver_binding resources of given name ."
] | [
"Schedule at most one task.\n\nThe scheduled task *must* invoke 'doneTask()' upon\ncompletion/termination.\n\n@param executeService flag to control execution of the service, some tests pass\nin value 'false'\n@return The task scheduled or null if not possible to schedule a task at\nthis time.",
"Calculate start dates for a monthly recurrence.\n\n@param calendar current date\n@param frequency frequency\n@param dates array of start dates",
"Get the title and read the Title property according the provided locale.\n@return The map from locales to the locale specific titles.",
"Get the value for a single attribute on an MBean by name.\n@param attributeName the attribute name (can be URL-encoded).\n@return the value as a String.\n@throws JMException Java Management Exception\n@throws UnsupportedEncodingException if the encoding is not supported.",
"A recursive getAttribute method. In case a one-to-many is passed, an array will be returned.\n\n@param feature The feature wherein to search for the attribute\n@param name The attribute's full name. (can be attr1.attr2)\n@return Returns the value. In case a one-to-many is passed along the way, an array will be returned.\n@throws LayerException oops",
"Use this API to unset the properties of sslparameter resource.\nProperties that need to be unset are specified in args array.",
"Commit an upload session after all parts have been uploaded, creating the new file or the version.\n@param digest the base64-encoded SHA-1 hash of the file being uploaded.\n@param parts the list of uploaded parts to be committed.\n@param attributes the key value pairs of attributes from the file instance.\n@param ifMatch ensures that your app only alters files/folders on Box if you have the current version.\n@param ifNoneMatch ensure that it retrieve unnecessary data if the most current version of file is on-hand.\n@return the created file instance.",
"Readable yyyyMMdd representation of a day, which is also sortable.",
"Adds the newState and the edge between the currentState and the newState on the SFG.\n\n@param newState the new state.\n@param eventable the clickable causing the new state.\n@return the clone state iff newState is a clone, else returns null"
] |
private float colorToAngle(int color) {
float[] colors = new float[3];
Color.colorToHSV(color, colors);
return (float) Math.toRadians(-colors[0]);
} | [
"Convert a color to an angle.\n\n@param color The RGB value of the color to \"find\" on the color wheel.\n\n@return The angle (in rad) the \"normalized\" color is displayed on the\ncolor wheel."
] | [
"Starts asynchronous check. Result will be delivered to the listener on the main thread.\n\n@param context\n@param appId application id from the oculus dashboard\n@param listener listener to invoke when the result is available\n@throws IllegalStateException in case the platform sdk cannot be initialized\n@throws IllegalArgumentException if listener is null",
"Retrieves the task mode.\n\n@return task mode",
"Get the last modified time for a set of files.",
"Ensure that all logs are replayed, any other logs can not be added before end of this function.",
"Deletes any empty directories under the output directory. These\ndirectories are created by TestNG for its own reports regardless\nof whether those reports are generated. If you are using the\ndefault TestNG reports as well as ReportNG, these directories will\nnot be empty and will be retained. Otherwise they will be removed.\n@param outputDirectory The directory to search for empty directories.",
"Use this API to add cmppolicylabel resources.",
"Each string item rendering requires the border and a space on both sides.\n\n12 3 12 3 12 34\n+----- +-------- +------+\nabc venkat last\n\n@param colCount\n@param colMaxLenList\n@param data\n@return",
"Count the number of working hours in a day, based in the\ninteger representation of the working hours.\n\n@param hours working hours\n@return number of hours",
"Get the cached ETag for the given host and file\n@param host the host\n@param file the file\n@return the cached ETag or null if there is no ETag in the cache"
] |
public void setSizes(Collection<Size> sizes) {
for (Size size : sizes) {
if (size.getLabel() == Size.SMALL) {
smallSize = size;
} else if (size.getLabel() == Size.SQUARE) {
squareSize = size;
} else if (size.getLabel() == Size.THUMB) {
thumbnailSize = size;
} else if (size.getLabel() == Size.MEDIUM) {
mediumSize = size;
} else if (size.getLabel() == Size.LARGE) {
largeSize = size;
} else if (size.getLabel() == Size.LARGE_1600) {
large1600Size = size;
} else if (size.getLabel() == Size.LARGE_2048) {
large2048Size = size;
} else if (size.getLabel() == Size.ORIGINAL) {
originalSize = size;
} else if (size.getLabel() == Size.SQUARE_LARGE) {
squareLargeSize = size;
} else if (size.getLabel() == Size.SMALL_320) {
small320Size = size;
} else if (size.getLabel() == Size.MEDIUM_640) {
medium640Size = size;
} else if (size.getLabel() == Size.MEDIUM_800) {
medium800Size = size;
} else if (size.getLabel() == Size.VIDEO_PLAYER) {
videoPlayer = size;
} else if (size.getLabel() == Size.SITE_MP4) {
siteMP4 = size;
} else if (size.getLabel() == Size.VIDEO_ORIGINAL) {
videoOriginal = size;
}
else if (size.getLabel() == Size.MOBILE_MP4) {
mobileMP4 = size;
}
else if (size.getLabel() == Size.HD_MP4) {
hdMP4 = size;
}
}
} | [
"Set sizes to override the generated URLs of the different sizes.\n\n@param sizes\n@see com.flickr4java.flickr.photos.PhotosInterface#getSizes(String)"
] | [
"Use this API to fetch sslocspresponder resource of given name .",
"Private function to allow looking for the field recursively up the superclasses.\n\n@param clazz\n@return",
"Get a list of referring domains for a photo.\n\n@param date\n(Required) Stats will be returned for this date. A day according to Flickr Stats starts at midnight GMT for all users, and timestamps will\nautomatically be rounded down to the start of the day.\n@param photoId\n(Optional) The id of the photo to get stats for. If not provided, stats for all photos will be returned.\n@param perPage\n(Optional) Number of domains to return per page. If this argument is omitted, it defaults to 25. The maximum allowed value is 100.\n@param page\n(Optional) The page of results to return. If this argument is omitted, it defaults to 1.\n@see \"http://www.flickr.com/services/api/flickr.stats.getPhotoDomains.html\"",
"Returns the default table name for this class which is the unqualified class name.\n\n@return The default table name",
"Reports that a node is faulted.\n\n@param faulted the node faulted\n@param throwable the reason for fault",
"Obtains a British Cutover local date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the British Cutover local date-time, not null\n@throws DateTimeException if unable to create the date-time",
"Writes an untagged OK response, with the supplied response code,\nand an optional message.\n\n@param responseCode The response code, included in [].\n@param message The message to follow the []",
"Use this API to fetch filtered set of vpnclientlessaccesspolicy resources.\nset the filter parameter values in filtervalue object.",
"Sets the path to the script file to load and loads the script.\n\n@param filePath path to script file\n@throws IOException if the script cannot be read.\n@throws GVRScriptException if a script processing error occurs."
] |
private void stop() {
for (int i = 0; i < mDownloadDispatchers.length; i++) {
if (mDownloadDispatchers[i] != null) {
mDownloadDispatchers[i].quit();
}
}
} | [
"Stops download dispatchers."
] | [
"This method retrieves a String of the specified type,\nbelonging to the item with the specified unique ID.\n\n@param id unique ID of entity to which this data belongs\n@param type data type identifier\n@return string containing required data",
"Use this API to update Interface.",
"Returns the configured request parameter for the current query string, or the default parameter if the core is not specified.\n@return The configured request parameter for the current query string, or the default parameter if the core is not specified.",
"Create the index file that sets up the frameset.\n@param outputDirectory The target directory for the generated file(s).",
"Creates the node mappings.\n\n@param mtasTokenIdFactory\nthe mtas token id factory\n@param level\nthe level\n@param parentLevel\nthe parent level",
"This method extracts project properties from a Planner file.\n\n@param project Root node of the Planner file",
"Returns with an iterable of URIs that points to all elements that are\nreferenced by the argument or vice-versa.\n\n@return an iterable of URIs that are referenced by the argument or the\nother way around.",
"Performs a streaming request against a Stitch app server determined by the deployment model\nof the underlying app. Throws a Stitch specific exception if the request fails.\n\n@param stitchReq the request to perform.\n@return an {@link EventStream} that will provide response events.",
"Shutdown each AHC client in the map."
] |
public static scpolicy_stats[] get(nitro_service service) throws Exception{
scpolicy_stats obj = new scpolicy_stats();
scpolicy_stats[] response = (scpolicy_stats[])obj.stat_resources(service);
return response;
} | [
"Use this API to fetch the statistics of all scpolicy_stats resources that are configured on netscaler."
] | [
"Update the repeat number for a client path\n\n@param newNum new repeat number of the path\n@param path_id ID of the path\n@param client_uuid UUID of the client\n@throws Exception exception",
"Split a module Id to get the module name\n@param moduleId\n@return String",
"returns the zero argument constructor for the class represented by this class descriptor\nor null if a zero argument constructor does not exist. If the zero argument constructor\nfor this class is not public it is made accessible before being returned.",
"Execute a server task.\n\n@param listener the transactional server listener\n@param task the server task\n@return time to wait in ms for a response from the server, or {@code -1} if the task execution failed locally",
"Extracts the service name from a Server.\n@param server\n@return",
"Creates a descriptor for the bundle in the same folder where the bundle files are located.\n@throws CmsException thrown if creation fails.",
"Returns first enum constant found..\n\n@param styleName Space-separated list of styles\n@param enumClass Type of enum\n@param defaultValue Default value of no match was found\n@return First enum constant found or default value",
"Creates a random symmetric matrix whose values are selected from an uniform distribution\nfrom min to max, inclusive.\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.",
"We will always try to gather as many results as possible and never throw an exception.\n\nTODO: Make MemberResponse hold an exception that we can populate if something bad happens so we always\nget to return something for a member in order to indicate a failure. Getting the result when there\nis an error should throw an exception.\n\n@param execSvc\n@param members\n@param callable\n@param maxWaitTime - a value of 0 indicates forever\n@param unit\n@return"
] |
public static DatagramPacket buildPacket(PacketType type, ByteBuffer deviceName, ByteBuffer payload) {
ByteBuffer content = ByteBuffer.allocate(0x1f + payload.remaining());
content.put(getMagicHeader());
content.put(type.protocolValue);
content.put(deviceName);
content.put(payload);
return new DatagramPacket(content.array(), content.capacity());
} | [
"Build a standard-format UDP packet for sending to port 50001 or 50002 in the protocol.\n\n@param type the type of packet to create.\n@param deviceName the 0x14 (twenty) bytes of the device name to send in the packet.\n@param payload the remaining bytes which come after the device name.\n@return the packet to send."
] | [
"Parses a duration and returns the corresponding number of milliseconds.\n\nDurations consist of a space-separated list of components of the form {number}{time unit},\nfor example 1d 5m. The available units are d (days), h (hours), m (months), s (seconds), ms (milliseconds).<p>\n\n@param durationStr the duration string\n@param defaultValue the default value to return in case the pattern does not match\n@return the corresponding number of milliseconds",
"Search for groups. 18+ groups will only be returned for authenticated calls where the authenticated user is over 18. This method does not require\nauthentication.\n\n@param text\nThe text to search for.\n@param perPage\nNumber of groups to return per page. If this argument is 0, it defaults to 100. The maximum allowed value is 500.\n@param page\nThe page of results to return. If this argument is 0, it defaults to 1.\n@return A GroupList Object. Only the fields <em>id</em>, <em>name</em> and <em>eighteenplus</em> in the Groups will be set.\n@throws FlickrException",
"Parse work units.\n\n@param value work units value\n@return TimeUnit instance",
"Formats a double value.\n\n@param number numeric value\n@return Double instance",
"Cleans up a extension module's subsystems from the resource registration model.\n\n@param rootResource the model root resource\n@param moduleName the name of the extension's module. Cannot be {@code null}\n@throws IllegalStateException if the extension still has subsystems present in {@code rootResource} or its children",
"Delivers the correct JSON Object for the Stencilset\n\n@param stencilSet\n@throws org.json.JSONException",
"Read a list of fixed size blocks using an instance of the supplied reader class.\n\n@param readerClass reader class\n@return list of blocks",
"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",
"Use this API to fetch snmpalarm resources of given names ."
] |
public static float smoothPulse(float a1, float a2, float b1, float b2, float x) {
if (x < a1 || x >= b2)
return 0;
if (x >= a2) {
if (x < b1)
return 1.0f;
x = (x - b1) / (b2 - b1);
return 1.0f - (x*x * (3.0f - 2.0f*x));
}
x = (x - a1) / (a2 - a1);
return x*x * (3.0f - 2.0f*x);
} | [
"A smoothed pulse function. A cubic function is used to smooth the step between two thresholds.\n@param a1 the lower threshold position for the start of the pulse\n@param a2 the upper threshold position for the start of the pulse\n@param b1 the lower threshold position for the end of the pulse\n@param b2 the upper threshold position for the end of the pulse\n@param x the input parameter\n@return the output value"
] | [
"Convert a URL Encoded name back to the original form.\n@param name the name to URL urlDecode.\n@param encoding the string encoding to be used (i.e. UTF-8)\n@return the name in original form.\n@throws UnsupportedEncodingException if the encoding is not supported.",
"a specialized version of solve that avoid additional checks that are not needed.",
"Checks the given class descriptor for correct object cache setting.\n\n@param classDef The class descriptor\n@param checkLevel The current check level (this constraint is only checked in strict)\n@exception ConstraintException If the constraint has been violated",
"Set up the services to create a channel listener and operation handler service.\n@param serviceTarget the service target to install the services into\n@param endpointName the endpoint name to install the services into\n@param channelName the name of the channel\n@param executorServiceName service name of the executor service to use in the operation handler service\n@param scheduledExecutorServiceName service name of the scheduled executor service to use in the operation handler service",
"Executes the API action \"wbsetclaim\" for the given parameters.\n\n@param statement\nthe JSON serialization of claim to add or delete.\n@param bot\nif true, edits will be flagged as \"bot edits\" provided that\nthe logged in user is in the bot group; for regular users, the\nflag will just be ignored\n@param baserevid\nthe revision of the data that the edit refers to or 0 if this\nshould not be submitted; when used, the site will ensure that\nno edit has happened since this revision to detect edit\nconflicts; it is recommended to use this whenever in all\noperations where the outcome depends on the state of the\nonline data\n@param summary\nsummary for the edit; will be prepended by an automatically\ngenerated comment; the length limit of the autocomment\ntogether with the summary is 260 characters: everything above\nthat limit will be cut off\n@return the JSON response from the API\n@throws IOException\nif there was an IO problem. such as missing network\nconnection\n@throws MediaWikiApiErrorException\nif the API returns an error\n@throws IOException\n@throws MediaWikiApiErrorException",
"Check if the object has a property with the key.\n\n@param key key to check for.",
"Resets the helper's state.\n\n@return this {@link Searcher} for chaining.",
"Append field with quotes and escape characters added, if required.\n\n@return this",
"Retrieve and validate the timestamp value from the REST request.\n\"X_VOLD_REQUEST_ORIGIN_TIME_MS\" is timestamp header\n\nTODO REST-Server 1. Change Time stamp header to a better name.\n\n@return true if present, false if missing"
] |
private void validateArguments() throws BuildException {
Path tempDir = getTempDir();
if (tempDir == null) {
throw new BuildException("Temporary directory cannot be null.");
}
if (Files.exists(tempDir)) {
if (!Files.isDirectory(tempDir)) {
throw new BuildException("Temporary directory is not a folder: " + tempDir.toAbsolutePath());
}
} else {
try {
Files.createDirectories(tempDir);
} catch (IOException e) {
throw new BuildException("Failed to create temporary folder: " + tempDir, e);
}
}
} | [
"Validate arguments."
] | [
"This method returns the existing folder, and if it does not exist, the\nmethod generates it.\n\n@param path\n@param dest_dir\n@return the folder\n@throws BeastException",
"Resolve the targeted license thanks to the license ID\nReturn null if no license is matching the licenseId\n\n@param licenseId\n@return DbLicense",
"Checks to see if a handler is disabled\n\n@param handlerName the name of the handler to enable.",
"Allows direct access to the Undertow.Builder for custom configuration\n\n@param serverConfigurationFunction the serverConfigurationFunction",
"Generate a PageMetadata object for the page represented by the specified pagination token.\n\n@param paginationToken opaque pagination token\n@param initialParameters the initial view query parameters (i.e. for the page 1 request).\n@param <K> the view key type\n@param <V> the view value type\n@return PageMetadata object for the given page",
"Configure all UI elements in the \"ending\"-options panel.",
"Get a new token.\n\n@return 14 character String",
"Function to perform forward softmax",
"Sets current state\n@param state new state"
] |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.