query
stringlengths
74
6.1k
positive
sequencelengths
1
1
negative
sequencelengths
9
9
@SuppressWarnings("serial") private Component createAddDescriptorButton() { Button addDescriptorButton = CmsToolBar.createButton( FontOpenCms.COPY_LOCALE, m_messages.key(Messages.GUI_ADD_DESCRIPTOR_0)); addDescriptorButton.setDisableOnClick(true); addDescriptorButton.addClickListener(new ClickListener() { @SuppressWarnings("synthetic-access") public void buttonClick(ClickEvent event) { Map<Object, Object> filters = getFilters(); m_table.clearFilters(); if (!m_model.addDescriptor()) { CmsVaadinUtils.showAlert( m_messages.key(Messages.ERR_BUNDLE_DESCRIPTOR_CREATION_FAILED_0), m_messages.key(Messages.ERR_BUNDLE_DESCRIPTOR_CREATION_FAILED_DESCRIPTION_0), null); } else { IndexedContainer newContainer = null; try { newContainer = m_model.getContainerForCurrentLocale(); m_table.setContainerDataSource(newContainer); initFieldFactories(); initStyleGenerators(); setEditMode(EditMode.MASTER); m_table.setColumnCollapsingAllowed(true); adjustVisibleColumns(); m_options.updateShownOptions(m_model.hasMasterMode(), m_model.canAddKeys()); m_options.setEditMode(m_model.getEditMode()); } catch (IOException | CmsException e) { // Can never appear here, since container is created by addDescriptor already. LOG.error(e.getLocalizedMessage(), e); } } setFilters(filters); } }); return addDescriptorButton; }
[ "Returns a button component. On click, it triggers adding a bundle descriptor.\n@return a button for adding a descriptor to a bundle." ]
[ "True if deleted, false if not found.", "Gets the list of failed invocations that has been collected by this collector.\n\n@return The failed invocations.", "Compose src onto dst using the alpha of sel to interpolate between the two.\nI can't think of a way to do this using AlphaComposite.\n@param src the source raster\n@param dst the destination raster\n@param sel the mask raster", "Record a content loader for a given patch id.\n\n@param patchID the patch id\n@param contentLoader the content loader", "Gets a collection of all the email aliases for this user.\n\n<p>Note that the user's primary login email is not included in the collection of email aliases.</p>\n\n@return a collection of all the email aliases for this user.", "Retrieves the avatar of a user as an InputStream.\n\n@return InputStream representing the user avater.", "Send ourselves \"updates\" about any tracks that were loaded before we started, since we missed them.", "Returns a lazily generated map from site paths of resources to the available locales for the resource.\n\n@return a lazily generated map from site paths of resources to the available locales for the resource.", "Registers the parameter for the value formatter for the given variable and puts\nit's implementation in the parameters map.\n@param djVariable\n@param variableName" ]
AlbumArt getArtwork(int artworkId, SlotReference slot, CdjStatus.TrackType trackType, Client client) throws IOException { // Send the artwork request Message response = client.simpleRequest(Message.KnownType.ALBUM_ART_REQ, Message.KnownType.ALBUM_ART, client.buildRMST(Message.MenuIdentifier.DATA, slot.slot, trackType), new NumberField((long)artworkId)); // Create an image from the response bytes return new AlbumArt(new DataReference(slot, artworkId), ((BinaryField)response.arguments.get(3)).getValue()); }
[ "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" ]
[ "Delete an object.", "Use this API to update responderpolicy.", "Register the given object under the package name of the object's class\nwith the given type name.\n\nthis method using the platform mbean server as returned by\nManagementFactory.getPlatformMBeanServer()\n\n@param typeName The name of the type to register\n@param obj The object to register as an mbean", "Create a new entry in the database from an object.", "Retrieve the correct index for the supplied Table instance.\n\n@param table Table instance\n@return index", "Processes the template for all class definitions.\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\"", "Print the parameters of the parameterized type t", "Get the time zone for a specific stock or index.\nFor stocks, the exchange suffix is extracted from the stock symbol to retrieve the time zone.\n\n@param symbol stock symbol in YahooFinance\n@return time zone of the exchange on which this stock is traded", "Add a newline to this sequence according to the configured lineDelimiter if the last line contains\nsomething besides whitespace." ]
private void addCalendarExceptions(Table table, ProjectCalendar calendar, Integer exceptionID) { Integer currentExceptionID = exceptionID; while (true) { MapRow row = table.find(currentExceptionID); if (row == null) { break; } Date date = row.getDate("DATE"); ProjectCalendarException exception = calendar.addCalendarException(date, date); if (row.getBoolean("WORKING")) { exception.addRange(ProjectCalendarWeek.DEFAULT_WORKING_MORNING); exception.addRange(ProjectCalendarWeek.DEFAULT_WORKING_AFTERNOON); } currentExceptionID = row.getInteger("NEXT_CALENDAR_EXCEPTION_ID"); } }
[ "Read exceptions for a calendar.\n\n@param table calendar exception data\n@param calendar calendar\n@param exceptionID first exception ID" ]
[ "Loads the localization for the current locale from a bundle of type xmlvfsbundle.\nIt assumes, the content has already been unmarshalled before.\n@param locale the locale for which the localization should be loaded", "Generates JUnit 4 RunListener instances for any user defined RunListeners", "Throws one RendererException if the content parent or layoutInflater are null.", "Use this API to fetch a dnsglobal_binding resource .", "Tells it to process the submatrix at the next split. Should be called after the\ncurrent submatrix has been processed.", "This method retrieves a String of the specified type,\nbelonging to the item with the specified unique ID.\n\n@param id unique ID of entity to which this data belongs\n@param type data type identifier\n@return string containing required data", "Invokes the ready tasks.\n\n@param context group level shared context that need be passed to\n{@link TaskGroupEntry#invokeTaskAsync(boolean, InvocationContext)}\nmethod of each entry in the group when it is selected for execution\n\n@return an observable that emits the result of tasks in the order they finishes.", "Loads configuration from InputStream. Later loads have lower priority.\n\n@param in InputStream to load from\n@since 1.2.0", "Dumps a texture coordinate set of a mesh to stdout.\n\n@param mesh the mesh\n@param coords the coordinates" ]
public void setIsSeries(Boolean isSeries) { if (null != isSeries) { final boolean series = isSeries.booleanValue(); if ((null != m_model.getParentSeriesId()) && series) { m_removeSeriesBindingConfirmDialog.show(new Command() { public void execute() { m_model.setParentSeriesId(null); setPattern(PatternType.DAILY.toString()); } }); } else { setPattern(series ? PatternType.DAILY.toString() : PatternType.NONE.toString()); } } }
[ "Toggle between single events and series.\n@param isSeries flag, indicating if we want a series of events." ]
[ "Inserts an array of Parcelable values into the mapping of the underlying Bundle, replacing any\nexisting value for the given key. Either key or value may be null.\n\n@param key a String, or null\n@param value an array of Parcelable objects, or null\n@return this bundler instance to chain method calls", "Suite prologue.", "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", "Destroys all resource requests in requestQueue.\n\n@param requestQueue The queue for which all resource requests are to be\ndestroyed.", "Constraint that ensures that the field has a conversion if the java type requires it. Also checks the conversion class.\n\n@param fieldDef The field descriptor\n@param checkLevel The current check level (this constraint is checked in basic (partly) and strict)\n@exception ConstraintException If the conversion class is invalid", "Converts the results to CSV data.\n\n@return the CSV data", "set ViewPager scroller to change animation duration when sliding", "Sets the bootstrap URLs used by the different Fat clients inside the\nCoordinator\n\n@param bootstrapUrls list of bootstrap URLs defining which cluster to\nconnect to\n@return modified CoordinatorConfig", "Flushes all changes to disk." ]
static ProcessedLayers process(final InstalledConfiguration conf, final List<File> moduleRoots, final List<File> bundleRoots) throws IOException { final ProcessedLayers layers = new ProcessedLayers(conf); // Process module roots final LayerPathSetter moduleSetter = new LayerPathSetter() { @Override public boolean setPath(final LayerPathConfig pending, final File root) { if (pending.modulePath == null) { pending.modulePath = root; return true; } return false; } }; for (final File moduleRoot : moduleRoots) { processRoot(moduleRoot, layers, moduleSetter); } // Process bundle root final LayerPathSetter bundleSetter = new LayerPathSetter() { @Override public boolean setPath(LayerPathConfig pending, File root) { if (pending.bundlePath == null) { pending.bundlePath = root; return true; } return false; } }; for (final File bundleRoot : bundleRoots) { processRoot(bundleRoot, layers, bundleSetter); } // if (conf.getInstalledLayers().size() != layers.getLayers().size()) { // throw processingError("processed layers don't match expected %s, but was %s", conf.getInstalledLayers(), layers.getLayers().keySet()); // } // if (conf.getInstalledAddOns().size() != layers.getAddOns().size()) { // throw processingError("processed add-ons don't match expected %s, but was %s", conf.getInstalledAddOns(), layers.getAddOns().keySet()); // } return layers; }
[ "Process the module and bundle roots and cross check with the installed information.\n\n@param conf the installed configuration\n@param moduleRoots the module roots\n@param bundleRoots the bundle roots\n@return the processed layers\n@throws IOException" ]
[ "Use this API to fetch bridgegroup_vlan_binding resources of given name .", "Set the value for a floating point vector of length 4.\n@param key name of uniform to set.\n@param x new X value\n@param y new Y value\n@param z new Z value\n@param w new W value\n@see #getVec4\n@see #getFloatVec(String)", "validates operation against the definition and sets model for the parameters passed.\n\n@param operationObject model node of type {@link ModelType#OBJECT}, typically representing an operation request\n@param model model node in which the value should be stored\n@throws OperationFailedException if the value is not valid\n\n@deprecated Not used by the WildFly management kernel; will be removed in a future release", "Use this API to delete sslfipskey of given name.", "Checks if class package match provided list of package locators\n\n@param classPackageName\nname of class package\n@return true if class package is on the {@link #packageLocators} list", "Returns the number of consecutive leading one or zero bits.\nIf network is true, returns the number of consecutive leading one bits.\nOtherwise, returns the number of consecutive leading zero bits.\n\n@param network\n@return", "Checks whether the given field definition is used as the primary key of a class referenced by\na reference.\n\n@param modelDef The model\n@param fieldDef The current field descriptor def\n@return The reference that uses the field or <code>null</code> if the field is not used in this way", "Use this API to fetch transformpolicy resource of given name .", "Implement this to do your drawing.\n\n@param canvas the canvas on which the background will be drawn" ]
protected AbstractBeanDeployer<E> deploySpecialized() { // ensure that all decorators are initialized before initializing // the rest of the beans for (DecoratorImpl<?> bean : getEnvironment().getDecorators()) { bean.initialize(getEnvironment()); containerLifecycleEvents.fireProcessBean(getManager(), bean); manager.addDecorator(bean); BootstrapLogger.LOG.foundDecorator(bean); } for (InterceptorImpl<?> bean : getEnvironment().getInterceptors()) { bean.initialize(getEnvironment()); containerLifecycleEvents.fireProcessBean(getManager(), bean); manager.addInterceptor(bean); BootstrapLogger.LOG.foundInterceptor(bean); } return this; }
[ "interceptors, decorators and observers go first" ]
[ "Creates the node mappings.\n\n@param mtasTokenIdFactory\nthe mtas token id factory\n@param level\nthe level\n@param parentLevel\nthe parent level", "Parses an RgbaColor from a hexadecimal, rgb, rgba, hsl, or hsla\nvalue.\n\n@return returns the parsed color", "Show only the given channel.\n@param channels The channels to show", "Write a Byte Order Mark at the beginning of the file\n\n@param stream the FileOutputStream to write the BOM to\n@param bigEndian true if UTF 16 Big Endian or false if Low Endian\n@throws IOException if an IOException occurs.\n@since 1.0", "Executes the supplied cell processors on the last row of CSV that was read and populates the supplied List of\nprocessed columns.\n\n@param processedColumns\nthe List to populate with processed columns\n@param processors\nthe cell processors\n@return the updated List\n@throws NullPointerException\nif processedColumns or processors is null\n@throws SuperCsvConstraintViolationException\nif a CellProcessor constraint failed\n@throws SuperCsvException\nif the wrong number of processors are supplied, or CellProcessor execution failed", "Saves the list of currently displayed favorites.", "Performs a null edit on an entity. This has some effects on Wikibase,\nsuch as refreshing the labels of the referred items in the UI.\n\n@param currentDocument\nthe document to perform a null edit on\n@throws MediaWikiApiErrorException\nif the API returns errors\n@throws IOException\nif there are any IO errors, such as missing network connection", "2-D Gaussian kernel.\n\n@param size Kernel size (should be odd), [3, 101].\n@return Returns 2-D Gaussian kernel of specified size.", "Replace known tags in the current data values with actual values as appropriate\n\n@param cr a reference to DataPipe from which to read the current map" ]
private void writeCalendars(Project project) { // // Create the new MSPDI calendar list // Project.Calendars calendars = m_factory.createProjectCalendars(); project.setCalendars(calendars); List<Project.Calendars.Calendar> calendar = calendars.getCalendar(); // // Process each calendar in turn // for (ProjectCalendar cal : m_projectFile.getCalendars()) { calendar.add(writeCalendar(cal)); } }
[ "This method writes calendar data to an MSPDI file.\n\n@param project Root node of the MSPDI file" ]
[ "Write resource assignment workgroup.\n\n@param record resource assignment workgroup instance\n@throws IOException", "Use this API to fetch policydataset_value_binding resources of given name .", "Get a System property by its name.\n\n@param name the name of the wanted System property.\n@return the System property value - null if it is not defined.", "Use this API to update nsconfig.", "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", "Returns the cost rate table index for this assignment.\n\n@return cost rate table index", "Remove a child view of Android hierarchy view .\n\n@param view View to be removed.", "returns a comparator that allows to sort a Vector of FieldMappingDecriptors\naccording to their m_Order entries.", "Cut all characters from maxLength and replace it with \"...\"" ]
private void readResources(Storepoint phoenixProject) { Resources resources = phoenixProject.getResources(); if (resources != null) { for (net.sf.mpxj.phoenix.schema.Project.Storepoints.Storepoint.Resources.Resource res : resources.getResource()) { Resource resource = readResource(res); readAssignments(resource, res); } } }
[ "This method extracts resource data from a Phoenix file.\n\n@param phoenixProject parent node for resources" ]
[ "LRN cross-channel backward computation. Double parameters cast to tensor data type", "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", "Read predecessors from a Gantt Designer file.\n\n@param gantt Gantt Designer file", "Gets a SerialMessage with the MULTI CHANNEL CAPABILITY GET command.\nGets the capabilities for a specific endpoint.\n@param the number of the endpoint to get the\n@return the serial message.", "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", "Use this API to fetch all the lbsipparameters resources that are configured on netscaler.", "Get prototype name.\n\n@return prototype name", "Return as a string the stereotypes associated with c\nterminated by the escape character term", "Returns the index of the eigenvalue which has the smallest magnitude.\n\n@return index of the smallest magnitude eigen value." ]
public synchronized int getPartitionStoreCount() { int count = 0; for (String store : storeToPartitionIds.keySet()) { count += storeToPartitionIds.get(store).size(); } return count; }
[ "Returns the total count of partitions across all stores.\n\n@return returns the total count of partitions across all stores." ]
[ "Cut the message content to the configured length.\n\n@param event the event", "Log a info message with a throwable.", "Demonstrates how to add an override to an existing path", "Returns the configuration value with the specified name.", "Process the graphical indicator data.", "Creates a remove operation.\n\n@param address the address for the operation\n@param recursive {@code true} if the remove should be recursive, otherwise {@code false}\n\n@return the operation", "Get a list of modules regarding filters\n\n@param filters Map<String,String>\n@return List<Module>\n@throws GrapesCommunicationException", "Create a directory at the given path if it does not exist yet.\n\n@param path\nthe path to the directory\n@throws IOException\nif it was not possible to create a directory at the given\npath", "Given a set of versions, constructs a resolved list of versions based on\nthe compare function above\n\n@param values\n@return list of values after resolution" ]
private void parseValue() { ChannelBuffer content = this.request.getContent(); this.parsedValue = new byte[content.capacity()]; content.readBytes(parsedValue); }
[ "Retrieve the value from the REST request body.\n\nTODO: REST-Server value cannot be null ( null/empty string ?)" ]
[ "Use this API to fetch all the nsacl6 resources that are configured on netscaler.", "If the variable is a local temporary variable it will be resized so that the operation can complete. If not\ntemporary then it will not be reshaped\n@param mat Variable containing the matrix\n@param numRows Desired number of rows\n@param numCols Desired number of columns", "Read the table from the file and populate the supplied Table instance.\n\n@param file database file\n@param table Table instance", "If the column name is a dotted column, returns the first part.\nReturns null otherwise.\n\n@param column the column that might have a prefix\n@return the first part of the prefix of the column or {@code null} if the column does not have a prefix.", "Set cached value for the attribute. Used for dynamically loaded values in the Acacia content editor.\n\n@param attribute the attribute for which the value should be cached\n@param value the value to cache", "Use this API to fetch sslpolicylabel resource of given name .", "Write a set of fields from a field container to a JSON file.\n@param objectName name of the object, or null if no name required\n@param container field container\n@param fields fields to write", "Packages of the specified classes will be scanned and found classes will be added to the set of bean classes for the synthetic bean archive.\n\n@param scanRecursively\n@param packageClasses\n@return self", "Extracts the zip file to the output folder\n\n@param zipFile ZIP File to extract\n@param outputFolder Output Folder\n@return A Collection with the extracted files\n@throws IOException I/O Error" ]
private void processTask(ChildTaskContainer parent, MapRow row) throws IOException { Task task = parent.addTask(); task.setName(row.getString("NAME")); task.setGUID(row.getUUID("UUID")); task.setText(1, row.getString("ID")); task.setDuration(row.getDuration("PLANNED_DURATION")); task.setRemainingDuration(row.getDuration("REMAINING_DURATION")); task.setHyperlink(row.getString("URL")); task.setPercentageComplete(row.getDouble("PERCENT_COMPLETE")); task.setNotes(getNotes(row.getRows("COMMENTARY"))); task.setMilestone(task.getDuration().getDuration() == 0); ProjectCalendar calendar = m_calendarMap.get(row.getUUID("CALENDAR_UUID")); if (calendar != m_project.getDefaultCalendar()) { task.setCalendar(calendar); } switch (row.getInteger("STATUS").intValue()) { case 1: // Planned { task.setStart(row.getDate("PLANNED_START")); task.setFinish(task.getEffectiveCalendar().getDate(task.getStart(), task.getDuration(), false)); break; } case 2: // Started { task.setActualStart(row.getDate("ACTUAL_START")); task.setStart(task.getActualStart()); task.setFinish(row.getDate("ESTIMATED_FINISH")); if (task.getFinish() == null) { task.setFinish(row.getDate("PLANNED_FINISH")); } break; } case 3: // Finished { task.setActualStart(row.getDate("ACTUAL_START")); task.setActualFinish(row.getDate("ACTUAL_FINISH")); task.setPercentageComplete(Double.valueOf(100.0)); task.setStart(task.getActualStart()); task.setFinish(task.getActualFinish()); break; } } setConstraints(task, row); processChildTasks(task, row); m_taskMap.put(task.getGUID(), task); List<MapRow> predecessors = row.getRows("PREDECESSORS"); if (predecessors != null && !predecessors.isEmpty()) { m_predecessorMap.put(task, predecessors); } List<MapRow> resourceAssignmnets = row.getRows("RESOURCE_ASSIGNMENTS"); if (resourceAssignmnets != null && !resourceAssignmnets.isEmpty()) { processResourceAssignments(task, resourceAssignmnets); } }
[ "Extract data for a single task.\n\n@param parent task parent\n@param row Synchro task data" ]
[ "Populate a task from a Row instance.\n\n@param row Row instance\n@param task Task instance", "Create a model controller client which is exclusively receiving messages on an existing channel.\n\n@param channel the channel\n@param executorService an executor\n@return the created client", "Parse a version String and add the components to a properties object.\n\n@param version the version to parse", "Get a list of modules regarding filters\n\n@param filters Map<String,String>\n@return List<Module>\n@throws GrapesCommunicationException", "Returns a flag indicating if also unreleased resources should be found.\n@return A flag indicating if also unreleased resources should be found.", "Set a Java class to ignore when printing stack traces\n@param classToIgnoreInTraces The class to ignore.\n@return this", "Returns a OkHttpClient that ignores SSL cert errors\n@return", "Counts a single page of the specified gender. If this is the first page\nof that gender on this site, a suitable key is added to the list of the\nsite's genders.\n\n@param gender\nthe gender to count\n@param siteRecord\nthe site record to count it for", "So we will follow rfc 1035 and in addition allow the underscore." ]
public static String ellipsize(String text, int maxLength, String end) { if (text != null && text.length() > maxLength) { return text.substring(0, maxLength - end.length()) + end; } return text; }
[ "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." ]
[ "Use this API to fetch the statistics of all appfwpolicylabel_stats resources that are configured on netscaler.", "Output the SQL type for a Java String.", "Returns the header with the specified name from the supplied map. The\nheader lookup is case-insensitive.\n\n@param headers A <code>Map</code> containing the HTTP request headers.\n@param name The name of the header to return.\n@return The value of specified header, or a comma-separated list if there\nwere multiple headers of that name.", "Add a point to this curveFromInterpolationPoints. The method will throw an exception if the point\nis already part of the curveFromInterpolationPoints.\n\n@param time The x<sub>i</sub> in <sub>i</sub> = f(x<sub>i</sub>).\n@param value The y<sub>i</sub> in <sub>i</sub> = f(x<sub>i</sub>).\n@param isParameter If true, then this point is served via {@link #getParameter()} and changed via {@link #getCloneForParameter(RandomVariable[])}, i.e., it can be calibrated.", "Get a property as a int or null.\n\n@param key the property name", "Stop interpolating playback position for all active players.", "Executes all event manipulating handler and writes the event with persist\nhandler.\n\n@param events the events", "Walk project references recursively, building up a list of thrift files they provide, starting\nwith an empty file list.", "Update max.\n\n@param n the n\n@param c the c" ]
private void addSingleUnique(StringBuilder sb, FieldType fieldType, List<String> additionalArgs, List<String> statementsAfter) { StringBuilder alterSb = new StringBuilder(); alterSb.append(" UNIQUE ("); appendEscapedEntityName(alterSb, fieldType.getColumnName()); alterSb.append(')'); additionalArgs.add(alterSb.toString()); }
[ "Add SQL to handle a unique=true field. THis is not for uniqueCombo=true." ]
[ "Creates the node mappings.\n\n@param mtasTokenIdFactory\nthe mtas token id factory\n@param level\nthe level\n@param parentLevel\nthe parent level", "Use this API to fetch statistics of nsacl6_stats resource of given name .", "Triggers expansion of the parent.", "Tells you if the given ASTNode is a VariableExpression with the given name.\n@param expression\nany AST Node\n@param pattern\na string pattern to match\n@return\ntrue if the node is a variable with the specified name", "note, this just logs an error and doesn't throw as its only used to remove old configuration files, and shouldn't stop boot", "add a join between two aliases\n\nTODO BRJ : This needs refactoring, it looks kind of weird\n\nno extents\nA1 -> A2\n\nextents on the right\nA1 -> A2\nA1 -> A2E0\n\nextents on the left : copy alias on right, extents point to copies\nA1 -> A2\nA1E0 -> A2C0\n\nextents on the left and right\nA1 -> A2\nA1 -> A2E0\nA1E0 -> A2C0\nA1E0 -> A2E0C0\n\n@param left\n@param leftKeys\n@param right\n@param rightKeys\n@param outer\n@param name", "Discards any tracks from the hot cache that were loaded from a now-unmounted media slot, because they are no\nlonger valid.", "Creates the HikariCP configuration based on the configuration of a pool defined in opencms.properties.\n\n@param config the configuration object with the properties\n@param key the pool name (without the opencms prefix)\n\n@return the HikariCP configuration for the pool", "Returns the Java executable command.\n\n@param javaHome the java home directory or {@code null} to use the default\n\n@return the java command to use" ]
public boolean overrides(Link other) { if (other.getStatus() == LinkStatus.ASSERTED && status != LinkStatus.ASSERTED) return false; else if (status == LinkStatus.ASSERTED && other.getStatus() != LinkStatus.ASSERTED) return true; // the two links are from equivalent sources of information, so we // believe the most recent return timestamp > other.getTimestamp(); }
[ "Returns true if the information in this link should take\nprecedence over the information in the other link." ]
[ "Undeletes the selected files\n\n@return the ids of the modified resources\n\n@throws CmsException if something goes wrong", "List of releases for an app.\n@param appName App name. See {@link #listApps} for a list of apps that can be used.\n@return a list of releases", "Returns whether this is a valid address string format.\n\nThe accepted IP address formats are:\nan IPv4 address, an IPv6 address, a network prefix alone, the address representing all addresses of all types, or an empty string.\nIf this method returns false, and you want more details, call validate() and examine the thrown exception.\n\n@return whether this is a valid address string format", "Use this API to fetch nssimpleacl resource of given name .", "invoked from the jelly file\n\n@throws Exception Any exception", "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", "changes an existing property with the same name, or adds a new one\n@param key property name with which the specified value is to be\nassociated\n@param value value to be associated with the specified property name\n@return the previous value associated with property name, or null if\nthere was no mapping for property name. (A null return can also\nindicate that the map previously associated null with key.)", "Compares the two comma-separated lists.\n\n@param list1 The first list\n@param list2 The second list\n@return <code>true</code> if the lists are equal", "Label accessor provided for JSON serialization only." ]
protected void writeRow(final String... columns) throws IOException { if( columns == null ) { throw new NullPointerException(String.format("columns to write should not be null on line %d", lineNumber)); } else if( columns.length == 0 ) { throw new IllegalArgumentException(String.format("columns to write should not be empty on line %d", lineNumber)); } StringBuilder builder = new StringBuilder(); for( int i = 0; i < columns.length; i++ ) { columnNumber = i + 1; // column no used by CsvEncoder if( i > 0 ) { builder.append((char) preference.getDelimiterChar()); // delimiter } final String csvElement = columns[i]; if( csvElement != null ) { final CsvContext context = new CsvContext(lineNumber, rowNumber, columnNumber); final String escapedCsv = encoder.encode(csvElement, context, preference); builder.append(escapedCsv); lineNumber = context.getLineNumber(); // line number can increment when encoding multi-line columns } } builder.append(preference.getEndOfLineSymbols()); // EOL writer.write(builder.toString()); }
[ "Writes one or more String columns as a line to the CsvWriter.\n\n@param columns\nthe columns to write\n@throws IllegalArgumentException\nif columns.length == 0\n@throws IOException\nIf an I/O error occurs\n@throws NullPointerException\nif columns is null" ]
[ "Feeds input stream to data consumer using metadata from tar entry.\n@param consumer the consumer\n@param inputStream the stream to feed\n@param entry the entry to use for metadata\n@throws IOException on consume error", "Calculate start dates for a monthly absolute recurrence.\n\n@param calendar current date\n@param frequency frequency\n@param dates array of start dates", "Adds a new floating point variable. If one already has the same name it is written over.\n@param value Value of the number\n@param name Name in code", "Use this API to delete dnstxtrec.", "Searches for a declared method with a given name. If the class declares multiple methods with the given name,\nthere is no guarantee as of which methods is returned. Null is returned if the class does not declare a method\nwith the given name.\n@param clazz the given class\n@param methodName the given method name\n@return method method with the given name declared by the given class or null if no such method exists", "Use this API to fetch all the appqoepolicy resources that are configured on netscaler.", "Re-Tag the websocket connection hold by this context with label specified.\nThis method will remove all previous tags on the websocket connection and then\ntag it with the new label.\n@param label the label.\n@return this websocket conext.", "Write a map field to the JSON file.\n\n@param fieldName field name\n@param value field value", "Sets the node meta data but allows overwriting values.\n\n@param key - the meta data key\n@param value - the meta data value\n@return the old node meta data value for this key\n@throws GroovyBugError if key is null" ]
public static void closeWindow(Component component) { Window window = getWindow(component); if (window != null) { window.close(); } }
[ "Closes the window containing the given component.\n\n@param component a component" ]
[ "There is a race condition that is not handled properly by the DialogFragment class.\nIf we don't check that this onDismiss callback isn't for the old progress dialog from before\nthe device orientation change, then this will cause the newly created dialog after the\norientation change to be dismissed immediately.", "Creates a replica of the node with the new partitions list\n\n@param node The node whose replica we are creating\n@param partitionsList The new partitions list\n@return Replica of node with new partitions list", "Retrieve the routing type value from the REST request.\n\"X_VOLD_ROUTING_TYPE_CODE\" is the routing type header.\n\nBy default, the routing code is set to NORMAL\n\nTODO REST-Server 1. Change the header name to a better name. 2. Assumes\nthat integer is passed in the header", "Returns the value of the identified field as a Date.\nTime fields returned from an FQL query are expressed in terms of seconds since midnight, January 1, 1970 UTC.\n@param fieldName the name of the field\n@return the value of the field as a Date\n@throws FqlException if the field's value cannot be expressed as a long value from which a Date object can be constructed.", "Gets the visibility modifiers for the property as defined by the getter and setter methods.\n\n@return the visibility modifer of the getter, the setter, or both depending on which exist", "Use this API to fetch ipset_nsip6_binding resources of given name .", "Makes this pose the inverse of the input pose.\n@param src pose to invert.", "Transfer the data from the inputStream to the outputStream. Then close both streams.", "Fill the attributes in the processor.\n\n@param processors The processors\n@param initialAttributes The attributes\n@see RequireAttributes\n@see ProvideAttributes" ]
public void removeJobType(final Class<?> jobType) { if (jobType == null) { throw new IllegalArgumentException("jobType must not be null"); } this.jobTypes.values().remove(jobType); }
[ "Disallow the job type from being executed.\n@param jobType the job type to disallow" ]
[ "Use this API to fetch all the appfwjsoncontenttype resources that are configured on netscaler.", "Draw a rectangle's interior with this color.\n\n@param rect rectangle\n@param color colour", "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.", "Constructs and sets the layout parameters to have some gravity.\n\n@param gravity the gravity of the Crouton\n@return <code>this</code>, for chaining.\n@see android.view.Gravity", "Registers the resource to the parent deployment resource. The model returned is that of the resource parameter.\n\n@param subsystemName the subsystem name\n@param resource the resource to be used for the subsystem on the deployment\n\n@return the model\n\n@throws java.lang.IllegalStateException if the subsystem resource already exists", "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", "Destroys all resource requests in requestQueue.\n\n@param requestQueue The queue for which all resource requests are to be\ndestroyed.", "This method only overrides properties that are specific from Cube like await strategy or before stop events.\n\n@param overrideDockerCompositions\nthat contains information to override.", "Sets current state\n@param state new state" ]
public OperationTransformerEntry resolveOperationTransformer(final PathAddress address, final String operationName, PlaceholderResolver placeholderResolver) { final Iterator<PathElement> iterator = address.iterator(); final OperationTransformerEntry entry = resolveOperationTransformer(iterator, operationName, placeholderResolver); if(entry != null) { return entry; } // Default is forward unchanged return FORWARD; }
[ "Resolve an operation transformer entry.\n\n@param address the address\n@param operationName the operation name\n@param placeholderResolver a placeholder resolver used to resolve children of a placeholder registration\n@return the transformer entry" ]
[ "Pump events from event stream.", "Pause between cluster change in metadata and starting server rebalancing\nwork.", "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.", "Get all Groups\n\n@return\n@throws Exception", "Retrieves a long value from the extended data.\n\n@param type Type identifier\n@return long value", "Get the VCS revision from the Jenkins build environment. The search will one of \"SVN_REVISION\", \"GIT_COMMIT\",\n\"P4_CHANGELIST\" in the environment.\n\n@param env Th Jenkins build environment.\n@return The vcs revision for supported VCS", "Creates a statement with parameters that should work with most RDBMS.", "The service name to be removed. Can be overridden for unusual service naming patterns\n@param name The name of the resource being removed\n@return The service name to remove. May return {@code null} if only removal based on {@code unavailableCapabilities}\npassed to the constructor are to be performed", "Convert the Values using the FieldConversion.sqlToJava\n@param fcs\n@param values" ]
public void logout() { String userIdentifier = session.get(config().sessionKeyUsername()); SessionManager sessionManager = app().sessionManager(); sessionManager.logout(session); if (S.notBlank(userIdentifier)) { app().eventBus().trigger(new LogoutEvent(userIdentifier)); } }
[ "Logout the current session. After calling this method,\nthe session will be cleared" ]
[ "Retrieve a map of custom document properties.\n\n@return the Document Summary Information Map", "Filter for public tweets on these languages.\n\n@param languages\nValid BCP 47 (http://tools.ietf.org/html/bcp47) language identifiers,\nand may represent any of the languages listed on Twitter's advanced search page\n(https://twitter.com/search-advanced), or \"und\" if no language could be detected.\nThese strings should NOT be url-encoded.\n@return this", "Update a feature object in the Hibernate session.\n\n@param feature feature object\n@throws LayerException oops", "Get the next available ordinal for a method ID\n\n@param methodId ID of method\n@return value of next ordinal\n@throws Exception exception", "Get an image as a stream. Callers must be sure to close the stream when they are done with it.\n\n@deprecated\n@see PhotosInterface#getImageAsStream(Photo, int)\n@param suffix\nThe suffix\n@return The InputStream\n@throws IOException", "Use this API to add responderpolicy.", "Re-initializes the shader texture used to fill in\nthe Circle upon drawing.", "Extract the generic type from the given Class object.\n@param clazz the Class to check\n@param source the expected raw source type (can be {@code null})\n@param typeIndex the index of the actual type argument\n@param nestingLevel the nesting level of the target type\n@param currentLevel the current nested level\n@return the generic type as Class, or {@code null} if none", "Queries the running container and attempts to lookup the information from the running container.\n\n@param client the client used to execute the management operation\n\n@return the container description\n\n@throws IOException if an error occurs while executing the management operation\n@throws OperationExecutionException if the operation used to query the container fails" ]
public void init(final MultivaluedMap<String, String> queryParameters) { final String scopeCompileParam = queryParameters.getFirst(ServerAPI.SCOPE_COMPILE_PARAM); if(scopeCompileParam != null){ this.scopeComp = Boolean.valueOf(scopeCompileParam); } final String scopeProvidedParam = queryParameters.getFirst(ServerAPI.SCOPE_PROVIDED_PARAM); if(scopeProvidedParam != null){ this.scopePro = Boolean.valueOf(scopeProvidedParam); } final String scopeRuntimeParam = queryParameters.getFirst(ServerAPI.SCOPE_RUNTIME_PARAM); if(scopeRuntimeParam != null){ this.scopeRun = Boolean.valueOf(scopeRuntimeParam); } final String scopeTestParam = queryParameters.getFirst(ServerAPI.SCOPE_TEST_PARAM); if(scopeTestParam != null){ this.scopeTest = Boolean.valueOf(scopeTestParam); } }
[ "The parameter must never be null\n\n@param queryParameters" ]
[ "Return all tenors for which data exists.\n\n@return The tenors in months.", "Sets a new value for a given key. an older value is overwritten.\n@param key a non null key\n@param value the new value", "Use this API to add nsacl6.", "Returns the base URL of the print servlet.\n\n@param httpServletRequest the request", "Get the last date to keep logs from, by a given current date.\n@param currentDate the date of today\n@return the last date to keep log files from.", "Returns the export format indicated in the result-type parameter \"layoutManager\"\n@param _invocation\n@return", "Calculates directory size as total size of all its files, recursively.\n\n@param self a file object\n@return directory size (length)\n@since 2.1\n\n@throws IOException if File object specified does not exist\n@throws IllegalArgumentException if the provided File object does not represent a directory", "Returns the path in the RFS where the Solr spellcheck files reside.\n@return String representation of Solrs spellcheck RFS path.", "Writes a WBS entity to the PM XML file.\n\n@param mpxj MPXJ Task entity" ]
@Override protected void reset() { super.reset(); mapClassesToNamedBoundProviders.clear(); mapClassesToUnNamedBoundProviders.clear(); hasTestModules = false; installBindingForScope(); }
[ "Resets the state of the scope.\nUseful for automation testing when we want to reset the scope used to install test modules." ]
[ "Validates the type", "Removes empty space when \"fitToContent\" is true and real height of object is\ntaller than current bands height, otherwise, it is not modified\n\n@param band\n@param currHeigth\n@param fitToContent", "if |a11-a22| >> |a12+a21| there might be a better way. see pg371", "Callback for constant meta class update change", "Return the area polygon as the only feature in the feature collection.\n\n@param mapAttributes the attributes that this aoi is part of.", "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.", "Retrieve from the parent pom the path to the modules of the project", "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.", "Standard doclet entry point\n@param root\n@return" ]
public Number getMinutesPerMonth() { return Integer.valueOf(NumberHelper.getInt(getMinutesPerDay()) * NumberHelper.getInt(getDaysPerMonth())); }
[ "Retrieve the default number of minutes per month.\n\n@return minutes per month" ]
[ "This method extracts data for a single calendar from a Planner file.\n\n@param plannerCalendar Calendar data\n@param parentMpxjCalendar parent of derived calendar", "Use this API to fetch all the locationfile resources that are configured on netscaler.", "Implements getAll by delegating to get.", "set the textColor of the ColorHolder to a view\n\n@param view", "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", "Get an Iterator based on the ReportQuery\n\n@param query\n@return Iterator", "Set the refresh frequency of this scene object.\nUse NONE for improved performance when the text is set initially and never\nchanged.\n\n@param frequency\nThe refresh frequency of this TextViewSceneObject.", "Generate debug dump of the tree from the scene object.\nIt should include a newline character at the end.\n\n@param sb the {@code StringBuffer} to dump the object.\n@param indent indentation level as number of spaces.", "Creates a ServiceCall from a paging operation that returns a header response.\n\n@param first the observable to the first page\n@param next the observable to poll subsequent pages\n@param callback the client-side callback\n@param <E> the element type\n@param <V> the header object type\n@return the future based ServiceCall" ]
private boolean computeUWV() { bidiag.getDiagonal(diag,off); qralg.setMatrix(numRowsT,numColsT,diag,off); // long pointA = System.currentTimeMillis(); // compute U and V matrices if( computeU ) Ut = bidiag.getU(Ut,true,compact); if( computeV ) Vt = bidiag.getV(Vt,true,compact); qralg.setFastValues(false); if( computeU ) qralg.setUt(Ut); else qralg.setUt(null); if( computeV ) qralg.setVt(Vt); else qralg.setVt(null); // long pointB = System.currentTimeMillis(); boolean ret = !qralg.process(); // long pointC = System.currentTimeMillis(); // System.out.println(" compute UV "+(pointB-pointA)+" QR = "+(pointC-pointB)); return ret; }
[ "Compute singular values and U and V at the same time" ]
[ "Creates a real valued diagonal matrix of the specified type", "Use this API to fetch onlinkipv6prefix resource of given name .", "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.", "changes an existing property with the same name, or adds a new one\n@param key property name with which the specified value is to be\nassociated\n@param value value to be associated with the specified property name\n@return the previous value associated with property name, or null if\nthere was no mapping for property name. (A null return can also\nindicate that the map previously associated null with key.)", "Retrieves the amount of time represented by a calendar exception\nbefore or after an intersection point.\n\n@param exception calendar exception\n@param date intersection time\n@param after true to report time after intersection, false to report time before\n@return length of time in milliseconds", "Use this API to change sslcertkey.", "Rehashes the contents of the receiver into a new table\nwith a smaller or larger capacity.\nThis method is called automatically when the\nnumber of keys in the receiver exceeds the high water mark or falls below the low water mark.", "Print a date.\n\n@param value Date instance\n@return string representation of a date", "add converter at given index. The index can be changed during conversion\nif canReorder is true\n\n@param index\n@param converter" ]
public void handle(HttpRequest request, HttpResponder responder) { if (urlRewriter != null) { try { request.setUri(URI.create(request.uri()).normalize().toString()); if (!urlRewriter.rewrite(request, responder)) { return; } } catch (Throwable t) { responder.sendString(HttpResponseStatus.INTERNAL_SERVER_ERROR, String.format("Caught exception processing request. Reason: %s", t.getMessage())); LOG.error("Exception thrown during rewriting of uri {}", request.uri(), t); return; } } try { String path = URI.create(request.uri()).normalize().getPath(); List<PatternPathRouterWithGroups.RoutableDestination<HttpResourceModel>> routableDestinations = patternRouter.getDestinations(path); PatternPathRouterWithGroups.RoutableDestination<HttpResourceModel> matchedDestination = getMatchedDestination(routableDestinations, request.method(), path); if (matchedDestination != null) { //Found a httpresource route to it. HttpResourceModel httpResourceModel = matchedDestination.getDestination(); // Call preCall method of handler hooks. boolean terminated = false; HandlerInfo info = new HandlerInfo(httpResourceModel.getMethod().getDeclaringClass().getName(), httpResourceModel.getMethod().getName()); for (HandlerHook hook : handlerHooks) { if (!hook.preCall(request, responder, info)) { // Terminate further request processing if preCall returns false. terminated = true; break; } } // Call httpresource method if (!terminated) { // Wrap responder to make post hook calls. responder = new WrappedHttpResponder(responder, handlerHooks, request, info); if (httpResourceModel.handle(request, responder, matchedDestination.getGroupNameValues()).isStreaming()) { responder.sendString(HttpResponseStatus.METHOD_NOT_ALLOWED, String.format("Body Consumer not supported for internalHttpResponder: %s", request.uri())); } } } else if (routableDestinations.size() > 0) { //Found a matching resource but could not find the right HttpMethod so return 405 responder.sendString(HttpResponseStatus.METHOD_NOT_ALLOWED, String.format("Problem accessing: %s. Reason: Method Not Allowed", request.uri())); } else { responder.sendString(HttpResponseStatus.NOT_FOUND, String.format("Problem accessing: %s. Reason: Not Found", request.uri())); } } catch (Throwable t) { responder.sendString(HttpResponseStatus.INTERNAL_SERVER_ERROR, String.format("Caught exception processing request. Reason: %s", t.getMessage())); LOG.error("Exception thrown during request processing for uri {}", request.uri(), t); } }
[ "Call the appropriate handler for handling the httprequest. 404 if path is not found. 405 if path is found but\nhttpMethod does not match what's configured.\n\n@param request instance of {@code HttpRequest}\n@param responder instance of {@code HttpResponder} to handle the request." ]
[ "Convert a string value into the appropriate Java field value.", "Use this API to fetch rewritepolicy_csvserver_binding resources of given name .", "Prints some basic documentation about this program.", "When an alias for a field is added, index it here to allow lookup by alias and type.\n\n@param type field type\n@param alias field alias", "Detach the component of the specified type from this scene object.\n\nEach scene object has a list of components. Only one component\nof a particular type can be attached. Components are detached based on their type.\n\n@return GVRComponent detached or null if component not found\n@param type type of component to detach\n@see GVRSceneObject#attachComponent(GVRComponent)", "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>.", "Given a resource field name, this method returns the resource field number.\n\n@param field resource field name\n@return resource field number", "Init the bundle type member variable.\n@return the bundle type of the opened resource.", "Calculate delta with another vector\n@param v another vector\n@return delta vector" ]
public static Map<String, List<String>> getPartitionsForTopics(ZkClient zkClient, Collection<String> topics) { Map<String, List<String>> ret = new HashMap<String, List<String>>(); for (String topic : topics) { List<String> partList = new ArrayList<String>(); List<String> brokers = getChildrenParentMayNotExist(zkClient, BrokerTopicsPath + "/" + topic); if (brokers != null) { for (String broker : brokers) { final String parts = readData(zkClient, BrokerTopicsPath + "/" + topic + "/" + broker); int nParts = Integer.parseInt(parts); for (int i = 0; i < nParts; i++) { partList.add(broker + "-" + i); } } } Collections.sort(partList); ret.put(topic, partList); } return ret; }
[ "read broker info for watching topics\n\n@param zkClient the zookeeper client\n@param topics topic names\n@return topic-&gt;(brokerid-0,brokerid-1...brokerid2-0,brokerid2-1...)" ]
[ "Performs a matrix inversion operations that takes advantage of the special\nproperties of a covariance matrix.\n\n@param cov A covariance matrix. Not modified.\n@param cov_inv The inverse of cov. Modified.\n@return true if it could invert the matrix false if it could not.", "Find the channel in the animation that animates the named bone.\n@param boneName name of bone to animate.", "Returns a CmsSolrQuery representation of this class.\n@param cms the openCms object.\n@return CmsSolrQuery representation of this class.", "Uses an IdentityMap to make sure we don't recurse infinitely on the same object in a cyclic object model.\nProxies\n@param obj\n@return", "Parse an extended attribute date value.\n\n@param value string representation\n@return date value", "Process a graphical indicator definition for a known type.\n\n@param type field type", "Sets the initial pivot ordering and compute the F-norm squared for each column", "Opens a new FileOutputStream for a file of the given name in the given\nresult directory. Any file of this name that exists already will be\nreplaced. The caller is responsible for eventually closing the stream.\n\n@param resultDirectory\nthe path to the result directory\n@param filename\nthe name of the file to write to\n@return FileOutputStream for the file\n@throws IOException\nif the file or example output directory could not be created", "Computes the p=1 norm. If A is a matrix then the induced norm is computed.\n\n@param A Matrix or vector.\n@return The norm." ]
private static JSONArray parseDockers(ArrayList<Point> dockers) throws JSONException { if (dockers != null) { JSONArray dockersArray = new JSONArray(); for (Point docker : dockers) { JSONObject dockerObject = new JSONObject(); dockerObject.put("x", docker.getX().doubleValue()); dockerObject.put("y", docker.getY().doubleValue()); dockersArray.put(dockerObject); } return dockersArray; } return new JSONArray(); }
[ "Delivers the correct JSON Object for the dockers\n\n@param dockers\n@throws org.json.JSONException" ]
[ "Write the provided chunk at the offset specified in the token. If finalChunk is set, the file\nwill be closed.", "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", "Returns the coordinates of the vertex points of this hull.\n\n@param coords\nreturns the x, y, z coordinates of each vertex. This length of\nthis array must be at least three times the number of\nvertices.\n@return the number of vertices\n@see QuickHull3D#getVertices()\n@see QuickHull3D#getFaces()", "Returns the field with the specified value properly formatted. Multiline\nvalues are automatically indented, and dots are added on the empty lines.\n\n<pre>\nField-Name: value\n</pre>", "Print a day.\n\n@param day Day instance\n@return day value", "Adds a new child widget to the panel, attaching its Element to the\nspecified container Element.\n\n@param child the child widget to be added\n@param container the element within which the child will be contained", "Calculate conversion map.\n\n@param inRange Input range.\n@param outRange Output range.\n@param map Conversion map.", "Read all top level tasks.", "Only call async" ]
void checkRmModelConformance() { final AmVisitor<AmObject, AmConstraintContext> visitor = AmVisitors.preorder(new ConformanceVisitor()); ArchetypeWalker.walkConstraints(visitor, archetype, new AmConstraintContext()); }
[ "Check if information model entity referenced by archetype\nhas right name or type" ]
[ "Use this API to add gslbservice.", "This method changes the value of an agent's belief through its external\naccess\n\n@param agent_name\nThe name of the agent to change a belief\n@param belief_name\nThe name of the belief to change\n@param new_value\nThe new value of the belief to be changed\n@param connector\nThe connector to get the external access", "Convert this lattice to store data in the given convention.\nConversion involving receiver premium assumes zero wide collar.\n\n@param targetConvention The convention to store the data in.\n@param displacement The displacement to use, if applicable.\n@param model The model for context.\n\n@return The converted lattice.", "Runs a Story with the given configuration and steps, applying the given\nmeta filter.\n\n@param configuration the Configuration used to run story\n@param candidateSteps the List of CandidateSteps containing the candidate\nsteps methods\n@param story the Story to run\n@param filter the Filter to apply to the story Meta\n@throws Throwable if failures occurred and FailureStrategy dictates it to\nbe re-thrown.", "Utils for making collections out of arrays of primitive types.", "If provided with an AVRO schema, validates it and checks if there are\nbackwards compatible.\n\nTODO should probably place some similar checks for other serializer types\nas well?\n\n@param serializerDef", "Starts the enforcer.", "Return the coding scheme to IOB1 coding, regardless of what was used\ninternally. This is useful for scoring against CoNLL test output.\n\n@param tokens List of tokens in some NER encoding", "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" ]
private byte[] getData(List<byte[]> blocks, int length) { byte[] result; if (blocks.isEmpty() == false) { if (length < 4) { length = 4; } result = new byte[length]; int offset = 0; byte[] data; while (offset < length) { data = blocks.remove(0); System.arraycopy(data, 0, result, offset, data.length); offset += data.length; } } else { result = null; } return (result); }
[ "Internal method used to retrieve a byte array from one\nor more embedded data blocks. Consecutive data blocks may\nneed to be concatenated by this method in order to retrieve\nthe complete set of data.\n\n@param blocks list of data blocks\n@param length expected length of the data\n@return byte array" ]
[ "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>", "Copy the contents of this buffer begginning from the srcOffset to a destination byte array\n@param srcOffset\n@param destArray\n@param destOffset\n@param size", "Returns a TypeConverter for a given class.\n\n@param cls The class for which the TypeConverter should be fetched.", "Sets the left padding character for all cells in the table.\n@param paddingLeftChar new padding character, ignored if null\n@return this to allow chaining", "Use this API to fetch cachepolicylabel_binding resource of given name .", "Only call async", "Reconnect the context if the RedirectException is valid.", "Sets the body of this request to a given JSON string.\n@param body the JSON string to use as the body.", "Returns the AirMapView implementation as requested by the mapType argument. Use this method if\nyou need to request a specific AirMapView implementation that is not necessarily the preferred\ntype. For example, you can use it to explicit request a web-based map implementation.\n\n@param mapType Map type for the requested AirMapView implementation.\n@return An {@link AirMapViewBuilder} for the requested {@link AirMapViewTypes} mapType." ]
public void onCreate(T content, LayoutInflater layoutInflater, ViewGroup parent) { this.content = content; this.rootView = inflate(layoutInflater, parent); if (rootView == null) { throw new NotInflateViewException( "Renderer instances have to return a not null view in inflateView method"); } this.rootView.setTag(this); setUpView(rootView); hookListeners(rootView); }
[ "Method called when the renderer is going to be created. This method has the responsibility of\ninflate the xml layout using the layoutInflater and the parent ViewGroup, set itself to the\ntag and call setUpView and hookListeners methods.\n\n@param content to render. If you are using Renderers with RecyclerView widget the content will\nbe null in this method.\n@param layoutInflater used to inflate the view.\n@param parent used to inflate the view." ]
[ "Specify the string and the int identifying which word shaper to\nuse and this returns the result of using that wordshaper on the String.\n\n@param inStr String to calculate word shape of\n@param wordShaper Constant for which shaping formula to use\n@param knownLCWords A Collection of known lowercase words, which some shapers use\nto decide the class of capitalized words.\n<i>Note: while this code works with any Collection, you should\nprovide a Set for decent performance.</i> If this parameter is\nnull or empty, then this option is not used (capitalized words\nare treated the same, regardless of whether the lowercased\nversion of the String has been seen).\n@return The wordshape String", "Return a copy of the zoom level scale denominators. Scales are sorted greatest to least.", "Reads a file and returns the result in a String\n\n@param file File\n@return String\n@throws IOException", "Delete rows that match the prepared statement.", "Returns the value of the identified field as an Integer.\n@param fieldName the name of the field\n@return the value of the field as an Integer\n@throws FqlException if the field cannot be expressed as an Integer", "Builds the task hierarchy.\n\nNote that there are two distinct levels of organisation going on here. The first is the\nAsta \"summary\" organisation, where the user organises bars into summary groups. We are using this\nto create our hierarchy of tasks.\n\nThe second level displayed within a summary group (or at the project level if the user has not\ncreated summary groups) is the WBS. At the moment we are not including the WBS in the hierarchy.\n\n@param bars bar data\n@param expandedTasks expanded task data\n@param tasks task data\n@param milestones milestone data\n@return list containing the top level tasks", "Process this deployment for annotations. This will use an annotation indexer to create an index of all annotations\nfound in this deployment and attach it to the deployment unit context.\n\n@param phaseContext the deployment unit context\n@throws DeploymentUnitProcessingException", "Gets the crouton's layout parameters, constructing a default if necessary.\n\n@return the layout parameters", "Retrieves the calendar used for this resource assignment.\n\n@return ProjectCalendar instance" ]
private void writeTimeUnitsField(String fieldName, Object value) throws IOException { TimeUnit val = (TimeUnit) value; if (val != m_projectFile.getProjectProperties().getDefaultDurationUnits()) { m_writer.writeNameValuePair(fieldName, val.toString()); } }
[ "Write a time units field to the JSON file.\n\n@param fieldName field name\n@param value field value" ]
[ "get all consumers for the group\n\n@param zkClient the zookeeper client\n@param group the group name\n@return topic-&gt;(consumerIdStringA-0,consumerIdStringA-1...consumerIdStringB-0,consumerIdStringB-1)", "Add a '&lt;' clause so the column must be less-than the value.", "Returns a new color that has the alpha adjusted by the\nspecified amount.", "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.", "Load the given class using the default constructor\n\n@param className The name of the class\n@return The class object", "This method takes the value of an agent's belief through its external\naccess\n\n@param agent_name\nThe name of the agent\n@param belief_name\nThe name of the belief inside agent's adf\n@param connector\nThe connector to get the external access\n@return belief_value The value of the requested belief", "Handle a value change.\n@param propertyId the column in which the value has changed.", "Use this API to unset the properties of ntpserver resource.\nProperties that need to be unset are specified in args array.", "Calculates the maximum text height which is possible based on the used Paint and its settings.\n\n@param _Paint Paint object which will be used to display a text.\n@param _Text The text which should be measured. If null, a default text is chosen, which\nhas a maximum possible height\n@return Maximum text height in px." ]
public MtasCQLParserSentenceCondition createFullSentence() throws ParseException { if (fullCondition == null) { if (secondSentencePart == null) { if (firstBasicSentence != null) { fullCondition = new MtasCQLParserSentenceCondition(firstBasicSentence, ignoreClause, maximumIgnoreLength); } else { fullCondition = firstSentence; } fullCondition.setOccurence(firstMinimumOccurence, firstMaximumOccurence); if (firstOptional) { fullCondition.setOptional(firstOptional); } return fullCondition; } else { if (!orOperator) { if (firstBasicSentence != null) { firstBasicSentence.setOccurence(firstMinimumOccurence, firstMaximumOccurence); firstBasicSentence.setOptional(firstOptional); fullCondition = new MtasCQLParserSentenceCondition( firstBasicSentence, ignoreClause, maximumIgnoreLength); } else { firstSentence.setOccurence(firstMinimumOccurence, firstMaximumOccurence); firstSentence.setOptional(firstOptional); fullCondition = new MtasCQLParserSentenceCondition(firstSentence, ignoreClause, maximumIgnoreLength); } fullCondition.addSentenceToEndLatestSequence( secondSentencePart.createFullSentence()); } else { MtasCQLParserSentenceCondition sentence = secondSentencePart .createFullSentence(); if (firstBasicSentence != null) { sentence.addSentenceAsFirstOption( new MtasCQLParserSentenceCondition(firstBasicSentence, ignoreClause, maximumIgnoreLength)); } else { sentence.addSentenceAsFirstOption(firstSentence); } fullCondition = sentence; } return fullCondition; } } else { return fullCondition; } }
[ "Creates the full sentence.\n\n@return the mtas CQL parser sentence condition\n@throws ParseException the parse exception" ]
[ "Creates the publish button.\n\n@param updateListener the update listener\n@return the publish button", "read broker info for watching topics\n\n@param zkClient the zookeeper client\n@param topics topic names\n@return topic-&gt;(brokerid-0,brokerid-1...brokerid2-0,brokerid2-1...)", "Calculate entropy value.\n@param values Values.\n@return Returns entropy value of the specified histogram array.", "Get the currently selected opacity.\n\n@return The int value of the currently selected opacity.", "Clears the proxy. A cleared proxy is defined as loaded\n\n@see Collection#clear()", "Maps an integer field ID to a field type.\n\n@param field field ID\n@return field type", "Unmarshals the descriptor content.\n\n@throws CmsXmlException thrown if the XML structure of the descriptor is wrong.\n@throws CmsException thrown if reading the descriptor file fails.", "Executes a query. The query results will be added to the ExecutionResults using the\ngiven identifier.\n\n@param identifier\nThe identifier to be used for the results when added to the ExecutionResults\n@param name\nThe name of the query to execute\n@return", "Pauses the playback of a sound." ]
private FieldType getFieldType(byte[] data, int offset) { int fieldIndex = MPPUtility.getInt(data, offset); return FieldTypeHelper.mapTextFields(FieldTypeHelper.getInstance14(fieldIndex)); }
[ "Retrieves a field type from a location in a data block.\n\n@param data data block\n@param offset offset into data block\n@return field type" ]
[ "Instantiates the templates specified by @Template within @Templates", "Resets the calendar", "Use this API to flush cachecontentgroup resources.", "Creates a new status update on the project.\n\nReturns the full record of the newly created project status update.\n\n@param project The project on which to create a status update.\n@return Request object", "Number of failed actions in scheduler", "Returns all ApplicationProjectModels.", "This produces a string with no compressed segments and all segments of full length,\nwhich is 3 characters for IPv4 segments.", "Calculate Median value.\n@param values Values.\n@return Median.", "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" ]
public static Object toObject(Class<?> clazz, Object value) throws ParseException { if (value == null) { return null; } if (clazz == null) { return value; } if (java.sql.Date.class.isAssignableFrom(clazz)) { return toDate(value); } if (java.sql.Time.class.isAssignableFrom(clazz)) { return toTime(value); } if (java.sql.Timestamp.class.isAssignableFrom(clazz)) { return toTimestamp(value); } if (java.util.Date.class.isAssignableFrom(clazz)) { return toDateTime(value); } return value; }
[ "Convert an Object of type Class to an Object." ]
[ "Record a prepare operation.\n\n@param preparedOperation the prepared operation", "Get the target entry for a given patch element.\n\n@param element the patch element\n@return the patch entry\n@throws PatchingException", "Determine the generic value type of the given Map field.\n@param mapField the map field to introspect\n@param nestingLevel the nesting level of the target type\n(typically 1; e.g. in case of a List of Lists, 1 would indicate the\nnested List, whereas 2 would indicate the element of the nested List)\n@return the generic type, or {@code null} if none", "Sets a new value for a given key. an older value is overwritten.\n@param key a non null key\n@param value the new value", "Use this API to delete application.", "Attemps to delete all provided segments from a log and returns how many it was able to", "Returns true if the specified name is NOT allowed. It isn't allowed if it matches a built in operator\nor if it contains a restricted character.", "This method decodes a byte array with the given encryption code\nusing XOR encryption.\n\n@param data Source data\n@param encryptionCode Encryption code", "Finds the most recent dump of the given type that is actually available.\n\n@param dumpContentType\nthe type of the dump to look for\n@return most recent main dump or null if no such dump exists" ]
public static String encode(String value) throws UnsupportedEncodingException { if (isNullOrEmpty(value)) return value; return URLEncoder.encode(value, URL_ENCODING); }
[ "used for encoding queries or form data" ]
[ "Adds OPT_Z | OPT_ZONE 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", "Update all the links of the DeclarationBinder.\n\n@param declarationBinderRef the ServiceReference<DeclarationBinder> of the DeclarationBinder", "Join a group as a public member.\n\nNote: if a group has rules - the client must display the rules to the user and the user must accept them prior to joining the group. The acceptRules\nparameter indicates that the user has accepted those rules.\n\n@param groupId\n- the id of the group to join\n@param acceptRules\n- if a group has rules, true indicates the user has accepted the rules\n\n@see <a href=\"http://www.flickr.com/services/api/flickr.groups.join.html\">flickr.groups.join</a>", "When the descriptor was added while editing, but the change was not saved, it has to be removed\nwhen the editor is closed.\n@throws CmsException thrown when deleting the descriptor resource fails", "Upload a photo from an InputStream.\n\n@param in\n@param metaData\n@return photoId or ticketId\n@throws FlickrException", "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", "Associate the specified value with the specified key in this map.\nIf the map previously contained a mapping for this key, the old\nvalue is replaced and returned.\n\n@param key the key with which the value is to be associated\n@param value the value to be associated with this key\n@return the value previously mapped to the key, or null", "performs an INSERT operation against RDBMS.\n@param obj The Object to be inserted as a row of the underlying table.\n@param cld ClassDescriptor providing mapping information.", "List the addons already added to an app.\n@param appName new of the app\n@return a list of add-ons" ]
public FluoKeyValueGenerator set(RowColumnValue rcv) { setRow(rcv.getRow()); setColumn(rcv.getColumn()); setValue(rcv.getValue()); return this; }
[ "Set the row, column, and value\n\n@return this" ]
[ "helper method to activate or deactivate a specific flag\n\n@param bits\n@param on", "lookup a ClassDescriptor in the internal Hashtable\n@param strClassName a fully qualified class name as it is returned by Class.getName().", "This method is very similar to addMainHandler, except ShellFactory\nwill pass all handlers registered with this method to all this shell's subshells.\n\n@see org.gearvrf.debug.cli.Shell#addMainHandler(java.lang.Object, java.lang.String)\n\n@param handler Object which should be registered as handler.\n@param prefix Prefix that should be prepended to all handler's command names.", "Returns the class of datatype URI that best characterizes the range of\nthe given property based on its datatype.\n\n@param propertyIdValue\nthe property for which to get a range\n@return the range URI or null if the datatype could not be identified.", "Read leaf tasks attached to the WBS.\n\n@param id initial WBS ID", "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", "Gets the value of the resourceRequestCriterion 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 resourceRequestCriterion property.\n\n<p>\nFor example, to add a new item, do as follows:\n<pre>\ngetResourceRequestCriterion().add(newItem);\n</pre>\n\n\n<p>\nObjects of the following type(s) are allowed in the list\n{@link ResourceRequestType.ResourceRequestCriterion }", "Read the tag structure from the provided stream.", "Combine the iterators into a single one.\n\n@param iterators An iterator of iterators\n@return a single combined iterator" ]
public ModelNode getDeploymentSubsystemModel(final String subsystemName) { assert subsystemName != null : "The subsystemName cannot be null"; return getDeploymentSubModel(subsystemName, PathAddress.EMPTY_ADDRESS, null, deploymentUnit); }
[ "Get the subsystem deployment model root.\n\n<p>\nIf the subsystem resource does not exist one will be created.\n</p>\n\n@param subsystemName the subsystem name.\n\n@return the model" ]
[ "Normalizes this vector in place.", "Sets the color of the drop shadow.\n\n@param color The color of the drop shadow.", "Checks if the specified longitude is correct.\n\n@param name the name of the longitude field\n@param longitude the value of the longitude field\n@return the longitude", "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", "Function to perform forward pooling", "Use this API to update appfwlearningsettings.", "Use this API to fetch dbdbprofile resource of given name .", "Validate arguments and state.", "Add a new subsystem to a given registry.\n\n@param registry the registry\n@param name the subsystem name\n@param version the version" ]
@Override @SuppressWarnings("unchecked") public ChronoLocalDateTime<PaxDate> localDateTime(TemporalAccessor temporal) { return (ChronoLocalDateTime<PaxDate>) super.localDateTime(temporal); }
[ "Obtains a Pax local date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the Pax local date-time, not null\n@throws DateTimeException if unable to create the date-time" ]
[ "Attempt to send the specified field to the dbserver.\nThis low-level function is available only to the package itself for use in setting up the connection. It was\npreviously also used for sending parts of larger-scale messages, but because that sometimes led to them being\nfragmented into multiple network packets, and Windows rekordbox cannot handle that, full message sending no\nlonger uses this method.\n\n@param field the field to be sent\n\n@throws IOException if the field cannot be sent", "Initializes the metadataCache for MetadataStore", "Adds a filter definition to this project file.\n\n@param filter filter definition", "Writes the object to the specified document, optionally creating a child\nelement. The object in this case should be a point.\n\n@param o the object (of type Point).\n@param document the document to write to.\n@param asChild create child element if true.\n@throws RenderException", "Ensures that a String argument is a number.\n\n@param condition\ncondition must be {@code true}^ so that the check will be performed\n@param value\nvalue which must be a number\n@throws IllegalNumberArgumentException\nif the given argument {@code value} is not a number", "Configure column aliases.", "Helper method for variance calculations.\n@return The sum of the squares of the differences between\neach value and the arithmetic mean.\n@throws EmptyDataSetException If the data set is empty.", "Broadcast a packet that tells some players to start playing and others to stop. If a player number is in\nboth sets, it will be told to stop. Numbers outside the range 1 to 4 are ignored.\n\n@param deviceNumbersToStart the players that should start playing if they aren't already\n@param deviceNumbersToStop the players that should stop playing\n\n@throws IOException if there is a problem broadcasting the command to the players\n@throws IllegalStateException if the {@code VirtualCdj} is not active", "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" ]
@TargetApi(VERSION_CODES.KITKAT) public static void showSystemUI(Activity activity) { View decorView = activity.getWindow().getDecorView(); decorView.setSystemUiVisibility( View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN ); }
[ "except for the ones that make the content appear under the system bars." ]
[ "Validate the Combination filter field in Multi configuration jobs", "Prints command-line help menu.", "Returns a collection of all profiles\n\n@return Collection of all Profiles\n@throws Exception exception", "Generate the global CSS style for the whole document.\n@return the CSS code used in the generated document header", "Load a table configuration in from a text-file reader.\n\n@return A config if any of the fields were set otherwise null if we reach EOF.", "returns a collection of Reader LockEntries for object obj.\nIf now LockEntries could be found an empty Vector is returned.", "Use this API to fetch dnstxtrec resources of given names .", "Gets information about all of the group memberships for this user.\nDoes not support paging.\n\n<p>Note: This method is only available to enterprise admins.</p>\n\n@return a collection of information about the group memberships for this user.", "Post a build info to the server\n\n@param moduleName String\n@param moduleVersion String\n@param buildInfo Map<String,String>\n@param user String\n@param password String\n@throws GrapesCommunicationException\n@throws javax.naming.AuthenticationException" ]
public synchronized void doneTask(int stealerId, int donorId) { removeNodesFromWorkerList(Arrays.asList(stealerId, donorId)); numTasksExecuting--; doneSignal.countDown(); // Try and schedule more tasks now that resources may be available to do // so. scheduleMoreTasks(); }
[ "Method must be invoked upon completion of a rebalancing task. It is the\ntask's responsibility to do so.\n\n@param stealerId\n@param donorId" ]
[ "Performs any needed operation on subreports after they are built like ensuring proper subreport with\nif \"fitToParentPrintableArea\" flag is set to true\n\n@param dr\n@param _parameters\n@throws JRException", "Specify the artifact configuration to be searched for\n@param artifact configured artifact object\n@return", "Use this API to add snmpuser resources.", "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?", "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", "Set the value for a floating point vector of length 4.\n@param key name of uniform to set.\n@param x new X value\n@param y new Y value\n@param z new Z value\n@param w new W value\n@see #getVec4\n@see #getFloatVec(String)", "Returns the parent of this path or null if this path is the root path.\n\n@return the parent of this path or null if this path is the root path.", "Set the values using the specified Properties object.\n\n@param properties Properties object containing specific property values\nfor the RESTClient config\n\nNote: We're using the same property names as that in ClientConfig\nfor backwards compatibility.", "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." ]
private boolean isSecuredByPolicy(Server server) { boolean isSecured = false; EndpointInfo ei = server.getEndpoint().getEndpointInfo(); PolicyEngine pe = bus.getExtension(PolicyEngine.class); if (null == pe) { LOG.finest("No Policy engine found"); return isSecured; } Destination destination = server.getDestination(); EndpointPolicy ep = pe.getServerEndpointPolicy(ei, destination, null); Collection<Assertion> assertions = ep.getChosenAlternative(); for (Assertion a : assertions) { if (a instanceof TransportBinding) { TransportBinding tb = (TransportBinding) a; TransportToken tt = tb.getTransportToken(); AbstractToken t = tt.getToken(); if (t instanceof HttpsToken) { isSecured = true; break; } } } Policy policy = ep.getPolicy(); List<PolicyComponent> pcList = policy.getPolicyComponents(); for (PolicyComponent a : pcList) { if (a instanceof TransportBinding) { TransportBinding tb = (TransportBinding) a; TransportToken tt = tb.getTransportToken(); AbstractToken t = tt.getToken(); if (t instanceof HttpsToken) { isSecured = true; break; } } } return isSecured; }
[ "Is the transport secured by a policy" ]
[ "List all the environment variables for an app.\n@param appName App name. See {@link #listApps} for a list of apps that can be used.\n@return map of config vars", "Returns the coordinates of the vertex points of this hull.\n\n@param coords\nreturns the x, y, z coordinates of each vertex. This length of\nthis array must be at least three times the number of\nvertices.\n@return the number of vertices\n@see QuickHull3D#getVertices()\n@see QuickHull3D#getFaces()", "Register the given mbean with the server\n\n@param server The server to register with\n@param mbean The mbean to register\n@param name The name to register under", "Backup the current version of the configuration to the versioned configuration history", "Returns the index of each elem in a List.\n@param elems The list of items\n@return An array of indices", "Get the underlying channel. This may block until the channel is set.\n\n@return the channel\n@throws IOException for any error", "Abort an active extern transaction associated with the given PB.", "Sets the position vector of the keyframe.", "convert Event bean to EventType manually.\n\n@param event the event\n@return the event type" ]
public void addPropertyChangeListener (String propertyName, java.beans.PropertyChangeListener listener) { this.propertyChangeDelegate.addPropertyChangeListener(propertyName, listener); }
[ "Add a new PropertyChangeListener to this node for a specific property.\nThis functionality has\nbeen borrowed from the java.beans package, though this class has\nnothing to do with a bean" ]
[ "Queues up a callback to be removed and invoked on the next change event.", "Sorts the given array into sorted order using the given comparator.\n\n@param self the array to be sorted\n@param comparator a Comparator used for the comparison\n@return the sorted array\n@since 1.5.5", "Creates and populates a new task relationship.\n\n@param field which task field source of data\n@param sourceTask relationship source task\n@param relationship relationship string\n@throws MPXJException", "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", "Checks if the dependency server is available\n\n@return true if the server is reachable, false otherwise", "Registers an event handler in the repository shared between Javascript\nand Java.\n\n@param h Event handler to be registered.\n@return Callback key that Javascript will use to find this handler.", "Use this API to fetch onlinkipv6prefix resources of given names .", "List details of all calendars in the file.\n\n@param file ProjectFile instance", "Gets an overrideID for a class name, method name\n\n@param className name of class\n@param methodName name of method\n@return override ID of method" ]
public static void setTranslucentStatusFlag(Activity activity, boolean on) { if (Build.VERSION.SDK_INT >= 19) { setFlag(activity, WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS, on); } }
[ "helper method to set the TranslucentStatusFlag\n\n@param on" ]
[ "Add a metadata profile.\n@see #loadProfile", "Returns whether this address section represents a subnet block of addresses associated its prefix length.\n\nReturns false if it has no prefix length, if it is a single address with a prefix length (ie not a subnet), or if it is a range of addresses that does not include\nthe entire subnet block for its prefix length.\n\nIf {@link AddressNetwork#getPrefixConfiguration} is set to consider all prefixes as subnets, this returns true for any grouping with prefix length.\n\n@return", "Create a new entry in the database from an object.", "Returns the coordinates of the vertex points of this hull.\n\n@param coords\nreturns the x, y, z coordinates of each vertex. This length of\nthis array must be at least three times the number of\nvertices.\n@return the number of vertices\n@see QuickHull3D#getVertices()\n@see QuickHull3D#getFaces()", "Takes the specified object and converts the argument to a String.\n\n@param arg The object to convert\n@return A String representation of the argument.", "Disables all the overrides for a specific profile\n\n@param model\n@param profileID\n@param clientUUID\n@return", "return a generic Statement for the given ClassDescriptor", "Create dummy groups for each concatenated report, and in the footer of\neach group adds the subreport.", "compares two java files" ]
public static String compressedListOfPartitionsInZone(final Cluster cluster, int zoneId) { Map<Integer, Integer> idToRunLength = PartitionBalanceUtils.getMapOfContiguousPartitions(cluster, zoneId); StringBuilder sb = new StringBuilder(); sb.append("["); boolean first = true; Set<Integer> sortedInitPartitionIds = new TreeSet<Integer>(idToRunLength.keySet()); for(int initPartitionId: sortedInitPartitionIds) { if(!first) { sb.append(", "); } else { first = false; } int runLength = idToRunLength.get(initPartitionId); if(runLength == 1) { sb.append(initPartitionId); } else { int endPartitionId = (initPartitionId + runLength - 1) % cluster.getNumberOfPartitions(); sb.append(initPartitionId).append("-").append(endPartitionId); } } sb.append("]"); return sb.toString(); }
[ "Compress contiguous partitions into format \"e-i\" instead of\n\"e, f, g, h, i\". This helps illustrate contiguous partitions within a\nzone.\n\n@param cluster\n@param zoneId\n@return pretty string of partitions per zone" ]
[ "Returns all the dependencies taken into account the artifact of the module that will be removed from the dependencies\n\n@param module Module\n@param producedArtifacts List<String>\n@return Set<Dependency>", "Adds all pairs from 'fromMap' to 'toMap' excluding once that matching the pattern", "Utility method to retrieve the next working date start 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 next work start", "Builds the Join for columns if they are not found among the existingColumns.\n@param columns the list of columns represented by Criteria.Field to ensure\n@param existingColumns the list of column names (String) that are already appended", "Handle a start time change.\n\n@param event the change event", "Converts string to UUID and returns it, or null if the conversion is not possible.\n\n@param uuid the potential UUID string\n@return the UUID, or null if conversion is not possible", "Process a single project.\n\n@param reader Primavera reader\n@param projectID required project ID\n@param outputFile output file name", "This method retrieves the next token and returns a constant representing\nthe type of token found.\n\n@return token type value", "Sets Idle max age.\n\nThe time, for a connection to remain unused before it is closed off. Do not use aggressive values here!\n@param idleMaxAge time after which a connection is closed off\n@param timeUnit idleMaxAge time granularity." ]
public void add(final String source, final T destination) { // replace multiple slashes with a single slash. String path = source.replaceAll("/+", "/"); path = (path.endsWith("/") && path.length() > 1) ? path.substring(0, path.length() - 1) : path; String[] parts = path.split("/", maxPathParts + 2); if (parts.length - 1 > maxPathParts) { throw new IllegalArgumentException(String.format("Number of parts of path %s exceeds allowed limit %s", source, maxPathParts)); } StringBuilder sb = new StringBuilder(); List<String> groupNames = new ArrayList<>(); for (String part : parts) { Matcher groupMatcher = GROUP_PATTERN.matcher(part); if (groupMatcher.matches()) { groupNames.add(groupMatcher.group(1)); sb.append("([^/]+?)"); } else if (WILD_CARD_PATTERN.matcher(part).matches()) { sb.append(".*?"); } else { sb.append(part); } sb.append("/"); } //Ignore the last "/" sb.setLength(sb.length() - 1); Pattern pattern = Pattern.compile(sb.toString()); patternRouteList.add(ImmutablePair.of(pattern, new RouteDestinationWithGroups(destination, groupNames))); }
[ "Add a source and destination.\n\n@param source Source path to be routed. Routed path can have named wild-card pattern with braces \"{}\".\n@param destination Destination of the path." ]
[ "Read the work weeks.\n\n@param data calendar data\n@param offset current offset into data\n@param cal parent calendar", "Use this API to disable vserver of given name.", "Removes elements from begin to end from the list, inclusive. Returns a new list which\nis composed of the removed elements", "Get a property as a double or throw an exception.\n\n@param key the property name", "splits a string into a list of strings. Trims the results and ignores empty strings", "Returns screen height and width\n\n@param context\nAny non-null Android Context\n@param p\nOptional Point to reuse. If null, a new Point will be created.\n@return .x is screen width; .y is screen height.", "Retrieve a finish date time in the form required by Phoenix.\n\n@param value Date instance\n@return formatted date time", "Get an SQL condition to match this address section representation\n\n@param builder\n@param columnName\n@return the condition", "Add a new PropertyChangeListener to this node for a specific property.\nThis functionality has\nbeen borrowed from the java.beans package, though this class has\nnothing to do with a bean" ]
public static Artifact withGroupId(String groupId) { Artifact artifact = new Artifact(); artifact.groupId = new RegexParameterizedPatternParser(groupId); return artifact; }
[ "Start with specifying the groupId" ]
[ "Get a project according to its full name.\n\n@param fullName The full name of the project.\n@return The project which answers the full name.", "It should be called when the picker is hidden", "Decrements the client's use count, and makes it eligible for closing if it is no longer in use.\n\n@param client the dbserver connection client which is no longer being used for a task", "Takes an object and converts it to a string.\n\n@param mapper the object mapper\n@param object the object to convert\n@return json string", "Print a constraint type.\n\n@param value ConstraintType instance\n@return constraint type value", "Returns requested content types or default content type if none found.\n\n@return Requested content types or default content type if none found.", "Assigns a retention policy to all items with a given metadata template, optionally matching on fields.\n@param api the API connection to be used by the created assignment.\n@param policyID id of the assigned retention policy.\n@param templateID the ID of the metadata template to assign the policy to.\n@param filter optional fields to match against in the metadata template.\n@return info about the created assignment.", "Gathers information, that couldn't be collected while tree traversal.", "Use this API to delete clusterinstance of given name." ]
private boolean hasToBuilderMethod( DeclaredType builder, boolean isExtensible, Iterable<ExecutableElement> methods) { for (ExecutableElement method : methods) { if (isToBuilderMethod(builder, method)) { if (!isExtensible) { messager.printMessage(ERROR, "No accessible no-args Builder constructor available to implement toBuilder", method); } return true; } } return false; }
[ "Find a toBuilder method, if the user has provided one." ]
[ "Used for DI frameworks to inject values into stages.", "Create the service name for a channel\n\n@param channelName\nthe channel name\n@return the service name", "Tells it to process the submatrix at the next split. Should be called after the\ncurrent submatrix has been processed.", "Remove a connection from all keys.\n\n@param connection\nthe connection", "Set the draw mode for this mesh. Default is GL_TRIANGLES.\n\n@param drawMode", "Adds the content info for the collected resources used in the \"This page\" publish dialog.", "If X == null then the solution is written into B. Otherwise the solution is copied\nfrom B into X.", "Replies the elements of the left map without the pairs in the right map.\nIf the pair's values differ from\nthe value within the map, the map entry is not removed.\n\n<p>\nThe difference is an immutable\nsnapshot of the state of the maps at the time this method is called. It\nwill never change, even if the maps change at a later time.\n</p>\n\n<p>\nSince this method uses {@code HashMap} instances internally, the keys of\nthe supplied maps must be well-behaved with respect to\n{@link Object#equals} and {@link Object#hashCode}.\n</p>\n\n@param <K> type of the map keys.\n@param <V> type of the map values.\n@param left the map to update.\n@param right the pairs to remove.\n@return the map with the content of the left map except the pairs of the right map.\n@since 2.15", "Adjust submatrices and helper data structures for the input matrix. Must be called\nbefore the decomposition can be computed.\n\n@param orig" ]
public static Collection<String> getKnownPGPSecureRingLocations() { final LinkedHashSet<String> locations = new LinkedHashSet<String>(); final String os = System.getProperty("os.name"); final boolean runOnWindows = os == null || os.toLowerCase().contains("win"); if (runOnWindows) { // The user's roaming profile on Windows, via environment final String windowsRoaming = System.getenv("APPDATA"); if (windowsRoaming != null) { locations.add(joinLocalPath(windowsRoaming, "gnupg", "secring.gpg")); } // The user's local profile on Windows, via environment final String windowsLocal = System.getenv("LOCALAPPDATA"); if (windowsLocal != null) { locations.add(joinLocalPath(windowsLocal, "gnupg", "secring.gpg")); } // The Windows installation directory final String windir = System.getProperty("WINDIR"); if (windir != null) { // Local Profile on Windows 98 and ME locations.add(joinLocalPath(windir, "Application Data", "gnupg", "secring.gpg")); } } final String home = System.getProperty("user.home"); if (home != null && runOnWindows) { // These are for various flavours of Windows // if the environment variables above have failed // Roaming profile on Vista and later locations.add(joinLocalPath(home, "AppData", "Roaming", "gnupg", "secring.gpg")); // Local profile on Vista and later locations.add(joinLocalPath(home, "AppData", "Local", "gnupg", "secring.gpg")); // Roaming profile on 2000 and XP locations.add(joinLocalPath(home, "Application Data", "gnupg", "secring.gpg")); // Local profile on 2000 and XP locations.add(joinLocalPath(home, "Local Settings", "Application Data", "gnupg", "secring.gpg")); } // *nix, including OS X if (home != null) { locations.add(joinLocalPath(home, ".gnupg", "secring.gpg")); } return locations; }
[ "Get the known locations where the secure keyring can be located.\nLooks through known locations of the GNU PG secure keyring.\n\n@return The location of the PGP secure keyring if it was found,\nnull otherwise" ]
[ "Creates a timespan from a list of other timespans.\n\n@return a timespan representing the sum of all the timespans provided", "Processes one item document. This is often the main workhorse that\ngathers the data you are interested in. You can modify this code as you\nwish.", "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", "Use this API to fetch nsrpcnode resource of given name .", "Use this API to expire cacheobject resources.", "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()}", "Wrapper functions with no bounds checking are used to access matrix internals", "Returns an attribute's value from a non-main section of this JAR's manifest.\n\n@param section the manifest's section\n@param name the attribute's name", "Returns PatternParser used to parse the conversion string. Subclasses may\noverride this to return a subclass of PatternParser which recognize\ncustom conversion characters.\n\n@since 0.9.0" ]
public TaskMode getTaskMode() { return BooleanHelper.getBoolean((Boolean) getCachedValue(TaskField.TASK_MODE)) ? TaskMode.MANUALLY_SCHEDULED : TaskMode.AUTO_SCHEDULED; }
[ "Retrieves the task mode.\n\n@return task mode" ]
[ "Ensure that a tool object is valid for creation. The API requires certain fields to be filled out.\nThrows an IllegalArgumentException if the conditions are not met.\n@param tool The external tool object we are trying to create", "Chooses the ECI mode most suitable for the content of this symbol.", "Answer the real ClassDescriptor for anObj\nie. aCld may be an Interface of anObj, so the cld for anObj is returned", "Mark a given element as checked to prevent duplicate work. A elements is only added when it\nis not already in the set of checked elements.\n\n@param element the element that is checked\n@return true if !contains(element.uniqueString)", "compute Sinh using Taylor Series.\n\n@param x An angle, in radians.\n@param nTerms Number of terms.\n@return Result.", "Draw an elliptical interior with this color.\n\n@param rect rectangle in which ellipse should fit\n@param color colour to use for filling", "Creates a window visually showing the matrix's state. Block means an element is zero.\nRed positive and blue negative. More intense the color larger the element's absolute value\nis.\n\n@param A A matrix.\n@param title Name of the window.", "Add another store destination to an existing streaming session\n\n\n@param store the name of the store to stream to", "Converts this update description to its document representation as it would appear in a\nMongoDB Change Event.\n\n@return the update description document as it would appear in a change event" ]
public BoxFile.Info commit(String digest, List<BoxFileUploadSessionPart> parts, Map<String, String> attributes, String ifMatch, String ifNoneMatch) { URL commitURL = this.sessionInfo.getSessionEndpoints().getCommitEndpoint(); BoxJSONRequest request = new BoxJSONRequest(this.getAPI(), commitURL, HttpMethod.POST); request.addHeader(HttpHeaders.DIGEST, DIGEST_HEADER_PREFIX_SHA + digest); request.addHeader(HttpHeaders.CONTENT_TYPE, ContentType.APPLICATION_JSON); if (ifMatch != null) { request.addHeader(HttpHeaders.IF_MATCH, ifMatch); } if (ifNoneMatch != null) { request.addHeader(HttpHeaders.IF_NONE_MATCH, ifNoneMatch); } //Creates the body of the request String body = this.getCommitBody(parts, attributes); request.setBody(body); BoxAPIResponse response = request.send(); //Retry the commit operation after the given number of seconds if the HTTP response code is 202. if (response.getResponseCode() == 202) { String retryInterval = response.getHeaderField("retry-after"); if (retryInterval != null) { try { Thread.sleep(new Integer(retryInterval) * 1000); } catch (InterruptedException ie) { throw new BoxAPIException("Commit retry failed. ", ie); } return this.commit(digest, parts, attributes, ifMatch, ifNoneMatch); } } if (response instanceof BoxJSONResponse) { //Create the file instance from the response return this.getFile((BoxJSONResponse) response); } else { throw new BoxAPIException("Commit response content type is not application/json. The response code : " + response.getResponseCode()); } }
[ "Commit an upload session after all parts have been uploaded, creating the new file or the version.\n@param digest the base64-encoded SHA-1 hash of the file being uploaded.\n@param parts the list of uploaded parts to be committed.\n@param attributes the key value pairs of attributes from the file instance.\n@param ifMatch ensures that your app only alters files/folders on Box if you have the current version.\n@param ifNoneMatch ensure that it retrieve unnecessary data if the most current version of file is on-hand.\n@return the created file instance." ]
[ "Compute the A matrix from the Q and R matrices.\n\n@return The A matrix.", "Removes double-quotes from around a string\n@param str\n@return", "Computes the eigenvalue of the 2 by 2 matrix.", "Use this API to fetch all the nspbr6 resources that are configured on netscaler.\nThis uses nspbr6_args which is a way to provide additional arguments while fetching the resources.", "The normalized string returned by this method is consistent with java.net.Inet6address.\nIPs are not compressed nor mixed in this representation.", "Writes batch of data to the source\n@param batch\n@throws InterruptedException", "Parse a currency symbol position value.\n\n@param value currency symbol position\n@return CurrencySymbolPosition instance", "Gets the Symmetric Kullback-Leibler distance.\nThis metric is valid only for real and positive P and Q.\n\n@param p P vector.\n@param q Q vector.\n@return The Symmetric Kullback Leibler distance between p and q.", "Adds api doc roots from a link. The folder reffered by the link should contain a package-list\nfile that will be parsed in order to add api doc roots to this configuration\n@param packageListUrl" ]
public static <IN extends CoreMap> CRFClassifier<IN> getClassifier(File file) throws IOException, ClassCastException, ClassNotFoundException { CRFClassifier<IN> crf = new CRFClassifier<IN>(); crf.loadClassifier(file); return crf; }
[ "Loads a CRF classifier from a filepath, and returns it.\n\n@param file\nFile 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" ]
[ "Make sure that we have some reasonable defaults available. These would typically be provided by the rulesets\nin the real world.", "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", "Get all views from the list content\n@return list of views currently visible", "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", "Creates a map of identifiers or page titles to documents retrieved via\nthe API URL\n\n@param properties\nparameter setting for wbgetentities\n@return map of document identifiers or titles to documents retrieved via\nthe API URL\n@throws MediaWikiApiErrorException\nif the API returns an error\n@throws IOException\nif we encounter network issues or HTTP 500 errors from Wikibase", "Create a counter if one is not defined already, otherwise return the existing one.\n\n@param counterName unique name for the counter\n@param initialValue initial value for the counter\n@return a {@link StrongCounter}", "Creates an element that represents an image drawn at the specified coordinates in the page.\n@param x the X coordinate of the image\n@param y the Y coordinate of the image\n@param width the width coordinate of the image\n@param height the height coordinate of the image\n@param type the image type: <code>\"png\"</code> or <code>\"jpeg\"</code>\n@param resource the image data depending on the specified type\n@return", "Hide keyboard from phoneEdit field", "Creates a new Box Developer Edition connection with App User token levaraging BoxConfig.\n@param userId the user ID to use for an App User.\n@param boxConfig box configuration settings object\n@return a new instance of BoxAPIConnection." ]
public static ProctorLoadResult verify( @Nonnull final TestMatrixArtifact testMatrix, final String matrixSource, @Nonnull final Map<String, TestSpecification> requiredTests, @Nonnull final FunctionMapper functionMapper, final ProvidedContext providedContext, @Nonnull final Set<String> dynamicTests ) { final ProctorLoadResult.Builder resultBuilder = ProctorLoadResult.newBuilder(); final Map<String, Map<Integer, String>> allTestsKnownBuckets = Maps.newHashMapWithExpectedSize(requiredTests.size()); for (final Entry<String, TestSpecification> entry : requiredTests.entrySet()) { final Map<Integer, String> bucketValueToName = Maps.newHashMap(); for (final Entry<String, Integer> bucket : entry.getValue().getBuckets().entrySet()) { bucketValueToName.put(bucket.getValue(), bucket.getKey()); } allTestsKnownBuckets.put(entry.getKey(), bucketValueToName); } final Map<String, ConsumableTestDefinition> definedTests = testMatrix.getTests(); final SetView<String> missingTests = Sets.difference(requiredTests.keySet(), definedTests.keySet()); resultBuilder.recordAllMissing(missingTests); for (final Entry<String, ConsumableTestDefinition> entry : definedTests.entrySet()) { final String testName = entry.getKey(); final Map<Integer, String> knownBuckets; final TestSpecification specification; final boolean isRequired; if (allTestsKnownBuckets.containsKey(testName)) { // required in specification isRequired = true; knownBuckets = allTestsKnownBuckets.remove(testName); specification = requiredTests.get(testName); } else if (dynamicTests.contains(testName)) { // resolved by dynamic filter isRequired = false; knownBuckets = Collections.emptyMap(); specification = new TestSpecification(); } else { // we don't care about this test continue; } final ConsumableTestDefinition testDefinition = entry.getValue(); try { verifyTest(testName, testDefinition, specification, knownBuckets, matrixSource, functionMapper, providedContext); } catch (IncompatibleTestMatrixException e) { if (isRequired) { LOGGER.error(String.format("Unable to load test matrix for a required test %s", testName), e); resultBuilder.recordError(testName, e); } else { LOGGER.info(String.format("Unable to load test matrix for a dynamic test %s", testName), e); resultBuilder.recordIncompatibleDynamicTest(testName, e); } } } // TODO mjs - is this check additive? resultBuilder.recordAllMissing(allTestsKnownBuckets.keySet()); resultBuilder.recordVerifiedRules(providedContext.shouldEvaluate()); final ProctorLoadResult loadResult = resultBuilder.build(); return loadResult; }
[ "Does not mutate the TestMatrix.\nVerifies that the test matrix contains all the required tests and that\neach required test is valid.\n\n@param testMatrix the {@link TestMatrixArtifact} to be verified.\n@param matrixSource a {@link String} of the source of proctor artifact. For example a path of proctor artifact file.\n@param requiredTests a {@link Map} of required test. The {@link TestSpecification} would be verified\n@param functionMapper a given el {@link FunctionMapper}\n@param providedContext a {@link Map} containing variables describing the context in which the request is executing. These will be supplied to verifying all rules.\n@param dynamicTests a {@link Set} of dynamic tests determined by filters.\n@return a {@link ProctorLoadResult} to describe the result of verification. It contains errors of verification and a list of missing test." ]
[ "Returns an Array with an Objects PK VALUES if convertToSql is true, any\nassociated java-to-sql conversions are applied. If the Object is a Proxy\nor a VirtualProxy NO conversion is necessary.\n\n@param objectOrProxy\n@param convertToSql\n@return Object[]\n@throws PersistenceBrokerException", "Use this API to fetch filtered set of dospolicy resources.\nset the filter parameter values in filtervalue object.", "Provides an object that can build SQL clauses to match this string representation.\n\nThis method can be overridden for other IP address types to match in their own ways.\n\n@param isEntireAddress\n@param translator\n@return", "Indicates if this file represents a file on the underlying file system.\n\n@param filePath\n@return", "Records the result of updating a server group.\n\n@param serverGroup the server group's name. Cannot be <code>null</code>\n@param failed <code>true</code> if the server group update failed;\n<code>false</code> if it succeeded", "Matches the styles and adjusts the size. This needs to be\ncalled after the input is added to the DOM, so we do it in\nonLoad.", "Layout children inside the layout container", "This method writes resource data to an MSPDI file.\n\n@param project Root node of the MSPDI file", "Merges the item from the resultLocaleValues into the corresponding item of the localeValues.\n@param item the item to merge\n@param localeValues the values where the item gets merged into\n@param resultLocaleValues the values where the item to merge is read from\n@return the modified localeValues with the merged item" ]
public AsciiTable setPaddingRight(int paddingRight) { for(AT_Row row : this.rows){ if(row.getType()==TableRowType.CONTENT){ row.setPaddingRight(paddingRight); } } return this; }
[ "Sets the right padding for all cells in the table.\n@param paddingRight new padding, ignored if smaller than 0\n@return this to allow chaining" ]
[ "Use this API to enable clusterinstance resources of given names.", "Polls from the location header and updates the polling state with the\npolling response for a PUT operation.\n\n@param pollingState the polling state for the current operation.\n@param <T> the return type of the caller.", "Sets the action label to be displayed, if any. Note that if this is not set, the action\nbutton will not be displayed\n\n@param actionButtonLabel\n@return", "Cache a parse failure for this document.", "Returns true if the given dump file type contains page revisions and\nfalse if it does not. Dumps that do not contain pages are for auxiliary\ninformation such as linked sites.\n\n@param dumpContentType\nthe type of dump\n@return true if the dumpfile contains revisions\n@throws IllegalArgumentException\nif the given dump file type is not known", "Returns the index descriptor definition of the given name if it exists.\n\n@param name The name of the index\n@return The index descriptor definition or <code>null</code> if there is no such index", "Use this API to fetch vpnvserver_appcontroller_binding resources of given name .", "Write a project file in SDEF format to an output stream.\n\n@param projectFile ProjectFile instance\n@param out output stream", "Add a clause where the ID is from an existing object." ]
void setLanguage(final Locale locale) { if (!m_languageSelect.getValue().equals(locale)) { m_languageSelect.setValue(locale); } }
[ "Sets the currently edited locale.\n@param locale the locale to set." ]
[ "To sql pattern.\n\n@param attribute the attribute\n@return the string", "Use this API to fetch auditsyslogpolicy_vpnglobal_binding resources of given name .", "Tries to load a property file with the specified name.\n\n@param localizedName the name\n@return the resource bundle if it was loaded, otherwise the backup", "Update the currency format.\n\n@param properties project properties\n@param decimalSeparator decimal separator\n@param thousandsSeparator thousands separator", "Deletes an object from the database.\nIt must be executed in the context of an open transaction.\nIf the object is not persistent, then ObjectNotPersistent is thrown.\nIf the transaction in which this method is executed commits,\nthen the object is removed from the database.\nIf the transaction aborts,\nthen the deletePersistent operation is considered not to have been executed,\nand the target object is again in the database.\n@param\tobject\tThe object to delete.", "Use this API to apply nspbr6.", "Flushes this output stream and forces any buffered output bytes to be written out to the stream. If propagate is\ntrue, the wrapped stream will also be flushed.\n\n@param propagate\nboolean flag to indicate whether the wrapped OutputStream should also be flushed.\n@throws IOException\nif an I/O error occurs.", "Add the steal information to the rebalancer state\n\n@param stealInfo The steal information to add", "Calculates the local translation and rotation for a bone.\nAssumes WorldRot and WorldPos have been calculated for the bone." ]
public void setOwner(Graph<DataT, NodeT> ownerGraph) { if (this.ownerGraph != null) { throw new RuntimeException("Changing owner graph is not allowed"); } this.ownerGraph = ownerGraph; }
[ "Sets reference to the graph owning this node.\n\n@param ownerGraph the owning graph" ]
[ "In common shader cases, NaN makes little sense. Correspondingly, GVRF is\ngoing to use Float.NaN as illegal flag in many cases. Therefore, we need\na function to check if there is any setX that is using NaN as input.\n\n@param parameterName\nThe name of the user-supplied parameter that we are validating\nso that the user can easily find the error in their code.\n@param data\nA single float data.\n@throws IllegalArgumentException\nif the data includes NaN.", "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", "Generate a sql where-clause for the array of fields\n\n@param fields array containing all columns used in WHERE clause", "generate a prepared DELETE-Statement according to query\n@param query the Query\n@param cld the ClassDescriptor", "we have only one implementation on classpath.", "Creates an object instance from the Groovy resource\n\n@param resource the Groovy resource to parse\n@return An Object instance", "Disables all the overrides for a specific profile\n\n@param model\n@param profileID\n@param clientUUID\n@return", "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", "Throw IllegalArgumentException if the value is null.\n\n@param name the parameter name.\n@param value the value that should not be null.\n@param <T> the value type.\n@throws IllegalArgumentException if value is null." ]
private void setBandFinalHeight(JRDesignBand band, int currHeigth, boolean fitToContent) { if (band != null) { int finalHeight = LayoutUtils.findVerticalOffset(band); //noinspection StatementWithEmptyBody if (finalHeight < currHeigth && !fitToContent) { //nothing } else { band.setHeight(finalHeight); } } }
[ "Removes empty space when \"fitToContent\" is true and real height of object is\ntaller than current bands height, otherwise, it is not modified\n\n@param band\n@param currHeigth\n@param fitToContent" ]
[ "Save current hostname and reuse it.\n\n@return hostname as String", "Requests the waveform preview for a specific track ID, given a connection to a player that has already been\nset up.\n\n@param rekordboxId the track whose waveform preview is desired\n@param slot identifies the media slot we are querying\n@param client the dbserver client that is communicating with the appropriate player\n\n@return the retrieved waveform preview, or {@code null} if none was available\n@throws IOException if there is a communication problem", "Reads a markdown link.\n\n@param out\nThe StringBuilder to write to.\n@param in\nInput String.\n@param start\nStarting position.\n@return The new position or -1 if this is no valid markdown link.", "Check that each emitted notification is properly described by its source.", "Checks if a given number is in the range of a byte.\n\n@param number\na number which should be in the range of a byte (positive or negative)\n\n@see java.lang.Byte#MIN_VALUE\n@see java.lang.Byte#MAX_VALUE\n\n@return number as a byte (rounding might occur)", "Attempts to detect the provided pattern as an exact match.\n@param pattern the pattern to find in the reader stream\n@return the number of times the pattern is found,\nor an error code\n@throws MalformedPatternException if the pattern is invalid\n@throws Exception if a generic error is encountered", "Returns a flag, indicating if the current event is a multi-day event.\nThe method is only called if the single event has an explicitely set end date\nor an explicitely changed whole day option.\n\n@return a flag, indicating if the current event takes lasts over more than one day.", "Use this API to fetch vpnvserver_appcontroller_binding resources of given name .", "Reads characters until the 'end' character is encountered.\n\n@param out\nThe StringBuilder to write to.\n@param in\nThe Input String.\n@param start\nStarting position.\n@param end\nEnd characters.\n@return The new position or -1 if no 'end' char was found." ]
public List<Integer> getConnectionRetries() { List<Integer> items = new ArrayList<Integer>(); for (int i = 0; i < 10; i++) { items.add(i); } return items; }
[ "To populate the dropdown list from the jelly" ]
[ "running in App Engine", "Retrieve timephased baseline cost. Note that index 0 represents \"Baseline\",\nindex 1 represents \"Baseline1\" and so on.\n\n@param index baseline index\n@return timephased work, or null if no baseline is present", "Set the scrollbar used for vertical scrolling.\n\n@param scrollbar the scrollbar, or null to clear it\n@param width the width of the scrollbar in pixels", "Read the set of property files. Keys and Values are automatically validated and converted.\n\n@param resourceLoader\n@return all the properties from the weld.properties file", "resumed a given deployment\n\n@param deployment The deployment to resume", "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.", "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", "Infer the type of and create a new output variable using the results from the right side of the equation.\nIf the type is already known just return that.", "Print a task UID.\n\n@param value task UID\n@return task UID string" ]
public static <T, C extends Comparable<? super C>> List<T> sortInplaceBy(List<T> list, final Functions.Function1<? super T, C> key) { if (key == null) throw new NullPointerException("key"); Collections.sort(list, new KeyComparator<T, C>(key)); return list; }
[ "Sorts the specified list itself according to the order induced by applying a key function to each element which\nyields a comparable criteria.\n\n@param list\nthe list to be sorted. May not be <code>null</code>.\n@param key\nthe key function to-be-used. May not be <code>null</code>.\n@return the sorted list itself.\n@see Collections#sort(List)" ]
[ "Add or remove the active cursors from the provided scene.\n\n@param scene The GVRScene.\n@param add <code>true</code> for add, <code>false</code> to remove", "Checks whether this notification is from CleverTap.\n\n@param extras The payload from the GCM intent\n@return See {@link NotificationInfo}", "Format a cue countdown indicator in the same way as the CDJ would at this point in the track.\n\n@return the value that the CDJ would display to indicate the distance to the next cue\n@see #getCueCountdown()", "Scales the weights of this crfclassifier by the specified weight\n\n@param scale", "Use this API to delete dnsaaaarec resources.", "Used to retrieve the watermark for the item.\nIf the item does not have a watermark applied to it, a 404 Not Found will be returned by API.\n@param itemUrl url template for the item.\n@param fields the fields to retrieve.\n@return the watermark associated with the item.", "Crop the image between two points.\n\n@param top Top bound.\n@param left Left bound.\n@param bottom Bottom bound.\n@param right Right bound.\n@throws IllegalArgumentException if {@code top} or {@code left} are less than zero or {@code\nbottom} or {@code right} are less than one or less than {@code top} or {@code left},\nrespectively.", "Check that an array only contains elements that are not null.\n@param values, can't be null\n@return", "Report all Java ClassFile files available on the class path within\nthe specified packages and sub packages.\n\n@see #detect(File...)" ]
public static Date parseEpochTimestamp(String value) { Date result = null; if (value.length() > 0) { if (!value.equals("-1 -1")) { Calendar cal = DateHelper.popCalendar(JAVA_EPOCH); int index = value.indexOf(' '); if (index == -1) { if (value.length() < 6) { value = "000000" + value; value = value.substring(value.length() - 6); } int hours = Integer.parseInt(value.substring(0, 2)); int minutes = Integer.parseInt(value.substring(2, 4)); int seconds = Integer.parseInt(value.substring(4)); cal.set(Calendar.HOUR, hours); cal.set(Calendar.MINUTE, minutes); cal.set(Calendar.SECOND, seconds); } else { long astaDays = Long.parseLong(value.substring(0, index)); int astaSeconds = Integer.parseInt(value.substring(index + 1)); cal.add(Calendar.DAY_OF_YEAR, (int) (astaDays - ASTA_EPOCH)); cal.set(Calendar.MILLISECOND, 0); cal.set(Calendar.SECOND, 0); cal.set(Calendar.HOUR, 0); cal.add(Calendar.SECOND, astaSeconds); } result = cal.getTime(); DateHelper.pushCalendar(cal); } } return result; }
[ "Parse the string representation of a timestamp.\n\n@param value string representation\n@return Java representation" ]
[ "Check that the parameter array has exactly the right number of elements.\n\n@param parameterName\nThe name of the user-supplied parameter that we are validating\nso that the user can easily find the error in their code.\n@param actualLength\nThe actual array length\n@param expectedLength\nThe expected array length", "Transforms a single configuration file using the given transformation source.\n\n@param file the configuration file\n@param transformSource the transform soruce\n\n@throws TransformerConfigurationException -\n@throws IOException -\n@throws SAXException -\n@throws TransformerException -\n@throws ParserConfigurationException -", "Gets next node in the DAG which has no dependency or all of it's dependencies are resolved and\nready to be consumed.\n\n@return next node or null if all the nodes have been explored or no node is available at this moment.", "Gets the UTF-8 sequence length of the code point.\n\n@throws InvalidCodePointException if code point is not within a valid range", "Retrieves the amount of time represented by a calendar exception\nbefore or after an intersection point.\n\n@param exception calendar exception\n@param date intersection time\n@param after true to report time after intersection, false to report time before\n@return length of time in milliseconds", "Update the underlying buffer using the short\n\n@param number number to be stored in checksum buffer", "Creates a Span that covers an exact row. String parameters will be encoded as UTF-8", "Return a Halton number, sequence starting at index = 0, base &gt; 1.\n\n@param index The index of the sequence.\n@param base The base of the sequence. Has to be greater than one (this is not checked).\n@return The Halton number.", "Returns a flag indicating if also unreleased resources should be found.\n@return A flag indicating if also unreleased resources should be found." ]
private I_CmsSearchResultWrapper getSearchResults() { // The second parameter is just ignored - so it does not matter m_searchController.updateFromRequestParameters(pageContext.getRequest().getParameterMap(), false); I_CmsSearchControllerCommon common = m_searchController.getCommon(); // Do not search for empty query, if configured if (common.getState().getQuery().isEmpty() && (!common.getConfig().getIgnoreQueryParam() && !common.getConfig().getSearchForEmptyQueryParam())) { return new CmsSearchResultWrapper(m_searchController, null, null, m_cms, null); } Map<String, String[]> queryParams = null; boolean isEditMode = CmsJspTagEditable.isEditableRequest(pageContext.getRequest()); if (isEditMode) { String params = ""; if (common.getConfig().getIgnoreReleaseDate()) { params += "&fq=released:[* TO *]"; } if (common.getConfig().getIgnoreExpirationDate()) { params += "&fq=expired:[* TO *]"; } if (!params.isEmpty()) { queryParams = CmsRequestUtil.createParameterMap(params.substring(1)); } } CmsSolrQuery query = new CmsSolrQuery(null, queryParams); m_searchController.addQueryParts(query, m_cms); try { // use "complicated" constructor to allow more than 50 results -> set ignoreMaxResults to true // also set resource filter to allow for returning unreleased/expired resources if necessary. CmsSolrResultList solrResultList = m_index.search( m_cms, query.clone(), // use a clone of the query, since the search function manipulates the query (removes highlighting parts), but we want to keep the original one. true, isEditMode ? CmsResourceFilter.IGNORE_EXPIRATION : null); return new CmsSearchResultWrapper(m_searchController, solrResultList, query, m_cms, null); } catch (CmsSearchException e) { LOG.warn(Messages.get().getBundle().key(Messages.LOG_TAG_SEARCH_SEARCH_FAILED_0), e); return new CmsSearchResultWrapper(m_searchController, null, query, m_cms, e); } }
[ "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\"." ]
[ "Evaluates an EL.\n\n@param vars the variables to be available for the evaluation.\n@param el the EL string to evaluate.\n@param returnType the class the EL evaluates to.\n@return the evaluated EL as an instance of the specified return type.\n@throws ELEvalException if the EL could not be evaluated.", "Returns the user records for all users in the specified workspace or\norganization.\n\n@param workspace The workspace in which to get users.\n@return Request object", "Returns the configured bundle, or the provided default bundle.\n@param defaultMessages the default bundle\n@param locale the preferred locale\n@return the configured bundle or, if not found, the default bundle.", "Match the Origin header with the allowed origins.\nIf it doesn't match then a 403 response code is set on the response and it returns null.\n@param exchange the current HttpExchange.\n@param allowedOrigins list of sanitized allowed origins.\n@return the first matching origin, null otherwise.\n@throws Exception", "Remove control from the control bar. Size of control bar is updated based on new number of\ncontrols.\n@param name name of the control to remove", "Build the query to perform a batched read get orderBy settings from CollectionDescriptor\n\n@param ids Collection containing all identities of objects of the ONE side", "Get the element at the index as an integer.\n\n@param i the index of the element to access", "Used to create a new finite retention policy with optional parameters.\n@param api the API connection to be used by the created user.\n@param name the name of the retention policy.\n@param length the duration in days that the retention policy will be active for after being assigned to content.\n@param action the disposition action can be \"permanently_delete\" or \"remove_retention\".\n@param optionalParams the optional parameters.\n@return the created retention policy's info.", "Evict cached object\n\n@param key\nthe key indexed the cached object to be evicted" ]
private Integer getNullOnValue(Integer value, int nullValue) { return (NumberHelper.getInt(value) == nullValue ? null : value); }
[ "This method returns the value it is passed, or null if the value\nmatches the nullValue argument.\n\n@param value value under test\n@param nullValue return null if value under test matches this value\n@return value or null" ]
[ "Check the given resource back into the pool\n\n@param key The key for the resource\n@param resource The resource", "This method checks for paging information and returns the appropriate\ndata\n\n@param result\n@param httpResponse\n@param where\n@return a {@link WrappingPagedList} if there is paging, result if not.", "Send a beat grid update announcement to all registered listeners.\n\n@param player the player whose beat grid information has changed\n@param beatGrid the new beat grid associated with that player, if any", "Reads all sub-categories below the provided category.\n@return The map from the provided category to it's sub-categories in a {@link CmsJspCategoryAccessBean}.", "Record the connection establishment time\n\n@param dest Destination of the socket to connect to. Will actually record\nif null. Otherwise will call this on self and corresponding child\nwith this param null.\n@param connEstTimeUs The number of us to wait before establishing a\nconnection", "Transforms user name and icon size into the rfs image path.\n\n@param name the user name\n@param size IconSize to get icon for\n\n@return the path", "Use this API to fetch vpnvserver_appcontroller_binding resources of given name .", "Re-Tag the websocket connection hold by this context with label specified.\nThis method will remove all previous tags on the websocket connection and then\ntag it with the new label.\n@param label the label.\n@return this websocket conext.", "Wrapped version of standard jdbc executeUpdate Pays attention to DB\nlocked exception and waits up to 1s\n\n@param query SQL query to execute\n@throws Exception - will throw an exception if we can never get a lock" ]
public static rnatip_stats[] get(nitro_service service, options option) throws Exception{ rnatip_stats obj = new rnatip_stats(); rnatip_stats[] response = (rnatip_stats[])obj.stat_resources(service,option); return response; }
[ "Use this API to fetch the statistics of all rnatip_stats resources that are configured on netscaler." ]
[ "Overridden 'consume' method. Corresponding parent method will be called necessary number of times\n\n@param initialVars - a map containing the initial variables assignments\n@return the number of lines written", "Returns the class hierarchy of the given type, from bottom to top, starting with the given class itself.\nInterfaces are not included.\n\n@param clazz the class of interest\n@return the class hierarchy of the given class", "Use this API to delete gslbsite resources of given names.", "Compares two annotated types and returns true if they are the same", "Get a store definition from the given list of store definitions\n\n@param list A list of store definitions\n@param name The name of the store\n@return The store definition", "Enables a dark shadow for this CircularImageView.\nIf the radius is set to 0, the shadow is removed.\n@param radius Radius for the shadow to extend to.\n@param dx Horizontal shadow offset.\n@param dy Vertical shadow offset.\n@param color The color of the shadow to apply.", "Assigns the element in the Matrix to the specified value. Performs a bounds check to make sure\nthe requested element is part of the matrix.\n\n@param row The row of the element.\n@param col The column of the element.\n@param value The element's new value.", "Gets the value of the given header field.\n@param fieldName name of the header field.\n@return value of the header.", "This method retrieves an integer 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 integer data" ]
private void readTaskBaselines(Project.Tasks.Task xmlTask, Task mpxjTask, TimeUnit durationFormat) { for (Project.Tasks.Task.Baseline baseline : xmlTask.getBaseline()) { int number = NumberHelper.getInt(baseline.getNumber()); Double cost = DatatypeConverter.parseCurrency(baseline.getCost()); Duration duration = DatatypeConverter.parseDuration(m_projectFile, durationFormat, baseline.getDuration()); Date finish = baseline.getFinish(); Date start = baseline.getStart(); Duration work = DatatypeConverter.parseDuration(m_projectFile, TimeUnit.HOURS, baseline.getWork()); if (number == 0) { mpxjTask.setBaselineCost(cost); mpxjTask.setBaselineDuration(duration); mpxjTask.setBaselineFinish(finish); mpxjTask.setBaselineStart(start); mpxjTask.setBaselineWork(work); } else { mpxjTask.setBaselineCost(number, cost); mpxjTask.setBaselineDuration(number, duration); mpxjTask.setBaselineFinish(number, finish); mpxjTask.setBaselineStart(number, start); mpxjTask.setBaselineWork(number, work); } } }
[ "Reads baseline values for the current task.\n\n@param xmlTask MSPDI task instance\n@param mpxjTask MPXJ task instance\n@param durationFormat duration format to use" ]
[ "Handles the file deletions.\n\n@param cms the CMS context to use\n@param toDelete the resources to delete\n\n@throws CmsException if something goes wrong", "Use this API to add sslocspresponder resources.", "Traces the duration between origin time in the http Request and time just\nbefore being processed by the fat client\n\n@param operationType\n@param originTimeInMS - origin time in the Http Request\n@param requestReceivedTimeInMs - System Time in ms\n@param keyString", "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.", "1-D Perlin noise function.\n\n@param x X Value.\n@return Returns function's value at point x.", "Get the URL for the user's profile.\n\n@param userId\nThe user ID\n@return The URL\n@throws FlickrException", "Set the group name\n\n@param name new name of server group\n@param id ID of group", "Generate a uniform random number in the range [lo, hi)\n\n@param lo lower limit of range\n@param hi upper limit of range\n@return a uniform random real in the range [lo, hi)", "scroll only once" ]
public static boolean check(String passwd, String hashed) { try { String[] parts = hashed.split("\\$"); if (parts.length != 5 || !parts[1].equals("s0")) { throw new IllegalArgumentException("Invalid hashed value"); } long params = Long.parseLong(parts[2], 16); byte[] salt = decode(parts[3].toCharArray()); byte[] derived0 = decode(parts[4].toCharArray()); int N = (int) Math.pow(2, params >> 16 & 0xffff); int r = (int) params >> 8 & 0xff; int p = (int) params & 0xff; byte[] derived1 = SCrypt.scrypt(passwd.getBytes("UTF-8"), salt, N, r, p, 32); if (derived0.length != derived1.length) return false; int result = 0; for (int i = 0; i < derived0.length; i++) { result |= derived0[i] ^ derived1[i]; } return result == 0; } catch (UnsupportedEncodingException e) { throw new IllegalStateException("JVM doesn't support UTF-8?"); } catch (GeneralSecurityException e) { throw new IllegalStateException("JVM doesn't support SHA1PRNG or HMAC_SHA256?"); } }
[ "Compare the supplied plaintext password to a hashed password.\n\n@param passwd Plaintext password.\n@param hashed scrypt hashed password.\n\n@return true if passwd matches hashed value." ]
[ "Use this API to fetch all the authenticationradiusaction resources that are configured on netscaler.", "Reports that a node is resolved hence other nodes depends on it can consume it.\n\n@param completed the node ready to be consumed", "Adds the word.\n\n@param w the w\n@throws ParseException the parse exception", "Set the end type as derived from other values.", "Performs a query to retrieve all the design documents defined in the database.\n\n@return a list of the design documents from the database\n@throws IOException if there was an error communicating with the server\n@since 2.5.0", "Tests if this enumeration contains more elements.\n@return <code>true</code> if and only if this enumeration object\ncontains at least one more element to provide;\n<code>false</code> otherwise.", "use parseJsonResponse instead", "Load a cubemap texture asynchronously.\n\nThis is the implementation of\n{@link GVRAssetLoader#loadCubemapTexture(GVRAndroidResource.TextureCallback, GVRAndroidResource, int)}\n- it will usually be more convenient (and more efficient) to call that\ndirectly.\n\n@param context\nThe GVRF context\n@param textureCache\nTexture cache - may be {@code null}\n@param callback\nAsynchronous notifications\n@param resource\nBasically, a stream containing a compressed texture. Taking a\n{@link GVRAndroidResource} parameter eliminates six overloads.\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)}", "sets the initialization method for this descriptor" ]
public static <T> void injectEEFields(Iterable<Set<ResourceInjection<?>>> resourceInjectionsHierarchy, T beanInstance, CreationalContext<T> ctx) { for (Set<ResourceInjection<?>> resourceInjections : resourceInjectionsHierarchy) { for (ResourceInjection<?> resourceInjection : resourceInjections) { resourceInjection.injectResourceReference(beanInstance, ctx); } } }
[ "Injects EJBs and other EE resources.\n\n@param resourceInjectionsHierarchy\n@param beanInstance\n@param ctx" ]
[ "Executes an operation on the controller latching onto an existing transaction\n\n@param operation the operation\n@param handler the handler\n@param control the transaction control\n@param prepareStep the prepare step to be executed before any other steps\n@param operationId the id of the current transaction\n@return the result of the operation", "Constructs a Google APIs HTTP client with the associated credentials.", "Set the enum representing the type of this column.\n\n@param tableType type of table to which this column belongs", "Resolve temporary folder.", "Returns the number of consecutive trailing one or zero bits.\nIf network is true, returns the number of consecutive trailing zero bits.\nOtherwise, returns the number of consecutive trailing one bits.\n\n@param network\n@return", "This takes into account scrolling and will be in absolute\ncoordinates where the top left corner of the page is 0,0 but\nthe viewport may be scrolled to something else.", "Convert weekly recurrence days into a bit field.\n\n@param task recurring task\n@return bit field as a string", "Write the table configuration to a buffered writer.", "Call with pathEntries lock taken" ]
private int calculateColor(float angle) { float unit = (float) (angle / (2 * Math.PI)); if (unit < 0) { unit += 1; } if (unit <= 0) { mColor = COLORS[0]; return COLORS[0]; } if (unit >= 1) { mColor = COLORS[COLORS.length - 1]; return COLORS[COLORS.length - 1]; } float p = unit * (COLORS.length - 1); int i = (int) p; p -= i; int c0 = COLORS[i]; int c1 = COLORS[i + 1]; int a = ave(Color.alpha(c0), Color.alpha(c1), p); int r = ave(Color.red(c0), Color.red(c1), p); int g = ave(Color.green(c0), Color.green(c1), p); int b = ave(Color.blue(c0), Color.blue(c1), p); mColor = Color.argb(a, r, g, b); return Color.argb(a, r, g, b); }
[ "Calculate the color using the supplied angle.\n\n@param angle The selected color's position expressed as angle (in rad).\n\n@return The ARGB value of the color on the color wheel at the specified\nangle." ]
[ "Do post exam of child inside the layout after it has been positioned in parent\n@param dataIndex data index", "Creates a new remote proxy controller using an existing channel.\n\n@param channelAssociation the channel association\n@param pathAddress the address within the model of the created proxy controller\n@param addressTranslator the translator to use translating the address for the remote proxy\n@return the proxy controller\n\n@deprecated only present for test case use", "This is the probability density function for the Gaussian\ndistribution.", "Find the channel in the animation that animates the named bone.\n@param boneName name of bone to animate.", "Count the number of working hours in a day, based in the\ninteger representation of the working hours.\n\n@param hours working hours\n@return number of hours", "Polls the next ParsedWord from the stack.\n\n@return next ParsedWord", "Discard the changes.", "Given the current cluster and a zone id that needs to be dropped, this\nmethod will remove all partitions from the zone that is being dropped and\nmove it to the existing zones. The partitions are moved intelligently so\nas not to avoid any data movement in the existing zones.\n\nThis is achieved by moving the partitions to nodes in the surviving zones\nthat is zone-nry to that partition in the surviving zone.\n\n@param currentCluster Current cluster metadata\n@return Returns an interim cluster with empty partition lists on the\nnodes from the zone being dropped", "Get the Operation metadata for an MBean by name.\n@return the {@link Map} of {@link String} operation names to {@link MBeanOperationInfo} values." ]
public static boolean isCacheSafe(Class<?> clazz, ClassLoader classLoader) { Assert.notNull(clazz, "Class must not be null"); try { ClassLoader target = clazz.getClassLoader(); if (target == null) { return true; } ClassLoader cur = classLoader; if (cur == target) { return true; } while (cur != null) { cur = cur.getParent(); if (cur == target) { return true; } } return false; } catch (SecurityException ex) { // Probably from the system ClassLoader - let's consider it safe. return true; } }
[ "Check whether the given class is cache-safe in the given context,\ni.e. whether it is loaded by the given ClassLoader or a parent of it.\n@param clazz the class to analyze\n@param classLoader the ClassLoader to potentially cache metadata in" ]
[ "Add a IN clause so the column must be equal-to one of the objects from the list passed in.", "Does the given class has bidirectional assiciation\nwith some other class?", "For the given service name return list of endpoint references currently\nregistered at the service locator server endpoints.\n\n@param serviceName\nthe name of the service for which to get the endpoints, must\nnot be <code>null</code>\n@return EndpointReferenceListType encapsulate list of endpoint references\nor <code>null</code>", "Checks if the object with the given identity has been deleted\nwithin the transaction.\n@param id The identity\n@return true if the object has been deleted\n@throws PersistenceBrokerException", "Create a transactional protocol client.\n\n@param channelAssociation the channel handler\n@return the transactional protocol client", "We are adding a redeploy operation step for each specified deployment runtime name.\n\n@param context\n@param deploymentsRootAddress\n@param deploymentNames\n@throws OperationFailedException", "Load a list of entities using the information in the context\n\n@param session The session\n@param lockOptions The locking details\n@param ogmContext The context with the information to load the entities\n@return the list of entities corresponding to the given context", "Adds listeners and reads from a stream.\n\n@param reader reader for file type\n@param stream schedule data\n@return ProjectFile instance", "Calculate the value of a swaption assuming the Black'76 model.\n\n@param forwardSwaprate The forward (spot)\n@param volatility The Black'76 volatility.\n@param optionMaturity The option maturity.\n@param optionStrike The option strike.\n@param swapAnnuity The swap annuity corresponding to the underlying swap.\n@return Returns the value of a Swaption under the Black'76 model" ]
public void appointTempoMaster(int deviceNumber) throws IOException { final DeviceUpdate update = getLatestStatusFor(deviceNumber); if (update == null) { throw new IllegalArgumentException("Device " + deviceNumber + " not found on network."); } appointTempoMaster(update); }
[ "Tell a device to become tempo master.\n\n@param deviceNumber the device we want to take over the role of tempo master\n\n@throws IOException if there is a problem sending the command to the device\n@throws IllegalStateException if the {@code VirtualCdj} is not active\n@throws IllegalArgumentException if {@code deviceNumber} is not found on the network" ]
[ "Convert an object to a collection.\n\n@param mapper the object mapper\n@param source the source object\n@param targetCollectionType the target collection type\n@param targetElementType the target collection element type\n@return collection", "only TOP or Bottom", "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", "Adds a property to report design, this properties are mostly used by\nexporters to know if any specific configuration is needed\n\n@param name\n@param value\n@return A Dynamic Report Builder", "Use this API to delete lbroute.", "Use this API to delete dnssuffix of given name.", "Reads numBytes bytes, and returns the corresponding string", "Obtain the name of the caller, most likely a user but could also be a remote process.\n\n@return The name of the caller.", "Create a request for elevations for samples along a path.\n\n@param req\n@param callback" ]
public synchronized void removeControlPoint(ControlPoint controlPoint) { if (controlPoint.decreaseReferenceCount() == 0) { ControlPointIdentifier id = new ControlPointIdentifier(controlPoint.getDeployment(), controlPoint.getEntryPoint()); entryPoints.remove(id); } }
[ "Removes the specified entry point\n\n@param controlPoint The entry point" ]
[ "Return the content from an URL in byte array\n\n@param stringUrl URL to get\n@return byte array\n@throws IOException I/O error happened", "Creates a converter function that converts value using a constructor that accepts a single String argument.\n\n@return A converter function or {@code null} if the given type doesn't have a public constructor that accepts\na single String argument.", "Processes the template for all collection definitions of the current class definition.\n\n@param template The template\n@param attributes The attributes of the tag\n@exception XDocletException if an error occurs\[email protected] type=\"block\"", "Set the values using the specified Properties object\n\n@param properties Properties object containing specific property values\nfor the Coordinator config", "Iterates over all tags of current member and evaluates the template for each one.\n\n@param template The template to be evaluated\n@param attributes The attributes of the template tag\n@exception XDocletException If an error occurs\[email protected] type=\"block\"\[email protected] name=\"tagName\" optional=\"false\" description=\"The tag name.\"\[email protected] name=\"paramName\" optional=\"true\" description=\"The parameter name.\"", "Returns true if all pixels in the array have the same color", "Places a new value at the end of the existing value array, increasing the field length accordingly.\n@param newValue - the 2 floats making the new SFVec2f appended to the MFVec2f array list", "Go through all nodes and determine how many partition Ids each node\nhosts.\n\n@param cluster\n@return map of nodeId to number of primary partitions hosted on node.", "Use this API to delete sslcipher resources of given names." ]
private static void validateIfAvroSchema(SerializerDefinition serializerDef) { if(serializerDef.getName().equals(AVRO_GENERIC_VERSIONED_TYPE_NAME) || serializerDef.getName().equals(AVRO_GENERIC_TYPE_NAME)) { SchemaEvolutionValidator.validateAllAvroSchemas(serializerDef); // check backwards compatibility if needed if(serializerDef.getName().equals(AVRO_GENERIC_VERSIONED_TYPE_NAME)) { SchemaEvolutionValidator.checkSchemaCompatibility(serializerDef); } } }
[ "If provided with an AVRO schema, validates it and checks if there are\nbackwards compatible.\n\nTODO should probably place some similar checks for other serializer types\nas well?\n\n@param serializerDef" ]
[ "Create button message key.\n\n@param gallery name\n@return Button message key as String", "Gets the listener classes to which dispatching should be prevented while\nthis event is being dispatched.\n\n@return The listener classes marked to prevent.\n@see #preventCascade(Class)", "Given the lambda value perform an implicit QR step on the matrix.\n\nB^T*B-lambda*I\n\n@param lambda Stepping factor.", "Destroys all resource requests in requestQueue.\n\n@param requestQueue The queue for which all resource requests are to be\ndestroyed.", "Converts the search results from CmsSearchResource to CmsSearchResourceBean.\n@param searchResults The collection of search results to transform.", "Get the group URL for the specified group ID\n\n@param groupId\nThe group ID\n@return The group URL\n@throws FlickrException", "Gets a SerialMessage with the MULTI INSTANCE GET command.\nReturns the number of instances for this command class.\n@param the command class to return the number of instances for.\n@return the serial message.", "Adds an orthographic camera constructed from the designated\nperspective camera to describe the shadow projection.\nThe field of view and aspect ration of the perspective\ncamera are used to obtain the view volume of the\northographic camera. This type of camera is used\nfor shadows generated by direct lights at infinite distance.\n@param centerCam GVRPerspectiveCamera to derive shadow projection from\n@return Orthographic camera to use for shadow casting\n@see GVRDirectLight", "Gets an iterable of all the groups in the enterprise that are starting with the given name string.\n@param api the API connection to be used when retrieving the groups.\n@param name the name prefix of the groups. If the groups need to searched by full name that has spaces,\nthen the parameter string should have been wrapped with \"\".\n@return an iterable containing info about all the groups." ]
protected String getExpectedMessage() { StringBuilder syntax = new StringBuilder("<tag> "); syntax.append(getName()); String args = getArgSyntax(); if (args != null && args.length() > 0) { syntax.append(' '); syntax.append(args); } return syntax.toString(); }
[ "Provides a message which describes the expected format and arguments\nfor this command. This is used to provide user feedback when a command\nrequest is malformed.\n\n@return A message describing the command protocol format." ]
[ "creates a scope using the passed function to compute the names and sets the passed scope as the parent scope", "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", "This method attempts to locate a suitable directory by checking a number of different configuration sources.\n\n1 - serverConfigUserDirPropertyName - This value is used to check it a matching system property has been set. 2 -\nsuppliedConfigDir - If a path was specified on the command line it is expected to be passed in as this parameter. 3 -\nserverConfigDirPropertyName - This is a second system property to check.\n\nAnd finally if none of these match defaultBaseDir specifies the configuration being searched and is appended to the JBoss\nHome value discovered when the utility started.", "Add a row to the table. We have a limited understanding of the way\nBtrieve handles outdated rows, so we use what we think is a version number\nto try to ensure that we only have the latest rows.\n\n@param primaryKeyColumnName primary key column name\n@param map Map containing row data", "Method signature without \"public void\" prefix\n\n@return The method signature in String format", "Notifies that a content item is changed.\n\n@param position the position.", "Delete rows that match the prepared statement.", "Add a content modification.\n\n@param modification the content modification", "Return the releaseId\n\n@return releaseId" ]
List<W3CEndpointReference> lookupEndpoints(QName serviceName, MatcherDataType matcherData) throws ServiceLocatorFault, InterruptedExceptionFault { SLPropertiesMatcher matcher = createMatcher(matcherData); List<String> names = null; List<W3CEndpointReference> result = new ArrayList<W3CEndpointReference>(); String adress; try { initLocator(); if (matcher == null) { names = locatorClient.lookup(serviceName); } else { names = locatorClient.lookup(serviceName, matcher); } } catch (ServiceLocatorException e) { ServiceLocatorFaultDetail serviceFaultDetail = new ServiceLocatorFaultDetail(); serviceFaultDetail.setLocatorFaultDetail(serviceName.toString() + "throws ServiceLocatorFault"); throw new ServiceLocatorFault(e.getMessage(), serviceFaultDetail); } catch (InterruptedException e) { InterruptionFaultDetail interruptionFaultDetail = new InterruptionFaultDetail(); interruptionFaultDetail.setInterruptionDetail(serviceName .toString() + "throws InterruptionFault"); throw new InterruptedExceptionFault(e.getMessage(), interruptionFaultDetail); } if (names != null && !names.isEmpty()) { for (int i = 0; i < names.size(); i++) { adress = names.get(i); result.add(buildEndpoint(serviceName, adress)); } } else { if (LOG.isLoggable(Level.WARNING)) { LOG.log(Level.WARNING, "lookup Endpoints for " + serviceName + " failed, service is not known."); } ServiceLocatorFaultDetail serviceFaultDetail = new ServiceLocatorFaultDetail(); serviceFaultDetail.setLocatorFaultDetail("lookup Endpoint for " + serviceName + " failed, service is not known."); throw new ServiceLocatorFault("Can not find Endpoint", serviceFaultDetail); } return result; }
[ "For the given service name return list of endpoint references currently\nregistered at the service locator server endpoints.\n\n@param serviceName\nthe name of the service for which to get the endpoints, must\nnot be <code>null</code>\n@return EndpointReferenceListType encapsulate list of endpoint references\nor <code>null</code>" ]
[ "set custom response for profile's default client\n\n@param profileName profileName to modify\n@param pathName friendly name of path\n@param customData custom request data\n@return true if success, false otherwise", "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.", "Get an extent aware Iterator based on the ReportQuery\n\n@param query\n@param cld\n@return OJBIterator", "Use this API to Reboot reboot.", "Sets the location value as string.\n\n@param value the string representation of the location value (JSON)", "get the TypeArgSignature corresponding to given type\n\n@param type\n@return", "Use this API to update autoscaleprofile resources.", "1-D Gabor function.\n\n@param x Value.\n@param mean Mean.\n@param amplitude Amplitude.\n@param position Position.\n@param width Width.\n@param phase Phase.\n@param frequency Frequency.\n@return Gabor response.", "Clone a widget info map considering what may be copied to the client.\n\n@param widgetInfo widget info map\n@return cloned copy including only records which are not {@link ServerSideOnlyInfo}" ]
public void revertWorkingCopy() throws IOException, InterruptedException { build.getWorkspace() .act(new RevertWorkingCopyCallable(getLocation(), getSvnAuthenticationProvider(build), buildListener)); }
[ "Revert all the working copy changes." ]
[ "Send a track metadata update announcement to all registered listeners.", "capture 3D screenshot", "Sort and order steps to avoid unwanted generation", "Retrieves the amount of time represented by a calendar exception\nbefore or after an intersection point.\n\n@param exception calendar exception\n@param date intersection time\n@param after true to report time after intersection, false to report time before\n@return length of time in milliseconds", "main class entry point.", "Resize the key data area.\nThis function will truncate the keys if the\ninitial setting was too large.\n\n@oaran numKeys the desired number of keys", "Use this API to rename a responderpolicy resource.", "File URLs whose protocol are in these list will be processed as jars\ncontaining classes\n\n@param fileProtocols\nComma separated list of file protocols that will be considered\nas jar files and scanned", "Core implementation of matchPath. It is isolated so that it can be called\nfrom TokenizedPattern." ]
public final Iterator<AbstractTraceRegion> leafIterator() { if (nestedRegions == null) return Collections.<AbstractTraceRegion> singleton(this).iterator(); return new LeafIterator(this); }
[ "Returns an iterator that will only offer leaf trace regions. If the nested regions have gaps, these will be\nfilled with parent data. If this region is a leaf, a singleton iterator will be returned.\n\n@return an unmodifiable iterator for all leafs. Never <code>null</code>." ]
[ "Add component processing time to given map\n@param mapComponentTimes\n@param component", "This returns all profiles associated with a server name\n\n@param serverName server Name\n@return profile UUID\n@throws Exception exception", "Validate the header signature.\n\n@param input The input to read the signature from\n@throws IOException If any read problems occur", "Determines the address for the host being used.\n\n@param client the client used to communicate with the server\n\n@return the address of the host\n\n@throws IOException if an error occurs communicating with the server\n@throws OperationExecutionException if the operation used to determine the host name fails", "Called to update the cached formats when something changes.", "Returns the y-coordinate of a vertex tangent.\n\n@param vertex the vertex index\n@return the y coordinate", "Reads data from the SP file.\n\n@return Project File instance", "Shrinks the alert message body so that the resulting payload\nmessage fits within the passed expected payload length.\n\nThis method performs best-effort approach, and its behavior\nis unspecified when handling alerts where the payload\nwithout body is already longer than the permitted size, or\nif the break occurs within word.\n\n@param payloadLength the expected max size of the payload\n@param postfix for the truncated body, e.g. \"...\"\n@return this", "Additional bean deployment archives are used for extentions, synthetic annotated types and beans which do not come from a bean archive.\n\n@param beanClass\n@return the additional bean deployment archive" ]
public void setShortAttribute(String name, Short value) { ensureValue(); Attribute attribute = new ShortAttribute(value); attribute.setEditable(isEditable(name)); getValue().getAllAttributes().put(name, attribute); }
[ "Sets the specified short attribute to the specified value.\n\n@param name name of the attribute\n@param value value of the attribute\n@since 1.9.0" ]
[ "Upload file and set odo overrides and configuration of odo\n\n@param fileName File containing configuration\n@param odoImport Import odo configuration in addition to overrides\n@return If upload was successful", "Parses the list of query items for the query facet.\n@param queryFacetObject JSON object representing the node with the query facet.\n@return list of query options\n@throws JSONException if the list cannot be parsed.", "Extract data for a single predecessor.\n\n@param task parent task\n@param row Synchro predecessor data", "Convert string to qname.\n\n@param str the string\n@return the qname", "Generate a schedule for the given start and end date.\n\n@param referenceDate The reference date (corresponds to \\( t = 0 \\).\n@param startDate The start date.\n@param endDate The end date.\n@return The schedule", "Return a string that ensures that no line is longer then 512 characters\nand lines are broken according to manifest specification.\n\n@param input The buffer containing the content that should be made safe\n@param newline The string to use to create newlines (usually \"\\n\" or\n\"\\r\\n\")\n@return The string with no longer lines then 512, ready to be read again\nby {@link MergeableManifest2}.", "Returns the accrued interest of the bond for a given time.\n\n@param time The time of interest as double.\n@param model The model under which the product is valued.\n@return The accrued interest.", "Use this API to update snmpuser.", "Returns the user records for all users in the specified workspace or\norganization.\n\n@param workspace The workspace in which to get users.\n@return Request object" ]
@Override public void run() { ExecutorService executorService = Executors.newFixedThreadPool(maxClients); try { serverSocket = new ServerSocket(port, maxClients); while (!shuttingDown) { try { Socket socket = serverSocket.accept(); debugConnection = new DebugConnection(socket); executorService.submit(debugConnection); } catch (SocketException e) { // closed debugConnection = null; } } } catch (IOException e) { e.printStackTrace(); } finally { try { debugConnection = null; serverSocket.close(); } catch (Exception e) { } executorService.shutdownNow(); } }
[ "Runs the server." ]
[ "This method writes resource data to a PM XML file.", "Reorder the objects in the table to resolve referential integrity dependencies.", "All tests completed.", "Gets the first group of a regex\n@param pattern Pattern\n@param str String to find\n@return the matching group", "Use this API to fetch gslbsite resources of given names .", "Places a new value at the end of the existing value array, increasing the field length accordingly.\n@param newValue - the 2 floats making the new SFVec2f appended to the MFVec2f array list", "Log a message with a throwable at the provided level.", "Determines the offset code of a forward contract from a schedule. Rounds the average period length to full months.\n\n@param schedule The schedule.\n@return The offset code as String", "Load in a number of database configuration entries from a buffered reader." ]
public static sslservice[] get(nitro_service service) throws Exception{ sslservice obj = new sslservice(); sslservice[] response = (sslservice[])obj.get_resources(service); return response; }
[ "Use this API to fetch all the sslservice resources that are configured on netscaler." ]
[ "adds a CmsJspImageBean as hi-DPI variant to this image\n@param factor the variant multiplier, e.g. \"2x\" (the common retina multiplier)\n@param image the image to be used for this variant", "performs a SELECT operation against RDBMS.\n@param query the query string.\n@param cld ClassDescriptor providing JDBC information.", "Grab random holiday from the equivalence class that falls between the two dates\n\n@param earliest the earliest date parameter as defined in the model\n@param latest the latest date parameter as defined in the model\n@return a holiday that falls between the dates", "Remove all the existing links of the Declaration.\n\n@param declarationSRef the ServiceReference<Declaration> of the Declaration", "Add a new download. The download will start automatically once the download manager is\nready to execute it and connectivity is available.\n\n@param request the parameters specifying this download\n@return an ID for the download, unique across the application. This ID is used to make future\ncalls related to this download.\n@throws IllegalArgumentException", "get the key name to use in log from the logging keys map", "Use this API to add dnssuffix.", "Replace a single value at the appropriate location in the existing value array.\n@param index - location in the array list\n@param newValue - the new String", "Use this API to fetch aaagroup_authorizationpolicy_binding resources of given name ." ]
@Subscribe public void onQuit(AggregatedQuitEvent e) { if (jsonWriter == null) return; try { jsonWriter.endArray(); jsonWriter.name("slaves"); jsonWriter.beginObject(); for (Map.Entry<Integer, ForkedJvmInfo> entry : slaves.entrySet()) { jsonWriter.name(Integer.toString(entry.getKey())); entry.getValue().serialize(jsonWriter); } jsonWriter.endObject(); jsonWriter.endObject(); jsonWriter.flush(); if (!Strings.isNullOrEmpty(jsonpMethod)) { writer.write(");"); } jsonWriter.close(); jsonWriter = null; writer = null; if (method == OutputMethod.HTML) { copyScaffolding(targetFile); } } catch (IOException x) { junit4.log(x, Project.MSG_ERR); } }
[ "All tests completed." ]
[ "Sets the delegate of the service, that gets notified of the\nstatus of message delivery.\n\nNote: This option has no effect when using non-blocking\nconnections.", "Use this API to reset appfwlearningdata resources.", "Parse a version String and add the components to a properties object.\n\n@param version the version to parse", "Performs a partial BFS on model until the search frontier reaches the desired bootstrap size\n\n@param min the desired bootstrap size\n@return a list of found PossibleState\n@throws ModelException if the desired bootstrap can not be reached", "Retrieve the default mapping between MPXJ assignment fields and Primavera assignment field names.\n\n@return mapping", "This method reads a six byte long from the input array.\n\n@param data the input array\n@param offset offset of integer data in the array\n@return integer value", "Initializes the components.\n\n@param components the components", "Utility function that converts a list to a map.\n\n@param list The list in which even elements are keys and odd elements are\nvalues.\n@rturn The map container that maps even elements to odd elements, e.g.\n0->1, 2->3, etc.", "Get an ObjectReferenceDescriptor by name BRJ\n@param name\n@return ObjectReferenceDescriptor or null" ]
private static String getJsonFromRaw(Context context, int resource) { String json; try { InputStream inputStream = context.getResources().openRawResource(resource); int size = inputStream.available(); byte[] buffer = new byte[size]; inputStream.read(buffer); inputStream.close(); json = new String(buffer, "UTF-8"); } catch (IOException ex) { ex.printStackTrace(); return null; } return json; }
[ "Fetch JSON from RAW resource\n\n@param context Context\n@param resource Resource int of the RAW file\n@return JSON" ]
[ "Calls beforeMaterialization on all registered listeners in the reverse\norder of registration.", "Use this API to fetch lbmonbindings_servicegroup_binding resources of given name .", "Creates a converter function that converts value into primitive type.\n\n@return A converter function or {@code null} if the given type is not primitive type or boxed type", "Use this API to update snmpmanager resources.", "Helper method that creates a Velocity context and initialises it\nwith a reference to the ReportNG utils, report metadata and localised messages.\n@return An initialised Velocity context.", "Associate the batched Children with their owner object.\nLoop over owners", "Read a four byte integer from the data.\n\n@param offset current offset into data block\n@param data data block\n@return int value", "Check if the print has not been asked to stop taking new jobs.\n\n@return true if it's OK to take new jobs.", "Calculates the bearing, in degrees, of the end LatLong point from this\nLatLong point.\n\n@param end The point that the bearing is calculated for.\n@return The bearing, in degrees, of the supplied point from this point." ]
private void destroyRequestQueue(Queue<AsyncResourceRequest<V>> requestQueue) { if(requestQueue != null) { AsyncResourceRequest<V> resourceRequest = requestQueue.poll(); while(resourceRequest != null) { destroyRequest(resourceRequest); resourceRequest = requestQueue.poll(); } } }
[ "Destroys all resource requests in requestQueue.\n\n@param requestQueue The queue for which all resource requests are to be\ndestroyed." ]
[ "Verifies given web-hook information.\n\n@param signatureVersion\nsignature version received from web-hook\n@param signatureAlgorithm\nsignature algorithm received from web-hook\n@param primarySignature\nprimary signature received from web-hook\n@param secondarySignature\nsecondary signature received from web-hook\n@param webHookPayload\npayload of web-hook\n@param deliveryTimestamp\ndevilery timestamp received from web-hook\n@return true, if given payload is successfully verified against primary and secondary signatures, false otherwise", "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", "Send a get artifacts request\n\n@param hasLicense\n@return list of artifact\n@throws GrapesCommunicationException", "This is a generic function for retrieving any config value. The returned value\nis the one the server is operating with, no matter whether it comes from defaults\nor from the user-supplied configuration.\n\nThis function only provides access to configs which are deemed safe to share\npublicly (i.e.: not security-related configs). The list of configs which are\nconsidered off-limit can itself be configured via '{@value #RESTRICTED_CONFIGS}'.\n\n@param key config key for which to retrieve the value.\n@return the value for the requested config key, in String format.\nMay return null if the key exists and its value is explicitly set to null.\n@throws UndefinedPropertyException if the requested key does not exist in the config.\n@throws ConfigurationException if the requested key is not publicly available.", "Converts Observable of page to Observable of Inner.\n@param <InnerT> type of inner.\n@param innerPage Page to be converted.\n@return Observable for list of inner.", "Given a BSON document, remove any forbidden fields and return the document. If no changes are\nmade, the original document reference is returned. If changes are made, a cloned copy of the\ndocument with the changes will be returned.\n\n@param document the document from which to remove forbidden fields\n\n@return a BsonDocument without any forbidden fields.", "Delete a path recursively, not throwing Exception if it fails or if the path is null.\n@param path a Path pointing to a file or a directory that may not exists anymore.", "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.", "Try to fire a given event on the Browser.\n\n@param eventable the eventable to fire\n@return true iff the event is fired" ]
public Object selectElement(String predicate) throws org.odmg.QueryInvalidException { return ((DList) this.query(predicate)).get(0); }
[ "Selects the single element of the collection for which the provided OQL query\npredicate is true.\n@param\tpredicate\tAn OQL boolean query predicate.\n@return The element that evaluates to true for the predicate. If no element\nevaluates to true, null is returned.\n@exception\torg.odmg.QueryInvalidException\tThe query predicate is invalid." ]
[ "GetJob helper - String predicates are all created the same way, so this factors some code.", "Extracts the data for a single file from the input stream and writes\nit to a target directory.\n\n@param stream input stream\n@param dir target directory", "Use this API to delete appfwjsoncontenttype of given name.", "Converts a row major block matrix into a row major matrix.\n\n@param src Original DMatrixRBlock.. Not modified.\n@param dst Equivalent DMatrixRMaj. Modified.", "Record the duration of a get_all operation, along with how many values\nwere requested, how may were actually returned and the size of the values\nreturned.", "Encrypts data.\n\n@param plainData {@code initVector || payload || zeros:4}\n@return {@code initVector || E(payload) || I(signature)}", "Merge the two maps.\n\n<p>\nThe replied map is a view on the given map. It means that any change\nin the original map is reflected to the result of this operation.\n</p>\n\n<p>\nIf a key exists in the left and right operands, the value in the right operand is preferred.\n</p>\n\n@param <K> type of the map keys.\n@param <V> type of the map values.\n@param left the left map.\n@param right the right map.\n@return a map with the merged contents from the two maps.\n@throws IllegalArgumentException - when a right operand key exists in the left operand.\n@since 2.15", "Get a property as a array or throw exception.\n\n@param key the property name", "Returns first enum constant found..\n\n@param styleName Space-separated list of styles\n@param enumClass Type of enum\n@param defaultValue Default value of no match was found\n@return First enum constant found or default value" ]
@SuppressWarnings("unchecked") protected String addPostRunDependent(Creatable<? extends Indexable> creatable) { TaskGroup.HasTaskGroup dependency = (TaskGroup.HasTaskGroup) creatable; return this.addPostRunDependent(dependency); }
[ "Add a creatable \"post-run\" dependent for this task item.\n\n@param creatable the creatable \"post-run\" dependent.\n@return the key to be used as parameter to taskResult(string) method to retrieve created \"post-run\" dependent" ]
[ "Send a device lost announcement to all registered listeners.\n\n@param announcement the last message received from the vanished device", "Write the criteria elements, extracting the information of the sub-model.\n\n@param writer the xml stream writer\n@param subModel the interface model\n@param nested whether it the criteria elements are nested as part of <not /> or <any />\n@throws XMLStreamException", "Resets all member fields that hold information about the revision that is\ncurrently being processed.", "Starts the animation with the given index.\n@param animIndex 0-based index of {@link GVRAnimator} to start;\n@see GVRAvatar#stop()\n@see #start(String)", "returns an Array with an Objects PK VALUES, with any java-to-sql\nFieldConversion applied. If the Object is a Proxy or a VirtualProxy NO\nconversion is necessary.\n\n@param objectOrProxy\n@return Object[]\n@throws PersistenceBrokerException", "Populates a calendar hours instance.\n\n@param record MPX record\n@param hours calendar hours instance\n@throws MPXJException", "Load assertion from the provided json or throw exception if not possible.\n\n@param encodedAssertion the assertion as it was encoded in JSON.", "dst is just for log information", "Creates a simple, annotation defined Enterprise Web Bean using the annotations specified on type\n\n@param <T> The type\n@param beanManager the current manager\n@param type the AnnotatedType to use\n@return An Enterprise Web Bean" ]
public SerialMessage getSupportedMessage() { logger.debug("Creating new message for application command SENSOR_ALARM_SUPPORTED_GET for node {}", this.getNode().getNodeId()); if (this.getNode().getManufacturer() == 0x010F && this.getNode().getDeviceType() == 0x0501) { logger.warn("Detected Fibaro FGBS001 Universal Sensor - this device fails to respond to SENSOR_ALARM_GET and SENSOR_ALARM_SUPPORTED_GET."); return null; } SerialMessage result = new SerialMessage(this.getNode().getNodeId(), SerialMessage.SerialMessageClass.SendData, SerialMessage.SerialMessageType.Request, SerialMessage.SerialMessageClass.ApplicationCommandHandler, SerialMessage.SerialMessagePriority.Get); byte[] newPayload = { (byte) this.getNode().getNodeId(), 2, (byte) getCommandClass().getKey(), (byte) SENSOR_ALARM_SUPPORTED_GET }; result.setMessagePayload(newPayload); return result; }
[ "Gets a SerialMessage with the SENSOR_ALARM_SUPPORTED_GET command\n@return the serial message, or null if the supported command is not supported." ]
[ "Add a resource assignment which has been populated elsewhere.\n\n@param assignment resource assignment", "Add a row to the table if it does not already exist\n\n@param cells String...", "Initializes a type\n\n@param name The name of the class\n@return The instance of the class. Returns a dummy if the class was not\nfound.", "This is a convenience method to add a default derived\ncalendar to the project.\n\n@return new ProjectCalendar instance", "It is possible for the QR algorithm to get stuck in a loop because of symmetries. This happens\nmore often with larger matrices. By taking a random step it can break the symmetry and finish.", "Map the currency separator character to a symbol name.\n\n@param c currency separator character\n@return symbol name", "Perform construction.\n\n@param callbackHandler", "Loads a CRF classifier from a filepath, and returns it.\n\n@param file\nFile 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", "Used to map from a var data key to a field type. Note this\nis designed for diagnostic use only, and uses an inefficient search.\n\n@param key var data key\n@return field type" ]
public static MarvinImage rgbToBinary(MarvinImage img, int threshold) { MarvinImage resultImage = new MarvinImage(img.getWidth(), img.getHeight(), MarvinImage.COLOR_MODEL_BINARY); for (int y = 0; y < img.getHeight(); y++) { for (int x = 0; x < img.getWidth(); x++) { int gray = (int) ((img.getIntComponent0(x, y) * 0.3) + (img.getIntComponent1(x, y) * 0.59) + (img.getIntComponent2(x, y) * 0.11)); if (gray <= threshold) { resultImage.setBinaryColor(x, y, true); } else { resultImage.setBinaryColor(x, y, false); } } } return resultImage; }
[ "Converts an image in RGB mode to BINARY mode\n\n@param img image\n@param threshold grays cale threshold\n@return new MarvinImage instance in BINARY mode" ]
[ "Read all task relationships from a ConceptDraw PROJECT file.\n\n@param cdp ConceptDraw PROJECT file", "Merge a new subsystem from the global registration.\n\n@param registry the global registry\n@param subsystemName the subsystem name\n@param version the subsystem version", "Creates a list of all permutations for a set with N elements.\n\n@param N Number of elements in the list being permuted.\n@return A list containing all the permutations.", "Reads the text files in the given directory and puts their content\nin the given map after compressing it. Note that this method does not\ntraverse recursivly into sub-directories.\n\n@param dir The directory to process\n@param results Map that will receive the contents (indexed by the relative filenames)\n@throws IOException If an error ocurred", "Returns the ReportModel with given name.", "A henson navigator is a class that helps a consumer to consume the navigation api that it\ndeclares in its dependencies. The henson navigator will wrap the intent builders. Thus, a\nhenson navigator, is driven by consumption of intent builders, whereas the henson classes are\ndriven by the production of an intent builder.\n\n<p>This task is created per android variant:\n\n<ul>\n<li>we scan the variant compile configuration for navigation api dependencies\n<li>we generate a henson navigator class for this variant that wraps the intent builders\n</ul>\n\n@param variant the variant for which to create a builder.\n@param hensonNavigatorPackageName the package name in which we create the class.", "Returns the position of the specified value in the specified array.\n\n@param value the value to search for\n@param array the array to search in\n@return the position of the specified value in the specified array", "Returns a source excerpt of a JavaDoc link to a method on this type.", "Add all headers in a header multimap.\n\n@param headers a multimap of headers.\n@return the interceptor instance itself." ]
private void countCooccurringProperties( StatementDocument statementDocument, UsageRecord usageRecord, PropertyIdValue thisPropertyIdValue) { for (StatementGroup sg : statementDocument.getStatementGroups()) { if (!sg.getProperty().equals(thisPropertyIdValue)) { Integer propertyId = getNumId(sg.getProperty().getId(), false); if (!usageRecord.propertyCoCounts.containsKey(propertyId)) { usageRecord.propertyCoCounts.put(propertyId, 1); } else { usageRecord.propertyCoCounts.put(propertyId, usageRecord.propertyCoCounts.get(propertyId) + 1); } } } }
[ "Counts each property for which there is a statement in the given item\ndocument, ignoring the property thisPropertyIdValue to avoid properties\ncounting themselves.\n\n@param statementDocument\n@param usageRecord\n@param thisPropertyIdValue" ]
[ "Adds a submodule to the module.\n\n<P>\nINFO: If the module is promoted, all added submodule will be promoted.\n\n@param submodule Module", "Use this API to fetch dnsview_binding resource of given name .", "Guess the type of the given dump from its filename.\n\n@param fileName\n@return dump type, defaulting to JSON if no type was found", "Array of fieldNames for which counts should be produced\n\n@param countsfields array of the field names\n@return this for additional parameter setting or to query", "Wait until a scan of the table completes without seeing notifications AND without the Oracle\nissuing any timestamps during the scan.", "Sets the yearly absolute date.\n\n@param date yearly absolute date", "Initialize the various DAO configurations after the various setters have been called.", "Process an individual UDF.\n\n@param udf UDF definition", "Given an AVRO serializer definition, validates if all the avro schemas\nare valid i.e parseable.\n\n@param avroSerDef" ]
private void populateContainer(FieldType field, List<Pair<String, String>> items) { CustomField config = m_container.getCustomField(field); CustomFieldLookupTable table = config.getLookupTable(); for (Pair<String, String> pair : items) { CustomFieldValueItem item = new CustomFieldValueItem(Integer.valueOf(0)); item.setValue(pair.getFirst()); item.setDescription(pair.getSecond()); table.add(item); } }
[ "Populate the container from outline code data.\n\n@param field field type\n@param items pairs of values and descriptions" ]
[ "Saves the messages for all languages that were opened in the editor.\n\n@throws CmsException thrown if saving fails.", "Loads the schemas associated to this catalog.", "Invalidate layout setup.", "This internal method is used to convert from a Date instance to an\ninteger representing the number of minutes past midnight.\n\n@param date date instance\n@return minutes past midnight as an integer", "Iterates over all tokens in current member tag with the name tagName and evaluates the body for every token.\n\n@param template The body of the block tag\n@param attributes The attributes of the template tag\n@exception XDocletException If an error occurs\[email protected] type=\"block\"\[email protected] name=\"tagName\" optional=\"false\" description=\"The tag name.\"\[email protected] name=\"delimiter\" description=\"delimiter for the StringTokenizer. consult javadoc for\njava.util.StringTokenizer default is ','\"\[email protected] name=\"skip\" description=\"how many tokens to skip on start\"", "Merges a specialized archetype with its parent. Merge will be done in-place on the specialized parameter.\n\n@param flatParent Flat parent archetype\n@param specialized Specialized archetype", "Store the data of a print job in the registry.\n\n@param printJobStatus the print job status", "Little helper function that recursivly deletes a directory.\n\n@param dir The directory", "perform rollback on all tx-states" ]
public void addSource(GVRAudioSource audioSource) { synchronized (mAudioSources) { if (!mAudioSources.contains(audioSource)) { audioSource.setListener(this); mAudioSources.add(audioSource); } } }
[ "Adds an audio source to the audio manager.\nAn audio source cannot be played unless it is\nadded to the audio manager. A source cannot be\nadded twice.\n@param audioSource audio source to add" ]
[ "Determine which type of percent complete is used on on this task,\nand calculate the required value.\n\n@param row task data\n@return percent complete value", "Returns the mode in the Collection. If the Collection has multiple modes, this method picks one\narbitrarily.", "Retrieve the dir pointed to by 'latest' symbolic-link or the current\nversion dir\n\n@return Current version directory, else null", "Use this API to Force clustersync.", "do the parsing on an JSONObject, assumes that the json is hierarchical\nordered, so all shapes are reachable over child relations\n@param json hierarchical JSON object\n@return Model with all shapes defined in JSON\n@throws org.json.JSONException", "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.", "Specifies the timeout for a network request.\n\n@param timeout The timeout for a network request.\n@param unit The time unit of the specified timeout.\n@return This builder instance.", "Only sets and gets that are by row and column are used.", "Use this API to count dnszone_domain_binding resources configued on NetScaler." ]
protected void processAssignmentBaseline(Row row) { Integer id = row.getInteger("ASSN_UID"); ResourceAssignment assignment = m_assignmentMap.get(id); if (assignment != null) { int index = row.getInt("AB_BASE_NUM"); assignment.setBaselineStart(index, row.getDate("AB_BASE_START")); assignment.setBaselineFinish(index, row.getDate("AB_BASE_FINISH")); assignment.setBaselineWork(index, row.getDuration("AB_BASE_WORK")); assignment.setBaselineCost(index, row.getCurrency("AB_BASE_COST")); } }
[ "Read resource assignment baseline values.\n\n@param row result set row" ]
[ "Use this API to fetch all the nsacl6 resources that are configured on netscaler.", "Resize the key data area.\nThis function will truncate the keys if the\ninitial setting was too large.\n\n@oaran numKeys the desired number of keys", "Create an `AppDescriptor` with appName and entry class specified.\n\nIf `appName` is `null` or blank, it will try the following\napproach to get app name:\n\n1. check the {@link Version#getArtifactId() artifact id} and use it unless\n2. if artifact id is null or empty, then infer app name using {@link AppNameInferer}\n\n@param appName\nthe app name\n@param entryClass\nthe entry class\n@return\nan `AppDescriptor` instance", "The length of the region left to the completion offset that is part of the\nreplace region.", "Sets the maximum time to wait before a call to getConnection is timed out.\n\nSetting this to zero is similar to setting it to Long.MAX_VALUE\n\n@param connectionTimeout\n@param timeUnit the unit of the connectionTimeout argument", "Process the host info and determine which configuration elements are required on the slave host.\n\n@param hostInfo the host info\n@param root the model root\n@param extensionRegistry the extension registry\n@return", "Removes a named property from the object.\n\nIf the property is not found, no action is taken.\n\n@param name the name of the property", "Group results by the specified field.\n\n@param fieldName by which to group results\n@param isNumber whether field isNumeric.\n@return this for additional parameter setting or to query", "The transaction will be executed with caching enabled. However, all newly cached values will be discarded as soon\nas the transaction is over.\n@since 2.1" ]
public static int scale(Double factor, int pixel) { return rgb( (int) Math.round(factor * red(pixel)), (int) Math.round(factor * green(pixel)), (int) Math.round(factor * blue(pixel)) ); }
[ "Scales the brightness of a pixel." ]
[ "Get an integer property override value.\n@param name the {@link CircuitBreaker} name.\n@param key the property override key.\n@return the property override value, or null if it is not found.", "Convert a drawable object into a Bitmap.\n@param drawable Drawable to extract a Bitmap from.\n@return A Bitmap created from the drawable parameter.", "Dump the buffer contents to a file\n@param file\n@throws IOException", "On key down we assume the key will go at the end. It's the most\ncommon case and not that distracting if that's not true.", "Check if a position is within a circle\n\n@param x x position\n@param y y position\n@param centerX center x of circle\n@param centerY center y of circle\n@return true if within circle, false otherwise", "Convert from a DTO to an internal Spring bean definition.\n\n@param beanDefinitionDto The DTO object.\n@return Returns a Spring bean definition.", "Get a property as a json array or default.\n\n@param key the property name\n@param defaultValue default", "Add parameter to testCase\n\n@param context which can be changed", "Use this API to fetch sslciphersuite resources of given names ." ]
public <L extends Listener> void popEvent(Event<?, L> expected) { synchronized (this.stack) { final Event<?, ?> actual = this.stack.pop(); if (actual != expected) { throw new IllegalStateException(String.format( "Unbalanced pop: expected '%s' but encountered '%s'", expected.getListenerClass(), actual)); } } }
[ "Pops the top event off the current event stack. This action has to be\nperformed immediately after the event has been dispatched to all\nlisteners.\n\n@param <L> Type of the listener.\n@param expected The Event which is expected at the top of the stack.\n@see #pushEvent(Event)" ]
[ "Get the upload parameters.\n@return", "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", "Copy the contents of this buffer begginning from the srcOffset to a destination byte array\n@param srcOffset\n@param destArray\n@param destOffset\n@param size", "Send message to all connections labeled with tag specified\nwith self connection excluded\n\n@param message the message to be sent\n@param tag the string that tag the connections to be sent\n@return this context", "This method is called by the ++ operator for the class CharSequence.\nIt increments the last character in the given CharSequence. If the last\ncharacter in the CharSequence is Character.MAX_VALUE a Character.MIN_VALUE\nwill be appended. The empty CharSequence is incremented to a string\nconsisting of the character Character.MIN_VALUE.\n\n@param self a CharSequence\n@return a value obtained by incrementing the toString() of the CharSequence\n@since 1.8.2", "Returns the resolution of resolving the conflict between a local and remote event using\nthe given conflict resolver.\n\n@param conflictResolver the conflict resolver to use.\n@param documentId the document id related to the conflicted events.\n@param localEvent the conflicted local event.\n@param remoteEvent the conflicted remote event.\n@return the resolution to the conflict.", "Converts a tab delimited string into an object with given fields\nRequires the object has public access for the specified fields\n\n@param objClass Class of object to be created\n@param str string to convert\n@param delimiterPattern delimiter\n@param fieldNames fieldnames\n@param <T> type to return\n@return Object created from string", "return a prepared Insert Statement fitting for the given ClassDescriptor", "Deletes the specified shovel from specified virtual host.\n\n@param vhost virtual host from where to delete the shovel\n@param shovelname Shovel to be deleted." ]
private boolean isSplit(ProjectCalendar calendar, List<TimephasedWork> list) { boolean result = false; for (TimephasedWork assignment : list) { if (calendar != null && assignment.getTotalAmount().getDuration() == 0) { Duration calendarWork = calendar.getWork(assignment.getStart(), assignment.getFinish(), TimeUnit.MINUTES); if (calendarWork.getDuration() != 0) { result = true; break; } } } return result; }
[ "Test to determine if this is a split task.\n\n@param calendar current calendar\n@param list timephased resource assignment list\n@return boolean flag" ]
[ "Set a custom response for this path\n\n@param pathName name of path\n@param customResponse value of custom response\n@return true if success, false otherwise\n@throws Exception exception", "Runs a query that returns a single int.", "This method is used by non-blocking code to determine if the give buffer\nrepresents a complete request. Because the non-blocking code can by\ndefinition not just block waiting for more data, it's possible to get\npartial reads, and this identifies that case.\n\n@param buffer Buffer to check; the buffer is reset to position 0 before\ncalling this method and the caller must reset it after the call\nreturns\n@return True if the buffer holds a complete request, false otherwise", "Stop announcing ourselves and listening for status updates.", "Get a project according to its full name.\n\n@param fullName The full name of the project.\n@return The project which answers the full name.", "Check that an array only contains elements that are not null.\n@param values, can't be null\n@return", "Returns a BSON version document representing a new version with a new instance ID, and\nversion counter of zero.\n@return a BsonDocument representing a synchronization version", "Discards any tracks from the hot cache that were loaded from a now-unmounted media slot, because they are no\nlonger valid.", "Attachments are only structurally different if one step has an inline attachment\nand the other step either has no inline attachment or the inline attachment is\ndifferent." ]
private void processResource(MapRow row) throws IOException { Resource resource = m_project.addResource(); resource.setName(row.getString("NAME")); resource.setGUID(row.getUUID("UUID")); resource.setEmailAddress(row.getString("EMAIL")); resource.setHyperlink(row.getString("URL")); resource.setNotes(getNotes(row.getRows("COMMENTARY"))); resource.setText(1, row.getString("DESCRIPTION")); resource.setText(2, row.getString("SUPPLY_REFERENCE")); resource.setActive(true); List<MapRow> resources = row.getRows("RESOURCES"); if (resources != null) { for (MapRow childResource : sort(resources, "NAME")) { processResource(childResource); } } m_resourceMap.put(resource.getGUID(), resource); }
[ "Extract data for a single resource.\n\n@param row Synchro resource data" ]
[ "Build the context name.\n\n@param objs the objects\n@return the global context name", "Handle changes of the series check box.\n@param event the change event.", "Checks the preconditions for creating a new IsIncludedIn processor with a Set of Objects.\n\n@param possibleValues\nthe Set of possible values\n@throws NullPointerException\nif possibleValues is null\n@throws IllegalArgumentException\nif possibleValues is empty", "Log a fatal message with a throwable.", "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)", "Filters a list of rows from the named table. If a column name and a value\nare supplied, then use this to filter the rows. If no column name is\nsupplied, then return all rows.\n\n@param tableName table name\n@param columnName filter column name\n@param id filter column value\n@return filtered list of rows", "Checks the status of one or more asynchronous photo upload tickets. This method does not require authentication.\n\n@param tickets\na set of ticket ids (Strings) or {@link Ticket} objects containing ids\n@return a list of {@link Ticket} objects.\n@throws FlickrException", "Computes the eigenvalue of the 2 by 2 matrix.", "Retrieve and validate vector clock value from the REST request.\n\"X_VOLD_VECTOR_CLOCK\" is the vector clock header.\n\n@return true if present, false if missing" ]
public static <T> T assertNull(T value, String message) { if (value != null) throw new IllegalStateException(message); return value; }
[ "Throws an IllegalStateException when the given value is not null.\n@return the value" ]
[ "Reads a \"date-time\" argument from the request.", "A loop driver for applying operations to all primary ClassNodes in\nour AST. Automatically skips units that have already been processed\nthrough the current phase.", "Finds edges based to a specific object reference descriptor and\nadds them to the edge map.\n@param vertex the object envelope vertex holding the object reference\n@param rds the object reference descriptor", "The sniffing Loggers are some special Loggers, whose level will be set to TRACE forcedly.\n@param logger", "Build a request URL.\n\n@param host\nThe host\n@param port\nThe port\n@param path\nThe path\n@param parameters\nThe parameters\n@return The URL\n@throws MalformedURLException\n@deprecated use {@link #buildSecureUrl(java.lang.String, int, java.lang.String, java.util.Map) }", "Creates a ServiceFuture from an Completable object and a callback.\n\n@param completable the completable to create from\n@param callback the callback to call when event happen\n@return the created ServiceFuture", "Helper function to bind script bundler to various targets", "Add a '=' clause so the column must be equal to the value.", "Private used static method for creation of a RemoteWebDriver. Taking care of the default\nCapabilities and using the HttpCommandExecutor.\n\n@param hubUrl the url of the hub to use.\n@return the RemoteWebDriver instance." ]
static boolean uninstall() { boolean uninstalled = false; synchronized (lock) { if (locationCollectionClient != null) { locationCollectionClient.locationEngineController.onDestroy(); locationCollectionClient.settingsChangeHandlerThread.quit(); locationCollectionClient.sharedPreferences.unregisterOnSharedPreferenceChangeListener(locationCollectionClient); locationCollectionClient = null; uninstalled = true; } } return uninstalled; }
[ "Uninstall current location collection client.\n\n@return true if uninstall was successful" ]
[ "The amount of time to keep an idle client thread alive\n\n@param threadIdleTime", "Read an element which contains only a single list attribute of a given\ntype, returning it as an array.\n@param reader the reader\n@param attributeName the attribute name, usually \"value\"\n@param type the value type class\n@param <T> the value type\n@return the value list as an array\n@throws javax.xml.stream.XMLStreamException if an error occurs or if the\nelement does not contain the specified attribute, contains other\nattributes, or contains child elements.", "Use this API to add authenticationradiusaction.", "For internal use! This method creates real new PB instances", "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", "Evalutes AND and OR operators.\n\n@param container data context\n@param promptValues responses to prompts\n@return operator result", "Create an element that represents a horizntal or vertical line.\n@param x1\n@param y1\n@param x2\n@param y2\n@return the created DOM element", "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.", "Removes the specified entry point\n\n@param controlPoint The entry point" ]
private void writeClassData() { try (PrintStream out = new PrintStream( ExampleHelpers.openExampleFileOuputStream("classes.csv"))) { out.println("Id" + ",Label" + ",Description" + ",URL" + ",Image" + ",Number of direct instances" + ",Number of direct subclasses" + ",Direct superclasses" + ",All superclasses" + ",Related properties"); List<Entry<EntityIdValue, ClassRecord>> list = new ArrayList<>( this.classRecords.entrySet()); Collections.sort(list, new ClassUsageRecordComparator()); for (Entry<EntityIdValue, ClassRecord> entry : list) { if (entry.getValue().itemCount > 0 || entry.getValue().subclassCount > 0) { printClassRecord(out, entry.getValue(), entry.getKey()); } } } catch (IOException e) { e.printStackTrace(); } }
[ "Writes the data collected about classes to a file." ]
[ "Use this API to fetch rewritepolicylabel_rewritepolicy_binding resources of given name .", "Adds a value to the list if does not already exists.\n\n@param list the list\n@param value value to add if not exists in the list", "Notifies that multiple header items are inserted.\n\n@param positionStart the position.\n@param itemCount the item count.", "helper extracts the cursor data from the db object", "Within a single zone, tries swapping some minimum number of random\npartitions per node with some minimum number of random partitions from\nother nodes within the zone. Chooses the best swap in each iteration.\nLarge values of the greedSwapMaxPartitions... arguments make this method\nequivalent to comparing every possible swap. This is very expensive.\n\nNormal case should be :\n\n#zones X #nodes/zone X max partitions/node X max partitions/zone\n\n@param nextCandidateCluster cluster object.\n@param greedyAttempts See RebalanceCLI.\n@param greedySwapMaxPartitionsPerNode See RebalanceCLI.\n@param greedySwapMaxPartitionsPerZone See RebalanceCLI.\n@param greedySwapZoneIds The set of zoneIds to consider. Each zone is done\nindependently.\n@param storeDefs\n@return updated cluster", "Deletes a template.\n\n@param id id of the template to delete.\n@return {@link Response}\n\n@throws RequestException if request to transloadit server fails.\n@throws LocalOperationException if something goes wrong while running non-http operations.", "This can be called to adjust the size of the dialog glass. It\nis implemented using JSNI to bypass the \"private\" keyword on\nthe glassResizer.", "Converts this update description to its document representation as it would appear in a\nMongoDB Change Event.\n\n@return the update description document as it would appear in a change event", "Process normal calendar working and non-working days.\n\n@param calendar parent calendar" ]
public static Dimension rectangleDoubleToDimension(final Rectangle2D.Double rectangle) { return new Dimension( (int) Math.round(rectangle.width), (int) Math.round(rectangle.height)); }
[ "Round the size of a rectangle with double values.\n\n@param rectangle The rectangle.\n@return" ]
[ "Delete a photo from flickr.\n\nThis method requires authentication with 'delete' permission.\n\n@param photoId\n@throws FlickrException", "Calculate which pie slice is under the pointer, and set the current item\nfield accordingly.", "Set an enterprise date value.\n\n@param index date index (1-30)\n@param value date value", "Creates a real agent in the platform\n\n@param agent_name\nThe name that the agent is gonna have in the platform\n@param path\nThe path of the description (xml) of the agent", "Returns a source excerpt of a JavaDoc link to a method on this type.", "Get a state handler for a given patching artifact.\n\n@param artifact the patching artifact\n@param <P>\n@param <S>\n@return the state handler, {@code null} if there is no handler registered for the given artifact", "Gets the aggregate result count summary. only list the counts for brief\nunderstanding\n\n@return the aggregate result count summary", "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", "Maps this iterable from the source document type to the target document type.\n\n@param mapper a function that maps from the source to the target document type\n@param <U> the target document type\n@return an iterable which maps T to U" ]
@Override public void setBody(String body) { super.setBody(body); this.jsonValue = JsonValue.readFrom(body); }
[ "Sets the body of this request to a given JSON string.\n@param body the JSON string to use as the body." ]
[ "Delivers the correct JSON Object for the Stencilset\n\n@param stencilSet\n@throws org.json.JSONException", "Resolve the server registry.\n\n@param mgmtVersion the mgmt version\n@param subsystems the subsystems\n@return the transformer registry", "Closes a Closeable and swallows any exceptions that might occur in the\nprocess.\n\n@param closeable", "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", "Inserts a column name, value pair into the SQL.\n\n@param column\nName of the table column.\n@param value\nValue to substitute in. InsertBuilder does *no* interpretation\nof this. If you want a string constant inserted, you must\nprovide the single quotes and escape the internal quotes. It\nis more common to use a question mark or a token in the style\nof {@link ParameterizedPreparedStatementCreator}, e.g. \":foo\".", "Converts a gwt Date in the timezone of the current browser to a time in\nUTC.\n\n@return A Long corresponding to the number of milliseconds since January\n1, 1970, 00:00:00 GMT or null if the specified Date is null.", "Renders the given FreeMarker template to given directory, using given variables.", "Gets all rows.\n\n@return the list of all rows", "These exact lines are shared between three different tools, so\nthey have been moved here to reduce code duplication.\n@return The parsed command-line, with options removed." ]
private void populateAnnotations(Collection<Annotation> annotations) { for (Annotation each : annotations) { this.annotations.put(each.annotationType(), each); } }
[ "Used to populate Map with given annotations\n\n@param annotations initial value for annotations" ]
[ "Returns the index of a key in the set.\n\n@param key The key to search for.\n@return Returns the index of the key if it exists, else a negative integer.", "Multiply two complex numbers.\n\n@param z1 Complex Number.\n@param z2 Complex Number.\n@return Returns new ComplexNumber instance containing the multiply of specified complex numbers.", "This method writes task data to a JSON file.\nNote that we write the task hierarchy in order to make rebuilding the hierarchy easier.", "Classify stdin by documents seperated by 3 blank line\n@param readerWriter\n@return boolean reached end of IO\n@throws IOException", "Initializes the persistence strategy to be used when accessing the datastore. In particular, all the required\ncaches will be configured and initialized.\n\n@param cacheMappingType the {@link org.hibernate.ogm.datastore.keyvalue.options.CacheMappingType} to be used\n@param entityTypes meta-data of all the entity types registered with the current session factory\n@param associationTypes meta-data of all the association types registered with the current session factory\n@param idSourceTypes meta-data of all the id source types registered with the current session factory\n@param namespaces from the database currently in use", "Gets Widget bounds depth\n@return depth", "Finds or opens a client to talk to the dbserver on the specified player, incrementing its use count.\n\n@param targetPlayer the player number whose database needs to be interacted with\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\n@return the communication client for talking to that player, or {@code null} if the player could not be found\n\n@throws IllegalStateException if we can't find the target player or there is no suitable player number for us\nto pretend to be\n@throws IOException if there is a problem communicating", "Use this API to add onlinkipv6prefix resources.", "Use this API to delete dnstxtrec resources." ]
public static vpnsessionaction[] get(nitro_service service) throws Exception{ vpnsessionaction obj = new vpnsessionaction(); vpnsessionaction[] response = (vpnsessionaction[])obj.get_resources(service); return response; }
[ "Use this API to fetch all the vpnsessionaction resources that are configured on netscaler." ]
[ "Figure out, based on how much time has elapsed since we received an update, and the playback position,\nspeed, and direction at the time of that update, where the player will be now.\n\n@param update the most recent update received from a player\n@param currentTimestamp the nanosecond timestamp representing when we want to interpolate the track's position\n\n@return the playback position we believe that player has reached now", "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.", "Gets the date time str.\n\n@param d\nthe d\n@return the date time str", "END ODO CHANGES", "Marks the start of a query identified by the provided correlationId\n\n@param query - Query data\n@param correlationId - Identifier\n@return Start event to pass to the Events systems EventBus", "Get a property as a string or defaultValue.\n\n@param key the property name\n@param defaultValue the default value", "Returns the full record for a single story.\n\n@param story Globally unique identifier for the story.\n@return Request object", "Dumps the contents of a structured block made up from a header\nand fixed sized records.\n\n@param headerSize header zie\n@param blockSize block size\n@param data data block", "Adds a resource collection with execution hints." ]
public static boolean classNodeImplementsType(ClassNode node, Class target) { ClassNode targetNode = ClassHelper.make(target); if (node.implementsInterface(targetNode)) { return true; } if (node.isDerivedFrom(targetNode)) { return true; } if (node.getName().equals(target.getName())) { return true; } if (node.getName().equals(target.getSimpleName())) { return true; } if (node.getSuperClass() != null && node.getSuperClass().getName().equals(target.getName())) { return true; } if (node.getSuperClass() != null && node.getSuperClass().getName().equals(target.getSimpleName())) { return true; } if (node.getInterfaces() != null) { for (ClassNode declaredInterface : node.getInterfaces()) { if (classNodeImplementsType(declaredInterface, target)) { return true; } } } return false; }
[ "This method tells you if a ClassNode implements or extends a certain class.\n@param node\nthe node\n@param target\nthe class\n@return\ntrue if the class node 'is a' target" ]
[ "Returns a set of beans specialized by this bean. An empty set is returned if this bean does not specialize another beans.", "Select a List of characters from a CharSequence using a Collection\nto identify the indices to be selected.\n\n@param self a CharSequence\n@param indices a Collection of indices\n@return a String consisting of the characters at the given indices\n@since 1.0", "Merges individual days together into time spans where the\nsame work is undertaken each day.\n\n@param list assignment data", "compute Exp using Taylor Series.\n\n@param x An angle, in radians.\n@param nTerms Number of terms.\n@return Result.", "Use this API to fetch crvserver_policymap_binding resources of given name .", "Helper to read an optional Boolean value.\n@param path The XML path of the element to read.\n@return The Boolean value stored in the XML, or <code>null</code> if the value could not be read.", "Resolve Java control character sequences to the actual character value.\nOptionally handle unicode escape sequences, too.", "Retrieves the GC timestamp, set by the Oracle, from zookeeper\n\n@param zookeepers Zookeeper connection string\n@return Oldest active timestamp or oldest possible ts (-1) if not found", "Convenience method which allows all projects in the database to\nbe read in a single operation.\n\n@return list of ProjectFile instances\n@throws MPXJException" ]
int query(int downloadId) { synchronized (mCurrentRequests) { for (DownloadRequest request : mCurrentRequests) { if (request.getDownloadId() == downloadId) { return request.getDownloadState(); } } } return DownloadManager.STATUS_NOT_FOUND; }
[ "Returns the current download state for a download request.\n\n@param downloadId\n@return" ]
[ "Calculate the arc length by angle and radius\n@param angle\n@return arc length", "Create a deep copy.\n\n@param bindAddress overwrites bind address when creating deep copy.\n@return a copy of the server setup configuration.", "Gets id of a link and creates the new one if necessary.\n\n@param linkName name of the link.\n@param allowCreate if set to true and if there is no link named as linkName,\ncreate the new id for the linkName.\n@return < 0 if there is no such link and create=false, else id of the link", "Sets the class loader to be used on serialization operations, for data\nstored in the specified fqn and child nodes. Note that if another class\nloader is set for a specific child node tree, the cache will use instead\nthat class loader.\n\n@param regionFqn\n@param classLoader", "Creates the full sentence.\n\n@return the mtas CQL parser sentence condition\n@throws ParseException the parse exception", "Converts the given dislect to a human-readable datasource type.", "This method is used to automatically generate a value\nfor the Outline Number field of this task.\n\n@param parent Parent Task", "Use this API to fetch vpnvserver_appcontroller_binding resources of given name .", "Token Info\nReturns the Token Information\n@return ApiResponse&lt;TokenInfoSuccessResponse&gt;\n@throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body" ]