query
stringlengths
74
6.1k
positive
sequencelengths
1
1
negative
sequencelengths
9
9
public static boolean pushImage(Launcher launcher, final JenkinsBuildInfoLog log, final String imageTag, final String username, final String password, final String host) throws IOException, InterruptedException { return launcher.getChannel().call(new MasterToSlaveCallable<Boolean, IOException>() { public Boolean call() throws IOException { String message = "Pushing image: " + imageTag; if (StringUtils.isNotEmpty(host)) { message += " using docker daemon host: " + host; } log.info(message); DockerUtils.pushImage(imageTag, username, password, host); return true; } }); }
[ "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" ]
[ "When creating barcode columns\n@return", "Pauses the playback of a sound.", "Pump events from event stream.", "This method is used to calculate the duration of work between two fixed\ndates according to the work schedule defined in the named calendar.\nThe name of the calendar to be used is passed as an argument.\n\n@param calendarName name of the calendar to use\n@param startDate start of the period\n@param endDate end of the period\n@return new Duration object\n@throws MPXJException normally when no Standard calendar is available\n@deprecated use calendar.getDuration(startDate, endDate)", "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", "Method to be implemented by the RendererBuilder subtypes. In this method the library user will\ndefine the mapping between content and renderer class.\n\n@param content used to map object to Renderers.\n@return the class associated to the renderer.", "Delete a license from the repository\n\n@param licName The name of the license to remove", "Returns the ending used by the Wikimedia-provided dumpfile names of the\ngiven type.\n\n@param dumpContentType\nthe type of dump\n@return postfix of the dumpfile name\n@throws IllegalArgumentException\nif the given dump file type is not known", "Returns true if the context has access to any given permissions." ]
protected float[] transformPosition(float x, float y) { Point2D.Float point = super.transformedPoint(x, y); AffineTransform pageTransform = createCurrentPageTransformation(); Point2D.Float transformedPoint = (Point2D.Float) pageTransform.transform(point, null); return new float[]{(float) transformedPoint.getX(), (float) transformedPoint.getY()}; }
[ "Transforms a position according to the current transformation matrix and current page transformation.\n@param x\n@param y\n@return" ]
[ "Used by the slave host when creating the host info dmr sent across to the DC during the registration process\n\n@param ignoreUnaffectedServerGroups whether the slave host is set up to ignore config for server groups it does not have servers for\n@param hostModel the resource containing the host model\n@param model the dmr sent across to theDC\n@return the modified dmr", "Check if this path matches the address path.\nAn address matches this address if its path elements match or are valid\nmulti targets for this path elements. Addresses that are equal are matching.\n\n@param address The path to check against this path. If null, this method\nreturns false.\n@return true if the provided path matches, false otherwise.", "Returns a value.\n@param path the path that designates the key. Must be prefixed with a \"/\".\n@return the metadata property value.\n@deprecated Metadata#get() does not handle all possible metadata types; use Metadata#getValue() instead", "Sets the request body to the contents of a String.\n\n<p>If the contents of the body are large, then it may be more efficient to use an {@link InputStream} instead of\na String. Using a String requires that the entire body be in memory before sending the request.</p>\n\n@param body a String containing the contents of the body.", "Create users for the given array of addresses. The passwords will be set to the email addresses.\n\n@param greenMail Greenmail instance to create users for\n@param addresses Addresses", "Search for rectangles which have the same width and x position, and\nwhich join together vertically and merge them together to reduce the\nnumber of rectangles needed to describe a symbol.", "Create and get actor system.\n\n@return the actor system", "Adds OPT_J | OPT_JSON option to OptionParser, with multiple arguments.\n\n@param parser OptionParser to be modified\n@param required Tells if this option is required or optional", "Executes a batch plan.\n\n@param batchId Used as the ID of the batch plan. This allows related\ntasks on client- & server-side to pretty print messages in a\nmanner that debugging can track specific batch plans across the\ncluster.\n@param batchPlan The batch plan..." ]
public static LinearSolverDense<DMatrixRMaj> symmPosDef(int matrixWidth ) { if(matrixWidth < EjmlParameters.SWITCH_BLOCK64_CHOLESKY ) { CholeskyDecompositionCommon_DDRM decomp = new CholeskyDecompositionInner_DDRM(true); return new LinearSolverChol_DDRM(decomp); } else { if( EjmlParameters.MEMORY == EjmlParameters.MemoryUsage.FASTER ) return new LinearSolverChol_DDRB(); else { CholeskyDecompositionCommon_DDRM decomp = new CholeskyDecompositionInner_DDRM(true); return new LinearSolverChol_DDRM(decomp); } } }
[ "Creates a solver for symmetric positive definite matrices.\n\n@return A new solver for symmetric positive definite matrices." ]
[ "Click no children of the specified parent element.\n\n@param tagName The tag name of which no children should be clicked.\n@return The builder to append more options.", "Iterate RMI Targets Map and remove entries loaded by protected ClassLoader", "All address strings are comparable. If two address strings are invalid, their strings are compared.\nOtherwise, address strings are compared according to which type or version of string, and then within each type or version\nthey are compared using the comparison rules for addresses.\n\n@param other\n@return", "Adds a class entry to this JAR.\n\n@param clazz the class to add to the JAR.\n@return {@code this}", "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.", "Calculates Tangent value of the complex number.\n\n@param z1 A ComplexNumber instance.\n@return Returns new ComplexNumber instance containing the Tangent value of the specified complex number.", "Flush the network buffer and write all entries to the serve. then wait\nfor an ack from the server. This is a blocking call. It is invoked on\nevery Commit batch size of entries, It is also called on the close\nsession call\n\n@param storeNamesToCommit List of stores to be flushed and committed", "Triggers collapse of the parent.", "Processes the template for all indices of the current table.\n\n@param template The template\n@param attributes The attributes of the tag\n@exception XDocletException if an error occurs\[email protected] type=\"block\"\[email protected] name=\"unique\" optional=\"true\" description=\"Whether to process the unique indices or not\"\nvalues=\"true,false\"" ]
public static Method getSetterPropertyMethod(Class<?> type, String propertyName) { String sourceMethodName = "set" + BeanUtils.capitalizePropertyName(propertyName); Method sourceMethod = BeanUtils.getMethod(type, sourceMethodName); return sourceMethod; }
[ "get the setter method corresponding to given property" ]
[ "Convert a date to the String representation we use in the JSON.\n@param d the date to convert\n@return the String representation we use in the JSON.", "Forceful cleanup the logs", "Indicates if a set of types are all proxyable\n\n@param types The types to test\n@return True if proxyable, false otherwise", "Opens the favorite dialog.\n\n@param explorer the explorer instance (null if not currently in explorer)", "Sets a header per-request\n\n@param key Header key\n@param value Header value\n@return The request itself", "Returns the zip entry for a file in the archive.\n@param filename the file name\n@return the zip entry for the file with the provided name\n@throws ZipException thrown if the file is not in the zip archive", "Convenience method dispatches this object to the source appender, which\nwill result in the custom message being appended to the new file.\n\n@param message\nThe custom logging message to be appended.", "Use this API to fetch the statistics of all rnatip_stats resources that are configured on netscaler.", "Process stop.\n\n@param endpoint the endpoint\n@param eventType the event type" ]
final void begin() { if (this.properties.isDateRollEnforced()) { final Thread thread = new Thread(this, "Log4J Time-based File-roll Enforcer"); thread.setDaemon(true); thread.start(); this.threadRef = thread; } }
[ "Starts the enforcer." ]
[ "Create the index and associate it with all project models in the Application", "Take a stab at fixing validation problems ?\n\n@param object", "Sets the texture this render target will render to.\nIf no texture is provided, the render target will\nnot render anything.\n@param texture GVRRenderTexture to render to.", "Removes a corporate groupId from an Organisation\n\n@param organizationId String\n@param corporateGroupId String", "Given a DocumentVersionInfo, returns a BSON document representing the next version. This means\nand incremented version count for a non-empty version, or a fresh version document for an\nempty version.\n@return a BsonDocument representing a synchronization version", "Maps a story if it is allowed by the meta filter\n\n@param story\nthe Story\n@param metaFilter\nthe meta filter", "Decode '%HH'.", "Deploys application reading resources from specified InputStream.\n\n@param inputStream where resources are read\n@throws IOException", "Deletes an entity by its primary key.\n\n@param id\nPrimary key of the entity." ]
public static void checkEigenvalues() { DoubleMatrix A = new DoubleMatrix(new double[][]{ {3.0, 2.0, 0.0}, {2.0, 3.0, 2.0}, {0.0, 2.0, 3.0} }); DoubleMatrix E = new DoubleMatrix(3, 1); NativeBlas.dsyev('N', 'U', 3, A.data, 0, 3, E.data, 0); check("checking existence of dsyev...", true); }
[ "Compute eigenvalues. This is a routine not in ATLAS, but in the original\nLAPACK." ]
[ "Microsoft Project bases the order of tasks displayed on their ID\nvalue. This method takes the hierarchical structure of tasks\nrepresented in MPXJ and renumbers the ID values to ensure that\nthis structure is displayed as expected in Microsoft Project. This\nis typically used to deal with the case where a hierarchical task\nstructure has been created programmatically in MPXJ.", "Add a property.", "Given a resource field number, this method returns the resource field name.\n\n@param key resource field number\n@return resource field name", "Obtains a local date in Accounting calendar system from the\nproleptic-year, month-of-year and day-of-month fields.\n\n@param prolepticYear the proleptic-year\n@param month the month-of-year\n@param dayOfMonth the day-of-month\n@return the Accounting local date, not null\n@throws DateTimeException if unable to create the date", "Non-blocking call\n\n@param key\n@param value\n@return", "Use this API to Force hafailover.", "Called by implementation class once websocket connection established\nat networking layer.\n@param context the websocket context", "Read an exception day for a calendar.\n\n@param mpxjCalendar ProjectCalendar instance\n@param day ConceptDraw PROJECT exception day", "Overrides the superclass implementation to allow the AttributeDefinition for each field in the\nobject to in turn resolve that field.\n\n{@inheritDoc}" ]
@Override public void run() { try { threadContext.activate(); // run the original thread runnable.run(); } finally { threadContext.invalidate(); threadContext.deactivate(); } }
[ "Set up the ThreadContext and delegate." ]
[ "Add an object into cache by key with expiration time specified\n\n@param key\nthe key to index the object within the cache\n@param obj\nthe object to be cached\n@param expiration\nthe seconds after which the object will be evicted from the cache", "given the groupId, returns the groupName\n\n@param groupId ID of group\n@return name of group", "Returns the logger name that should be used in the log manager.\n\n@param name the name of the logger from the resource\n\n@return the name of the logger", "Returns all keys of all rows contained within this association.\n\n@return all keys of all rows contained within this association", "Counts one entity. Every once in a while, the current time is checked so\nas to print an intermediate report roughly every ten seconds.", "Retrieve the configuration of the named template.\n\n@param name the template name;", "Release all memory addresses taken by this allocator.\nBe careful in using this method, since all of the memory addresses become invalid.", "Put features in a tile. This will assure all features are only added in one tile. When a feature's unique tile\nis different from this one a link is added in the tile.\n\n@param tile\ntile to put features in\n@param maxTileExtent\nthe maximum tile extent\n@throws GeomajasException oops", "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" ]
public double Function2D(double x, double y) { return Math.exp(-(x * x + y * y) / (2 * sqrSigma)) / (2 * Math.PI * sqrSigma); }
[ "2-D Gaussian function.\n\n@param x value.\n@param y value.\n@return Function's value at point (x,y)." ]
[ "Log a trace message with a throwable.", "Starts the compressor.", "Sets the provided filters.\n@param filters a map \"column id -> filter\".", "Skip to the next matching short value.\n\n@param buffer input data array\n@param offset start offset into the input array\n@param value value to match\n@return offset of matching pattern", "add various getAt and setAt methods for primitive arrays\n@param receiver the receiver class\n@param name the name of the method\n@param args the argument classes", "Deserializes a variable, NOT checking whether the datatype is custom\n@param s\n@param variableType\n@return", "Adds OPT_F | OPT_FILE option to OptionParser, with one argument.\n\n@param parser OptionParser to be modified\n@param required Tells if this option is required or optional", "Extract resource assignments for a task.\n\n@param task parent task\n@param assignments list of Synchro resource assignment data", "Parses whole value as list attribute\n@deprecated in favour of using {@link AttributeParser attribute parser}\n@param value String with \",\" separated string elements\n@param operation operation to with this list elements are added\n@param reader xml reader from where reading is be done\n@throws XMLStreamException if {@code value} is not valid" ]
private void processDays(ProjectCalendar calendar) throws Exception { // Default all days to non-working for (Day day : Day.values()) { calendar.setWorkingDay(day, false); } List<Row> rows = getRows("select * from zcalendarrule where zcalendar1=? and z_ent=?", calendar.getUniqueID(), m_entityMap.get("CalendarWeekDayRule")); for (Row row : rows) { Day day = row.getDay("ZWEEKDAY"); String timeIntervals = row.getString("ZTIMEINTERVALS"); if (timeIntervals == null) { calendar.setWorkingDay(day, false); } else { ProjectCalendarHours hours = calendar.addCalendarHours(day); NodeList nodes = getNodeList(timeIntervals, m_dayTimeIntervals); calendar.setWorkingDay(day, nodes.getLength() > 0); for (int loop = 0; loop < nodes.getLength(); loop++) { NamedNodeMap attributes = nodes.item(loop).getAttributes(); Date startTime = m_calendarTimeFormat.parse(attributes.getNamedItem("startTime").getTextContent()); Date endTime = m_calendarTimeFormat.parse(attributes.getNamedItem("endTime").getTextContent()); if (startTime.getTime() >= endTime.getTime()) { endTime = DateHelper.addDays(endTime, 1); } hours.addRange(new DateRange(startTime, endTime)); } } } }
[ "Process normal calendar working and non-working days.\n\n@param calendar parent calendar" ]
[ "Adds a boolean refinement for the next queries.\n\n@param attribute the attribute to refine on.\n@param value the value to refine with.\n@return this {@link Searcher} for chaining.", "Adds the provided map of key-value pairs as a new row in the table represented by this DataSet.\n\n@param map the key (column-name), value pairs to add as a new row\n@throws SQLException if a database error occurs", "Sets the current class definition derived from the current class, and optionally some attributes.\n\n@param template The template\n@param attributes The attributes of the tag\n@exception XDocletException if an error occurs\[email protected] type=\"block\"\[email protected] name=\"accept-locks\" optional=\"true\" description=\"The accept locks setting\" values=\"true,false\"\[email protected] name=\"attributes\" optional=\"true\" description=\"Attributes of the class as name-value pairs 'name=value',\nseparated by commas\"\[email protected] name=\"determine-extents\" optional=\"true\" description=\"Whether to determine\npersistent direct sub types automatically\" values=\"true,false\"\[email protected] name=\"documentation\" optional=\"true\" description=\"Documentation on the class\"\[email protected] name=\"factory-method\" optional=\"true\" description=\"Specifies a no-argument factory method that is\nused to create instances (not yet implemented !)\"\[email protected] name=\"factory-class\" optional=\"true\" description=\"Specifies a factory class to be used for creating\nobjects of this class\"\[email protected] name=\"factory-method\" optional=\"true\" description=\"Specifies a static no-argument method in the factory class\"\[email protected] name=\"generate-repository-info\" optional=\"true\" description=\"Whether repository data should be\ngenerated for the class\" values=\"true,false\"\[email protected] name=\"generate-table-info\" optional=\"true\" description=\"Whether table data should be\ngenerated for the class\" values=\"true,false\"\[email protected] name=\"include-inherited\" optional=\"true\" description=\"Whether to include\nfields/references/collections of supertypes\" values=\"true,false\"\[email protected] name=\"initialization-method\" optional=\"true\" description=\"Specifies a no-argument instance method that is\ncalled right after an instance has been read from the database\"\[email protected] name=\"isolation-level\" optional=\"true\" description=\"The isolation level setting\"\[email protected] name=\"proxy\" optional=\"true\" description=\"The proxy setting for this class\"\[email protected] name=\"proxy-prefetching-limit\" optional=\"true\" description=\"Specifies the amount of objects of\nobjects of this class to prefetch in collections\"\[email protected] name=\"refresh\" optional=\"true\" description=\"Can be set to force OJB to refresh instances when\nloaded from the cache\" values=\"true,false\"\[email protected] name=\"row-reader\" optional=\"true\" description=\"The row reader for the class\"\[email protected] name=\"schema\" optional=\"true\" description=\"The schema for the type\"\[email protected] name=\"table\" optional=\"true\" description=\"The table for the class\"\[email protected] name=\"table-documentation\" optional=\"true\" description=\"Documentation on the table\"", "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", "Read a text file resource into a single string\n\n@param context\nA non-null Android Context\n@param resourceId\nAn Android resource id\n@return The contents, or null on error.", "Creates a new RgbaColor from the specified HSL components.\n\n<p>\n<i>Implementation based on <a\nhref=\"http://en.wikipedia.org/wiki/HSL_and_HSV\">wikipedia</a>\nand <a\nhref=\"http://www.w3.org/TR/css3-color/#hsl-color\">w3c</a></i>\n\n@param H\nHue [0,360)\n@param S\nSaturation [0,100]\n@param L\nLightness [0,100]", "Seeks to the given season within the given year\n\n@param seasonString\n@param yearString", "Find the current active layout.\n\n@param phoenixProject phoenix project data\n@return current active layout", "Converts a string from ISO-8559-1 encoding to UTF-8.\n@param value ISO-8559-1 value\n@return UTF-8 value" ]
public void setDateMax(Date dateMax) { this.dateMax = dateMax; if (isAttached() && dateMax != null) { getPicker().set("max", JsDate.create((double) dateMax.getTime())); } }
[ "Set the maximum date limit." ]
[ "NOT IN Criteria with SubQuery\n@param attribute The field name to be used\n@param subQuery The subQuery", "this method is not intended to be called by clients\n@since 2.12", "Returns a RowColumn following the current one\n\n@return RowColumn following this one", "Add a resource assignment which has been populated elsewhere.\n\n@param assignment resource assignment", "Send get request.\n\n@param url the url\n@param customHeaders the customHeaders\n@param params the params\n@return the string\n@throws URISyntaxException the uri syntax exception\n@throws IOException the io exception", "Stop finding beat grids for all active players.", "Method used to create missing timephased data.\n\n@param file project file\n@param assignment resource assignment\n@param timephasedPlanned planned timephased data\n@param timephasedComplete complete timephased data", "Matrix inverse for symmetric positive definite matrices. For small matrices an unrolled\ncholesky is used. Otherwise a standard decomposition.\n\n@see UnrolledCholesky_DDRM\n@see LinearSolverFactory_DDRM#chol(int)\n\n@param mat (Input) SPD matrix\n@param result (Output) Inverted matrix.\n@return true if it could invert the matrix false if it could not.", "Find the index of this animation if it is in this animator.\n\n@param findme {@link GVRAnimation} to find.\n@returns 0 based index of animation or -1 if not found\n@see GVRAnimator#addAnimation(GVRAnimation)" ]
public static Iterable<String> toHexStrings(Iterable<ByteArray> arrays) { ArrayList<String> ret = new ArrayList<String>(); for(ByteArray array: arrays) ret.add(ByteUtils.toHexString(array.get())); return ret; }
[ "Translate the each ByteArray in an iterable into a hexadecimal string\n\n@param arrays The array of bytes to translate\n@return An iterable of converted strings" ]
[ "1-D Integer array to double array.\n\n@param array Integer array.\n@return Double array.", "Parse the XML for a collection as returned by getInfo call.\n\n@param collectionElement\n@return", "Sends a user a password reset email for the given email.\n\n@param email the email of the user.\n@return A {@link Task} that completes when the reqest request completes/fails.", "Dump an array of bytes in hexadecimal.\n\n@param displayOffset the display offset (left column)\n@param data the byte array of data\n@param offset the offset to start dumping in the byte array\n@param len the length of data to dump\n@return the dump string", "Use this API to count sslcertkey_crldistribution_binding resources configued on NetScaler.", "Map the currency separator character to a symbol name.\n\n@param c currency separator character\n@return symbol name", "Use this API to fetch statistics of gslbservice_stats resource of given name .", "Creates metadata on this folder using a specified scope and template.\n\n@param templateName the name of the metadata template.\n@param scope the scope of the template (usually \"global\" or \"enterprise\").\n@param metadata the new metadata values.\n@return the metadata returned from the server.", "Obtain the destination hostname for a source host\n\n@param hostName\n@return" ]
public static String readFileContentToString(String filePath) throws IOException { String content = ""; content = Files.toString(new File(filePath), Charsets.UTF_8); return content; }
[ "Read file content to string.\n\n@param filePath\nthe file path\n@return the string\n@throws IOException\nSignals that an I/O exception has occurred." ]
[ "Finds all providers for the given service.\n\n@param serviceName\nThe fully qualified name of the service interface.\n@return\nThe ordered set of providers for the service if any exists.\nOtherwise, it returns an empty list.\n@throws IllegalArgumentException if serviceName is <tt>null</tt>", "Determines whether this table has a foreignkey of the given name.\n\n@param name The name of the foreignkey\n@return <code>true</code> if there is a foreignkey of that name", "If X == null then the solution is written into B. Otherwise the solution is copied\nfrom B into X.", "Adds the value to the Collection mapped to by the key.", "Accessor method to retrieve a Boolean instance.\n\n@param field the index number of the field to be retrieved\n@param falseText locale specific text representing false\n@return the value of the required field", "Extract Primavera project data and export in another format.\n\n@param driverClass JDBC driver class name\n@param connectionString JDBC connection string\n@param projectID project ID\n@param outputFile output file\n@throws Exception", "Returns the optional query modifier.\n@return the optional query modifier.", "Physically close off the internal connection.\n@param conn", "Fills the Boyer Moore \"bad character array\" for the given pattern" ]
public final Jar setAttribute(String section, String name, String value) { verifyNotSealed(); if (jos != null) throw new IllegalStateException("Manifest cannot be modified after entries are added."); Attributes attr = getManifest().getAttributes(section); if (attr == null) { attr = new Attributes(); getManifest().getEntries().put(section, attr); } attr.putValue(name, value); return this; }
[ "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." ]
[ "Called by implementation class once websocket connection established\nat networking layer.\n@param context the websocket context", "Use this API to fetch cachecontentgroup resource of given name .", "Retrieve the document with the specified ID from the database and deserialize to an\ninstance of the POJO of type T.\n\n@param <T> object type\n@param classType the class of type T\n@param id the document id\n@return an object of type T\n@throws NoDocumentException if the document is not found in the database\n@see #find(Class, String, String)\n@see <a\nhref=\"https://console.bluemix.net/docs/services/Cloudant/api/document.html#read\"\ntarget=\"_blank\">Documents - read</a>", "Returns the output directory for reporting.", "Creates a Bytes object by copying the data of the given byte array", "calculate the difference of the two maps, so we know what was added, removed & updated\n@param left\n@param right\n@param onlyOnLeft\n@param onlyOnRight\n@param updated", "Forceful cleanup the logs", "Apply issues tracker info to a build info builder (used by generic tasks and maven2 which doesn't use the extractor", "Populate a sorted list of custom fields to ensure that these fields\nare written to the file in a consistent order." ]
private void createFieldMap(byte[] data) { int index = 0; int lastDataBlockOffset = 0; int dataBlockIndex = 0; while (index < data.length) { long mask = MPPUtility.getInt(data, index + 0); //mask = mask << 4; int dataBlockOffset = MPPUtility.getShort(data, index + 4); //int metaFlags = MPPUtility.getByte(data, index + 8); FieldType type = getFieldType(MPPUtility.getInt(data, index + 12)); int category = MPPUtility.getShort(data, index + 20); //int sizeInBytes = MPPUtility.getShort(data, index + 22); //int metaIndex = MPPUtility.getInt(data, index + 24); // // Categories // // 02 - Short values [RATE_UNITS, WORKGROUP, ACCRUE, TIME_UNITS, PRIORITY, TASK_TYPE, CONSTRAINT, ACCRUE, PERCENTAGE, SHORT, WORK_UNITS] - BOOKING_TYPE, EARNED_VALUE_METHOD, DELIVERABLE_TYPE, RESOURCE_REQUEST_TYPE - we have as string in MPXJ???? // 03 - Int values [DURATION, INTEGER] - Recalc outline codes as Boolean? // 05 - Rate, Number [RATE, NUMERIC] // 08 - String (and some durations!!!) [STRING, DURATION] // 0B - Boolean (meta block 0?) - [BOOLEAN] // 13 - Date - [DATE] // 48 - GUID - [GUID] // 64 - Boolean (meta block 1?)- [BOOLEAN] // 65 - Work, Currency [WORK, CURRENCY] // 66 - Units [UNITS] // 1D - Raw bytes [BINARY, ASCII_STRING] - Exception: outline code indexes, they are integers, but stored as part of a binary block int varDataKey; if (useTypeAsVarDataKey()) { Integer substitute = substituteVarDataKey(type); if (substitute == null) { varDataKey = (MPPUtility.getInt(data, index + 12) & 0x0000FFFF); } else { varDataKey = substitute.intValue(); } } else { varDataKey = MPPUtility.getByte(data, index + 6); } FieldLocation location; int metaBlock; switch (category) { case 0x0B: { location = FieldLocation.META_DATA; metaBlock = 0; break; } case 0x64: { location = FieldLocation.META_DATA; metaBlock = 1; break; } default: { metaBlock = 0; if (dataBlockOffset != 65535) { location = FieldLocation.FIXED_DATA; if (dataBlockOffset < lastDataBlockOffset) { ++dataBlockIndex; } lastDataBlockOffset = dataBlockOffset; int typeSize = getFixedDataFieldSize(type); if (dataBlockOffset + typeSize > m_maxFixedDataSize[dataBlockIndex]) { m_maxFixedDataSize[dataBlockIndex] = dataBlockOffset + typeSize; } } else { if (varDataKey != 0) { location = FieldLocation.VAR_DATA; } else { location = FieldLocation.UNKNOWN; } } break; } } FieldItem item = new FieldItem(type, location, dataBlockIndex, dataBlockOffset, varDataKey, mask, metaBlock); if (m_debug) { System.out.println(ByteArrayHelper.hexdump(data, index, 28, false) + " " + item + " mpxjDataType=" + item.getType().getDataType() + " index=" + index); } m_map.put(type, item); index += 28; } }
[ "Generic method used to create a field map from a block of data.\n\n@param data field map data" ]
[ "Get an CollectionDescriptor by name BRJ\n@param name\n@return CollectionDescriptor or null", "Write a message to the console.\n\n@param pattern\nA {@link String#format(String, Object...)} pattern\n@param parameters\nOptional parameters to plug into the pattern", "Loads a CRF classifier from an InputStream, and returns it. This method\ndoes not buffer the InputStream, so you should have buffered it before\ncalling this method.\n\n@param in\nInputStream to load classifier from\n@return The CRF classifier\n\n@throws IOException\nIf there are problems accessing the input stream\n@throws ClassCastException\nIf there are problems interpreting the serialized data\n@throws ClassNotFoundException\nIf there are problems interpreting the serialized data", "Log a warning for the resource at the provided address and a single attribute. The detail message is a default\n'Attributes are not understood in the target model version and this resource will need to be ignored on the target host.'\n\n@param address where warning occurred\n@param attribute attribute we are warning about", "Facade method facilitating the creation of subshell.\nSubshell is created and run inside Command method and shares the same IO and naming strategy.\n\nRun the obtained Shell with commandLoop().\n\n@param pathElement sub-prompt\n@param parent Shell to be subshell'd\n@param appName The app name string\n@param mainHandler Command handler\n@param auxHandlers Aux handlers to be passed to all subshells.\n@return subshell", "This method writes task data to a Planner file.\n\n@throws JAXBException on xml creation errors", "Ensures that generate-table-info is set to false if generate-repository-info is set to false.\n\n@param classDef The class descriptor\n@param checkLevel The current check level (this constraint is checked in all levels)", "Start pushing the element off to the right.", "Use this API to fetch nstrafficdomain_bridgegroup_binding resources of given name ." ]
private String getDestinationHostName(String hostName) { List<ServerRedirect> servers = serverRedirectService .tableServers(requestInformation.get().client.getId()); for (ServerRedirect server : servers) { if (server.getSrcUrl().compareTo(hostName) == 0) { if (server.getDestUrl() != null && server.getDestUrl().compareTo("") != 0) { return server.getDestUrl(); } else { logger.warn("Using source URL as destination URL since no destination was specified for: {}", server.getSrcUrl()); } // only want to apply the first host name change found break; } } return hostName; }
[ "Obtain the destination hostname for a source host\n\n@param hostName\n@return" ]
[ "Update an existing feature. Made package private for testing purposes.\n\n@param feature feature to update\n@throws LayerException oops", "Sets the replace var map to single target single var.\n\n@param variable\nthe variable\n@param replaceList\n: the list of strings that will replace the variable\n@param uniformTargetHost\nthe uniform target host\n@return the parallel task builder", "Adds a class entry to this JAR.\n\n@param clazz the class to add to the JAR.\n@return {@code this}", "Returns if a request should be retried based on the retry count, current response,\nand the current strategy.\n\n@param retryCount The current retry attempt count.\n@param response The exception that caused the retry conditions to occur.\n@return true if the request should be retried; false otherwise.", "Retrieve a single value property.\n\n@param method method definition\n@param object target object\n@param map parameter values", "Reads the configuration of a field facet.\n@param pathPrefix The XML Path that leads to the field facet configuration, or <code>null</code> if the XML was not correctly structured.\n@return The read configuration, or <code>null</code> if the XML was not correctly structured.", "Function to perform forward softmax", "Creates a new Message from the specified text.", "Resize the mesh to given size for each axis.\n\n@param mesh Mesh to be resized.\n@param xsize Size for x-axis.\n@param ysize Size for y-axis.\n@param zsize Size fof z-axis." ]
public static List<Integer> asList(int[] a) { List<Integer> result = new ArrayList<Integer>(a.length); for (int i = 0; i < a.length; i++) { result.add(Integer.valueOf(a[i])); } return result; }
[ "Utils for making collections out of arrays of primitive types." ]
[ "Generates a full list of all parents and their children, in order. Uses Map to preserve\nlast expanded state.\n\n@param parentList A list of the parents from\nthe {@link ExpandableRecyclerAdapter}\n@param savedLastExpansionState A map of the last expanded state for a given parent key.\n@return A list of all parents and their children, expanded accordingly", "Stores a new certificate and its associated private key in the keystore.\n@param hostname\n@param cert\n@param privKey @throws KeyStoreException\n@throws CertificateException\n@throws NoSuchAlgorithmException", "Detects if the current device is a mobile device.\nThis method catches most of the popular modern devices.\nExcludes Apple iPads and other modern tablets.\n@return detection of any mobile device using the quicker method", "Register the given mbean with the platform mbean server\n\n@param mbean The mbean to register\n@param name The name to register under", "Draw a rounded rectangular boundary.\n\n@param rect rectangle\n@param color colour\n@param linewidth line width\n@param r radius for rounded corners", "Concats an element and an array.\n\n@param firstElement the first element\n@param array the array\n@param <T> the type of the element in the array\n@return a new array created adding the element in the second array after the first element", "Use this API to fetch all the gslbldnsentries resources that are configured on netscaler.", "Gets the value of the ppvItem 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 ppvItem property.\n\n<p>\nFor example, to add a new item, do as follows:\n<pre>\ngetPPVItem().add(newItem);\n</pre>\n\n\n<p>\nObjects of the following type(s) are allowed in the list\n{@link PPVItemsType.PPVItem }", "Gets the declared bean type\n\n@return The bean type" ]
public static Deployment of(final URL url) { final DeploymentContent deploymentContent = DeploymentContent.of(Assert.checkNotNullParam("url", url)); return new Deployment(deploymentContent, null); }
[ "Creates a new deployment for the URL. The target server will require access to the URL.\n\n@param url the URL representing the content\n\n@return the deployment" ]
[ "Use this API to fetch gslbsite resources of given names .", "Evaluates the filter, returns true if the supplied Task or Resource\ninstance matches the filter criteria.\n\n@param container Task or Resource instance\n@param promptValues respose to prompts\n@return boolean flag", "Obtains a Ethiopic zoned date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the Ethiopic zoned date-time, not null\n@throws DateTimeException if unable to create the date-time", "Returns the distance between the two points in meters.", "The CommandContext can be retrieved thatnks to the ExecutableBuilder.", "Introspect the given object.\n\n@param obj object for introspection.\n\n@return a map containing object's field values.\n\n@throws IntrospectionException if an exception occurs during introspection\n@throws InvocationTargetException if property getter throws an exception\n@throws IllegalAccessException if property getter is inaccessible", "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", "Write resource assignment workgroup.\n\n@param record resource assignment workgroup instance\n@throws IOException", "Add this service to the given service target.\n@param serviceTarget the service target\n@param configuration the bootstrap configuration" ]
public static boolean isFinalVariable(DeclarationExpression declarationExpression, SourceCode sourceCode) { if (isFromGeneratedSourceCode(declarationExpression)) { return false; } List<Expression> variableExpressions = getVariableExpressions(declarationExpression); if (!variableExpressions.isEmpty()) { Expression variableExpression = variableExpressions.get(0); int startOfDeclaration = declarationExpression.getColumnNumber(); int startOfVariableName = variableExpression.getColumnNumber(); int sourceLineNumber = findFirstNonAnnotationLine(declarationExpression, sourceCode); String sourceLine = sourceCode.getLines().get(sourceLineNumber-1); String modifiers = (startOfDeclaration >= 0 && startOfVariableName >= 0 && sourceLine.length() >= startOfVariableName) ? sourceLine.substring(startOfDeclaration - 1, startOfVariableName - 1) : ""; return modifiers.contains("final"); } return false; }
[ "Return true if the DeclarationExpression represents a 'final' variable declaration.\n\nNOTE: THIS IS A WORKAROUND.\n\nThere does not seem to be an easy way to determine whether the 'final' modifier has been\nspecified for a variable declaration. Return true if the 'final' is present before the variable name." ]
[ "Adds the offset.\n\n@param start the start\n@param end the end", "Forces removal of one or several faceted attributes for the next queries.\n\n@param attributes one or more attribute names.\n@return this {@link Searcher} for chaining.", "Returns information for a specific client\n\n@param model\n@param profileIdentifier\n@param clientUUID\n@return\n@throws Exception", "Manipulates a string by cutting of a prefix, if present, and adding a new prefix.\n\n@param word the string to be manipulated\n@param oldPrefix the old prefix that should be replaced\n@param newPrefix the new prefix that is added\n@return the manipulated string", "decodes the uriFragment\n\n@param res the resource that contains the feature holder\n@param uriFragment the fragment that should be decoded\n@return the decoded information\n@see LazyURIEncoder#encode(EObject, EReference, INode)", "Use this API to fetch service_dospolicy_binding resources of given name .", "Returns a new instance of the given class using the constructor with the specified parameter.\n\n@param target The class to instantiate\n@param type The types of the single parameter of the constructor\n@param arg The argument\n@return The instance", "Delete rows that match the prepared statement.", "Sets the permissions associated with this shared link.\n@param permissions the new permissions for this shared link." ]
public void setOnKeyboardDone(final IntlPhoneInputListener listener) { mPhoneEdit.setOnEditorActionListener(new TextView.OnEditorActionListener() { @Override public boolean onEditorAction(TextView v, int actionId, KeyEvent event) { if (actionId == EditorInfo.IME_ACTION_DONE) { listener.done(IntlPhoneInput.this, isValid()); } return false; } }); }
[ "Set keyboard done listener to detect when the user click \"DONE\" on his keyboard\n\n@param listener IntlPhoneInputListener" ]
[ "Populate a Command instance with the values parsed from a command line\nIf any parser errors are detected it will throw an exception\n@param processedCommand command line\n@param mode do validation or not\n@throws CommandLineParserException any incorrectness in the parser will abort the populate", "Process the next event in a given stream.\n@return the fully processed event\n@throws IOException if a stream is in the wrong state, IO errors can be thrown", "Update max.\n\n@param n the n\n@param c the c", "Find all methods on classes under scanBase that are annotated with annotationClass.\n\n@param scanBase Package to scan recursively, in dot notation (ie: org.jrugged...)\n@param annotationClass Class of the annotation to search for\n@return Set&lt;Method&gt; The set of all @{java.lang.reflect.Method}s having the annotation", "Sets a listener for user actions within the SearchView.\n\n@param listener the listener object that receives callbacks when the user performs\nactions in the SearchView such as clicking on buttons or typing a query.", "Use this API to add dnsview resources.", "Release transaction that was acquired in a thread with specified permits.", "Use this API to update nslimitselector resources.", "compute Exp using Taylor Series.\n\n@param x An angle, in radians.\n@param nTerms Number of terms.\n@return Result." ]
public static void archiveFile(@NotNull final ArchiveOutputStream out, @NotNull final VirtualFileDescriptor source, final long fileSize) throws IOException { if (!source.hasContent()) { throw new IllegalArgumentException("Provided source is not a file: " + source.getPath()); } //noinspection ChainOfInstanceofChecks if (out instanceof TarArchiveOutputStream) { final TarArchiveEntry entry = new TarArchiveEntry(source.getPath() + source.getName()); entry.setSize(fileSize); entry.setModTime(source.getTimeStamp()); out.putArchiveEntry(entry); } else if (out instanceof ZipArchiveOutputStream) { final ZipArchiveEntry entry = new ZipArchiveEntry(source.getPath() + source.getName()); entry.setSize(fileSize); entry.setTime(source.getTimeStamp()); out.putArchiveEntry(entry); } else { throw new IOException("Unknown archive output stream"); } final InputStream input = source.getInputStream(); try { IOUtil.copyStreams(input, fileSize, out, IOUtil.BUFFER_ALLOCATOR); } finally { if (source.shouldCloseStream()) { input.close(); } } out.closeArchiveEntry(); }
[ "Adds the file to the tar archive represented by output stream. It's caller's responsibility to close output stream\nproperly.\n\n@param out target archive.\n@param source file to be added.\n@param fileSize size of the file (which is known in most cases).\n@throws IOException in case of any issues with underlying store." ]
[ "Initializes the upper left component. Does not show the mode switch.", "Remember the order of execution", "Code common to both XER and database readers to extract\ncurrency format data.\n\n@param row row containing currency data", "Find the path to the first association in the property path.\n\n@param targetTypeName the entity with the property\n@param pathWithoutAlias the path to the property WITHOUT the alias\n@return the path to the first association or {@code null} if there isn't an association in the property path", "Write objects to data store, but don't release the locks.\nI don't know what we should do if we are in a checkpoint and\nwe need to abort.", "Convert an ObjectBank to arrays of data features and labels.\n\n@return A Pair, where the first element is an int[][][][] representing the\ndata and the second element is an int[][] representing the labels.", "Handles reports by consumers\n\n@param name the name of the reporting consumer\n@param report the number of lines the consumer has written since last report\n@return \"exit\" if maxScenarios has been reached, \"ok\" otherwise", "Use this context as prototype for a new mutable builder. The new builder is\npre-populated with the current settings of this context instance.", "remove a converted object from the pool\n\n@param converter\n@param sourceObject\n@param destinationType" ]
private void writeToDelegate(byte[] data) { if (m_delegateStream != null) { try { m_delegateStream.write(data); } catch (IOException e) { throw new RuntimeException(e); } } }
[ "Writes data to delegate stream if it has been set.\n\n@param data the data to write" ]
[ "Use this API to disable clusterinstance of given name.", "Use this API to update clusterinstance resources.", "Removes the supplied marker from the map.\n\n@param marker", "Determines the number of elements that the query would return. Override this\nmethod if the size shall be determined in a specific way.\n\n@return The number of elements", "The third method to write caseManager. Its task is to write the call to\nthe story to be run.\n\n@param caseManager\nthe file where the test must be written\n@param storyName\nthe name of the story\n@param test_path\nthe path where the story can be found\n@param user\nthe user requesting the story\n@param feature\nthe feature requested by the user\n@param benefit\nthe benefit provided by the feature\n@throws BeastException", "Use this API to fetch all the sslcertkey resources that are configured on netscaler.", "Return the numeraire at a given time.\nThe numeraire is provided for interpolated points. If requested on points which are not\npart of the tenor discretization, the numeraire uses a linear interpolation of the reciprocal\nvalue. See ISBN 0470047224 for details.\n\n@param time Time time <i>t</i> for which the numeraire should be returned <i>N(t)</i>.\n@return The numeraire at the specified time as <code>RandomVariableFromDoubleArray</code>\n@throws net.finmath.exception.CalculationException Thrown if the valuation fails, specific cause may be available via the <code>cause()</code> method.", "Set the payload to the fileModel of the given instance even though the variable is not directly referencing it. This is mainly to simplify the\ncreation of the rule, when the FileModel itself is not being iterated but just a model referencing it.", "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" ]
public static EventLog getEnterpriseEvents(BoxAPIConnection api, Date after, Date before, BoxEvent.Type... types) { return getEnterpriseEvents(api, null, after, before, ENTERPRISE_LIMIT, types); }
[ "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." ]
[ "todo move to commonops", "Processes text as a FreeMarker template. Usually used to process an inner body of a tag.\n\n@param text text of a template.\n@param params map with parameters for processing.\n@param writer writer to write output to.", "Reads the NTriples file from the reader, pushing statements into\nthe handler.", "Counts the coordinates stored in a single statement for the relevant\nproperty, if they are actually given and valid.\n\n@param statement\n@param itemDocument", "Emit status line for an aggregated event.", "get the last segment at the moment\n\n@return the last segment", "Remove script for a given ID\n\n@param id ID of script\n@throws Exception exception", "don't run on main thread", "Sets the underlying connect timeout in milliseconds.\nA value of 0 specifies an infinite timeout.\n@see okhttp3.OkHttpClient.Builder#connectTimeout(long, TimeUnit)" ]
protected AbstractColumn buildSimpleBarcodeColumn() { BarCodeColumn column = new BarCodeColumn(); populateCommonAttributes(column); column.setColumnProperty(columnProperty); column.setExpressionToGroupBy(customExpressionToGroupBy); column.setScaleMode(imageScaleMode); column.setApplicationIdentifier(applicationIdentifier); column.setBarcodeType(barcodeType); column.setShowText(showText); column.setCheckSum(checkSum); return column; }
[ "When creating barcode columns\n@return" ]
[ "Notifies that a content item is changed.\n\n@param position the position.", "Filter events.\n\n@param events the events\n@return the list of filtered events", "Verifies a provided signature.\n\n@param key\nfor which signature key\n@param actualAlgorithm\ncurrent signature algorithm\n@param actualSignature\ncurrent signature\n@param webHookPayload\nfor signing\n@param deliveryTimestamp\nfor signing\n@return true if verification passed", "common utility method for adding a statement to a record", "Get logs for an app.\n@param appName App name. See {@link #listApps} for a list of apps that can be used.\n@return log stream response", "Forces removal of one or several faceted attributes for the next queries.\n\n@param attributes one or more attribute names.\n@return this {@link Searcher} for chaining.", "Sets the ProjectCalendar instance from which this calendar is derived.\n\n@param calendar base calendar instance", "Read ClassDescriptors from the given repository file.\n@see #mergeDescriptorRepository", "Updates the database. Never call this during normal operations, upgrade is a user-controlled operation." ]
protected boolean isPrefixBlock(long divisionValue, long upperValue, int divisionPrefixLen) { if(divisionPrefixLen == 0) { return divisionValue == 0 && upperValue == getMaxValue(); } long ones = ~0L; long divisionBitMask = ~(ones << getBitCount()); long divisionPrefixMask = ones << (getBitCount() - divisionPrefixLen); long divisionNonPrefixMask = ~divisionPrefixMask; return testRange(divisionValue, upperValue, upperValue, divisionPrefixMask & divisionBitMask, divisionNonPrefixMask); }
[ "Returns whether the division range includes the block of values for its prefix length" ]
[ "Generates the points for an arc based on two bearings from a centre point\nand a radius.\n\n@param center The LatLong point of the center.\n@param startBearing North is 0 degrees, East is 90 degrees, etc.\n@param endBearing North is 0 degrees, East is 90 degrees, etc.\n@param radius In metres\n@return An array of LatLong points in an MVC array representing the arc.\nUsing this method directly you will need to push the centre point onto\nthe array in order to close it, if desired.", "Goes through the buckets from ix and out, checking for each\ncandidate if it's in one of the buckets, and if so, increasing\nits score accordingly. No new candidates are added.", "Acquires a read lock on a specific key.\n@param key The key to lock\n@param timeout in milliseconds; -1 means wait indefinitely, 0 means no wait.", "Ask the specified player for metadata about the track in the specified slot with the specified rekordbox ID,\nusing cached media instead if it is available, and possibly giving up if we are in passive mode.\n\n@param track uniquely identifies the track whose metadata is desired\n@param trackType identifies the type of track being requested, which affects the type of metadata request\nmessage that must be used\n@param failIfPassive will prevent the request from taking place if we are in passive mode, so that automatic\nmetadata updates will use available caches only\n\n@return the metadata found, if any", "Load a model to attach to the avatar\n@param avatarResource resource with avatar model\n@param attachBone name of bone to attach model to", "Sets the value to a default.", "Use this API to enable snmpalarm resources of given names.", "Perform a security check against OpenCms.\n\n@param cms The OpenCms object.\n\n@throws CmsPermissionViolationException in case of the anonymous guest user", "Responsible for executing file rolls as and when required, in addition to\ndelegating to the super class to perform the actual append operation.\nSynchronized for safety during enforced file roll.\n\n@see org.apache.log4j.WriterAppender#subAppend(org.apache.log4j.spi.LoggingEvent)" ]
private ProjectCalendarDateRanges getRanges(Date date, Calendar cal, Day day) { ProjectCalendarDateRanges ranges = getException(date); if (ranges == null) { ProjectCalendarWeek week = getWorkWeek(date); if (week == null) { week = this; } if (day == null) { if (cal == null) { cal = Calendar.getInstance(); cal.setTime(date); } day = Day.getInstance(cal.get(Calendar.DAY_OF_WEEK)); } ranges = week.getHours(day); } return ranges; }
[ "Retrieves the working hours on the given date.\n\n@param date required date\n@param cal optional calendar instance\n@param day optional day instance\n@return working hours" ]
[ "Sets the left padding for all cells in the table.\n@param paddingLeft new padding, ignored if smaller than 0\n@return this to allow chaining", "See also JLS8, 4.12.5 Initial Values of Variables.\n\n@param type\n@return the default value for the given type as defined by JLS", "Return true if the expression is a constructor call on a class that matches the supplied.\n@param expression - the expression\n@param classNamePattern - the possible List of class names\n@return as described", "Runs the given xpath and returns a boolean result.", "Adds version information.", "Signal that this thread will not log any more messages in the multithreaded\nenvironment", "Get the DMR path for this node. For leaves, the DMR path is the path of its parent.\n@return The DMR path for this node.", "Write the configuration to a buffered writer.", "Calculates how much of a time range is before or after a\ntarget intersection point.\n\n@param start time range start\n@param end time range end\n@param target target intersection point\n@param after true if time after target required, false for time before\n@return length of time in milliseconds" ]
public void addNotBetween(Object attribute, Object value1, Object value2) { // PAW // addSelectionCriteria(ValueCriteria.buildNotBeweenCriteria(attribute, value1, value2, getAlias())); addSelectionCriteria(ValueCriteria.buildNotBeweenCriteria(attribute, value1, value2, getUserAlias(attribute))); }
[ "Adds NOT BETWEEN criteria,\ncustomer_id not between 1 and 10\n\n@param attribute The field name to be used\n@param value1 The lower boundary\n@param value2 The upper boundary" ]
[ "Use this API to add clusterinstance.", "Use this API to update appfwlearningsettings.", "Removes the duplicate node list.\n\n@param list\nthe list\n@return the int", "Wrapper functions with no bounds checking are used to access matrix internals", "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", "This filter changes the amount of color in each of the three channels.\n\n@param r The amount of redness in the picture. Can range from -100 to 100 in percentage.\n@param g The amount of greenness in the picture. Can range from -100 to 100 in percentage.\n@param b The amount of blueness in the picture. Can range from -100 to 100 in percentage.\n@throws IllegalArgumentException if {@code r}, {@code g}, or {@code b} are outside of bounds.", "Filter everything until we found the first NL character.", "Called when the surface is created or recreated. Avoided because this can\nbe called twice at the beginning.", "Use this API to fetch all the snmpalarm resources that are configured on netscaler." ]
public static rewritepolicylabel_rewritepolicy_binding[] get(nitro_service service, String labelname) throws Exception{ rewritepolicylabel_rewritepolicy_binding obj = new rewritepolicylabel_rewritepolicy_binding(); obj.set_labelname(labelname); rewritepolicylabel_rewritepolicy_binding response[] = (rewritepolicylabel_rewritepolicy_binding[]) obj.get_resources(service); return response; }
[ "Use this API to fetch rewritepolicylabel_rewritepolicy_binding resources of given name ." ]
[ "Set the buttons span text.", "Use this API to add clusterinstance.", "Stop listening for device announcements. Also discard any announcements which had been received, and\nnotify any registered listeners that those devices have been lost.", "Remove a handler from the list\n@param toRemove The handler to remove. Any handler object that\nmatches this class will be removed.\n@return true if this handler was in the list.", "Returns the last available version of an artifact\n\n@param gavc String\n@return String", "Puts a new document in the service. The generate key is globally unique.\n\n@param document document\n@return key unique key to reference the document", "This method returns the duplicated certificate mapped to the passed in cert, or\ncreates and returns one if no mapping has yet been performed. If a naked public\nkey has already been mapped that matches the key in the cert, the already mapped\nkeypair will be reused for the mapped cert.\n@param cert\n@return\n@throws CertificateEncodingException\n@throws InvalidKeyException\n@throws CertificateException\n@throws CertificateNotYetValidException\n@throws NoSuchAlgorithmException\n@throws NoSuchProviderException\n@throws SignatureException\n@throws KeyStoreException\n@throws UnrecoverableKeyException", "Process an individual UDF.\n\n@param udf UDF definition", "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" ]
private void registerProxyCreator(Node source, BeanDefinitionHolder holder, ParserContext context) { String beanName = holder.getBeanName(); String proxyName = beanName + "Proxy"; String interceptorName = beanName + "PerformanceMonitorInterceptor"; BeanDefinitionBuilder initializer = BeanDefinitionBuilder.rootBeanDefinition(BeanNameAutoProxyCreator.class); initializer.addPropertyValue("beanNames", beanName); initializer.addPropertyValue("interceptorNames", interceptorName); BeanDefinitionRegistry registry = context.getRegistry(); registry.registerBeanDefinition(proxyName, initializer.getBeanDefinition()); }
[ "Registers a BeanNameAutoProxyCreator class that wraps the bean being\nmonitored. The proxy is associated with the PerformanceMonitorInterceptor\nfor the bean, which is created when parsing the methods attribute from\nthe springconfiguration xml file.\n\n@param source An Attribute node from the spring configuration\n@param holder A container for the beans I will create\n@param context the context currently parsing my spring config" ]
[ "Provide array of String results from inputOutput MFString field named url.\n@array saved in valueDestination", "Confirms that both clusters have the same number of total partitions.\n\n@param lhs\n@param rhs", "This method writes resource data to a Planner file.", "Stops all streams.", "Use this API to fetch vpnvserver_authenticationsamlpolicy_binding resources of given name .", "Updates the cluster and store metadata atomically\n\nThis is required during rebalance and expansion into a new zone since we\nhave to update the store def along with the cluster def.\n\n@param cluster The cluster metadata information\n@param storeDefs The stores metadata information", "Generates a change event for a local replacement of a document in the given namespace referring\nto the given document _id.\n\n@param namespace the namespace where the document was inserted.\n@param documentId the _id of the document that was updated.\n@param document the replacement document.\n@return a change event for a local replacement of a document in the given namespace referring\nto the given document _id.", "Get the scale at the given index.\n\n@param index the index of the zoom level to access.\n@param unit the unit.", "Write a standard CoNLL format output file.\n\n@param doc The document: A List of CoreLabel\n@param out Where to send the answers to" ]
private AirMapViewBuilder getWebMapViewBuilder() { if (context != null) { try { ApplicationInfo ai = context.getPackageManager() .getApplicationInfo(context.getPackageName(), PackageManager.GET_META_DATA); Bundle bundle = ai.metaData; String accessToken = bundle.getString("com.mapbox.ACCESS_TOKEN"); String mapId = bundle.getString("com.mapbox.MAP_ID"); if (!TextUtils.isEmpty(accessToken) && !TextUtils.isEmpty(mapId)) { return new MapboxWebMapViewBuilder(accessToken, mapId); } } catch (PackageManager.NameNotFoundException e) { Log.e(TAG, "Failed to load Mapbox access token and map id", e); } } return new WebAirMapViewBuilder(); }
[ "Decides what the Map Web provider should be used and generates a builder for it.\n\n@return The AirMapViewBuilder for the selected Map Web provider." ]
[ "Returns the decoded string, in case it contains non us-ascii characters.\nReturns the same string if it doesn't or the passed value in case\nof an UnsupportedEncodingException.\n\n@param str string to be decoded\n@return the decoded string, in case it contains non us-ascii characters;\nor the same string if it doesn't or the passed value in case\nof an UnsupportedEncodingException.", "Parses the configuration node and provides a pipeline configuration without any extensions marked for loading.\nThe configuration node is supposed to conform to the pipeline configuration JSON schema.\n\n<p>The caller is supposed to use the methods from the builder to add/find extension classes that will be used in\nthe analysis.\n\n<p>Note that the returned pipeline configuration might not contain all the extensions available in\nthe classloader depending on the include/exclude filters in the configuration.\n\n@param json the configuration node\n@return a pipeline configuration parsed from the configuration\n@see Builder#build()", "Set whether the player holding the waveform is playing, which changes the indicator color to white from red.\nThis method can only be used in situations where the component is tied to a single player, and therefore has\na single playback position.\n\n@param playing if {@code true}, draw the position marker in white, otherwise red\n\n@see #setPlaybackState", "Retrieve a finish date.\n\n@param data byte array\n@param offset offset into byte array\n@return finish date", "Method to be implemented by the RendererBuilder subtypes. In this method the library user will\ndefine the mapping between content and renderer class.\n\n@param content used to map object to Renderers.\n@return the class associated to the renderer.", "This method extracts data for a single calendar from an MSPDI file.\n\n@param calendar Calendar data\n@param map Map of calendar UIDs to names\n@param baseCalendars list of base calendars", "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.", "AND operation which takes the previous clause and the next clause and AND's them together.", "Writes batch of data to the source\n@param batch\n@throws InterruptedException" ]
private static int[] getMode2PrimaryCodewords(String postcode, int country, int service) { for (int i = 0; i < postcode.length(); i++) { if (postcode.charAt(i) < '0' || postcode.charAt(i) > '9') { postcode = postcode.substring(0, i); break; } } int postcodeNum = Integer.parseInt(postcode); int[] primary = new int[10]; primary[0] = ((postcodeNum & 0x03) << 4) | 2; primary[1] = ((postcodeNum & 0xfc) >> 2); primary[2] = ((postcodeNum & 0x3f00) >> 8); primary[3] = ((postcodeNum & 0xfc000) >> 14); primary[4] = ((postcodeNum & 0x3f00000) >> 20); primary[5] = ((postcodeNum & 0x3c000000) >> 26) | ((postcode.length() & 0x3) << 4); primary[6] = ((postcode.length() & 0x3c) >> 2) | ((country & 0x3) << 4); primary[7] = (country & 0xfc) >> 2; primary[8] = ((country & 0x300) >> 8) | ((service & 0xf) << 2); primary[9] = ((service & 0x3f0) >> 4); return primary; }
[ "Returns the primary message codewords for mode 2.\n\n@param postcode the postal code\n@param country the country code\n@param service the service code\n@return the primary message, as codewords" ]
[ "Add a range to this LOD group. Specify the scene object that should be displayed in this\nrange. Add the LOG group as a component to the parent scene object. The scene objects\nassociated with each range will automatically be added as children to the parent.\n@param range show the scene object if the camera distance is greater than this value\n@param sceneObject scene object that should be rendered when in this range\n@throws IllegalArgumentException if range is negative or sceneObject null", "get the jdbcTypes from the Query or the ResultSet if not available from the Query\n@throws SQLException", "Adds folders to perform the search in.\n@param folders Folders to search in.", "Apply the layout to the each page in the list\n@param itemLayout item layout in the page\n@return true if the new layout is applied successfully, otherwise - false", "Return the area polygon as the only feature in the feature collection.\n\n@param mapAttributes the attributes that this aoi is part of.", "Handle the serialization of String, Integer and boolean parameters.\n\n@param param to serialize\n@return Object", "Copies just the upper or lower triangular portion of a matrix.\n\n@param src Matrix being copied. Not modified.\n@param dst Where just a triangle from src is copied. If null a new one will be created. Modified.\n@param upper If the upper or lower triangle should be copied.\n@return The copied matrix.", "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", "Use this API to add dbdbprofile resources." ]
public static String decodeUrl(String stringToDecode) { try { return URLDecoder.decode(stringToDecode, "UTF-8"); } catch (UnsupportedEncodingException e1) { throw new RuntimeException(e1); } }
[ "URL-Decodes a given string using UTF-8. No UnsupportedEncodingException to handle as it is dealt with in this\nmethod." ]
[ "Checks the day, month and year are equal.", "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", "Copies the given container page to the provided root path.\n@param originalPage the page to copy\n@param targetPageRootPath the root path of the copy target.\n@throws CmsException thrown if something goes wrong.\n@throws NoCustomReplacementException if a custom replacement is not found for a type which requires it.", "Use this API to delete appfwjsoncontenttype of given name.", "Tries to load a the bundle for a given locale, also loads the backup\nlocales with the same language.\n\n@param baseName the raw bundle name, without locale qualifiers\n@param locale the locale\n@param wantBase whether a resource bundle made only from the base name\n(with no locale information attached) should be returned.\n@return the resource bundle if it was loaded, otherwise the backup", "This method reads a byte array from the input stream.\n\n@param is the input stream\n@param size number of bytes to read\n@return byte array\n@throws IOException on file read error or EOF", "Checks if the provided organization is valid and could be stored into the database\n\n@param organization Organization\n@throws WebApplicationException if the data is corrupted", "Clear the selection of all items.\n@param requestLayout request layout after clear selection if the flag is true, no layout\nrequested otherwise\n@return {@code true} if at least one item was deselected,\n{@code false} otherwise.", "Joins a collection in a string using a delimiter\n@param col Collection\n@param delim Delimiter\n@return String" ]
public static void main(String[] args) { if(args.length != 2) { System.out.println("Usage: SchemaEvolutionValidator pathToOldSchema pathToNewSchema"); return; } Schema oldSchema; Schema newSchema; try { oldSchema = Schema.parse(new File(args[0])); } catch(Exception ex) { oldSchema = null; System.out.println("Could not open or parse the old schema (" + args[0] + ") due to " + ex); } try { newSchema = Schema.parse(new File(args[1])); } catch(Exception ex) { newSchema = null; System.out.println("Could not open or parse the new schema (" + args[1] + ") due to " + ex); } if(oldSchema == null || newSchema == null) { return; } System.out.println("Comparing: "); System.out.println("\t" + args[0]); System.out.println("\t" + args[1]); List<Message> messages = SchemaEvolutionValidator.checkBackwardCompatibility(oldSchema, newSchema, oldSchema.getName()); Level maxLevel = Level.ALL; for(Message message: messages) { System.out.println(message.getLevel() + ": " + message.getMessage()); if(message.getLevel().isGreaterOrEqual(maxLevel)) { maxLevel = message.getLevel(); } } if(maxLevel.isGreaterOrEqual(Level.ERROR)) { System.out.println(Level.ERROR + ": The schema is not backward compatible. New clients will not be able to read existing data."); } else if(maxLevel.isGreaterOrEqual(Level.WARN)) { System.out.println(Level.WARN + ": The schema is partially backward compatible, but old clients will not be able to read data serialized in the new format."); } else { System.out.println(Level.INFO + ": The schema is backward compatible. Old and new clients will be able to read records serialized by one another."); } }
[ "This main method provides an easy command line tool to compare two\nschemas." ]
[ "Returns the distance between the two points in meters.", "Send Request Node info message to the controller.\n@param nodeId the nodeId of the node to identify\n@throws SerialInterfaceException when timing out or getting an invalid response.", "Calcs the bonding size of given mesh.\n\n@param mesh Mesh to calc its bouding size.\n@return The bounding size for x, y and z axis.", "Retrieve an instance of the TaskField class based on the data read from an\nMPX file.\n\n@param value value from an MS Project file\n@return TaskField instance", "A comment.\n\n@param args the parameters", "Use this API to delete nsip6 resources of given names.", "Specify the Artifact for which the condition should search for.\n\n@param artifact\n@return", "Closes the transactor node by removing its node in Zookeeper", "call with lock on 'children' held" ]
public static int cudnnGetConvolutionNdDescriptor( cudnnConvolutionDescriptor convDesc, int arrayLengthRequested, int[] arrayLength, int[] padA, int[] strideA, int[] dilationA, int[] mode, int[] computeType)/** convolution data type */ { return checkResult(cudnnGetConvolutionNdDescriptorNative(convDesc, arrayLengthRequested, arrayLength, padA, strideA, dilationA, mode, computeType)); }
[ "convolution data type" ]
[ "Set the week of month.\n@param weekOfMonthStr the week of month to set.", "Send an ERROR log message with specified subsystem. If subsystem is not enabled the message\nwill not be logged\n@param subsystem logging subsystem\n@param tag Used to identify the source of a log message. It usually identifies the class or\nactivity where the log call occurs.\n@param msg The message you would like logged.\n@return", "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", "Use this API to clear bridgetable.", "Check the version to assure it is allowed.\n\n@param pluginName plugin name which needs the dependency\n@param dependency dependency which needs to be verified\n@param requestedVersion requested/minimum version\n@param availableVersion available version\n@return version check problem or empty string when all is fine", "Set the specular intensity of the light.\n\nThis designates the color of the specular reflection.\nIt is multiplied by the material specular color to derive\nthe hue of the specular reflection for that material.\nThe built-in phong shader {@link GVRPhongShader} uses a {@code vec4} uniform named\n{@code specular_intensity} to control the specular intensity.\n\n@param r red component (0 to 1)\n@param g green component (0 to 1)\n@param b blue component (0 to 1)\n@param a alpha component (0 to 1)", "Factory for 'and' and 'or' predicates.", "Create an info object from an authscope object.\n\n@param authscope the authscope", "Set ViewPort visibility of the object.\n\n@see ViewPortVisibility\n@param viewportVisibility\nThe ViewPort visibility of the object.\n@return {@code true} if the ViewPort visibility was changed, {@code false} if it\nwasn't." ]
public static HashMap<StoreDefinition, Integer> getUniqueStoreDefinitionsWithCounts(List<StoreDefinition> storeDefs) { HashMap<StoreDefinition, Integer> uniqueStoreDefs = Maps.newHashMap(); for(StoreDefinition storeDef: storeDefs) { if(uniqueStoreDefs.isEmpty()) { uniqueStoreDefs.put(storeDef, 1); } else { StoreDefinition sameStore = null; // Go over all the other stores to find if this is unique for(StoreDefinition uniqueStoreDef: uniqueStoreDefs.keySet()) { if(uniqueStoreDef.getReplicationFactor() == storeDef.getReplicationFactor() && uniqueStoreDef.getRoutingStrategyType() .compareTo(storeDef.getRoutingStrategyType()) == 0) { // Further check for the zone routing case if(uniqueStoreDef.getRoutingStrategyType() .compareTo(RoutingStrategyType.ZONE_STRATEGY) == 0) { boolean zonesSame = true; for(int zoneId: uniqueStoreDef.getZoneReplicationFactor().keySet()) { if(storeDef.getZoneReplicationFactor().get(zoneId) == null || storeDef.getZoneReplicationFactor().get(zoneId) != uniqueStoreDef.getZoneReplicationFactor() .get(zoneId)) { zonesSame = false; break; } } if(zonesSame) { sameStore = uniqueStoreDef; } } else { sameStore = uniqueStoreDef; } if(sameStore != null) { // Bump up the count int currentCount = uniqueStoreDefs.get(sameStore); uniqueStoreDefs.put(sameStore, currentCount + 1); break; } } } if(sameStore == null) { // New store uniqueStoreDefs.put(storeDef, 1); } } } return uniqueStoreDefs; }
[ "Given a list of store definitions, find out and return a map of similar\nstore definitions + count of them\n\n@param storeDefs All store definitions\n@return Map of a unique store definition + counts" ]
[ "Helper method to convert seed bytes into the long value required by the\nsuper class.", "Process stop.\n\n@param endpoint the endpoint\n@param eventType the event type", "Merges two lists of references, eliminating duplicates in the process.\n\n@param references1\n@param references2\n@return merged list", "Registers an image to the images cache, so that it can be captured by the build-info proxy.\n\n@param imageId\n@param imageTag\n@param targetRepo\n@param buildInfoId\n@throws IOException", "This method is used by JNI, do not call or modify.\n\n@param type the type\n@param number the number", "Makes a DocumentReaderAndWriter based on the flags the CRFClassifier\nwas constructed with. Will create the flags.readerAndWriter and\ninitialize it with the CRFClassifier's flags.", "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", "Determines whether the specified permission is permitted.\n\n@param permission\n@return <tt>false<tt> if the specified permission is not permitted, based on the current security policy; <tt>true<tt> otherwise", "Converts a number of bytes to a human-readable string\n@param bytes the bytes\n@return the human-readable string" ]
public Vector<Graph<UserStub>> generateAllNodeDataTypeGraphCombinationsOfMaxLength(int length) { Vector<Graph<UserStub>> graphs = super.generateAllNodeDataTypeGraphCombinationsOfMaxLength(length); if (WRITE_STRUCTURES_IN_PARALLEL) { // Left as an exercise to the student. throw new NotImplementedError(); } else { int i = 0; for (Iterator<Graph<UserStub>> iter = graphs.toIterator(); iter.hasNext();) { Graph<UserStub> graph = iter.next(); graph.setGraphId("S_" + ++i + "_" + graph.allNodes().size()); graph.writeDotFile(outDir + graph.graphId() + ".gv", false, ALSO_WRITE_AS_PNG); } System.out.println("Wrote " + i + " graph files in DOT format to " + outDir + ""); } return graphs; }
[ "Build all combinations of graph structures for generic event stubs of a maximum length\n@param length Maximum number of nodes in each to generate\n@return All graph combinations of specified length or less" ]
[ "Add a greeting to the specified guestbook.", "Calculate the Hamming distance between two hashes\n\n@param h1\n@param h2\n@return", "Show only the given channel.\n@param channels The channels to show", "Adds special accessors for private constants so that inner classes can retrieve them.", "Copy the specified bytes into a new array\n\n@param array The array to copy from\n@param from The index in the array to begin copying from\n@param to The least index not copied\n@return A new byte[] containing the copied bytes", "Set the attributes for this template.\n\n@param attributes the attribute map", "We have received notification that a device is no longer on the network, so clear out its artwork.\n\n@param announcement the packet which reported the device’s disappearance", "Mark the top level deployment as being a JPA deployment. If the deployment is not a top level deployment the parent is\nmarked instead", "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" ]
private static boolean equalAsInts(Vec2d a, Vec2d b) { return ((int) a.x) == ((int) b.x) && ((int) a.y) == ((int) b.y); }
[ "Return true if the values of the two vectors are equal when cast as ints.\n\n@param a first vector to compare\n@param b second vector to compare\n@return true if the values of the two vectors are equal when cast as ints" ]
[ "Write the text to the File, using the specified encoding.\n\n@param file a File\n@param text the text to write to the File\n@param charset the charset used\n@throws IOException if an IOException occurs.\n@since 1.0", "Update the installed identity using the modified state from the modification.\n\n@param name the identity name\n@param modification the modification\n@param state the installation state\n@return the installed identity", "Writes a list of UDF types.\n\n@author lsong\n@param type parent entity type\n@param mpxj parent entity\n@return list of UDFAssignmentType instances", "Retrieve the var data key for a specific field.\n\n@param type field type\n@return var data key", "Use this API to fetch dnszone_domain_binding resources of given name .", "Appends the given string to the given StringBuilder, replacing '&amp;',\n'&lt;' and '&gt;' by their respective HTML entities.\n\n@param out\nThe StringBuilder to append to.\n@param value\nThe string to append.\n@param offset\nThe character offset into value from where to start", "Try to build an default PBKey for convenience PB create method.\n\n@return PBKey or <code>null</code> if default key was not declared in\nmetadata", "Use this API to fetch filtered set of vpnclientlessaccesspolicy resources.\nset the filter parameter values in filtervalue object.", "Removes trailing and leading whitespace, and also reduces each\nsequence of internal whitespace to a single space." ]
public Map<String, SetAndCount> getAggregateResultFullSummary() { Map<String, SetAndCount> summaryMap = new ConcurrentHashMap<String, SetAndCount>(); for (Entry<String, LinkedHashSet<String>> entry : aggregateResultMap .entrySet()) { summaryMap.put(entry.getKey(), new SetAndCount(entry.getValue())); } return summaryMap; }
[ "Aggregate results to see the status code distribution with target hosts.\n\n@return the aggregateResultMap" ]
[ "One of the two main methods in this class. Creates a RendererViewHolder instance with a\nRenderer inside ready to be used. The RendererBuilder to create a RendererViewHolder using the\ninformation given as parameter.\n\n@param viewGroup used to create the ViewHolder.\n@param viewType associated to the renderer.\n@return ViewHolder extension with the Renderer it has to use inside.", "Calculates a checksum for the specified buffer.\n@param buffer the buffer to calculate.\n@return the checksum value.", "Write all state items to the log file.\n\n@param fileRollEvent the event to log", "Sets the ssh password.\n\n@param password\nthe password\n@return the parallel task builder", "This method displays the resource assignments for each task. This time\nrather than just iterating through the list of all assignments in\nthe file, we extract the assignments on a task-by-task basis.\n\n@param file MPX file", "Update the given resource in the persistent configuration model based on the values in the given operation.\n\n@param operation the operation\n@param resource the resource that corresponds to the address of {@code operation}\n\n@throws OperationFailedException if {@code operation} is invalid or populating the model otherwise fails", "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.", "Gathers the pk fields from the hierarchy of the given class, and copies them into the class.\n\n@param classDef The root of the hierarchy\n@throws ConstraintException If there is a conflict between the pk fields", "Prints the help on the command line\n\n@param options Options object from commons-cli" ]
public static WebDriverBackedEmbeddedBrowser withDriver(WebDriver driver, ImmutableSortedSet<String> filterAttributes, long crawlWaitEvent, long crawlWaitReload) { return new WebDriverBackedEmbeddedBrowser(driver, filterAttributes, crawlWaitEvent, crawlWaitReload); }
[ "Create a WebDriver backed EmbeddedBrowser.\n\n@param driver The WebDriver to use.\n@param filterAttributes the attributes to be filtered from DOM.\n@param crawlWaitReload the period to wait after a reload.\n@param crawlWaitEvent the period to wait after an event is fired.\n@return The EmbeddedBrowser." ]
[ "Record the resource request wait time in us\n\n@param dest Destination of the socket for which the resource was\nrequested. Will actually record if null. Otherwise will call this\non self and corresponding child with this param null.\n@param resourceRequestTimeUs The number of us to wait before getting a\nsocket", "Push an event which describes a purchase made.\n\n@param eventName Has to be specified as \"Charged\". Anything other than this\nwill result in an {@link InvalidEventNameException} being thrown.\n@param chargeDetails A {@link HashMap}, with keys as strings, and values as {@link String},\n{@link Integer}, {@link Long}, {@link Boolean}, {@link Float}, {@link Double},\n{@link java.util.Date}, or {@link Character}\n@param items An {@link ArrayList} which contains up to 15 {@link HashMap} objects,\nwhere each HashMap object describes a particular item purchased\n@throws InvalidEventNameException Thrown if the event name is not \"Charged\"\n@deprecated use {@link CleverTapAPI#pushChargedEvent(HashMap chargeDetails, ArrayList items)}", "This method retrieves a double 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 required double data", "NOT IN Criteria with SubQuery\n@param attribute The field name to be used\n@param subQuery The subQuery", "Retrieve the start slack.\n\n@return start slack", "Converts the given CharSequence into a List of Strings of one character.\n\n@param self a CharSequence\n@return a List of characters (a 1-character String)\n@see #toSet(String)\n@since 1.8.2", "Get the relative path.\n\n@return the relative path", "Create a Count-Query for ReportQueryByCriteria", "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" ]
public Permissions getPerms(String photoId) throws FlickrException { Map<String, Object> parameters = new HashMap<String, Object>(); parameters.put("method", METHOD_GET_PERMS); parameters.put("photo_id", photoId); Response response = transport.get(transport.getPath(), parameters, apiKey, sharedSecret); if (response.isError()) { throw new FlickrException(response.getErrorCode(), response.getErrorMessage()); } Element permissionsElement = response.getPayload(); Permissions permissions = new Permissions(); permissions.setId(permissionsElement.getAttribute("id")); permissions.setPublicFlag("1".equals(permissionsElement.getAttribute("ispublic"))); permissions.setFamilyFlag("1".equals(permissionsElement.getAttribute("isfamily"))); permissions.setFriendFlag("1".equals(permissionsElement.getAttribute("isfriend"))); permissions.setComment(permissionsElement.getAttribute("permcomment")); permissions.setAddmeta(permissionsElement.getAttribute("permaddmeta")); return permissions; }
[ "Get the permission information for the specified photo.\n\nThis method requires authentication with 'read' permission.\n\n@param photoId\nThe photo id\n@return The Permissions object\n@throws FlickrException" ]
[ "This method is called by the client to load the most recent list of resources.\nThis method should only be called by the service client.\n\n@param result the most recent list of resources.", "Implements getAll by delegating to get.", "Gets the Symmetric Chi-square divergence.\n\n@param p P vector.\n@param q Q vector.\n@return The Symmetric chi-square divergence between p and q.", "prefix length in this section is ignored when converting to MAC", "Use this API to unset the properties of bridgetable resources.\nProperties that need to be unset are specified in args array.", "Return the map bounds rotated with the set rotation. The bounds are adapted to rounding changes of the\nsize of the paint area.\n\n@param paintAreaPrecise The exact size of the paint area.\n@param paintArea The rounded size of the paint area.\n@return Rotated bounds.", "Infer app name from scan package\n\n@param packageName\nthe package name\n@return\napp name inferred from the package name", "Creates a string representation of the given node. Useful for debugging.\n\n@return a debug string for the given node.", "Computes the p=2 norm. If A is a matrix then the induced norm is computed.\n\n@param A Matrix or vector.\n@return The norm." ]
public static URI setQueryParams(final URI initialUri, final Multimap<String, String> queryParams) { StringBuilder queryString = new StringBuilder(); for (Map.Entry<String, String> entry: queryParams.entries()) { if (queryString.length() > 0) { queryString.append("&"); } queryString.append(entry.getKey()).append("=").append(entry.getValue()); } try { if (initialUri.getHost() == null && initialUri.getAuthority() != null) { return new URI(initialUri.getScheme(), initialUri.getAuthority(), initialUri.getPath(), queryString.toString(), initialUri.getFragment()); } else { return new URI(initialUri.getScheme(), initialUri.getUserInfo(), initialUri.getHost(), initialUri.getPort(), initialUri.getPath(), queryString.toString(), initialUri.getFragment()); } } catch (URISyntaxException e) { throw ExceptionUtils.getRuntimeException(e); } }
[ "Construct a new uri by replacing query parameters in initialUri with the query parameters provided.\n\n@param initialUri the initial/template URI\n@param queryParams the new query parameters." ]
[ "Emit a event object with parameters and force all listeners to be called synchronously.\n\n@param event\nthe target event\n@param args\nthe arguments passed in\n@see #emit(EventObject, Object...)", "Utility function to get the current text.", "Run a query on the datastore.\n\n@return The entities returned by the query.\n@throws DatastoreException on error", "Start export and check in of the selected modules.\n@return The exit code of the check in procedure (like a script's exit code).", "Translate this rectangle over the specified following distances.\n\n@param rect rectangle to move\n@param dx delta x\n@param dy delta y", "Checks if the link target is a secure link.<p\n\n@param cms the current CMS context\n@param vfsName the path of the link target\n@param targetSite the target site containing the detail page\n@param secureRequest true if the currently running request is secure\n\n@return true if the link should be a secure link", "Acquires a broker instance. If no PBKey is available a runtime exception will be thrown.\n\n@return A broker instance", "Remove a misc file.\n\n@param name the file name\n@param path the relative path\n@param existingHash the existing hash\n@param isDirectory whether the file is a directory or not\n@return the builder", "To read an object in a quick & dirty way. Prepare to handle failures when object serialization changes!" ]
static Shell createTerminalConsoleShell(String prompt, String appName, ShellCommandHandler mainHandler, InputStream input, OutputStream output) { try { PrintStream out = new PrintStream(output); // Build jline terminal jline.Terminal term = TerminalFactory.get(); final ConsoleReader console = new ConsoleReader(input, output, term); console.setBellEnabled(true); console.setHistoryEnabled(true); // Build console BufferedReader in = new BufferedReader(new InputStreamReader( new ConsoleReaderInputStream(console))); ConsoleIO.PromptListener promptListener = new ConsoleIO.PromptListener() { @Override public boolean onPrompt(String prompt) { console.setPrompt(prompt); return true; // suppress normal prompt } }; return createConsoleShell(prompt, appName, mainHandler, in, out, out, promptListener); } catch (Exception e) { // Failover: use default shell BufferedReader in = new BufferedReader(new InputStreamReader(input)); PrintStream out = new PrintStream(output); return createConsoleShell(prompt, appName, mainHandler, in, out, out, null); } }
[ "Facade method for operating the Unix-like terminal supporting line editing and command\nhistory.\n\n@param prompt Prompt to be displayed\n@param appName The app name string\n@param mainHandler Main command handler\n@param input Input stream.\n@param output Output stream.\n@return Shell that can be either further customized or run directly by calling commandLoop()." ]
[ "This method displays the resource assignments for each resource. This time\nrather than just iterating through the list of all assignments in\nthe file, we extract the assignments on a resource-by-resource basis.\n\n@param file MPX file", "touch event without ripple support", "Use this API to update rsskeytype.", "Query a player to determine the port on which its database server is running.\n\n@param announcement the device announcement with which we detected a new player on the network.", "Deserialize a javascript design document file to a DesignDocument object.\n\n@param file the design document javascript file (UTF-8 encoded)\n@return {@link DesignDocument}\n@throws FileNotFoundException if the file does not exist or cannot be read", "Refactor the method into public CXF utility and reuse it from CXF instead copy&paste", "Determine the length of a nul terminated UTF16LE string in bytes.\n\n@param data string data\n@param offset offset into string data\n@return length in bytes", "Filter on a search term. Can be course name, code or full ID. Must be at least 3 characters\n@param searchTerm Search term to filter by\n@return This object to allow adding more options", "Copies from buffer to our internal strBufferIndex, expanding the internal buffer if necessary\n@param offset offset in the buffer to start copying from\n@param length length to copy" ]
public static base_response update(nitro_service client, nsacl6 resource) throws Exception { nsacl6 updateresource = new nsacl6(); updateresource.acl6name = resource.acl6name; updateresource.aclaction = resource.aclaction; updateresource.srcipv6 = resource.srcipv6; updateresource.srcipop = resource.srcipop; updateresource.srcipv6val = resource.srcipv6val; updateresource.srcport = resource.srcport; updateresource.srcportop = resource.srcportop; updateresource.srcportval = resource.srcportval; updateresource.destipv6 = resource.destipv6; updateresource.destipop = resource.destipop; updateresource.destipv6val = resource.destipv6val; updateresource.destport = resource.destport; updateresource.destportop = resource.destportop; updateresource.destportval = resource.destportval; updateresource.srcmac = resource.srcmac; updateresource.protocol = resource.protocol; updateresource.protocolnumber = resource.protocolnumber; updateresource.icmptype = resource.icmptype; updateresource.icmpcode = resource.icmpcode; updateresource.vlan = resource.vlan; updateresource.Interface = resource.Interface; updateresource.priority = resource.priority; updateresource.established = resource.established; return updateresource.update_resource(client); }
[ "Use this API to update nsacl6." ]
[ "Sets the ssh password.\n\n@param password\nthe password\n@return the parallel task builder", "Get the QNames of the port components to be declared\nin the namespaces\n\n@return collection of QNames", "Starts recursive insert on all insert objects object graph", "low level http operations", "generate a select-Statement according to query\n\n@param query the Query\n@param cld the ClassDescriptor", "The read timeout for the underlying URLConnection to the twitter stream.", "Populates date time settings.\n\n@param record MPX record\n@param properties project properties", "In case parent thread spawn thread we need create a new queue\nfor child thread but use the only one root step. In the end all steps will be\nchildren of root step, all we need is sync adding steps\n@param parentValue value from parent thread\n@return local copy of queue in this thread with parent root as first element", "Alias accessor provided for JSON serialization only" ]
public static csvserver_cspolicy_binding[] get(nitro_service service, String name) throws Exception{ csvserver_cspolicy_binding obj = new csvserver_cspolicy_binding(); obj.set_name(name); csvserver_cspolicy_binding response[] = (csvserver_cspolicy_binding[]) obj.get_resources(service); return response; }
[ "Use this API to fetch csvserver_cspolicy_binding resources of given name ." ]
[ "This method writes calendar data to an MSPDI file.\n\n@param project Root node of the MSPDI file", "Gets the numeric codes. Setting it to -1 search for currencies that have no numeric code.\n\n@return the query for chaining.", "Returns an MBeanServer with the specified name\n\n@param name\n@return", "Use this API to fetch responderpolicylabel_responderpolicy_binding resources of given name .", "Detach a scope from its parent, this will trigger the garbage collection of this scope and it's\nsub-scopes\nif they are not referenced outside of Toothpick.\n\n@param name the name of the scope to close.", "Read data from the table. Return a reference to the current\ninstance to allow method chaining.\n\n@return reader instance", "Used to determine if multiple cost rates apply to this assignment.\n\n@return true if multiple cost rates apply to this assignment", "Fetch flag resource by Country\n\n@param country Country\n@return int of resource | 0 value if not exists", "Should this request URI be compressed?\n\n@param requestUri request URI\n@return true when should be compressed" ]
public static TextEncryptor queryableText(CharSequence password, CharSequence salt) { return new HexEncodingTextEncryptor(new AndroidAesBytesEncryptor(password.toString(), salt, AndroidKeyGenerators.shared(16))); }
[ "Creates an encryptor for queryable text strings that uses standard password-based encryption. Uses a shared, or\nconstant 16 byte initialization vector so encrypting the same data results in the same encryption result. This is\ndone to allow encrypted data to be queried against. Encrypted text is hex-encoded.\n\n@param password the password used to generate the encryptor's secret key; should not be shared\n@param salt a hex-encoded, random, site-global salt value to use to generate the secret key" ]
[ "Get log file\n\n@return log file", "Sets the ProjectCalendar instance from which this calendar is derived.\n\n@param calendar base calendar instance", "Populate the UDF values for this entity.\n\n@param tableName parent table name\n@param type entity type\n@param container entity\n@param uniqueID entity Unique ID", "Use this API to update autoscaleaction.", "Use this API to fetch nstrafficdomain_binding resources of given names .", "Use this API to fetch all the inat resources that are configured on netscaler.", "convert selector used in an upsert statement into a document", "Handles incoming Application Update Request.\n@param incomingMessage the request message to process.", "This method converts an offset value into an array index, which in\nturn allows the data present in the fixed block to be retrieved. Note\nthat if the requested offset is not found, then this method returns -1.\n\n@param offset Offset of the data in the fixed block\n@return Index of data item within the fixed data block" ]
public static double elementSumSq( DMatrixD1 m ) { // minimize round off error double maxAbs = CommonOps_DDRM.elementMaxAbs(m); if( maxAbs == 0) return 0; double total = 0; int N = m.getNumElements(); for( int i = 0; i < N; i++ ) { double d = m.data[i]/maxAbs; total += d*d; } return maxAbs*total*maxAbs; }
[ "Sums up the square of each element in the matrix. This is equivalent to the\nFrobenius norm squared.\n\n@param m Matrix.\n@return Sum of elements squared." ]
[ "If needed, destroy the remaining conversation contexts after an HTTP session was invalidated within the current request.\n\n@param request", "Determine if a CharSequence can be parsed as a Float.\n\n@param self a CharSequence\n@return true if the CharSequence can be parsed\n@see #isFloat(String)\n@since 1.8.2", "Sets the position vector of the keyframe.", "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", "Calls the httpHandler method.", "Closes the transactor node by removing its node in Zookeeper", "Calculates a checksum for the specified buffer.\n@param buffer the buffer to calculate.\n@return the checksum value.", "Shut down actor system force.", "A map of the header key value pairs. Keys are strings and values are either list of strings or a\nstring.\n\n@param headers the header map" ]
public void setDateMin(Date dateMin) { this.dateMin = dateMin; if (isAttached() && dateMin != null) { getPicker().set("min", JsDate.create((double) dateMin.getTime())); } }
[ "Set the minimum date limit." ]
[ "Invoke the setters for the given variables on the given instance.\n@param <T> the instance type\n@param instance the instance to inject with the variables\n@param vars the variables to inject\n@return the instance\n@throws ReflectiveOperationException if there was a problem finding or invoking a setter method", "Helper method that stores in a hash map how often a certain key occurs.\nIf the key has not been encountered yet, a new entry is created for it in\nthe map. Otherwise the existing value for the key is incremented.\n\n@param map\nthe map where the counts are stored\n@param key\nthe key to be counted\n@param count\nvalue by which the count should be incremented; 1 is the usual\ncase", "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", "Answer the SQL-Clause for a BetweenCriteria\n\n@param alias\n@param pathInfo\n@param c BetweenCriteria\n@param buf", "2-D Integer array to double array.\n\n@param array Integer array.\n@return Double array.", "change server state between OFFLINE_SERVER and NORMAL_SERVER\n\n@param setToOffline True if set to OFFLINE_SERVER", "Scales the weights of this crfclassifier by the specified weight\n\n@param scale", "Called on mouse up in the caption area, ends dragging by ending event\ncapture.\n\n@param event the mouse up event that ended dragging\n\n@see DOM#releaseCapture\n@see #beginDragging\n@see #endDragging", "Show a toast-like message for the specified duration\n\n@param message\n@param duration in seconds" ]
public void setTexCoord(String texName, String texCoordAttr, String shaderVarName) { synchronized (textures) { GVRTexture tex = textures.get(texName); if (tex != null) { tex.setTexCoord(texCoordAttr, shaderVarName); } else { throw new UnsupportedOperationException("Texture must be set before updating texture coordinate information"); } } }
[ "Designate the vertex attribute and shader variable for the texture coordinates\nassociated with the named texture.\n\n@param texName name of texture\n@param texCoordAttr name of vertex attribute with texture coordinates.\n@param shaderVarName name of shader variable to get texture coordinates." ]
[ "Remove all unnecessary comments from a lexer or parser file", "Validates the deployment.\n\n@param isDomain {@code true} if this is a domain server, otherwise {@code false}\n\n@throws MojoDeploymentException if the deployment is invalid", "Attaches an arbitrary object to this context.\n\n@param key they attachment key used to ensure uniqueness and used for retrieval of the value.\n@param value the value to store.\n@param <V> the value type of the attachment.\n\n@return the previous value associated with the key or {@code null} if there was no previous value.", "Generate a placeholder for an unknown type.\n\n@param type expected type\n@param fieldID field ID\n@return placeholder", "Retrieve a single value property.\n\n@param method method definition\n@param object target object\n@param map parameter values", "Asta Powerproject assigns an explicit calendar for each task. This method\nis used to find the most common calendar and use this as the default project\ncalendar. This allows the explicitly assigned task calendars to be removed.", "Increase the priority of an overrideId\n\n@param overrideId ID of override\n@param pathId ID of path containing override\n@param clientUUID UUID of client", "Generates the path to an output file for a given source URL. Creates\nall necessary parent directories for the destination file.\n@param src the source\n@return the path to the output file", "Check whether the URL end with one of the given suffixes.\n\n@param uri URI\n@param patterns possible suffixes\n@return true when URL ends with one of the suffixes" ]
protected void addAllowedValuesToDescription(ModelNode result, ParameterValidator validator) { if (allowedValues != null) { for (ModelNode allowedValue : allowedValues) { result.get(ModelDescriptionConstants.ALLOWED).add(allowedValue); } } else if (validator instanceof AllowedValuesValidator) { AllowedValuesValidator avv = (AllowedValuesValidator) validator; List<ModelNode> allowed = avv.getAllowedValues(); if (allowed != null) { for (ModelNode ok : allowed) { result.get(ModelDescriptionConstants.ALLOWED).add(ok); } } } }
[ "Adds the allowed values. Override for attributes who should not use the allowed values.\n\n@param result the node to add the allowed values to\n@param validator the validator to get the allowed values from" ]
[ "Inserts a new instance but references via the outIdentifier, which is returned as part of the ExecutionResults\nThe outIdentifier can be null.\nThe entryPoint, which can also be null, specifies the entrypoint the object is inserted into.\n\n@param object\n@param outIdentifier\n@param entryPoint\n@return", "Creates a new indirection handler instance.\n\n@param brokerKey The associated {@link PBKey}.\n@param id The subject's ids\n@return The new instance", "Updates the path_order column in the table, loops though the pathOrder array, and changes the value to the loop\nindex+1 for the specified pathId\n\n@param profileId ID of profile\n@param pathOrder array containing new order of paths", "Send ourselves \"updates\" about any tracks that were loaded before we started, since we missed them.", "Creates a sorted list that contains the items of the given iterable. The resulting list is sorted according to\nthe order induced by the specified comparator.\n\n@param iterable\nthe items to be sorted. May not be <code>null</code>.\n@param comparator\nthe comparator to be used. May be <code>null</code> to indicate that the natural ordering of the\nelements should be used.\n@return a sorted list as a shallow copy of the given iterable.\n@see Collections#sort(List, Comparator)\n@see #sort(Iterable)\n@see #sortBy(Iterable, org.eclipse.xtext.xbase.lib.Functions.Function1)\n@see ListExtensions#sortInplace(List, Comparator)\n@since 2.7", "This is the original, naive implementation, using the Wagner &\nFischer algorithm from 1974. It uses a flattened matrix for\nspeed, but still computes the entire matrix.", "Helper function that drops all local databases for every client.", "A safe wrapper to destroy the given resource request.", "Adds each required length, ensuring it isn't negative.\n\n@param requiredLengths\none or more required lengths\n@throws IllegalArgumentException\nif a supplied length is negative" ]
public MaterialAccount getAccountByTitle(String title) { for(MaterialAccount account : accountManager) if(currentAccount.getTitle().equals(title)) return account; return null; }
[ "Get the account knowing his title\n@param title the title of the account (it can change at runtime!)\n@return the account founded or null if the account not exists" ]
[ "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", "Determine if a CharSequence can be parsed as a BigInteger.\n\n@param self a CharSequence\n@return true if the CharSequence can be parsed\n@see #isBigInteger(String)\n@since 1.8.2", "Want to make arbitrary probability queries? Then this is the method for\nyou. Given the filename, it reads it in and breaks it into documents, and\nthen makes a CRFCliqueTree for each document. you can then ask the clique\ntree for marginals and conditional probabilities of almost anything you\nwant.", "This method extracts calendar data from a Planner file.\n\n@param project Root node of the Planner file", "Extracts the value of this bit flag from the supplied byte array\nand sets the value in the supplied container.\n\n@param container container\n@param data byte array", "Seeks to the given season within the given year\n\n@param seasonString\n@param yearString", "Adjust the date according to the whole day options.\n\n@param date the date to adjust.\n@param isEnd flag, indicating if the date is the end of the event (in contrast to the beginning)\n\n@return the adjusted date, which will be exactly the beginning or the end of the provide date's day.", "Delivers the correct JSON Object for outgoings\n\n@param outgoings\n@throws org.json.JSONException", "Get the deferred flag. Exchange rates can be deferred or real.time.\n\n@return the deferred flag, or {code null}." ]
public void run(Configuration configuration, InjectableStepsFactory stepsFactory, Story story, MetaFilter filter, State beforeStories) throws Throwable { RunContext context = new RunContext(configuration, stepsFactory, story.getPath(), filter); if (beforeStories != null) { context.stateIs(beforeStories); } Map<String, String> storyParameters = new HashMap<>(); run(context, story, storyParameters); }
[ "Runs a Story with the given steps factory, applying the given meta\nfilter, and staring from given state.\n\n@param configuration the Configuration used to run story\n@param stepsFactory the InjectableStepsFactory used to created the\ncandidate steps methods\n@param story the Story to run\n@param filter the Filter to apply to the story Meta\n@param beforeStories the State before running any of the stories, if not\n<code>null</code>\n\n@throws Throwable if failures occurred and FailureStrategy dictates it to\nbe re-thrown." ]
[ "Copies all node meta data from the other node to this one\n@param other - the other node", "Utility function that fetches all stores on a node.\n\n@param adminClient An instance of AdminClient points to given cluster\n@param nodeId Node id to fetch stores from\n@return List of all store names", "Use this API to fetch the statistics of all nsacl6_stats resources that are configured on netscaler.", "1.0 version of parser is different at simple mapperParser", "Use this API to convert sslpkcs8.", "Converts the given hash code into an index into the\nhash table.", "Required to close the connection reading on the terminal, otherwise\nit can't be interrupted.\n\n@throws InterruptedException", "Create a new GP entry in the database. No commit performed.", "Return the trimmed source line corresponding to the specified AST node\n\n@param node - the Groovy AST node" ]
private JSONObject getJsonFormattedSpellcheckResult(CmsSpellcheckingRequest request) { final JSONObject response = new JSONObject(); try { if (null != request.m_id) { response.put(JSON_ID, request.m_id); } response.put(JSON_RESULT, request.m_wordSuggestions); } catch (Exception e) { try { response.put(JSON_ERROR, true); LOG.debug("Error while assembling spellcheck response in JSON format.", e); } catch (JSONException ex) { LOG.debug("Error while assembling spellcheck response in JSON format.", ex); } } return response; }
[ "Returns the result of the performed spellcheck formatted in JSON.\n\n@param request The CmsSpellcheckingRequest.\n@return JSONObject that contains the result of the performed spellcheck." ]
[ "Convert a Java date into a Planner time.\n\n0800\n\n@param value Java Date instance\n@return Planner time value", "Get a property as a array or throw exception.\n\n@param key the property name", "This creates a new audit log file with default permissions.\n\n@param file File to create", "Use this API to save cachecontentgroup resources.", "Use this API to fetch appfwpolicylabel_binding resource of given name .", "Increases the maximum number of columns in the matrix.\n@param desiredColumns Desired number of columns.\n@param preserveValue If the array needs to be expanded should it copy the previous values?", "Might not fill all of dst.", "Converts from a Fluo RowColumn to a Accumulo Key\n\n@param rc RowColumn\n@return Key", "Finishes the process of attaching a metadata cache file once it has been opened and validated.\n\n@param slot the slot to which the cache should be attached\n@param cache the opened, validated metadata cache file" ]
public TagSetModel getOrCreate(GraphRewrite event, Set<String> tags) { Map<Set<String>, Vertex> cache = getCache(event); Vertex vertex = cache.get(tags); if (vertex == null) { TagSetModel model = create(); model.setTags(tags); cache.put(tags, model.getElement()); return model; } else { return frame(vertex); } }
[ "This essentially ensures that we only store a single Vertex for each unique \"Set\" of tags." ]
[ "Modify a bundle.\n\n@param moduleName the module name\n@param slot the module slot\n@param existingHash the existing hash\n@param newHash the new hash of the modified content\n@return the builder", "Write the provided chunk at the offset specified in the token. If finalChunk is set, the file\nwill be closed.", "Creates a color item that represents a color field found for a track based on a dbserver message.\n\n@param menuItem the rendered menu item containing the color metadata field\n\n@return the color metadata field", "Cancel request and workers.", "Cuts the string at the end if it's longer than maxLength and appends the given end string to it. The length of\nthe resulting string is always less or equal to the given maxLength. It's valid to pass a null text; in this\ncase null is returned.", "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", "Get unique values form the array.\n\n@param values Array of values.\n@return Unique values.", "Pick arbitrary copying method from available configuration and don't forget to\nset generic method type if required.\n@param builder", "Filter events.\n\n@param events the events\n@return the list of filtered events" ]
public static double distance(double lat1, double lon1, double lat2, double lon2) { double dLat = Math.toRadians(lat2-lat1); double dLon = Math.toRadians(lon2-lon1); lat1 = Math.toRadians(lat1); lat2 = Math.toRadians(lat2); double a = Math.sin(dLat/2) * Math.sin(dLat/2) + Math.sin(dLon/2) * Math.sin(dLon/2) * Math.cos(lat1) * Math.cos(lat2); double c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1-a)); return R * c; }
[ "Returns the distance between the two points in meters." ]
[ "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.", "Retrieves a vertex attribute as a float buffer.\nThe attribute name must be one of the\nattributes named in the descriptor passed to the constructor.\n@param attributeName name of the attribute to update\n@throws IllegalArgumentException if attribute name not in descriptor vertex attribute is not <i>float</i>\n@see #setFloatArray(String, float[])\n@see #getFloatVec(String)", "Returns the orthogonal U matrix.\n\n@param U If not null then the results will be stored here. Otherwise a new matrix will be created.\n@return The extracted Q matrix.", "Load a cube map texture asynchronously.\n\nThis is the implementation of\n{@link GVRAssetLoader#loadCubemapTexture(GVRAndroidResource)} - it will\nusually be more convenient (and more efficient) to call that directly.\n\n@param gvrContext\nThe GVRF context\n@param textureCache\nTexture cache - may be {@code null}\n@param resource\nA steam containing a zip file which contains six bitmaps. The\nsix bitmaps correspond to +x, -x, +y, -y, +z, and -z faces of\nthe cube map texture respectively. The default names of the\nsix images are \"posx.png\", \"negx.png\", \"posy.png\", \"negx.png\",\n\"posz.png\", and \"negz.png\", which can be changed by calling\n{@link GVRCubemapImage#setFaceNames(String[])}.\n@param priority\nThis request's priority. Please see the notes on asynchronous\npriorities in the <a href=\"package-summary.html#async\">package\ndescription</a>.\n@return A {@link Future} that you can pass to methods like\n{@link GVRShaderData#setMainTexture(Future)}", "Initialize the pattern controllers.", "Populate a milestone from a Row instance.\n\n@param row Row instance\n@param task Task instance", "commit all envelopes against the current broker", "Use this API to clear gslbldnsentries.", "Runs through the log removing segments older than a certain age\n\n@throws IOException" ]
public boolean assertValidPkForDelete(ClassDescriptor cld, Object obj) { if(!ProxyHelper.isProxy(obj)) { FieldDescriptor fieldDescriptors[] = cld.getPkFields(); int fieldDescriptorSize = fieldDescriptors.length; for(int i = 0; i < fieldDescriptorSize; i++) { FieldDescriptor fd = fieldDescriptors[i]; Object pkValue = fd.getPersistentField().get(obj); if (representsNull(fd, pkValue)) { return false; } } } return true; }
[ "returns true if the primary key fields are valid for delete, else false.\nPK fields are valid if each of them contains a valid non-null value\n@param cld the ClassDescriptor\n@param obj the object\n@return boolean" ]
[ "Use this API to fetch csvserver_cmppolicy_binding resources of given name .", "splits a string into a list of strings. Trims the results and ignores empty strings", "Create a random video.\n\n@return random video.", "Returns the JSON datatype for the property datatype as represented by\nthe given WDTK datatype IRI string.\n\n@param datatypeIri\nthe WDTK datatype IRI string; case-sensitive\n@throws IllegalArgumentException\nif the given datatype string is not known", "Process the scheduling project property from PROJPROP. This table only seems to exist\nin P6 databases, not XER files.\n\n@throws SQLException", "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", "Sets the HTTP poller processor to handle Async API.\nWill auto enable the pollable mode with this call\n\n@param httpPollerProcessor\nthe http poller processor\n@return the parallel task builder", "Get top deployment unit.\n\n@param unit the current deployment unit\n@return top deployment unit", "Creates a setter method with the given body.\n\n@param declaringClass the class to which we will add the setter\n@param propertyNode the field to back the setter\n@param setterName the name of the setter\n@param setterBlock the statement representing the setter block" ]
protected void updateNorms( int j ) { boolean foundNegative = false; for( int col = j; col < numCols; col++ ) { double e = dataQR[col][j-1]; double v = normsCol[col] -= e*e; if( v < 0 ) { foundNegative = true; break; } } // if a negative sum has been found then clearly too much precision has been lost // and it should recompute the column norms from scratch if( foundNegative ) { for( int col = j; col < numCols; col++ ) { double u[] = dataQR[col]; double actual = 0; for( int i=j; i < numRows; i++ ) { double v = u[i]; actual += v*v; } normsCol[col] = actual; } } }
[ "Performs an efficient update of each columns' norm" ]
[ "returns the abstract method from a SAM type, if it is a SAM type.\n@param c the SAM class\n@return null if nothing was found, the method otherwise", "Determine the enum value corresponding to the track type found in the packet.\n\n@return the proper value", "Comparator against other element.\n\n@param otherElement The other element.\n@param logging Whether to do logging.\n@return Whether the elements are equal.", "submit the adminClient after usage is completed.\nBehavior is undefined, if checkin is called with objects not retrieved\nfrom checkout.\n\n@param client AdminClient retrieved from checkout", "Write the given number of bytes out to the array\n\n@param bytes The array to write to\n@param value The value to write from\n@param offset the offset into the array\n@param numBytes The number of bytes to write", "Starts the transition", "Build the key for the TableAlias based on the path and the hints\n@param aPath\n@param hintClasses\n@return the key for the TableAlias", "Answer the counted size\n\n@return int", "Answer the SQL-Clause for a FieldCriteria\n\n@param c FieldCriteria\n@param cld ClassDescriptor" ]
public void reset( int N ) { this.N = N; this.diag = null; this.off = null; if( splits.length < N ) { splits = new int[N]; } numSplits = 0; x1 = 0; x2 = N-1; steps = numExceptional = lastExceptional = 0; this.Q = null; }
[ "Sets the size of the matrix being decomposed, declares new memory if needed,\nand sets all helper functions to their initial value." ]
[ "Creates a new random symmetric matrix that will have the specified real eigenvalues.\n\n@param num Dimension of the resulting matrix.\n@param rand Random number generator.\n@param eigenvalues Set of real eigenvalues that the matrix will have.\n@return A random matrix with the specified eigenvalues.", "Returns the first found autoincrement field\ndefined in this class descriptor. Use carefully\nwhen multiple autoincrement field were defined.\n@deprecated does not make sense because it's possible to\ndefine more than one autoincrement field. Alternative\nsee {@link #getAutoIncrementFields}", "Finishes the current box - empties the text line buffer and creates a DOM element from it.", "returns position of xpath element which match the expression xpath in the String dom.\n\n@param dom the Document to search in\n@param xpath the xpath query\n@return position of xpath element, if fails returns -1", "Remove all non replica clock entries from the list of versioned values\nprovided\n\n@param vals list of versioned values to prune replicas from\n@param keyReplicas list of current replicas for the given key\n@param didPrune flag to mark if we did actually prune something\n@return pruned list", "Aggregates a list of templates specified by @Template", "Use this API to fetch appfwjsoncontenttype resources of given names .", "Transposes a block matrix.\n\n@param A Original matrix. Not modified.\n@param A_tran Transposed matrix. Modified.", "It should be called when the picker is hidden" ]
public final void setConfigurationFiles(final Map<String, String> configurationFiles) throws URISyntaxException { this.configurationFiles.clear(); this.configurationFileLastModifiedTimes.clear(); for (Map.Entry<String, String> entry: configurationFiles.entrySet()) { if (!entry.getValue().contains(":/")) { // assume is a file this.configurationFiles.put(entry.getKey(), new File(entry.getValue()).toURI()); } else { this.configurationFiles.put(entry.getKey(), new URI(entry.getValue())); } } if (this.configFileLoader != null) { this.validateConfigurationFiles(); } }
[ "The setter for setting configuration file. It will convert the value to a URI.\n\n@param configurationFiles the configuration file map." ]
[ "Write flow id.\n\n@param message the message\n@param flowId the flow id", "Converts a time represented as an integer to a Date instance.\n\n@param time integer time\n@return Date instance", "Creates a Bytes object by copying the value of the given String with a given charset", "Returns the compact records for all stories on the task.\n\n@param task Globally unique identifier for the task.\n@return Request object", "This function computes which reduce task to shuffle a record to.", "Set the map attribute.\n\n@param name the attribute name\n@param attribute the attribute", "Parser for forecast\n\n@param feed\n@return", "Answer the primary key query to retrieve an Object\n\n@param oid the Identity of the Object to retrieve\n@return The resulting query", "Take screenshot of the current window.\n\n@param target The target type/format of the Screenshot\n@return Screenshot of current window, in the requested format" ]
protected void print(String text) { String tableStart = format(PARAMETER_TABLE_START, PARAMETER_TABLE_START); String tableEnd = format(PARAMETER_TABLE_END, PARAMETER_TABLE_END); boolean containsTable = text.contains(tableStart) && text.contains(tableEnd); String textToPrint = containsTable ? transformPrintingTable(text, tableStart, tableEnd) : text; print(output, textToPrint .replace(format(PARAMETER_VALUE_START, PARAMETER_VALUE_START), format("parameterValueStart", EMPTY)) .replace(format(PARAMETER_VALUE_END, PARAMETER_VALUE_END), format("parameterValueEnd", EMPTY)) .replace(format(PARAMETER_VALUE_NEWLINE, PARAMETER_VALUE_NEWLINE), format("parameterValueNewline", NL))); }
[ "Prints text to output stream, replacing parameter start and end\nplaceholders\n\n@param text the String to print" ]
[ "Calculate Median value.\n@param values Values.\n@return Median.", "Accessor method to retrieve a Boolean instance.\n\n@param field the index number of the field to be retrieved\n@param falseText locale specific text representing false\n@return the value of the required field", "Write all state items to the log file.\n\n@param fileRollEvent the event to log", "Facade method facilitating the creation of subshell.\nSubshell is created and run inside Command method and shares the same IO and naming strtategy.\n\nRun the obtained Shell with commandLoop().\n\n@param pathElement sub-prompt\n@param parent Shell to be subshell'd\n@param appName The app name string\n@param mainHandler Command handler\n@return subshell", "judge a->b is ordered clockwise\n\n@param center\n@param a\n@param b\n@return", "Returns the naming context.", "Returns the first number available, starting at portNumberStartingPoint that's not already in the reservedPorts\nlist.\n\n@param portNumberStartingPoint first port number to start from.\n@param reservedPorts the ports already reserved.\n@return first number available not in the given list, starting at the given parameter.", "Set the duration option.\n@param value the duration option to set ({@link EndType} as string).", "Orders first by word, then by lemma, then by tag.\n\n@param wordLemmaTag object to compare to\n@return result (positive if <code>this</code> is greater than\n<code>obj</code>, 0 if equal, negative otherwise)" ]
public Object getProperty(Object object) { return java.lang.reflect.Array.getLength(object); }
[ "Get this property from the given object.\n@param object an array\n@return the length of the array object\n@throws IllegalArgumentException if object is not an array" ]
[ "Returns the context the view is running in, through which it can\naccess the current theme, resources, etc.\n\n@return The view's Context.", "Get the label distance..\n\n@param settings Parameters for rendering the scalebar.", "Updates the style of the field label according to the field value if the\nfield value is empty - null or \"\" - removes the label 'active' style else\nwill add the 'active' style to the field label.", "Use this API to fetch appfwjsoncontenttype resource of given name .", "Computes FPS average", "Set an attribute of this node as Object. This method is backed by\na HashMap, so all rules of HashMap apply to this method.\nFires a PropertyChangeEvent.", "This method extracts project properties from a Phoenix file.\n\n@param phoenixSettings Phoenix settings\n@param storepoint Current storepoint", "Use this API to delete dnstxtrec.", "Clears all properties of specified entity.\n\n@param entity to clear." ]
private int read() { int curByte = 0; try { curByte = rawData.get() & 0xFF; } catch (Exception e) { header.status = GifDecoder.STATUS_FORMAT_ERROR; } return curByte; }
[ "Reads a single byte from the input stream." ]
[ "This method performs a series of permissions checks given a directory and properties file path.\n\n1 - Check whether the parent directory dirPath has proper execute and read permissions\n2 - Check whether properties file path is readable and writable\n\nIf either of the permissions checks fail, update validFilePermissions and filePermissionsProblemPath\nappropriately.", "Disable all overrides for a specified path with overrideType\n\n@param pathID ID of path containing overrides\n@param clientUUID UUID of client\n@param overrideType Override type identifier", "Detect what has changed in the store definition and rewire BDB\nenvironments accordingly.\n\n@param storeDef updated store definition", "Sets the baseline finish text value.\n\n@param baselineNumber baseline number\n@param value baseline finish text value", "Delete the proxy history for the active profile\n\n@throws Exception exception", "Sets all Fluo properties to their default in the given configuration. NOTE - some properties do\nnot have defaults and will not be set.", "SuppressWarnings I really want to return HazeltaskTasks instead of Runnable", "Add \"GROUP BY\" clause to the SQL query statement. This can be called multiple times to add additional \"GROUP BY\"\nclauses.\n\n<p>\nNOTE: Use of this means that the resulting objects may not have a valid ID column value so cannot be deleted or\nupdated.\n</p>", "Convenience method dispatches the specified event to the source appender,\nwhich will result in the custom event data being appended to the new file.\n\n@param customLoggingEvent\nThe custom Log4J event to be appended." ]
protected BlockBox createBlock(BlockBox parent, Element n, boolean replaced) { BlockBox root; if (replaced) { BlockReplacedBox rbox = new BlockReplacedBox((Element) n, (Graphics2D) parent.getGraphics().create(), parent.getVisualContext().create()); rbox.setViewport(viewport); rbox.setContentObj(new ReplacedImage(rbox, rbox.getVisualContext(), baseurl, n.getAttribute("src"))); root = rbox; } else { root = new BlockBox((Element) n, (Graphics2D) parent.getGraphics().create(), parent.getVisualContext().create()); root.setViewport(viewport); } root.setBase(baseurl); root.setParent(parent); root.setContainingBlockBox(parent); root.setClipBlock(viewport); root.setOrder(next_order++); return root; }
[ "Creates a new block box from the given element with the given parent. No style is assigned to the resulting box.\n@param parent The parent box in the tree of boxes.\n@param n The element that this box belongs to.\n@param replaced When set to <code>true</code>, a replaced block box will be created. Otherwise, a normal non-replaced block will be created.\n@return The new block box." ]
[ "Handles a faulted task.\n\n@param faultedEntry the entry holding faulted task\n@param throwable the reason for fault\n@param context the context object shared across all the task entries in this group during execution\n\n@return an observable represents asynchronous operation in the next stage", "Browse groups for the given category ID. If a null value is passed for the category then the root category is used.\n\n@param catId\nThe optional category id. Null value will be ignored.\n@return The Collection of Photo objects\n@throws FlickrException\n@deprecated Flickr returns just empty results", "Tests an observer method to see if it is transactional.\n\n@param observer The observer method\n@return true if the observer method is annotated as transactional", "Do not call this method outside of activity!!!", "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", "Returns the z-coordinate of a vertex normal.\n\n@param vertex the vertex index\n@return the z coordinate", "Send a DEBUG log message with specified subsystem. If subsystem is not enabled the message\nwill not be logged\n@param subsystem logging subsystem\n@param tag Used to identify the source of a log message. It usually identifies the class or\nactivity where the log call occurs.\n@param pattern The message pattern\n@return", "Redirect to page\n\n@param model\n@return", "Use this API to fetch all the cacheobject resources that are configured on netscaler." ]
public void setHostName(String hostName) { if (hostName == null || hostName.contains(":")) { return; } ODO_HOST = hostName; BASE_URL = "http://" + ODO_HOST + ":" + API_PORT + "/" + API_BASE + "/"; }
[ "Set the host running the Odo instance to configure\n\n@param hostName name of host" ]
[ "Creates needed textfields for general label in footer groups.\n@param djgroup\n@param jgroup", "Write the given number of bytes out to the array\n\n@param bytes The array to write to\n@param value The value to write from\n@param offset the offset into the array\n@param numBytes The number of bytes to write", "Adds version information.", "Use this API to fetch vlan_interface_binding resources of given name .", "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", "Returns the adapter position of the Parent associated with this ParentViewHolder\n\n@return The adapter position of the Parent if it still exists in the adapter.\nRecyclerView.NO_POSITION if item has been removed from the adapter,\nRecyclerView.Adapter.notifyDataSetChanged() has been called after the last\nlayout pass or the ViewHolder has already been recycled.", "Append Join for non SQL92 Syntax", "This method writes calendar data to a Planner file.\n\n@throws JAXBException on xml creation errors", "Look up record by identity." ]
public static BoxStoragePolicyAssignment.Info getAssignmentForTarget(final BoxAPIConnection api, String resolvedForType, String resolvedForID) { QueryStringBuilder builder = new QueryStringBuilder(); builder.appendParam("resolved_for_type", resolvedForType) .appendParam("resolved_for_id", resolvedForID); URL url = STORAGE_POLICY_ASSIGNMENT_URL_TEMPLATE.buildWithQuery(api.getBaseURL(), builder.toString()); BoxAPIRequest request = new BoxAPIRequest(api, url, HttpMethod.GET); BoxJSONResponse response = (BoxJSONResponse) request.send(); BoxStoragePolicyAssignment storagePolicyAssignment = new BoxStoragePolicyAssignment(api, response.getJsonObject().get("entries").asArray().get(0).asObject().get("id").asString()); BoxStoragePolicyAssignment.Info info = storagePolicyAssignment.new Info(response.getJsonObject().get("entries").asArray().get(0).asObject()); return info; }
[ "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}." ]
[ "Locates the services in the context classloader of the current thread.\n\n@param serviceType the type of the services to locate\n@param <X> the type of the service\n@return the service type loader", "Writes a DTD that can be used for data XML files matching the current model to the given writer.\n\n@param output The writer to write the DTD to", "Override this method to supply a custom splash screen image.\n\n@param gvrContext\nThe new {@link GVRContext}\n@return Texture to display\n\n@since 1.6.4", "Use this API to delete locationfile.", "Converts an image to a RGBA direct color model using a workaround via buffered image directly calling the\nColorConvert operation fails for unknown reasons ?!\n\n@param img image to convert\n@return converted image", "Sets a request header with the given name and value. If a header with the\nspecified name has already been set then the new value overwrites the\ncurrent value.\n\n@param header the name of the header\n@param value the value of the header\n\n@throws NullPointerException if header or value are null\n@throws IllegalArgumentException if header or value are the empty string", "Gets the type to use for the Vaadin table column corresponding to the c-th column in this result.\n\n@param c the column index\n@return the class to use for the c-th Vaadin table column", "Retrieves the monthly or yearly relative day of the week.\n\n@return day of the week", "Use this API to fetch cachepolicylabel_policybinding_binding resources of given name ." ]
private void readProjectProperties(Project project) throws MPXJException { ProjectProperties properties = m_projectFile.getProjectProperties(); properties.setCompany(project.getCompany()); properties.setManager(project.getManager()); properties.setName(project.getName()); properties.setStartDate(getDateTime(project.getProjectStart())); }
[ "This method extracts project properties from a Planner file.\n\n@param project Root node of the Planner file" ]
[ "Use this API to fetch nstimer_binding resource of given name .", "Map message info.\n\n@param messageInfoType the message info type\n@return the message info", "Transform a TMS layer description object into a raster layer info object.\n\n@param tileMap\nThe TMS layer description object.\n@return The raster layer info object as used by Geomajas.", "Indicates whether or not an event ID is a duplicate.\n\n<p>This method can be overridden by a subclass in order to provide custom de-duping logic.</p>\n\n@param eventID the event ID.\n@return true if the event is a duplicate; otherwise false.", "Sets current state\n@param state new state", "Append a SubQuery the SQL-Clause\n@param subQuery the subQuery value of SelectionCriteria", "Use this API to fetch auditnslogpolicy_systemglobal_binding resources of given name .", "Get layer style by name.\n\n@param name layer style name\n@return layer style", "Adds a JSON string representing to the DB.\n\n@param obj the JSON to record\n@return the number of rows in the table, or DB_OUT_OF_MEMORY_ERROR/DB_UPDATE_ERROR" ]
private Options getOptions() { Options options = new Options(); options.addOption("h", HELP, false, "print this message"); options.addOption(VERSION, false, "print the version information and exit"); options.addOption("b", BROWSER, true, "browser type: " + availableBrowsers() + ". Default is Firefox"); options.addOption(BROWSER_REMOTE_URL, true, "The remote url if you have configured a remote browser"); options.addOption("d", DEPTH, true, "crawl depth level. Default is 2"); options.addOption("s", MAXSTATES, true, "max number of states to crawl. Default is 0 (unlimited)"); options.addOption("p", PARALLEL, true, "Number of browsers to use for crawling. Default is 1"); options.addOption("o", OVERRIDE, false, "Override the output directory if non-empty"); options.addOption("a", CRAWL_HIDDEN_ANCHORS, false, "Crawl anchors even if they are not visible in the browser."); options.addOption("t", TIME_OUT, true, "Specify the maximum crawl time in minutes"); options.addOption(CLICK, true, "a comma separated list of HTML tags that should be clicked. Default is A and BUTTON"); options.addOption(WAIT_AFTER_EVENT, true, "the time to wait after an event has been fired in milliseconds. Default is " + CrawlRules.DEFAULT_WAIT_AFTER_EVENT); options.addOption(WAIT_AFTER_RELOAD, true, "the time to wait after an URL has been loaded in milliseconds. Default is " + CrawlRules.DEFAULT_WAIT_AFTER_RELOAD); options.addOption("v", VERBOSE, false, "Be extra verbose"); options.addOption(LOG_FILE, true, "Log to this file instead of the console"); return options; }
[ "Create the CML Options.\n\n@return Options expected from command-line." ]
[ "Adds a new assignment to this task.\n@param assignTo the user to assign the assignment to.\n@return information about the newly added task assignment.", "Use this API to fetch the statistics of all appfwprofile_stats resources that are configured on netscaler.", "Convert the continuous values into discrete values by chopping up\nthe distribution into several equally-sized intervals.", "Write a standard CoNLL format output file.\n\n@param doc The document: A List of CoreLabel\n@param out Where to send the answers to", "Instantiate Service Locator client. After successful instantiation\nestablish a connection to the Service Locator server. This method will be\ncalled if property locatorClient is null. For this purpose was defined\nadditional properties to instantiate ServiceLocatorImpl.\n\n@throws InterruptedException\n@throws ServiceLocatorException", "Calls the specified function with the specified arguments. This is used for v2 response overrides\n\n@param className name of class\n@param methodName name of method\n@param pluginArgs plugin arguments\n@param args arguments to supply to function\n@throws Exception exception", "Set the main attribute \"Bundle-RequiredExecutionEnvironment\" to the given\nvalue.\n\n@param bree The new value", "Read the work weeks.\n\n@param data calendar data\n@param offset current offset into data\n@param cal parent calendar", "Sets allowed values for attribute\n\n@param allowedValues values that are legal as part in this attribute\n@return a builder that can be used to continue building the attribute definition" ]
public static <T> boolean addAll(Collection<T> self, Iterator<T> items) { boolean changed = false; while (items.hasNext()) { T next = items.next(); if (self.add(next)) changed = true; } return changed; }
[ "Adds all items from the iterator to the Collection.\n\n@param self the collection\n@param items the items to add\n@return true if the collection changed" ]
[ "Create a MfClientHttpRequestFactory for adding the specified headers.\n\n@param requestFactory the basic request factory. It should be unmodified and just wrapped with\na proxy class.\n@param matchers The matchers.\n@param headers The headers.\n@return", "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)", "Get a compatible constructor\n\n@param type\nClass to look for constructor in\n@param argumentType\nArgument type for constructor\n@return the compatible constructor or null if none found", "Obtains a local date in Julian calendar system from the\nproleptic-year, month-of-year and day-of-month fields.\n\n@param prolepticYear the proleptic-year\n@param month the month-of-year\n@param dayOfMonth the day-of-month\n@return the Julian local date, not null\n@throws DateTimeException if unable to create the date", "Connect sync.\n\n@param configuration the protocol configuration\n@return the connection\n@throws IOException", "Reads basic summary details from the project properties.\n\n@param file MPX file", "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 background color.\n\nIf you don't set the background color, the default is an opaque black:\n{@link Color#BLACK}, 0xff000000.\n\n@param color\nAn Android 32-bit (ARGB) {@link Color}, such as you get from\n{@link Resources#getColor(int)}", "Use this API to fetch all the aaaparameter resources that are configured on netscaler." ]
public boolean isFinished(final ProcessorGraphNode processorGraphNode) { this.processorLock.lock(); try { return this.executedProcessors.containsKey(processorGraphNode.getProcessor()); } finally { this.processorLock.unlock(); } }
[ "Return true if the processor of the node has previously been executed.\n\n@param processorGraphNode the node to test." ]
[ "Converts SMatrixTriplet_64 into a SMatrixCC_64.\n\n@param src Original matrix which is to be copied. Not modified.\n@param dst Destination. Will be a copy. Modified.\n@param hist Workspace. Should be at least as long as the number of columns. Can be null.", "Sets the default pattern values dependent on the provided start date.\n@param startDate the date, the default values are determined with.", "Only converts the B matrix and passes that onto solve. Te result is then copied into\nthe input 'X' matrix.\n\n@param B A matrix &real; <sup>m &times; p</sup>. Not modified.\n@param X A matrix &real; <sup>n &times; p</sup>, where the solution is written to. Modified.", "Sets the promotion state.\n\n<P>INFO: This method updates automatically all the contained artifacts.\n\n@param promoted boolean", "Set the pointer on the bar. With the Value value.\n\n@param value float between 0 and 1", "Populates a ProjectCalendarWeek instance from Asta work pattern data.\n\n@param week target ProjectCalendarWeek instance\n@param workPatternID target work pattern ID\n@param workPatternMap work pattern data\n@param timeEntryMap time entry map\n@param exceptionTypeMap exception type map", "Gets the string describing the uniforms used by shaders of this type.\n@param ctx GVFContext shader is associated with\n@return uniform descriptor string\n@see #getTemplate(GVRContext) GVRShader#getUniformDescriptor()", "Find the index of this animation if it is in this animator.\n\n@param findme {@link GVRAnimation} to find.\n@returns 0 based index of animation or -1 if not found\n@see GVRAnimator#addAnimation(GVRAnimation)", "Convert an operation for deployment overlays to be executed on local servers.\nSince this might be called in the case of redeployment of affected deployments, we need to take into account\nthe composite op resulting from such a transformation\n@see AffectedDeploymentOverlay#redeployLinksAndTransformOperationForDomain\n@param operation\n@param host\n@return" ]
public static base_response update(nitro_service client, ntpserver resource) throws Exception { ntpserver updateresource = new ntpserver(); updateresource.serverip = resource.serverip; updateresource.servername = resource.servername; updateresource.minpoll = resource.minpoll; updateresource.maxpoll = resource.maxpoll; updateresource.preferredntpserver = resource.preferredntpserver; updateresource.autokey = resource.autokey; updateresource.key = resource.key; return updateresource.update_resource(client); }
[ "Use this API to update ntpserver." ]
[ "Gets the actual type arguments of a class\n\n@param clazz The class to examine\n@return The type arguments", "Returns a presentable version of the given PTB-tokenized text.\nPTB tokenization splits up punctuation and does various other things\nthat makes simply joining the tokens with spaces look bad. So join\nthe tokens with space and run it through this method to produce nice\nlooking text. It's not perfect, but it works pretty well.\n\n@param ptbText A String in PTB3-escaped form\n@return An approximation to the original String", "Parses a string that contains multiple fat client configs in avro format\n\n@param configAvro Input string of avro format, that contains config for\nmultiple stores\n@return Map of store names to store config properties", "Notification that the configuration has been written, and its current content should be stored to the .last file", "Roll back to the previous configuration.\n\n@throws GeomajasException\nindicates an unlikely problem with the rollback (see cause)", "Returns if a request should be retried based on the retry count, current response,\nand the current strategy.\n\n@param retryCount The current retry attempt count.\n@param response The exception that caused the retry conditions to occur.\n@return true if the request should be retried; false otherwise.", "Get the relative path.\n\n@return the relative path", "Performs a get all operation with the specified composite request object\n\n@param requestWrapper Composite request object containing a reference to\nthe Iterable keys\n\n@return Map of the keys to the corresponding versioned values", "Calculates a checksum for the specified buffer.\n@param buffer the buffer to calculate.\n@return the checksum value." ]
private void updateHostingEntityIfRequired() { if ( hostingEntity != null && hostingEntityRequiresReadAfterUpdate() ) { OgmEntityPersister entityPersister = getHostingEntityPersister(); if ( GridDialects.hasFacet( gridDialect, GroupingByEntityDialect.class ) ) { ( (GroupingByEntityDialect) gridDialect ).flushPendingOperations( getAssociationKey().getEntityKey(), entityPersister.getTupleContext( session ) ); } entityPersister.processUpdateGeneratedProperties( entityPersister.getIdentifier( hostingEntity, session ), hostingEntity, new Object[entityPersister.getPropertyNames().length], session ); } }
[ "Reads the entity hosting the association from the datastore and applies any property changes from the server\nside." ]
[ "Get a property as a string or defaultValue.\n\n@param key the property name\n@param defaultValue the default value", "Tests an observer method to see if it is transactional.\n\n@param observer The observer method\n@return true if the observer method is annotated as transactional", "todo remove, here only for binary compatibility of elytron subsystem, drop once it is in.", "Gets a first data set value.\n\n@param dataSet\nIIM record and dataset code (See constants in {@link IIM})\n@return data set value\n@throws SerializationException\nif value can't be deserialized from binary representation", "Set the payload to the fileModel of the given instance even though the variable is not directly referencing it. This is mainly to simplify the\ncreation of the rule, when the FileModel itself is not being iterated but just a model referencing it.", "This method writes task data to a Planner file.\n\n@throws JAXBException on xml creation errors", "overridden in ipv6 to handle zone", "returns the XmlCapable id associated with the literal.\nOJB maintains a RepositoryTags table that provides\na mapping from xml-tags to XmlCapable ids.\n\n@param literal the literal to lookup\n@return the int value representing the XmlCapable\n\n@throws MetadataException if no literal was found in tags mapping", "Generate and return the list of statements to create a database table and any associated features." ]
public static base_responses unset(nitro_service client, String name[], String args[]) throws Exception { base_responses result = null; if (name != null && name.length > 0) { clusternodegroup unsetresources[] = new clusternodegroup[name.length]; for (int i=0;i<name.length;i++){ unsetresources[i] = new clusternodegroup(); unsetresources[i].name = name[i]; } result = unset_bulk_request(client, unsetresources,args); } return result; }
[ "Use this API to unset the properties of clusternodegroup resources.\nProperties that need to be unset are specified in args array." ]
[ "Stops the current connection. No reconnecting will occur. Kills thread + cleanup.\nWaits for the loop to end", "Set the specific device class of the node.\n@param specificDeviceClass the specificDeviceClass to set\n@exception IllegalArgumentException thrown when the specific device class does not match\nthe generic device class.", "Request the artwork with a particular artwork ID, given a connection to a player that has already been set up.\n\n@param artworkId identifies the album art to retrieve\n@param slot the slot identifier from which the associated track was loaded\n@param trackType the kind of track that owns the artwork\n@param client the dbserver client that is communicating with the appropriate player\n\n@return the track's artwork, or null if none is available\n\n@throws IOException if there is a problem communicating with the player", "Lookup an object via its name.\n@param name The name of an object.\n@return The object with that name.\n@exception ObjectNameNotFoundException There is no object with the specified name.\nObjectNameNotFoundException", "Convert a layer type to a geometry class.\n\n@param layerType\nlayer type\n@return JTS class", "adds a FIELDDESCRIPTOR to this ClassDescriptor.\n@param fld", "Retrieve a child record by name.\n\n@param key child record name\n@return child record", "The Baseline Duration field shows the original span of time planned\nto complete a task.\n\n@return - duration string", "Sets the publish queue shutdown time.\n\n@param publishQueueShutdowntime the shutdown time to set, parsed as <code>int</code>" ]
private ArrayList<RunListener> instantiateRunListeners() throws Exception { ArrayList<RunListener> instances = new ArrayList<>(); if (runListeners != null) { for (String className : Arrays.asList(runListeners.split(","))) { instances.add((RunListener) this.instantiate(className).newInstance()); } } return instances; }
[ "Generates JUnit 4 RunListener instances for any user defined RunListeners" ]
[ "Use this API to fetch filtered set of dospolicy resources.\nset the filter parameter values in filtervalue object.", "Use this API to reset Interface.", "This method is called on every reference that is in the .class file.\n@param typeReference\n@return", "Use this API to fetch appflowpolicy_binding resource of given name .", "Perform a normal scan", "Use this API to update nsip6.", "Helper to format term updates as expected by the Wikibase API\n@param updates\nplanned updates for the type of term\n@return map ready to be serialized as JSON by Jackson", "Examins the structure of A for QR decomposition\n@param A matrix which is to be decomposed\n@return true if the solution is valid or false if the decomposition can't be performed (i.e. requires column pivots)", "Add \"GROUP BY\" clause to the SQL query statement. This can be called multiple times to add additional \"GROUP BY\"\nclauses.\n\n<p>\nNOTE: Use of this means that the resulting objects may not have a valid ID column value so cannot be deleted or\nupdated.\n</p>" ]
public String load() { this.paginator = new Paginator(); this.codes = null; // Perform a search this.codes = codeFragmentManager.searchCodeFragments(this.codeFragmentPrototype, this.page, this.paginator); return "history"; }
[ "Do the search, called as a \"page action\"" ]
[ "Sets the current reference definition derived from the current member, and optionally some attributes.\n\n@param template The template\n@param attributes The attributes of the tag\n@exception XDocletException If an error occurs\[email protected] type=\"block\"\[email protected] name=\"attributes\" optional=\"true\" description=\"Attributes of the reference as name-value pairs 'name=value',\nseparated by commas\"\[email protected] name=\"auto-delete\" optional=\"true\" description=\"Whether to automatically delete the\nreferenced object on object deletion\"\[email protected] name=\"auto-retrieve\" optional=\"true\" description=\"Whether to automatically retrieve\nthe referenced object\"\[email protected] name=\"auto-update\" optional=\"true\" description=\"Whether to automatically update the\nreferenced object\"\[email protected] name=\"class-ref\" optional=\"true\" description=\"The fully qualified name of the class\nowning the referenced field\"\[email protected] name=\"database-foreignkey\" optional=\"true\" description=\"Whether a database foreignkey shall be created\"\nvalues=\"true,false\"\[email protected] name=\"documentation\" optional=\"true\" description=\"Documentation on the reference\"\[email protected] name=\"foreignkey\" optional=\"true\" description=\"The fields in the current type used for\nimplementing the reference\"\[email protected] name=\"otm-dependent\" optional=\"true\" description=\"Whether the reference is dependent on otm\"\[email protected] name=\"proxy\" optional=\"true\" description=\"Whether to use a proxy for the reference\"\[email protected] name=\"proxy-prefetching-limit\" optional=\"true\" description=\"Specifies the amount of objects to prefetch\"\[email protected] name=\"refresh\" optional=\"true\" description=\"Whether to automatically refresh the\nreference\"\[email protected] name=\"remote-foreignkey\" optional=\"true\" description=\"The fields in the referenced type\ncorresponding to the local fields (is only used for the table definition)\"", "Request metadata for a specific track ID, given a dbserver connection to a player that has already been set up.\nSeparated into its own method so it could be used multiple times with the same connection when gathering\nall track metadata.\n\n@param track uniquely identifies the track whose metadata is desired\n@param trackType identifies the type of track being requested, which affects the type of metadata request\nmessage that must be used\n@param client the dbserver client that is communicating with the appropriate player\n\n@return the retrieved metadata, or {@code null} if there is no such track\n\n@throws IOException if there is a communication problem\n@throws InterruptedException if the thread is interrupted while trying to lock the client for menu operations\n@throws TimeoutException if we are unable to lock the client for menu operations", "public for testing purpose", "Use this API to fetch sslcertkey_crldistribution_binding resources of given name .", "Returns the index of the eigenvalue which has the largest magnitude.\n\n@return index of the largest magnitude eigen value.", "Ensure that the nodeList is either null or empty.\n\n@param nodeList the nodeList to ensure to be either null or empty\n@param expression the expression was used to fine the nodeList\n@throws SpinXPathException if the nodeList is either null or empty", "Pretty print a progress update after each batch complete.\n\n@param batchCount current batch\n@param numBatches total number of batches\n@param partitionStoreCount partition stores migrated\n@param numPartitionStores total number of partition stores to migrate\n@param totalTimeMs total time, in milliseconds, of execution thus far.", "Throws an exception if the request can for security reasons not be performed.\nSecurity restrictions can be set via parameters of the index.\n\n@param cms the current context.\n@param query the query.\n@param isSpell flag, indicating if the spellcheck handler is requested.\n@throws CmsSearchException thrown if the query cannot be executed due to security reasons.", "Expects a height mat as input\n\n@param input - A grayscale height map\n@return edges" ]
public static Tuple2<Double, Double> getRandomGeographicalLocation() { return new Tuple2<>( (double) (RandomHelper.randWithConfiguredSeed().nextInt(999) + 1) / 100, (double) (RandomHelper.randWithConfiguredSeed().nextInt(999) + 1) / 100); }
[ "Get random geographical location\n@return 2-Tuple of ints (latitude, longitude)" ]
[ "Returns the body of the request. This method is used to read posted JSON data.\n\n@param request The request.\n\n@return String representation of the request's body.\n\n@throws IOException in case reading the request fails", "True if deleted, false if not found.", "This method tells you if a ClassNode implements or extends a certain class.\n@param node\nthe node\n@param target\nthe class\n@return\ntrue if the class node 'is a' target", "Creates a new empty HTML document tree.\n@throws ParserConfigurationException", "Is the given resource type id free?\n@param id to be checked\n@return boolean", "Returns the later of two dates, handling null values. A non-null Date\nis always considered to be later than a null Date.\n\n@param d1 Date instance\n@param d2 Date instance\n@return Date latest date", "Recursively add files to a ZipOutputStream\n\n@param parent Parent file\n@param zout ZipOutputStream to append\n@param fileSource The file source\n@throws IOException I/O Error", "Adds a port that serves the HTTP requests. If unspecified, cleartext HTTP on port 36462 is used.\n\n@param localAddress the TCP/IP load address to bind\n@param protocol {@link SessionProtocol#HTTP} or {@link SessionProtocol#HTTPS}", "Create a plan. The plan consists of batches. Each batch involves the\nmovement of no more than batchSize primary partitions. The movement of a\nsingle primary partition may require migration of other n-ary replicas,\nand potentially deletions. Migrating a primary or n-ary partition\nrequires migrating one partition-store for every store hosted at that\npartition." ]
public String toNormalizedString(boolean keepMixed, IPv6StringOptions params) { if(keepMixed && fromString != null && getAddressfromString().isMixedIPv6() && !params.makeMixed()) { params = new IPv6StringOptions( params.base, params.expandSegments, params.wildcardOption, params.wildcards, params.segmentStrPrefix, true, params.ipv4Opts, params.compressOptions, params.separator, params.zoneSeparator, params.addrLabel, params.addrSuffix, params.reverse, params.splitDigits, params.uppercase); } return toNormalizedString(params); }
[ "Constructs a string representing this address according to the given parameters\n\n@param keepMixed if this address was constructed from a string with mixed representation (a:b:c:d:e:f:1.2.3.4), whether to keep it that way (ignored if makeMixed is true in the params argument)\n@param params the parameters for the address string" ]
[ "Given the comma separated list of properties as a string, splits it\nmultiple strings\n\n@param paramValue Concatenated string\n@param type Type of parameter ( to throw exception )\n@return List of string properties", "Performs the conversion from standard XPath to xpath with parameterization support.", "Sorts the fields.", "Preloads a sound file.\n\n@param soundFile path/name of the file to be played.", "This method writes resource data to a JSON file.", "Mark root of this task task group depends on the given TaskItem.\nThis ensure this task group's root get picked for execution only after the completion\nof invocation of provided TaskItem.\n\n@param dependencyTaskItem the task item that this task group depends on\n@return the key of the dependency", "Delete a comment as the currently authenticated user.\n\nThis method requires authentication with 'write' permission.\n\n@param commentId\nThe id of the comment to delete.\n@throws FlickrException", "Show only the following channels.\n@param channels The names of the channels to show.\n@return this", "Adds all fields declared directly in the object's class to the output\n@return this" ]
public Object remove(String name) { Bean bean = beans.get(name); if (null != bean) { beans.remove(name); bean.destructionCallback.run(); return bean.object; } return null; }
[ "Remove a bean from the context, calling the destruction callback if any.\n\n@param name bean name\n@return previous value" ]
[ "Ensure that the node is not null.\n\n@param node the node to ensure to be not null\n@param expression the expression was used to find the node\n@throws SpinXPathException if the node is null", "gets a class from the class cache. This cache contains only classes loaded through\nthis class loader or an InnerLoader instance. If no class is stored for a\nspecific name, then the method should return null.\n\n@param name of the class\n@return the class stored for the given name\n@see #removeClassCacheEntry(String)\n@see #setClassCacheEntry(Class)\n@see #clearCache()", "Gets the progress from response.\n\n@param myResponse\nthe my response\n@return the progress from response", "Send a metadata cache update announcement to all registered listeners.\n\n@param slot the media slot whose cache status has changed\n@param cache the cache which has been attached, or, if {@code null}, the previous cache has been detached", "Main method of this class related to ListView widget. This method is the responsible of\nrecycle or create a new Renderer instance with all the needed information to implement the\nrendering. This method will validate all the attributes passed in the builder constructor and\nwill check if can recycle or has to create a new Renderer instance.\n\nThis method is used with ListView because the view recycling mechanism is implemented in this\nclass. RecyclerView widget will use buildRendererViewHolder method.\n\n@return ready to use Renderer instance.", "Converts a string from ISO-8559-1 encoding to UTF-8.\n@param value ISO-8559-1 value\n@return UTF-8 value", "Gets the current Stack. If the stack is not set, a new empty instance is created and set.\n@return", "Wait for the read side to close. Used when the writer needs to know when\nthe reader finishes consuming a message.", "Determines if this connection's access token has expired and needs to be refreshed.\n@return true if the access token needs to be refreshed; otherwise false." ]
public static String strip(String text) { String result = text; if (text != null && !text.isEmpty()) { try { boolean formalRTF = isFormalRTF(text); StringTextConverter stc = new StringTextConverter(); stc.convert(new RtfStringSource(text)); result = stripExtraLineEnd(stc.getText(), formalRTF); } catch (IOException ex) { result = ""; } } return result; }
[ "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" ]
[ "Append environment variables and system properties from othre PipelineEvn object", "seeks to a specified day of the week in the past or future.\n\n@param direction the direction to seek: two possibilities\n'<' go backward\n'>' go forward\n\n@param seekType the type of seek to perform (by_day or by_week)\nby_day means we seek to the very next occurrence of the given day\nby_week means we seek to the first occurrence of the given day week in the\nnext (or previous,) week (or multiple of next or previous week depending\non the seek amount.)\n\n@param seekAmount the amount to seek. Must be guaranteed to parse as an integer\n\n@param dayOfWeek the day of the week to seek to, represented as an integer from\n1 to 7 (1 being Sunday, 7 being Saturday.) Must be guaranteed to parse as an Integer", "Use this API to delete nssimpleacl.", "This utility displays a list of available task filters, and a\nlist of available resource filters.\n\n@param project project file", "Dump data for all non-summary tasks to stdout.\n\n@param name file name", "get string from post stream\n\n@param is\n@param encoding\n@return", "Check, if the current user has permissions on the document's resource.\n@param cms the context\n@param doc the solr document (from the search result)\n@param filter the resource filter to use for checking permissions\n@return <code>true</code> iff the resource mirrored by the search result can be read by the current user.", "Use this API to fetch responderpolicy_binding resource of given name .", "Attempt to resolve the given expression string, recursing if resolution of one string produces\nanother expression.\n\n@param expressionString the expression string from a node of {@link ModelType#EXPRESSION}\n@param ignoreDMRResolutionFailure {@code false} if {@link org.jboss.dmr.ModelNode#resolve() basic DMR resolution}\nfailures should be ignored, and {@code new ModelNode(expressionType.asString())} returned\n@param initial {@code true} if this call originated outside this method; {@code false} if it is a recursive call\n\n@return a node of {@link ModelType#STRING} where the encapsulated string is the resolved expression, or a node\nof {@link ModelType#EXPRESSION} if {@code ignoreDMRResolutionFailure} and {@code initial} are\n{@code true} and the string could not be resolved.\n\n@throws OperationFailedException if the expression cannot be resolved" ]
private void removeTimedOutLocks(long timeout) { int count = 0; long maxAge = System.currentTimeMillis() - timeout; boolean breakFromLoop = false; ObjectLocks temp = null; synchronized (locktable) { Iterator it = locktable.values().iterator(); /** * run this loop while: * - we have more in the iterator * - the breakFromLoop flag hasn't been set * - we haven't removed more than the limit for this cleaning iteration. */ while (it.hasNext() && !breakFromLoop && (count <= MAX_LOCKS_TO_CLEAN)) { temp = (ObjectLocks) it.next(); if (temp.getWriter() != null) { if (temp.getWriter().getTimestamp() < maxAge) { // writer has timed out, set it to null temp.setWriter(null); } } if (temp.getYoungestReader() < maxAge) { // all readers are older than timeout. temp.getReaders().clear(); if (temp.getWriter() == null) { // all readers and writer are older than timeout, // remove the objectLock from the iterator (which // is backed by the map, so it will be removed. it.remove(); } } else { // we need to walk each reader. Iterator readerIt = temp.getReaders().values().iterator(); LockEntry readerLock = null; while (readerIt.hasNext()) { readerLock = (LockEntry) readerIt.next(); if (readerLock.getTimestamp() < maxAge) { // this read lock is old, remove it. readerIt.remove(); } } } count++; } } }
[ "removes all timed out lock entries from the persistent storage.\nThe timeout value can be set in the OJB properties file." ]
[ "Handles DMR strings in the configuration\n\n@param node the node to create.\n@param name the name for the node.\n@param value the value for the node.", "Delete an object from the database by id.", "Pushes a basic event.\n\n@param eventName The name of the event", "Allow for the use of text shading and auto formatting.", "Convert a Java date into a Planner date.\n\n20070222\n\n@param value Java Date instance\n@return Planner date", "check max size of each message\n@param maxMessageSize the max size for each message", "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", "Answer the TableAlias for aPath\n@param aPath\n@param hintClasses\n@return TableAlias, null if none", "Reads a quoted string value from the request." ]
public static double Exp(double x, int nTerms) { if (nTerms < 2) return 1 + x; if (nTerms == 2) { return 1 + x + (x * x) / 2; } else { double mult = x * x; double fact = 2; double result = 1 + x + mult / fact; for (int i = 3; i <= nTerms; i++) { mult *= x; fact *= i; result += mult / fact; } return result; } }
[ "compute Exp using Taylor Series.\n\n@param x An angle, in radians.\n@param nTerms Number of terms.\n@return Result." ]
[ "Set HTTP client\n\n@param httpClient\nAn instance of OkHttpClient\n@return Api Client", "Returns the most likely class for the word at the given position.", "Remove a part of a CharSequence. This replaces the first occurrence\nof the pattern within self with '' and returns the result.\n\n@param self a String\n@param pattern a Pattern representing the part to remove\n@return a String minus the part to be removed\n@since 2.2.0", "Update rows in the database.", "Returns a list of objects for each line in the spreadsheet, of the specified type.\n\n<p>\nIf the class is a view model then the objects will be properly instantiated (that is, using\n{@link DomainObjectContainer#newViewModelInstance(Class, String)}, with the correct\nview model memento); otherwise the objects will be simple transient objects (that is, using\n{@link DomainObjectContainer#newTransientInstance(Class)}).\n</p>", "The specified interface must not contain methods, that changes the state of this object itself.\n\n@param code\nsource code of an interface which describes how to generate the <i>immutable</i>\n@param settings\nsettings to generate code\n@return generated source code as string in a result wrapper", "Writes long strings to output stream as several chunks.\n\n@param stream stream to write to.\n@param str string to be written.\n@throws IOException if something went wrong", "Sets the ssh priv key relative path.\nNote that must be relative path for now.\nThis default to no need of passphrase for the private key.\nWill also auto set the login type to key based.\n\n@param privKeyRelativePath\nthe priv key relative path\n@return the parallel task builder", "Generates the cache key for Online links.\n@param cms the current CmsObject\n@param targetSiteRoot the target site root\n@param detailPagePart the detail page part\n@param absoluteLink the absolute (site-relative) link to the resource\n@return the cache key" ]
private void addDateWithCheckState(Date date, boolean checkState) { addCheckBox(date, checkState); if (!m_dates.contains(date)) { m_dates.add(date); fireValueChange(); } }
[ "Add a date with a certain check state.\n@param date the date to add.\n@param checkState the check state." ]
[ "Acquire the exclusive lock, with a max wait timeout to acquire.\n@param permit - the permit Integer for this operation. May not be {@code null}.\n@param timeout - the timeout scalar quantity.\n@param unit - see {@code TimeUnit} for quantities.\n@return {@code boolean} true on successful acquire.\n@throws InterruptedException - if the acquiring thread was interrupted.\n@throws IllegalArgumentException if {@code permit} is null.", "Add a forward to this curve.\n\n@param model An analytic model providing a context. The discount curve (if needed) is obtained from this model.\n@param fixingTime The given fixing time.\n@param forward The given forward.\n@param isParameter If true, then this point is server via {@link #getParameter()} and changed via {@link #setParameter(RandomVariable[])} and {@link #getCloneForParameter(RandomVariable[])}, i.e., it can be calibrated.", "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", "capture 3D screenshot", "Stop finding signatures for all active players.", "Classify the contents of a file.\n\n@param filename\nContains the sentence(s) to be classified.\n@return {@link List} of classified List of IN.", "returns controller if a new device is found", "Retrieves the registar linked to the bus.\nCreates a new registar is not present.\n\n@param bus\n@return", "Returns the filename of the resource with extension.\n\n@return Filename of the GVRAndroidResource. May return null if the\nresource is not associated with any file" ]
public Set<TupleOperation> getOperations() { if ( currentState == null ) { return Collections.emptySet(); } else { return new SetFromCollection<TupleOperation>( currentState.values() ); } }
[ "Return the list of actions on the tuple.\nInherently deduplicated operations\n\n@return the operations to execute on the Tuple" ]
[ "Get result of one of the task that belongs to this task's task group.\n\n@param key the task key\n@param <T> the actual type of the task result\n@return the task result, null will be returned if task has not produced a result yet", "Navigate to this address in the given model node.\n\n@param model the model node\n@param create {@code true} to create the last part of the node if it does not exist\n@return the submodel\n@throws NoSuchElementException if the model contains no such element\n\n@deprecated manipulating a deep DMR node tree via PathAddress is no longer how the management layer works\ninternally, so this method has become legacy cruft. Management operation handlers\nshould obtain a {@link org.jboss.as.controller.registry.Resource Resource} from the\n{@link org.jboss.as.controller.OperationContext#readResource(PathAddress) OperationContext}\nand use the {@code Resource} API to access child resources", "Sets the appropriate headers to response of this request.\n\n@param response The HttpServletResponse response object.", "Look for the specified album art in both the hot cache of loaded tracks and the longer-lived LRU cache.\n\n@param artReference uniquely identifies the desired album art\n\n@return the art, if it was found in one of our caches, or {@code null}", "Add information about host and thread to specified test case started event\n\n@param event given event to update\n@return updated event", "Handle a completed request producing an optional response", "Push an event which describes a purchase made.\n\n@param eventName Has to be specified as \"Charged\". Anything other than this\nwill result in an {@link InvalidEventNameException} being thrown.\n@param chargeDetails A {@link HashMap}, with keys as strings, and values as {@link String},\n{@link Integer}, {@link Long}, {@link Boolean}, {@link Float}, {@link Double},\n{@link java.util.Date}, or {@link Character}\n@param items An {@link ArrayList} which contains up to 15 {@link HashMap} objects,\nwhere each HashMap object describes a particular item purchased\n@throws InvalidEventNameException Thrown if the event name is not \"Charged\"\n@deprecated use {@link CleverTapAPI#pushChargedEvent(HashMap chargeDetails, ArrayList items)}", "Use this API to fetch appqoepolicy resource of given name .", "Draws the specified image with the first rectangle's bounds, clipping with the second one and adding\ntransparency.\n\n@param img image\n@param rect rectangle\n@param clipRect clipping bounds" ]
protected List<String> extractWords() throws IOException { while( true ) { lineNumber++; String line = in.readLine(); if( line == null ) { return null; } // skip comment lines if( hasComment ) { if( line.charAt(0) == comment ) continue; } // extract the words, which are the variables encoded return parseWords(line); } }
[ "Finds the next valid line of words in the stream and extracts them.\n\n@return List of valid words on the line. null if the end of the file has been reached.\n@throws java.io.IOException" ]
[ "Set the Log4j appender.\n\n@param appender the log4j appender", "Generate node data map.\n\n@param task\nthe job info", "Return all tenors for which data exists.\n\n@return The tenors in months.", "Get the TagsInterface for working with Flickr Tags.\n\n@return The TagsInterface", "Use this API to clear gslbldnsentries.", "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", "Dump an array of bytes in hexadecimal.\n\n@param displayOffset the display offset (left column)\n@param data the byte array of data\n@param offset the offset to start dumping in the byte array\n@param len the length of data to dump\n@return the dump string", "Handler for month changes.\n@param event change event.", "Disassociate a name with an object\n@param name The name of an object.\n@exception ObjectNameNotFoundException No object exists in the database with that name." ]
public static tmtrafficaction get(nitro_service service, String name) throws Exception{ tmtrafficaction obj = new tmtrafficaction(); obj.set_name(name); tmtrafficaction response = (tmtrafficaction) obj.get_resource(service); return response; }
[ "Use this API to fetch tmtrafficaction resource of given name ." ]
[ "Gets a property from system, environment or an external map.\nThe lookup order is system > env > map > defaultValue.\n\n@param name\nThe name of the property.\n@param map\nThe external map.\n@param defaultValue\nThe value that should be used if property is not found.", "Check invariant.\n\n@param browser The browser.\n@return Whether the condition is satisfied or <code>false</code> when it it isn't or a\n{@link CrawljaxException} occurs.", "Determines whether the specified permission is permitted.\n\n@param permission\n@return <tt>false<tt> if the specified permission is not permitted, based on the current security policy; <tt>true<tt> otherwise", "This method takes an integer enumeration of a priority\nand returns an appropriate instance of this class. Note that unrecognised\nvalues are treated as medium priority.\n\n@param priority int version of the priority\n@return Priority class instance", "Collect environment variables and system properties under with filter constrains", "Returns the simplified name of the type of the specified object.", "Here the search query is composed and executed.\nThe result is wrapped in an easily usable form.\nIt is exposed to the JSP via the tag's \"var\" attribute.\n@return The result object exposed via the tag's attribute \"var\".", "Sets selected page implicitly\n@param page new selected page\n@return true if the page has been selected successfully", "Specialized version of readValue just for reading map keys, because the StdDeserializer methods like\n_parseIntPrimitive blow up when the current JsonToken is FIELD_NAME" ]
private static Constraint loadConstraint(Annotation context) { Constraint constraint = null; final ServiceLoader<Constraint> constraints = ServiceLoader.load(Constraint.class); for (Constraint aConstraint : constraints) { try { aConstraint.getClass().getDeclaredMethod("check", context.annotationType()); constraint = aConstraint; break; } catch (NoSuchMethodException e) { // Look for next implementation if method not found with required signature. } } if (constraint == null) { throw new IllegalStateException("Couldn't found any implementation of " + Constraint.class.getName()); } return constraint; }
[ "we have only one implementation on classpath." ]
[ "Return the trimmed source line corresponding to the specified AST node\n\n@param node - the Groovy AST node", "Delete all backups asynchronously", "Perform a one-off scan during boot to establish deployment tasks to execute during boot", "Append field with quotes and escape characters added in the key, if required.\nThe value is added without quotes and any escape characters.\n\n@return this", "Set the position of the given Matcher to the given index.\n\n@param matcher a Matcher\n@param idx the index number\n@since 1.0", "Sets the path name for this ID\n\n@param pathId ID of path\n@param pathName Name of path", "Retrieve a child that matches the given absolute path, starting from the current node.\n\n@param nodePath The path from the object root to the requested child node.\n@return The requested child node or <code>null</code>.", "Adds an additional statement to the constructed document.\n\n@param statement\nthe additional statement\n@return builder object to continue construction", "Register opened database via the PBKey." ]
public void setColorRange(int firstIndex, int lastIndex, int color) { for (int i = firstIndex; i <= lastIndex; i++) map[i] = color; }
[ "Set a range of the colormap to a single color.\n@param firstIndex the position of the first color\n@param lastIndex the position of the second color\n@param color the color" ]
[ "Creates a resource key defined as a child of key defined by enumeration value.\n@see #key(Enum)\n@see #child(String)\n@param enumValue the enumeration value defining the parent key\n@param key the child id\n@return the resource key", "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", "Use this API to fetch all the systemcore resources that are configured on netscaler.", "Get a log file and last relevant date, and check if the log file is relevant\n@param currentLogFile The log file\n@param lastRelevantDate The last date which files should be keeping since\n@return false if the file should be deleted, true if it does not.", "Gets the metrics as a map whose keys are the metric name and whose values are the metric values.\n\n@return map", "Dumps all properties of a material to stdout.\n\n@param material the material", "Log a message line to the output.", "Subtract two complex numbers.\n\n@param z1 Complex Number.\n@param z2 Complex Number.\n@return Returns new ComplexNumber instance containing the subtract of specified complex numbers.", "Return the item view type used by the adapter to implement recycle mechanism.\n\n@param content to be rendered.\n@return an integer that represents the renderer inside the adapter." ]
protected void beforeMaterialization() { if (_listeners != null) { MaterializationListener listener; for (int idx = _listeners.size() - 1; idx >= 0; idx--) { listener = (MaterializationListener) _listeners.get(idx); listener.beforeMaterialization(this, _id); } } }
[ "Calls beforeMaterialization on all registered listeners in the reverse\norder of registration." ]
[ "judge a->b is ordered clockwise\n\n@param center\n@param a\n@param b\n@return", "Obtain a dbserver client session that can be used to perform some task, call that task with the client,\nthen release the client.\n\n@param targetPlayer the player number whose dbserver we wish to communicate with\n@param task the activity that will be performed with exclusive access to a dbserver connection\n@param description a short description of the task being performed for error reporting if it fails,\nshould be a verb phrase like \"requesting track metadata\"\n@param <T> the type that will be returned by the task to be performed\n\n@return the value returned by the completed task\n\n@throws IOException if there is a problem communicating\n@throws Exception from the underlying {@code task}, if any", "Test whether the operation has a defined criteria attribute.\n\n@param operation the operation\n@return", "Returns a projection object for specifying the fields to retrieve during a specific find operation.", "Attach a metadata cache file to a particular player media slot, so the cache will be used instead of querying\nthe player for metadata. This supports operation with metadata during shows where DJs are using all four player\nnumbers and heavily cross-linking between them.\n\nIf the media is ejected from that player slot, the cache will be detached.\n\n@param slot the media slot to which a meta data cache is to be attached\n@param file the metadata cache to be attached\n\n@throws IOException if there is a problem reading the cache file\n@throws IllegalArgumentException if an invalid player number or slot is supplied\n@throws IllegalStateException if the metadata finder is not running", "Displays a sample model for the report request.\n@return A string describing the structure of a certain report execution", "Get the response headers for URL\n\n@param stringUrl URL to use\n@return headers HTTP Headers\n@throws IOException I/O error happened", "Helper method to track storage operations & time via StreamingStats.\n\n@param startNs", "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." ]
public static dnsview_binding get(nitro_service service, String viewname) throws Exception{ dnsview_binding obj = new dnsview_binding(); obj.set_viewname(viewname); dnsview_binding response = (dnsview_binding) obj.get_resource(service); return response; }
[ "Use this API to fetch dnsview_binding resource of given name ." ]
[ "Checks if the given group of statements contains the given value as the\nvalue of a main snak of some statement.\n\n@param statementGroup\nthe statement group to scan\n@param value\nthe value to scan for\n@return true if value was found", "Add a single header key-value pair. If one with the name already exists,\nit gets replaced.\n\n@param name the name of the header.\n@param value the value of the header.\n@return the interceptor instance itself.", "Paint a check pattern, used for a background to indicate image transparency.\n@param c the component to draw into\n@param g the Graphics objects\n@param x the x position\n@param y the y position\n@param width the width\n@param height the height", "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.", "Sets the debug JPDA remote socket debugging argument.\n\n@param suspend {@code true} to suspend otherwise {@code false}\n@param port the port to listen on\n\n@return the builder", "Specifies convergence criteria\n\n@param maxIterations Maximum number of iterations\n@param ftol convergence based on change in function value. try 1e-12\n@param gtol convergence based on residual magnitude. Try 1e-12", "All the sub-level attributes.\n\n@param name the attribute name.\n@param attribute the attribute.", "Get the collection of untagged photos.\n\nThis method requires authentication with 'read' permission.\n\n@param perPage\n@param page\n@return A Collection of Photos\n@throws FlickrException", "set custom request for the default profile's default client\n\n@param pathName friendly name of path\n@param customData custom response/request data\n@return true if success, false otherwise" ]
private List<CmsSearchField> getFields() { CmsSearchManager manager = OpenCms.getSearchManager(); I_CmsSearchFieldConfiguration fieldConfig = manager.getFieldConfiguration(getParamFieldconfiguration()); List<CmsSearchField> result; if (fieldConfig != null) { result = fieldConfig.getFields(); } else { result = Collections.emptyList(); if (LOG.isErrorEnabled()) { LOG.error( Messages.get().getBundle().key( Messages.ERR_SEARCHINDEX_EDIT_MISSING_PARAM_1, A_CmsFieldConfigurationDialog.PARAM_FIELDCONFIGURATION)); } } return result; }
[ "Returns the configured fields of the current field configuration.\n\n@return the configured fields of the current field configuration" ]
[ "Use this API to save cachecontentgroup resources.", "Enable clipping for the Widget. Widget content including its children will be clipped by a\nrectangular View Port. By default clipping is disabled.", "Use this API to fetch authenticationradiuspolicy_vpnglobal_binding resources of given name .", "Generate a map file from a jar file.\n\n@param jarFile jar file\n@param mapFileName map file name\n@param mapClassMethods true if we want to produce .Net style class method names\n@throws XMLStreamException\n@throws IOException\n@throws ClassNotFoundException\n@throws IntrospectionException", "Get content for URL only\n\n@param stringUrl URL to get content\n@return the content\n@throws IOException I/O error happened", "Returns the current definition on the indicated level.\n\n@param level The level\n@return The definition", "To sql pattern.\n\n@param attribute the attribute\n@return the string", "get children nodes name\n\n@param zkClient zkClient\n@param path full path\n@return children nodes name or null while path not exist", "Returns the names of the bundles configured as workplace bundles in any module configuration.\n@return the names of the bundles configured as workplace bundles in any module configuration." ]
public void abort() { /* do nothing if already rolledback */ if (txStatus == Status.STATUS_NO_TRANSACTION || txStatus == Status.STATUS_UNKNOWN || txStatus == Status.STATUS_ROLLEDBACK) { log.info("Nothing to abort, tx is not active - status is " + TxUtil.getStatusString(txStatus)); return; } // check status of tx if (txStatus != Status.STATUS_ACTIVE && txStatus != Status.STATUS_PREPARED && txStatus != Status.STATUS_MARKED_ROLLBACK) { throw new IllegalStateException("Illegal state for abort call, state was '" + TxUtil.getStatusString(txStatus) + "'"); } if(log.isEnabledFor(Logger.INFO)) { log.info("Abort transaction was called on tx " + this); } try { try { doAbort(); } catch(Exception e) { log.error("Error while abort transaction, will be skipped", e); } // used in managed environments, ignored in non-managed this.implementation.getTxManager().abortExternalTx(this); try { if(hasBroker() && getBroker().isInTransaction()) { getBroker().abortTransaction(); } } catch(Exception e) { log.error("Error while do abort used broker instance, will be skipped", e); } } finally { txStatus = Status.STATUS_ROLLEDBACK; // cleanup things, e.g. release all locks doClose(); } }
[ "Abort and close the transaction. Calling abort abandons all persistent\nobject modifications and releases the associated locks. Aborting a\ntransaction does not restore the state of modified transient objects" ]
[ "Print a resource UID.\n\n@param value resource UID value\n@return resource UID string", "Return a long value from a prepared query.", "Removes from this set all of its elements that are contained in the specified members array\n@param members the members to remove\n@return the number of members actually removed", "Normalizes this vector in place.", "Inserts a String array value into the mapping of the underlying Bundle, replacing any existing\nvalue for the given key. Either key or value may be null.\n\n@param key a String, or null\n@param value a String array object, or null\n@return this bundler instance to chain method calls", "Returns whether this represents a valid host name or address format.\n@return", "Assigns retention policy with givenID to the enterprise.\n@param api the API connection to be used by the created assignment.\n@param policyID id of the assigned retention policy.\n@return info about created assignment.", "Add SQL to handle a unique=true field. THis is not for uniqueCombo=true.", "Add a greeting to the specified guestbook." ]
private Map<Integer, List<Row>> createTimeEntryMap(List<Row> rows) throws ParseException { Map<Integer, List<Row>> map = new HashMap<Integer, List<Row>>(); for (Row row : rows) { Integer workPatternID = row.getInteger("ID"); String shifts = row.getString("SHIFTS"); map.put(workPatternID, createTimeEntryRowList(shifts)); } return map; }
[ "Create the time entry map.\n\n@param rows work pattern rows\n@return time entry map" ]
[ "sets the row reader class name for thie class descriptor", "Reads numBytes bytes, and returns the corresponding string", "Find the the qualified container port of the target service\nUses java annotations first or returns the container port.\n\n@param service\nThe target service.\n@param qualifiers\nThe set of qualifiers.\n\n@return Returns the resolved containerPort of '0' as a fallback.", "Uncompresses the textual contents in the given map and and writes them to the files\ndenoted by the keys of the map.\n\n@param dir The base directory into which the files will be written\n@param contents The map containing the contents indexed by the filename\n@throws IOException If an error occurred", "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.", "Assign target number of partitions per node to specific node IDs. Then,\nseparates Nodes into donorNodes and stealerNodes based on whether the\nnode needs to donate or steal primary partitions.\n\n@param nextCandidateCluster\n@param numPartitionsPerNodePerZone\n@return a Pair. First element is donorNodes, second element is\nstealerNodes. Each element in the pair is a HashMap of Node to\nInteger where the integer value is the number of partitions to\nstore.", "Calculate the value of a CMS option using the Black-Scholes model for the swap rate together with\nthe Hunt-Kennedy convexity adjustment.\n\n@param forwardSwaprate The forward swap rate\n@param volatility Volatility of the log of the swap rate\n@param swapAnnuity The swap annuity\n@param optionMaturity The option maturity\n@param swapMaturity The swap maturity\n@param payoffUnit The payoff unit, e.g., the discount factor corresponding to the payment date\n@param optionStrike The option strike\n@return Value of the CMS option", "Determines whether the boolean value of the given string value.\n\n@param value The value\n@param defaultValue The boolean value to use if the string value is neither 'true' nor 'false'\n@return The boolean value of the string", "Returns an interval representing the subtraction of the\ngiven interval from this one.\n@param other interval to subtract from this one\n@return result of subtraction" ]
public float getPositionX(int vertex) { if (!hasPositions()) { throw new IllegalStateException("mesh has no positions"); } checkVertexIndexBounds(vertex); return m_vertices.getFloat(vertex * 3 * SIZEOF_FLOAT); }
[ "Returns the x-coordinate of a vertex position.\n\n@param vertex the vertex index\n@return the x coordinate" ]
[ "Use this API to clear bridgetable resources.", "The normalized string returned by this method is consistent with java.net.Inet6address.\nIPs are not compressed nor mixed in this representation.", "Returns the property value read from the given JavaBean.\n\n@param bean the JavaBean to read the property from\n@param property the property to read\n\n@return the property value read from the given JavaBean", "Load a classifier from the specified InputStream. The classifier is\nreinitialized from the flags serialized in the classifier. This does not\nclose the InputStream.\n\n@param in\nThe InputStream to load the serialized classifier from\n@param props\nThis Properties object will be used to update the\nSeqClassifierFlags which are read from the serialized classifier\n\n@throws IOException\nIf there are problems accessing the input stream\n@throws ClassCastException\nIf there are problems interpreting the serialized data\n@throws ClassNotFoundException\nIf there are problems interpreting the serialized data", "Map a single ResultSet row to a T instance.\n\n@throws SQLException", "Set the Log4j appender.\n\n@param appender the log4j appender", "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", "Start a task. The id is needed to end the task\n\n@param id\n@param taskName", "Helper method to copy the contents of a stream to a file.\n@param outputDirectory The directory in which the new file is created.\n@param stream The stream to copy.\n@param targetFileName The file to write the stream contents to.\n@throws IOException If the stream cannot be copied." ]
public synchronized void setDeviceName(String name) { if (name.getBytes().length > DEVICE_NAME_LENGTH) { throw new IllegalArgumentException("name cannot be more than " + DEVICE_NAME_LENGTH + " bytes long"); } Arrays.fill(announcementBytes, DEVICE_NAME_OFFSET, DEVICE_NAME_LENGTH, (byte)0); System.arraycopy(name.getBytes(), 0, announcementBytes, DEVICE_NAME_OFFSET, name.getBytes().length); }
[ "Set the name to be used in announcing our presence on the network. The name can be no longer than twenty\nbytes, and should be normal ASCII, no Unicode.\n\n@param name the device name to report in our presence announcement packets." ]
[ "Get distance between geographical coordinates\n@param point1 Point1\n@param point2 Point2\n@return Distance (double)", "Prep for a new connection\n@return if stats are enabled, return the nanoTime when this connection was requested.\n@throws SQLException", "Handler for week of month changes.\n@param event the change event.", "Store the deployment contents and attach a \"transformed\" slave operation to the operation context.\n\n@param context the operation context\n@param operation the original operation\n@param contentRepository the content repository\n@return the hash of the uploaded deployment content\n@throws IOException\n@throws OperationFailedException", "Enable or disable the default blank validator.", "Create the label for a grid line.\n\n@param value the value of the line\n@param unit the unit that the value is in", "Computes the likelihood of the random draw\n\n@return The likelihood.", "Adds the headers.\n\n@param builder\nthe builder\n@param headerMap\nthe header map", "Joins a collection in a string using a delimiter\n@param col Collection\n@param delim Delimiter\n@return String" ]
protected void processTaskBaseline(Row row) { Integer id = row.getInteger("TASK_UID"); Task task = m_project.getTaskByUniqueID(id); if (task != null) { int index = row.getInt("TB_BASE_NUM"); task.setBaselineDuration(index, MPDUtility.getAdjustedDuration(m_project, row.getInt("TB_BASE_DUR"), MPDUtility.getDurationTimeUnits(row.getInt("TB_BASE_DUR_FMT")))); task.setBaselineStart(index, row.getDate("TB_BASE_START")); task.setBaselineFinish(index, row.getDate("TB_BASE_FINISH")); task.setBaselineWork(index, row.getDuration("TB_BASE_WORK")); task.setBaselineCost(index, row.getCurrency("TB_BASE_COST")); } }
[ "Read task baseline values.\n\n@param row result set row" ]
[ "Returns whether the values of this division grouping contain the prefix block for the given prefix length\n\n@param prefixLength\n@return", "This is a method to stream slops to \"slop\" store when a node is detected\nfaulty in a streaming session\n\n@param key -- original key\n@param value -- original value\n@param storeName -- the store for which we are registering the slop\n@param failedNodeId -- the faulty node ID for which we register a slop\n@throws IOException", "Validate the Combination filter field in Multi configuration jobs", "Retrieve and validate the timeout value from the REST request.\n\"X_VOLD_REQUEST_TIMEOUT_MS\" is the timeout header.\n\n@return true if present, false if missing", "Replace bad xml charactes in given array by space\n\n@param cbuf buffer to replace in\n@param off Offset from which to start reading characters\n@param len Number of characters to be replaced", "Use this API to fetch all the systemcore resources that are configured on netscaler.", "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", "Print the String features generated from a IN", "Adds all fields declared in the object's class and its superclasses to the output.\n@return this" ]
public static cmppolicy_stats get(nitro_service service, String name) throws Exception{ cmppolicy_stats obj = new cmppolicy_stats(); obj.set_name(name); cmppolicy_stats response = (cmppolicy_stats) obj.stat_resource(service); return response; }
[ "Use this API to fetch statistics of cmppolicy_stats resource of given name ." ]
[ "User-initiated commands use this method.\n\n@param command The CLI command\n@return A Response object containing the command line, DMR request, and DMR response\n@throws CommandFormatException\n@throws IOException", "This is the main entry point used to convert the internal representation\nof timephased cost into an external form which can\nbe displayed to the user.\n\n@param projectCalendar calendar used by the resource assignment\n@param cost timephased resource assignment data\n@param rangeUnits timescale units\n@param dateList timescale date ranges\n@return list of durations, one per timescale date range", "Retrieve the correct calendar for a resource.\n\n@param calendarID calendar ID\n@return calendar for resource", "Convert the integer representation of a duration value and duration units\ninto an MPXJ Duration instance.\n\n@param properties project properties, used for duration units conversion\n@param durationValue integer duration value\n@param unitsValue integer units value\n@return Duration instance", "Method to declare Video-VideoRenderer mapping.\nFavorite videos will be rendered using FavoriteVideoRenderer.\nLive videos will be rendered using LiveVideoRenderer.\nLiked videos will be rendered using LikeVideoRenderer.\n\n@param content used to map object-renderers.\n@return VideoRenderer subtype class.", "Creates or returns the instance of the helper class.\n\n@param inputSpecification the input specification.\n@param formFillMode if random data should be used on the input fields.\n@return The singleton instance.", "Handles logging tasks related to a failure to connect to a remote HC.\n@param uri the URI at which the connection attempt was made. Can be {@code null} indicating a failure to discover the HC\n@param discoveryOption the {@code DiscoveryOption} used to determine {@code uri}\n@param moreOptions {@code true} if there are more untried discovery options\n@param e the exception", "Non-supported in JadeAgentIntrospector", "Given an AVRO serializer definition, validates if all the avro schemas\nare valid i.e parseable.\n\n@param avroSerDef" ]
final protected void putChar(char c) { final int clen = _internalBuffer.length; if (clen == _bufferPosition) { final char[] next = new char[2 * clen + 1]; System.arraycopy(_internalBuffer, 0, next, 0, _bufferPosition); _internalBuffer = next; } _internalBuffer[_bufferPosition++] = c; }
[ "Store the char in the internal buffer" ]
[ "Inserts a child task prior to a given sibling task.\n\n@param child new child task\n@param previousSibling sibling task", "Creates a new Terms of Services.\n@param api the API connection to be used by the resource.\n@param termsOfServiceStatus the current status of the terms of services. Set to \"enabled\" or \"disabled\".\n@param termsOfServiceType the scope of terms of service. Set to \"external\" or \"managed\".\n@param text the text field of terms of service containing terms of service agreement info.\n@return information about the Terms of Service created.", "Updates the indices in the index buffer from a Java IntBuffer.\nAll of the entries of the input int buffer are copied into\nthe storage for the index buffer. The new indices must be the\nsame size as the old indices - the index buffer size cannot be changed.\n@param data char array containing the new values\n@throws IllegalArgumentException if int buffer is wrong size", "Logs an error message for unhandled exception thrown from the target method.\n\n@param joinPoint - the joint point cut that contains information about the target\n@param throwable - the cause of the exception from the target method invocation", "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", "Recursively add indirect subclasses to a class record.\n\n@param directSuperClass\nthe superclass to add (together with its own superclasses)\n@param subClassRecord\nthe subclass to add to", "Generic version of getting value by key from the JobContext of current thread\n@param key the key\n@param clz the val class\n@param <T> the val type\n@return the value", "Allows direct access to the Undertow.Builder for custom configuration\n\n@param serverConfigurationFunction the serverConfigurationFunction", "Reset autoCommit state." ]
public void execute() throws IOException { try { prepare(); boolean commitResult = commit(); if (commitResult == false) { throw PatchLogger.ROOT_LOGGER.failedToDeleteBackup(); } } catch (PrepareException pe){ rollback(); throw PatchLogger.ROOT_LOGGER.failedToDelete(pe.getPath()); } }
[ "remove files from directory. All-or-nothing operation - if any of the files fails to be removed, all deleted files are restored.\n\nThe operation is performed in two steps - first all the files are moved to a backup folder, and afterwards backup folder is removed.\nIf an error occurs in the first step of the operation, all files are restored and the operation ends with status {@code false}.\nIf an error occurs in the second step, the operation ends with status {@code false}, but the files are not rolled back.\n\n@throws IOException if an error occurred" ]
[ "Set the list of supported resolutions. Each resolution is specified in map units per pixel.\n\n@param resolutions\nresolutions\n@deprecated use {@link #setZoomLevels()}", "Add an order on the given column\n\n@param columnName the name of the column\n@param ascending whether the sorting is ascending or descending", "Use this API to fetch dnsview_binding resource of given name .", "Create a new photoset.\n\n@param title\nThe photoset title\n@param description\nThe photoset description\n@param primaryPhotoId\nThe primary photo id\n@return The new Photset\n@throws FlickrException", "performs a primary key lookup operation against RDBMS and materializes\nan object from the resulting row. Only skalar attributes are filled from\nthe row, references are not resolved.\n@param oid contains the primary key info.\n@param cld ClassDescriptor providing mapping information.\n@return the materialized object, null if no matching row was found or if\nany error occured.", "Operations to do after all subthreads finished their work on index\n\n@param backend", "Returns the number of vertex indices for a single face.\n\n@param face the face\n@return the number of indices", "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", "Add the set of partitions to the node provided\n\n@param node The node to which we'll add the partitions\n@param donatedPartitions The list of partitions to add\n@return The new node with the new partitions" ]
public void writeTo(File file) throws IOException { FileChannel channel = new FileOutputStream(file).getChannel(); try { writeTo(channel); } finally { channel.close(); } }
[ "Dump the buffer contents to a file\n@param file\n@throws IOException" ]
[ "Check if a dependency matches the filters\n\n@param dependency\n\n@return boolean", "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.", "Use this API to unset the properties of nsrpcnode resource.\nProperties that need to be unset are specified in args array.", "Sets the number of views for this Photo. For un-authenticated calls this value is not available and will be set to -1.\n\n@param views\n@deprecated attribute no longer available", "Set the String of request body data to be sent to the server.\n\n@param input String of request body data to be sent to the server\n@return an {@link HttpConnection} for method chaining", "Initialize the pattern choice button group.", "Use this API to fetch the statistics of all scpolicy_stats resources that are configured on netscaler.", "For given field name get the actual hint message", "This method computes the list of unnamed parameters, by filtering the\nlist of raw arguments, stripping out the named parameters." ]
public static base_response delete(nitro_service client, lbroute resource) throws Exception { lbroute deleteresource = new lbroute(); deleteresource.network = resource.network; deleteresource.netmask = resource.netmask; return deleteresource.delete_resource(client); }
[ "Use this API to delete lbroute." ]
[ "Maps a transportId to its corresponding TransportType.\n@param transportId\n@return", "Function to go through all the store definitions contained in the STORES\ndirectory and\n\n1. Update metadata cache.\n\n2. Update STORES_KEY by stitching together all these keys.\n\n3. Update 'storeNames' list.\n\nThis method is not thread safe. It is expected that the caller of this\nmethod will correctly handle concurrency issues. Currently this is not an\nissue since its invoked by init, put, add and delete store all of which\nuse locks to deal with any concurrency related issues.", "It will look for all the deployments under the deploymentsRootAddress with a runtimeName in the specified list of\nruntime names and then transform the operation so that every server having those deployments will redeploy the\naffected deployments.\n\n@see #transformOperation\n@param removeOperation\n@param context\n@param deploymentsRootAddress\n@param runtimeNames\n@throws OperationFailedException", "Creates an empty block style definition.\n@return", "Update artifact provider\n\n@param gavc String\n@param provider String", "returns true if there are still more rows in the underlying ResultSet.\nReturns false if ResultSet is exhausted.", "Creates a proxy object which implements a given bean interface.\n\n@param proxyInterface\nthe interface the the proxy will implement\n@param <T>\nthe proxy implementation type\n@return the proxy implementation\n@throws NullPointerException\nif proxyInterface is null", "Get the permission information for the specified photo.\n\nThis method requires authentication with 'read' permission.\n\n@param photoId\nThe photo id\n@return The Permissions object\n@throws FlickrException", "Write calendar exceptions.\n\n@param records list of ProjectCalendars\n@throws IOException" ]
public void add(String photoId, String userId, Rectangle bounds) throws FlickrException { // Delegating this to photos.people.PeopleInterface - Naming standard would be to use PeopleInterface but having 2 the same name can cause issues com.flickr4java.flickr.photos.people.PeopleInterface pi = new com.flickr4java.flickr.photos.people.PeopleInterface(apiKey, sharedSecret, transportAPI); pi.add(photoId, userId, bounds); }
[ "Add the given person to the photo. Optionally, send in co-ordinates\n\n@param photoId\n@param userId\n@param bounds\n@throws FlickrException" ]
[ "This method is called to try to catch any invalid tasks that may have sneaked past all our other checks.\nThis is done by validating the tasks by task ID.", "Performs a remote service method invocation. This method is called by\ngenerated proxy classes.\n\n@param <T> return type for the AsyncCallback\n@param responseReader instance used to read the return value of the\ninvocation\n@param requestData payload that encodes the addressing and arguments of the\nRPC call\n@param callback callback handler\n\n@return a {@link Request} object that can be used to track the request", "Gets information about a trashed file.\n@param fileID the ID of the trashed file.\n@return info about the trashed file.", "Use this API to fetch systemuser resource of given name .", "Cause the container to be cleaned up, including all registered bean\nmanagers, and all deployment services", "Find a given range object in a list of ranges by a value in that range. Does a binary\nsearch over the ranges but instead of checking for equality looks within the range.\nTakes the array size as an option in case the array grows while searching happens\n@param <T> Range type\n@param ranges data list\n@param value value in the list\n@param arraySize the max search index of the list\n@return search result of range\nTODO: This should move into SegmentList.scala", "This method prints plan information of an agent through its external\naccess. It can be used to check the correct behaviour of the agent.\n\n@param agent_name\nThe name of the agent\n@param connector\nThe connector to get the external access\n@return plans the IPlan[] with all the information, so the tester can\nlook for information", "Parses an RgbaColor from a hexadecimal, rgb, rgba, hsl, or hsla\nvalue.\n\n@return returns the parsed color", "Inverts the value of the bit at the specified index.\n@param index The bit to flip (0 is the least-significant bit).\n@throws IndexOutOfBoundsException If the specified index is not a bit\nposition in this bit string." ]
public static base_response update(nitro_service client, responderparam resource) throws Exception { responderparam updateresource = new responderparam(); updateresource.undefaction = resource.undefaction; return updateresource.update_resource(client); }
[ "Use this API to update responderparam." ]
[ "Translate the operation address.\n\n@param op the operation\n@return the new operation", "Adds a listener to this collection.\n\n@param listener The listener to add", "Compute the repair set from the given values and nodes\n\n@param nodeValues The value found on each node\n@return A set of repairs to perform", "Straight conversion from an ObjectName to a PathAddress.\n\nThere may not necessarily be a Resource at this path address (if that correspond to a pattern) but it must\nmatch a model in the registry.\n\n@param domain the name of the caller's JMX domain\n@param registry the root resource for the management model\n@param name the ObjectName to convert\n\n@return the PathAddress, or {@code null} if no address matches the object name", "Flips the output buffer, and lets the Selector know we're ready to write.\n\n@param selectionKey", "Converts the node to JSON\n@return JSON object", "Use this API to fetch filtered set of vpnclientlessaccesspolicy resources.\nset the filter parameter values in filtervalue object.", "Read resource assignment data from a PEP file.", "Use this API to fetch all the nsacl6 resources that are configured on netscaler." ]
protected void generateTitleBand() { log.debug("Generating title band..."); JRDesignBand band = (JRDesignBand) getDesign().getPageHeader(); int yOffset = 0; //If title is not present then subtitle will be ignored if (getReport().getTitle() == null) return; if (band != null && !getDesign().isTitleNewPage()){ //Title and subtitle comes afer the page header yOffset = band.getHeight(); } else { band = (JRDesignBand) getDesign().getTitle(); if (band == null){ band = new JRDesignBand(); getDesign().setTitle(band); } } JRDesignExpression printWhenExpression = new JRDesignExpression(); printWhenExpression.setValueClass(Boolean.class); printWhenExpression.setText(EXPRESSION_TRUE_WHEN_FIRST_PAGE); JRDesignTextField title = new JRDesignTextField(); JRDesignExpression exp = new JRDesignExpression(); if (getReport().isTitleIsJrExpression()){ exp.setText(getReport().getTitle()); }else { exp.setText("\"" + Utils.escapeTextForExpression( getReport().getTitle()) + "\""); } exp.setValueClass(String.class); title.setExpression(exp); title.setWidth(getReport().getOptions().getPrintableWidth()); title.setHeight(getReport().getOptions().getTitleHeight()); title.setY(yOffset); title.setPrintWhenExpression(printWhenExpression); title.setRemoveLineWhenBlank(true); applyStyleToElement(getReport().getTitleStyle(), title); title.setStretchType( StretchTypeEnum.NO_STRETCH ); band.addElement(title); JRDesignTextField subtitle = new JRDesignTextField(); if (getReport().getSubtitle() != null) { JRDesignExpression exp2 = new JRDesignExpression(); exp2.setText("\"" + getReport().getSubtitle() + "\""); exp2.setValueClass(String.class); subtitle.setExpression(exp2); subtitle.setWidth(getReport().getOptions().getPrintableWidth()); subtitle.setHeight(getReport().getOptions().getSubtitleHeight()); subtitle.setY(title.getY() + title.getHeight()); subtitle.setPrintWhenExpression(printWhenExpression); subtitle.setRemoveLineWhenBlank(true); applyStyleToElement(getReport().getSubtitleStyle(), subtitle); title.setStretchType( StretchTypeEnum.NO_STRETCH ); band.addElement(subtitle); } }
[ "Adds title and subtitle to the TitleBand when it applies.\nIf title is not present then subtitle will be ignored" ]
[ "Adds format information to eval.", "Ask the specified player for metadata about the track in the specified slot with the specified rekordbox ID,\nunless we have a metadata cache available for the specified media slot, in which case that will be used instead.\n\n@param track uniquely identifies the track whose metadata is desired\n@param trackType identifies the type of track being requested, which affects the type of metadata request\nmessage that must be used\n\n@return the metadata, if any", "Converts to credentials for use in Grgit.\n@return {@code null} if both username and password are {@code null},\notherwise returns credentials in Grgit format.", "Retrieves a timestamp from the property data.\n\n@param type Type identifier\n@return timestamp", "Add a module to a module tree\n\n@param module\n@param tree", "Retrieves the timephased breakdown of cost.\n\n@return timephased cost", "Returns the sentence as a string with a space between words.\nDesigned to work robustly, even if the elements stored in the\n'Sentence' are not of type Label.\n\nThis one uses the default separators for any word type that uses\nseparators, such as TaggedWord.\n\n@param justValue If <code>true</code> and the elements are of type\n<code>Label</code>, return just the\n<code>value()</code> of the <code>Label</code> of each word;\notherwise,\ncall the <code>toString()</code> method on each item.\n@return The sentence in String form", "Set ViewPort visibility of the object.\n\n@see ViewPortVisibility\n@param viewportVisibility\nThe ViewPort visibility of the object.\n@return {@code true} if the ViewPort visibility was changed, {@code false} if it\nwasn't.", "Creates a copy with verbose mode enabled.\n\n@param serverSetups the server setups.\n@return copies of server setups with verbose mode enabled." ]