query
stringlengths
74
6.1k
positive
sequencelengths
1
1
negative
sequencelengths
9
9
public BlurBuilder brightness(float brightness) { data.preProcessors.add(new RenderscriptBrightnessProcessor(data.contextWrapper.getRenderScript(), brightness, data.contextWrapper.getResources())); return this; }
[ "Set brightness to eg. darken the resulting image for use as background\n\n@param brightness default is 0, pos values increase brightness, neg. values decrease brightness\n.-100 is black, positive goes up to 1000+" ]
[ "Clears the collection and uses the iterator to run through the dao and delete all of the items in the collection\nfrom the associated database table. This is different from removing all of the elements in the table since this\niterator is across just one item's foreign objects.", "Expand a macro.\n\nThis will look up the macro definition from {@link #macros} map.\nIf not found then return passed in `macro` itself, otherwise return\nthe macro definition found.\n\n**note** if macro definition is not found and the string\n{@link #isMacro(String) comply to macro name convention}, then a\nwarn level message will be logged.\n\n@param macro the macro name\n@return macro definition or macro itself if no definition found.", "Populate the model with the object's properties.\n\n@param object object whose properties we're displaying\n@param excludedMethods method names to exclude", "Read an optional boolean value form a JSON value.\n@param val the JSON value that should represent the boolean.\n@return the boolean from the JSON or null if reading the boolean fails.", "Loads a classifier from the file specified by loadPath. If loadPath ends in\n.gz, uses a GZIPInputStream, else uses a regular FileInputStream.", "Sets the given value on an the receivers's accessible field with the given name.\n\n@param receiver the receiver, never <code>null</code>\n@param fieldName the field's name, never <code>null</code>\n@param value the value to set\n\n@throws NoSuchFieldException see {@link Class#getField(String)}\n@throws SecurityException see {@link Class#getField(String)}\n@throws IllegalAccessException see {@link Field#set(Object, Object)}\n@throws IllegalArgumentException see {@link Field#set(Object, Object)}", "Replaces the first substring of this CharSequence that matches the given\nregular expression with the given replacement.\n\n@param self a CharSequence\n@param regex the capturing regex\n@param replacement the CharSequence to be substituted for each match\n@return a CharSequence with replaced content\n@throws java.util.regex.PatternSyntaxException if the regular expression's syntax is invalid\n@see String#replaceFirst(String, String)\n@since 1.8.2", "Remove an existing Corporate GroupId from an organization.\n\n@return Response", "Calculate Median value.\n@param values Values.\n@return Median." ]
@Override public String upload(InputStream in, UploadMetaData metaData) throws FlickrException { Payload payload = new Payload(in); return sendUploadRequest(metaData, payload); }
[ "Upload a photo from an InputStream.\n\n@param in\n@param metaData\n@return photoId or ticketId\n@throws FlickrException" ]
[ "Traces the time taken just by the fat client inside Coordinator to\nprocess this request\n\n\n@param operationType\n@param OriginTimeInMs - Original request time in Http Request\n@param RequestStartTimeInMs - Time recorded just before fat client\nstarted processing\n@param ResponseReceivedTimeInMs - Time when Response was received from\nfat client\n@param keyString - Hex denotation of the key(s)\n@param numVectorClockEntries - represents the sum of entries size of all\nvector clocks received in response. Size of a single vector clock\nrepresents the number of entries(nodes) in the vector", "Checks to see if all the diagonal elements in the matrix are positive.\n\n@param a A matrix. Not modified.\n@return true if all the diagonal elements are positive, false otherwise.", "directive dynamic xxx,yy\n@param node\n@return", "Do synchronization of the given J2EE ODMG Transaction", "Store some state on this request context associated with the specified interceptor instance.\nUsed where a single interceptor instance needs to associate state with each HTTP request.\n\n@param interceptor the interceptor instance\n@param stateName the key to store the state object under\n@param stateObjectToStore the state object to store\n@param <T> the type of the state object to store\n@see #getState(HttpConnectionInterceptor, String, Class)\n@since 2.6.0", "Use this API to fetch statistics of nspbr6_stats resource of given name .", "Retrieve and validate the timestamp value from the REST request.\n\"X_VOLD_REQUEST_ORIGIN_TIME_MS\" is timestamp header\n\nTODO REST-Server 1. Change Time stamp header to a better name.\n\n@return true if present, false if missing", "Creates a new HTML-formatted label with the given content.\n\n@param html the label content", "Sets the name of the base calendar associated with this task.\nNote that this attribute appears in MPP9 and MSPDI files.\n\n@param calendar calendar instance" ]
public PlacesList<Place> find(String query) throws FlickrException { Map<String, Object> parameters = new HashMap<String, Object>(); PlacesList<Place> placesList = new PlacesList<Place>(); parameters.put("method", METHOD_FIND); parameters.put("query", query); Response response = transportAPI.get(transportAPI.getPath(), parameters, apiKey, sharedSecret); if (response.isError()) { throw new FlickrException(response.getErrorCode(), response.getErrorMessage()); } Element placesElement = response.getPayload(); NodeList placesNodes = placesElement.getElementsByTagName("place"); placesList.setPage("1"); placesList.setPages("1"); placesList.setPerPage("" + placesNodes.getLength()); placesList.setTotal("" + placesNodes.getLength()); for (int i = 0; i < placesNodes.getLength(); i++) { Element placeElement = (Element) placesNodes.item(i); placesList.add(parsePlace(placeElement)); } return placesList; }
[ "Return a list of place IDs for a query string.\n\nThe flickr.places.find method is not a geocoder. It will round \"up\" to the nearest place type to which place IDs apply. For example, if you pass it a\nstreet level address it will return the city that contains the address rather than the street, or building, itself.\n\n<p>\nThis method does not require authentication.\n</p>\n\n@param query\n@return PlacesList\n@throws FlickrException" ]
[ "Convert a list of objects to a JSON array with the string representations of that objects.\n@param list the list of objects.\n@return the JSON array with the string representations.", "Helper method that encapsulates the minimum logic for publishing a job to\na channel.\n\n@param jedis\nthe connection to Redis\n@param namespace\nthe Resque namespace\n@param channel\nthe channel name\n@param jobJson\nthe job serialized as JSON", "Warning emitter. Uses whatever alternative non-event communication channel is.", "Generates a unique signature for an annotated type. Members without\nannotations are omitted to reduce the length of the signature\n\n@param <X>\n@param annotatedType\n@return hash of a signature for a concrete annotated type", "Update artifact download url of an artifact\n\n@param gavc String\n@param downLoadUrl String", "Use this API to count dnszone_domain_binding resources configued on NetScaler.", "Ask the specified player for a Track menu.\n\n@param slotReference the player and slot for which the menu is desired\n@param sortOrder the order in which responses should be sorted, 0 for default, see Section 6.11.1 of the\n<a href=\"https://github.com/Deep-Symmetry/dysentery/blob/master/doc/Analysis.pdf\">Packet Analysis\ndocument</a> for details\n\n@return the entries in the track menu\n\n@throws Exception if there is a problem obtaining the menu", "Calculate the value of a CMS option using the Black-Scholes model for the swap rate together with\nthe Hunt-Kennedy convexity adjustment.\n\n@param forwardSwaprate The forward swap rate\n@param volatility Volatility of the log of the swap rate\n@param swapAnnuity The swap annuity\n@param optionMaturity The option maturity\n@param swapMaturity The swap maturity\n@param payoffUnit The payoff unit, e.g., the discount factor corresponding to the payment date\n@param optionStrike The option strike\n@return Value of the CMS option", "Compute the repair set from the given values and nodes\n\n@param nodeValues The value found on each node\n@return A set of repairs to perform" ]
public static cmpglobal_cmppolicy_binding[] get(nitro_service service) throws Exception{ cmpglobal_cmppolicy_binding obj = new cmpglobal_cmppolicy_binding(); cmpglobal_cmppolicy_binding response[] = (cmpglobal_cmppolicy_binding[]) obj.get_resources(service); return response; }
[ "Use this API to fetch a cmpglobal_cmppolicy_binding resources." ]
[ "Generate a Jongo query with provided the parameter.\n\n@param key\n@param value\n@return String", "Use this API to fetch vpnvserver_cachepolicy_binding resources of given name .", "Add the key and return it's index code. If the key already is present, the previous\nindex code is returned and no insertion is done.\n\n@param key key to add\n@return index of the key", "Creates a curator built using Fluo's zookeeper connection string. Root path will start at Fluo\nchroot.", "Gets the addresses of the child resources under the given resource.\n\n@param context the operation context\n@param registry registry entry representing the resource\n@param resource the current resource\n@param validChildType a single child type to which the results should be limited. If {@code null} the result\nshould include all child types\n@return map where the keys are the child types and the values are a set of child names associated with a type", "Use this API to unset the properties of onlinkipv6prefix resource.\nProperties that need to be unset are specified in args array.", "Print the class's constructors m", "Split a span into two by adding a knot in the middle.\n@param n the span index", "Answer the search class.\nThis is the class of the example object or\nthe class represented by Identity.\n@return Class" ]
public String updateClassification(String classificationType) { Metadata metadata = new Metadata("enterprise", Metadata.CLASSIFICATION_TEMPLATE_KEY); metadata.add("/Box__Security__Classification__Key", classificationType); Metadata classification = this.updateMetadata(metadata); return classification.getString(Metadata.CLASSIFICATION_KEY); }
[ "Updates a metadata classification on the specified file.\n\n@param classificationType the metadata classification type.\n@return the new metadata classification type updated on the file." ]
[ "defines the KEY in the parent report parameters map where to get the subreport parameters map.\n@param path where to get the parameter map for the subrerpot.\n@return", "Use this API to fetch aaagroup_vpntrafficpolicy_binding resources of given name .", "Use this API to update snmpalarm.", "Returns an java object read from the specified ResultSet column.", "Use this API to enable nsacl6 resources of given names.", "retrieve a collection of type collectionClass matching the Query query\n\n@see org.apache.ojb.broker.PersistenceBroker#getCollectionByQuery(Class, Query)", "Adds a measure to the crosstab. A crosstab can have many measures. DJ will lay out one measure above\nthe other.\n\nA measure is what is shown on each intersection of a column and a row. A calculation is performed to\nall occurrences in the datasource where the column and row values matches (between elements)\n\nThe only difference between the prior methods is that this method sets \"visible\" to false\n\n@param property\n@param className\n@param title\n@return", "Update which options are shown.\n@param showModeSwitch flag, indicating if the mode switch should be shown.\n@param showAddKeyOption flag, indicating if the \"Add key\" row should be shown.", "private multi-value handlers and helpers" ]
public Object remove(Object key) { if (key == null) return null; purge(); int hash = hashCode(key); int index = indexFor(hash); Entry previous = null; Entry entry = table[index]; while (entry != null) { if ((hash == entry.hash) && equals(key, entry.getKey())) { if (previous == null) table[index] = entry.next; else previous.next = entry.next; this.size--; modCount++; return entry.getValue(); } previous = entry; entry = entry.next; } return null; }
[ "Removes the key and its associated value from this map.\n\n@param key the key to remove\n@return the value associated with that key, or null if\nthe key was not in the map" ]
[ "Returns the value of the primitive type from the given string value.\n\n@param value the value to parse\n@param cls the primitive type class\n@return the boxed type value or {@code null} if the given class is not a primitive type", "Parses a String email address to an IMAP address string.", "Adds the index input to list.\n\n@param name the name\n@param in the in\n@param postingsFormatName the postings format name\n@return the string\n@throws IOException Signals that an I/O exception has occurred.", "Inserts a Serializable value into the mapping of the underlying Bundle, replacing any existing\nvalue for the given key. Either key or value may be null.\n\n@param key a String, or null\n@param value a Serializable object, or null\n@return this bundler instance to chain method calls", "Blocking function which completes the migration of one store\n\n@param storeName The name of the store\n@param adminClient Admin client used to initiate the copying of data\n@param stealInfo The steal information\n@param isReadOnlyStore Boolean indicating that this is a read-only store", "Propagate onEnter events to listeners\n@param hit collision object", "Retrieve and validate the key from the REST request.\n\n@return true if present, false if missing", "Checks the given field descriptor.\n\n@param fieldDef The field descriptor\n@param checkLevel The amount of checks to perform\n@exception ConstraintException If a constraint has been violated", "Build a new WebDriver based EmbeddedBrowser.\n\n@return the new build WebDriver based embeddedBrowser" ]
public void remove(Identity oid) { //processQueue(); if(oid != null) { removeTracedIdentity(oid); objectTable.remove(buildKey(oid)); if(log.isDebugEnabled()) log.debug("Remove object " + oid); } }
[ "Removes an Object from the cache." ]
[ "Returns the list of nodes which match the expression xpathExpr in the String domStr.\n\n@return the list of nodes which match the query\n@throws XPathExpressionException\n@throws IOException", "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.", "Upload a photo from a byte-array.\n\n@param data\nThe photo data as a byte array\n@param metaData\nThe meta data\n@return photoId or ticketId\n@throws FlickrException", "Compares the StoreVersionManager's internal state with the content on the file-system\nof the rootDir provided at construction time.\n\nTODO: If the StoreVersionManager supports non-RO stores in the future,\nwe should move some of the ReadOnlyUtils functions below to another Utils class.", "Use this API to save cacheobject resources.", "Create a model mbean from an object using the description given in the\nJmx annotation if present. Only operations are supported so far, no\nattributes, constructors, or notifications\n\n@param o The object to create an MBean for\n@return The ModelMBean for the given object", "for testing purpose", "Use this API to delete ntpserver resources.", "Retrieves a vertex attribute as a float array.\nThe attribute name must be one of the\nattributes named in the descriptor passed to the constructor.\n@param attributeName name of the attribute to update\n@throws IllegalArgumentException if attribute name not in descriptor vertex attribute is not <i>float</i>\n@see #setFloatVec(String, FloatBuffer)\n@see #getFloatArray(String)" ]
@NonNull @Override public Loader<SortedList<FtpFile>> getLoader() { return new AsyncTaskLoader<SortedList<FtpFile>>(getContext()) { @Override public SortedList<FtpFile> loadInBackground() { SortedList<FtpFile> sortedList = new SortedList<>(FtpFile.class, new SortedListAdapterCallback<FtpFile>(getDummyAdapter()) { @Override public int compare(FtpFile lhs, FtpFile rhs) { if (lhs.isDirectory() && !rhs.isDirectory()) { return -1; } else if (rhs.isDirectory() && !lhs.isDirectory()) { return 1; } else { return lhs.getName().compareToIgnoreCase(rhs.getName()); } } @Override public boolean areContentsTheSame(FtpFile oldItem, FtpFile newItem) { return oldItem.getName().equals(newItem.getName()); } @Override public boolean areItemsTheSame(FtpFile item1, FtpFile item2) { return item1.getName().equals(item2.getName()); } }); if (!ftp.isConnected()) { // Connect try { ftp.connect(server, port); ftp.setFileType(FTP.ASCII_FILE_TYPE); ftp.enterLocalPassiveMode(); ftp.setUseEPSVwithIPv4(false); if (!(loggedIn = ftp.login(username, password))) { ftp.logout(); Log.e(TAG, "Login failed"); } } catch (IOException e) { if (ftp.isConnected()) { try { ftp.disconnect(); } catch (IOException ignored) { } } Log.e(TAG, "Could not connect to server."); } } if (loggedIn) { try { // handle if directory does not exist. Fall back to root. if (mCurrentPath == null || !mCurrentPath.isDirectory()) { mCurrentPath = getRoot(); } sortedList.beginBatchedUpdates(); for (FTPFile f : ftp.listFiles(mCurrentPath.getPath())) { FtpFile file; if (f.isDirectory()) { file = new FtpDir(mCurrentPath, f.getName()); } else { file = new FtpFile(mCurrentPath, f.getName()); } if (isItemVisible(file)) { sortedList.add(file); } } sortedList.endBatchedUpdates(); } catch (IOException e) { Log.e(TAG, "IOException: " + e.getMessage()); } } return sortedList; } /** * Handles a request to start the Loader. */ @Override protected void onStartLoading() { super.onStartLoading(); // handle if directory does not exist. Fall back to root. if (mCurrentPath == null || !mCurrentPath.isDirectory()) { mCurrentPath = getRoot(); } forceLoad(); } }; }
[ "Get a loader that lists the files in the current path,\nand monitors changes." ]
[ "This method maps the resource unique identifiers to their index number\nwithin the FixedData block.\n\n@param fieldMap field map\n@param rscFixedMeta resource fixed meta data\n@param rscFixedData resource fixed data\n@return map of resource IDs to resource data", "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", "Use this API to unlink sslcertkey.", "Returns a Pair constructed from X and Y. Convenience method; the\ncompiler will disambiguate the classes used for you so that you\ndon't have to write out potentially long class names.", "Set the property on the given object to the new value.\n\n@param object on which to set the property\n@param newValue the new value of the property\n@throws RuntimeException if the property could not be set", "returns a sorted array of constructors", "Apply the AAD algorithm to this very variable\n\nNOTE: in this case it is indeed correct to assume that the output dimension is \"one\"\nmeaning that there is only one {@link RandomVariableUniqueVariable} as an output.\n\n@return gradient for the built up function", "Records that there is no media mounted in a particular media player slot, updating listeners if this is a change,\nand clearing any affected items from our in-memory caches.\n\n@param slot the slot in which no media is mounted", "Checks to see if a WORD matches the name of a macro. if it does it applies the macro at that location" ]
public Client setFriendlyName(int profileId, String clientUUID, String friendlyName) throws Exception { // first see if this friendlyName is already in use Client client = this.findClientFromFriendlyName(profileId, friendlyName); if (client != null && !client.getUUID().equals(clientUUID)) { throw new Exception("Friendly name already in use"); } PreparedStatement statement = null; int rowsAffected = 0; try (Connection sqlConnection = sqlService.getConnection()) { statement = sqlConnection.prepareStatement( "UPDATE " + Constants.DB_TABLE_CLIENT + " SET " + Constants.CLIENT_FRIENDLY_NAME + " = ?" + " WHERE " + Constants.CLIENT_CLIENT_UUID + " = ?" + " AND " + Constants.GENERIC_PROFILE_ID + " = ?" ); statement.setString(1, friendlyName); statement.setString(2, clientUUID); statement.setInt(3, profileId); rowsAffected = statement.executeUpdate(); } catch (Exception e) { } finally { try { if (statement != null) { statement.close(); } } catch (Exception e) { } } if (rowsAffected == 0) { return null; } return this.findClient(clientUUID, profileId); }
[ "Set a friendly name for a client\n\n@param profileId profileId of the client\n@param clientUUID UUID of the client\n@param friendlyName friendly name of the client\n@return return Client object or null\n@throws Exception exception" ]
[ "Restore backup data\n\n@param fileData - json file with restore data\n@return\n@throws Exception", "Sets the node meta data.\n\n@param key - the meta data key\n@param value - the meta data value\n@throws GroovyBugError if key is null or there is already meta\ndata under that key", "generate a message for loglevel INFO\n\n@param pObject the message Object", "Returns an integer array that contains the current values for all the\ntexture parameters.\n\n@return an integer array that contains the current values for all the\ntexture parameters.", "Read relation data.", "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", "Use this API to unset the properties of snmpoption resource.\nProperties that need to be unset are specified in args array.", "Calculates a checksum for the specified buffer.\n@param buffer the buffer to calculate.\n@return the checksum value.", "Checks the component type of the given array against the expected component type.\n\n@param array\nthe array to be checked. May not be <code>null</code>.\n@param expectedComponentType\nthe expected component type of the array. May not be <code>null</code>.\n@return the unchanged array.\n@throws ArrayStoreException\nif the expected runtime {@code componentType} does not match the actual runtime component type." ]
public GeoMultiPoint addPoint(GeoPoint point) { Contracts.assertNotNull( point, "point" ); this.points.add( point ); return this; }
[ "Adds a new point.\n\n@param point a point\n@return this for chaining" ]
[ "Adds a foreignkey to this table.\n\n@param relationName The name of the relation represented by the foreignkey\n@param remoteTable The referenced table\n@param localColumns The local columns\n@param remoteColumns The remote columns", "Checks anonymous fields.\n\n@param fieldDef The field descriptor\n@param checkLevel The current check level (this constraint is checked in basic and strict)\n@exception ConstraintException If the constraint has been violated", "Adds OPT_X | OPT_HEX option to OptionParser, with multiple arguments.\n\n@param parser OptionParser to be modified\n@param required Tells if this option is required or optional", "This method populates the task model from data read from an MPX file.\n\n@param record data read from an MPX file\n@param isText flag indicating whether the textual or numeric data is being supplied", "URLDecode a string\n@param s\n@return", "Use this API to add nssimpleacl.", "Synchronize the geotools transaction with the platform transaction, if such a transaction is active.\n\n@param featureStore\n@param dataSource", "Creates the adapter for the target database.", "Try to provide an escaped, ready-to-use shell line to repeat a given command line." ]
public ProjectCalendar addDefaultDerivedCalendar() { ProjectCalendar calendar = add(); calendar.setWorkingDay(Day.SUNDAY, DayType.DEFAULT); calendar.setWorkingDay(Day.MONDAY, DayType.DEFAULT); calendar.setWorkingDay(Day.TUESDAY, DayType.DEFAULT); calendar.setWorkingDay(Day.WEDNESDAY, DayType.DEFAULT); calendar.setWorkingDay(Day.THURSDAY, DayType.DEFAULT); calendar.setWorkingDay(Day.FRIDAY, DayType.DEFAULT); calendar.setWorkingDay(Day.SATURDAY, DayType.DEFAULT); return (calendar); }
[ "This is a convenience method to add a default derived\ncalendar to the project.\n\n@return new ProjectCalendar instance" ]
[ "Returns a new color with a new value of the specified HSL\ncomponent.", "Check if the the nodeId is present in the cluster managed by the metadata store\nor throw an exception.\n\n@param nodeId The nodeId to check existence of", "Print a class's relations", "static lifecycle callbacks", "Queries a Search Index and returns grouped results in a map where key\nof the map is the groupName. In case the query didnt use grouping,\nan empty map is returned\n\n@param <T> Object type T\n@param query the Lucene query to be passed to the Search index\n@param classOfT The class of type T\n@return The result of the grouped search query as a ordered {@code Map<String,T> }", "Send an empty request using a standard HTTP connection.", "Simple info message for status\n\n@param tag Message to print out at start of info message", "Convert a Java date into a Planner date.\n\n20070222\n\n@param value Java Date instance\n@return Planner date", "Get a TokenizerFactory that does Penn Treebank tokenization.\nThis is now the recommended factory method to use.\n\n@param factory A TokenFactory that determines what form of token is returned by the Tokenizer\n@param options A String specifying options (see the class javadoc for details)\n@param <T> The type of the tokens built by the LexedTokenFactory\n@return A TokenizerFactory that does Penn Treebank tokenization" ]
public WebMBeanAdapter createWebMBeanAdapter(String mBeanName, String encoding) throws JMException, UnsupportedEncodingException { return new WebMBeanAdapter(mBeanServer, mBeanName, encoding); }
[ "Create a WebMBeanAdaptor for a specified MBean name.\n@param mBeanName the MBean name (can be URL-encoded).\n@param encoding the string encoding to be used (i.e. UTF-8)\n@return the created WebMBeanAdaptor.\n@throws JMException Java Management Exception\n@throws UnsupportedEncodingException if the encoding is not supported." ]
[ "Retrieve an instance of the ConstraintField class based on the data read from an\nMS Project file.\n\n@param value value from an MS Project file\n@return ConstraintField instance", "Use this API to add cachepolicylabel resources.", "Creates a new Box Developer Edition connection with enterprise token leveraging BoxConfig.\n@param boxConfig box configuration settings object\n@return a new instance of BoxAPIConnection.", "Restarts a single dyno\n\n@param appName See {@link #listApps} for a list of apps that can be used.\n@param dynoId the unique identifier of the dyno to restart", "resolves a Field or Property node generics by using the current class and\nthe declaring class to extract the right meaning of the generics symbols\n@param an a FieldNode or PropertyNode\n@param type the origin type\n@return the new ClassNode with corrected generics", "Clears all properties of specified entity.\n\n@param entity to clear.", "Construct a new instance.\n\n@return the new instance", "Matches an array value if it contains all the elements of the argument array\n@param rhs The arguments\n@return PredicateExpression: $all rhs", "Checks that given directory if readable & writable and prints a warning if the check fails. Warning is only\nprinted once and is not repeated until the condition is fixed and broken again.\n\n@param directory deployment directory\n@return does given directory exist and is readable and writable?" ]
protected Class getPrototypeClass(T content) { if (prototypes.size() == 1) { return prototypes.get(0).getClass(); } else { return binding.get(content.getClass()); } }
[ "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." ]
[ "Function to filter files based on defined rules.", "Calculates the delta of a digital option under a Black-Scholes model\n\n@param initialStockValue The initial value of the underlying, i.e., the spot.\n@param riskFreeRate The risk free rate of the bank account numerarie.\n@param volatility The Black-Scholes volatility.\n@param optionMaturity The option maturity T.\n@param optionStrike The option strike.\n@return The delta of the digital option", "Perform construction with custom thread pool size.", "Compute the offset for the item in the layout based on the offsets of neighbors\nin the layout. The other offsets are not patched. If neighbors offsets have not\nbeen computed the offset of the item will not be set.\n@return true if the item fits the container, false otherwise", "Get object by identity. First lookup among objects registered in the\ntransaction, then in persistent storage.\n@param id The identity\n@return The object\n@throws PersistenceBrokerException", "Adds a \"Post Run\" task to the collection.\n\n@param taskItem the \"Post Run\" task", "This is pretty ugly. We end up mimicking the request logic here, so this\nneeds to stay in sync with handleRequest.", "Fetches a list of available photo licenses for Flickr.\n\nThis method does not require authentication.\n\n@return A collection of License objects\n@throws FlickrException", "Read the work weeks associated with this calendar.\n\n@param xmlCalendar XML calendar object\n@param mpxjCalendar MPXJ calendar object" ]
public void setNewCenterColor(int color) { mCenterNewColor = color; mCenterNewPaint.setColor(color); if (mCenterOldColor == 0) { mCenterOldColor = color; mCenterOldPaint.setColor(color); } if (onColorChangedListener != null && color != oldChangedListenerColor ) { onColorChangedListener.onColorChanged(color); oldChangedListenerColor = color; } invalidate(); }
[ "Change the color of the center which indicates the new color.\n\n@param color int of the color." ]
[ "Visit an open package of the current module.\n\n@param packaze the qualified name of the opened package.\n@param access the access flag of the opened package,\nvalid values are among {@code ACC_SYNTHETIC} and\n{@code ACC_MANDATED}.\n@param modules the qualified names of the modules that can use deep\nreflection to the classes of the open package or\n<tt>null</tt>.", "A final cluster ought to be a super set of current cluster. I.e.,\nexisting node IDs ought to map to same server, but partition layout can\nhave changed and there may exist new nodes.\n\n@param currentCluster\n@param finalCluster", "Use this API to fetch all the bridgetable resources that are configured on netscaler.", "Creates the conversion server that is specified by this builder.\n\n@return The conversion server that is specified by this builder.", "Associate an input stream with the operation. Closing the input stream\nis the responsibility of the caller.\n\n@param in the input stream. Cannot be {@code null}\n@return a builder than can be used to continue building the operation", "This method processes a single deferred relationship list.\n\n@param dr deferred relationship list data\n@throws MPXJException", "Use this API to add linkset.", "Use this API to fetch a responderglobal_responderpolicy_binding resources.", "Post a license to the server\n\n@param license\n@param user\n@param password\n@throws GrapesCommunicationException\n@throws javax.naming.AuthenticationException" ]
public void setDates(SortedSet<Date> dates) { if (!m_model.getIndividualDates().equals(dates)) { m_model.setIndividualDates(dates); onValueChange(); } }
[ "Set the individual dates.\n@param dates the dates to set." ]
[ "Delivers the correct JSON Object for the dockers\n\n@param dockers\n@throws org.json.JSONException", "Delete by id.\n\n@param id the id", "use this method to construct the ChainingIterator\niterator by iterator.", "Get the set of metadata providers that can offer metadata for tracks loaded from the specified media.\n\n@param sourceMedia the media whose metadata providers are desired, or {@code null} to get the set of\nmetadata providers that can offer metadata for all media.\n\n@return any registered metadata providers that reported themselves as supporting tracks from that media", "Use this API to fetch all the nd6ravariables resources that are configured on netscaler.", "Gets id of a property and creates the new one if necessary.\n\n@param txn transaction\n@param propertyName name of the property.\n@param allowCreate if set to true and if there is no property named as propertyName,\ncreate the new id for the propertyName.\n@return < 0 if there is no such property and create=false, else id of the property", "Takes a list of Strings and combines them into a single comma-separated\nString.\n@param strings The Strings to combine.\n@return The combined, comma-separated, String.", "Find Flickr Places information by Place URL.\n\n<p>\nThis method does not require authentication.\n</p>\n\n@deprecated This method has been deprecated. It won't be removed but you should use {@link PlacesInterface#getInfoByUrl(String)} instead.\n@param flickrPlacesUrl\n@return A Location\n@throws FlickrException", "Reads, stems, and prints the trees in the file.\n\n@param args Usage: WordStemmer file" ]
public static Calendar parseDividendDate(String date) { if (!Utils.isParseable(date)) { return null; } date = date.trim(); SimpleDateFormat format = new SimpleDateFormat(Utils.getDividendDateFormat(date), Locale.US); format.setTimeZone(TimeZone.getTimeZone(YahooFinance.TIMEZONE)); try { Calendar today = Calendar.getInstance(TimeZone.getTimeZone(YahooFinance.TIMEZONE)); Calendar parsedDate = Calendar.getInstance(TimeZone.getTimeZone(YahooFinance.TIMEZONE)); parsedDate.setTime(format.parse(date)); if (parsedDate.get(Calendar.YEAR) == 1970) { // Not really clear which year the dividend date is... making a reasonable guess. int monthDiff = parsedDate.get(Calendar.MONTH) - today.get(Calendar.MONTH); int year = today.get(Calendar.YEAR); if (monthDiff > 6) { year -= 1; } else if (monthDiff < -6) { year += 1; } parsedDate.set(Calendar.YEAR, year); } return parsedDate; } catch (ParseException ex) { log.warn("Failed to parse dividend date: " + date); log.debug("Failed to parse dividend date: " + date, ex); return null; } }
[ "Used to parse the dividend dates. Returns null if the date cannot be\nparsed.\n\n@param date String received that represents the date\n@return Calendar object representing the parsed date" ]
[ "Returns requested content types or default content type if none found.\n\n@return Requested content types or default content type if none found.", "Initialize new instance\n@param instance\n@param logger\n@param auditor", "Gets any previous versions of this file. Note that only users with premium accounts will be able to retrieve\nprevious versions of their files.\n\n@return a list of previous file versions.", "Sends a text message using given server setup for SMTP.\n\n@param to the to address.\n@param from the from address.\n@param subject the subject.\n@param msg the test message.\n@param setup the SMTP setup.", "Determines if a mouse event is inside a box.", "Sets a JSON String as a request entity.\n\n@param connnection The request of {@link HttpConnection}\n@param body The JSON String to set.", "Gets currently visible user.\n\n@return List of user", "Return the parent outline number, or an empty string if\nwe have a root task.\n\n@param outlineNumber child outline number\n@return parent outline number", "Initializes the counters for a property to zero if not done yet.\n\n@param usageStatistics\nstatistics object to initialize\n@param property\nthe property to count" ]
public static boolean isSinglePositionPrefix(FieldInfo fieldInfo, String prefix) throws IOException { if (fieldInfo == null) { throw new IOException("no fieldInfo"); } else { String info = fieldInfo.getAttribute( MtasCodecPostingsFormat.MTAS_FIELDINFO_ATTRIBUTE_PREFIX_SINGLE_POSITION); if (info == null) { throw new IOException("no " + MtasCodecPostingsFormat.MTAS_FIELDINFO_ATTRIBUTE_PREFIX_SINGLE_POSITION); } else { return Arrays.asList(info.split(Pattern.quote(MtasToken.DELIMITER))) .contains(prefix); } } }
[ "Checks if is single position prefix.\n\n@param fieldInfo\nthe field info\n@param prefix\nthe prefix\n@return true, if is single position prefix\n@throws IOException\nSignals that an I/O exception has occurred." ]
[ "visibility increased for testing", "Creates an internal project and repositories such as a token storage.", "Configures the log context.\n\n@param configFile the configuration file\n@param classLoader the class loader to use for the configuration\n@param logContext the log context to configure\n\n@return {@code true} if the log context was successfully configured, otherwise {@code false}\n\n@throws DeploymentUnitProcessingException if the configuration fails", "Write a relation list field to the JSON file.\n\n@param fieldName field name\n@param value field value", "Authenticates the API connection for Box Developer Edition.", "Write a boolean field to the JSON file.\n\n@param fieldName field name\n@param value field value", "Returns all the persistent id generators which potentially require the creation of an object in the schema.", "Create a Count-Query for QueryByCriteria", "Gets the current version of the database schema. This version is taken\nfrom the migration table and represent the latest successful entry.\n\n@return the current schema version" ]
public String getDbProperty(String key) { // extract the database key out of the entire key String databaseKey = key.substring(0, key.indexOf('.')); Properties databaseProperties = getDatabaseProperties().get(databaseKey); return databaseProperties.getProperty(key, ""); }
[ "Returns the value for a given key from the database properties.\n\n@param key the property key\n\n@return the string value for a given key" ]
[ "Add tables to the tree.\n\n@param parentNode parent tree node\n@param file tables container", "Use this API to fetch statistics of rnatip_stats resource of given name .", "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", "remove an objects entry from the object registry", "This function returns the first external IP address encountered\n\n@return IP address or null\n@throws Exception", "For use on a slave HC to get all the server groups used by the host\n\n@param hostResource the host resource\n@return the server configs on this host", "Creates a new instance from the given configuration file.\n\n@throws IOException if failed to load the configuration from the specified file", "Perform a post-boot scan to remove any deployments added during boot that failed to deploy properly.\nThis method isn't private solely to allow a unit test in the same package to call it.", "Computes the mean or average of all the elements.\n\n@return mean" ]
public ItemRequest<Workspace> findById(String workspace) { String path = String.format("/workspaces/%s", workspace); return new ItemRequest<Workspace>(this, Workspace.class, path, "GET"); }
[ "Returns the full workspace record for a single workspace.\n\n@param workspace Globally unique identifier for the workspace or organization.\n@return Request object" ]
[ "Checks whether a character sequence matches against a specified pattern or not.\n\n@param pattern\npattern, that the {@code chars} must correspond to\n@param chars\na readable sequence of {@code char} values which should match the given pattern\n@return {@code true} when {@code chars} matches against the passed {@code pattern}, otherwise {@code false}", "Use this API to fetch aaauser_vpntrafficpolicy_binding resources of given name .", "Sets the actual path for this ID\n\n@param pathId ID of path\n@param path value of path", "Use this API to delete dnsaaaarec resources of given names.", "Execute a CLI command. This can be any command that you might execute on\nthe CLI command line, including both server-side operations and local\ncommands such as 'cd' or 'cn'.\n\n@param cliCommand A CLI command.\n@return A result object that provides all information about the execution\nof the command.", "xml -> object\n\n@param message\n@param childClass\n@return", "This method displays the resource assignments for each resource. This time\nrather than just iterating through the list of all assignments in\nthe file, we extract the assignments on a resource-by-resource basis.\n\n@param file MPX file", "Remove any overrides for an endpoint\n\n@param pathValue path (endpoint) value\n@param requestType path request type. \"GET\", \"POST\", etc\n@return true if success, false otherwise", "Say whether this character is an annotation introducing\ncharacter.\n\n@param ch The character to check\n@return Whether it is an annotation introducing character" ]
public void afterCompletion(int status) { if(afterCompletionCall) return; log.info("Method afterCompletion was called"); try { switch(status) { case Status.STATUS_COMMITTED: if(log.isDebugEnabled()) { log.debug("Method afterCompletion: Do commit internal odmg-tx, status of JTA-tx is " + TxUtil.getStatusString(status)); } commit(); break; default: log.error("Method afterCompletion: Do abort call on internal odmg-tx, status of JTA-tx is " + TxUtil.getStatusString(status)); abort(); } } finally { afterCompletionCall = true; log.info("Method afterCompletion finished"); } }
[ "FOR internal use. This method was called after the external transaction was completed.\n\n@see javax.transaction.Synchronization" ]
[ "Adds this vector to v1 and places the result in this vector.\n\n@param v1\nright-hand vector", "Determines a histogram of contiguous runs of partitions within a zone.\nI.e., for each run length of contiguous partitions, how many such runs\nare there.\n\nDoes not correctly address \"wrap around\" of partition IDs (i.e., the fact\nthat partition ID 0 is \"next\" to partition ID 'max')\n\n@param cluster\n@param zoneId\n@return map of length of contiguous run of partitions to count of number\nof such runs.", "Links the two field names into a single left.right field name.\nIf the left field is empty, right is returned\n\n@param left one field name\n@param right the other field name\n\n@return left.right or right if left is an empty string", "Gets the Correlation distance between two points.\n\n@param p A point in space.\n@param q A point in space.\n@return The Correlation distance between x and y.", "Converts an object to an instance of the target type.\n\n@param mapper the object mapper\n@param source the source to convert\n@param targetType the target class type\n@return target instance\n@see SquigglyUtils#objectify(ObjectMapper, Object, Class)", "Unmarshal test suite from given file.", "We need to distinguish the case where we're newly available and the case\nwhere we're already available. So we check the node status before we\nupdate it and return it to the caller.\n\n@param isAvailable True to set to available, false to make unavailable\n\n@return Previous value of isAvailable", "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.", "Called recursively to renumber child task IDs.\n\n@param parentTask parent task instance\n@param currentID current task ID\n@return updated current task ID" ]
final public void addOffset(Integer start, Integer end) { if (tokenOffset == null) { setOffset(start, end); } else if ((start == null) || (end == null)) { // do nothing } else if (start > end) { throw new IllegalArgumentException("Start offset after end offset"); } else { tokenOffset.add(start, end); } }
[ "Adds the offset.\n\n@param start the start\n@param end the end" ]
[ "Read calendar data.", "Adjusts the site root and returns a cloned CmsObject, iff the module has set an import site that differs\nfrom the site root of the CmsObject provided as argument. Otherwise returns the provided CmsObject unchanged.\n@param cms The original CmsObject.\n@param module The module where the import site is read from.\n@return The original CmsObject, or, if necessary, a clone with adjusted site root\n@throws CmsException see {@link OpenCms#initCmsObject(CmsObject)}", "Ask the specified player for the specified waveform detail from the specified media slot, first checking if we\nhave a cached copy.\n\n@param dataReference uniquely identifies the desired waveform detail\n\n@return the waveform detail, if it was found, or {@code null}\n\n@throws IllegalStateException if the WaveformFinder is not running", "Request the list of all tracks in the specified slot, given a dbserver connection to a player that has already\nbeen set up.\n\n@param slot identifies the media slot we are querying\n@param client the dbserver client that is communicating with the appropriate player\n\n@return the retrieved track list entry items\n\n@throws IOException if there is a communication problem\n@throws InterruptedException if the thread is interrupted while trying to lock the client for menu operations\n@throws TimeoutException if we are unable to lock the client for menu operations", "Sets a custom response on an endpoint using default profile and client\n\n@param pathValue path (endpoint) value\n@param requestType path request type. \"GET\", \"POST\", etc\n@param customData custom response data\n@return true if success, false otherwise", "Check if there is an attribute which tells us which concrete class is to be instantiated.", "Inits the ws client.\n\n@param context the context\n@throws Exception the exception", "Make a copy.", "Creates a Set out of the given keys\n\n@param <K> the key type\n@param keys\nthe keys\n@return a Set containing the given keys" ]
public Swagger read(Class<?> cls) { SwaggerDefinition swaggerDefinition = cls.getAnnotation(SwaggerDefinition.class); if (swaggerDefinition != null) { readSwaggerConfig(cls, swaggerDefinition); } return read(cls, "", null, false, new String[0], new String[0], new LinkedHashMap<>(), new ArrayList<>(), new HashSet<>()); }
[ "Scans a single class for Swagger annotations - does not invoke ReaderListeners" ]
[ "The main entry point for processing graphical indicator definitions.\n\n@param indicators graphical indicators container\n@param properties project properties\n@param props properties data", "Returns a new iterable filtering any null references.\n\n@param unfiltered\nthe unfiltered iterable. May not be <code>null</code>.\n@return an unmodifiable iterable containing all elements of the original iterable without any <code>null</code> references. Never <code>null</code>.", "Convert a date to the String representation we use in the JSON.\n@param d the date to convert\n@return the String representation we use in the JSON.", "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", "Changes to a new sub-view and stores a report to be displayed by that subview.<p<\n\n@param newState the new state\n@param thread the report thread which should be displayed in the sub view\n@param label the label to display for the report", "Add the set of partitions to the node provided\n\n@param node The node to which we'll add the partitions\n@param donatedPartitions The list of partitions to add\n@return The new node with the new partitions", "Submits the configured assembly to Transloadit for processing.\n\n@param isResumable boolean value that tells the assembly whether or not to use tus.\n@return {@link AssemblyResponse} the response received from the Transloadit server.\n@throws RequestException if request to Transloadit server fails.\n@throws LocalOperationException if something goes wrong while running non-http operations.", "Fires the event and waits for a specified time.\n\n@param webElement the element to fire event on.\n@param eventable The HTML event type (onclick, onmouseover, ...).\n@return true if firing event is successful.\n@throws InterruptedException when interrupted during the wait.", "Clear all beans and call the destruction callback." ]
@Override public void stopTransition() { //call listeners so they can perform their actions first, like modifying this adapter's transitions for (int i = 0, size = mListenerList.size(); i < size; i++) { mListenerList.get(i).onTransitionEnd(this); } for (int i = 0, size = mTransitionList.size(); i < size; i++) { mTransitionList.get(i).stopTransition(); } }
[ "Stops all transitions." ]
[ "If a custom CSS file has been specified, returns the path. Otherwise\nreturns null.\n@return A {@link File} pointing to the stylesheet, or null if no stylesheet\nis specified.", "Tokenizes lookup fields and returns all matching buckets in the\nindex.", "Creates an Odata filter string that can be used for filtering list results by tags.\n\n@param tagName the name of the tag. If not provided, all resources will be returned.\n@param tagValue the value of the tag. If not provided, only tag name will be filtered.\n@return the Odata filter to pass into list methods", "Initialises JMX stuff.\n@param doRegister if true, perform registration, if false unregister", "Retrieve a specific row by index number, creating a blank row if this row does not exist.\n\n@param index index number\n@return MapRow instance", "Computes the unbiased standard deviation of all the elements.\n\n@return standard deviation", "AND operation which takes the previous clause and the next clause and AND's them together.", "Adds a Statement to a given collection of statement groups.\nIf the statement id is not null and matches that of an existing statement,\nthis statement will be replaced.\n\n@param statement\n@param claims\n@return", "If the deployment has a module attached it will ask the module to load the ServiceActivator services.\n\n@param phaseContext the deployment unit context" ]
public WaveformPreview requestWaveformPreviewFrom(final DataReference dataReference) { ensureRunning(); for (WaveformPreview cached : previewHotCache.values()) { if (cached.dataReference.equals(dataReference)) { // Found a hot cue hit, use it. return cached; } } return requestPreviewInternal(dataReference, false); }
[ "Ask the specified player for the specified waveform preview from the specified media slot, first checking if we\nhave a cached copy.\n\n@param dataReference uniquely identifies the desired waveform preview\n\n@return the preview, if it was found, or {@code null}\n\n@throws IllegalStateException if the WaveformFinder is not running" ]
[ "Get a scalar value for the DOM diversity using the Robust Tree Edit Distance\n\n@param dom1\n@param dom2\n@return", "Get the value of the fist child element with the given name.\n\n@param element\nThe parent element\n@param name\nThe child element name\n@return The child element value or null", "With the QR algorithm it is possible for the found singular values to be negative. This\nmakes them all positive by multiplying it by a diagonal matrix that has", "Process StepFinishedEvent. Change last added to stepStorage step\nand add it as child of previous step.\n\n@param event to process", "Create a string from bytes using the given encoding\n\n@param bytes The bytes to create a string from\n@param encoding The encoding of the string\n@return The created string", "A specific, existing tag can be deleted by making a DELETE request\non the URL for that tag.\n\nReturns an empty data record.\n\n@param tag The tag to delete.\n@return Request object", "Log a warning for the resource at the provided address and the given attributes, using the provided detail\nmessage.\n\n@param address where warning occurred\n@param message custom error message to append\n@param attributes attributes we that have problems about", "This is a convenience method which reads the first project\nfrom the named MPD file using the JDBC-ODBC bridge driver.\n\n@param accessDatabaseFileName access database file name\n@return ProjectFile instance\n@throws MPXJException", "Number of failed actions in scheduler" ]
public static int cudnnReduceTensor( cudnnHandle handle, cudnnReduceTensorDescriptor reduceTensorDesc, Pointer indices, long indicesSizeInBytes, Pointer workspace, long workspaceSizeInBytes, Pointer alpha, cudnnTensorDescriptor aDesc, Pointer A, Pointer beta, cudnnTensorDescriptor cDesc, Pointer C) { return checkResult(cudnnReduceTensorNative(handle, reduceTensorDesc, indices, indicesSizeInBytes, workspace, workspaceSizeInBytes, alpha, aDesc, A, beta, cDesc, C)); }
[ "The indices space is ignored for reduce ops other than min or max." ]
[ "Returns the adapter position of the Child associated with this ChildViewHolder\n\n@return The adapter position of the Child 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.", "Generate a results file for each test in each suite.\n@param outputDirectory The target directory for the generated file(s).", "a small static helper class to get the color from the colorHolder\n\n@param colorHolder\n@param ctx\n@return", "Returns the data about all of the plugins that are set\n\n@param onlyValid True to get only valid plugins, False for all\n@return array of Plugins set", "Find a node in the tree. The node must be \"visible\" to be found.\n@param address The full address of the node matching ManagementModelNode.addressPath()\n@return The node, or null if not found.", "Make superclasses method protected??", "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.", "The location for this elevation.\n\n@return", "Sets the permissions associated with this shared link.\n@param permissions the new permissions for this shared link." ]
private void checkPrimaryKey(ClassDescriptorDef classDef, String checkLevel) throws ConstraintException { if (CHECKLEVEL_NONE.equals(checkLevel)) { return; } if (classDef.getBooleanProperty(PropertyHelper.OJB_PROPERTY_GENERATE_TABLE_INFO, true) && classDef.getPrimaryKeys().isEmpty()) { LogHelper.warn(true, getClass(), "checkPrimaryKey", "The class "+classDef.getName()+" has no primary key"); } }
[ "Checks whether given class descriptor has a primary key.\n\n@param classDef The class descriptor\n@param checkLevel The current check level (this constraint is only checked in strict)\n@exception ConstraintException If the constraint has been violated" ]
[ "Returns a licenses regarding its Id and a fake on if no license exist with such an Id\n\n@param licenseId String\n@return License", "Get the list of all nodes and the list of active nodes in the cluster.\n\n@return Membership object encapsulating lists of all nodes and the cluster nodes\n@see <a\nhref=\"https://console.bluemix.net/docs/services/Cloudant/api/advanced.html#-get-_membership-\">\n_membership</a>", "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.", "Use this API to fetch aaauser_vpntrafficpolicy_binding resources of given name .", "Use this API to fetch all the vlan resources that are configured on netscaler.", "Deserializes a variable, NOT checking whether the datatype is custom\n@param s\n@param variableType\n@return", "Private helper function that performs some assignability checks for the\nprovided GenericArrayType.", "Converts the provided object to a date, if possible.\n\n@param date the date.\n\n@return the date as {@link java.util.Date}", "Expand a macro.\n\nThis will look up the macro definition from {@link #macros} map.\nIf not found then return passed in `macro` itself, otherwise return\nthe macro definition found.\n\n**note** if macro definition is not found and the string\n{@link #isMacro(String) comply to macro name convention}, then a\nwarn level message will be logged.\n\n@param macro the macro name\n@return macro definition or macro itself if no definition found." ]
private void updateDetail(TrackMetadataUpdate update, WaveformDetail detail) { detailHotCache.put(DeckReference.getDeckReference(update.player, 0), detail); // Main deck if (update.metadata.getCueList() != null) { // Update the cache with any hot cues in this track as well for (CueList.Entry entry : update.metadata.getCueList().entries) { if (entry.hotCueNumber != 0) { detailHotCache.put(DeckReference.getDeckReference(update.player, entry.hotCueNumber), detail); } } } deliverWaveformDetailUpdate(update.player, detail); }
[ "We have obtained waveform detail for a device, so store it and alert any listeners.\n\n@param update the update which caused us to retrieve this waveform detail\n@param detail the waveform detail which we retrieved" ]
[ "Converts a string from ISO-8559-1 encoding to UTF-8.\n@param value ISO-8559-1 value\n@return UTF-8 value", "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", "Process the settings when we are going to consume them.", "apply the base fields to other views if configured to do so.", "The main conversion method.\n@param image A BufferedImage containing the image that needs to be converted\n@param favicon When ico is true it will convert ico file into 16 x 16 size\n@return A string containing the ASCII version of the original image.", "Creates the given connection pool with the given configuration. Extracted here to make unit mocking easier.\n@param config configuration object.\n@return BoneCP connection pool handle.", "Returns whether this represents a valid host name or address format.\n@return", "Read an array of bytes of a specified size.\n\n@param size number of bytes to read\n@return ByteArray instance", "Notifies that multiple footer items are changed.\n\n@param positionStart the position.\n@param itemCount the item count." ]
public File getBootFile() { if (bootFile == null) { synchronized (this) { if (bootFile == null) { if (bootFileReset) { //Reset the done bootup and the sequence, so that the old file we are reloading from // overwrites the main file on successful boot, and history is reset as when booting new doneBootup.set(false); sequence.set(0); } // If it's a reload with no new boot file name and we're persisting our config, we boot from mainFile, // as that's where we persist if (bootFileReset && !interactionPolicy.isReadOnly() && newReloadBootFileName == null) { // we boot from mainFile bootFile = mainFile; } else { // It's either first boot, or a reload where we're not persisting our config or with a new boot file. // So we need to figure out which file we're meant to boot from String bootFileName = this.bootFileName; if (newReloadBootFileName != null) { //A non-null new boot file on reload takes precedence over the reloadUsingLast functionality //A new boot file was specified. Use that and reset the new name to null bootFileName = newReloadBootFileName; newReloadBootFileName = null; } else if (interactionPolicy.isReadOnly() && reloadUsingLast) { //If we were reloaded, and it is not a persistent configuration we want to use the last from the history bootFileName = LAST; } boolean usingRawFile = bootFileName.equals(rawFileName); if (usingRawFile) { bootFile = mainFile; } else { bootFile = determineBootFile(configurationDir, bootFileName); try { bootFile = bootFile.getCanonicalFile(); } catch (IOException ioe) { throw ControllerLogger.ROOT_LOGGER.canonicalBootFileNotFound(ioe, bootFile); } } if (!bootFile.exists()) { if (!usingRawFile) { // TODO there's no reason usingRawFile should be an exception, // but the test infrastructure stuff is built around an assumption // that ConfigurationFile doesn't fail if test files are not // in the normal spot if (bootFileReset || interactionPolicy.isRequireExisting()) { throw ControllerLogger.ROOT_LOGGER.fileNotFound(bootFile.getAbsolutePath()); } } // Create it for the NEW and DISCARD cases if (!bootFileReset && !interactionPolicy.isRequireExisting()) { createBootFile(bootFile); } } else if (!bootFileReset) { if (interactionPolicy.isRejectExisting() && bootFile.length() > 0) { throw ControllerLogger.ROOT_LOGGER.rejectEmptyConfig(bootFile.getAbsolutePath()); } else if (interactionPolicy.isRemoveExisting() && bootFile.length() > 0) { if (!bootFile.delete()) { throw ControllerLogger.ROOT_LOGGER.cannotDelete(bootFile.getAbsoluteFile()); } createBootFile(bootFile); } } // else after first boot we want the file to exist } } } } return bootFile; }
[ "Gets the file from which boot operations should be parsed.\n@return the file. Will not be {@code null}" ]
[ "Extracts baseline work from the MPP file for a specific baseline.\nReturns null if no baseline work is present, otherwise returns\na list of timephased work items.\n\n@param assignment parent assignment\n@param calendar baseline calendar\n@param normaliser normaliser associated with this data\n@param data timephased baseline work data block\n@param raw flag indicating if this data is to be treated as raw\n@return timephased work", "Initialization necessary for editing a property bundle.\n\n@throws CmsLoaderException thrown if loading a bundle file fails.\n@throws CmsException thrown if loading a bundle file fails.\n@throws IOException thrown if loading a bundle file fails.", "Remove all references to a groupId\n\n@param groupIdToRemove ID of group", "Ask the specified player for an Artist menu.\n\n@param slotReference the player and slot for which the menu is desired\n@param sortOrder the order in which responses should be sorted, 0 for default, see Section 6.11.1 of the\n<a href=\"https://github.com/Deep-Symmetry/dysentery/blob/master/doc/Analysis.pdf\">Packet Analysis\ndocument</a> for details\n\n@return the entries in the artist menu\n\n@throws Exception if there is a problem obtaining the menu", "Checks whether the compilation has been canceled and reports the given progress to the compiler progress.", "Get a subset of the attributes of the provided class. An attribute is each public field in the class\nor super class.\n\n@param classToInspect the class to inspect\n@param filter a predicate that returns true when a attribute should be kept in resulting\ncollection.", "Get the number of views, comments and favorites on a photo for a given date.\n\n@param date\n(Required) Stats will be returned for this date. A day according to Flickr Stats starts at midnight GMT for all users, and timestamps will\nautomatically be rounded down to the start of the day.\n@param photoId\n(Required) The id of the photo to get stats for.\n@see \"http://www.flickr.com/services/api/flickr.stats.getPhotoStats.htm\"", "Finish a state transition from a notification.\n\n@param current\n@param next", "associate the batched Children with their owner object loop over children" ]
private static Bitmap crop(Bitmap srcBmp, View canvasView, int downsampling) { float scale = 1f / downsampling; return Bitmap.createBitmap( srcBmp, (int) Math.floor((ViewCompat.getX(canvasView)) * scale), (int) Math.floor((ViewCompat.getY(canvasView)) * scale), (int) Math.floor((canvasView.getWidth()) * scale), (int) Math.floor((canvasView.getHeight()) * scale) ); }
[ "crops the srcBmp with the canvasView bounds and returns the cropped bitmap" ]
[ "Compute the proportional padding for all items in the cache\n@param cache Cache data set\n@return the uniform padding amount", "Add a misc file.\n\n@param name the file name\n@param path the relative path\n@param newHash the new hash of the added content\n@param isDirectory whether the file is a directory or not\n@return the builder", "Uses data from a bar to populate a task.\n\n@param row bar data\n@param task task to populate", "Use this API to delete gslbservice of given name.", "Use this API to unset the properties of Interface resource.\nProperties that need to be unset are specified in args array.", "Use this API to update snmpmanager.", "Use this API to Force clustersync.", "Add assignments to the tree.\n\n@param parentNode parent tree node\n@param file assignments container", "Close the Closeable. Logging a warning if any problems occur.\n\n@param c the thing to close" ]
public static Object setProperty( String key, String value ) { return prp.setProperty( key, value ); }
[ "Add a property." ]
[ "It's enough to just set the disabled attribute on the\nelement, but we want to also add a \"disabled\" class so that we can\nstyle it.\n\nAt some point we'll just be able to use .button:disabled,\nbut that doesn't work in IE8-", "Converts a submatrix into an extract matrix operation.\n@param variableTarget The variable in which the submatrix is extracted from", "Convenience method for retrieving an Object resource.\n\n@param locale locale identifier\n@param key resource key\n@return resource value", "Sets the path name for this ID\n\n@param pathId ID of path\n@param pathName Name of path", "This is the main entry point used to convert the internal representation\nof timephased baseline work into an external form which can\nbe displayed to the user.\n\n@param file parent project file\n@param work timephased resource assignment data\n@param rangeUnits timescale units\n@param dateList timescale date ranges\n@return list of durations, one per timescale date range", "SuppressWarnings I really want to return HazeltaskTasks instead of Runnable", "Used to get the current repository key\n@return keyFromText or keyFromSelect reflected by the dynamicMode flag", "Determine the height of the preview given an index into it.\n\n@param segment the index of the waveform preview segment to examine\n@param front if {@code true} the height of the front (brighter) segment of a color waveform preview is returned,\notherwise the height of the back (dimmer) segment is returned. Has no effect for blue previews.\n\n@return a value from 0 to 31 representing the height of the waveform at that segment, which may be an average\nof a number of values starting there, determined by the scale", "Convert MPX day index to Day instance.\n\n@param day day index\n@return Day instance" ]
public static base_responses add(nitro_service client, dnssuffix resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { dnssuffix addresources[] = new dnssuffix[resources.length]; for (int i=0;i<resources.length;i++){ addresources[i] = new dnssuffix(); addresources[i].Dnssuffix = resources[i].Dnssuffix; } result = add_bulk_request(client, addresources); } return result; }
[ "Use this API to add dnssuffix resources." ]
[ "Executes the given xpath and returns the result with the type specified.", "Remove the sequence for given sequence name.\n\n@param sequenceName Name of the sequence to remove.", "Returns a PreparedStatementCreator that returns a page of the underlying\nresult set.\n\n@param dialect\nDatabase dialect to use.\n@param limit\nMaximum number of rows to return.\n@param offset\nIndex of the first row to return.", "Get the max extent as a envelop object.", "Type variables are not supported.\n\n@param value\n@return the type", "Convert weekly recurrence days into a bit field.\n\n@param task recurring task\n@return bit field as a string", "1.0 version of parser is different at simple mapperParser", "Adds a command class to the list of supported command classes by this node.\nDoes nothing if command class is already added.\n@param commandClass the command class instance to add.", "Function to perform backward pooling" ]
public static Chart getMSDLineWithFreeModelChart(Trajectory t, int lagMin, int lagMax, double timelag, double diffusionCoefficient, double intercept) { double[] xData = new double[lagMax - lagMin + 1]; double[] yData = new double[lagMax - lagMin + 1]; double[] modelData = new double[lagMax - lagMin + 1]; MeanSquaredDisplacmentFeature msdeval = new MeanSquaredDisplacmentFeature( t, lagMin); msdeval.setTrajectory(t); msdeval.setTimelag(lagMin); for (int i = lagMin; i < lagMax + 1; i++) { msdeval.setTimelag(i); double msdhelp = msdeval.evaluate()[0]; xData[i - lagMin] = i; yData[i - lagMin] = msdhelp; modelData[i - lagMin] = intercept + 4*diffusionCoefficient*(i*timelag);//4 * D * Math.pow(i * timelag, a); } // Create Chart Chart chart = QuickChart.getChart("MSD Line", "LAG", "MSD", "MSD", xData, yData); chart.addSeries("y=4*D*t + a", xData, modelData); // Show it //new SwingWrapper(chart).displayChart(); return chart; }
[ "Plots the MSD curve with the trajectory t and adds the fitted model for free diffusion.\n@param t\n@param lagMin Minimum timelag (e.g. 1,2,3..) lagMin*timelag = elapsed time in seconds\n@param lagMax lagMax Maximum timelag (e.g. 1,2,3..) lagMax*timelag = elapsed time in seconds\n@param timelag Elapsed time between two frames.\n@param diffusionCoefficient Diffusion coefficient\n@param intercept" ]
[ "Populate the authenticated user profiles in the Shiro subject.\n\n@param profiles the linked hashmap of profiles", "Visit this and all child nodes.\n\n@param visitor The visitor to use.", "Browse groups for the given category ID. If a null value is passed for the category then the root category is used.\n\n@param catId\nThe optional category id. Null value will be ignored.\n@return The Collection of Photo objects\n@throws FlickrException\n@deprecated Flickr returns just empty results", "Returns a converter instance for the given annotation.\n\n@param annotation the annotation\n@return a converter instance or {@code null} if the given annotation is no option annotation", "Sets the transformations to be applied to the shape before indexing it.\n\n@param transformations the sequence of transformations\n@return this with the specified sequence of transformations", "Obtains a Symmetry010 local date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the Symmetry010 local date-time, not null\n@throws DateTimeException if unable to create the date-time", "Assign based on execution time history. The algorithm is a greedy heuristic\nassigning the longest remaining test to the slave with the\nshortest-completion time so far. This is not optimal but fast and provides\na decent average assignment.", "Assign to the data object the val corresponding to the fieldType.", "Use this API to add ntpserver resources." ]
String generateSynopsis() { synopsisOptions = buildSynopsisOptions(opts, arg, domain); StringBuilder synopsisBuilder = new StringBuilder(); if (parentName != null) { synopsisBuilder.append(parentName).append(" "); } synopsisBuilder.append(commandName); if (isOperation && !opts.isEmpty()) { synopsisBuilder.append("("); } else { synopsisBuilder.append(" "); } boolean hasOptions = arg != null || !opts.isEmpty(); if (hasActions && hasOptions) { synopsisBuilder.append(" ["); } if (hasActions) { synopsisBuilder.append(" <action>"); } if (hasActions && hasOptions) { synopsisBuilder.append(" ] || ["); } SynopsisOption opt; while ((opt = retrieveNextOption(synopsisOptions, false)) != null) { String content = addSynopsisOption(opt); if (content != null) { synopsisBuilder.append(content.trim()); if (isOperation) { if (!synopsisOptions.isEmpty()) { synopsisBuilder.append(","); } else { synopsisBuilder.append(")"); } } synopsisBuilder.append(" "); } } if (hasActions && hasOptions) { synopsisBuilder.append(" ]"); } return synopsisBuilder.toString(); }
[ "main class entry point." ]
[ "Returns the JMX connector address of a child process.\n\n@param p the process to which to connect\n@param startAgent whether to installed the JMX agent in the target process if not already in place\n@return a {@link JMXServiceURL} to the process's MBean server", "Read an optional string value form a JSON Object.\n@param json the JSON object to read from.\n@param key the key for the string value in the provided JSON object.\n@param defaultValue the default value, to be returned if the string can not be read from the JSON object.\n@return the string or the default value if reading the string fails.", "Write the classifications of the Sequence classifier out to a writer in a\nformat determined by the DocumentReaderAndWriter used.\n\n@param doc Documents to write out\n@param printWriter Writer to use for output\n@throws IOException If an IO problem", "Makes a DocumentReaderAndWriter based on\nflags.plainTextReaderAndWriter. Useful for reading in\nuntokenized text documents or reading plain text from the command\nline. An example of a way to use this would be to return a\nedu.stanford.nlp.wordseg.Sighan2005DocumentReaderAndWriter for\nthe Chinese Segmenter.", "Remove the nodes representing the entity and the embedded elements attached to it.\n\n@param executionEngine the {@link GraphDatabaseService} used to run the query\n@param columnValues the values of the key identifying the entity to remove", "Returns the dimensions for the video\n@param videoFile Video file\n@return the dimensions\n@throws IOException", "Populate the constraint type and constraint date.\nNote that Merlin allows both start and end constraints simultaneously.\nAs we can't have both, we'll prefer the start constraint.\n\n@param row task data from database\n@param task Task instance", "Find and select the next searchable matching text.\n\n@param reverse look forwards or backwards\n@param pos the starting index to start finding from\n@return the location of the next selected, or -1 if not found", "Adds the position range.\n\n@param start the start\n@param end the end" ]
public DependencyReport getDependencyReport(final String moduleId, final FiltersHolder filters) { final DbModule module = moduleHandler.getModule(moduleId); final DbOrganization organization = moduleHandler.getOrganization(module); filters.setCorporateFilter(new CorporateFilter(organization)); final DependencyReport report = new DependencyReport(moduleId); final List<String> done = new ArrayList<String>(); for(final DbModule submodule: DataUtils.getAllSubmodules(module)){ done.add(submodule.getId()); } addModuleToReport(report, module, filters, done, 1); return report; }
[ "Generate a report about the targeted module dependencies\n\n@param moduleId String\n@param filters FiltersHolder\n@return DependencyReport" ]
[ "Get a random sample of k out of n elements.\n\nSee Algorithm S, D. E. Knuth, The Art of Computer Programming, Vol. 2, p.142.", "Convert an Object of type Class to an Object.", "Use this API to fetch spilloverpolicy resource of given name .", "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", "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.", "B tensor is ignored for CUDNN_OP_TENSOR_SQRT, CUDNN_OP_TENSOR_NOT.", "This is more expensive.\n\n@param key key whose presence in this map is to be tested.\n@return <tt>true</tt> if this map contains a mapping for the specified\nkey.", "Use this API to fetch aaauser_binding resource of given name .", "Checks to see if a handler is disabled\n\n@param handlerName the name of the handler to enable." ]
public FastTrackTable getTable(FastTrackTableType type) { FastTrackTable result = m_tables.get(type); if (result == null) { result = EMPTY_TABLE; } return result; }
[ "Retrieve a table of data.\n\n@param type table type\n@return FastTrackTable instance" ]
[ "Executes a given SPARQL query and returns a stream with the result in\nJSON format.\n\n@param query\n@return\n@throws IOException", "Unilaterally merge an update description into this update description.\n@param otherDescription the update description to merge into this\n@return this merged update description", "Readable yyyyMMdd int representation of a day, which is also sortable.", "Gets information about a trashed file that's limited to a list of specified fields.\n@param fileID the ID of the trashed file.\n@param fields the fields to retrieve.\n@return info about the trashed file containing only the specified fields.", "Executes a HTTP request and parses the JSON response into a Response instance.\n\n@param connection The HTTP request to execute.\n@return Response object of the deserialized JSON response", "This method is called when double quotes are found as part of\na value. The quotes are escaped by adding a second quote character\nand the entire value is quoted.\n\n@param value text containing quote characters\n@return escaped and quoted text", "Obtain host header value for a hostname\n\n@param hostName\n@return", "Removes a child task.\n\n@param child child task instance", "Append Join for non SQL92 Syntax" ]
protected Boolean getIgnoreQuery() { Boolean isIgnoreQuery = parseOptionalBooleanValue(m_configObject, JSON_KEY_IGNORE_QUERY); return (null == isIgnoreQuery) && (m_baseConfig != null) ? Boolean.valueOf(m_baseConfig.getGeneralConfig().getIgnoreQueryParam()) : isIgnoreQuery; }
[ "Returns a flag indicating if the query given by the parameters should be ignored.\n@return A flag indicating if the query given by the parameters should be ignored." ]
[ "Pauses the file upload. This is a blocking function that would try to wait till the assembly file uploads\nhave actually been paused if possible.\n\n@throws LocalOperationException if the method is called while no upload is going on.", "Execute the operation.\n\n@param listener the transactional operation listener\n@param client the transactional protocol client\n@param identity the server identity\n@param operation the operation\n@param transformer the operation result transformer\n@return whether the operation was executed", "Used to determine if multiple cost rates apply to this assignment.\n\n@return true if multiple cost rates apply to this assignment", "Count some stats on what occurs in a file.", "Returns an iban with replaced check digit.\n\n@param iban The iban\n@return The iban without the check digit", "Retrieves state and metrics information for all client connections across the cluster.\n\n@return list of connections across the cluster", "Get random geographical location\n@return 2-Tuple of ints (latitude, longitude)", "Expands the directories from the given list and and returns a list of subfiles.\nFiles from the original list are kept as is.", "Use this API to fetch nsacl6 resource of given name ." ]
protected <T1> void dispatchCommand(final BiConsumer<P, T1> action, final T1 routable1) { routingFor(routable1) .routees() .forEach(routee -> routee.receiveCommand(action, routable1)); }
[ "DISPATCHING - COMMANDS" ]
[ "Reads the availability table from the file.\n\n@param resource MPXJ resource instance\n@param periods MSPDI availability periods", "Checks to see if the matrix is symmetric to within tolerance.\n\n@param A Matrix being tested. Not modified.\n@param tol Tolerance that defines how similar two values must be to be considered identical\n@return true if symmetric or false if not", "we can't call this method 'of', cause it won't compile on JDK7", "Use this API to fetch tunneltrafficpolicy resource of given name .", "Updates the statements of the item document identified by the given item\nid. The updates are computed with respect to the current data found\nonline, making sure that no redundant deletions or duplicate insertions\nhappen. The references of duplicate statements will be merged.\n\n@param itemIdValue\nid of the document to be updated\n@param addStatements\nthe list of statements to be added or updated; statements with\nempty statement id will be added; statements with non-empty\nstatement id will be updated (if such a statement exists)\n@param deleteStatements\nthe list of statements to be deleted; statements will only be\ndeleted if they are present in the current document (in\nexactly the same form, with the same id)\n@param summary\nshort edit summary\n@return the updated document\n@throws MediaWikiApiErrorException\nif the API returns errors\n@throws IOException\nif there are IO problems, such as missing network connection", "Finish initialization of state object.\n\n@param geoService geo service\n@param converterService converter service\n@throws GeomajasException oops", "Separate from other findNonProgressingOp variant to allow unit testing without needing a mock OperationContext", "Microsoft Project bases the order of tasks displayed on their ID\nvalue. This method takes the hierarchical structure of tasks\nrepresented in MPXJ and renumbers the ID values to ensure that\nthis structure is displayed as expected in Microsoft Project. This\nis typically used to deal with the case where a hierarchical task\nstructure has been created programmatically in MPXJ.", "Use this API to add vpnclientlessaccesspolicy." ]
public WebSocketContext sendJsonToUser(Object data, String username) { return sendToTagged(JSON.toJSONString(data), username); }
[ "Send JSON representation of a data object to all connections of a certain user\n\n@param data the data to be sent\n@param username the username\n@return this context" ]
[ "Draw an elliptical exterior with this color.\n\n@param rect rectangle in which ellipse should fit\n@param color colour to use for stroking\n@param linewidth line width", "Read pattern information from the provided JSON object.\n@param patternJson the JSON object containing the pattern information.", "Retrieves the notes text for this resource.\n\n@return notes text", "Returns the duration of the measured tasks in ms", "Closes the connection to the dbserver. This instance can no longer be used after this action.", "Returns the rendered element content for all the given containers.\n\n@param element the element to render\n@param containers the containers the element appears in\n\n@return a map from container names to rendered page contents", "Return a list of photos for a user at a specific latitude, longitude and accuracy.\n\n@param location\n@param extras\n@param perPage\n@param page\n@return The collection of Photo objects\n@throws FlickrException\n@see com.flickr4java.flickr.photos.Extras", "get the ArrayTypeSignature corresponding to given generic array type\n\n@param genericArrayType\n@return", "Register a new PerformanceMonitor with Spring if it does not already exist.\n\n@param beanName The name of the bean that this performance monitor is wrapped around\n@param registry The registry where all the spring beans are registered" ]
public void clear() { valueBoxBase.setText(""); clearStatusText(); if (getPlaceholder() == null || getPlaceholder().isEmpty()) { label.removeStyleName(CssName.ACTIVE); } }
[ "Resets the text box by removing its content and resetting visual state." ]
[ "Scans a set of classes for both ReaderListeners and Swagger annotations. All found listeners will\nbe instantiated before any of the classes are scanned for Swagger annotations - so they can be invoked\naccordingly.\n\n@param classes a set of classes to scan\n@return the generated Swagger definition", "This method writes task data to a JSON file.\nNote that we write the task hierarchy in order to make rebuilding the hierarchy easier.", "Add a plugin path\n\n@param model\n@param add\n@return\n@throws Exception", "Handles incoming Serial Messages. Serial messages can either be messages\nthat are a response to our own requests, or the stick asking us information.\n@param incomingMessage the incoming message to process.", "We add typeRefs without Nodes on the fly, so we should remove them before relinking.", "Retrieve the frequency of an exception.\n\n@param exception XML calendar exception\n@return frequency", "Converts a date series configuration to a date series bean.\n@return the date series bean.", "Use this API to fetch all the configstatus resources that are configured on netscaler.", "Returns the vertex points in this hull.\n\n@return array of vertex points\n@see QuickHull3D#getVertices(double[])\n@see QuickHull3D#getFaces()" ]
public static Map<Integer, Integer> getMapOfContiguousPartitions(final Cluster cluster, int zoneId) { List<Integer> partitionIds = new ArrayList<Integer>(cluster.getPartitionIdsInZone(zoneId)); Map<Integer, Integer> partitionIdToRunLength = Maps.newHashMap(); if(partitionIds.isEmpty()) { return partitionIdToRunLength; } int lastPartitionId = partitionIds.get(0); int initPartitionId = lastPartitionId; for(int offset = 1; offset < partitionIds.size(); offset++) { int partitionId = partitionIds.get(offset); if(partitionId == lastPartitionId + 1) { lastPartitionId = partitionId; continue; } int runLength = lastPartitionId - initPartitionId + 1; partitionIdToRunLength.put(initPartitionId, runLength); initPartitionId = partitionId; lastPartitionId = initPartitionId; } int runLength = lastPartitionId - initPartitionId + 1; if(lastPartitionId == cluster.getNumberOfPartitions() - 1 && partitionIdToRunLength.containsKey(0)) { // special case of contiguity that wraps around the ring. partitionIdToRunLength.put(initPartitionId, runLength + partitionIdToRunLength.get(0)); partitionIdToRunLength.remove(0); } else { partitionIdToRunLength.put(initPartitionId, runLength); } return partitionIdToRunLength; }
[ "Determines run length for each 'initial' partition ID. Note that a\ncontiguous run may \"wrap around\" the end of the ring.\n\n@param cluster\n@param zoneId\n@return map of initial partition Id to length of contiguous run of\npartition IDs within the same zone.." ]
[ "Generates a change event for a local update of a document in the given namespace referring\nto the given document _id.\n\n@param namespace the namespace where the document was inserted.\n@param documentId the _id of the document that was updated.\n@param update the update specifier.\n@return a change event for a local update of a document in the given namespace referring\nto the given document _id.", "Set possible tile URLs.\n\n@param tileUrls tile URLs", "Creates typed parser\n@param contentType class of parsed object\n@param <T> type of parsed object\n@return parser of objects of given type", "Requests the cue list for a specific track ID, given a dbserver connection to a player that has already\nbeen set up.\n\n@param rekordboxId the track of interest\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 cue list, or {@code null} if none was available\n@throws IOException if there is a communication problem", "Heat Equation Boundary Conditions", "Initializes the Stitch SDK so that app clients can be created.\n\n@param context An Android context value.", "Generates a column for the given field and adds it to the table.\n\n@param fieldDef The field\n@param tableDef The table\n@return The column def", "Sends a multipart response. Each body part represents a versioned value\nof the given key.\n\n@throws IOException\n@throws MessagingException", "Utility method used to convert a Number into a BigInteger.\n\n@param value Number instance\n@return BigInteger instance" ]
protected int adjustIndex(Widget child, int beforeIndex) { checkIndexBoundsForInsertion(beforeIndex); // Check to see if this widget is already a direct child. if (child.getParent() == this) { // If the Widget's previous position was left of the desired new position // shift the desired position left to reflect the removal int idx = getWidgetIndex(child); if (idx < beforeIndex) { beforeIndex--; } } return beforeIndex; }
[ "Adjusts beforeIndex to account for the possibility that the given widget is\nalready a child of this panel.\n\n@param child the widget that might be an existing child\n@param beforeIndex the index at which it will be added to this panel\n@return the modified index" ]
[ "Use this API to fetch authenticationnegotiatepolicy_binding resource of given name .", "Looks up the EJB in the container and executes the method on it\n\n@param self the proxy instance.\n@param method the overridden method declared in the super class or\ninterface.\n@param proceed the forwarder method for invoking the overridden method. It\nis null if the overridden method is abstract or declared in the\ninterface.\n@param args an array of objects containing the values of the arguments\npassed in the method invocation on the proxy instance. If a\nparameter type is a primitive type, the type of the array\nelement is a wrapper class.\n@return the resulting value of the method invocation.\n@throws Throwable if the method invocation fails.", "Use this API to fetch nspbr6 resource of given name .", "Extract the DatabaseTableConfig for a particular class by looking for class and field annotations. This is used\nby internal classes to configure a class.", "Use this API to fetch vlan_interface_binding resources of given name .", "Write a list of custom field attributes.", "Returns the value of the element with the minimum value\n@param A (Input) Matrix. Not modified.\n@return scalar", "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", "Calculate the layout container size along the axis\n@param axis {@link Axis}\n@return size" ]
public double estimateExcludedVolumeFraction(){ //Calculate volume/area of the of the scene without obstacles if(recalculateVolumeFraction){ CentralRandomNumberGenerator r = CentralRandomNumberGenerator.getInstance(); boolean firstRandomDraw = false; if(randomNumbers==null){ randomNumbers = new double[nRandPoints*dimension]; firstRandomDraw = true; } int countCollision = 0; for(int i = 0; i< nRandPoints; i++){ double[] pos = new double[dimension]; for(int j = 0; j < dimension; j++){ if(firstRandomDraw){ randomNumbers[i*dimension + j] = r.nextDouble(); } pos[j] = randomNumbers[i*dimension + j]*size[j]; } if(checkCollision(pos)){ countCollision++; } } fraction = countCollision*1.0/nRandPoints; recalculateVolumeFraction = false; } return fraction; }
[ "Estimate excluded volume fraction by monte carlo method\n@return excluded volume fraction" ]
[ "Set the \"everyWorkingDay\" flag.\n@param isEveryWorkingDay flag, indicating if the event should take place every working day.", "Gets the Kumar-Johnson divergence.\n\n@param p P vector.\n@param q Q vector.\n@return The Kumar-Johnson divergence between p and q.", "Determine if a CharSequence can be parsed as a Long.\n\n@param self a CharSequence\n@return true if the CharSequence can be parsed\n@see #isLong(String)\n@since 1.8.2", "Parses whole value as list attribute\n@deprecated in favour of using {@link AttributeParser attribute parser}\n@param value String with \",\" separated string elements\n@param operation operation to with this list elements are added\n@param reader xml reader from where reading is be done\n@throws XMLStreamException if {@code value} is not valid", "Get the max extent as a envelop object.", "Description accessor provided for JSON serialization only.", "Sets the indirection handler class.\n\n@param indirectionHandlerClass The class for indirection handlers", "Utility method to convert an array of bytes into a long. Byte ordered is\nassumed to be big-endian.\n@param bytes The data to read from.\n@param offset The position to start reading the 8-byte long from.\n@return The 64-bit integer represented by the eight bytes.\n@since 1.1", "Isn't there a method for this in GeoTools?\n\n@param crs\nCRS string in the form of 'EPSG:<srid>'.\n@return SRID as integer." ]
protected String getUniqueString(FieldDescriptor field) throws SequenceManagerException { ResultSetAndStatement rsStmt = null; String returnValue = null; try { rsStmt = getBrokerForClass().serviceJdbcAccess().executeSQL( "select newid()", field.getClassDescriptor(), Query.NOT_SCROLLABLE); if (rsStmt.m_rs.next()) { returnValue = rsStmt.m_rs.getString(1); } else { LoggerFactory.getDefaultLogger().error(this.getClass() + ": Can't lookup new oid for field " + field); } } catch (PersistenceBrokerException e) { throw new SequenceManagerException(e); } catch (SQLException e) { throw new SequenceManagerException(e); } finally { // close the used resources if (rsStmt != null) rsStmt.close(); } return returnValue; }
[ "returns a unique String for given field.\nthe returned uid is unique accross all tables." ]
[ "Override this method to change the default splash screen size or\nposition.\n\nThis method will be called <em>before</em> {@link #onInit(GVRContext)\nonInit()} and before the normal render pipeline starts up. In particular,\nthis means that any {@linkplain GVRAnimation animations} will not start\nuntil the first {@link #onStep()} and normal rendering starts.\n\n@param splashScreen\nThe splash object created from\n{@link #getSplashTexture(GVRContext)},\n{@link #getSplashMesh(GVRContext)}, and\n{@link #getSplashShader(GVRContext)}.\n\n@since 1.6.4", "Generate heroku-like random names\n\n@return String", "Unzip a file or a folder\n@param zipFile\n@param unzippedFolder optional, if null the file/folder will be extracted in the same folder as zipFile\n@return", "Retrieves a timestamp from the property data.\n\n@param type Type identifier\n@return timestamp", "we can't call this method 'of', cause it won't compile on JDK7", "Assigns this retention policy to a metadata template, optionally with certain field values.\n@param templateID the ID of the metadata template to apply to.\n@param fieldFilters optional field value filters.\n@return info about the created assignment.", "Retrieve the frequency of an exception.\n\n@param exception XML calendar exception\n@return frequency", "Recursively builds the VFS entry bean for the quick filtering function in the folder tab.<p<\n\n@param resource the resource\n@param childMap map from parent to child resources\n@param filterMatches the resources matching the filter\n@param parentPaths root paths of resources which are not leaves\n@param isRoot true if this the root node\n\n@return the VFS entry bean for the client\n\n@throws CmsException if something goes wrong", "Set the classpath for loading the driver.\n\n@param classpath the classpath" ]
public void createNewFile() throws SmbException { if( getUncPath0().length() == 1 ) { throw new SmbException( "Invalid operation for workgroups, servers, or shares" ); } close( open0( O_RDWR | O_CREAT | O_EXCL, 0, ATTR_NORMAL, 0 ), 0L ); }
[ "Create a new file but fail if it already exists. The check for\nexistance of the file and it's creation are an atomic operation with\nrespect to other filesystem activities." ]
[ "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", "Convert a key-version-nodeSet information to string\n\n@param key The key\n@param versionMap mapping versions to set of PrefixNodes\n@param storeName store's name\n@param partitionId partition scanned\n@return a string that describe the information passed in", "Convenience method for retrieving a char resource.\n\n@param locale locale identifier\n@param key resource key\n@return resource value", "Replace the last element of an address with a static path element.\n\n@param element the path element\n@return the operation address transformer", "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", "Return the AnnotationNode for the named annotation, or else null.\nSupports Groovy 1.5 and Groovy 1.6.\n@param node - the AnnotatedNode\n@param name - the name of the annotation\n@return the AnnotationNode or else null", "Process class properties.\n\n@param writer output stream\n@param methodSet set of methods processed\n@param aClass class being processed\n@throws IntrospectionException\n@throws XMLStreamException", "Creates the JSON serialized form of the accessory for use over the Homekit Accessory Protocol.\n\n@param instanceId the static id of the accessory.\n@return a future that will complete with the JSON builder for the object.", "Parse the given file to obtains a Properties object.\n\n@param file\n@return a properties object containing all the properties present in the file.\n@throws InvalidDeclarationFileException" ]
public Object getRealKey() { if(keyRealSubject != null) { return keyRealSubject; } else { TransactionExt tx = getTransaction(); if((tx != null) && tx.isOpen()) { prepareKeyRealSubject(tx.getBroker()); } else { if(getPBKey() != null) { PBCapsule capsule = new PBCapsule(getPBKey(), null); try { prepareKeyRealSubject(capsule.getBroker()); } finally { capsule.destroy(); } } else { getLog().warn("No tx, no PBKey - can't materialise key with Identity " + getKeyOid()); } } } return keyRealSubject; }
[ "Returns the real key object." ]
[ "Add a management request handler factory to this context.\n\n@param factory the request handler to add", "Adds a resource collection with execution hints.", "Sets the position vector of the keyframe.", "Combines adjacent blocks of the same type.", "Removes the given key with its associated element from the receiver, if present.\n\n@param key the key to be removed from the receiver.\n@return <tt>true</tt> if the receiver contained the specified key, <tt>false</tt> otherwise.", "Convert a Planner time into a Java date.\n\n0800\n\n@param value Planner time\n@return Java Date instance", "Unzip a file or a folder\n@param zipFile\n@param unzippedFolder optional, if null the file/folder will be extracted in the same folder as zipFile\n@return", "Add new control at the end of control bar with specified touch listener.\nSize of control bar is updated based on new number of controls.\n@param name name of the control to remove\n@param properties JSON control specific properties\n@param listener touch listener", "Configure the mapping between a database column and a field, including definition of\nan alias.\n\n@param container column to field map\n@param name column name\n@param type field type\n@param alias field alias" ]
protected boolean computeOffset(CacheDataSet cache) { // offset computation: update offset for all items in the cache float startDataOffset = getStartingOffset((cache.getTotalSizeWithPadding())); float layoutOffset = getLayoutOffset(); boolean inBounds = startDataOffset < -layoutOffset; for (int pos = 0; pos < cache.count(); ++pos) { int id = cache.getId(pos); if (id != -1) { float endDataOffset = cache.setDataAfter(id, startDataOffset); inBounds = inBounds && endDataOffset > layoutOffset && startDataOffset < -layoutOffset; startDataOffset = endDataOffset; Log.d(LAYOUT, TAG, "computeOffset [%d] = %f" , id, cache.getDataOffset(id)); } } return inBounds; }
[ "Compute the offset for the item in the layout based on the offsets of neighbors\nin the layout. The other offsets are not patched. If neighbors offsets have not\nbeen computed the offset of the item will not be set.\n@return true if the item fits the container, false otherwise" ]
[ "Returns a client object for a clientId\n\n@param clientId ID of client to return\n@return Client or null\n@throws Exception exception", "Close the open stream.\n\nClose the stream if it was opened before", "Calculate the child size along the axis\n@param dataIndex data index\n@param axis {@link Axis}\n@return child size", "Create a collection object of the given collection type. If none has been given,\nOJB uses RemovalAwareList, RemovalAwareSet, or RemovalAwareCollection depending\non the field type.\n\n@param desc The collection descriptor\n@param collectionClass The collection class specified in the collection-descriptor\n@return The collection object", "Unmark a PersistenceBroker as preferred choice for current Thread\n\n@param key The PBKey the broker is associated to\n@param broker The PersistenceBroker to unmark", "Make a timestamp value given a date.", "Inserts a Parcelable value into the mapping of the underlying Bundle, replacing any existing\nvalue for the given key. Either key or value may be null.\n\n@param key a String, or null\n@param value a Parcelable object, or null\n@return this bundler instance to chain method calls", "Layout children inside the layout container", "Returns the current transaction for the calling thread.\n\n@throws org.odmg.TransactionNotInProgressException\n{@link org.odmg.TransactionNotInProgressException} if no transaction was found." ]
private void makeSingularPositive() { numSingular = qralg.getNumberOfSingularValues(); singularValues = qralg.getSingularValues(); for( int i = 0; i < numSingular; i++ ) { double val = qralg.getSingularValue(i); if( val < 0 ) { singularValues[i] = 0.0 - val; if( computeU ) { // compute the results of multiplying it by an element of -1 at this location in // a diagonal matrix. int start = i* Ut.numCols; int stop = start+ Ut.numCols; for( int j = start; j < stop; j++ ) { Ut.set(j, 0.0 - Ut.get(j)); } } } else { singularValues[i] = val; } } }
[ "With the QR algorithm it is possible for the found singular values to be negative. This\nmakes them all positive by multiplying it by a diagonal matrix that has" ]
[ "Use this API to fetch sslvserver_sslciphersuite_binding resources of given name .", "Generates an organization regarding the parameters.\n\n@param name String\n@return Organization", "Use this API to export appfwlearningdata.", "Compares two avro strings which contains single store configs\n\n@param configAvro1\n@param configAvro2\n@return true if two config avro strings have same content", "Attempt to shutdown the server. As much shutdown as possible will be\ncompleted, even if intermediate errors are encountered.\n\n@throws VoldemortException", "Adds one or several attributes to facet on for the next queries.\n\n@param attributes one or more attribute names.\n@return this {@link Searcher} for chaining.", "Return configuration tweaks in a format appropriate for ness-jdbc DatabaseModule.", "Dump the contents of a row from an MPD file.\n\n@param row row data", "Populates the bean by mapping the processed columns to the fields of the bean.\n\n@param resultBean\nthe bean to populate\n@param nameMapping\nthe name mappings\n@return the populated bean\n@throws SuperCsvReflectionException\nif there was a reflection exception while populating the bean" ]
public static void pushClassType(CodeAttribute b, String classType) { if (classType.length() != 1) { if (classType.startsWith("L") && classType.endsWith(";")) { classType = classType.substring(1, classType.length() - 1); } b.loadClass(classType); } else { char type = classType.charAt(0); switch (type) { case 'I': b.getstatic(Integer.class.getName(), TYPE, LJAVA_LANG_CLASS); break; case 'J': b.getstatic(Long.class.getName(), TYPE, LJAVA_LANG_CLASS); break; case 'S': b.getstatic(Short.class.getName(), TYPE, LJAVA_LANG_CLASS); break; case 'F': b.getstatic(Float.class.getName(), TYPE, LJAVA_LANG_CLASS); break; case 'D': b.getstatic(Double.class.getName(), TYPE, LJAVA_LANG_CLASS); break; case 'B': b.getstatic(Byte.class.getName(), TYPE, LJAVA_LANG_CLASS); break; case 'C': b.getstatic(Character.class.getName(), TYPE, LJAVA_LANG_CLASS); break; case 'Z': b.getstatic(Boolean.class.getName(), TYPE, LJAVA_LANG_CLASS); break; default: throw new RuntimeException("Cannot handle primitive type: " + type); } } }
[ "Pushes a class type onto the stack from the string representation This can\nalso handle primitives\n\n@param b the bytecode\n@param classType the type descriptor for the class or primitive to push.\nThis will accept both the java.lang.Object form and the\nLjava/lang/Object; form" ]
[ "Refresh's this connection's access token using its refresh token.\n@throws IllegalStateException if this connection's access token cannot be refreshed.", "Creates a Blob holding a single-sheet spreadsheet with a pivot of the domain objects. The sheet name is derived from the\nclass name.\n\n<p>\nMinimal requirements for the domain object are:\n</p>\n<ul>\n<li>\nOne property has annotation {@link PivotRow} and will be used as row identifier in left column of pivot.\nEmpty values are supported.\n</li>\n<li>\nAt least one property has annotation {@link PivotColumn}. Its values will be used in columns of pivot.\nEmpty values are supported.\n</li>\n<li>\nAt least one property has annotation {@link PivotValue}. Its values will be distributed in the pivot.\n</li>\n</ul>", "Returns a unique file name\n@param baseFileName the requested base name for the file\n@param extension the requested extension for the file\n@param cleanBaseFileName specify if the <code>baseFileName</code> has to be cleaned before being used (i.e. 'jboss-web' should not be cleaned to avoid '-' to become '_')\n@param ancestorFolders specify the ancestor folders for the file (if there's no ancestor folder, just pass 'null' value)\n@return a String representing the unique file generated", "Returns a PreparedStatementCreator that returns a count of the rows that\nthis creator would return.\n\n@param dialect\nDatabase dialect.", "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.", "Get a property as a double or throw an exception.\n\n@param key the property name", "NOT IN Criteria with SubQuery\n@param attribute The field name to be used\n@param subQuery The subQuery", "Read project calendars.", "Converts a collection of dates to a JSON array with the long representation of the dates as strings.\n@param dates the list to convert.\n@return JSON array with long values of dates as string" ]
public static Object xmlToObject(String fileName) throws FileNotFoundException { FileInputStream fi = new FileInputStream(fileName); XMLDecoder decoder = new XMLDecoder(fi); Object object = decoder.readObject(); decoder.close(); return object; }
[ "Converts an XML file to an object.\n\n@param fileName The filename where to save it to.\n@return The object.\n@throws FileNotFoundException On error." ]
[ "Answer the SQL-Clause for a SelectionCriteria\nIf the Criteria references a class with extents an OR-Clause is\nadded for each extent\n@param c SelectionCriteria", "If a text contains double quotes, escape them.\n\n@param text the text to escape\n@return Escaped text or {@code null} if the text is null", "Applies the &gt; operator to each element in A. Results are stored in a boolean matrix.\n\n@param A Input matrx\n@param value value each element is compared against\n@param output (Optional) Storage for results. Can be null. Is reshaped.\n@return Boolean matrix with results", "Specifies the list of enrichers that will be used to enrich the container object.\n\n@param enrichers\nlist of enrichers that will be used to enrich the container object\n\n@return the current builder instance", "Remove any overrides for an endpoint on the default profile, client\n\n@param pathValue path (endpoint) value\n@param requestType path request type. \"GET\", \"POST\", etc\n@return true if success, false otherwise", "Converts a date series configuration to a date series bean.\n@return the date series bean.", "Set up the ThreadContext and delegate.", "Returns the latest change events for a given namespace.\n\n@param namespace the namespace to get events for.\n@return the latest change events for a given namespace.", "Whether the given grid dialect implements the specified facet or not.\n\n@param gridDialect the dialect of interest\n@param facetType the dialect facet type of interest\n@return {@code true} in case the given dialect implements the specified facet, {@code false} otherwise" ]
public Widget addControl(String name, int resId, Widget.OnTouchListener listener, int position) { Widget control = findChildByName(name); if (control == null) { control = createControlWidget(resId, name, null); } setupControl(name, control, listener, position); return control; }
[ "Add new control at the control bar with specified touch listener, resource and position.\nSize of control bar is updated based on new number of controls.\n@param name name of the control to remove\n@param resId the control face\n@param listener touch listener\n@param position control position in the bar" ]
[ "Initialize the version properties map from the gradle.properties file, and the additional properties from the\ngradle.properties file.", "Main method of RendererAdapter. This method has the responsibility of update the\nRendererBuilder values and create or recycle a new Renderer. Once the renderer has been\nobtained the RendereBuilder will call the render method in the renderer and will return the\nRenderer root view to the ListView.\n\nIf rRendererBuilder returns a null Renderer this method will throw a\nNullRendererBuiltException.\n\n@param position to render.\n@param convertView to use to recycle.\n@param parent used to inflate views.\n@return view rendered.", "Called when the pattern has changed.", "Replaces sequences of whitespaces with tabs within a line.\n\n@param self A line to unexpand\n@param tabStop The number of spaces a tab represents\n@return an unexpanded String\n@since 1.8.2", "Internally undo recorded changes we did so far.\n\n@return whether the state required undo actions", "Remove the sequence for given sequence name.\n\n@param sequenceName Name of the sequence to remove.", "Set the main attribute \"Bundle-RequiredExecutionEnvironment\" to the given\nvalue.\n\n@param bree The new value", "Initializes the type and validates it", "Add a 'IS NULL' clause so the column must be null. '=' NULL does not work." ]
@SuppressWarnings("unchecked") private static synchronized Map<String, Boolean> getCache(GraphRewrite event) { Map<String, Boolean> result = (Map<String, Boolean>)event.getRewriteContext().get(ClassificationServiceCache.class); if (result == null) { result = Collections.synchronizedMap(new LRUMap(30000)); event.getRewriteContext().put(ClassificationServiceCache.class, result); } return result; }
[ "Keep a cache of items files associated with classification in order to improve performance." ]
[ "Obtains the transform for a specific time in animation.\n\n@param animationTime The time in animation.\n\n@return The transform.", "Retrieve column font details from a block of property data.\n\n@param data property data\n@param offset offset into property data\n@param fontBases map of font bases\n@return ColumnFontStyle instance", "Set a colspan in a group of columns. First add the cols to the report\n\n@param colNumber the index of the col\n@param colQuantity the number of cols how i will take\n@param colspanTitle colspan title\n@return a Dynamic Report Builder\n@throws ColumnBuilderException When the index of the cols is out of\nbounds.", "Performs a request against a Stitch app server determined by the deployment model\nof the underlying app. Throws a Stitch specific exception if the request fails.\n\n@param stitchReq the request to perform.\n@return a {@link Response} to the request.", "Give an embedded association, creates all the nodes and relationships required to represent it.\nIt assumes that the entity node containing the association already exists in the db.\n\n@param executionEngine the {@link GraphDatabaseService} to run the query\n@param associationKey the {@link AssociationKey} identifying the association\n@param embeddedKey the {@link EntityKey} identifying the embedded component\n@return the created {@link Relationship} that represents the association", "Resolve the targeted license thanks to the license ID\nReturn null if no license is matching the licenseId\n\n@param licenseId\n@return DbLicense", "Print a date.\n\n@param value Date instance\n@return string representation of a date", "This method reads a byte array from the input stream.\n\n@param is the input stream\n@param size number of bytes to read\n@return byte array\n@throws IOException on file read error or EOF", "<<<<<< measureUntilFull helper methods" ]
private boolean checkAndSetManifestAndImagePathCandidates(String manifestPath, String candidateImagePath, ArtifactoryDependenciesClient dependenciesClient, TaskListener listener) throws IOException { String candidateManifest = getManifestFromArtifactory(dependenciesClient, manifestPath); if (candidateManifest == null) { return false; } String imageDigest = DockerUtils.getConfigDigest(candidateManifest); if (imageDigest.equals(imageId)) { manifest = candidateManifest; imagePath = candidateImagePath; return true; } listener.getLogger().println(String.format("Found incorrect manifest.json file in Artifactory in the following path: %s\nExpecting: %s got: %s", manifestPath, imageId, imageDigest)); return false; }
[ "Check if the provided manifestPath is correct.\nSet the manifest and imagePath in case of the correct manifest.\n@param manifestPath\n@param candidateImagePath\n@param dependenciesClient\n@param listener\n@return true if found the correct manifest\n@throws IOException" ]
[ "OJB can handle only classes that declare at least one primary key attribute,\nthis method checks this condition.\n\n@param realObject The real object to check\n@throws ClassNotPersistenceCapableException thrown if no primary key is specified for the objects class", "Use this API to fetch sslcertkey_sslocspresponder_binding resources of given name .", "Set up server for report directory.", "Use this API to add route6 resources.", "Load the view port execution.\n\n@param then callback when the view port is detected.\n@param fallback fallback when no view port detected or failure to detect the given\n{@link Boundary} (using {@link #propagateFallback(boolean)})", "Gets the project name for a favorite entry.\n\n@param cms the CMS context\n@param entry the favorite entry\n@return the project name for the favorite entry\n@throws CmsException if something goes wrong", "Remove a bean from the context, calling the destruction callback if any.\n\n@param name bean name\n@return previous value", "Switch to a new DataSource using the given configuration.\n@param newConfig BoneCP DataSource to use.\n@throws SQLException", "Unlock the given region. Does not report failures." ]
private Component createAddKeyButton() { // the "+" button Button addKeyButton = new Button(); addKeyButton.addStyleName("icon-only"); addKeyButton.addStyleName("borderless-colored"); addKeyButton.setDescription(m_messages.key(Messages.GUI_ADD_KEY_0)); addKeyButton.setIcon(FontOpenCms.CIRCLE_PLUS, m_messages.key(Messages.GUI_ADD_KEY_0)); addKeyButton.addClickListener(new ClickListener() { private static final long serialVersionUID = 1L; public void buttonClick(ClickEvent event) { handleAddKey(); } }); return addKeyButton; }
[ "Creates the \"Add key\" button.\n@return the \"Add key\" button." ]
[ "Gets a list of any tasks on this file with requested fields.\n\n@param fields optional fields to retrieve for this task.\n@return a list of tasks on this file.", "Calculates the local translation and rotation for a bone.\nAssumes WorldRot and WorldPos have been calculated for the bone.", "Overridden to ensure that our timestamp handling is as expected", "Gets the host-ignore data for a slave host running the given version.\n\n@param major the kernel management API major version\n@param minor the kernel management API minor version\n@param micro the kernel management API micro version\n\n@return the host-ignore data, or {@code null} if there is no matching registration", "Adds a file to your assembly but automatically generates the field name of the file.\n\n@param file {@link File} the file to be uploaded.", "Sets the target translator.\nIt will also remove any other translator set.\nNothing will happen if the argument is null.\n@param targetTranslator translator", "This method retrieves a byte array 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 byte array containing required data", "Checks the given reference descriptor.\n\n@param refDef The reference descriptor\n@param checkLevel The amount of checks to perform\n@exception ConstraintException If a constraint has been violated", "Flush output streams." ]
private List<Key> getScatterKeys( int numSplits, Query query, PartitionId partition, Datastore datastore) throws DatastoreException { Query.Builder scatterPointQuery = createScatterQuery(query, numSplits); List<Key> keySplits = new ArrayList<Key>(); QueryResultBatch batch; do { RunQueryRequest scatterRequest = RunQueryRequest.newBuilder() .setPartitionId(partition) .setQuery(scatterPointQuery) .build(); batch = datastore.runQuery(scatterRequest).getBatch(); for (EntityResult result : batch.getEntityResultsList()) { keySplits.add(result.getEntity().getKey()); } scatterPointQuery.setStartCursor(batch.getEndCursor()); scatterPointQuery.getLimitBuilder().setValue( scatterPointQuery.getLimit().getValue() - batch.getEntityResultsCount()); } while (batch.getMoreResults() == MoreResultsType.NOT_FINISHED); Collections.sort(keySplits, DatastoreHelper.getKeyComparator()); return keySplits; }
[ "Gets a list of split keys given a desired number of splits.\n\n<p>This list will contain multiple split keys for each split. Only a single split key\nwill be chosen as the split point, however providing multiple keys allows for more uniform\nsharding.\n\n@param numSplits the number of desired splits.\n@param query the user query.\n@param partition the partition to run the query in.\n@param datastore the datastore containing the data.\n@throws DatastoreException if there was an error when executing the datastore query." ]
[ "Retrieves the work variance.\n\n@return work variance", "Scan all the class path and look for all classes that have the Format\nAnnotations.", "This is a convenience method which reads the first project\nfrom the named MPD file using the JDBC-ODBC bridge driver.\n\n@param accessDatabaseFileName access database file name\n@return ProjectFile instance\n@throws MPXJException", "We have an OLE compound document... but is it an MPP file?\n\n@param stream file input stream\n@return ProjectFile instance", "perform the actual matching", "Loads all localizations not already loaded.\n@throws CmsException thrown if locking a file fails.\n@throws UnsupportedEncodingException thrown if reading a file fails.\n@throws IOException thrown if reading a file fails.", "Apply filter to an image.\n\n@param source FastBitmap", "Dump the buffer contents to a file\n@param file\n@throws IOException", "Treats the object as iterable, iterating through the values it represents and returns the first non-null result obtained from calling the closure, otherwise returns the defaultResult.\n\n@param self an Object with an iterator returning its values\n@param defaultResult an Object that should be returned if all closure results are null\n@param closure a closure that returns a non-null value when processing should stop\n@return the first non-null result of the closure, otherwise the default value\n@since 1.7.5" ]
public void storeIfNew(final DbArtifact fromClient) { final DbArtifact existing = repositoryHandler.getArtifact(fromClient.getGavc()); if(existing != null){ existing.setLicenses(fromClient.getLicenses()); store(existing); } if(existing == null){ store(fromClient); } }
[ "If the Artifact does not exist, it will add it to the database. Nothing if it already exit.\n\n@param fromClient DbArtifact" ]
[ "Set the value of the underlying component. Note that this will\nnot work for ListEditor components. Also, note that for a JComboBox,\nThe value object must have the same identity as an object in the drop-down.\n\n@param propName The DMR property name to set.\n@param value The value.", "Seeks to the given day within the current month\n@param dayOfMonth the day of the month to seek to, represented as an integer\nfrom 1 to 31. Must be guaranteed to parse as an Integer. If this day is\nbeyond the last day of the current month, the actual last day of the month\nwill be used.", "Remove colProxy from list of pending collections and\nregister its contents with the transaction.", "Use this API to delete cacheselector resources of given names.", "Puts a single byte if the buffer is not yet full.\n\n@return true if the byte was put, or false if the buffer is full", "Reports a given exception as a RuntimeException, since the interface does\nnot allow us to throw checked exceptions directly.\n\n@param e\nthe exception to report\n@throws RuntimeException\nin all cases", "Return an input stream to read the data from the named table.\n\n@param name table name\n@return InputStream instance\n@throws IOException", "Export modules and check them in. Assumes the log stream already open.\n@return exit code of the commit-script.", "Insert a new value prior to the index location in the existing value array,\nincreasing the field length accordingly.\n@param index - where the new values in an SFVec2f object will be placed in the array list\n@param newValue - the new x, y value for the array list" ]
public void setAmbientIntensity(float r, float g, float b, float a) { setVec4("ambient_intensity", r, g, b, a); }
[ "Set the ambient light intensity.\n\nThis designates the color of the ambient reflection.\nIt is multiplied by the material ambient color to derive\nthe hue of the ambient reflection for that material.\nThe built-in phong shader {@link GVRPhongShader} uses a {@code vec4} uniform named\n{@code ambient_intensity} to control the intensity of ambient light reflected.\n\n@param r red component (0 to 1)\n@param g green component (0 to 1)\n@param b blue component (0 to 1)\n@param a alpha component (0 to 1)" ]
[ "Calling EventProducerInterceptor in case of logging faults.\n\n@param exchange\nthe message exchange\n@param reqFid\nthe FlowId\n\n@throws Fault\nthe fault", "Returns the list of nodes which match the expression xpathExpr in the String domStr.\n\n@return the list of nodes which match the query\n@throws XPathExpressionException\n@throws IOException", "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", "Return the Renderer class associated to the prototype.\n\n@param prototypeClass used to search the renderer in the prototypes collection.\n@return the prototype index associated to the prototypeClass.", "Gets a list of AssignmentRows based on the current Assignments\n@return", "Gets container with alls groups of a certain user.\n\n@param cms cmsobject\n@param user to find groups for\n@param caption caption property\n@param iconProp property\n@param ou ou\n@param propStatus status property\n@param iconProvider the icon provider\n@return Indexed Container", "Computes either the vector p-norm or the induced matrix p-norm depending on A\nbeing a vector or a matrix respectively.\n\n@param A Vector or matrix whose norm is to be computed.\n@param p The p value of the p-norm.\n@return The computed norm.", "Sobel method to generate bump map from a height map\n\n@param input - A height map\n@return bump map", "Find the length of the block starting from 'start'." ]
public static int getId(Context context, String id, String defType) { String type = "R." + defType + "."; if (id.startsWith(type)) { id = id.substring(type.length()); } Resources r = context.getResources(); int resId = r.getIdentifier(id, defType, context.getPackageName()); if (resId > 0) { return resId; } else { throw new RuntimeAssertion("Specified resource '%s' could not be found", id); } }
[ "Get the int resource id with specified type definition\n@param context\n@param id String resource id\n@return int resource id" ]
[ "FIXME Remove this method", "Either gets an existing lock on the specified resource or creates one if none exists.\nThis methods guarantees to do this atomically.\n\n@param resourceId the resource to get or create the lock on\n@param isolationId the isolation level identity key. See {@link CommonsOJBLockManager}.\n@return the lock for the specified resource", "Insert a new value prior to the index location in the existing value array,\nincreasing the field length accordingly.\n@param index - where the new values in an SFVec2f object will be placed in the array list\n@param newValue - the new x, y value for the array list", "The cell String is the string representation of the object.\nIf padLeft is greater than 0, it is padded. Ditto right", "Adds a JSON string to the DB.\n\n@param obj the JSON to record\n@param table the table to insert into\n@return the number of rows in the table, or DB_OUT_OF_MEMORY_ERROR/DB_UPDATE_ERROR", "Subtracts v1 from this vector and places the result in this vector.\n\n@param v1\nright-hand vector", "Sends out the SQL as defined in the config upon first init of the connection.\n@param connection\n@param initSQL\n@throws SQLException", "Get cached value that is dynamically loaded by the Acacia content editor.\n\n@param attribute the attribute to load the value to\n@return the cached value", "Helper to read an optional String value list.\n@param path The XML path of the element to read.\n@return The String list stored in the XML, or <code>null</code> if the value could not be read." ]
public Map<String, T> parseMap(JsonParser jsonParser) throws IOException { HashMap<String, T> map = new HashMap<String, T>(); while (jsonParser.nextToken() != JsonToken.END_OBJECT) { String key = jsonParser.getText(); jsonParser.nextToken(); if (jsonParser.getCurrentToken() == JsonToken.VALUE_NULL) { map.put(key, null); } else{ map.put(key, parse(jsonParser)); } } return map; }
[ "Parse a map of objects from a JsonParser.\n\n@param jsonParser The JsonParser, preconfigured to be at the START_ARRAY token." ]
[ "Do not call this method outside of activity!!!", "Returns the given text with the first letter in upper case.\n\n<h2>Examples:</h2>\n<pre>\ncapitalize(\"hi\") == \"Hi\"\ncapitalize(\"Hi\") == \"Hi\"\ncapitalize(\"hi there\") == \"hi there\"\ncapitalize(\"\") == \"\"\ncapitalize(null) == null\n</pre>\n@param text the text to capitalize\n@return text with the first letter in upper case", "Extract data for a single calendar.\n\n@param row calendar data", "Decode the String from Base64 into a byte array.\n\n@param value the string to be decoded\n@return the decoded bytes as an array\n@since 1.0", "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.", "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.", "Read recurring data for a calendar exception.\n\n@param bce MPXJ calendar exception\n@param exception XML calendar exception", "Return true if this rule should be applied for the specified ClassNode, based on the\nconfiguration of this rule.\n@param classNode - the ClassNode\n@return true if this rule should be applied for the specified ClassNode", "Gets the first value for the key.\n\n@param key the key to check for the value\n\n@return the value or {@code null} if the key is not found or the value was {@code null}" ]
private void instanceAlreadyLoaded( final Tuple resultset, final int i, //TODO create an interface for this usage final OgmEntityPersister persister, final org.hibernate.engine.spi.EntityKey key, final Object object, final LockMode lockMode, final SharedSessionContractImplementor session) throws HibernateException { if ( !persister.isInstance( object ) ) { throw new WrongClassException( "loaded object was of wrong class " + object.getClass(), key.getIdentifier(), persister.getEntityName() ); } if ( LockMode.NONE != lockMode && upgradeLocks() ) { // no point doing this if NONE was requested final boolean isVersionCheckNeeded = persister.isVersioned() && session.getPersistenceContext().getEntry( object ) .getLockMode().lessThan( lockMode ); // we don't need to worry about existing version being uninitialized // because this block isn't called by a re-entrant load (re-entrant // loads _always_ have lock mode NONE) if ( isVersionCheckNeeded ) { //we only check the version when _upgrading_ lock modes Object oldVersion = session.getPersistenceContext().getEntry( object ).getVersion(); persister.checkVersionAndRaiseSOSE( key.getIdentifier(), oldVersion, session, resultset ); //we need to upgrade the lock mode to the mode requested session.getPersistenceContext().getEntry( object ) .setLockMode( lockMode ); } } }
[ "The entity instance is already in the session cache\n\nCopied from Loader#instanceAlreadyLoaded" ]
[ "Retrieves the named calendar. This method will return\nnull if the named calendar is not located.\n\n@param calendarName name of the required calendar\n@return ProjectCalendar instance", "Fires the event and waits for a specified time.\n\n@param webElement the element to fire event on.\n@param eventable The HTML event type (onclick, onmouseover, ...).\n@return true if firing event is successful.\n@throws InterruptedException when interrupted during the wait.", "Creates a Bytes object by copying the data of a subsequence of the given byte array\n\n@param data Byte data\n@param offset Starting offset in byte array (inclusive)\n@param length Number of bytes to include", "Report on the filtered data in DMR .", "Get stream for URL only\n\n@param stringUrl URL to get content\n@return the input stream\n@throws IOException I/O error happened", "Get a property as a float or Default value.\n\n@param key the property name\n@param defaultValue default value", "Painter the tile, by building a URL where the image can be found.\n\n@param tile\nMust be an instance of {@link InternalTile}, and must have a non-null {@link RasterUrlBuilder}.\n@return Returns a {@link InternalTile}.", "Adds a logical operator block.\n\n@param list parent criteria list\n@param block current block\n@param operator logical operator represented by this block", "Set whether the WMS tiles should be cached for later use. This implies that the WMS tiles will be proxied.\n\n@param useCache true when request needs to be cached\n@since 1.9.0" ]
private boolean isWorkingDate(Date date, Day day) { ProjectCalendarDateRanges ranges = getRanges(date, null, day); return ranges.getRangeCount() != 0; }
[ "This private method allows the caller to determine if a given date is a\nworking day. This method takes account of calendar exceptions. It assumes\nthat the caller has already calculated the day of the week on which\nthe given day falls.\n\n@param date Date to be tested\n@param day Day of the week for the date under test\n@return boolean flag" ]
[ "Resolve a resource transformer for a given address.\n\n@param address the address\n@param placeholderResolver a placeholder resolver used to resolve children of a placeholder registration\n@return the resource transformer", "Sets the bounds of a UIObject, moving and sizing to match the\nbounds specified. Currently used for the itemhover and useful\nfor other absolutely positioned elements.", "Get transformer to use.\n\n@return transformation to apply", "Describe the model as a list of resources with their address and model, which\nthe HC can directly apply to create the model. Although the format might appear\nsimilar as the operations generated at boot-time this description is only useful\nto create the resource tree and cannot be used to invoke any operation.\n\n@param rootAddress the address of the root resource being described\n@param resource the root resource\n@return the list of resources", "iteration not synchronized", "Converts SMatrixTriplet_64 into a SMatrixCC_64.\n\n@param src Original matrix which is to be copied. Not modified.\n@param dst Destination. Will be a copy. Modified.\n@param hist Workspace. Should be at least as long as the number of columns. Can be null.", "Creates a new Box Developer Edition connection with enterprise token leveraging BoxConfig.\n@param boxConfig box configuration settings object\n@return a new instance of BoxAPIConnection.", "Converts a batch indexing into the sample, to a batch indexing into the\noriginal function.\n\n@param batch The batch indexing into the sample.\n@return A new batch indexing into the original function, containing only\nthe indices from the sample.", "Bessel function of the second kind, of order 1.\n\n@param x Value.\n@return Y value." ]
public static Session getSession(final ServerSetup setup, Properties mailProps) { Properties props = setup.configureJavaMailSessionProperties(mailProps, false); log.debug("Mail session properties are {}", props); return Session.getInstance(props, null); }
[ "Gets a JavaMail Session for given server type such as IMAP and additional props for JavaMail.\n\n@param setup the setup type, such as <code>ServerSetup.IMAP</code>\n@param mailProps additional mail properties.\n@return the JavaMail session." ]
[ "Parse the XML for a collection as returned by getTree call.\n\n@param collectionElement\n@return", "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.", "Create a text message that will be stored in the database. Must be called inside a transaction.", "Builds the HTML code for a select widget given a bean containing the select options\n\n@param htmlAttributes html attributes for the select widget\n@param options the bean containing the select options\n\n@return the HTML for the select box", "Verifies a provided signature.\n\n@param key\nfor which signature key\n@param actualAlgorithm\ncurrent signature algorithm\n@param actualSignature\ncurrent signature\n@param webHookPayload\nfor signing\n@param deliveryTimestamp\nfor signing\n@return true if verification passed", "Creates the code mappings.\n\n@param mtasTokenIdFactory\nthe mtas token id factory\n@param level\nthe level\n@param stringValue\nthe string value\n@param offsetStart\nthe offset start\n@param offsetEnd\nthe offset end\n@param realOffsetStart\nthe real offset start\n@param realOffsetEnd\nthe real offset end\n@param codePositions\nthe code positions\n@throws IOException\nSignals that an I/O exception has occurred.", "Get a scalar value for the DOM diversity using the Robust Tree Edit Distance\n\n@param dom1\n@param dom2\n@return", "Awaits at most 5 minutes until all pods meets the given predicate.\n\n@param filter used to wait to detect that a pod is up and running.", "Detect bad xml 1.0 characters\n\n@param c to detect\n@return true if specified character valid, false otherwise" ]
public static int[] getTileScreenSize(double[] worldSize, double scale) { int screenWidth = (int) Math.round(scale * worldSize[0]); int screenHeight = (int) Math.round(scale * worldSize[1]); return new int[] { screenWidth, screenHeight }; }
[ "Calculate the screen size of a tile. Normally the screen size is expressed in pixels and should therefore be\nintegers, but for the sake of accuracy we try to keep a double value as long as possible.\n\n@param worldSize\nThe width and height of a tile in the layer's world coordinate system.\n@param scale\nThe current client side scale.\n@return Returns an array of double values where the first value is the tile screen width and the second value is\nthe tile screen height." ]
[ "Support the range subscript operator for CharSequence\n\n@param text a CharSequence\n@param range a Range\n@return the subsequence CharSequence\n@since 1.0", "Writes data to delegate stream if it has been set.\n\n@param data the data to write", "Returns a new iterator filtering any null references.\n\n@param unfiltered\nthe unfiltered iterator. May not be <code>null</code>.\n@return an unmodifiable iterator containing all elements of the original iterator without any <code>null</code>\nreferences. Never <code>null</code>.", "generate a prepared DELETE-Statement for the Class\ndescribed by cld.\n@param cld the ClassDescriptor", "Creates a descriptor for the currently edited message bundle.\n@return <code>true</code> if the descriptor could be created, <code>false</code> otherwise.", "Use this API to update nsspparams.", "Sets the max.\n\n@param n the new max", "Extract calendar data.", "Retrieves the notes text for this resource.\n\n@return notes text" ]
public static void normalizeF( DMatrixRMaj A ) { double val = normF(A); if( val == 0 ) return; int size = A.getNumElements(); for( int i = 0; i < size; i++) { A.div(i , val); } }
[ "Normalizes the matrix such that the Frobenius norm is equal to one.\n\n@param A The matrix that is to be normalized." ]
[ "Convert an array of bytes into an array of ints. 4 bytes from the\ninput data map to a single int in the output data.\n@param bytes The data to read from.\n@return An array of 32-bit integers constructed from the data.\n@since 1.1", "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.", "Get a random pod that provides the specified service in the specified namespace.\n\n@param client\nThe client instance to use.\n@param name\nThe name of the service.\n@param namespace\nThe namespace of the service.\n\n@return The pod or null if no pod matches.", "Return the index associated to the Renderer.\n\n@param renderer used to search in the prototypes collection.\n@return the prototype index associated to the renderer passed as argument.", "Searches for cases where a minus sign means negative operator. That happens when there is a minus\nsign with a variable to its right and no variable to its left\n\nExample:\na = - b * c", "As part of checking whether a metadata cache can be auto-mounted for a particular media slot, this method\nlooks up the track at the specified offset within the player's track list, and returns its rekordbox ID.\n\n@param slot the slot being considered for auto-attaching a metadata cache\n@param client the connection to the database server on the player holding that slot\n@param offset an index into the list of all tracks present in the slot\n\n@throws IOException if there is a problem communicating with the player", "Removes the expiration flag.", "Process the set of activities from the Phoenix file.\n\n@param phoenixProject project data", "Calculates ATM Bachelier implied volatilities.\n\n@see net.finmath.functions.AnalyticFormulas#bachelierOptionImpliedVolatility(double, double, double, double, double)\n\n@param optionValue RandomVarable representing the value of the option\n@param optionMaturity Time to maturity.\n@param swapAnnuity The swap annuity as seen on valuation time.\n@return The Bachelier implied volatility." ]
public static String[] removeDuplicateStrings(String[] array) { if (isEmpty(array)) { return array; } Set<String> set = new TreeSet<String>(); Collections.addAll(set, array); return toStringArray(set); }
[ "Remove duplicate Strings from the given array. Also sorts the array, as\nit uses a TreeSet.\n\n@param array the String array\n@return an array without duplicates, in natural sort order" ]
[ "Retrieves list of inbox messages based on given userId\n@param userId String userid\n@return ArrayList of {@link CTMessageDAO}", "Returns true if super class of the parameter exists and is abstract and package private. In such case we want to omit such method.\n\nSee WELD-2507 and Oracle issue - https://bugs.java.com/view_bug.do?bug_id=6342411\n\n@return true if the super class exists and is abstract and package private", "Clears out the statement handles.\n@param internalClose if true, close the inner statement handle too.", "Write a boolean field to the JSON file.\n\n@param fieldName field name\n@param value field value", "Returns the index of each elem in a List.\n@param elems The list of items\n@return An array of indices", "Retrieves and validates the content type from the REST requests\n\n@return true if has content type.", "Reads any exceptions present in the file. This is only used in MSPDI\nfile versions saved by Project 2007 and later.\n\n@param calendar XML calendar\n@param bc MPXJ calendar", "Return the raw source line corresponding to the specified AST node\n\n@param node - the Groovy AST node", "Detects if the current device is a mobile device.\nThis method catches most of the popular modern devices.\nExcludes Apple iPads and other modern tablets.\n@return detection of any mobile device using the quicker method" ]
public static boolean isTypeManagedBeanOrDecoratorOrInterceptor(AnnotatedType<?> annotatedType) { Class<?> javaClass = annotatedType.getJavaClass(); return !javaClass.isEnum() && !Extension.class.isAssignableFrom(javaClass) && Reflections.isTopLevelOrStaticNestedClass(javaClass) && !Reflections.isParameterizedTypeWithWildcard(javaClass) && hasSimpleCdiConstructor(annotatedType); }
[ "Indicates if the type is a simple Web Bean\n\n@param clazz The type to inspect\n@return True if simple Web Bean, false otherwise" ]
[ "Use this API to disable nsfeature.", "The MapReduce framework should operate sequentially, so thread safety shouldn't be a problem.", "Are these two numbers effectively equal?\n\nThe same logic is applied for each of the 3 vector dimensions: see {@link #equal}\n@param v1\n@param v2", "Gets an item that was shared with a password-protected shared link.\n@param api the API connection to be used by the shared item.\n@param sharedLink the shared link to the item.\n@param password the password for the shared link.\n@return info about the shared item.", "Remove the corresponding object from session AND application cache.", "Find the user by their email address.\n\nThis method does not require authentication.\n\n@param email\nThe email address\n@return The User\n@throws FlickrException", "Constructs the convex hull of a set of points whose coordinates are given\nby an array of doubles.\n\n@param coords\nx, y, and z coordinates of each input point. The length of\nthis array must be at least three times <code>nump</code>.\n@param nump\nnumber of input points\n@throws IllegalArgumentException\nthe number of input points is less than four or greater than\n1/3 the length of <code>coords</code>, or the points appear\nto be coincident, colinear, or coplanar.", "This method computes the eigen vector with the largest eigen value by using the\ndirect power method. This technique is the easiest to implement, but the slowest to converge.\nWorks only if all the eigenvalues are real.\n\n@param A The matrix. Not modified.\n@return If it converged or not.", "Log the values for the provided template.\n\n@param templateName the name of the template the values came from\n@param template the template object\n@param values the resultant values" ]
@JmxOperation(description = "Retrieve operation status") public String getStatus(int id) { try { return getOperationStatus(id).toString(); } catch(VoldemortException e) { return "No operation with id " + id + " found"; } }
[ "Wrap getOperationStatus to avoid throwing exception over JMX" ]
[ "Return the regression basis functions.\n\n@param exerciseDate The date w.r.t. which the basis functions should be measurable.\n@param model The model.\n@return Array of random variables.\n@throws net.finmath.exception.CalculationException Thrown if the valuation fails, specific cause may be available via the <code>cause()</code> method.", "Creates the JSON serialized form of the accessory for use over the Homekit Accessory Protocol.\n\n@param instanceId the static id of the accessory.\n@return a future that will complete with the JSON builder for the object.", "Complete the current operation and persist the current state to the disk. This will also trigger the invalidation\nof outdated modules.\n\n@param modification the current modification\n@param callback the completion callback", "Obtains the transform for a specific time in animation.\n\n@param animationTime The time in animation.\n\n@return The transform.", "Gets the property by key converted to lowercase if requested\n@param key property key\n@param lowerCase convert property to lowercase if it is true, keep the original one if it is\nfalse\n@return node property", "disables the current active id, enables the new one selected\n\n@param profileId profile ID of the client\n@param clientUUID UUID of the client\n@param active true to make client active, false to make client inactive\n@throws Exception exception", "Internal utility to dump relationship lists in a structured format\nthat can easily be compared with the tabular data in MS Project.\n\n@param relations relation list", "Classify the tokens in a String. Each sentence becomes a separate document.\nDoesn't override default readerAndWriter.\n\n@param str\nA String with tokens in one or more sentences of text to be\nclassified.\n@return {@link List} of classified sentences (each a List of something that\nextends {@link CoreMap}).", "Given a class configures the binding between a class and a Renderer class.\n\n@param clazz to bind.\n@param prototype used as Renderer.\n@return the current RendererBuilder instance." ]
public static inat[] get(nitro_service service) throws Exception{ inat obj = new inat(); inat[] response = (inat[])obj.get_resources(service); return response; }
[ "Use this API to fetch all the inat resources that are configured on netscaler." ]
[ "this remove the linebreak.\n\n@param input\nthe input\n@param patternStr\nthe pattern str\n@return the string", "Use this API to fetch gslbvserver_spilloverpolicy_binding resources of given name .", "Deletes a specific client id for a profile\n\n@param model\n@param profileIdentifier\n@param clientUUID\n@return returns the table of the remaining clients or an exception if deletion failed for some reason\n@throws Exception", "Creates the JSON serialized form of the accessory for use over the Homekit Accessory Protocol.\n\n@param instanceId the static id of the accessory.\n@return a future that will complete with the JSON builder for the object.", "Use this API to fetch sslcipher resources of given names .", "Create a handful of default currencies to keep Primavera happy.", "Use this API to fetch all the nssimpleacl resources that are configured on netscaler.", "Add all elements in the iterable to the collection.\n\n@param target\n@param iterable\n@return true if the target was modified, false otherwise", "Creates a tar file entry with defaults parameters.\n@param fileName the entry name\n@return file entry with reasonable defaults" ]
private void init() { validatePreSignedUrls(); try { conn = new AWSAuthConnection(access_key, secret_access_key); // Determine the bucket name if prefix is set or if pre-signed URLs are being used if (prefix != null && prefix.length() > 0) { ListAllMyBucketsResponse bucket_list = conn.listAllMyBuckets(null); List buckets = bucket_list.entries; if (buckets != null) { boolean found = false; for (Object tmp : buckets) { if (tmp instanceof Bucket) { Bucket bucket = (Bucket) tmp; if (bucket.name.startsWith(prefix)) { location = bucket.name; found = true; } } } if (!found) { location = prefix + "-" + java.util.UUID.randomUUID().toString(); } } } if (usingPreSignedUrls()) { PreSignedUrlParser parsedPut = new PreSignedUrlParser(pre_signed_put_url); location = parsedPut.getBucket(); } if (!conn.checkBucketExists(location)) { conn.createBucket(location, AWSAuthConnection.LOCATION_DEFAULT, null).connection.getResponseMessage(); } } catch (Exception e) { throw HostControllerLogger.ROOT_LOGGER.cannotAccessS3Bucket(location, e.getLocalizedMessage()); } }
[ "Do the set-up that's needed to access Amazon S3." ]
[ "Injects bound fields\n\n@param instance The instance to inject into", "Creates dependency on management executor.\n\n@param builder the builder\n@param injector the injector\n@param <T> the parameter type\n@return service builder instance\n@deprecated Use {@link #requireServerExecutor(ServiceBuilder)} instead. This method will be removed in the future.", "Parses a string that contains multiple fat client configs in avro format\n\n@param configAvro Input string of avro format, that contains config for\nmultiple stores\n@return Map of store names to store config properties", "Provides lookup of elements by non-namespaced name.\n\n@param name the name or shortcut key for nodes of interest\n@return the nodes of interest which match name", "Checks if the specified bytecode version string represents a JDK 1.5+ compatible\nbytecode version.\n@param bytecodeVersion the bytecode version string (1.4, 1.5, 1.6, 1.7 or 1.8)\n@return true if the bytecode version is JDK 1.5+", "Adds a boolean refinement for the next queries.\n\n@param attribute the attribute to refine on.\n@param value the value to refine with.\n@return this {@link Searcher} for chaining.", "Notification that the configuration has been written, and its current content should be stored to the .last file", "Removes a node meta data entry.\n\n@param key - the meta data key\n@throws GroovyBugError if the key is null", "Gets the visibility cache weight\n\n@param conf The FluoConfiguration\n@return The size of the cache value from the property value {@value #VISIBILITY_CACHE_WEIGHT}\nif it is set, else the value of the default value\n{@value #VISIBILITY_CACHE_WEIGHT_DEFAULT}" ]
private void persistDecorator(XMLExtendedStreamWriter writer, ModelNode model) throws XMLStreamException { if (shouldWriteDecoratorAndElements(model)) { writer.writeStartElement(decoratorElement); persistChildren(writer, model); writer.writeEndElement(); } }
[ "persist decorator and than continue to children without touching the model" ]
[ "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.", "Initialize the service with a context\n@param context the servlet context to initialize the profile.", "Get the nearest scale.\n\n@param zoomLevels the list of Zoom Levels.\n@param tolerance the tolerance to use when considering if two values are equal. For example if\n12.0 == 12.001. The tolerance is a percentage.\n@param zoomLevelSnapStrategy the strategy to use for snapping to the nearest zoom level.\n@param geodetic snap to geodetic scales.\n@param paintArea the paint area of the map.\n@param dpi the DPI.", "Use this API to fetch dnsview resources of given names .", "Returns the deployment names with the specified runtime names at the specified deploymentRootAddress.\n\n@param deploymentRootResource\n@param runtimeNames\n@return the deployment names with the specified runtime names at the specified deploymentRootAddress.", "given is at the begining, of is at the end", "splits a string into a list of strings. Trims the results and ignores empty strings", "Updates the store definition object and the retention time based on the\nupdated store definition", "Restores a BoxAPIConnection from a saved state.\n\n@see #save\n@param clientID the client ID to use with the connection.\n@param clientSecret the client secret to use with the connection.\n@param state the saved state that was created with {@link #save}.\n@return a restored API connection." ]
private void setLanguageFilters(String filters) { this.filterLanguages = new HashSet<>(); if (!"-".equals(filters)) { Collections.addAll(this.filterLanguages, filters.split(",")); } }
[ "Sets the set of language filters based on the given string.\n\n@param filters\ncomma-separates list of language codes, or \"-\" to filter all\nlanguages" ]
[ "Apply content type to response with result provided.\n\nIf `result` is an error then it might not apply content type as requested:\n* If request is not ajax request, then use `text/html`\n* If request is ajax request then apply requested content type only when `json` or `xml` is requested\n* otherwise use `text/html`\n\n@param result\nthe result used to check if it is error result\n@return this `ActionContext`.", "We need to make sure the terms are of the right type, otherwise they will not be serialized correctly.", "Converts this file into a resource name on the classpath by cutting of the file path\nto the classpath root.\n\n@param classPathRootOnDisk The location of the classpath root on disk, with a trailing slash.\n@param file The file.\n@return The resource name on the classpath.", "Checks the preconditions for creating a new HashMapper processor.\n\n@param mapping\nthe Map\n@throws NullPointerException\nif mapping is null\n@throws IllegalArgumentException\nif mapping is empty", "This implementation checks whether a File can be opened,\nfalling back to whether an InputStream can be opened.\nThis will cover both directories and content resources.", "Returns a short class name for an object.\nThis is the class name stripped of any package name.\n\n@return The name of the class minus a package name, for example\n<code>ArrayList</code>", "Try Oracle update batching and call executeUpdate or revert to\nJDBC update batching.\n@param stmt the statement beeing added to the batch\n@throws PlatformException upon JDBC failure", "This loads plugin file information into a hash for lazy loading later on\n\n@param pluginDirectory path of plugin\n@throws Exception exception", "The setter for setting configuration file. It will convert the value to a URI.\n\n@param configurationFiles the configuration file map." ]
public List<Release> listReleases(String appName) { return connection.execute(new ReleaseList(appName), apiKey); }
[ "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" ]
[ "Dumps all properties of a material to stdout.\n\n@param material the material", "Attach all project models within the application to the index. This will make it easy to navigate from the\nprojectModel to the application index.", "Encodes the given URI user info with the given encoding.\n@param userInfo the user info to be encoded\n@param encoding the character encoding to encode to\n@return the encoded user info\n@throws UnsupportedEncodingException when the given encoding parameter is not supported", "Remove all unnecessary comments from a lexer or parser file", "Another method to force an input string into a fixed width field\nand set it on the right with the left side filled with space ' ' characters.\n\n@param input input string\n@param width required width\n@return formatted string", "Analyses the content of the general section of an ini configuration file\nand fills out the class arguments with this data.\n\n@param section\n{@link Section} with name \"general\"", "The Cost Variance field shows the difference between the baseline cost\nand total cost for a task. The total cost is the current estimate of costs\nbased on actual costs and remaining costs.\n\n@return amount", "Load physics information for the current avatar\n@param filename name of physics file\n@param scene scene the avatar is part of\n@throws IOException if physics file cannot be parsed", "Send a master handoff yield command to all registered listeners.\n\n@param toPlayer the device number to which we are being instructed to yield the tempo master role" ]
public void callFunction(String className, String methodName, PluginArguments pluginArgs, Object... args) throws Exception { Class<?> cls = getClass(className); ArrayList<Object> newArgs = new ArrayList<>(); newArgs.add(pluginArgs); com.groupon.odo.proxylib.models.Method m = preparePluginMethod(newArgs, className, methodName, args); m.getMethod().invoke(cls, newArgs.toArray(new Object[0])); }
[ "Calls the specified function with the specified arguments. This is used for v2 response overrides\n\n@param className name of class\n@param methodName name of method\n@param pluginArgs plugin arguments\n@param args arguments to supply to function\n@throws Exception exception" ]
[ "Throws one RendererException if the viewType, layoutInflater or parent are null.", "Set the host running the Odo instance to configure\n\n@param hostName name of host", "Send message to all connections connected to the same URL of this context\n\n@param message the message to be sent\n@param excludeSelf whether the connection of this context should be sent to\n@return this context", "Tokenizes the input file and extracts the required data.\n\n@param is input stream\n@throws MPXJException", "Creates a random vector that is inside the specified span.\n\n@param span The span the random vector belongs in.\n@param rand RNG\n@return A random vector within the specified span.", "Add a single header key-value pair. If one with the name already exists,\nboth stay in the header map.\n\n@param name the name of the header.\n@param value the value of the header.\n@return the interceptor instance itself.", "Use this API to add dbdbprofile resources.", "Use this API to add sslaction.", "Returns a collection view of this map's values.\n\n@return a collection view of this map's values." ]
public static String decodeUrlIso(String stringToDecode) { try { return URLDecoder.decode(stringToDecode, "ISO-8859-1"); } catch (UnsupportedEncodingException e1) { throw new RuntimeException(e1); } }
[ "URL-Decodes a given string using ISO-8859-1. No UnsupportedEncodingException to handle as it is dealt with in\nthis method." ]
[ "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", "Request the list of all tracks in the specified slot, given a dbserver connection to a player that has already\nbeen set up.\n\n@param slot identifies the media slot we are querying\n@param client the dbserver client that is communicating with the appropriate player\n\n@return the retrieved track list entry items\n\n@throws IOException if there is a communication problem\n@throws InterruptedException if the thread is interrupted while trying to lock the client for menu operations\n@throws TimeoutException if we are unable to lock the client for menu operations", "Creates and returns a matrix which is idential to this one.\n\n@return A new identical matrix.", "Set default interval for sending events to monitoring service. DefaultInterval will be used by\nscheduler.\n\n@param defaultInterval the new default interval", "Handles incoming Application Update Request.\n@param incomingMessage the request message to process.", "Facade method for operating the Unix-like terminal supporting line editing and command\nhistory.\n\n@param prompt Prompt to be displayed\n@param appName The app name string\n@param mainHandler Main command handler\n@param input Input stream.\n@param output Output stream.\n@return Shell that can be either further customized or run directly by calling commandLoop().", "Retrieve the Activity ID value for this task.\n@param task Task instance\n@return Activity ID value", "Adds a JSON string to the DB.\n\n@param obj the JSON to record\n@param table the table to insert into\n@return the number of rows in the table, or DB_OUT_OF_MEMORY_ERROR/DB_UPDATE_ERROR", "Parses values out of the header text.\n\n@param header header text" ]
public Date getFinishTime(Date date) { Date result = null; if (date != null) { ProjectCalendarDateRanges ranges = getRanges(date, null, null); if (ranges == null) { result = getParentFile().getProjectProperties().getDefaultEndTime(); result = DateHelper.getCanonicalTime(result); } else { Date rangeStart = result = ranges.getRange(0).getStart(); Date rangeFinish = ranges.getRange(ranges.getRangeCount() - 1).getEnd(); Date startDay = DateHelper.getDayStartDate(rangeStart); Date finishDay = DateHelper.getDayStartDate(rangeFinish); result = DateHelper.getCanonicalTime(rangeFinish); // // Handle the case where the end of the range is at midnight - // this will show up as the start and end days not matching // if (startDay != null && finishDay != null && startDay.getTime() != finishDay.getTime()) { result = DateHelper.addDays(result, 1); } } } return result; }
[ "Retrieves the time at which work finishes on the given date, or returns\nnull if this is a non-working day.\n\n@param date Date instance\n@return finish time, or null for non-working day" ]
[ "Utility function that fetches partitions.\n\n@param adminClient An instance of AdminClient points to given cluster\n@return all partitions on cluster", "This implementation does not support the 'offset' and 'maxResultSize' parameters.", "Does the bitwise conjunction with this address. Useful when subnetting.\n\n@param mask\n@param retainPrefix whether to drop the prefix\n@return\n@throws IncompatibleAddressException", "Unlock the given region. Does not report failures.", "Adds the position range.\n\n@param start the start\n@param end the end", "Sets the category display options that affect how the category selection dialog is shown.\n\n@param displayCategoriesByRepository if true, the categories are shown separated by repository.\n@param displayCategorySelectionCollapsed if true, the selection dialog opens showing only the top-level categories\n(or the various repositories) in collapsed state.", "Load a cube map texture asynchronously.\n\nThis is the implementation of\n{@link GVRAssetLoader#loadCubemapTexture(GVRAndroidResource)} - it will\nusually be more convenient (and more efficient) to call that directly.\n\n@param gvrContext\nThe GVRF context\n@param textureCache\nTexture cache - may be {@code null}\n@param resource\nA steam containing a zip file which contains six bitmaps. The\nsix bitmaps correspond to +x, -x, +y, -y, +z, and -z faces of\nthe cube map texture respectively. The default names of the\nsix images are \"posx.png\", \"negx.png\", \"posy.png\", \"negx.png\",\n\"posz.png\", and \"negz.png\", which can be changed by calling\n{@link GVRCubemapImage#setFaceNames(String[])}.\n@param priority\nThis request's priority. Please see the notes on asynchronous\npriorities in the <a href=\"package-summary.html#async\">package\ndescription</a>.\n@return A {@link Future} that you can pass to methods like\n{@link GVRShaderData#setMainTexture(Future)}", "Use this API to delete ntpserver of given name.", "Reads a single byte from the input stream." ]
public void setWorkDir(String dir) throws IOException { File workDir = new File(dir); if (!workDir.exists() || !workDir.canWrite() || !workDir.canRead()) { throw new IOException("Cannot access directory "+dir); } _workDir = workDir; }
[ "Sets the working directory.\n\n@param dir The directory\n@throws IOException If the directory does not exist or cannot be written/read" ]
[ "Returns the value of an optional property, if the property is\nset. If it is not set defval is returned.", "Reads the table data from an input stream and breaks\nit down into rows.\n\n@param is input stream", "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", "Used to read the domain model when a slave host connects to the DC\n\n@param transformers the transformers for the host\n@param transformationInputs parameters for the transformation\n@param ignoredTransformationRegistry registry of resources ignored by the transformation target\n@param domainRoot the root resource for the domain resource tree\n@return a read master domain model util instance", "Alternate version of autoGeneratedKeys.\n@param sql\n@param autoGeneratedKeys\n@return cache key to use.", "Converts a number of bytes to a human-readable string\n@param bytes the bytes\n@return the human-readable string", "Gets whether the given server can be updated.\n\n@param server the id of the server. Cannot be <code>null</code>\n\n@return <code>true</code> if the server can be updated; <code>false</code>\nif the update should be cancelled\n\n@throws IllegalStateException if this policy is not expecting a request\nto update the given server", "Package-protected method used to initiate operation execution.\n@return the result action", "Change the currentState to the nextState if possible. The next state should already be\npresent in the graph.\n\n@param nextState the next state.\n@return true if currentState is successfully changed." ]
private static int getTrimmedWidth(BufferedImage img) { int height = img.getHeight(); int width = img.getWidth(); int trimmedWidth = 0; for (int i = 0; i < height; i++) { for (int j = width - 1; j >= 0; j--) { if (img.getRGB(j, i) != Color.WHITE.getRGB() && j > trimmedWidth) { trimmedWidth = j; break; } } } return trimmedWidth; }
[ "Get the last non-white X point\n@param img Image in memory\n@return the trimmed width" ]
[ "Use this API to add cacheselector resources.", "The Cost Variance field shows the difference between the baseline cost\nand total cost for a task. The total cost is the current estimate of costs\nbased on actual costs and remaining costs.\n\n@return amount", "Add the list with given bundles to the \"Require-Bundle\" main attribute.\n\n@param requiredBundles The list of all bundles to add.", "Returns the text value of all of the elements in the collection.\n\n@return the text value of all the elements in the collection or null", "Parse an extended attribute boolean value.\n\n@param value string representation\n@return boolean value", "Input method, called by a Subscriber indicating its intent into receive notification about a given topic.\n\n@param sr DTO containing the info given by the protocol", "Identifies the canonical type of an object heuristically.\n\n@return the canonical type identifier of the object's class\naccording to Jackson's type format (see {@link TypeFactory#constructFromCanonical(String)})", "Retrieve the finish slack.\n\n@return finish slack", "Mirrors the given bitmap" ]
public static base_response delete(nitro_service client, Long clid) throws Exception { clusterinstance deleteresource = new clusterinstance(); deleteresource.clid = clid; return deleteresource.delete_resource(client); }
[ "Use this API to delete clusterinstance of given name." ]
[ "Use this API to fetch all the snmpoption resources that are configured on netscaler.", "Command-line version of the classifier. See the class\ncomments for examples of use, and SeqClassifierFlags\nfor more information on supported flags.", "Check if the gravity and orientation are not in conflict one with other.\n@param gravity\n@param orientation\n@return true if orientation and gravity can be applied together, false - otherwise", "backing bootstrap method with all parameters", "Recycle all views in the list. The host views might be reused for other data to\nsave resources on creating new widgets.", "This method calculates the total amount of working time in a single\nday, which intersects with the supplied time range.\n\n@param hours collection of working hours in a day\n@param startDate time range start\n@param endDate time range end\n@return length of time in milliseconds", "Injects EJBs and other EE resources.\n\n@param resourceInjectionsHierarchy\n@param beanInstance\n@param ctx", "Returns the name of the directory where the dumpfile of the given type\nand date should be stored.\n\n@param dumpContentType\nthe type of the dump\n@param dateStamp\nthe date of the dump in format YYYYMMDD\n@return the local directory name for the dumpfile", "Examine the given model node, resolving any expressions found within, including within child nodes.\n\n@param node the node\n@return a node with all expressions resolved\n@throws OperationFailedException if an expression cannot be resolved" ]
private void recordMount(SlotReference slot) { if (mediaMounts.add(slot)) { deliverMountUpdate(slot, true); } if (!mediaDetails.containsKey(slot)) { try { VirtualCdj.getInstance().sendMediaQuery(slot); } catch (Exception e) { logger.warn("Problem trying to request media details for " + slot, e); } } }
[ "Records that there is media mounted in a particular media player slot, updating listeners if this is a change.\nAlso send a query to the player requesting details about the media mounted in that slot, if we don't already\nhave that information.\n\n@param slot the slot in which media is mounted" ]
[ "Get the values of the fields for an obj\nAutoincrement values are automatically set.\n@param fields\n@param obj\n@throws PersistenceBrokerException", "If the belief its a count of some sort his counting its increased by one.\n\n@param bName\n- the name of the belief count.", "Remove the group and all references to it\n\n@param groupId ID of group", "Expands the directories from the given list and and returns a list of subfiles.\nFiles from the original list are kept as is.", "Starts the one and only job instance in a separate Thread. Should be called exactly one time before\nthe operation is stopped.\n\n@param arguments {@inheritDoc}", "Searches for commas in the set of tokens. Used for inputs to functions.\n\nIgnore comma's which are inside a [ ] block\n\n@return List of output tokens between the commas", "Adds the default value of property if defined.\n\n@param props the Properties object\n@param propDef the property definition\n\n@return true if the property could be added", "Save map to file\n@param map Map to save\n@param file File to save\n@throws IOException I/O error", "Reads the availability table from the file.\n\n@param resource MPXJ resource instance\n@param periods MSPDI availability periods" ]
public static <T, ID> int dropTable(Dao<T, ID> dao, boolean ignoreErrors) throws SQLException { ConnectionSource connectionSource = dao.getConnectionSource(); Class<T> dataClass = dao.getDataClass(); DatabaseType databaseType = connectionSource.getDatabaseType(); if (dao instanceof BaseDaoImpl<?, ?>) { return doDropTable(databaseType, connectionSource, ((BaseDaoImpl<?, ?>) dao).getTableInfo(), ignoreErrors); } else { TableInfo<T, ID> tableInfo = new TableInfo<T, ID>(databaseType, dataClass); return doDropTable(databaseType, connectionSource, tableInfo, ignoreErrors); } }
[ "Issue the database statements to drop the table associated with a dao.\n\n@param dao\nAssociated dao.\n@return The number of statements executed to do so." ]
[ "Set the individual dates where the event should take place.\n@param dates the dates to set.", "A specific, existing task can be deleted by making a DELETE request on the\nURL for that task. Deleted tasks go into the \"trash\" of the user making\nthe delete request. Tasks can be recovered from the trash within a period\nof 30 days; afterward they are completely removed from the system.\n\nReturns an empty data record.\n\n@param task The task to delete.\n@return Request object", "Remove a misc file.\n\n@param name the file name\n@param path the relative path\n@param existingHash the existing hash\n@param isDirectory whether the file is a directory or not\n@return the builder", "Sets the submatrix of W up give Y is already configured and if it is being cached or not.", "Tests whether a Row name occurs more than once in the list of rows\n@param name\n@return", "Main entry point used to determine the format used to write\ncalendar exceptions.\n\n@param calendar parent calendar\n@param dayList list of calendar days\n@param exceptions list of exceptions", "Get a collection of Photo objects for the specified Photoset.\n\nThis method does not require authentication.\n\n@see com.flickr4java.flickr.photos.Extras\n@see com.flickr4java.flickr.Flickr#PRIVACY_LEVEL_NO_FILTER\n@see com.flickr4java.flickr.Flickr#PRIVACY_LEVEL_PUBLIC\n@see com.flickr4java.flickr.Flickr#PRIVACY_LEVEL_FRIENDS\n@see com.flickr4java.flickr.Flickr#PRIVACY_LEVEL_FRIENDS_FAMILY\n@see com.flickr4java.flickr.Flickr#PRIVACY_LEVEL_FAMILY\n@see com.flickr4java.flickr.Flickr#PRIVACY_LEVEL_FRIENDS\n@param photosetId\nThe photoset ID\n@param extras\nSet of extra-fields\n@param privacy_filter\nfilter value for authenticated calls\n@param perPage\nThe number of photos per page\n@param page\nThe page offset\n@return PhotoList The Collection of Photo objects\n@throws FlickrException", "Try Oracle update batching and call setExecuteBatch or revert to\nJDBC update batching. See 12-2 Update Batching in the Oracle9i\nJDBC Developer's Guide and Reference.\n@param stmt the prepared statement to be used for batching\n@throws PlatformException upon JDBC failure", "Read a text file from assets into a single string\n\n@param context\nA non-null Android Context\n@param asset\nThe asset file to read\n@return The contents or null on error." ]
public static double HighAccuracyComplemented(double x) { double[] R = { 1.25331413731550025, 0.421369229288054473, 0.236652382913560671, 0.162377660896867462, 0.123131963257932296, 0.0990285964717319214, 0.0827662865013691773, 0.0710695805388521071, 0.0622586659950261958 }; int j = (int) (0.5 * (Math.abs(x) + 1)); double a = R[j]; double z = 2 * j; double b = a * z - 1; double h = Math.abs(x) - z; double q = h * h; double pwr = 1; double sum = a + h * b; double term = a; for (int i = 2; sum != term; i += 2) { term = sum; a = (a + z * b) / (i); b = (b + z * a) / (i + 1); pwr *= q; sum = term + pwr * (a + h * b); } sum *= Math.exp(-0.5 * (x * x) - 0.5 * Constants.Log2PI); return (x >= 0) ? sum : (1.0 - sum); }
[ "High-accuracy Complementary normal distribution function.\n\n@param x Value.\n@return Result." ]
[ "Creates a searchable item that represents a metadata field found for a track.\n\n@param menuItem the rendered menu item containing the searchable metadata field\n@return the searchable metadata field", "Returns the required gallery open parameters.\n\n@param cms an initialized instance of a CmsObject\n@param messages the dialog messages\n@param param the widget parameter to generate the widget for\n@param resource the resource being edited\n@param hashId the field id hash\n\n@return the gallery open parameters", "Obtains a local date in Coptic calendar system from the\nera, year-of-era and day-of-year fields.\n\n@param era the Coptic era, not null\n@param yearOfEra the year-of-era\n@param dayOfYear the day-of-year\n@return the Coptic local date, not null\n@throws DateTimeException if unable to create the date\n@throws ClassCastException if the {@code era} is not a {@code CopticEra}", "Presents the Cursor Settings to the User. Only works if scene is set.", "Populates default settings.\n\n@param record MPX record\n@param properties project properties\n@throws MPXJException", "Ensures that no more than maxContiguousPartitionsPerZone partitions are\ncontiguous within a single zone.\n\nMoves the necessary partitions to break up contiguous runs from each zone\nto some other random zone/node. There is some chance that such random\nmoves could result in contiguous partitions in other zones.\n\n@param nextCandidateCluster cluster metadata\n@param maxContiguousPartitionsPerZone See RebalanceCLI.\n@return Return updated cluster metadata.", "Recursively construct a LblTree from DOM tree\n\n@param walker tree walker for DOM tree traversal\n@return tree represented by DOM tree", "Split a module Id to get the module version\n@param moduleId\n@return String", "DISPATCHING - COMMANDS" ]
public static AbstractReportGenerator generateHtml5Report() { AbstractReportGenerator report; try { Class<?> aClass = new ReportGenerator().getClass().getClassLoader() .loadClass( "com.tngtech.jgiven.report.html5.Html5ReportGenerator" ); report = (AbstractReportGenerator) aClass.newInstance(); } catch( ClassNotFoundException e ) { throw new JGivenInstallationException( "The JGiven HTML5 Report Generator seems not to be on the classpath.\n" + "Ensure that you have a dependency to jgiven-html5-report." ); } catch( Exception e ) { throw new JGivenInternalDefectException( "The HTML5 Report Generator could not be instantiated.", e ); } return report; }
[ "Searches the Html5ReportGenerator in Java path and instantiates the report" ]
[ "Figure out the starting waveform segment that corresponds to the specified coordinate in the window.\n\n@param x the column being drawn\n\n@return the offset into the waveform at the current scale and playback time that should be drawn there", "Use this API to fetch all the snmpmanager resources that are configured on netscaler.", "This method is called on every reference that is in the .class file.\n@param typeReference\n@return", "Deletes the first element from the receiver that matches the specified element.\nDoes nothing, if no such matching element is contained.\n\nTests elements for equality or identity as specified by <tt>testForEquality</tt>.\nWhen testing for equality, two elements <tt>e1</tt> and\n<tt>e2</tt> are <i>equal</i> if <tt>(e1==null ? e2==null :\ne1.equals(e2))</tt>.)\n\n@param testForEquality if true -> tests for equality, otherwise for identity.\n@param element the element to be deleted.", "Copies the non-zero structure of orig into \"this\"\n@param orig Matrix who's structure is to be copied", "Replace HTML entities\n@param content Content\n@param map Map\n@return Replaced content", "Initialize. create the httpClientStore, tcpClientStore", "Set the position of the pick ray.\nThis function is used internally to update the\npick ray with the new controller position.\n@param x the x value of the position.\n@param y the y value of the position.\n@param z the z value of the position.", "Gets all checked widget indexes in the group. The indexes are counted from 0 to size -1,\nwhere size is the number of Checkable widgets in the group. It does not take into account\nany non-Checkable widgets added to the group widget.\n\n@return list of checked widget indexes" ]
public static <T> T[] concat(T[] first, T... second) { int firstLength = first.length; int secondLength = second.length; @SuppressWarnings("unchecked") T[] result = (T[]) Array.newInstance( first.getClass().getComponentType(), firstLength + secondLength ); System.arraycopy( first, 0, result, 0, firstLength ); System.arraycopy( second, 0, result, firstLength, secondLength ); return result; }
[ "Concats two arrays.\n\n@param first the first array\n@param second the second array\n@param <T> the type of the element in the array\n@return a new array created adding the element in the second array after the first one" ]
[ "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", "Resolves the configuration.\n\n@param config The specified configuration.\n@return The resolved configuration.", "Performs a delete operation with the specified composite request object\n\n@param deleteRequestObject Composite request object containing the key to\ndelete\n@return true if delete was successful. False otherwise", "capture 3D screenshot", "Extract a list of work pattern assignments.\n\n@param workPatterns string representation of work pattern assignments\n@return list of work pattern assignment rows", "Check that a list allowing null and empty item contains at least one element that is\nnot blank.\n@param list can't be null\n@return", "allow extension only for testing", "Returns the connection that has been saved or null if none.", "Prepare the filter for the transiton at a given time.\nThe default implementation sets the given filter property, but you could override this method to make other changes.\n@param transition the transition time in the range 0 - 1" ]
public static List<Number> findIndexValues(Object self, Number startIndex, Closure closure) { List<Number> result = new ArrayList<Number>(); long count = 0; long startCount = startIndex.longValue(); BooleanClosureWrapper bcw = new BooleanClosureWrapper(closure); for (Iterator iter = InvokerHelper.asIterator(self); iter.hasNext(); count++) { Object value = iter.next(); if (count < startCount) { continue; } if (bcw.call(value)) { result.add(count); } } return result; }
[ "Iterates over the elements of an iterable collection of items, starting from\na specified startIndex, and returns the index values of the items that match\nthe condition specified in the closure.\n\n@param self the iteration object over which to iterate\n@param startIndex start matching from this index\n@param closure the filter to perform a match on the collection\n@return a list of numbers corresponding to the index values of all matched objects\n@since 1.5.2" ]
[ "Use this API to update vridparam.", "Set new front facing rotation\n@param rotation", "Drop down item view\n\n@param position position of item\n@param convertView View of item\n@param parent parent view of item's view\n@return covertView", "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", "Curries a procedure that takes three arguments.\n\n@param procedure\nthe original procedure. May not be <code>null</code>.\n@param argument\nthe fixed first argument of {@code procedure}.\n@return a procedure that takes two arguments. Never <code>null</code>.", "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", "Inflate the main layout used to render videos in the list view.\n\n@param inflater LayoutInflater service to inflate.\n@param parent ViewGroup used to inflate xml.\n@return view inflated.", "If the deployment has a module attached it will ask the module to load the ServiceActivator services.\n\n@param phaseContext the deployment unit context", "Use this API to fetch appfwsignatures resource of given name ." ]
public void trace(Throwable throwable, String msg, Object[] argArray) { logIfEnabled(Level.TRACE, throwable, msg, UNKNOWN_ARG, UNKNOWN_ARG, UNKNOWN_ARG, argArray); }
[ "Log a trace message with a throwable." ]
[ "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", "1-D Forward Discrete Hartley Transform.\n\n@param data Data.", "Creates a descriptor for the bundle in the same folder where the bundle files are located.\n@throws CmsException thrown if creation fails.", "Read the data for all of the tables we're interested in.\n\n@param tables list of all available tables\n@param is input stream", "Finds an ancestor of a specific type, if possible.\n\n<p>Example: (New York city target, {@link Type#COUNTRY}) returns (US country target)", "The parameter must never be null\n\n@param queryParameters", "We have obtained metadata for a device, so store it and alert any listeners.\n\n@param update the update which caused us to retrieve this metadata\n@param data the metadata which we received", "Use this API to unset the properties of sslparameter resource.\nProperties that need to be unset are specified in args array.", "Gets the specified SPI, using the current thread context classloader\n\n@param <T> type of spi class\n@param spiType spi class to retrieve\n@return object" ]
private void emitStatusLine(AggregatedResultEvent result, TestStatus status, long timeMillis) throws IOException { final StringBuilder line = new StringBuilder(); line.append(shortTimestamp(result.getStartTimestamp())); line.append(Strings.padEnd(statusNames.get(status), 8, ' ')); line.append(formatDurationInSeconds(timeMillis)); if (forkedJvmCount > 1) { line.append(String.format(Locale.ROOT, jvmIdFormat, result.getSlave().id)); } line.append(" | "); line.append(formatDescription(result.getDescription())); if (!result.isSuccessful()) { line.append(FAILURE_MARKER); } line.append("\n"); if (showThrowable) { // GH-82 (cause for ignored tests). if (status == TestStatus.IGNORED && result instanceof AggregatedTestResultEvent) { final StringWriter sw = new StringWriter(); PrefixedWriter pos = new PrefixedWriter(indent, sw, DEFAULT_MAX_LINE_WIDTH); pos.write("Cause: "); pos.write(((AggregatedTestResultEvent) result).getCauseForIgnored()); pos.completeLine(); line.append(sw.toString()); } final List<FailureMirror> failures = result.getFailures(); if (!failures.isEmpty()) { final StringWriter sw = new StringWriter(); PrefixedWriter pos = new PrefixedWriter(indent, sw, DEFAULT_MAX_LINE_WIDTH); int count = 0; for (FailureMirror fm : failures) { count++; if (fm.isAssumptionViolation()) { pos.write(String.format(Locale.ROOT, "Assumption #%d: %s", count, MoreObjects.firstNonNull(fm.getMessage(), "(no message)"))); } else { pos.write(String.format(Locale.ROOT, "Throwable #%d: %s", count, showStackTraces ? filterStackTrace(fm.getTrace()) : fm.getThrowableString())); } } pos.completeLine(); if (sw.getBuffer().length() > 0) { line.append(sw.toString()); } } } logShort(line); }
[ "Emit status line for an aggregated event." ]
[ "Closing will only skip to the end of this fixed length input stream and\nnot call the parent's close method.\n@throws IOException if an I/O error occurs while closing stream", "Adds error correction data to the specified binary string, which already contains the primary data", "Look for the specified album art in both the hot cache of loaded tracks and the longer-lived LRU cache.\n\n@param artReference uniquely identifies the desired album art\n\n@return the art, if it was found in one of our caches, or {@code null}", "Reverse how the transition is applied, such that the transition previously performed when progress=start of range is only performed when progress=end of range\n\n@return", "determine the what state a transaction is in by inspecting the primary column", "Concatenate all the arrays in the list into a vector.\n\n@param arrays List of arrays.\n@return Vector.", "Use this API to fetch a appfwglobal_auditnslogpolicy_binding resources.", "Ensure that the node is not null.\n\n@param node the node to ensure to be not null\n@param expression the expression was used to find the node\n@throws SpinXPathException if the node is null", "Retrieves the baseline duration text value.\n\n@param baselineNumber baseline number\n@return baseline duration text value" ]
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." ]
[ "Get a list of comments made for a particular entity\n\n@param entityId - id of the commented entity\n@param entityType - type of the entity\n@return list of comments", "Save the values to the bundle descriptor.\n@throws CmsException thrown if saving fails.", "Delete all backups asynchronously", "Creates an InputObjectStream and an OutputObjectStream from a Socket, and\npasses them to the closure. The streams will be closed after the closure\nreturns, even if an exception is thrown.\n\n@param socket this Socket\n@param closure a Closure\n@return the value returned by the closure\n@throws IOException if an IOException occurs.\n@since 1.5.0", "Use this API to fetch all the dnssuffix resources that are configured on netscaler.", "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", "All the indexes defined in the database. Type widening means that the returned Index objects\nare limited to the name, design document and type of the index and the names of the fields.\n\n@return a list of defined indexes with name, design document, type and field names.", "Use this API to update systemcollectionparam.", "Multiply scalar value to a complex number.\n\n@param z1 Complex Number.\n@param scalar Scalar value.\n@return Returns new ComplexNumber instance containing the multiply of specified complex number with the scalar value." ]
public void stopServer() throws Exception { if (!externalDatabaseHost) { try (Connection sqlConnection = getConnection()) { sqlConnection.prepareStatement("SHUTDOWN").execute(); } catch (Exception e) { } try { server.stop(); } catch (Exception e) { } } }
[ "Shutdown the server\n\n@throws Exception exception" ]
[ "Modify the transform's current rotation in quaternion terms, around a\npivot other than the origin.\n\n@param quatW\n'W' component of the rotation quaternion.\n@param quatX\n'X' component of the rotation quaternion.\n@param quatY\n'Y' component of the rotation quaternion.\n@param quatZ\n'Z' component of the rotation quaternion.\n@param pivotX\n'X' component of the pivot's location.\n@param pivotY\n'Y' component of the pivot's location.\n@param pivotZ\n'Z' component of the pivot's location.", "Clear all beans and call the destruction callback.", "Returns the compact records for all teams to which user is assigned.\n\n@param user An identifier for the user. Can be one of an email address,\nthe globally unique identifier for the user, or the keyword `me`\nto indicate the current user making the request.\n@return Request object", "Use this API to fetch appfwprofile_csrftag_binding resources of given name .", "Shortcut for mapping the output of an arbitrary observable to one returning an instance of a specific type, using the IO scheduler.\n@param fromObservable the source observable\n@param toValue the value to emit to the observer\n@param <T> the type of the value to emit\n@return an observable emitting the specified value", "Creates a quad consisting of two triangles, with the specified width and\nheight.\n\n@param gvrContext current {@link GVRContext}\n\n@param width\nthe quad's width\n@param height\nthe quad's height\n@return A 2D, rectangular mesh with four vertices and two triangles", "Show or hide the options column dependent on the provided edit mode.\n@param oldMode the old edit mode\n@param newMode the edit mode for which the options column's visibility should be adjusted.", "Use this API to fetch vpntrafficpolicy_vpnglobal_binding resources of given name .", "Will prompt a user the \"Add to Homescreen\" feature\n\n@param callback A callback function after the method has been executed." ]
public void extractFieldTypes(DatabaseType databaseType) throws SQLException { if (fieldTypes == null) { if (fieldConfigs == null) { fieldTypes = extractFieldTypes(databaseType, dataClass, tableName); } else { fieldTypes = convertFieldConfigs(databaseType, tableName, fieldConfigs); } } }
[ "Extract the field types from the fieldConfigs if they have not already been configured." ]
[ "Complete both operations and commands.", "Set whether the player holding the waveform is playing, which changes the indicator color to white from red.\nThis method can only be used in situations where the component is tied to a single player, and therefore has\na single playback position.\n\n@param playing if {@code true}, draw the position marker in white, otherwise red\n\n@see #setPlaybackState", "Parses a single query facet item with query and label.\n@param prefix path to the query facet item (with trailing '/').\n@return the query facet item.", "Checks if two types are the same or are equivalent under a variable\nmapping given in the type map that was provided.", "Convert an array of bytes into an array of ints. 4 bytes from the\ninput data map to a single int in the output data.\n@param bytes The data to read from.\n@return An array of 32-bit integers constructed from the data.\n@since 1.1", "Fetch the outermost Hashmap as a TwoDHashMap.\n\n@param firstKey\nfirst key\n@return the the innermost hashmap", "Use this API to add nssimpleacl.", "Read an optional Date value form a JSON value.\n@param val the JSON value that should represent the Date as long value in a string.\n@return the Date from the JSON or null if reading the date fails.", "Returns the adapter position of the Parent associated with this ChildViewHolder\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." ]
private void readTasks(Project phoenixProject, Storepoint storepoint) { processLayouts(phoenixProject); processActivityCodes(storepoint); processActivities(storepoint); updateDates(); }
[ "Read phases and activities from the Phoenix file to create the task hierarchy.\n\n@param phoenixProject all project data\n@param storepoint storepoint containing current project data" ]
[ "Add an element assigned with its score\n@param member the member to add\n@param score the score to assign\n@return <code>true</code> if the set has been changed", "Use this API to fetch nd6ravariables resource of given name .", "Undeletes the selected files\n\n@return the ids of the modified resources\n\n@throws CmsException if something goes wrong", "It is required that T be Serializable", "returns a Logger.\n\n@param loggerName the name of the Logger\n@return Logger the returned Logger", "Returns the context menu for the table item.\n@param itemId the table item.\n@return the context menu for the given item.", "Parse the JSON string and return the object. The string is expected to be the JSON print data from the\nclient.\n\n@param spec the JSON formatted string.\n@return The encapsulated JSON object", "Helper function to return the minimum size of the workspace to be passed to the reduction given the input and output\ntensors", "Add new control at the end of control bar with specified touch listener, control label and resource.\nSize of control bar is updated based on new number of controls.\n@param name name of the control to remove\n@param resId the control face\n@param label the control label\n@param listener touch listener" ]
@Override public String upload(File file, UploadMetaData metaData) throws FlickrException { Payload payload = new Payload(file); return sendUploadRequest(metaData, payload); }
[ "Upload a photo from a File.\n\n@param file\nthe photo file\n@param metaData\nThe meta data\n@return photoId or ticketId\n@throws FlickrException" ]
[ "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.", "Gets the matching beans for binding criteria from a list of beans\n\n@param resolvable the resolvable\n@return A set of filtered beans", "Extracts a particular data model instance from a JSON response\nreturned by MediaWiki. The location is described by a list of successive\nfields to use, from the root to the target object.\n\n@param response\nthe API response as returned by MediaWiki\n@param path\na list of fields from the root to the target object\n@return\nthe parsed POJO object\n@throws JsonProcessingException", "Set the specular intensity of the light.\n\nThis designates the color of the specular reflection.\nIt is multiplied by the material specular color to derive\nthe hue of the specular reflection for that material.\nThe built-in phong shader {@link GVRPhongShader} uses a {@code vec4} uniform named\n{@code specular_intensity} to control the specular intensity.\n\n@param r red component (0 to 1)\n@param g green component (0 to 1)\n@param b blue component (0 to 1)\n@param a alpha component (0 to 1)", "private HttpServletResponse headers;", "Is the given resource type id free?\n@param id to be checked\n@return boolean", "Processes the template for all column pairs of the current foreignkey.\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\"", "Returns the number of history entries for a client\n\n@param profileId ID of profile\n@param clientUUID UUID of client\n@param searchFilter unused\n@return number of history entries", "Use this API to fetch appfwsignatures resource of given name ." ]
protected void appendGroupByClause(List groupByFields, StringBuffer buf) { if (groupByFields == null || groupByFields.size() == 0) { return; } buf.append(" GROUP BY "); for (int i = 0; i < groupByFields.size(); i++) { FieldHelper cf = (FieldHelper) groupByFields.get(i); if (i > 0) { buf.append(","); } appendColName(cf.name, false, null, buf); } }
[ "Appends the GROUP BY clause for the Query\n@param groupByFields\n@param buf" ]
[ "Add the set with given bundles to the \"Export-Package\" main attribute.\n\n@param exportedPackages The set of all packages to add.", "Replaces sequences of whitespaces with tabs.\n\n@param self A CharSequence to unexpand\n@param tabStop The number of spaces a tab represents\n@return an unexpanded String\n@since 1.8.2", "Validate the configuration.\n\n@param validationErrors where to put the errors.", "Updates the given integer belief\nadding the given integer\nnewBelief = previousBelief + givenValue\n\n@param String - the belief name\n@param the value to add", "The connection timeout for making a connection to Twitter.", "Find the scheme to use to connect to the service.\nUses java annotations first and if not found, uses kubernetes annotations on the service object.\n\n@param service\nThe target service.\n@param qualifiers\nThe set of qualifiers.\n\n@return Returns the resolved scheme of 'http' as a fallback.", "Use this API to fetch all the inat resources that are configured on netscaler.", "Send a track metadata update announcement to all registered listeners.", "Converts the search results from CmsSearchResource to CmsSearchResourceBean.\n@param searchResults The collection of search results to transform." ]
private void deleteUnusedCaseSteps( ReportModel model ) { for( ScenarioModel scenarioModel : model.getScenarios() ) { if( scenarioModel.isCasesAsTable() && !hasAttachment( scenarioModel ) ) { List<ScenarioCaseModel> cases = scenarioModel.getScenarioCases(); for( int i = 1; i < cases.size(); i++ ) { ScenarioCaseModel caseModel = cases.get( i ); caseModel.setSteps( Collections.<StepModel>emptyList() ); } } } }
[ "Deletes all steps of scenario cases where a data table\nis generated to reduce the size of the data file.\nIn this case only the steps of the first scenario case are actually needed." ]
[ "Determines how many primary partitions each node within each zone should\nhave. The list of integers returned per zone is the same length as the\nnumber of nodes in that zone.\n\n@param nextCandidateCluster\n@param targetPartitionsPerZone\n@return A map of zoneId to list of target number of partitions per node\nwithin zone.", "Evict cached object\n\n@param key\nthe key indexed the cached object to be evicted", "Byte run automaton map.\n\n@param automatonMap the automaton map\n@return the map", "Answer the orderBy of all Criteria and Sub Criteria\nthe elements are of class Criteria.FieldHelper\n@return List", "Retrieve the fixed data offset for a specific field.\n\n@param type field type\n@return offset", "Write a map field to the JSON file.\n\n@param fieldName field name\n@param value field value", "Update the central directory signature of a .jar.\n\n@param file the file to process\n@param searchPattern the search patter to use\n@param badSkipBytes the bad bytes skip table\n@param newSig the new signature\n@param endSig the expected signature\n@throws IOException", "retrieve a collection of type collectionClass matching the Query query\nif lazy = true return a CollectionProxy\n\n@param collectionClass\n@param query\n@param lazy\n@return ManageableCollection\n@throws PersistenceBrokerException", "Get the best guess we have for the current track position on the specified player.\n\n@param player the player number whose position is desired\n\n@return the milliseconds into the track that we believe playback has reached, or -1 if we don't know\n\n@throws IllegalStateException if the TimeFinder is not running" ]
public String getPendingChanges() { JsonObject jsonObject = this.getPendingJSONObject(); if (jsonObject == null) { return null; } return jsonObject.toString(); }
[ "Gets a JSON string containing any pending changes to this object that can be sent back to the Box API.\n@return a JSON string containing the pending changes." ]
[ "state chain management ops below", "20130512 Converts the sdsm string generated above to Date format.\n\n@param str\nthe str\n@return the date from concise str", "Read relationship data from a PEP file.", "Read the file header data.\n\n@param is input stream", "Returns the getter method associated with the object's field.\n\n@param object\nthe object\n@param fieldName\nthe name of the field\n@return the getter method\n@throws NullPointerException\nif object or fieldName is null\n@throws SuperCsvReflectionException\nif the getter doesn't exist or is not visible", "Gets validation errors either as a JSON string, or null if there are no validation errors.\n\n@return the validation error JSON", "Returns a licenses regarding its Id and a fake on if no license exist with such an Id\n\n@param licenseId String\n@return License", "Start listening for device announcements and keeping track of the DJ Link devices visible on the network.\nIf already listening, has no effect.\n\n@throws SocketException if the socket to listen on port 50000 cannot be created", "Draw a rectangle's interior with this color.\n\n@param rect rectangle\n@param color colour" ]
public static base_response delete(nitro_service client, String ipv6prefix) throws Exception { onlinkipv6prefix deleteresource = new onlinkipv6prefix(); deleteresource.ipv6prefix = ipv6prefix; return deleteresource.delete_resource(client); }
[ "Use this API to delete onlinkipv6prefix of given name." ]
[ "Gets the value of the callout property.\n\n<p>\nThis accessor method returns a reference to the live list,\nnot a snapshot. Therefore any modification you make to the\nreturned list will be present inside the JAXB object.\nThis is why there is not a <CODE>set</CODE> method for the callout property.\n\n<p>\nFor example, to add a new item, do as follows:\n<pre>\ngetCallout().add(newItem);\n</pre>\n\n\n<p>\nObjects of the following type(s) are allowed in the list\n{@link Callouts.Callout }", "Gets a list of AssignmentRows based on the current Assignments\n@return", "The sniffing Loggers are some special Loggers, whose level will be set to TRACE forcedly.\n@param logger", "Remove the nodes representing the entity and the embedded elements attached to it.\n\n@param executionEngine the {@link GraphDatabaseService} used to run the query\n@param columnValues the values of the key identifying the entity to remove", "Retrieve and validate the timestamp value from the REST request.\n\"X_VOLD_REQUEST_ORIGIN_TIME_MS\" is timestamp header\n\nTODO REST-Server 1. Change Time stamp header to a better name.\n\n@return true if present, false if missing", "Clear JobContext of current thread", "Create dummy groups for each concatenated report, and in the footer of\neach group adds the subreport.", "Filter the URI based on a regular expression.\nCan be combined with an additional file-extension filter.", "Adds an additional description to the constructed document.\n\n@param text\nthe text of the description\n@param languageCode\nthe language code of the description\n@return builder object to continue construction" ]
public static csparameter get(nitro_service service) throws Exception{ csparameter obj = new csparameter(); csparameter[] response = (csparameter[])obj.get_resources(service); return response[0]; }
[ "Use this API to fetch all the csparameter resources that are configured on netscaler." ]
[ "Creates a resource key with id defined as enumeration value name and bundle specified by given class.\n@param clazz the class owning the bundle\n@param value enumeration value used to define key id\n@return the resource key", "Writes the body of this request to an HttpURLConnection.\n\n<p>Subclasses overriding this method must remember to close the connection's OutputStream after writing.</p>\n\n@param connection the connection to which the body should be written.\n@param listener an optional listener for monitoring the write progress.\n@throws BoxAPIException if an error occurs while writing to the connection.", "Returns a specific profile\n\n@param profileId ID of profile\n@return Selected profile if found, null if not found\n@throws Exception exception", "Returns the intersection of this range with the given range, a range which includes those addresses in both this and the given rqnge.\n@param other\n@return", "Adds the task to the specified project, in the optional location\nspecified. If no location arguments are given, the task will be added to\nthe end of the project.\n\n`addProject` can also be used to reorder a task within a project or section that\nalready contains it.\n\nAt most one of `insert_before`, `insert_after`, or `section` should be\nspecified. Inserting into a section in an non-order-dependent way can be\ndone by specifying `section`, otherwise, to insert within a section in a\nparticular place, specify `insert_before` or `insert_after` and a task\nwithin the section to anchor the position of this task.\n\nReturns an empty data block.\n\n@param task The task to add to a project.\n@return Request object", "Converts a tab delimited string into an object with given fields\nRequires the object has setXxx functions for the specified fields\n\n@param objClass Class of object to be created\n@param str string to convert\n@param delimiterRegex delimiter regular expression\n@param fieldNames fieldnames\n@param <T> type to return\n@return Object created from string", "Allows direct access to the Undertow.Builder for custom configuration\n\n@param serverConfigurationFunction the serverConfigurationFunction", "Returns all tags that designate this tag. E.g., for \"tesla-model3\", this would return \"car\", \"vehicle\", \"vendor-tesla\" etc.", "Checks for duplicate elements. A is sorted\n@param A Matrix to be tested.\n@return true if duplicates or false if false duplicates" ]
private void set(FieldType field, boolean value) { set(field, (value ? Boolean.TRUE : Boolean.FALSE)); }
[ "This method inserts a name value pair into internal storage.\n\n@param field task field\n@param value attribute value" ]
[ "Set sizes to override the generated URLs of the different sizes.\n\n@param sizes\n@see com.flickr4java.flickr.photos.PhotosInterface#getSizes(String)", "Check if there is an attribute which tells us which concrete class is to be instantiated.", "Process the graphical indicator data.", "Attempts to substitute all the found expressions in the input\nwith their corresponding resolved values.\nIf any of the found expressions failed to resolve or\nif the input does not contain any expression, the input is returned as is.\n\n@param input the input string\n@return the input with resolved expressions or the original input in case\nthe input didn't contain any expressions or at least one of the\nexpressions could not be resolved", "Sets the debug JPDA remote socket debugging argument.\n\n@param suspend {@code true} to suspend otherwise {@code false}\n@param port the port to listen on\n\n@return the builder", "Bulk delete clients from a profile.\n\n@param model\n@param profileIdentifier\n@param clientUUID\n@return returns the table of the remaining clients or an exception if deletion failed for some reason\n@throws Exception", "Obtains a Ethiopic local date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the Ethiopic local date-time, not null\n@throws DateTimeException if unable to create the date-time", "Enable a host\n\n@param hostName\n@throws Exception", "Gives the \"roots\" of a list of folders, i.e. the list of folders which are not descendants of any other folders in the original list\n@param folders the original list of folders\n@return the root folders of the list" ]
final public Boolean checkRealOffset() { if ((tokenRealOffset == null) || !provideRealOffset) { return false; } else if (tokenOffset == null) { return true; } else if (tokenOffset.getStart() == tokenRealOffset.getStart() && tokenOffset.getEnd() == tokenRealOffset.getEnd()) { return false; } else { return true; } }
[ "Check real offset.\n\n@return the boolean" ]
[ "Get the MonetaryAmount implementation class.\n\n@return the implementation class of the containing amount instance, never null.\n@see MonetaryAmount#getContext()", "Returns the boolean value of the specified property.\n\n@param name The name of the property\n@param defaultValue The value to use if the property is not set or not a boolean\n@return The value", "Returns true if the ASTNode is a declaration of a closure, either as a declaration\nor a field.\n@param expression\nthe target expression\n@return\nas described", "Answer the TableAlias for aPath or aUserAlias\n@param aPath\n@param aUserAlias\n@param hintClasses\n@return TableAlias, null if none", "Gets the event type from message.\n\n@param message the message\n@return the event type", "Copy one Gradient into another.\n@param g the Gradient to copy into", "Processes the most recent dump of the given type using the given dump\nprocessor.\n\n@see DumpProcessingController#processMostRecentMainDump()\n@see DumpProcessingController#processAllRecentRevisionDumps()\n\n@param dumpContentType\nthe type of dump to process\n@param dumpFileProcessor\nthe processor to use\n@deprecated Use {@link #getMostRecentDump(DumpContentType)} and\n{@link #processDump(MwDumpFile)} instead; method will vanish\nin WDTK 0.5", "Checks if the given project exists or not.\n\n@param name project name\n@return true/false\n@throws IllegalArgumentException", "Returns the ReportModel with given name." ]
public static List<TestSuiteResult> unmarshalSuites(File... directories) throws IOException { List<TestSuiteResult> results = new ArrayList<>(); List<File> files = listTestSuiteFiles(directories); for (File file : files) { results.add(unmarshal(file)); } return results; }
[ "Find and unmarshal all test suite files in given directories.\n\n@throws IOException if any occurs.\n@see #unmarshal(File)" ]
[ "Returns the value for a given key from the database properties.\n\n@param key the property key\n\n@return the string value for a given key", "Consumes the next character in the request, checking that it matches the\nexpected one. This method should be used when the", "Build a String representation of given arguments.", "2-D Integer array to float array.\n\n@param array Integer array.\n@return Float array.", "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", "Runs a Story with the given steps factory, applying the given meta\nfilter, and staring from given state.\n\n@param configuration the Configuration used to run story\n@param stepsFactory the InjectableStepsFactory used to created the\ncandidate steps methods\n@param story the Story to run\n@param filter the Filter to apply to the story Meta\n@param beforeStories the State before running any of the stories, if not\n<code>null</code>\n\n@throws Throwable if failures occurred and FailureStrategy dictates it to\nbe re-thrown.", "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", "Find Flickr Places information by Place URL.\n\n<p>\nThis method does not require authentication.\n</p>\n\n@deprecated This method has been deprecated. It won't be removed but you should use {@link PlacesInterface#getInfoByUrl(String)} instead.\n@param flickrPlacesUrl\n@return A Location\n@throws FlickrException", "Map Synchro constraints to MPXJ constraints.\n\n@param task task\n@param row Synchro constraint data" ]
private static void addCacheFormatEntry(List<Message> trackListEntries, int playlistId, ZipOutputStream zos) throws IOException { // Add a marker so we can recognize this as a metadata archive. I would use the ZipFile comment, but // that is not available until Java 7, and Beat Link is supposed to be backwards compatible with Java 6. // Since we are doing this anyway, we can also provide information about the nature of the cache, and // how many metadata entries it contains, which is useful for auto-attachment. zos.putNextEntry(new ZipEntry(CACHE_FORMAT_ENTRY)); String formatEntry = CACHE_FORMAT_IDENTIFIER + ":" + playlistId + ":" + trackListEntries.size(); zos.write(formatEntry.getBytes("UTF-8")); }
[ "Add a marker so we can recognize this as a metadata archive. I would use the ZipFile comment, but\nthat is not available until Java 7, and Beat Link is supposed to be backwards compatible with Java 6.\nSince we are doing this anyway, we can also provide information about the nature of the cache, and\nhow many metadata entries it contains, which is useful for auto-attachment.\n\n@param trackListEntries the tracks contained in the cache, so we can record the number\n@param playlistId the playlist contained in the cache, or 0 if it is all tracks from the media\n@param zos the stream to which the ZipFile is being written\n\n@throws IOException if there is a problem creating the format entry" ]
[ "Splits up value into multiple versioned values\n\n@param value\n@return\n@throws IOException", "Convenience method for retrieving a char resource.\n\n@param locale locale identifier\n@param key resource key\n@return resource value", "Use this API to unset the properties of onlinkipv6prefix resources.\nProperties that need to be unset are specified in args array.", "Parses operations where the input comes from variables to its left only. Hard coded to only look\nfor transpose for now\n\n@param tokens List of all the tokens\n@param sequence List of operation sequence", "Removes the specified object in index from the array.\n\n@param index The index to remove.", "Create a new remote proxy controller.\n\n@param client the transactional protocol client\n@param pathAddress the path address\n@param addressTranslator the address translator\n@param targetKernelVersion the {@link ModelVersion} of the kernel management API exposed by the proxied process\n@return the proxy controller", "This method extracts predecessor data from an MSPDI file.\n\n@param task Task data", "Determines the feature state\n\n@param context the template context\n@param tag the tag\n@param attributeName the attribute name\n@param attributeValue the attribute value\n@param defaultState the default state if the expression evaluates to null\n@return the feature state", "Retrieve the finish slack.\n\n@return finish slack" ]
private void populateResource(Resource resource, Record record) throws MPXJException { String falseText = LocaleData.getString(m_locale, LocaleData.NO); int length = record.getLength(); int[] model = m_resourceModel.getModel(); for (int i = 0; i < length; i++) { int mpxFieldType = model[i]; if (mpxFieldType == -1) { break; } String field = record.getString(i); if (field == null || field.length() == 0) { continue; } ResourceField resourceField = MPXResourceField.getMpxjField(mpxFieldType); switch (resourceField) { case OBJECTS: { resource.set(resourceField, record.getInteger(i)); break; } case ID: { resource.setID(record.getInteger(i)); break; } case UNIQUE_ID: { resource.setUniqueID(record.getInteger(i)); break; } case MAX_UNITS: { resource.set(resourceField, record.getUnits(i)); break; } case PERCENT_WORK_COMPLETE: case PEAK: { resource.set(resourceField, record.getPercentage(i)); break; } case COST: case COST_PER_USE: case COST_VARIANCE: case BASELINE_COST: case ACTUAL_COST: case REMAINING_COST: { resource.set(resourceField, record.getCurrency(i)); break; } case OVERTIME_RATE: case STANDARD_RATE: { resource.set(resourceField, record.getRate(i)); break; } case REMAINING_WORK: case OVERTIME_WORK: case BASELINE_WORK: case ACTUAL_WORK: case WORK: case WORK_VARIANCE: { resource.set(resourceField, record.getDuration(i)); break; } case ACCRUE_AT: { resource.set(resourceField, record.getAccrueType(i)); break; } case LINKED_FIELDS: case OVERALLOCATED: { resource.set(resourceField, record.getBoolean(i, falseText)); break; } default: { resource.set(resourceField, field); break; } } } if (m_projectConfig.getAutoResourceUniqueID() == true) { resource.setUniqueID(Integer.valueOf(m_projectConfig.getNextResourceUniqueID())); } if (m_projectConfig.getAutoResourceID() == true) { resource.setID(Integer.valueOf(m_projectConfig.getNextResourceID())); } // // Handle malformed MPX files - ensure we have a unique ID // if (resource.getUniqueID() == null) { resource.setUniqueID(resource.getID()); } }
[ "Populates a resource.\n\n@param resource resource instance\n@param record MPX record\n@throws MPXJException" ]
[ "Print an accrue type.\n\n@param value AccrueType instance\n@return accrue type value", "Mark root of this task task group depends on the given TaskItem.\nThis ensure this task group's root get picked for execution only after the completion\nof invocation of provided TaskItem.\n\n@param dependencyTaskItem the task item that this task group depends on\n@return the key of the dependency", "Return the equivalence class of the argument. If the argument is not contained in\nand equivalence class, then an empty string is returned.\n\n@param punc\n@return The class name if found. Otherwise, an empty string.", "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", "Access all of the elements of the collection that evaluate to true for the\nprovided query predicate.\n@param\tpredicate\tAn OQL boolean query predicate.\n@return\tAn iterator used to iterate over the elements that evaluated true for the predicate.\n@exception\torg.odmg.QueryInvalidException\tThe query predicate is invalid.", "Returns the query string of a URL from a parameter list.\n\n@param params\nMap with parameters\n@return query string", "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", "add a single Object to the Collection. This method is used during reading Collection elements\nfrom the database. Thus it is is save to cast anObject to the underlying element type of the\ncollection.", "Sets the monitoring service.\n\n@param monitoringService the new monitoring service" ]