query
stringlengths
74
6.1k
positive
sequencelengths
1
1
negative
sequencelengths
9
9
public void writeLock(EntityKey key, int timeout) { ReadWriteLock lock = getLock( key ); Lock writeLock = lock.writeLock(); acquireLock( key, timeout, writeLock ); }
[ "Acquires a write lock on a specific key.\n@param key The key to lock\n@param timeout in milliseconds; -1 means wait indefinitely, 0 means no wait." ]
[ "Creates a Bytes object by copying the value of the given String", "Returns a prefix length for which the range of this segment grouping matches the the block of addresses for that prefix.\n\nIf no such prefix exists, returns null\n\nIf this segment grouping represents a single value, returns the bit length\n\n@return the prefix length or null", "Returns all the deployment runtime names associated with an overlay.\n\n@param context the current OperationContext.\n@param overlayAddress the address for the averlay.\n@return all the deployment runtime names associated with an overlay.", "Use this API to add sslcipher resources.", "Indicates if a bean is proxyable\n\n@param bean The bean to test\n@return True if proxyable, false otherwise", "Returns a list of files in given addon passing given filter.", "Read in the configuration properties.", "Generates JUnit 4 RunListener instances for any user defined RunListeners", "Method is called by spring and verifies that there is only one plugin per URI scheme." ]
public ProjectCalendarHours addCalendarHours(Day day) { ProjectCalendarHours bch = new ProjectCalendarHours(this); bch.setDay(day); m_hours[day.getValue() - 1] = bch; return (bch); }
[ "Used to add working hours to the calendar. Note that the MPX file\ndefinition allows a maximum of 7 calendar hours records to be added to\na single calendar.\n\n@param day day number\n@return new ProjectCalendarHours instance" ]
[ "Sets left and right padding for all cells in the row.\n@param padding new padding for left and right, ignored if smaller than 0\n@return this to allow chaining", "Obtains a local date in Symmetry010 calendar system from the\nera, year-of-era and day-of-year fields.\n\n@param era the Symmetry010 era, not null\n@param yearOfEra the year-of-era\n@param dayOfYear the day-of-year\n@return the Symmetry010 local date, not null\n@throws DateTimeException if unable to create the date\n@throws ClassCastException if the {@code era} is not a {@code IsoEra}", "Rebuild logging systems with updated mode\n@param newMode log mode", "Takes the file, reads it in, and prints out the likelihood of each possible\nlabel at each point.\n\n@param filename\nThe path to the specified file", "Create users for the given array of addresses. The passwords will be set to the email addresses.\n\n@param greenMail Greenmail instance to create users for\n@param addresses Addresses", "Retrieve a UUID field.\n\n@param type field type\n@return UUID instance", "Resolve an operation transformer entry.\n\n@param address the address\n@param operationName the operation name\n@param placeholderResolver a placeholder resolver used to resolve children of a placeholder registration\n@return the transformer entry", "Retrieve a boolean value.\n\n@param name column name\n@return boolean value", "Counts the number of documents in the collection.\n\n@return a task containing the number of documents in the collection" ]
public static long wrapped(DMatrixRMaj a , DMatrixRMaj b , DMatrixRMaj c ) { long timeBefore = System.currentTimeMillis(); double valA; int indexCbase= 0; int endOfKLoop = b.numRows*b.numCols; for( int i = 0; i < a.numRows; i++ ) { int indexA = i*a.numCols; // need to assign dataC to a value initially int indexB = 0; int indexC = indexCbase; int end = indexB + b.numCols; valA = a.get(indexA++); while( indexB < end ) { c.set( indexC++ , valA*b.get(indexB++)); } // now add to it while( indexB != endOfKLoop ) { // k loop indexC = indexCbase; end = indexB + b.numCols; valA = a.get(indexA++); while( indexB < end ) { // j loop c.plus( indexC++ , valA*b.get(indexB++)); } } indexCbase += c.numCols; } return System.currentTimeMillis() - timeBefore; }
[ "Wrapper functions with no bounds checking are used to access matrix internals" ]
[ "refresh the most recent history entries\n\n@param limit number of entries to populate\n@param offset number of most recent entries to skip\n@return populated history entries\n@throws Exception exception", "Formats a logging event to a writer.\n\n@param event\nlogging event to be formatted.", "Obtains a Pax local date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the Pax local date-time, not null\n@throws DateTimeException if unable to create the date-time", "Build resolution context in which message will be discovered and built\n@param components resolution components, used to identify message bundle\n@param messageParams message parameters will be substituted in message and used in pattern matching\n@since 3.1\n@return immutable resolution context instance for given parameters", "Wraps a StatisticsMatrix around 'm'. Does NOT create a copy of 'm' but saves a reference\nto it.", "Sets in-place the right child with the same first byte.\n\n@param b next byte of child suffix.\n@param child child node.", "Get a property as a float or Default value.\n\n@param key the property name\n@param defaultValue default value", "Parses the given XML doc to extract the properties and return them into a java.util.Properties.\n@param doc to parse\n@param sectionName which section to extract\n@return Properties map", "Gets constructors with given annotation type\n\n@param annotationType The annotation type to match\n@return A set of abstracted constructors with given annotation type. If\nthe constructors set is empty, initialize it first. Returns an\nempty set if there are no matches.\n@see org.jboss.weld.annotated.enhanced.EnhancedAnnotatedType#getEnhancedConstructors(Class)" ]
private List<Versioned<byte[]>> filterExpiredEntries(ByteArray key, List<Versioned<byte[]>> vals) { Iterator<Versioned<byte[]>> valsIterator = vals.iterator(); while(valsIterator.hasNext()) { Versioned<byte[]> val = valsIterator.next(); VectorClock clock = (VectorClock) val.getVersion(); // omit if expired if(clock.getTimestamp() < (time.getMilliseconds() - this.retentionTimeMs)) { valsIterator.remove(); // delete stale value if configured if(deleteExpiredEntries) { getInnerStore().delete(key, clock); } } } return vals; }
[ "Performs the filtering of the expired entries based on retention time.\nOptionally, deletes them also\n\n@param key the key whose value is to be deleted if needed\n@param vals set of values to be filtered out\n@return filtered list of values which are currently valid" ]
[ "Append field with quotes and escape characters added, if required.\n\n@return this", "Retrieve a single value property.\n\n@param method method definition\n@param object target object\n@param map parameter values", "Apply the matching client UUID for the request\n\n@param httpServletRequest\n@param history", "Use this API to fetch nsacl6 resource of given name .", "Find the logging profile attached to any resource.\n\n@param resourceRoot the root resource\n\n@return the logging profile name or {@code null} if one was not found", "Gets an overrideID for a class name, method name\n\n@param className name of class\n@param methodName name of method\n@return override ID of method", "Returns the name of the bone.\n\n@return the name", "Provides a normalized string which is lowercase for host strings, and which is a normalized string for addresses.\n@return", "Get the subsystem deployment model root.\n\n<p>\nIf the subsystem resource does not exist one will be created.\n</p>\n\n@param subsystemName the subsystem name.\n\n@return the model" ]
public static String rset(String input, int width) { String result; // result to return StringBuilder pad = new StringBuilder(); if (input == null) { for (int i = 0; i < width - 1; i++) { pad.append(' '); // put blanks into buffer } result = " " + pad; // one short to use + overload } else { if (input.length() >= width) { result = input.substring(0, width); // when input is too long, truncate } else { int padLength = width - input.length(); // number of blanks to add for (int i = 0; i < padLength; i++) { pad.append(' '); // actually put blanks into buffer } result = pad + input; // concatenate } } return result; }
[ "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" ]
[ "Creates a resource key for given enumeration value. By convention,\nresource bundle for enumerations has the name of enumeration class\nand value identifier is the same as enumeration value name.\n@param value the enumeration value\n@return the resource key", "Set default interval for sending events to monitoring service. DefaultInterval will be used by\nscheduler.\n\n@param defaultInterval the new default interval", "Assigns a list of nodes in the cluster represented by this failure\ndetector configuration.\n\n@param nodes Collection of Node instances, usually determined from the\nCluster; must be non-null", "Launch Navigation Service residing in the navigation module", "Register the given common classes with the ClassUtils cache.", "Deals with the case where we have had to map a task ID to a new value.\n\n@param id task ID from database\n@return mapped task ID", "Returns an Organization\n\n@param organizationId String\n@return DbOrganization", "Extracts out a matrix from source given a sub matrix with arbitrary rows and columns specified in\ntwo array lists\n\n@param src Source matrix. Not modified.\n@param rows array of row indexes\n@param rowsSize maximum element in row array\n@param cols array of column indexes\n@param colsSize maximum element in column array\n@param dst output matrix. Must be correct shape.", "Refactor the method into public CXF utility and reuse it from CXF instead copy&paste" ]
private void afterBatch(BatchBackend backend) { IndexedTypeSet targetedTypes = searchFactoryImplementor.getIndexedTypesPolymorphic( rootIndexedTypes ); if ( this.optimizeAtEnd ) { backend.optimize( targetedTypes ); } backend.flush( targetedTypes ); }
[ "Operations to do after all subthreads finished their work on index\n\n@param backend" ]
[ "Returns an iterator over the items in the trash.\n@return an iterator over the items in the trash.", "Determines whether there is an element of the collection that evaluates to true\nfor the predicate.\n@param\tpredicate\tAn OQL boolean query predicate.\n@return\tTrue if there is an element of the collection that evaluates to true\nfor the predicate, otherwise false.\n@exception\torg.odmg.QueryInvalidException\tThe query predicate is invalid.", "Builds a instance of the class for a map containing the values\n\n@param clazz Class to build\n@param values Values map\n@param differenceHandler The difference handler\n@return The created instance\n@throws InstantiationException Error instantiating\n@throws IllegalAccessException Access error\n@throws IntrospectionException Introspection error\n@throws IllegalArgumentException Argument invalid\n@throws InvocationTargetException Invalid target", "Sends this request while monitoring its progress and returns a BoxAPIResponse containing the server's response.\n\n<p>A ProgressListener is generally only useful when the size of the request is known beforehand. If the size is\nunknown, then the ProgressListener will be updated for each byte sent, but the total number of bytes will be\nreported as 0.</p>\n\n<p> See {@link #send} for more information on sending requests.</p>\n\n@param listener a listener for monitoring the progress of the request.\n@throws BoxAPIException if the server returns an error code or if a network error occurs.\n@return a {@link BoxAPIResponse} containing the server's response.", "Does the server support log downloads?\n\n@param cliGuiCtx The context.\n@return <code>true</code> if the server supports log downloads,\n<code>false</code> otherwise.", "Create constant name.\n@param state STATE_UNCHANGED, STATE_CHANGED, STATE_NEW or STATE_DELETED.\n@return cconstanname as String", "Determines the field via reflection look-up.\n\n@param clazz The java class to search in\n@param fieldName The field's name\n@return The field object or <code>null</code> if no matching field was found", "Send a mount update announcement to all registered listeners, and see if we can auto-attach a media cache file.\n\n@param slot the slot in which media has been mounted or unmounted\n@param mounted will be {@code true} if there is now media mounted in the specified slot", "Returns an iterable containing all the enterprise users that matches the filter and specifies which child fields\nto retrieve from the API.\n@param api the API connection to be used when retrieving the users.\n@param filterTerm used to filter the results to only users starting with this string in either the name or the\nlogin. Can be null to not filter the results.\n@param fields the fields to retrieve. Leave this out for the standard fields.\n@return an iterable containing all the enterprise users that matches the filter." ]
public User getUploadStatus() throws FlickrException { Map<String, Object> parameters = new HashMap<String, Object>(); parameters.put("method", METHOD_GET_UPLOAD_STATUS); Response response = transportAPI.get(transportAPI.getPath(), parameters, apiKey, sharedSecret); if (response.isError()) { throw new FlickrException(response.getErrorCode(), response.getErrorMessage()); } Element userElement = response.getPayload(); User user = new User(); user.setId(userElement.getAttribute("id")); user.setPro("1".equals(userElement.getAttribute("ispro"))); user.setUsername(XMLUtilities.getChildValue(userElement, "username")); Element bandwidthElement = XMLUtilities.getChild(userElement, "bandwidth"); user.setBandwidthMax(bandwidthElement.getAttribute("max")); user.setBandwidthUsed(bandwidthElement.getAttribute("used")); user.setIsBandwidthUnlimited("1".equals(bandwidthElement.getAttribute("unlimited"))); Element filesizeElement = XMLUtilities.getChild(userElement, "filesize"); user.setFilesizeMax(filesizeElement.getAttribute("max")); Element setsElement = XMLUtilities.getChild(userElement, "sets"); user.setSetsCreated(setsElement.getAttribute("created")); user.setSetsRemaining(setsElement.getAttribute("remaining")); Element videosElement = XMLUtilities.getChild(userElement, "videos"); user.setVideosUploaded(videosElement.getAttribute("uploaded")); user.setVideosRemaining(videosElement.getAttribute("remaining")); Element videoSizeElement = XMLUtilities.getChild(userElement, "videosize"); user.setVideoSizeMax(videoSizeElement.getAttribute("maxbytes")); return user; }
[ "Get upload status for the currently authenticated user.\n\nRequires authentication with 'read' permission using the new authentication API.\n\n@return A User object with upload status data fields filled\n@throws FlickrException" ]
[ "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", "Gets the prefix from value.\n\n@param value the value\n@return the prefix from value", "Convert an Object to a Date, without an Exception", "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", "Deletes a specific, existing project status update.\n\nReturns an empty data record.\n\n@param projectStatus The project status update to delete.\n@return Request object", "Utility method used to convert an integer time representation into a\nDuration instance.\n\n@param totalTime integer time representation\n@param format required time format\n@return new Duration instance", "Invoked when an action occurs.", "Deletes the VFS XML bundle file.\n@throws CmsException thrown if the delete operation fails.", "Adds this vector to v1 and places the result in this vector.\n\n@param v1\nright-hand vector" ]
public static void startMockJadexAgent(String agent_name, String agent_path, MockConfiguration configuration, BeastTestCase story) { story.startAgent(agent_name, agent_path); story.sendMessageToAgent(agent_name, SFipa.INFORM, configuration); story.setExecutionTime(2000); // To get time to execute the DF rename goal }
[ "This method is used to launch mock agents. First it creates them, with\nthe generic df_service_name \\\"mock_agent\\\", and then the method sends to\nthe agent a message with the new df_service_name and its behaviour.\n\n@param agent_name\nThe name of the mock agent\n@param agent_path\nThe path of the agent, described in\nmocks/jadex/common/Definitions file\n@param configuration\nWhere the new df_service_name and the agents behaviour is\nsaved\n@param scenario\nThe Scenario of the Test" ]
[ "Deletes a chain of vertices from this list.", "Gets the actual type arguments of a class\n\n@param clazz The class to examine\n@return The type arguments", "See convertToSQL92.\n\n@return SQL like sub-expression\n@throws IllegalArgumentException oops", "Serializes Number value and writes it into specified buffer.", "Guess the date of the dump from the given dump file name.\n\n@param fileName\n@return 8-digit date stamp or YYYYMMDD if none was found", "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", "Calls the stored procedure stored procedure throws an\nerror if it doesn't exist.\n@param broker\n@param cld\n@param sequenceName\n@return\n@throws LookupException\n@throws SQLException", "Invert by solving for against an identity matrix.\n\n@param A_inv Where the inverted matrix saved. Modified.", "Set up arguments for each FieldDescriptor in an array." ]
public static AT_Row createContentRow(Object[] content, TableRowStyle style){ Validate.notNull(content); Validate.notNull(style); Validate.validState(style!=TableRowStyle.UNKNOWN); LinkedList<AT_Cell> cells = new LinkedList<AT_Cell>(); for(Object o : content){ cells.add(new AT_Cell(o)); } return new AT_Row(){ @Override public TableRowType getType(){ return TableRowType.CONTENT; } @Override public TableRowStyle getStyle(){ return style; } @Override public LinkedList<AT_Cell> getCells(){ return cells; } }; }
[ "Creates a new row with content with given cell context and a normal row style.\n@param content the content for the row, each member of the array represents the content for a cell in the row, must not be null but can contain null members\n@return a new row with content\n@throws {@link NullPointerException} if content was null" ]
[ "Return the number of ignored or assumption-ignored tests.", "below is testing code", "Check if the current version match the last release or the last snapshot one\n\n@param artifact\n@return boolean", "Specify the class represented by this `ClassNode` extends\na class with the name specified\n@param name the name of the parent class\n@return this `ClassNode` instance", "Determines the component type for a given array type.\n\n@param type the given array type\n@return the component type of a given array type", "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", "Create and serialize a WorkerStatus for a pause event.\n\n@return the JSON representation of a new WorkerStatus\n@throws IOException if there was an error serializing the WorkerStatus", "Create a function that will create the style on demand. This is called later in a separate thread so\nany blocking calls will not block the parsing of the layer attributes.\n\n@param template the template for this map\n@param styleString a string that identifies a style.", "Append the text at the end of the File, using a specified encoding.\n\n@param file a File\n@param text the text to append at the end of the File\n@param charset the charset used\n@throws IOException if an IOException occurs.\n@since 1.0" ]
public void applyToPrimaryClassNodes(PrimaryClassNodeOperation body) throws CompilationFailedException { Iterator classNodes = getPrimaryClassNodes(body.needSortedInput()).iterator(); while (classNodes.hasNext()) { SourceUnit context = null; try { ClassNode classNode = (ClassNode) classNodes.next(); context = classNode.getModule().getContext(); if (context == null || context.phase < phase || (context.phase == phase && !context.phaseComplete)) { int offset = 1; Iterator<InnerClassNode> iterator = classNode.getInnerClasses(); while (iterator.hasNext()) { iterator.next(); offset++; } body.call(context, new GeneratorContext(this.ast, offset), classNode); } } catch (CompilationFailedException e) { // fall through, getErrorReporter().failIfErrors() will trigger } catch (NullPointerException npe) { GroovyBugError gbe = new GroovyBugError("unexpected NullpointerException", npe); changeBugText(gbe, context); throw gbe; } catch (GroovyBugError e) { changeBugText(e, context); throw e; } catch (NoClassDefFoundError e) { // effort to get more logging in case a dependency of a class is loaded // although it shouldn't have convertUncaughtExceptionToCompilationError(e); } catch (Exception e) { convertUncaughtExceptionToCompilationError(e); } } getErrorCollector().failIfErrors(); }
[ "A loop driver for applying operations to all primary ClassNodes in\nour AST. Automatically skips units that have already been processed\nthrough the current phase." ]
[ "Adds a metadata classification to the specified file.\n\n@param classificationType the metadata classification type.\n@return the metadata classification type added to the file.", "Updates this BoxJSONObject using the information in a JSON object.\n@param jsonObject the JSON object containing updated information.", "Wrap an existing setter.", "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.", "Determines if the key replicates to the given node\n\n@param key\n@param nodeId\n@return true if the key belongs to the node as some replica", "Create a ModelNode representing the CPU the instance is running on.\n\n@return a ModelNode representing the CPU the instance is running on.\n@throws OperationFailedException", "ceiling for clipped RELU, alpha for ELU", "Executes the given transaction within the context of a write lock.\n\n@param t The transaction to execute.", "Returns the bundle jar classpath element." ]
protected String getPayload(Message message) { try { String encoding = (String) message.get(Message.ENCODING); if (encoding == null) { encoding = "UTF-8"; } CachedOutputStream cos = message.getContent(CachedOutputStream.class); if (cos == null) { LOG.warning("Could not find CachedOutputStream in message." + " Continuing without message content"); return ""; } return new String(cos.getBytes(), encoding); } catch (IOException e) { throw new RuntimeException(e); } }
[ "Gets the message payload.\n\n@param message the message\n@return the payload" ]
[ "FastJSON does not provide the API so we have to create our own", "Returns true if a pixel with the given color exists\n\n@param color the pixel colour to look for.\n@return true if there exists at least one pixel that has the given pixels color", "Adds a path to the request response table with the specified values\n\n@param profileId ID of profile\n@param clientUUID UUID of client\n@param pathId ID of path\n@throws Exception exception", "Utility method used to convert a Number into a BigInteger.\n\n@param value Number instance\n@return BigInteger instance", "Split string of comma-delimited ints into an a int array\n\n@param str\n@return\n@throws IllegalArgumentException", "Use this method to enable device network-related information tracking, including IP address.\nThis reporting is disabled by default. To re-disable tracking call this method with enabled set to false.\n\n@param value boolean Whether device network info reporting should be enabled/disabled.", "Returns all found resolvers\n@return", "depth- first search for any module - just to check that the suggestion has any chance of delivering correct result", "Set the method arguments for an enabled method override\n\n@param pathName Path name\n@param methodName Fully qualified method name\n@param ordinal 1-based index of the override within the overrides of type methodName\n@param arguments Array of arguments to set(specify all arguments)\n@return true if success, false otherwise" ]
public void setTexture(GVRRenderTexture texture) { mTexture = texture; NativeRenderTarget.setTexture(getNative(), texture.getNative()); }
[ "Sets the texture this render target will render to.\nIf no texture is provided, the render target will\nnot render anything.\n@param texture GVRRenderTexture to render to." ]
[ "Replaces each 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 string to be substituted for each match\n@return the toString() of the CharSequence with content replaced\n@throws java.util.regex.PatternSyntaxException if the regular expression's syntax is invalid\n@see String#replaceAll(String, String)\n@since 1.8.2", "Use this API to update nsrpcnode.", "Creates a string representation of the given node. Useful for debugging.\n\n@return a debug string for the given node.", "This method take a list of fileName of the type partitionId_Replica_Chunk\nand returns file names that match the regular expression\nmasterPartitionId_", "Retrieve from the parent pom the path to the modules of the project", "Tests the string edit distance function.", "Converts a vector from sample space into eigen space.\n\n@param sampleData Sample space data.\n@return Eigen space projection.", "Returns true if the query result has at least one row.", "Converts Observable of page to Observable of Inner.\n@param <InnerT> type of inner.\n@param innerPage Page to be converted.\n@return Observable for list of inner." ]
public ContentAssistEntry createSnippet(final String proposal, final String label, final ContentAssistContext context) { final Procedure1<ContentAssistEntry> _function = (ContentAssistEntry it) -> { it.setLabel(label); }; return this.createProposal(proposal, context.getPrefix(), context, ContentAssistEntry.KIND_SNIPPET, _function); }
[ "Returns an entry of kind snippet with the given proposal and label and the prefix from the context, or null if the proposal is not valid.\n@since 2.16" ]
[ "Gets the file from which boot operations should be parsed.\n@return the file. Will not be {@code null}", "Joins the individual WBS elements to make the formated value.\n\n@param length number of elements to join\n@return formatted WBS value", "Sets an argument to the collection of arguments. This guarantees only one value will be assigned to the\nargument key.\n\n@param argument the argument to add", "Computes the determinant for the specified matrix. It must be square and have\nthe same width and height as what was specified in the constructor.\n\n@param mat The matrix whose determinant is to be computed.\n@return The determinant.", "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.", "The smallest granularity of rebalancing where-in we move partitions for a\nsub-set of stores. Finally at the end of the movement, the node is\nremoved out of rebalance state\n\n<br>\n\nAlso any errors + rollback procedures are performed at this level itself.\n\n<pre>\n| Case | hasRO | hasRW | finishedRO | Action |\n| 0 | t | t | t | rollback cluster change + swap |\n| 1 | t | t | f | nothing to do since \"rebalance state change\" should have removed everything |\n| 2 | t | f | t | won't be triggered since hasRW is false |\n| 3 | t | f | f | nothing to do since \"rebalance state change\" should have removed everything |\n| 4 | f | t | t | rollback cluster change |\n| 5 | f | t | f | won't be triggered |\n| 6 | f | f | t | won't be triggered |\n| 7 | f | f | f | won't be triggered |\n</pre>\n\n@param batchId Rebalance batch id\n@param batchRollbackCluster Cluster to rollback to if we have a problem\n@param rebalanceTaskPlanList The list of rebalance partition plans\n@param hasReadOnlyStores Are we rebalancing any read-only stores?\n@param hasReadWriteStores Are we rebalancing any read-write stores?\n@param finishedReadOnlyStores Have we finished rebalancing of read-only\nstores?", "Compute costs.", "Merges a specialized archetype with its parent. Merge will be done in-place on the specialized parameter.\n\n@param flatParent Flat parent archetype\n@param specialized Specialized archetype", "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}" ]
public static double huntKennedyCMSFloorValue( double forwardSwaprate, double volatility, double swapAnnuity, double optionMaturity, double swapMaturity, double payoffUnit, double optionStrike) { double huntKennedyCMSOptionValue = huntKennedyCMSOptionValue(forwardSwaprate, volatility, swapAnnuity, optionMaturity, swapMaturity, payoffUnit, optionStrike); // A floor is an option plus the strike (max(X,K) = max(X-K,0) + K) return huntKennedyCMSOptionValue + optionStrike * payoffUnit; }
[ "Calculate the value of a CMS strike using the Black-Scholes model for the swap rate together with\nthe Hunt-Kennedy convexity adjustment.\n\n@param forwardSwaprate The forward swap rate\n@param volatility Volatility of the log of the swap rate\n@param swapAnnuity The swap annuity\n@param optionMaturity The option maturity\n@param swapMaturity The swap maturity\n@param payoffUnit The payoff unit, e.g., the discount factor corresponding to the payment date\n@param optionStrike The option strike\n@return Value of the CMS strike" ]
[ "Opens a JDBC connection with the given parameters.", "Adds listeners and reads from a stream.\n\n@param reader reader for file type\n@param stream schedule data\n@return ProjectFile instance", "Parser for actual conditions\n\n@param feed\n@return", "Checks if a property's type is valid to be included in the report.\n@param _property the property.\n@return true if the property is is of a valid type.", "Copies all elements from input into output which are &gt; tol.\n@param input (Input) input matrix. Not modified.\n@param output (Output) Output matrix. Modified and shaped to match input.\n@param tol Tolerance for defining zero", "Delete an object.", "Validate that the overlay exists. If it doesn't exist, throws an\nexception if not in batch mode or if failInBatch is true. In batch mode,\nwe could be in the case that the overlay doesn't exist yet.", "Reads a single resource from a ConceptDraw PROJECT file.\n\n@param resource ConceptDraw PROJECT resource", "Use this API to delete nsacl6 resources of given names." ]
static final TimeBasedRollStrategy findRollStrategy( final AppenderRollingProperties properties) { if (properties.getDatePattern() == null) { LogLog.error("null date pattern"); return ROLL_ERROR; } // Strip out quoted sections so that we may safely scan the undecorated // pattern for characters that are meaningful to SimpleDateFormat. final LocalizedDateFormatPatternHelper localizedDateFormatPatternHelper = new LocalizedDateFormatPatternHelper( properties.getDatePatternLocale()); final String undecoratedDatePattern = localizedDateFormatPatternHelper .excludeQuoted(properties.getDatePattern()); if (ROLL_EACH_MINUTE.isRequiredStrategy(localizedDateFormatPatternHelper, undecoratedDatePattern)) { return ROLL_EACH_MINUTE; } if (ROLL_EACH_HOUR.isRequiredStrategy(localizedDateFormatPatternHelper, undecoratedDatePattern)) { return ROLL_EACH_HOUR; } if (ROLL_EACH_HALF_DAY.isRequiredStrategy(localizedDateFormatPatternHelper, undecoratedDatePattern)) { return ROLL_EACH_HALF_DAY; } if (ROLL_EACH_DAY.isRequiredStrategy(localizedDateFormatPatternHelper, undecoratedDatePattern)) { return ROLL_EACH_DAY; } if (ROLL_EACH_WEEK.isRequiredStrategy(localizedDateFormatPatternHelper, undecoratedDatePattern)) { return ROLL_EACH_WEEK; } if (ROLL_EACH_MONTH.isRequiredStrategy(localizedDateFormatPatternHelper, undecoratedDatePattern)) { return ROLL_EACH_MONTH; } return ROLL_ERROR; }
[ "Checks each available roll strategy in turn, starting at the per-minute\nstrategy, next per-hour, and so on for increasing units of time until a\nmatch is found. If no match is found, the error strategy is returned.\n\n@param properties\n@return The appropriate roll strategy." ]
[ "Updates the polling state from a PUT or PATCH operation.\n\n@param response the response from Retrofit REST call\n@throws CloudException thrown if the response is invalid\n@throws IOException thrown by deserialization", "Merges two lists together.\n\n@param one first list\n@param two second list\n@return merged lists", "Use this API to fetch appfwpolicylabel_policybinding_binding resources of given name .", "Parses the equation and compiles it into a sequence which can be executed later on\n@param equation String in simple equation format.\n@param assignment if true an assignment is expected and an exception if thrown if there is non\n@param debug if true it will print out debugging information\n@return Sequence of operations on the variables", "Constructs credentials for the given account and key file.\n\n@param serviceAccountId service account ID (typically an e-mail address).\n@param privateKeyFile the file name from which to get the private key.\n@param serviceAccountScopes Collection of OAuth scopes to use with the the service\naccount flow or {@code null} if not.\n@return valid credentials or {@code null}", "Returns the context menu for the table item.\n@param itemId the table item.\n@return the context menu for the given item.", "Sends a user a password reset email for the given email.\n\n@param email the email of the user.\n@return A {@link Task} that completes when the reqest request completes/fails.", "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", "Parses values out of the header text.\n\n@param header header text" ]
public static boolean isConstructorCall(Expression expression, String classNamePattern) { return expression instanceof ConstructorCallExpression && expression.getType().getName().matches(classNamePattern); }
[ "Return true if the expression is a constructor call on a class that matches the supplied.\n@param expression - the expression\n@param classNamePattern - the possible List of class names\n@return as described" ]
[ "Use this API to fetch a appflowglobal_binding resource .", "Examins the structure of A for QR decomposition\n@param A matrix which is to be decomposed\n@return true if the solution is valid or false if the decomposition can't be performed (i.e. requires column pivots)", "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", "Log a warning for the given operation at the provided address for the given attribute, using the provided detail\nmessage.\n\n@param address where warning occurred\n@param operation where which problem occurred\n@param message custom error message to append\n@param attribute attribute we that has problem", "initializer to setup JSAdapter prototype in the given scope", "Set new particle coordinates somewhere off screen and apply new direction towards the screen\n\n@param position the particle position to apply new values to", "Returns the command line options to be used for scalaxb, excluding the\ninput file names.", "Flag that the processor has completed execution.\n\n@param processorGraphNode the node that has finished.", "Creates a XopBean. The image on the disk is included as a byte array,\na DataHandler and java.awt.Image\n@return the bean\n@throws Exception" ]
public void setRefreshFrequency(IntervalFrequency frequency) { if (NONE_REFRESH_INTERVAL == mRefreshInterval && IntervalFrequency.NONE != frequency) { // Install draw-frame listener if frequency is no longer NONE getGVRContext().unregisterDrawFrameListener(mFrameListener); getGVRContext().registerDrawFrameListener(mFrameListener); } switch (frequency) { case REALTIME: mRefreshInterval = REALTIME_REFRESH_INTERVAL; break; case HIGH: mRefreshInterval = HIGH_REFRESH_INTERVAL; break; case MEDIUM: mRefreshInterval = MEDIUM_REFRESH_INTERVAL; break; case LOW: mRefreshInterval = LOW_REFRESH_INTERVAL; break; case NONE: mRefreshInterval = NONE_REFRESH_INTERVAL; break; default: break; } }
[ "Set the refresh frequency of this scene object.\nUse NONE for improved performance when the text is set initially and never\nchanged.\n\n@param frequency\nThe refresh frequency of this TextViewSceneObject." ]
[ "When an alias for a field is added, index it here to allow lookup by alias and type.\n\n@param type field type\n@param alias field alias", "Sleeps if necessary to slow down the caller.\n\n@param eventsSeen Number of events seen since last invocation. Basis for\ndetermining whether its necessary to sleep.", "Creates an appropriate HSGE for resources in the host tree, excluding the server and server-config subtrees", "Prints the data of one property to the given output. This will be a\nsingle line in CSV.\n\n@param out\nthe output to write to\n@param propertyRecord\nthe data to write\n@param propertyIdValue\nthe property that the data refers to", "Get the time zone for a specific exchange suffix\n\n@param suffix suffix for the exchange in YahooFinance\n@return time zone of the exchange", "Write a Byte Order Mark at the beginning of the file\n\n@param stream the FileOutputStream to write the BOM to\n@param bigEndian true if UTF 16 Big Endian or false if Low Endian\n@throws IOException if an IOException occurs.\n@since 1.0", "Convenience method dispatches the specified event to the source appender,\nwhich will result in the custom event data being appended to the new file.\n\n@param customLoggingEvent\nThe custom Log4J event to be appended.", "This method is called to format a priority.\n\n@param value priority instance\n@return formatted priority value", "Create a Build retention object out of the build\n\n@param build The build to create the build retention out of\n@param discardOldArtifacts Flag whether to discard artifacts of those builds that are to be discarded.\n@return a new Build retention" ]
protected void reportProgress(String taskDecription) { if (this.progress != null) { if (this.progress.isCanceled()) { // Only AbortCompilation can stop the compiler cleanly. // We check cancellation again following the call to compile. throw new AbortCompilation(true, null); } this.progress.setTaskName(taskDecription); } }
[ "Checks whether the compilation has been canceled and reports the given progress to the compiler progress." ]
[ "Ensures that the specified fields are present in the given class.\n\n@param classDef The class to copy the fields into\n@param fields The fields to copy\n@throws ConstraintException If there is a conflict between the new fields and fields in the class", "Attempt to shutdown the server. As much shutdown as possible will be\ncompleted, even if intermediate errors are encountered.\n\n@throws VoldemortException", "Writes OWL declarations for all basic vocabulary elements used in the\ndump.\n\n@throws RDFHandlerException", "Throws one RendererException if the viewType, layoutInflater or parent are null.", "Use this API to fetch vpnvserver_vpnsessionpolicy_binding resources of given name .", "Use this API to fetch gslbsite resource of given name .", "Only one boolean param should be true at a time for this function to return the proper results\n\n@param hostName\n@param enable\n@param disable\n@param remove\n@param isEnabled\n@param exists\n@return\n@throws Exception", "Returns true if required properties for MiniFluo are set", "validates operation against the definition and sets model for the parameters passed.\n\n@param operationObject model node of type {@link ModelType#OBJECT}, typically representing an operation request\n@param model model node in which the value should be stored\n@throws OperationFailedException if the value is not valid\n\n@deprecated Not used by the WildFly management kernel; will be removed in a future release" ]
public static double Y0(double x) { if (x < 8.0) { double y = x * x; double ans1 = -2957821389.0 + y * (7062834065.0 + y * (-512359803.6 + y * (10879881.29 + y * (-86327.92757 + y * 228.4622733)))); double ans2 = 40076544269.0 + y * (745249964.8 + y * (7189466.438 + y * (47447.26470 + y * (226.1030244 + y * 1.0)))); return (ans1 / ans2) + 0.636619772 * J0(x) * Math.log(x); } else { double z = 8.0 / x; double y = z * z; double xx = x - 0.785398164; double ans1 = 1.0 + y * (-0.1098628627e-2 + y * (0.2734510407e-4 + y * (-0.2073370639e-5 + y * 0.2093887211e-6))); double ans2 = -0.1562499995e-1 + y * (0.1430488765e-3 + y * (-0.6911147651e-5 + y * (0.7621095161e-6 + y * (-0.934945152e-7)))); return Math.sqrt(0.636619772 / x) * (Math.sin(xx) * ans1 + z * Math.cos(xx) * ans2); } }
[ "Bessel function of the second kind, of order 0.\n\n@param x Value.\n@return Y0 value." ]
[ "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", "checks if the 2 triangles shares a segment\n@author Doron Ganel & Eyal Roth(2009)\n@param t2 - a second triangle\n@return boolean", "This method returns the duplicated certificate mapped to the passed in cert, or\ncreates and returns one if no mapping has yet been performed. If a naked public\nkey has already been mapped that matches the key in the cert, the already mapped\nkeypair will be reused for the mapped cert.\n@param cert\n@return\n@throws CertificateEncodingException\n@throws InvalidKeyException\n@throws CertificateException\n@throws CertificateNotYetValidException\n@throws NoSuchAlgorithmException\n@throws NoSuchProviderException\n@throws SignatureException\n@throws KeyStoreException\n@throws UnrecoverableKeyException", "Parses the query facet configurations.\n@param rangeFacetObject The JSON sub-node with the query facet configurations.\n@return The query facet configurations.", "Sets the locale for which the property should be read.\n\n@param locale the locale for which the property should be read.", "Curries a function that takes one argument.\n\n@param function\nthe original function. May not be <code>null</code>.\n@param argument\nthe fixed argument.\n@return a function that takes no arguments. Never <code>null</code>.", "Constructs a new ClientBuilder for building a CloudantClient instance to connect to the\nCloudant server with the specified account.\n\n@param account the Cloudant account name to connect to e.g. \"example\" is the account name\nfor the \"example.cloudant.com\" endpoint\n@return a new ClientBuilder for the account\n@throws IllegalArgumentException if the specified account name forms an invalid endpoint URL", "Determine if the exception is relative based on the recurrence type integer value.\n\n@param value integer value\n@return true if the recurrence is relative", "Map the Primavera UDF to a custom field.\n\n@param fieldType parent object type\n@param dataType UDF data type\n@param name UDF name\n@return FieldType instance" ]
public static MetaClassRegistry getInstance(int includeExtension) { if (includeExtension != DONT_LOAD_DEFAULT) { if (instanceInclude == null) { instanceInclude = new MetaClassRegistryImpl(); } return instanceInclude; } else { if (instanceExclude == null) { instanceExclude = new MetaClassRegistryImpl(DONT_LOAD_DEFAULT); } return instanceExclude; } }
[ "Singleton of MetaClassRegistry.\n\n@param includeExtension\n@return the registry" ]
[ "Sets any application-specific custom fields. The values\nare presented to the application and the iPhone doesn't\ndisplay them automatically.\n\nThis can be used to pass specific values (urls, ids, etc) to\nthe application in addition to the notification message\nitself.\n\n@param key the custom field name\n@param value the custom field value\n@return this", "Gets the proper modulus operation.\n\n@param x Integer.\n@param m Modulo.\n@return Modulus.", "Get a list of referring domains for a collection.\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 collectionId\n(Optional) The id of the collection to get stats for. If not provided, stats for all collections will be returned.\n@param perPage\n(Optional) Number of domains to return per page. If this argument is omitted, it defaults to 25. The maximum allowed value is 100.\n@param page\n(Optional) The page of results to return. If this argument is omitted, it defaults to 1.\n@see \"http://www.flickr.com/services/api/flickr.stats.getCollectionDomains.html\"", "Use this API to unset the properties of nsrpcnode resources.\nProperties that need to be unset are specified in args array.", "prevent too many refreshes happening one after the other.", "Sets the protocol.\n@param protocol The protocol to be set.", "Convert string to qname.\n\n@param str the string\n@return the qname", "Returns the parsed story from the given path\n\n@param configuration the Configuration used to run story\n@param storyPath the story path\n@return The parsed Story", "Unmarshal the XML content with auto-correction.\n@param file the file that contains the XML\n@return the XML read from the file\n@throws CmsXmlException thrown if the XML can't be read." ]
public static <E> Set<E> intersection(Set<E> s1, Set<E> s2) { Set<E> s = new HashSet<E>(); s.addAll(s1); s.retainAll(s2); return s; }
[ "Returns the intersection of sets s1 and s2." ]
[ "Sets the drawable used as the drawer indicator.\n\n@param drawable The drawable used as the drawer indicator.", "Assigns one variable to one value\n\n@param action an Assign Action\n@param possibleStateList a current list of possible states produced so far from expanding a model state\n\n@return the same list, with every possible state augmented with an assigned variable, defined by action", "Reads an argument of type \"nstring\" from the request.", "Gathers the pk fields from the hierarchy of the given class, and copies them into the class.\n\n@param classDef The root of the hierarchy\n@throws ConstraintException If there is a conflict between the pk fields", "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", "Use this API to fetch servicegroup_lbmonitor_binding resources of given name .", "Read, validate, and discard a single message, returning the next valid offset, and the\nmessage being validated\n\n@throws IOException any exception", "Adds the basic sentence.\n\n@param s the s\n@throws ParseException the parse exception", "Remove a path from a profile\n\n@param path_id path ID to remove\n@param profileId profile ID to remove path from" ]
public static ProjectReader getProjectReader(String name) throws MPXJException { int index = name.lastIndexOf('.'); if (index == -1) { throw new IllegalArgumentException("Filename has no extension: " + name); } String extension = name.substring(index + 1).toUpperCase(); Class<? extends ProjectReader> fileClass = READER_MAP.get(extension); if (fileClass == null) { throw new IllegalArgumentException("Cannot read files of type: " + extension); } try { ProjectReader file = fileClass.newInstance(); return (file); } catch (Exception ex) { throw new MPXJException("Failed to load project reader", ex); } }
[ "Retrieves a ProjectReader instance which can read a file of the\ntype specified by the supplied file name.\n\n@param name file name\n@return ProjectReader instance" ]
[ "Returns the start of this resource assignment.\n\n@return start date", "The derivative of the objective function. You may override this method\nif you like to implement your own derivative.\n\n@param parameters Input value. The parameter vector.\n@param derivatives Output value, where derivatives[i][j] is d(value(j)) / d(parameters(i)\n@throws SolverException Thrown if the valuation fails, specific cause may be available via the <code>cause()</code> method.", "Prints associations recovered from the fields of a class. An association is inferred only\nif another relation between the two classes is not already in the graph.\n@param classes", "Create and register the declaration of class D with the given metadata.\n\n@param metadata the metadata to create the declaration\n@return the created declaration of class D", "Convolve with a 2D kernel.\n@param kernel the kernel\n@param inPixels the input pixels\n@param outPixels the output pixels\n@param width the width\n@param height the height\n@param alpha include alpha channel\n@param edgeAction what to do at the edges", "Should be called after all columns have been created\n@param headerStyle\n@param totalStyle\n@param totalHeaderStyle\n@return", "This will create a line in the SDEF file for each calendar\nif there are more than 9 calendars, you'll have a big error,\nas USACE numbers them 0-9.\n\n@param records list of ProjectCalendar instances", "Use this API to save cacheobject resources.", "Adds a data source to the configuration. If in deduplication mode\ngroupno == 0, otherwise it gives the number of the group to which\nthe data source belongs." ]
public void setStatusBarColor(int statusBarColor) { if (mBuilder.mScrimInsetsLayout != null) { mBuilder.mScrimInsetsLayout.setInsetForeground(statusBarColor); mBuilder.mScrimInsetsLayout.getView().invalidate(); } }
[ "Set the color for the statusBar\n\n@param statusBarColor" ]
[ "Unmarshal the XML content with auto-correction.\n@param file the file that contains the XML\n@return the XML read from the file\n@throws CmsXmlException thrown if the XML can't be read.", "Get info for a given topic reply\n\n@param topicId\nUnique identifier of a topic for a given group {@link Topic}.\n@param replyId\nUnique identifier of a reply for a given topic {@link Reply}.\n@return A group topic\n@throws FlickrException\n@see <a href=\"http://www.flickr.com/services/api/flickr.groups.discuss.replies.getInfo.html\">API Documentation</a>", "Abort an upload session, discarding any chunks that were uploaded to it.", "Get ComponentsMultiThread of current instance\n@return componentsMultiThread", "Gets all of the column names for a result meta data\n\n@param rsmd Resultset metadata\n@return Array of column names\n@throws Exception exception", "Process the graphical indicator criteria for a single column.\n\n@param type field type\n@return indicator criteria data", "A document that is paused no longer has remote updates applied to it.\nAny local updates to this document cause it to be resumed. An example of pausing a document\nis when a conflict is being resolved for that document and the handler throws an exception.\n\nThis method allows you to resume sync for a document.\n\n@param namespace namespace for the document\n@param documentId the id of the document to resume syncing\n@return true if successfully resumed, false if the document\ncould not be found or there was an error resuming", "OR operation which takes the previous clause and the next clause and OR's them together.", "Initializes the type and validates it" ]
public BoxFolder.Info getFolderInfo(String folderID, String... fields) { String queryString = new QueryStringBuilder().appendParam("fields", fields).toString(); URL url = FOLDER_INFO_URL_TEMPLATE.buildWithQuery(this.api.getBaseURL(), queryString, folderID); BoxAPIRequest request = new BoxAPIRequest(this.api, url, "GET"); BoxJSONResponse response = (BoxJSONResponse) request.send(); JsonObject jsonObject = JsonObject.readFrom(response.getJSON()); BoxFolder folder = new BoxFolder(this.api, jsonObject.get("id").asString()); return folder.new Info(response.getJSON()); }
[ "Gets information about a trashed folder that's limited to a list of specified fields.\n@param folderID the ID of the trashed folder.\n@param fields the fields to retrieve.\n@return info about the trashed folder containing only the specified fields." ]
[ "Converts a value to the appropriate type.\n\n@param type target type\n@param value input value\n@return output value", "Installs a path service.\n\n@param name the name to use for the service\n@param path the relative portion of the path\n@param possiblyAbsolute {@code true} if {@code path} may be an {@link #isAbsoluteUnixOrWindowsPath(String) absolute path}\nand should be {@link AbsolutePathService installed as such} if it is, with any\n{@code relativeTo} parameter ignored\n@param relativeTo the name of the path that {@code path} may be relative to\n@param serviceTarget the {@link ServiceTarget} to use to install the service\n@return the ServiceController for the path service", "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.", "Determine how many forked JVMs to use.", "Determines if entry is accepted. For normal usage, this means confirming that the key is\nneeded. For orphan usage, this simply means confirming the key belongs to the node.\n\n@param key\n@return true iff entry is accepted.", "Get the authentication for a specific token.\n\n@param token token\n@return authentication if any", "Undo changes for a single patch entry.\n\n@param entry the patch entry\n@param loader the content loader", "Converts the string representation of the days bit field into an integer.\n\n@param days string bit field\n@return integer bit field", "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" ]
public int getHotCueCount() { if (rawMessage != null) { return (int) ((NumberField) rawMessage.arguments.get(5)).getValue(); } int total = 0; for (Entry entry : entries) { if (entry.hotCueNumber > 0) { ++total; } } return total; }
[ "Return the number of entries in the cue list that represent hot cues.\n\n@return the number of cue list entries that are hot cues" ]
[ "Add a custom query parameter to the _changes request. Useful for specifying extra parameters\nto a filter function for example.\n\n@param name the name of the query parameter\n@param value the value of the query parameter\n@return this Changes instance\n@since 2.5.0", "Remove a notification message. Recursive until all pending removals have been completed.", "Starting with the given column index, will return the first column index\nwhich contains a colour that does not match the given color.", "Computes execution time\n@param extra", "Generate the specified output file by merging the specified\nVelocity template with the supplied context.", "Returns the List value of the field.\n\n@return the List value of the field. It returns a reference of the value if the type is <code>LIST</code>, if\nthe type is <code>LIST_MAP</code> it returns a copy of the value.\n@throws IllegalArgumentException if the value cannot be converted to List.", "Returns the value of the identified field as a Float.\n@param fieldName the name of the field\n@return the value of the field as a Float\n@throws FqlException if the field cannot be expressed as an Float", "Use this API to fetch lbvserver_servicegroup_binding resources of given name .", "Returns the URL of the first route.\n@return URL backed by the first route." ]
private ProjectCalendar getResourceCalendar(Integer calendarID) { ProjectCalendar result = null; if (calendarID != null) { ProjectCalendar calendar = m_calMap.get(calendarID); if (calendar != null) { // // If the resource is linked to a base calendar, derive // a default calendar from the base calendar. // if (!calendar.isDerived()) { ProjectCalendar resourceCalendar = m_project.addCalendar(); resourceCalendar.setParent(calendar); resourceCalendar.setWorkingDay(Day.MONDAY, DayType.DEFAULT); resourceCalendar.setWorkingDay(Day.TUESDAY, DayType.DEFAULT); resourceCalendar.setWorkingDay(Day.WEDNESDAY, DayType.DEFAULT); resourceCalendar.setWorkingDay(Day.THURSDAY, DayType.DEFAULT); resourceCalendar.setWorkingDay(Day.FRIDAY, DayType.DEFAULT); resourceCalendar.setWorkingDay(Day.SATURDAY, DayType.DEFAULT); resourceCalendar.setWorkingDay(Day.SUNDAY, DayType.DEFAULT); result = resourceCalendar; } else { // // Primavera seems to allow a calendar to be shared between resources // whereas in the MS Project model there is a one-to-one // relationship. If we find a shared calendar, take a copy of it // if (calendar.getResource() == null) { result = calendar; } else { ProjectCalendar copy = m_project.addCalendar(); copy.copy(calendar); result = copy; } } } } return result; }
[ "Retrieve the correct calendar for a resource.\n\n@param calendarID calendar ID\n@return calendar for resource" ]
[ "Returns the JSON datatype for the property datatype as represented by\nthe given WDTK datatype IRI string.\n\n@param datatypeIri\nthe WDTK datatype IRI string; case-sensitive\n@throws IllegalArgumentException\nif the given datatype string is not known", "Perform the module promotion\n\n@param moduleId String", "Writes task baseline data.\n\n@param xmlTask MSPDI task\n@param mpxjTask MPXJ task", "Parses the query facet configurations.\n@param rangeFacetObject The JSON sub-node with the query facet configurations.\n@return The query facet configurations.", "Parse a list of Photos from given Element.\n\n@param photosElement\n@return PhotoList", "Recovers the state of synchronization in case a system failure happened. The goal is to revert\nto a known, good state.", "Log a warning message with a throwable.", "Sets the appropriate headers to response of this request.\n\n@param response The HttpServletResponse response object.", "Delete a record.\n\n@param referenceId the reference ID." ]
protected NodeData createPageStyle() { NodeData ret = createBlockStyle(); TermFactory tf = CSSFactory.getTermFactory(); ret.push(createDeclaration("position", tf.createIdent("relative"))); ret.push(createDeclaration("border-width", tf.createLength(1f, Unit.px))); ret.push(createDeclaration("border-style", tf.createIdent("solid"))); ret.push(createDeclaration("border-color", tf.createColor(0, 0, 255))); ret.push(createDeclaration("margin", tf.createLength(0.5f, Unit.em))); PDRectangle layout = getCurrentMediaBox(); if (layout != null) { float w = layout.getWidth(); float h = layout.getHeight(); final int rot = pdpage.getRotation(); if (rot == 90 || rot == 270) { float x = w; w = h; h = x; } ret.push(createDeclaration("width", tf.createLength(w, unit))); ret.push(createDeclaration("height", tf.createLength(h, unit))); } else log.warn("No media box found"); return ret; }
[ "Creates a style definition used for pages.\n@return The page style definition." ]
[ "Set the color at \"index\" to \"color\". Entries are interpolated linearly from\nthe existing entries at \"firstIndex\" and \"lastIndex\" to the new entry.\nfirstIndex < index < lastIndex must hold.\n@param index the position to set\n@param firstIndex the position of the first color from which to interpolate\n@param lastIndex the position of the second color from which to interpolate\n@param color the color to set", "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", "Ensures that the given collection descriptor has the collection-class property if necessary.\n\n@param collDef The collection descriptor\n@param checkLevel The current check level (this constraint is checked in basic (partly) and strict)\n@exception ConstraintException If collection-class is given for an array or if no collection-class is given but required", "Gets an item that was shared with a 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@return info about the shared item.", "Returns the list of atlas information necessary to map\nthe texture atlas to each scene object.\n\n@return List of atlas information.", "Stops the compressor.", "Filters a dot at the end of the passed package name if present.\n\n@param pkgName\na package name\n@return a filtered package name", "Removes the given value to the set.\n\n@return true if the value was actually removed", "This method take a list of fileName of the type partitionId_Replica_Chunk\nand returns file names that match the regular expression\nmasterPartitionId_" ]
private UserAlias getUserAlias(Object attribute) { if (m_userAlias != null) { return m_userAlias; } if (!(attribute instanceof String)) { return null; } if (m_alias == null) { return null; } if (m_aliasPath == null) { boolean allPathsAliased = true; return new UserAlias(m_alias, (String)attribute, allPathsAliased); } return new UserAlias(m_alias, (String)attribute, m_aliasPath); }
[ "Retrieves or if necessary, creates a user alias to be used\nby a child criteria\n@param attribute The alias to set" ]
[ "Use this API to fetch sslfipskey resource of given name .", "Adds the specified class to the internal class graph along with its\nrelations and dependencies, eventually inferring them, according to the\nOptions specified for this matcher\n@param cd", "Returns all entries in no particular order.", "Use this API to fetch the statistics of all systemmemory_stats resources that are configured on netscaler.", "Add a line symbolizer definition to the rule.\n\n@param styleJson The old style.", "Attach a metadata cache file to a particular player media slot, so the cache will be used instead of querying\nthe player for metadata. This supports operation with metadata during shows where DJs are using all four player\nnumbers and heavily cross-linking between them.\n\nIf the media is ejected from that player slot, the cache will be detached.\n\n@param slot the media slot to which a meta data cache is to be attached\n@param file the metadata cache to be attached\n\n@throws IOException if there is a problem reading the cache file\n@throws IllegalArgumentException if an invalid player number or slot is supplied\n@throws IllegalStateException if the metadata finder is not running", "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", "Replies the elements of the left map without the pairs in the right map.\nIf the pair's values differ from\nthe value within the map, the map entry is not removed.\n\n<p>\nThe difference is an immutable\nsnapshot of the state of the maps at the time this method is called. It\nwill never change, even if the maps change at a later time.\n</p>\n\n<p>\nSince this method uses {@code HashMap} instances internally, the keys of\nthe supplied maps must be well-behaved with respect to\n{@link Object#equals} and {@link Object#hashCode}.\n</p>\n\n@param <K> type of the map keys.\n@param <V> type of the map values.\n@param left the map to update.\n@param right the pairs to remove.\n@return the map with the content of the left map except the pairs of the right map.\n@since 2.15", "The connection timeout for making a connection to Twitter." ]
public void setBundleActivator(String bundleActivator) { String old = mainAttributes.get(BUNDLE_ACTIVATOR); if (!bundleActivator.equals(old)) { this.mainAttributes.put(BUNDLE_ACTIVATOR, bundleActivator); this.modified = true; this.bundleActivator = bundleActivator; } }
[ "Set the main attribute \"Bundle-Activator\" to the given value.\n\n@param bundleActivator The new value" ]
[ "Heuristic check if string might be an IPv6 address.\n\n@param input Any string or null\n@return true, if input string contains only hex digits and at least two colons, before '.' or '%' character.", "Returns the root path for this source file, based upon the package name.\n\nFor example, if path is \"/project/src/main/java/org/example/Foo.java\" and the package is \"org.example\", then this\nshould return \"/project/src/main/java\".\n\nReturns null if the folder structure does not match the package name.", "Returns the expected name of a workspace for a given suffix\n@param suffix\n@return", "Adds another condition for an element within this annotation.", "This method is used to retrieve the calendar associated\nwith a task. If no calendar is associated with a task, this method\nreturns null.\n\n@param task MSPDI task\n@return calendar instance", "performs an INSERT operation against RDBMS.\n@param obj The Object to be inserted as a row of the underlying table.\n@param cld ClassDescriptor providing mapping information.", "Returns the matrix's rank. Automatic selection of threshold\n\n@param A Matrix. Not modified.\n@return The rank of the decomposed matrix.", "Read all task relationships from a ConceptDraw PROJECT file.\n\n@param cdp ConceptDraw PROJECT file", "Returns the modules paths used on the command line.\n\n@return the paths separated by the {@link File#pathSeparator path separator}" ]
public static String retrieveVendorId() { if (MapboxTelemetry.applicationContext == null) { return updateVendorId(); } SharedPreferences sharedPreferences = obtainSharedPreferences(MapboxTelemetry.applicationContext); String mapboxVendorId = sharedPreferences.getString(MAPBOX_SHARED_PREFERENCE_KEY_VENDOR_ID, ""); if (TelemetryUtils.isEmpty(mapboxVendorId)) { mapboxVendorId = TelemetryUtils.updateVendorId(); } return mapboxVendorId; }
[ "Do not call this method outside of activity!!!" ]
[ "Attemps to delete all provided segments from a log and returns how many it was able to", "Creates a Bytes object by copying the data of the given ByteBuffer.\n\n@param bb Data will be read from this ByteBuffer in such a way that its position is not\nchanged.", "Sets the SCXML model with an InputStream\n\n@param inputFileStream the model input stream", "Encode a path segment, escaping characters not valid for a URL.\n\n<p>The following characters are not escaped:\n\n<ul>\n<li>{@code a..z, A..Z, 0..9}\n<li>{@code . - * _}\n</ul>\n\n<p>' ' (space) is encoded as '+'.\n\n<p>All other characters (including '/') are converted to the triplet \"%xy\" where \"xy\" is the\nhex representation of the character in UTF-8.\n\n@param component a string containing text to encode.\n@return a string with all invalid URL characters escaped.", "Sets the real offset.\n\n@param start the start\n@param end the end", "Computes the null space using QR decomposition. This is much faster than using SVD\n@param A (Input) Matrix\n@param totalSingular Number of singular values\n@return Null space", "When all the elements in a sorted set are inserted with the same score, in order to force lexicographical\nordering, this command returns all the elements in the sorted set with a value in the given range.\n@param lexRange\n@return the range of elements", "Stop finding waveforms for all active players.", "Use this API to disable clusterinstance of given name." ]
public void set_protocol(String protocol) throws nitro_exception { if (protocol == null || !(protocol.equalsIgnoreCase("http") ||protocol.equalsIgnoreCase("https"))) { throw new nitro_exception("error: protocol value " + protocol + " is not supported"); } this.protocol = protocol; }
[ "Sets the protocol.\n@param protocol The protocol to be set." ]
[ "Collect environment variables and system properties under with filter constrains", "Returns an Object array of all FK field values of the specified object.\nIf the specified object is an unmaterialized Proxy, it will be materialized\nto read the FK values.\n\n@throws MetadataException if an error occours while accessing ForeingKey values on obj", "domain.xml", "Invokes the observer method immediately passing the event.\n\n@param event The event to notify observer with", "File URLs whose protocol are in these list will be processed as jars\ncontaining classes\n\n@param fileProtocols\nComma separated list of file protocols that will be considered\nas jar files and scanned", "Function to serialize the given list of Vector clocks into a string. If\nsomething goes wrong, it returns an empty string.\n\n@param vectorClocks The Vector clock list to serialize\n@return The string (JSON) version of the specified Vector clock", "Build the default transformation description.\n\n@param discardPolicy the discard policy to use\n@param inherited whether the definition is inherited\n@param registry the attribute transformation rules for the resource\n@param discardedOperations the discarded operations\n@return the transformation description", "Scroll to the next page. To process the scrolling by pages LayoutScroller must be constructed\nwith a pageSize greater than zero.\n@return the new current item after the scrolling processed.", "Removes a design document using DesignDocument object from the database.\n\n@param designDocument the design document object to be removed\n@return {@link DesignDocument}" ]
public Map<String, String> getUploadParameters() { Map<String, String> parameters = new TreeMap<>(); String title = getTitle(); if (title != null) { parameters.put("title", title); } String description = getDescription(); if (description != null) { parameters.put("description", description); } Collection<String> tags = getTags(); if (tags != null) { parameters.put("tags", StringUtilities.join(tags, " ")); } if (isHidden() != null) { parameters.put("hidden", isHidden().booleanValue() ? "1" : "0"); } if (getSafetyLevel() != null) { parameters.put("safety_level", getSafetyLevel()); } if (getContentType() != null) { parameters.put("content_type", getContentType()); } if (getPhotoId() != null) { parameters.put("photo_id", getPhotoId()); } parameters.put("is_public", isPublicFlag() ? "1" : "0"); parameters.put("is_family", isFamilyFlag() ? "1" : "0"); parameters.put("is_friend", isFriendFlag() ? "1" : "0"); parameters.put("async", isAsync() ? "1" : "0"); return parameters; }
[ "Get the upload parameters.\n@return" ]
[ "Use this API to unset the properties of clusterinstance resources.\nProperties that need to be unset are specified in args array.", "Remove a part of a CharSequence. This replaces the first occurrence\nof the pattern within self with '' and returns the result.\n\n@param self a String\n@param pattern a Pattern representing the part to remove\n@return a String minus the part to be removed\n@since 2.2.0", "Load the given configuration file.", "Use this API to fetch all the responderparam resources that are configured on netscaler.", "Retrieves the monthly or yearly relative day of the week.\n\n@return day of the week", "Creates a Bytes object by copying the data of the CharSequence and encoding it using UTF-8.", "Extracts the last revision id from the JSON response returned\nby the API after an edit\n\n@param response\nthe response as returned by Mediawiki\n@return\nthe new revision id of the edited entity\n@throws JsonMappingException", "Gets the URL of the first service that have been created during the current session.\n\n@return URL of the first service.", "get all parts of module name apart from first" ]
public static byte[] getDocumentToByteArray(Document dom) { try { TransformerFactory tFactory = TransformerFactory.newInstance(); Transformer transformer = tFactory.newTransformer(); transformer.setOutputProperty(OutputKeys.INDENT, "yes"); transformer .setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "no"); transformer.setOutputProperty(OutputKeys.METHOD, "html"); // TODO should be fixed to read doctype declaration transformer .setOutputProperty( OutputKeys.DOCTYPE_PUBLIC, "-//W3C//DTD XHTML 1.0 Strict//EN\" " + "\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"); DOMSource source = new DOMSource(dom); ByteArrayOutputStream out = new ByteArrayOutputStream(); Result result = new StreamResult(out); transformer.transform(source, result); return out.toByteArray(); } catch (TransformerException e) { LOGGER.error("Error while converting the document to a byte array", e); } return null; }
[ "Serialize the Document object.\n\n@param dom the document to serialize\n@return the serialized dom String" ]
[ "Runs the print.\n\n@param args the cli arguments\n@throws Exception", "Returns the configuration value with the specified name.", "Adds a classpath source which contains the given resource.\n\nTODO: [GH-213] this is extremely ugly; separate the code required to run on the\nforked JVM into an isolated bundle and either create it on-demand (in temp.\nfiles location?) or locate it in classpath somehow (in a portable way).", "Check that all nodes in the new cluster have a corresponding entry in\nstoreRepository and innerStores. add a NodeStore if not present, is\nneeded as with rebalancing we can add new nodes on the fly.", "Read activity code types and values.\n\n@param types activity code type data\n@param typeValues activity code value data\n@param assignments activity code task assignments", "Method to read our client's plain text\n\n@param file_name\n@return the filereader to translate client's plain text into our files\n@throws BeastException\nif any problem is found whit the file", "Adds each required length, ensuring it isn't negative.\n\n@param requiredLengths\none or more required lengths\n@throws IllegalArgumentException\nif a supplied length is negative", "Creates multiple aliases at once.", "Use this API to delete nssimpleacl." ]
public static base_response unset(nitro_service client, ipv6 resource, String[] args) throws Exception{ ipv6 unsetresource = new ipv6(); return unsetresource.unset_resource(client,args); }
[ "Use this API to unset the properties of ipv6 resource.\nProperties that need to be unset are specified in args array." ]
[ "returns all methods not in the group\n\n@param groupId Id of group\n@return List of Methods for a group\n@throws Exception exception", "Stops the HTTP service gracefully and release all resources.\n\n@param quietPeriod the quiet period as described in the documentation of {@link EventExecutorGroup}\n@param timeout the maximum amount of time to wait until the executor is\n{@linkplain EventExecutorGroup#shutdown()}\nregardless if a task was submitted during the quiet period\n@param unit the unit of {@code quietPeriod} and {@code timeout}\n@throws Exception if there is exception raised during shutdown.", "Creates a Bytes object by copying the data of the given ByteBuffer.\n\n@param bb Data will be read from this ByteBuffer in such a way that its position is not\nchanged.", "Construct new root step. Used for inspect problems with Allure lifecycle\n\n@return new root step marked as broken", "Check whether vector addition works. This is pure Java code and should work.", "Return SELECT clause for object existence call", "Add a '&lt;' clause so the column must be less-than the value.", "Use this API to update Interface.", "Patch provided by Avril Kotzen ([email protected])\nDB2 handles TINYINT (for mapping a byte)." ]
private void writePropertyData() { try (PrintStream out = new PrintStream(openResultFileOuputStream( resultDirectory, "properties.json"))) { out.println("{"); int count = 0; for (Entry<Integer, PropertyRecord> propertyEntry : this.propertyRecords .entrySet()) { if (count > 0) { out.println(","); } out.print("\"" + propertyEntry.getKey() + "\":"); mapper.writeValue(out, propertyEntry.getValue()); count++; } out.println("\n}"); System.out.println(" Serialized information for " + count + " properties."); } catch (IOException e) { e.printStackTrace(); } }
[ "Writes all data that was collected about properties to a json file." ]
[ "Gets the Square Euclidean distance between two points.\n\n@param x A point in space.\n@param y A point in space.\n@return The Square Euclidean distance between x and y.", "Submit a command to the server.\n\n@param command The CLI command\n@return The DMR response as a ModelNode\n@throws CommandFormatException\n@throws IOException", "Take a string and make it an iterable ContentStream", "Convert an Object to a Timestamp.", "Returns the screen height in pixels\n\n@param context is the context to get the resources\n@return the screen height in pixels", "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 an Enumeration of PrimaryKey Objects for objects of class DataClass.\nThe Elements returned come from a SELECT ... WHERE Statement\nthat is defined by the fields and their coresponding values of listFields\nand listValues.\nUseful for EJB Finder Methods...\n@param primaryKeyClass the pk class for the searched objects\n@param query the query", "Heat Equation Boundary Conditions", "Use this API to add nsip6 resources." ]
public InsertIntoTable addRowsFrom(File file, FileParser fileParser) { builder.addRowsFrom(file, fileParser); return this; }
[ "Adds all rows from the file specified, using the provided parser.\n\n@param file File to read the data from.\n@param fileParser Parser to be used to parse the file.\n@return {@code this}" ]
[ "Retrieve and validate store name from the REST request.\n\n@return true if valid, false otherwise", "Searches the type and its sub types for the nearest ojb-persistent type and returns its name.\n\n@param type The type to search\n@return The qualified name of the found type or <code>null</code> if no type has been found", "Tests whether the given string is the name of a java.lang type.", "Calculate UserInfo strings.", "Generates the cache key for Online links.\n@param cms the current CmsObject\n@param targetSiteRoot the target site root\n@param detailPagePart the detail page part\n@param absoluteLink the absolute (site-relative) link to the resource\n@return the cache key", "Patch provided by Avril Kotzen ([email protected])\nDB2 handles TINYINT (for mapping a byte).", "Returns the list of the configured sort options, or the empty list if no sort options are configured.\n@return The list of the configured sort options, or the empty list if no sort options are configured.", "Create a Renderer getting a copy from the prototypes collection.\n\n@param content to render.\n@param parent used to inflate the view.\n@return a new renderer.", "SetLoop will either set the GVRNodeAnimation's Repeat Mode to REPEATED if loop is true.\nor it will set the GVRNodeAnimation's Repeat Mode to ONCE if loop is false\nif loop is set to TRUE, when it was previously FALSE, then start the Animation.\n@param doLoop\n@param gvrContext" ]
public static int secondsDiff(Date earlierDate, Date laterDate) { if (earlierDate == null || laterDate == null) { return 0; } return (int) ((laterDate.getTime() / SECOND_MILLIS) - (earlierDate.getTime() / SECOND_MILLIS)); }
[ "Get the seconds difference" ]
[ "Use this API to fetch nd6ravariables resources of given names .", "Sets a listener for user actions within the SearchView.\n\n@param listener the listener object that receives callbacks when the user performs\nactions in the SearchView such as clicking on buttons or typing a query.", "Unregister the mbean with the given name\n\n@param server The server to unregister from\n@param name The name of the mbean to unregister", "Gets the current instance of plugin manager\n\n@return PluginManager", "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", "Create and return a new Violation for this rule and the specified values\n@param lineNumber - the line number for the violation; may be null\n@param sourceLine - the source line for the violation; may be null\n@param message - the message for the violation; may be null\n@return a new Violation object", "Synchronize the required files to a slave HC from the master DC if this is required.\n@param fileRepository the HostFileRepository of the HC.\n@param contentRepository the ContentRepository of the HC.\n@param backup inidcates if this is a DC backup HC.\n@param oldHash the hash of the deployment to be replaced.\n@return true if the content should be pulled by the slave HC - false otherwise.", "Get the information for a specified photoset.\n\nThis method does not require authentication.\n\n@param photosetId\nThe photoset ID\n@return The Photoset\n@throws FlickrException", "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." ]
public Integer getOverrideIdForMethod(String className, String methodName) { Integer overrideId = null; PreparedStatement query = null; ResultSet results = null; try (Connection sqlConnection = sqlService.getConnection()) { query = sqlConnection.prepareStatement( "SELECT * FROM " + Constants.DB_TABLE_OVERRIDE + " WHERE " + Constants.OVERRIDE_CLASS_NAME + " = ?" + " AND " + Constants.OVERRIDE_METHOD_NAME + " = ?" ); query.setString(1, className); query.setString(2, methodName); results = query.executeQuery(); if (results.next()) { overrideId = results.getInt(Constants.GENERIC_ID); } } catch (SQLException e) { e.printStackTrace(); return null; } finally { try { if (results != null) { results.close(); } } catch (Exception e) { } try { if (query != null) { query.close(); } } catch (Exception e) { } } return overrideId; }
[ "Gets an overrideID for a class name, method name\n\n@param className name of class\n@param methodName name of method\n@return override ID of method" ]
[ "Gets the Hamming distance between two strings.\n\n@param first First string.\n@param second Second string.\n@return The Hamming distance between p and q.", "Post the specified photo to a blog.\n\n@param photo\nThe photo metadata\n@param blogId\nThe blog ID\n@throws FlickrException", "Use this API to update nslimitselector resources.", "Check if we still need more nodes from the given zone and reduce the\nzoneReplicationFactor count accordingly.\n\n@param requiredRepFactor\n@param zoneId\n@return", "Reads characters until the 'end' character is encountered.\n\n@param out\nThe StringBuilder to write to.\n@param in\nThe Input String.\n@param start\nStarting position.\n@param end\nEnd characters.\n@return The new position or -1 if no 'end' char was found.", "Set the map attribute.\n\n@param name the attribute name\n@param attribute the attribute", "Private function to allow looking for the field recursively up the superclasses.\n\n@param clazz\n@return", "A connection to the database. Should be short-lived. No transaction active by default.\n\n@return a new open connection.", "Read all configuration files.\n@return the list with all available configurations" ]
public static snmpalarm[] get(nitro_service service) throws Exception{ snmpalarm obj = new snmpalarm(); snmpalarm[] response = (snmpalarm[])obj.get_resources(service); return response; }
[ "Use this API to fetch all the snmpalarm resources that are configured on netscaler." ]
[ "Return true if the class name is associated to an hidden class or matches a hide expression", "Extract phrases from Korean input text\n\n@param tokens Korean tokens (output of tokenize(CharSequence text)).\n@return List of phrase CharSequences.", "Finish the work of building and sending a protocol packet.\n\n@param kind the type of packet to create and send\n@param payload the content which will follow our device name in the packet\n@param destination where the packet should be sent\n@param port the port to which the packet should be sent\n\n@throws IOException if there is a problem sending the packet", "Writes batch of data to the source\n@param batch\n@throws InterruptedException", "Utility method to remove ampersands embedded in names.\n\n@param name name text\n@return name text without embedded ampersands", "Retrieves the cost rate table entry active on a given date.\n\n@param date target date\n@return cost rate table entry", "Formats an IPTC string for this reference using information obtained from\nSubject Reference System.\n\n@param srs\nreference subject reference system\n@return IPTC formatted reference", "Retrieve timephased baseline work. 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", "Use this API to Shutdown shutdown." ]
public void fireCalendarWrittenEvent(ProjectCalendar calendar) { if (m_projectListeners != null) { for (ProjectListener listener : m_projectListeners) { listener.calendarWritten(calendar); } } }
[ "This method is called to alert project listeners to the fact that\na calendar has been written to a project file.\n\n@param calendar calendar instance" ]
[ "Checks if the given AnnotatedType is sensible, otherwise provides warnings.", "Obtains a local date in International Fixed calendar system from the\nproleptic-year, month-of-year and day-of-month fields.\n\n@param prolepticYear the proleptic-year\n@param month the month-of-year\n@param dayOfMonth the day-of-month\n@return the International Fixed local date, not null\n@throws DateTimeException if unable to create the date", "Add a calendar node.\n\n@param parentNode parent node\n@param calendar calendar", "Disables all the overrides for a specific profile\n\n@param model\n@param profileID\n@param clientUUID\n@return", "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", "Stops the currently running animation, if any.\n@see GVRAvatar#start(String)\n@see GVRAnimationEngine#stop(GVRAnimation)", "Checks whether the specified event name is restricted. If it is,\nthen create a pending error, and abort.\n\n@param name The event name\n@return Boolean indication whether the event name is restricted", "Add a row to the table if it does not already exist\n\n@param cells String...", "Emit a string event with parameters and force all listener to be called synchronously.\n\n@param event\nthe target event\n@param args\nthe arguments passed in\n@see #emit(String, Object...)" ]
public AT_Row setPaddingRight(int paddingRight) { if(this.hasCells()){ for(AT_Cell cell : this.getCells()){ cell.getContext().setPaddingRight(paddingRight); } } return this; }
[ "Sets the right padding for all cells in the row.\n@param paddingRight new padding, ignored if smaller than 0\n@return this to allow chaining" ]
[ "Retrieves the constructor that is used by OJB to create instances of the given collection proxy\nclass.\n\n@param proxyClass The proxy class\n@param baseType The required base type of the proxy class\n@param typeDesc The type of collection proxy\n@return The constructor", "Increases the internal array's length by the specified amount. Previous values are preserved.\nThe length value is not modified since this does not change the 'meaning' of the array, just\nincreases the amount of data which can be stored in it.\n\nthis.data = new data_type[ data.length + amount ]\n\n\n@param amount Number of elements added to the internal array's length", "Try to reconnect to a started server.", "Convert this object to a json object.", "Set the configuration property.\n\n@param key\n@param value\n@return self\n@see #ARCHIVE_ISOLATION_SYSTEM_PROPERTY\n@see #SHUTDOWN_HOOK_SYSTEM_PROPERTY\n@see #DEV_MODE_SYSTEM_PROPERTY\n@see ConfigurationKey", "Clear the connection that was previously saved.\n\n@return True if the connection argument had been saved.", "Process a SQLite database PP file.\n\n@param inputStream file input stream\n@return ProjectFile instance", "Convert any number class to array of integer.\n\n@param <T> Type.\n@param array Array.\n@return Integer array.", "Returns the index of the segment containing the first byte outside the network prefix.\nWhen networkPrefixLength is null, or it matches or exceeds the bit length, returns the segment count.\n\n@param networkPrefixLength\n@param byteLength\n@return" ]
protected String classOf(List<IN> lineInfos, int pos) { Datum<String, String> d = makeDatum(lineInfos, pos, featureFactory); return classifier.classOf(d); }
[ "Returns the most likely class for the word at the given position." ]
[ "1.5 and on, 2.0 and on, 3.0 and on.", "Invokes a function defined in the script.\n\n@param funcName\nThe function name.\n@param params\nThe parameter array.\n@return\nA boolean value representing whether the function is\nexecuted correctly. If the function cannot be found, or\nparameters don't match, {@code false} is returned.", "this method is called from the event methods", "Provisions a new user in an enterprise with additional user information.\n@param api the API connection to be used by the created user.\n@param login the email address the user will use to login.\n@param name the name of the user.\n@param params additional user information.\n@return the created user's info.", "Reads Netscape extension to obtain iteration count.", "To get all the textual content in the dom\n\n@param document\n@param individualTokens : default True : when set to true, each text node from dom is used to build the\ntext content : when set to false, the text content of whole is obtained at once.\n@return", "Returns the counters with keys as the first key and count as the\ntotal count of the inner counter for that key\n\n@return counter of type K1", "Load the given class using the default constructor\n\n@param className The name of the class\n@return The class object", "Obtain the destination hostname for a source host\n\n@param hostName\n@return" ]
BsonDocument getNextVersion() { if (!this.hasVersion() || this.getVersionDoc() == null) { return getFreshVersionDocument(); } final BsonDocument nextVersion = BsonUtils.copyOfDocument(this.getVersionDoc()); nextVersion.put( Fields.VERSION_COUNTER_FIELD, new BsonInt64(this.getVersion().getVersionCounter() + 1)); return nextVersion; }
[ "Given a DocumentVersionInfo, returns a BSON document representing the next version. This means\nand incremented version count for a non-empty version, or a fresh version document for an\nempty version.\n@return a BsonDocument representing a synchronization version" ]
[ "Use this API to unset the properties of onlinkipv6prefix resource.\nProperties that need to be unset are specified in args array.", "Get a collection of tags used by the specified user.\n\n<p>\nThis method does not require authentication.\n</p>\n\n@param userId\nThe User ID\n@return The User object\n@throws FlickrException", "Reloads the synchronization config. This wipes all in-memory synchronization settings.", "Read arguments from a file. Newline delimited, UTF-8 encoded. No fanciness to\navoid dependencies.", "Resolves the base directory. If the system property is set that value will be used. Otherwise the path is\nresolved from the home directory.\n\n@param name the system property name\n@param dirName the directory name relative to the base directory\n\n@return the resolved base directory", "Checks if a Zip is valid navigating through the entries\n\n@param file File to validate\n@throws IOException I/O Error", "Read the top level tasks from GanttProject.\n\n@param gpProject GanttProject project", "Use this API to add snmpmanager resources.", "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" ]
private FieldDescriptor getFldFromReference(TableAlias aTableAlias, ObjectReferenceDescriptor anOrd) { FieldDescriptor fld = null; if (aTableAlias == getRoot()) { // no path expression FieldDescriptor[] fk = anOrd.getForeignKeyFieldDescriptors(aTableAlias.cld); if (fk.length > 0) { fld = fk[0]; } } else { // attribute with path expression /** * MBAIRD * potentially people are referring to objects, not to the object's primary key, * and then we need to take the primary key attribute of the referenced object * to help them out. */ ClassDescriptor cld = aTableAlias.cld.getRepository().getDescriptorFor(anOrd.getItemClass()); if (cld != null) { fld = aTableAlias.cld.getFieldDescriptorByName(cld.getPkFields()[0].getPersistentField().getName()); } } return fld; }
[ "Get FieldDescriptor from Reference" ]
[ "Create an object of the given type using a constructor that matches the\nsupplied arguments and invoke the setters with the supplied variables.\n\n@param <T> the object type\n@param clazz\nthe type to create\n@param args\nthe arguments to the constructor\n@param vars\nthe named arguments for setters\n@return a new object of the given type, initialized with the given\narguments\n@throws NoSuchConstructorException\nif there is not a constructor that matches the given\narguments\n@throws AmbiguousConstructorException\nif there is more than one constructor that matches the given\narguments\n@throws ReflectiveOperationException\nif any of the reflective operations throw an exception", "Unregister the mbean with the given name from the platform mbean server\n\n@param name The name of the mbean to unregister", "Reads the configuration of a range facet.\n@param pathPrefix The XML Path that leads to the range facet configuration, or <code>null</code> if the XML was not correctly structured.\n@return The read configuration, or <code>null</code> if the XML was not correctly structured.", "Executes a API query action to get a new token.\nThe method only executes the action, without doing any\nchecks first. If errors occur, they are logged and null is returned.\n\n@param tokenType The kind of token to retrieve like \"csrf\" or \"login\"\n@return newly retrieved token or null if no token was retrieved", "This is the main entry point used to convert the internal representation\nof timephased cost into an external form which can\nbe displayed to the user.\n\n@param projectCalendar calendar used by the resource assignment\n@param cost timephased resource assignment data\n@param rangeUnits timescale units\n@param dateList timescale date ranges\n@return list of durations, one per timescale date range", "Get a View that displays the data at the specified\nposition in the data set.\n\n@param position Position of the item whose data we want\n@param convertView View to recycle, if not null\n@param parent ViewGroup containing the returned View", "Send a lifecycle announcement to all registered listeners.\n\n@param logger the logger to use, so the log entry shows as belonging to the proper subclass.\n@param starting will be {@code true} if the DeviceFinder is starting, {@code false} if it is stopping.", "Converts the bytes that make up an internet address into the corresponding integer value to make\nit easier to perform bit-masking operations on them.\n\n@param address an address whose integer equivalent is desired\n\n@return the integer corresponding to that address", "This filter adds rounded corners to the image using the specified color as the background.\n\n@param radiusInner amount of pixels to use as radius.\n@param radiusOuter specifies the second value for the ellipse used for the radius. Use 0 for\nno value.\n@param color fill color for clipped region." ]
public static void addService(final ServiceTarget serviceTarget, final Bootstrap.Configuration configuration, final ControlledProcessState processState, final BootstrapListener bootstrapListener, final RunningModeControl runningModeControl, final AbstractVaultReader vaultReader, final ManagedAuditLogger auditLogger, final DelegatingConfigurableAuthorizer authorizer, final ManagementSecurityIdentitySupplier securityIdentitySupplier, final SuspendController suspendController) { // Install Executor services final ThreadGroup threadGroup = new ThreadGroup("ServerService ThreadGroup"); final String namePattern = "ServerService Thread Pool -- %t"; final ThreadFactory threadFactory = doPrivileged(new PrivilegedAction<ThreadFactory>() { public ThreadFactory run() { return new JBossThreadFactory(threadGroup, Boolean.FALSE, null, namePattern, null, null); } }); // TODO determine why QueuelessThreadPoolService makes boot take > 35 secs // final QueuelessThreadPoolService serverExecutorService = new QueuelessThreadPoolService(Integer.MAX_VALUE, false, new TimeSpec(TimeUnit.SECONDS, 5)); // serverExecutorService.getThreadFactoryInjector().inject(threadFactory); final boolean forDomain = ProcessType.DOMAIN_SERVER == getProcessType(configuration.getServerEnvironment()); final ServerExecutorService serverExecutorService = new ServerExecutorService(threadFactory, forDomain); serviceTarget.addService(MANAGEMENT_EXECUTOR, serverExecutorService) .addAliases(Services.JBOSS_SERVER_EXECUTOR, ManagementRemotingServices.SHUTDOWN_EXECUTOR_NAME) // Use this executor for mgmt shutdown for now .install(); final ServerScheduledExecutorService serverScheduledExecutorService = new ServerScheduledExecutorService(threadFactory); serviceTarget.addService(JBOSS_SERVER_SCHEDULED_EXECUTOR, serverScheduledExecutorService) .addAliases(JBOSS_SERVER_SCHEDULED_EXECUTOR) .addDependency(MANAGEMENT_EXECUTOR, ExecutorService.class, serverScheduledExecutorService.executorInjector) .install(); final CapabilityRegistry capabilityRegistry = configuration.getCapabilityRegistry(); ServerService service = new ServerService(configuration, processState, null, bootstrapListener, new ServerDelegatingResourceDefinition(), runningModeControl, vaultReader, auditLogger, authorizer, securityIdentitySupplier, capabilityRegistry, suspendController); ExternalManagementRequestExecutor.install(serviceTarget, threadGroup, EXECUTOR_CAPABILITY.getCapabilityServiceName(), service.getStabilityMonitor()); ServiceBuilder<?> serviceBuilder = serviceTarget.addService(Services.JBOSS_SERVER_CONTROLLER, service); serviceBuilder.addDependency(DeploymentMountProvider.SERVICE_NAME,DeploymentMountProvider.class, service.injectedDeploymentRepository); serviceBuilder.addDependency(ContentRepository.SERVICE_NAME, ContentRepository.class, service.injectedContentRepository); serviceBuilder.addDependency(Services.JBOSS_SERVICE_MODULE_LOADER, ServiceModuleLoader.class, service.injectedModuleLoader); serviceBuilder.addDependency(Services.JBOSS_EXTERNAL_MODULE_SERVICE, ExternalModuleService.class, service.injectedExternalModuleService); serviceBuilder.addDependency(PATH_MANAGER_CAPABILITY.getCapabilityServiceName(), PathManager.class, service.injectedPathManagerService); if (configuration.getServerEnvironment().isAllowModelControllerExecutor()) { serviceBuilder.addDependency(MANAGEMENT_EXECUTOR, ExecutorService.class, service.getExecutorServiceInjector()); } if (configuration.getServerEnvironment().getLaunchType() == ServerEnvironment.LaunchType.DOMAIN) { serviceBuilder.addDependency(HostControllerConnectionService.SERVICE_NAME, ControllerInstabilityListener.class, service.getContainerInstabilityInjector()); } serviceBuilder.install(); }
[ "Add this service to the given service target.\n@param serviceTarget the service target\n@param configuration the bootstrap configuration" ]
[ "Return the text content of the document. It does not containing trailing spaces and asterisks\nat the start of the line.", "a small helper to get the color from the colorHolder\n\n@param ctx\n@return", "Use this API to update gslbservice resources.", "This method lists all tasks defined in the file in a hierarchical\nformat, reflecting the parent-child relationships between them.\n\n@param file MPX file", "Checks if class is on class path\n@param className of the class to check.\n@return true if class in on class path, false otherwise.", "Creates a Bytes object by copying the value of the given String", "Updates the terms and statements of the item document identified by the\ngiven item id. The updates are computed with respect to the current data\nfound online, making sure that no redundant deletions or duplicate insertions\nhappen. The references of duplicate statements will be merged. The labels\nand aliases in a given language are kept distinct.\n\n@param itemIdValue\nid of the document to be updated\n@param addLabels\nlabels to be set on the item. They will overwrite existing values\nin the same language.\n@param addDescriptions\ndescription to be set on the item. They will overwrite existing values\nin the same language.\n@param addAliases\naliases to be added. Existing aliases will be kept.\n@param deleteAliases\naliases to be deleted.\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 any IO errors, such as missing network connection", "Read project calendars.", "Adds all items from the iterable to the Collection.\n\n@param self the collection\n@param items the items to add\n@return true if the collection changed" ]
public void prepareFilter( float transition ) { try { method.invoke( filter, new Object[] { new Float( transition ) } ); } catch ( Exception e ) { throw new IllegalArgumentException("Error setting value for property: "+property); } }
[ "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" ]
[ "Returns a list of metadata property paths.\n@return the list of metdata property paths.", "get the TypeSignature corresponding to given class with given type\narguments\n\n@param clazz\n@param typeArgs\n@return", "Set the gamma levels.\n@param rGamma the gamma level for the red channel\n@param gGamma the gamma level for the blue channel\n@param bGamma the gamma level for the green channel\n@see #getGamma", "Runs calls in a background thread so that the results will actually be asynchronous.\n\n@see com.google.appengine.tools.cloudstorage.RawGcsService#continueObjectCreationAsync(\ncom.google.appengine.tools.cloudstorage.RawGcsService.RawGcsCreationToken,\njava.nio.ByteBuffer, long)", "Gets a SerialMessage with the MULTI INSTANCE GET command.\nReturns the number of instances for this command class.\n@param the command class to return the number of instances for.\n@return the serial message.", "Use this API to fetch authenticationvserver_auditnslogpolicy_binding resources of given name .", "Log the data for a single column.\n\n@param startIndex offset into buffer\n@param length length", "Removes a corporate groupId from an Organisation\n\n@param organizationId String\n@param corporateGroupId String", "This method extracts data for a single resource from a GanttProject file.\n\n@param gpResource resource data" ]
public void prettyPrint(StringBuffer sb, int indent) { sb.append(Log.getSpaces(indent)); sb.append(getClass().getSimpleName()); sb.append(" [name="); sb.append(this.getName()); sb.append("]"); sb.append(System.lineSeparator()); GVRRenderData rdata = getRenderData(); GVRTransform trans = getTransform(); if (rdata == null) { sb.append(Log.getSpaces(indent + 2)); sb.append("RenderData: null"); sb.append(System.lineSeparator()); } else { rdata.prettyPrint(sb, indent + 2); } sb.append(Log.getSpaces(indent + 2)); sb.append("Transform: "); sb.append(trans); sb.append(System.lineSeparator()); // dump its children for (GVRSceneObject child : getChildren()) { child.prettyPrint(sb, indent + 2); } }
[ "Generate debug dump of the tree from the scene object.\nIt should include a newline character at the end.\n\n@param sb the {@code StringBuffer} to dump the object.\n@param indent indentation level as number of spaces." ]
[ "Remove a list of stores from the session\n\nFirst commit all entries for these stores and then cleanup resources\n\n@param storeNameToRemove List of stores to be removed from the current\nstreaming session", "Return true if the processor of the node has previously been executed.\n\n@param processorGraphNode the node to test.", "Access the customInfo of a message using this accessor. The CustomInfo\nmap will be automatically created and stored in the event if it is not yet present\n\n@param message\n@return", "Send a packet to the target player telling it to load the specified track from the specified source player.\n\n@param targetPlayer the device number of the player that you want to have load a track\n@param rekordboxId the identifier of a track within the source player's rekordbox database\n@param sourcePlayer the device number of the player from which the track should be loaded\n@param sourceSlot the media slot from which the track should be loaded\n@param sourceType the type of track to be loaded\n\n@throws IOException if there is a problem sending the command\n@throws IllegalStateException if the {@code VirtualCdj} is not active or the target device cannot be found", "This method returns the value of the product using a Black-Scholes model for the swap rate with the Hunt-Kennedy convexity adjustment.\nThe model is determined by a discount factor curve and a swap rate volatility.\n\n@param forwardCurve The forward curve from which the swap rate is calculated. The discount curve, associated with this forward curve is used for discounting this option.\n@param swaprateVolatility The volatility of the log-swaprate.\n@return Value of this product", "Retrieve list of assignment extended attributes.\n\n@return list of extended attributes", "Set the repeat count of an override at ordinal index\n\n@param pathName Path name\n@param methodName Fully qualified method name\n@param ordinal 1-based index of the override within the overrides of type methodName\n@param repeatCount new repeat count to set\n@return true if success, false otherwise", "Convert an integer value into a TimeUnit instance.\n\n@param value time unit value\n@return TimeUnit instance", "A safe wrapper to destroy the given resource request." ]
public static List<String> getParameterNames(MethodNode node) { ArrayList<String> result = new ArrayList<String>(); if (node.getParameters() != null) { for (Parameter parameter : node.getParameters()) { result.add(parameter.getName()); } } return result; }
[ "Gets the parameter names of a method node.\n@param node\nthe node to search parameter names on\n@return\nargument names, never null" ]
[ "Binding view holder with payloads is used to handle partial changes in item.", "Use this API to fetch authenticationvserver_authenticationlocalpolicy_binding resources of given name .", "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.", "Carry out any post-processing required to tidy up\nthe data read from the database.", "Get the Attribute metadata for an MBean by name.\n@return the {@link Map} of {@link String} attribute names to {@link MBeanAttributeInfo} values.", "Use this API to enable Interface of given name.", "Calculate the starting content offset based on the layout orientation and Gravity\n@param totalSize total size occupied by the content", "Called to update the cached formats when something changes.", "Configure high fps settings in the camera for VR mode\n\n@param fpsMode integer indicating the desired fps: 0 means 30 fps, 1 means 60\nfps, and 2 means 120 fps. Any other value is invalid.\n@return A boolean indicating the status of the method call. It may be false due\nto multiple reasons including: 1) supplying invalid fpsMode as the input\nparameter, 2) VR mode not supported." ]
public void originalClass(String template, Properties attributes) throws XDocletException { pushCurrentClass(_curClassDef.getOriginalClass()); generate(template); popCurrentClass(); }
[ "Processes the original class rather than the current class definition.\n\n@param template The template\n@param attributes The attributes of the tag\n@exception XDocletException if an error occurs\[email protected] type=\"block\"" ]
[ "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.", "Parses an item id\n\n@param id\nthe identifier of the entity, such as \"Q42\"\n@param siteIri\nthe siteIRI that this value refers to\n@throws IllegalArgumentException\nif the id is invalid", "Creates a solver for symmetric positive definite matrices.\n\n@return A new solver for symmetric positive definite matrices.", "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.", "Use this API to fetch appfwpolicy_csvserver_binding resources of given name .", "Returns a row matrix which contains all the elements in A which are flagged as true in 'marked'\n\n@param A Input matrix\n@param marked Input matrix marking elements in A\n@param output Storage for output row vector. Can be null. Will be reshaped.\n@return Row vector with marked elements", "Deletes the metadata on this folder associated with a specified scope and template.\n\n@param templateName the metadata template type name.\n@param scope the scope of the template (usually \"global\" or \"enterprise\").", "Read the project data and return a ProjectFile instance.\n\n@return ProjectFile instance", "remove drag support from the given Component.\n@param c the Component to remove" ]
public void setName(int pathId, String pathName) { PreparedStatement statement = null; try (Connection sqlConnection = sqlService.getConnection()) { statement = sqlConnection.prepareStatement( "UPDATE " + Constants.DB_TABLE_PATH + " SET " + Constants.PATH_PROFILE_PATHNAME + " = ?" + " WHERE " + Constants.GENERIC_ID + " = ?" ); statement.setString(1, pathName); statement.setInt(2, pathId); statement.executeUpdate(); statement.close(); } catch (SQLException e) { e.printStackTrace(); } finally { try { if (statement != null) { statement.close(); } } catch (Exception e) { } } }
[ "Sets the path name for this ID\n\n@param pathId ID of path\n@param pathName Name of path" ]
[ "Creates a curator built using the given zookeeper connection string and timeout", "Helper method to Close all open socket connections and checkin back to\nthe pool\n\n@param storeNamesToCleanUp List of stores to be cleanedup from the current\nstreaming session", "Add utility routes the router\n\n@param router", "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", "Retrieve all Collection attributes of a given instance, and make all of the Proxy Collections\n\n@param newObj the instance to be loaded or refreshed\n@param cld the ClassDescriptor of the instance\n@param forced if set to true, loading is forced even if cld differs", "Passes the Socket's InputStream and OutputStream to the closure. The\nstreams will be closed after the closure returns, even if an exception\nis thrown.\n\n@param socket a Socket\n@param closure a Closure\n@return the value returned by the closure\n@throws IOException if an IOException occurs.\n@since 1.5.2", "Sets the position of the currency symbol.\n\n@param posn currency symbol position.", "Get the bean if it exists in the contexts.\n\n@return An instance of the bean\n@throws ContextNotActiveException if the context is not active\n@see javax.enterprise.context.spi.Context#get(BaseBean, boolean)", "Harvest a single value that was returned by a callable statement.\n\n@param obj the object that will receive the value that is harvested.\n@param callable the CallableStatement that contains the value to harvest\n@param fmd the FieldDescriptor that identifies the field where the\nharvested value will be stord.\n@param index the parameter index.\n\n@throws PersistenceBrokerSQLException if a problem occurs." ]
private static void parseTarget(ArrayList<Shape> shapes, JSONObject modelJSON, Shape current) throws JSONException { if (modelJSON.has("target")) { JSONObject targetObject = modelJSON.getJSONObject("target"); if (targetObject.has("resourceId")) { current.setTarget(getShapeWithId(targetObject.getString("resourceId"), shapes)); } } }
[ "parse the target resource and add it to the current shape\n@param shapes\n@param modelJSON\n@param current\n@throws org.json.JSONException" ]
[ "Keep track of this handle tied to which thread so that if the thread is terminated\nwe can reclaim our connection handle. We also\n@param c connection handle to track.", "Returns server group by ID\n\n@param id ID of server group\n@return ServerGroup\n@throws Exception exception", "Checks if the given String is null or contains only whitespaces.\nThe String is trimmed before the empty check.\n\n@param argument the String to check for null or emptiness\n@param argumentName the name of the argument to check.\nThis is used in the exception message.\n@return the String that was given as argument\n@throws IllegalArgumentException in case argument is null or empty", "Builds the mapping table.", "Add a partition to the node provided\n\n@param node The node to which we'll add the partition\n@param donatedPartition The partition to add\n@return The new node with the new partition", "Applies the mask to this address and then compares values with the given address\n\n@param mask\n@param other\n@return", "returns a sorted array of enum constants", "Checks whether a user account can be locked because of inactivity.\n\n@param cms the CMS context\n@param user the user to check\n@return true if the user may be locked after being inactive for too long", "This method writes a resource's availability table.\n\n@param xml MSPDI resource\n@param mpx MPXJ resource" ]
protected <T, A> ActiveOperation<T, A> getActiveOperation(final Integer id) { //noinspection unchecked return (ActiveOperation<T, A>) activeRequests.get(id); }
[ "Get the active operation.\n\n@param id the active operation id\n@return the active operation, {@code null} if if there is no registered operation" ]
[ "Creates the save and exit button UI Component.\n@return the save and exit button.", "Re-reads the given entity, refreshing any properties updated on the server-side during insert or update.", "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", "Return the inverse cumulative distribution function at x.\n\n@param x Argument\n@return Inverse cumulative distribution function at x.", "Add a polygon symbolizer definition to the rule.\n\n@param styleJson The old style.", "Get a property as a double or throw an exception.\n\n@param key the property name", "Sets the whole day flag.\n@param isWholeDay flag, indicating if the event lasts whole days.", "Notifies that multiple footer items are inserted.\n\n@param positionStart the position.\n@param itemCount the item count.", "Returns an array of the enabled endpoints as Integer IDs\n\n@param pathId ID of path\n@param clientUUID UUID of client\n@param filters If supplied, only endpoints ending with values in filters are returned\n@return Collection of endpoints\n@throws Exception exception" ]
private static boolean waitTillNoNotifications(Environment env, TableRange range) throws TableNotFoundException { boolean sawNotifications = false; long retryTime = MIN_SLEEP_MS; log.debug("Scanning tablet {} for notifications", range); long start = System.currentTimeMillis(); while (hasNotifications(env, range)) { sawNotifications = true; long sleepTime = Math.max(System.currentTimeMillis() - start, retryTime); log.debug("Tablet {} had notfications, will rescan in {}ms", range, sleepTime); UtilWaitThread.sleep(sleepTime); retryTime = Math.min(MAX_SLEEP_MS, (long) (retryTime * 1.5)); start = System.currentTimeMillis(); } return sawNotifications; }
[ "Wait until a range has no notifications.\n\n@return true if notifications were ever seen while waiting" ]
[ "Sets in-place the right child with the same first byte.\n\n@param b next byte of child suffix.\n@param child child node.", "Get the type created by selecting only a subset of properties from this\ntype. The type must be a map for this to work\n\n@param properties The properties to select\n@return The new type definition", "Find the channel in the animation that animates the named bone.\n@param boneName name of bone to animate.", "Add a custom query parameter to the _changes request. Useful for specifying extra parameters\nto a filter function for example.\n\n@param name the name of the query parameter\n@param value the value of the query parameter\n@return this Changes instance\n@since 2.5.0", "Finds the preferred provider for the given service. The preferred\nprovider is the last one added to the set of providers.\n\n@param serviceName\nThe fully qualified name of the service interface.\n@return\nThe last provider added for the service if any exists.\nOtherwise, it returns <tt>null</tt>.\n@throws IllegalArgumentException if serviceName is <tt>null</tt>", "Get the size of the painting area required to draw the scalebar with labels.\n\n@param scalebarParams Parameters for the scalebar.\n@param settings Parameters for rendering the scalebar.\n@param maxLabelSize The max. size of the labels.", "This method reads a six byte long from the input array.\n\n@param data the input array\n@param offset offset of integer data in the array\n@return integer value", "This is a convenience method provided to allow a day to be set\nas working or non-working, by using the day number to\nidentify the required day.\n\n@param day required day\n@param working flag indicating if the day is a working day", "Construct a Access Token from a Flickr Response.\n\n@param response" ]
protected <T extends Listener> Collection<T> copyList(Class<T> listenerClass, Stream<Object> listeners, int sizeHint) { if (sizeHint == 0) { return Collections.emptyList(); } return listeners .map(listenerClass::cast) .collect(Collectors.toCollection(() -> new ArrayList<>(sizeHint))); }
[ "Creates a collection from the given stream, casting each object to the\nprovided listener class. The returned collection must not necessarily be\nmutable.\n\n@param <T> Type of the listeners in the given list.\n@param listenerClass The class of the objects in the provided list.\n@param listeners The stream to obtain the listeners for the resulting\ncollection from.\n@param sizeHint Expected size of the input stream.\n@return A typed copy of the list." ]
[ "Removes a tag from the resource.\n@param key the key of the tag to remove\n@return the next stage of the definition/update", "Sorts the specified list itself into ascending order, according to the natural ordering of its elements.\n\n@param list\nthe list to be sorted. May not be <code>null</code>.\n@return the sorted list itself.\n@see Collections#sort(List)", "Adds a slash to a path if it doesn't end with a slash.\n\n@param folderName The path to append a possible slash.\n@return The new, correct path.", "Get the max extent as a envelop object.", "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.", "judge if an point in the area or not\n\n@param point\n@param area\n@param offsetRatio\n@return", "Use this API to update cacheselector.", "Executes a batch plan.\n\n@param batchId Used as the ID of the batch plan. This allows related\ntasks on client- & server-side to pretty print messages in a\nmanner that debugging can track specific batch plans across the\ncluster.\n@param batchPlan The batch plan...", "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" ]
int read(InputStream is, int contentLength) { if (is != null) { try { int capacity = (contentLength > 0) ? (contentLength + 4096) : 16384; ByteArrayOutputStream buffer = new ByteArrayOutputStream(capacity); int nRead; byte[] data = new byte[16384]; while ((nRead = is.read(data, 0, data.length)) != -1) { buffer.write(data, 0, nRead); } buffer.flush(); read(buffer.toByteArray()); } catch (IOException e) { Logger.d(TAG, "Error reading data from stream", e); } } else { status = STATUS_OPEN_ERROR; } try { if (is != null) { is.close(); } } catch (IOException e) { Logger.d(TAG, "Error closing stream", e); } return status; }
[ "Reads GIF image from stream.\n\n@param is containing GIF file.\n@return read status code (0 = no errors)." ]
[ "Counts the number of documents in the collection.\n\n@return a task containing the number of documents in the collection", "Gets the logger.\n\n@return Returns a Category", "Resets all override settings for the clientUUID and disables it\n\n@param profileId profile ID of the client\n@param clientUUID UUID of the client\n@throws Exception exception", "Returns a new List containing the given objects.", "Prints the data for a single class to the given stream. This will be a\nsingle line in CSV.\n\n@param out\nthe output to write to\n@param classRecord\nthe class record to write\n@param entityIdValue\nthe item id that this class record belongs to", "Stop announcing ourselves and listening for status updates.", "Read remarks from a Gantt Designer file.\n\n@param gantt Gantt Designer file", "Create a new server group for a profile\n\n@param model\n@param profileId\n@return\n@throws Exception", "Helper xml end tag writer\n\n@param value the output stream to use in writing" ]
public int evaluate(FieldContainer container) { // // First step - determine the list of criteria we are should use // List<GraphicalIndicatorCriteria> criteria; if (container instanceof Task) { Task task = (Task) container; if (NumberHelper.getInt(task.getUniqueID()) == 0) { if (m_projectSummaryInheritsFromSummaryRows == false) { criteria = m_projectSummaryCriteria; } else { if (m_summaryRowsInheritFromNonSummaryRows == false) { criteria = m_summaryRowCriteria; } else { criteria = m_nonSummaryRowCriteria; } } } else { if (task.getSummary() == true) { if (m_summaryRowsInheritFromNonSummaryRows == false) { criteria = m_summaryRowCriteria; } else { criteria = m_nonSummaryRowCriteria; } } else { criteria = m_nonSummaryRowCriteria; } } } else { // It is possible to have a resource summary row, but at the moment // I can't see how you can determine this. criteria = m_nonSummaryRowCriteria; } // // Now we have the criteria, evaluate each one until we get a result // int result = -1; for (GraphicalIndicatorCriteria gic : criteria) { result = gic.evaluate(container); if (result != -1) { break; } } // // If we still don't have a result at the end, return the // default value, which is 0 // if (result == -1) { result = 0; } return (result); }
[ "This method evaluates a if a graphical indicator should\nbe displayed, given a set of Task or Resource data. The\nmethod will return -1 if no indicator should be displayed.\n\n@param container Task or Resource instance\n@return indicator index" ]
[ "Calculates a column title using camel humps to separate words.\n@param _property the property descriptor.\n@return the column title for the given property.", "This method will be intercepted by the proxy if it is enabled to return the internal target.\n@return the target.", "Get a property as a double or defaultValue.\n\n@param key the property name\n@param defaultValue the default value", "add a FK column pointing to This Class", "Get the value for a single attribute on an MBean by name.\n@param attributeName the attribute name (can be URL-encoded).\n@return the value as a String.\n@throws JMException Java Management Exception\n@throws UnsupportedEncodingException if the encoding is not supported.", "We have obtained a beat grid for a device, so store it and alert any listeners.\n\n@param update the update which caused us to retrieve this beat grid\n@param beatGrid the beat grid which we retrieved", "Installs a path service.\n\n@param name the name to use for the service\n@param path the relative portion of the path\n@param possiblyAbsolute {@code true} if {@code path} may be an {@link #isAbsoluteUnixOrWindowsPath(String) absolute path}\nand should be {@link AbsolutePathService installed as such} if it is, with any\n{@code relativeTo} parameter ignored\n@param relativeTo the name of the path that {@code path} may be relative to\n@param serviceTarget the {@link ServiceTarget} to use to install the service\n@return the ServiceController for the path service", "Specify the Artifact for which the condition should search for.\n\n@param artifact\n@return", "Use this API to add nsip6." ]
public static RequiredConfigurationHolder populateHostResolutionContext(final HostInfo hostInfo, final Resource root, final ExtensionRegistry extensionRegistry) { final RequiredConfigurationHolder rc = new RequiredConfigurationHolder(); for (IgnoredNonAffectedServerGroupsUtil.ServerConfigInfo info : hostInfo.getServerConfigInfos()) { processServerConfig(root, rc, info, extensionRegistry); } return rc; }
[ "Process the host info and determine which configuration elements are required on the slave host.\n\n@param hostInfo the host info\n@param root the model root\n@param extensionRegistry the extension registry\n@return" ]
[ "look for zero after country code, and remove if present", "Sums up the square of each element in the matrix. This is equivalent to the\nFrobenius norm squared.\n\n@param m Matrix.\n@return Sum of elements squared.", "Helper function to return the minimum size of the index space to be passed to the reduction given the input and\noutput tensors", "Checks if user exists.\n\n@param userId the user id, which can be an email or the login.\n@return true, if user exists.", "Load the given metadata profile for the current thread.", "Use this API to disable snmpalarm resources of given names.", "Saves changes in properties file. It reads the property file into memory, modifies it and saves it back to the file.\n\n@throws IOException", "Log error information", "Throws an exception or logs a message\n\n@param message The message for the exception or the log message. Must be internationalized" ]
public PathElement getElement(int index) { final List<PathElement> list = pathAddressList; return list.get(index); }
[ "Gets the element at the given index.\n\n@param index the index\n@return the element\n\n@throws IndexOutOfBoundsException if the index is out of range (<tt>index &lt; 0 || index &gt;= size()</tt>)" ]
[ "Get the Roman Numeral of the current value\n@return", "Use this API to add dbdbprofile resources.", "This adds to the feature name the name of classes that are other than\nthe current class that are involved in the clique. In the CMM, these\nother classes become part of the conditioning feature, and only the\nclass of the current position is being predicted.\n\n@return A collection of features with extra class information put\ninto the feature name.", "Sets up Log4J to write log messages to the console. Low-priority messages\nare logged to stdout while high-priority messages go to stderr.", "Validates a space separated list of emails.\n\n@param emails Space separated list of emails\n@return {@link hudson.util.FormValidation.ok()} if valid or empty, error otherwise", "Use this API to fetch lbmonitor_binding resource of given name .", "Retrieves the registar linked to the bus.\nCreates a new registar is not present.\n\n@param bus\n@return", "Use this API to fetch all the lbroute resources that are configured on netscaler.", "Associate a type with the given resource model." ]
private String getCurrencyFormat(CurrencySymbolPosition position) { String result; switch (position) { case AFTER: { result = "1.1#"; break; } case AFTER_WITH_SPACE: { result = "1.1 #"; break; } case BEFORE_WITH_SPACE: { result = "# 1.1"; break; } default: case BEFORE: { result = "#1.1"; break; } } return result; }
[ "Generate a currency format.\n\n@param position currency symbol position\n@return currency format" ]
[ "Check whether error handling works. If it works, you should see an\nok, otherwise, you might see the actual error message and then\nthe program exits.", "Returns all accessible projects of the given organizational unit.\n\nThat is all projects which are owned by the current user or which are\naccessible for the group of the user.<p>\n\n@param cms the opencms context\n@param ouFqn the fully qualified name of the organizational unit to get projects for\n@param includeSubOus if all projects of sub-organizational units should be retrieved too\n\n@return all <code>{@link org.opencms.file.CmsProject}</code> objects in the organizational unit\n\n@throws CmsException if operation was not successful", "Sets the path of the edited file in the corresponding display.\n@param editedFilePath path of the edited file to set.", "Convert this object to a json object.", "Called when a ParentViewHolder has triggered a collapse for it's parent\n\n@param flatParentPosition the position of the parent that is calling to be collapsed", "static lifecycle callbacks", "Fill queue.\n\n@param item the item\n@param minStartPosition the min start position\n@param maxStartPosition the max start position\n@param minEndPosition the min end position\n@throws IOException Signals that an I/O exception has occurred.", "The method determines if the type can be resolved and if not, will try to guess the qualified name using the information from the imports.", "Return all methods for a list of groupIds\n\n@param groupIds array of group IDs\n@param filters array of filters to apply to method selection\n@return collection of Methods found\n@throws Exception exception" ]
public static boolean isVector(DMatrixSparseCSC a) { return (a.numCols == 1 && a.numRows > 1) || (a.numRows == 1 && a.numCols>1); }
[ "Returns true if the input is a vector\n@param a A matrix or vector\n@return true if it's a vector. Column or row." ]
[ "returns an Array with an Objects CURRENT locking VALUES , BRJ\n@throws PersistenceBrokerException if there is an erros accessing o field values", "Configures a worker pool for the converter.\n\n@param corePoolSize The core pool size of the worker pool.\n@param maximumPoolSize The maximum pool size of the worker pool.\n@param keepAliveTime The keep alive time of the worker pool.\n@param unit The time unit of the specified keep alive time.\n@return This builder instance.", "Update max min.\n\n@param n the n\n@param c the c", "Returns a count of in-window events.\n\n@return the the count of in-window events.", "Create the ResourceIgnoredTransformationRegistry when fetching missing content, only including relevant pieces\nto a server-config.\n\n@param rc the resolution context\n@param delegate the delegate ignored resource transformation registry for manually ignored resources\n@return", "read all objects of this iterator. objects will be placed in cache", "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.", "Reconnect to the HC.\n\n@return whether the server is still in sync\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" ]
public static base_responses add(nitro_service client, dnsview resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { dnsview addresources[] = new dnsview[resources.length]; for (int i=0;i<resources.length;i++){ addresources[i] = new dnsview(); addresources[i].viewname = resources[i].viewname; } result = add_bulk_request(client, addresources); } return result; }
[ "Use this API to add dnsview resources." ]
[ "Check if underlying connection was alive.", "In-place scaling of a row in A\n\n@param alpha scale factor\n@param A matrix\n@param row which row in A", "Only one boolean param should be true at a time for this function to return the proper results\n\n@param hostName\n@param enable\n@param disable\n@param remove\n@param isEnabled\n@param exists\n@return\n@throws Exception", "Write resource assignment workgroup.\n\n@param record resource assignment workgroup instance\n@throws IOException", "This creates a new audit log file with default permissions.\n\n@param file File to create", "Get all the handlers at a specific address.\n\n@param address the address\n@param inherited true to include the inherited operations\n@return the handlers", "View that redirects the top level window to the URL defined in postDeclineUrl property after user declines to authorize application.\nMay be overridden for custom views, particularly in the case where the post-decline view should be rendered in-canvas.\n@return a view to display after a user declines authoriation. Defaults as a redirect to postDeclineUrl", "Retrieve the fixed data offset for a specific field.\n\n@param type field type\n@return offset", "Start export and check in of the selected modules.\n@return The exit code of the check in procedure (like a script's exit code)." ]
public GreenMailConfiguration build(Properties properties) { GreenMailConfiguration configuration = new GreenMailConfiguration(); String usersParam = properties.getProperty(GREENMAIL_USERS); if (null != usersParam) { String[] usersArray = usersParam.split(","); for (String user : usersArray) { extractAndAddUser(configuration, user); } } String disabledAuthentication = properties.getProperty(GREENMAIL_AUTH_DISABLED); if (null != disabledAuthentication) { configuration.withDisabledAuthentication(); } return configuration; }
[ "Builds a configuration object based on given properties.\n\n@param properties the properties.\n@return a configuration and never null." ]
[ "Function to serialize the given Vector clock into a string. If something\ngoes wrong, it returns an empty string.\n\n@param vc The Vector clock to serialize\n@return The string (JSON) version of the specified Vector clock", "Utility function that checks if store names are valid on a node.\n\n@param adminClient An instance of AdminClient points to given cluster\n@param nodeId Node id to fetch stores from\n@param storeNames Store names to check", "Use this API to unset the properties of systemuser resources.\nProperties that need to be unset are specified in args array.", "Convert an Object of type Class to an Object.", "Install the installation manager service.\n\n@param serviceTarget\n@return the service controller for the installed installation manager", "Joins a collection in a string using a delimiter\n@param col Collection\n@param delim Delimiter\n@return String", "Does not mutate the TestMatrix.\nVerifies that the test matrix contains all the required tests and that\neach required test is valid.\n\n@param testMatrix the {@link TestMatrixArtifact} to be verified.\n@param matrixSource a {@link String} of the source of proctor artifact. For example a path of proctor artifact file.\n@param requiredTests a {@link Map} of required test. The {@link TestSpecification} would be verified\n@param functionMapper a given el {@link FunctionMapper}\n@param providedContext a {@link Map} containing variables describing the context in which the request is executing. These will be supplied to verifying all rules.\n@param dynamicTests a {@link Set} of dynamic tests determined by filters.\n@return a {@link ProctorLoadResult} to describe the result of verification. It contains errors of verification and a list of missing test.", "Image scale method\n@param imageToScale The image to be scaled\n@param dWidth Desired width, the new image object is created to this size\n@param dHeight Desired height, the new image object is created to this size\n@param fWidth What to multiply the width by. value < 1 scales down, and value > one scales up\n@param fHeight What to multiply the height by. value < 1 scales down, and value > one scales up\n@return A scaled image", "Get the names of the currently registered format providers.\n\n@return the provider names, never null." ]
@Override public boolean setA(DMatrixRBlock A) { // Extract a lower triangular solution if( !decomposer.decompose(A) ) return false; blockLength = A.blockLength; return true; }
[ "Decomposes and overwrites the input matrix.\n\n@param A Semi-Positive Definite (SPD) system matrix. Modified. Reference saved.\n@return If the matrix can be decomposed. Will always return false of not SPD." ]
[ "Use this API to fetch all the rsskeytype resources that are configured on netscaler.", "Process an MPP file to make it anonymous.\n\n@param input input file name\n@param output output file name\n@throws Exception", "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>.", "Check that the parameter array has exactly the right number of elements.\n\n@param parameterName\nThe name of the user-supplied parameter that we are validating\nso that the user can easily find the error in their code.\n@param actualLength\nThe actual array length\n@param expectedLength\nThe expected array length", "Generates timephased actual costs from the assignment's cost value. Used for Cost type Resources.\n\n@return timephased cost", "Log a fatal message.", "Retrieves the working hours on the given date.\n\n@param date required date\n@param cal optional calendar instance\n@param day optional day instance\n@return working hours", "Given a String the method uses Regex to check if the String only contains punctuation characters\n\n@param s a String to check using regex\n@return true if the String is valid", "Scans all Forge addons for files accepted by given filter." ]
public BufferedImage toNewBufferedImage(int type) { BufferedImage target = new BufferedImage(width, height, type); Graphics2D g2 = (Graphics2D) target.getGraphics(); g2.drawImage(awt, 0, 0, null); g2.dispose(); return target; }
[ "Returns a new AWT BufferedImage from this image.\n\n@param type the type of buffered image to create, if not specified then defaults to the current image type\n@return a new, non-shared, BufferedImage with the same data as this Image." ]
[ "Scans the scene graph to collect picked items\nand generates appropriate pick and touch events.\nThis function is called by the cursor controller\ninternally but can also be used to funnel a\nstream of Android motion events into the picker.\n@see #pickObjects(GVRScene, float, float, float, float, float, float)\n@param touched true if the \"touched\" button is pressed.\nWhich button indicates touch is controller dependent.\n@param event Android MotionEvent which caused the pick\n@see IPickEvents\n@see ITouchEvents", "Creates a bridge accessory, capable of holding multiple child accessories. This has the\nadvantage over multiple standalone accessories of only requiring a single pairing from iOS for\nthe bridge.\n\n@param authInfo authentication information for this accessory. These values should be persisted\nand re-supplied on re-start of your application.\n@param label label for the bridge. This will show in iOS during pairing.\n@param manufacturer manufacturer of the bridge. This information is exposed to iOS for unknown\npurposes.\n@param model model of the bridge. This is also exposed to iOS for unknown purposes.\n@param serialNumber serial number of the bridge. Also exposed. Purposes also unknown.\n@return the bridge, from which you can {@link HomekitRoot#addAccessory add accessories} and\nthen {@link HomekitRoot#start start} handling requests.\n@throws IOException when mDNS cannot connect to the network", "Returns the metallic factor for PBR shading", "removes an Object from the cache.\n\n@param oid the Identity of the object to be removed.", "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", "Get the present keys of all entries with a given type, checking hereby if assignable.\n\n@param type The attribute type, not null.\n@return all present keys of attributes being assignable to the type, never null.", "Obtain the annotation associated with this type descriptor of the specified type.\n@param annotationType the annotation type\n@return the annotation, or {@code null} if no such annotation exists on this type descriptor", "Gets the registration point that been associated with the registration for the longest period.\n\n@return the initial registration point, or {@code null} if there are no longer any registration points", "Called when a ParentViewHolder has triggered an expansion for it's parent\n\n@param flatParentPosition the position of the parent that is calling to be expanded" ]
private void sortFileList() { if (this.size() > 1) { Collections.sort(this.fileList, new Comparator() { public final int compare(final Object o1, final Object o2) { final File f1 = (File) o1; final File f2 = (File) o2; final Object[] f1TimeAndCount = backupSuffixHelper .backupTimeAndCount(f1.getName(), baseFile); final Object[] f2TimeAndCount = backupSuffixHelper .backupTimeAndCount(f2.getName(), baseFile); final long f1TimeSuffix = ((Long) f1TimeAndCount[0]).longValue(); final long f2TimeSuffix = ((Long) f2TimeAndCount[0]).longValue(); if ((0L == f1TimeSuffix) && (0L == f2TimeSuffix)) { final long f1Time = f1.lastModified(); final long f2Time = f2.lastModified(); if (f1Time < f2Time) { return -1; } if (f1Time > f2Time) { return 1; } return 0; } if (f1TimeSuffix < f2TimeSuffix) { return -1; } if (f1TimeSuffix > f2TimeSuffix) { return 1; } final int f1Count = ((Integer) f1TimeAndCount[1]).intValue(); final int f2Count = ((Integer) f2TimeAndCount[1]).intValue(); if (f1Count < f2Count) { return -1; } if (f1Count > f2Count) { return 1; } if (f1Count == f2Count) { if (fileHelper.isCompressed(f1)) { return -1; } if (fileHelper.isCompressed(f2)) { return 1; } } return 0; } }); } }
[ "Sort by time bucket, then backup count, and by compression state." ]
[ "Remove a custom field setting on the project.\n\n@param project The project to associate the custom field with\n@return Request object", "Creates an internal project and repositories such as a token storage.", "Removes the specified list of members from the project. Returns the updated project record.\n\n@param project The project to remove members from.\n@return Request object", "Use this API to update nspbr6.", "Reads the availability table from the file.\n\n@param resource MPXJ resource instance\n@param periods MSPDI availability periods", "This method returns the existing folder, and if it does not exist, the\nmethod generates it.\n\n@param path\n@param dest_dir\n@return the folder\n@throws BeastException", "create partitions in the broker\n\n@param topic topic name\n@param partitionNum partition numbers\n@param enlarge enlarge partition number if broker configuration has\nsetted\n@return partition number in the broker\n@throws IOException if an I/O error occurs", "Returns the complete record for a single section.\n\n@param section The section to get.\n@return Request object", "Given the lambda value perform an implicit QR step on the matrix.\n\nB^T*B-lambda*I\n\n@param lambda Stepping factor." ]
public HashSet<String> getDataById(String id) throws IOException { if (idToVersion.containsKey(id)) { return get(id); } else { return null; } }
[ "Gets the data by id.\n\n@param id the id\n@return the data by id\n@throws IOException Signals that an I/O exception has occurred." ]
[ "Create a standalone target.\n\n@param controllerClient the connected controller client to a standalone instance.\n@return the remote target", "Returns the value of the sum of discounted cash flows of the bond where\nthe discounting is done with the given yield curve.\nThis method can be used for optimizer.\n\n@param evaluationTime The evaluation time as double. Cash flows prior and including this time are not considered.\n@param rate The yield which is used for discounted the coupon payments.\n@param model The model under which the product is valued.\n@return The value of the bond for the given yield.", "Specify a specific index to run the query against\n\n@param designDocument set the design document to use\n@param indexName set the index name to use\n@return this to set additional options", "Opens a JDBC connection with the given parameters.", "Return the count of all objects found\nfor given class, using the PB-api within\nODMG - this may change in further versions.", "Use this API to add autoscaleaction.", "Processes one dump file with the given dump file processor, handling\nexceptions appropriately.\n\n@param dumpFile\nthe dump file to process\n@param dumpFileProcessor\nthe dump file processor to use", "Marks the start of a query identified by the provided correlationId\n\n@param query - Query data\n@param correlationId - Identifier\n@return Start event to pass to the Events systems EventBus", "Computes the longest common contiguous substring of s and t.\nThe LCCS is the longest run of characters that appear consecutively in\nboth s and t. For instance, the LCCS of \"color\" and \"colour\" is 4, because\nof \"colo\"." ]
private String GCMGetFreshToken(final String senderID) { getConfigLogger().verbose(getAccountId(), "GcmManager: Requesting a GCM token for Sender ID - " + senderID); String token = null; try { token = InstanceID.getInstance(context) .getToken(senderID, GoogleCloudMessaging.INSTANCE_ID_SCOPE, null); getConfigLogger().info(getAccountId(), "GCM token : " + token); } catch (Throwable t) { getConfigLogger().verbose(getAccountId(), "GcmManager: Error requesting GCM token", t); } return token; }
[ "request token from GCM" ]
[ "Retrieve the correct index for the supplied Table instance.\n\n@param table Table instance\n@return index", "Get the property name of a method name. For example the property name of\nsetSomeValue would be someValue. Names not beginning with set or get are\nnot changed.\n\n@param name The name to process\n@return The property name", "Set a Java classname path to ignore when printing stack traces\n@param classToIgnoreInTraces The class name (with packages, etc) to ignore.\n@return this", "Add nodes to the workers list\n\n@param nodeIds list of node ids.", "Parses a type annotation table to find the labels, and to visit the try\ncatch block annotations.\n\n@param u\nthe start offset of a type annotation table.\n@param mv\nthe method visitor to be used to visit the try catch block\nannotations.\n@param context\ninformation about the class being parsed.\n@param visible\nif the type annotation table to parse contains runtime visible\nannotations.\n@return the start offset of each type annotation in the parsed table.", "Method must be invoked upon completion of a rebalancing task. It is the\ntask's responsibility to do so.\n\n@param stealerId\n@param donorId", "Each schema set has its own database cluster. The template1 database has the schema preloaded so that\neach test case need only create a new database and not re-invoke Migratory.", "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", "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" ]
public void detect(final String... packageNames) throws IOException { final String[] pkgNameFilter = new String[packageNames.length]; for (int i = 0; i < pkgNameFilter.length; ++i) { pkgNameFilter[i] = packageNames[i].replace('.', '/'); if (!pkgNameFilter[i].endsWith("/")) { pkgNameFilter[i] = pkgNameFilter[i].concat("/"); } } final Set<File> files = new HashSet<>(); final ClassLoader loader = Thread.currentThread().getContextClassLoader(); for (final String packageName : pkgNameFilter) { final Enumeration<URL> resourceEnum = loader.getResources(packageName); while (resourceEnum.hasMoreElements()) { final URL url = resourceEnum.nextElement(); if ("file".equals(url.getProtocol())) { final File dir = toFile(url); if (dir.isDirectory()) { files.add(dir); } else { throw new AssertionError("Not a recognized file URL: " + url); } } else { final File jarFile = toFile(openJarURLConnection(url).getJarFileURL()); if (jarFile.isFile()) { files.add(jarFile); } else { throw new AssertionError("Not a File: " + jarFile); } } } } if (DEBUG) { print("Files to scan: %s", files); } if (!files.isEmpty()) { // see http://shipilev.net/blog/2016/arrays-wisdom-ancients/#_conclusion detect(new ClassFileIterator(files.toArray(new File[0]), pkgNameFilter)); } }
[ "Report all Java ClassFile files available on the class path within\nthe specified packages and sub packages.\n\n@see #detect(File...)" ]
[ "Use this API to fetch all the ipset resources that are configured on netscaler.", "Creates a scheduled thread pool where each thread has the daemon\nproperty set to true. This allows the program to quit without\nexplicitly calling shutdown on the pool\n\n@param corePoolSize the number of threads to keep in the pool,\neven if they are idle\n\n@return a newly created scheduled thread pool", "Obtains a British Cutover local date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the British Cutover local date-time, not null\n@throws DateTimeException if unable to create the date-time", "splits a string into a list of strings. Trims the results and ignores empty strings", "Reads an HTML snippet with the given name.\n\n@return the HTML data", "Send a sync command to all registered listeners.\n\n@param command the byte which identifies the type of sync command we received", "Unicast addresses allocated for private use\n\n@see java.net.InetAddress#isSiteLocalAddress()", "Gets the value for the key.\n\n@param key the key to check for the value\n\n@return the value or an empty collection if no values were set", "Session connect generate channel.\n\n@param session\nthe session\n@return the channel\n@throws JSchException\nthe j sch exception" ]
public static ResourceBundle getCurrentResourceBundle(String locale) { try { if (null != locale && !locale.isEmpty()) { return getCurrentResourceBundle(LocaleUtils.toLocale(locale)); } } catch (IllegalArgumentException ex) { // do nothing } return getCurrentResourceBundle((Locale) null); }
[ "Returns the resource bundle for current Locale, i.e. locale set in the PageComponent.\nAlways create a new instance, this avoids getting the incorrect locale information.\n\n@return resourcebundle for internationalized messages" ]
[ "From the set of classes a new set is built containing all indexed\nsubclasses, but removing then all subtypes of indexed entities.\n\n@param selection\n\n@return a new set of entities", "Helper method to get a list of node ids.\n\n@param nodeList", "Use this API to update autoscaleaction resources.", "Checks the query-customizer setting of the given collection descriptor.\n\n@param collDef The collection descriptor\n@param checkLevel The current check level (this constraint is only checked in strict)\n@exception ConstraintException If the constraint has been violated", "Updates property of parent id for the image provided.\nReturns false if image was not captured true otherwise.\n\n@param log\n@param imageTag\n@param host\n@param buildInfoId\n@return\n@throws IOException\n@throws InterruptedException", "Returns a TypeConverter for a given class.\n\n@param cls The class for which the TypeConverter should be fetched.", "absolute for basicJDBCSupport\n@param row", "Fired whenever a browser event is received.\n@param event Event to process", "This method prints goal information of an agent through its external\naccess. It can be used to check the correct behaviour of the agent.\n\n@param agent_name\nThe name of the agent\n@param connector\nThe connector to get the external access\n@return goals the IGoal[] with all the information, so the tester can\nlook for information" ]
public Where<T, ID> between(String columnName, Object low, Object high) throws SQLException { addClause(new Between(columnName, findColumnFieldType(columnName), low, high)); return this; }
[ "Add a BETWEEN clause so the column must be between the low and high parameters." ]
[ "Compares this value with the specified object for order. Returns a negative\ninteger, zero, or a positive integer as this value is less than, equal to, or\ngreater than the specified value.\n@param other Another Rational value.\n@return A negative integer, zero, or a positive integer as this value is less\nthan, equal to, or greater than the specified value.", "Reopen the associated static logging stream. Set to null to redirect to System.out.", "Handles an initial response from a PUT or PATCH operation response by polling\nthe status of the operation until the long running operation terminates.\n\n@param observable the initial observable from the PUT or PATCH operation.\n@param <T> the return type of the caller\n@param resourceType the java.lang.reflect.Type of the resource.\n@return the terminal response for the operation.\n@throws CloudException REST exception\n@throws InterruptedException interrupted exception\n@throws IOException thrown by deserialization", "Transforms an input String into HTML using the given Configuration.\n\n@param input\nThe String to process.\n@param configuration\nThe Configuration.\n@return The processed String.\n@since 0.7\n@see Configuration", "Determine which type of percent complete is used on on this task,\nand calculate the required value.\n\n@param row task data\n@return percent complete value", "Handle a start time change.\n\n@param event the change event", "Obtains a Pax zoned date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the Pax zoned date-time, not null\n@throws DateTimeException if unable to create the date-time", "Use this API to fetch sslcipher resource of given name .", "Use this API to add cmppolicylabel." ]
public void implicitDoubleStep( int x1 , int x2 ) { if( printHumps ) System.out.println("Performing implicit double step"); // compute the wilkinson shift double z11 = A.get(x2 - 1, x2 - 1); double z12 = A.get(x2 - 1, x2); double z21 = A.get(x2, x2 - 1); double z22 = A.get(x2, x2); double a11 = A.get(x1,x1); double a21 = A.get(x1+1,x1); double a12 = A.get(x1,x1+1); double a22 = A.get(x1+1,x1+1); double a32 = A.get(x1+2,x1+1); if( normalize ) { temp[0] = a11;temp[1] = a21;temp[2] = a12;temp[3] = a22;temp[4] = a32; temp[5] = z11;temp[6] = z22;temp[7] = z12;temp[8] = z21; double max = Math.abs(temp[0]); for( int j = 1; j < temp.length; j++ ) { if( Math.abs(temp[j]) > max ) max = Math.abs(temp[j]); } a11 /= max;a21 /= max;a12 /= max;a22 /= max;a32 /= max; z11 /= max;z22 /= max;z12 /= max;z21 /= max; } // these equations are derived when the eigenvalues are extracted from the lower right // 2 by 2 matrix. See page 388 of Fundamentals of Matrix Computations 2nd ed for details. double b11,b21,b31; if( useStandardEq ) { b11 = ((a11- z11)*(a11- z22)- z21 * z12)/a21 + a12; b21 = a11 + a22 - z11 - z22; b31 = a32; } else { // this is different from the version in the book and seems in my testing to be more resilient to // over flow issues b11 = ((a11- z11)*(a11- z22)- z21 * z12) + a12*a21; b21 = (a11 + a22 - z11 - z22)*a21; b31 = a32*a21; } performImplicitDoubleStep(x1, x2, b11 , b21 , b31 ); }
[ "Performs an implicit double step using the values contained in the lower right hand side\nof the submatrix for the estimated eigenvector values.\n@param x1\n@param x2" ]
[ "sets the initialization method for this descriptor", "Remove a license from an artifact\n\n@param gavc String The artifact GAVC\n@param licenseId String The license id to be removed.", "Find all the node representing the entity.\n\n@param executionEngine the {@link GraphDatabaseService} used to run the query\n@return an iterator over the nodes representing an entity", "Set the state of an individual day in a weekly recurrence.\n\n@param day Day instance\n@param value true if this day is included in the recurrence", "Compute morse.\n\n@param term the term\n@return the string", "checks whether the specified Object obj is write-locked by Transaction tx.\n@param tx the transaction\n@param obj the Object to be checked\n@return true if lock exists, else false", "Create a Count-Query for QueryBySQL\n\n@param aQuery\n@return The count query", "Alias accessor provided for JSON serialization only", "Use this API to fetch a sslglobal_sslpolicy_binding resources." ]
public RandomVariableInterface[] getFactorLoading(double time, double component, RandomVariableInterface[] realizationAtTimeIndex) { int componentIndex = liborPeriodDiscretization.getTimeIndex(component); if(componentIndex < 0) { componentIndex = -componentIndex - 2; } return getFactorLoading(time, componentIndex, realizationAtTimeIndex); }
[ "Return the factor loading for a given time and a given component.\n\nThe factor loading is the vector <i>f<sub>i</sub></i> such that the scalar product <br>\n<i>f<sub>j</sub>f<sub>k</sub> = f<sub>j,1</sub>f<sub>k,1</sub> + ... + f<sub>j,m</sub>f<sub>k,m</sub></i> <br>\nis the instantaneous covariance of the component <i>j</i> and <i>k</i>.\n\nWith respect to simulation time <i>t</i>, this method uses a piece wise constant interpolation, i.e.,\nit calculates <i>t_<sub>i</sub></i> such that <i>t_<sub>i</sub></i> is the largest point in <code>getTimeDiscretization</code>\nsuch that <i>t_<sub>i</sub> &le; t </i>.\n\nThe component here, it given via a double <i>T</i> which may be associated with the LIBOR fixing date.\nWith respect to component time <i>T</i>, this method uses a piece wise constant interpolation, i.e.,\nit calculates <i>T_<sub>j</sub></i> such that <i>T_<sub>j</sub></i> is the largest point in <code>getTimeDiscretization</code>\nsuch that <i>T_<sub>j</sub> &le; T </i>.\n\n@param time The time <i>t</i> at which factor loading is requested.\n@param component The component time (as a double associated with the fixing of the forward rate) <i>T<sub>i</sub></i>.\n@param realizationAtTimeIndex The realization of the stochastic process (may be used to implement local volatility/covariance/correlation models).\n@return The factor loading <i>f<sub>i</sub>(t)</i>." ]
[ "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.", "Requests the beat grid for a specific track ID, given a connection to a player that has already been 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 beat grid, or {@code null} if there was none available\n\n@throws IOException if there is a communication problem", "Merges two lists together.\n\n@param one first list\n@param two second list\n@return merged lists", "Sets the fieldConversion.\n@param fieldConversionClassName The fieldConversion to set", "Analyze all source code using the specified RuleSet and return the report results.\n\n@param ruleSet - the RuleSet to apply to each source component; must not be null.\n@return the results from applying the RuleSet to all of the source", "Writes batch of data to the source\n@param batch\n@throws InterruptedException", "Returns if a request should be retried based on the retry count, current response,\nand the current strategy.\n\n@param retryCount The current retry attempt count.\n@param response The exception that caused the retry conditions to occur.\n@return true if the request should be retried; false otherwise.", "This method is used by non-blocking code to determine if the give buffer\nrepresents a complete request. Because the non-blocking code can by\ndefinition not just block waiting for more data, it's possible to get\npartial reads, and this identifies that case.\n\n@param buffer Buffer to check; the buffer is reset to position 0 before\ncalling this method and the caller must reset it after the call\nreturns\n@return True if the buffer holds a complete request, false otherwise", "Detect bad xml 1.0 characters\n\n@param c to detect\n@return true if specified character valid, false otherwise" ]
private void updateToNextWorkStart(Calendar cal) { Date originalDate = cal.getTime(); // // Find the date ranges for the current day // ProjectCalendarDateRanges ranges = getRanges(originalDate, cal, null); if (ranges != null) { // // Do we have a start time today? // Date calTime = DateHelper.getCanonicalTime(cal.getTime()); Date startTime = null; for (DateRange range : ranges) { Date rangeStart = DateHelper.getCanonicalTime(range.getStart()); Date rangeEnd = DateHelper.getCanonicalTime(range.getEnd()); Date rangeStartDay = DateHelper.getDayStartDate(range.getStart()); Date rangeEndDay = DateHelper.getDayStartDate(range.getEnd()); if (rangeStartDay.getTime() != rangeEndDay.getTime()) { rangeEnd = DateHelper.addDays(rangeEnd, 1); } if (calTime.getTime() < rangeEnd.getTime()) { if (calTime.getTime() > rangeStart.getTime()) { startTime = calTime; } else { startTime = rangeStart; } break; } } // // If we don't have a start time today - find the next working day // then retrieve the start time. // if (startTime == null) { Day day; int nonWorkingDayCount = 0; do { cal.set(Calendar.DAY_OF_YEAR, cal.get(Calendar.DAY_OF_YEAR) + 1); day = Day.getInstance(cal.get(Calendar.DAY_OF_WEEK)); ++nonWorkingDayCount; if (nonWorkingDayCount > MAX_NONWORKING_DAYS) { cal.setTime(originalDate); break; } } while (!isWorkingDate(cal.getTime(), day)); startTime = getStartTime(cal.getTime()); } DateHelper.setTime(cal, startTime); } }
[ "This method finds the start of the next working period.\n\n@param cal current Calendar instance" ]
[ "Returns a compact representation of all of the subtasks of a task.\n\n@param task The task to get the subtasks of.\n@return Request object", "Decode '%HH'.", "Resolves the package type from the maven project.\n\n@param project the maven project\n\n@return the package type", "Get an extent aware RsIterator based on the Query\n\n@param query\n@param cld\n@param factory the Factory for the RsIterator\n@return OJBIterator", "This method returns the string representation of an object. In most\ncases this will simply involve calling the normal toString method\non the object, but a couple of exceptions are handled here.\n\n@param o the object to formatted\n@return formatted string representing input Object", "Return the available format ids.", "Modify a misc file.\n\n@param name the file name\n@param path the relative path\n@param existingHash the existing hash\n@param newHash the new hash of the modified content\n@param isDirectory whether the file is a directory or not\n@return the builder", "Returns a SimpleConfiguration clientConfig with properties set from this configuration\n\n@return SimpleConfiguration", "Presents the Cursor Settings to the User. Only works if scene is set." ]
private void ensureReferencedFKs(ModelDef modelDef, CollectionDescriptorDef collDef) throws ConstraintException { String elementClassName = collDef.getProperty(PropertyHelper.OJB_PROPERTY_ELEMENT_CLASS_REF); ClassDescriptorDef elementClassDef = modelDef.getClass(elementClassName); String fkFieldNames = collDef.getProperty(PropertyHelper.OJB_PROPERTY_FOREIGNKEY); ArrayList missingFields = new ArrayList(); SequencedHashMap fkFields = new SequencedHashMap(); // first we gather all field names for (CommaListIterator it = new CommaListIterator(fkFieldNames); it.hasNext();) { String fieldName = (String)it.next(); FieldDescriptorDef fieldDef = elementClassDef.getField(fieldName); if (fieldDef == null) { missingFields.add(fieldName); } fkFields.put(fieldName, fieldDef); } // next we traverse all sub types and gather fields as we go for (Iterator it = elementClassDef.getAllExtentClasses(); it.hasNext() && !missingFields.isEmpty();) { ClassDescriptorDef subTypeDef = (ClassDescriptorDef)it.next(); for (int idx = 0; idx < missingFields.size();) { FieldDescriptorDef fieldDef = subTypeDef.getField((String)missingFields.get(idx)); if (fieldDef != null) { fkFields.put(fieldDef.getName(), fieldDef); missingFields.remove(idx); } else { idx++; } } } if (!missingFields.isEmpty()) { throw new ConstraintException("Cannot find field "+missingFields.get(0).toString()+" in the hierarchy with root type "+ elementClassDef.getName()+" which is used as foreignkey in collection "+ collDef.getName()+" in "+collDef.getOwner().getName()); } // copy the found fields into the element class ensureFields(elementClassDef, fkFields.values()); }
[ "Ensures that the foreign keys required by the given collection are present in the element class.\n\n@param modelDef The model\n@param collDef The collection\n@throws ConstraintException If there is a problem with the foreign keys" ]
[ "Returns the connection that has been saved or null if none.", "Places a connection back in the originating partition.\n@param connectionHandle to place back\n@throws SQLException on error", "Based on a provided locale return a SoyMsgBundle file.\n\nIf a passed in locale object is \"Optional.absent()\",\nthe implementation will return Optional.absent() as well\n@param locale - maybe locale\n@return maybe soy msg bundle", "Update database schema\n\n@param migrationPath path to migrations", "Bessel function of the second kind, of order 0.\n\n@param x Value.\n@return Y0 value.", "Core write attribute implementation.\n\n@param name attribute name\n@param value attribute value", "Check whether the URL start with one of the given prefixes.\n\n@param uri URI\n@param patterns possible prefixes\n@return true when URL starts with one of the prefixes", "Methods returns InetAddress for localhost\n\n@return InetAddress of the localhost\n@throws UnknownHostException if localhost could not be resolved", "Configures the configuration selector." ]
public void process(String inputFile, String outputFile) throws Exception { System.out.println("Reading input file started."); long start = System.currentTimeMillis(); ProjectFile projectFile = readFile(inputFile); long elapsed = System.currentTimeMillis() - start; System.out.println("Reading input file completed in " + elapsed + "ms."); System.out.println("Writing output file started."); start = System.currentTimeMillis(); ProjectWriter writer = ProjectWriterUtility.getProjectWriter(outputFile); writer.write(projectFile, outputFile); elapsed = System.currentTimeMillis() - start; System.out.println("Writing output completed in " + elapsed + "ms."); }
[ "Convert one project file format to another.\n\n@param inputFile input file\n@param outputFile output file\n@throws Exception" ]
[ "Issue the database statements to create the table associated with a table configuration.\n\n@param connectionSource\nconnectionSource Associated connection source.\n@param tableConfig\nHand or spring wired table configuration. If null then the class must have {@link DatabaseField}\nannotations.\n@return The number of statements executed to do so.", "Returns the complete record for a single section.\n\n@param section The section to get.\n@return Request object", "Sets a configuration option to the specified value.", "Bessel function of the second kind, of order 0.\n\n@param x Value.\n@return Y0 value.", "This is the main entry point used to convert the internal representation\nof timephased work into an external form which can\nbe displayed to the user.\n\n@param projectCalendar calendar used by the resource assignment\n@param work timephased resource assignment data\n@param rangeUnits timescale units\n@param dateList timescale date ranges\n@return list of durations, one per timescale date range", "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.", "Retrieve the calendar used internally for timephased baseline calculation.\n\n@return baseline calendar", "Return a copy of the new fragment and set the variable above.", "Returns a the list of available version of an artifact\n\n@param gavc String\n@return List<String>" ]
public List<BindingInfo> getQueueBindings(String vhost, String queue) { final URI uri = uriWithPath("./queues/" + encodePathSegment(vhost) + "/" + encodePathSegment(queue) + "/bindings"); final BindingInfo[] result = this.rt.getForObject(uri, BindingInfo[].class); return asListOrNull(result); }
[ "Returns a list of bindings where provided queue is the destination.\n\n@param vhost vhost of the exchange\n@param queue destination queue name\n@return list of bindings" ]
[ "Read ClassDescriptors from the given repository file.\n@see #mergeDescriptorRepository", "Tells you if an expression is the expected constant.\n@param expression\nany expression\n@param expected\nthe expected int or String\n@return\nas described", "Create a new instance of a single input function from an operator character\n@param op Which operation\n@param input Input variable\n@return Resulting operation", "Runs the example program.\n\n@param args\n@throws IOException\nif there was a problem in writing the output file", "Finds the first mesh in the given model.\n@param model root of a model loaded by the asset loader.\n@return GVRMesh found or null if model does not contain meshes\n@see #loadMesh(GVRAndroidResource.MeshCallback, GVRAndroidResource, int)", "Use this API to unset the properties of onlinkipv6prefix resources.\nProperties that need to be unset are specified in args array.", "Use this API to fetch cachepolicylabel_binding resource of given name .", "Remove control from the control bar. Size of control bar is updated based on new number of\ncontrols.\n@param name name of the control to remove", "Mbeans for SLOP_UPDATE" ]
public static JRDesignGroup getJRDesignGroup(DynamicJasperDesign jd, LayoutManager layoutManager, DJGroup group) { Map references = layoutManager.getReferencesMap(); for (Object o : references.keySet()) { String groupName = (String) o; DJGroup djGroup = (DJGroup) references.get(groupName); if (group == djGroup) { return (JRDesignGroup) jd.getGroupsMap().get(groupName); } } return null; }
[ "Returns the JRDesignGroup for the DJGroup passed\n@param jd\n@param layoutManager\n@param group\n@return" ]
[ "return the list of FormInputs that match this element\n\n@param element\n@return", "Read a single duration field extended attribute.\n\n@param row field data", "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.", "Diagnostic method used to dump known field map data.\n\n@param props props block containing field map data", "Executes a API query action to get a new token.\nThe method only executes the action, without doing any\nchecks first. If errors occur, they are logged and null is returned.\n\n@param tokenType The kind of token to retrieve like \"csrf\" or \"login\"\n@return newly retrieved token or null if no token was retrieved", "Convert the server side feature to a DTO feature that can be sent to the client.\n\n@param feature\nThe server-side feature representation.\n@param featureIncludes\nIndicate which aspects of the should be included see {@link VectorLayerService}\n@return Returns the DTO feature.", "Upload a photo from an InputStream.\n\n@param in\n@param metaData\n@return photoId or ticketId\n@throws FlickrException", "Retrieve an activity status.\n\n@param mpxj MPXJ Task instance\n@return activity status", "Sets all padding to the same value.\n@param padding new padding for top, bottom, left, and right, ignored if smaller than 0\n@return this to allow chaining" ]
static void writePatch(final Patch rollbackPatch, final File file) throws IOException { final File parent = file.getParentFile(); if (!parent.isDirectory()) { if (!parent.mkdirs() && !parent.exists()) { throw PatchLogger.ROOT_LOGGER.cannotCreateDirectory(file.getAbsolutePath()); } } try { try (final OutputStream os = new FileOutputStream(file)){ PatchXml.marshal(os, rollbackPatch); } } catch (XMLStreamException e) { throw new IOException(e); } }
[ "Write the patch.xml\n\n@param rollbackPatch the patch\n@param file the target file\n@throws IOException" ]
[ "Returns a new instance of the class with the given qualified name using the default or\nor a no-arg constructor.\n\n@param className The qualified name of the class to instantiate", "Adds OPT_J | OPT_JSON option to OptionParser, with multiple arguments.\n\n@param parser OptionParser to be modified\n@param required Tells if this option is required or optional", "Adds an environment variable to the process being created.\n\n@param key they key for the variable\n@param value the value for the variable\n\n@return the launcher", "Retrieves the members of the type and of its super types.\n\n@param memberNames Will receive the names of the members (for sorting)\n@param members Will receive the members\n@param type The type to process\n@param tagName An optional tag for filtering the types\n@param paramName The feature to be added to the MembersInclSupertypes attribute\n@param paramValue The feature to be added to the MembersInclSupertypes attribute\n@throws XDocletException If an error occurs", "Use this API to fetch rnat6_nsip6_binding resources of given name .", "The read timeout for the underlying URLConnection to the twitter stream.", "Returns a site record for the site of the given name, creating a new one\nif it does not exist yet.\n\n@param siteKey\nthe key of the site\n@return the suitable site record", "Generates the routing Java source code", "Process start.\n\n@param endpoint the endpoint\n@param eventType the event type" ]
public static base_responses unset(nitro_service client, String selectorname[], String args[]) throws Exception { base_responses result = null; if (selectorname != null && selectorname.length > 0) { nslimitselector unsetresources[] = new nslimitselector[selectorname.length]; for (int i=0;i<selectorname.length;i++){ unsetresources[i] = new nslimitselector(); unsetresources[i].selectorname = selectorname[i]; } result = unset_bulk_request(client, unsetresources,args); } return result; }
[ "Use this API to unset the properties of nslimitselector resources.\nProperties that need to be unset are specified in args array." ]
[ "Search for a publisher of the given type in a project and return it, or null if it is not found.\n\n@return The publisher", "Gets the global and adds it ot the BatchExecutionresults using the alternative outIdentifier.\n\n@param identifier\nThe identifier of the global\n@param outIdentifier\nThe identifier used in the ExecutionResults to store the global.\n@return", "Checks that the data starting at startLocRecord looks like a local file record header.\n\n@param channel the channel\n@param startLocRecord offset into channel of the start of the local record\n@param compressedSize expected compressed size of the file, or -1 to indicate this isn't known", "Generate a schedule descriptor for the given start and end date.\n\n@param startDate The start date.\n@param endDate The end date.\n@return The schedule descriptor", "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", "Retrieve the default number of minutes per month.\n\n@return minutes per month", "Adds a constructor for the proxy for each constructor declared by the base\nbean type.\n\n@param proxyClassType the Javassist class for the proxy\n@param initialValueBytecode", "Add a row to the table. We have a limited understanding of the way\nBtrieve handles outdated rows, so we use what we think is a version number\nto try to ensure that we only have the latest rows.\n\n@param primaryKeyColumnName primary key column name\n@param map Map containing row data", "Creates a householder reflection.\n\n(I-gamma*v*v')*x = tau*e1\n\n<p>NOTE: Same as cs_house in csparse</p>\n@param x (Input) Vector x (Output) Vector v. Modified.\n@param xStart First index in X that is to be processed\n@param xEnd Last + 1 index in x that is to be processed.\n@param gamma (Output) Storage for computed gamma\n@return variable tau" ]
public static <E extends Enum<? extends Style.HasCssName>> E fromStyleName(final String styleName, final Class<E> enumClass, final E defaultValue) { return EnumHelper.fromStyleName(styleName, enumClass, defaultValue, true); }
[ "Returns first enum constant found..\n\n@param styleName Space-separated list of styles\n@param enumClass Type of enum\n@param defaultValue Default value of no match was found\n@return First enum constant found or default value" ]
[ "Determines the number of elements that the query would return. Override this\nmethod if the size shall be determined in a specific way.\n\n@return The number of elements", "Scroll to the next page. To process the scrolling by pages LayoutScroller must be constructed\nwith a pageSize greater than zero.\n@return the new current item after the scrolling processed.", "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", "Use this API to fetch filtered set of vpnclientlessaccesspolicy resources.\nset the filter parameter values in filtervalue object.", "If the status of a print job is not checked for a while, we assume that the user is no longer\ninterested in the report, and we cancel the job.\n\n@param printJob\n@return is the abandoned timeout exceeded?", "Converts a parameter map to the parameter string.\n@param parameters the parameter map.\n@return the parameter string.", "Join N sets.", "Adds the worker thread pool attributes to the subysystem add method", "returns &gt; 0 when o1 is more specific than o2,\n\nreturns == 0 when o1 and o2 are equal or unrelated,\n\nreturns &lt; 0 when o2 is more specific than o1," ]
private static void deleteOldAndEmptyFiles() { File dir = LOG_FILE_DIR; if (dir.exists()) { File[] files = dir.listFiles(); for (File f : files) { if (f.length() == 0 || f.lastModified() + MAXFILEAGE < System.currentTimeMillis()) { f.delete(); } } } }
[ "delete of files more than 1 day old" ]
[ "Gets the Symmetric Chi-square divergence.\n\n@param p P vector.\n@param q Q vector.\n@return The Symmetric chi-square divergence between p and q.", "Information about a specific release.\n@param appName App name. See {@link #listApps} for a list of apps that can be used.\n@param releaseName Release name. See {@link #listReleases} for a list of the app's releases.\n@return the release object", "Adds an additional site link to the constructed document.\n\n@param title\nthe title of the linked page\n@param siteKey\nidentifier of the site, e.g., \"enwiki\"\n@param badges\none or more badges", "Writes the specified double to the stream, formatted according to the format specified in the constructor.\n\n@param d the double to write to the stream\n@return this writer\n@throws IOException if an I/O error occurs", "Log column data.\n\n@param column column data", "Provides a reverse view on the given list which is especially useful to traverse a list backwards in a for-each\nloop. The list itself is not modified by calling this method.\n\n@param list\nthe list whose elements should be traversed in reverse. May not be <code>null</code>.\n@return a list with the same elements as the given list, in reverse", "Checks that arguments and parameter types match.\n@param params method parameters\n@param args type arguments\n@return -1 if arguments do not match, 0 if arguments are of the exact type and >0 when one or more argument is\nnot of the exact type but still match", "Translate the operation address.\n\n@param op the operation\n@return the new operation", "Adds a new Matrix variable. If one already has the same name it is written over.\n\nWhile more verbose for multiple variables, this function doesn't require new memory be declared\neach time it's called.\n\n@param variable Matrix which is to be assigned to name\n@param name The name of the variable" ]
private RekordboxAnlz.BeatGridTag findTag(RekordboxAnlz anlzFile) { for (RekordboxAnlz.TaggedSection section : anlzFile.sections()) { if (section.body() instanceof RekordboxAnlz.BeatGridTag) { return (RekordboxAnlz.BeatGridTag) section.body(); } } throw new IllegalArgumentException("No beat grid found inside analysis file " + anlzFile); }
[ "Helper function to find the beat grid section in a rekordbox track analysis file.\n\n@param anlzFile the file that was downloaded from the player\n\n@return the section containing the beat grid" ]
[ "Retrieve multiple properties.\n\n@param method method definition\n@param object target object\n@param map parameter values", "The metadata cache can become huge over time. This simply flushes it periodically.", "Set the default styles. the case of the keys are not important. The retrieval will be case\ninsensitive.\n\n@param defaultStyle the mapping from geometry type name (point, polygon, etc...) to the style\nto use for that type.", "This handler will be triggered when there's no search result", "Loads the rules from files in the class loader, often jar files.\n\n@return the list of loaded rules, not null\n@throws Exception if an error occurs", "Determine the color to use to draw a cue list entry. Hot cues are green, ordinary memory points are red,\nand loops are orange.\n\n@param entry the entry being drawn\n\n@return the color with which it should be represented.", "Get the names of all current registered providers.\n\n@return the names of all current registered providers, never null.", "Returns the project membership record.\n\n@param projectMembership Globally unique identifier for the project membership.\n@return Request object", "Delivers the correct JSON Object for the Stencilset Extensions\n\n@param extensions" ]
private static String findOutputPath(String[][] options) { for (int i = 0; i < options.length; i++) { if (options[i][0].equals("-d")) return options[i][1]; } return "."; }
[ "Returns the output path specified on the javadoc options" ]
[ "Constructs a triangule Face from vertices v0, v1, and v2.\n\n@param v0\nfirst vertex\n@param v1\nsecond vertex\n@param v2\nthird vertex", "Returns the value of an optional property, if the property is\nset. If it is not set defval is returned.", "Obtains a local date in Symmetry454 calendar system from the\nproleptic-year, month-of-year and day-of-month fields.\n\n@param prolepticYear the proleptic-year\n@param month the month-of-year\n@param dayOfMonth the day-of-month\n@return the Symmetry454 local date, not null\n@throws DateTimeException if unable to create the date", "Assign an ID value to this field.", "Select calendar data from the database.\n\n@throws SQLException", "DISPATCHING - COMMANDS", "Creates a REST client used to perform Voldemort operations against the\nCoordinator\n\n@param storeName Name of the store to perform the operations on\n@param resolver Custom resolver as specified by the application\n@return", "Lookup an object instance from JNDI context.\n\n@param jndiName JNDI lookup name\n@return Matching object or <em>null</em> if none found.", "Returns the union of sets s1 and s2." ]
private String formatUnits(Number value) { return (value == null ? null : m_formats.getUnitsDecimalFormat().format(value.doubleValue() / 100)); }
[ "This method is called to format a units value.\n\n@param value numeric value\n@return currency value" ]
[ "Return a list of unique namespace and predicate pairs, optionally limited by predicate or namespace, in alphabetical order.\n\nThis method does not require authentication.\n\n@param namespace\noptional, can be null\n@param predicate\noptional, can be null\n@param perPage\nThe number of photos to show per page\n@param page\nThe page offset\n@return NamespacesList containing Pair-objects\n@throws FlickrException", "Returns true if a List literal that contains only entries that are constants.\n@param expression - any expression", "Create the function. Be sure to handle all possible input types and combinations correctly and provide\nmeaningful error messages. The output matrix should be resized to fit the inputs.", "Evaluates the animation with the given index at the specified time.\n@param animIndex 0-based index of {@link GVRAnimator} to start\n@param timeInSec time to evaluate the animation at\n@see GVRAvatar#stop()\n@see #start(String)", "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", "Set day.\n\n@param d day instance", "Given a list of store definitions, find out and return a map of similar\nstore definitions + count of them\n\n@param storeDefs All store definitions\n@return Map of a unique store definition + counts", "Update the installed identity using the modified state from the modification.\n\n@param name the identity name\n@param modification the modification\n@param state the installation state\n@return the installed identity", "Filters a list of rows from the named table. If a column name and a value\nare supplied, then use this to filter the rows. If no column name is\nsupplied, then return all rows.\n\n@param tableName table name\n@param columnName filter column name\n@param id filter column value\n@return filtered list of rows" ]
public GeoShapeMapper transform(GeoTransformation... transformations) { if (this.transformations == null) { this.transformations = Arrays.asList(transformations); } else { this.transformations.addAll(Arrays.asList(transformations)); } return this; }
[ "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" ]
[ "use this method to construct the ChainingIterator\niterator by iterator.", "Use this API to fetch inat resource of given name .", "This method takes the value of an agent's belief through its external\naccess\n\n@param agent_name\nThe name of the agent\n@param belief_name\nThe name of the belief inside agent's adf\n@param connector\nThe connector to get the external access\n@return belief_value The value of the requested belief", "Hide keyboard from phoneEdit field", "Given a block of data representing completed work, this method will\nretrieve a set of TimephasedWork instances which represent\nthe day by day work carried out for a specific resource assignment.\n\n@param calendar calendar on which date calculations are based\n@param resourceAssignment resource assignment\n@param data completed work data block\n@return list of TimephasedWork instances", "Read an element which contains only a single boolean attribute.\n@param reader the reader\n@param attributeName the attribute name, usually \"value\"\n@return the boolean value\n@throws javax.xml.stream.XMLStreamException if an error occurs or if the\nelement does not contain the specified attribute, contains other\nattributes, or contains child elements.", "Get info for a given topic reply\n\n@param topicId\nUnique identifier of a topic for a given group {@link Topic}.\n@param replyId\nUnique identifier of a reply for a given topic {@link Reply}.\n@return A group topic\n@throws FlickrException\n@see <a href=\"http://www.flickr.com/services/api/flickr.groups.discuss.replies.getInfo.html\">API Documentation</a>", "Modies the matrix to make sure that at least one element in each column has a value", "Use this API to fetch vpnclientlessaccesspolicy_binding resource of given name ." ]
private void writeUserFieldDefinitions() { for (CustomField cf : m_sortedCustomFieldsList) { if (cf.getFieldType() != null && cf.getFieldType().getDataType() != null) { UDFTypeType udf = m_factory.createUDFTypeType(); udf.setObjectId(Integer.valueOf(FieldTypeHelper.getFieldID(cf.getFieldType()))); udf.setDataType(UserFieldDataType.inferUserFieldDataType(cf.getFieldType().getDataType())); udf.setSubjectArea(UserFieldDataType.inferUserFieldSubjectArea(cf.getFieldType())); udf.setTitle(cf.getAlias()); m_apibo.getUDFType().add(udf); } } }
[ "Add UDFType objects to a PM XML file.\n\n@author kmahan\n@date 2014-09-24\n@author lsong\n@date 2015-7-24" ]
[ "Add an event to the queue. It will be processed in the order received.\n\n@param event Event", "Pushes a basic event.\n\n@param eventName The name of the event", "Load the given class using the default constructor\n\n@param className The name of the class\n@return The class object", "Determine the relevant pieces of configuration which need to be included when processing the domain model.\n\n@param root the resource root\n@param requiredConfigurationHolder the resolution context\n@param serverConfig the server config\n@param extensionRegistry the extension registry", "Give next index i where i and i+timelag is valid", "Validates bic.\n\n@param bic to be validated.\n@throws BicFormatException if bic is invalid.\nUnsupportedCountryException if bic's country is not supported.", "This function is intended to detect the subset of IOException which are not\nconsidered recoverable, in which case we want to bubble up the exception, instead\nof retrying.\n\n@throws VoldemortException", "Return the available format ids.", "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" ]
public void prepareStatus() { globalLineCounter = new AtomicLong(0); time = new AtomicLong(System.currentTimeMillis()); startTime = System.currentTimeMillis(); lastCount = 0; // Status thread regularly reports on what is happening Thread statusThread = new Thread() { public void run() { while (true) { try { Thread.sleep(1000); } catch (InterruptedException e) { System.out.println("Status thread interrupted"); } long thisTime = System.currentTimeMillis(); long currentCount = globalLineCounter.get(); if (thisTime - time.get() > 1000) { long oldTime = time.get(); time.set(thisTime); double avgRate = 1000.0 * currentCount / (thisTime - startTime); double instRate = 1000.0 * (currentCount - lastCount) / (thisTime - oldTime); lastCount = currentCount; System.out.println(currentCount + " AvgRage:" + ((int) avgRate) + " lines/sec instRate:" + ((int) instRate) + " lines/sec Unassigned Work: " + remainingBlocks.get() + " blocks"); } } } }; statusThread.start(); }
[ "Establishes a thread that on one second intervals reports the number of remaining WorkBlocks enqueued and the\ntotal number of lines written and reported by consumers" ]
[ "create a new instance of class clazz.\nfirst use the public default constructor.\nIf this fails also try to use protected an private constructors.\n@param clazz the class to instantiate\n@return the fresh instance of class clazz\n@throws InstantiationException", "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", "Save current hostname and reuse it.\n\n@return hostname as String", "Performs a HTTP GET request.\n\n@return Class type of object T (i.e. {@link Response}", "Converts a sequence of unicode code points to a sequence of Java characters.\n\n@return the number of chars written to the destination buffer", "Use this API to fetch vlan_interface_binding resources of given name .", "Check given class modifiers. Plugin with resources plugin should not be private or abstract\nor interface.", "Use this API to fetch all the systemeventhistory resources that are configured on netscaler.\nThis uses systemeventhistory_args which is a way to provide additional arguments while fetching the resources.", "Converts the string of given content to an input stream.\n\n@param content the string content.\n@param charset the charset for conversion.\n@return the stream (should be closed by invoker)." ]
private void validateSegments(List<LogSegment> segments) { synchronized (lock) { for (int i = 0; i < segments.size() - 1; i++) { LogSegment curr = segments.get(i); LogSegment next = segments.get(i + 1); if (curr.start() + curr.size() != next.start()) { throw new IllegalStateException("The following segments don't validate: " + curr.getFile() .getAbsolutePath() + ", " + next.getFile().getAbsolutePath()); } } } }
[ "Check that the ranges and sizes add up, otherwise we have lost some data somewhere" ]
[ "Pause between cluster change in metadata and starting server rebalancing\nwork.", "Get the days difference", "Recursively loads the metadata for this node", "Use this API to disable clusterinstance resources of given names.", "Validates the inputed color value.\n@param colorvalue the value of the color\n@return true if the inputed color value is valid", "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", "Returns true if this Bytes object equals another. This method doesn't check it's arguments.\n\n@since 1.2.0", "This will create a line in the SDEF file for each calendar\nif there are more than 9 calendars, you'll have a big error,\nas USACE numbers them 0-9.\n\n@param records list of ProjectCalendar instances", "Gets or creates the a resource for the sub-deployment on the parent deployments resource.\n\n@param deploymentName the name of the deployment\n@param parent the parent deployment used to find the parent resource\n\n@return the already registered resource or a newly created resource" ]
public static ScheduledJob create(String cronExpression) { ScheduledJob res = new ScheduledJob(); res.cronExpression = cronExpression; return res; }
[ "Fluent API builder.\n\n@param cronExpression\n@return" ]
[ "A find query only given as criterion. Leave it to MongoDB's own parser to handle it.\n\n@return the {@link Rule} to identify a find query only", "Closes a Closeable and swallows any exceptions that might occur in the\nprocess.\n\n@param closeable", "Adds a new Token to the end of the linked list", "Find a toBuilder method, if the user has provided one.", "Adds an additional label to the constructed document.\n\n@param text\nthe text of the label\n@param languageCode\nthe language code of the label\n@return builder object to continue construction", "Utility method to retrieve the next working date start time, given\na date and time as a starting point.\n\n@param date date and time start point\n@return date and time of next work start", "Check that the parameter string is not null or empty\n\n@param value\nString value to be checked.\n@param parameterName\nThe name of the user-supplied parameter that we are validating\nso that the user can easily find the error in their code.\n@throws IllegalArgumentException\nIf the key is null or empty.", "if you want to convert some string to an object, you have an argument to parse", "Get image parent ID from imageID on the current agent.\n\n@param imageID\n@return" ]
public static String rgb(int r, int g, int b) { if (r < -100 || r > 100) { throw new IllegalArgumentException("Red value must be between -100 and 100, inclusive."); } if (g < -100 || g > 100) { throw new IllegalArgumentException("Green value must be between -100 and 100, inclusive."); } if (b < -100 || b > 100) { throw new IllegalArgumentException("Blue value must be between -100 and 100, inclusive."); } return FILTER_RGB + "(" + r + "," + g + "," + b + ")"; }
[ "This filter changes the amount of color in each of the three channels.\n\n@param r The amount of redness in the picture. Can range from -100 to 100 in percentage.\n@param g The amount of greenness in the picture. Can range from -100 to 100 in percentage.\n@param b The amount of blueness in the picture. Can range from -100 to 100 in percentage.\n@throws IllegalArgumentException if {@code r}, {@code g}, or {@code b} are outside of bounds." ]
[ "Print a date.\n\n@param value Date instance\n@return string representation of a date", "Print a constraint type.\n\n@param value ConstraintType instance\n@return constraint type value", "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", "Filter on a search term. Can be course name, code or full ID. Must be at least 3 characters\n@param searchTerm Search term to filter by\n@return This object to allow adding more options", "Create a forward curve from given times and discount factors.\n\nThe forward curve will have times.length-1 fixing times from times[0] to times[times.length-2]\n<code>\nforward[timeIndex] = (givenDiscountFactors[timeIndex]/givenDiscountFactors[timeIndex+1]-1.0) / (times[timeIndex+1] - times[timeIndex]);\n</code>\nNote: If time[0] &gt; 0, then the discount factor 1.0 will inserted at time 0.0\n\n@param name The name of this curve.\n@param times A vector of given time points.\n@param givenDiscountFactors A vector of given discount factors (corresponding to the given time points).\n@param paymentOffset The maturity of the underlying index modeled by this curve.\n@return A new ForwardCurve object.", "Adds the given service provider factory to the set of\nproviders for the service.\n\n@param serviceName\nThe fully qualified name of the service interface.\n@param factory\nA factory for creating a specific type of service\nprovider. May be <tt>null</tt> in which case this\nmethod does nothing.\n@throws IllegalArgumentException if serviceName is <tt>null</tt>", "Locate the no arg constructor for the class.", "Emit a string event with parameters and force all listeners to be called asynchronously.\n\n@param event\nthe target event\n@param args\nthe arguments passed in\n@see #emit(String, Object...)", "Plots the MSD curve with the trajectory t and adds the fitted model for directed motion above.\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 velocity velocity of the active transport" ]
public static void forceDelete(final Path path) throws IOException { if (!java.nio.file.Files.isDirectory(path)) { java.nio.file.Files.delete(path); } else { java.nio.file.Files.walkFileTree(path, DeleteDirVisitor.getInstance()); } }
[ "Deletes a path from the filesystem\n\nIf the path is a directory its contents\nwill be recursively deleted before it itself\nis deleted.\n\nNote that removal of a directory is not an atomic-operation\nand so if an error occurs during removal, some of the directories\ndescendants may have already been removed\n\n@throws IOException if an error occurs whilst removing a file or directory" ]
[ "Creates and populates a new task relationship.\n\n@param field which task field source of data\n@param sourceTask relationship source task\n@param relationship relationship string\n@throws MPXJException", "use this method to construct the ChainingIterator\niterator by iterator.", "Use this API to update sslcertkey resources.", "Used to add exceptions to the calendar. The MPX standard defines\na limit of 250 exceptions per calendar.\n\n@param fromDate exception start date\n@param toDate exception end date\n@return ProjectCalendarException instance", "Tells you if the expression is a null safe dereference.\n@param expression\nexpression\n@return\ntrue if is null safe dereference.", "Destroys an instance of the bean\n\n@param instance The instance", "Compute the A matrix from the Q and R matrices.\n\n@return The A matrix.", "Convert this lattice to store data in the given convention.\nConversion involving receiver premium assumes zero wide collar.\n\n@param targetConvention The convention to store the data in.\n@param displacement The displacement to use, if applicable.\n@param model The model for context.\n\n@return The converted lattice.", "Make an individual Datum out of the data list info, focused at position\nloc.\n@param info A List of WordInfo objects\n@param loc The position in the info list to focus feature creation on\n@param featureFactory The factory that constructs features out of the item\n@return A Datum (BasicDatum) representing this data instance" ]
public List<CmsCategory> getLeafItems() { List<CmsCategory> result = new ArrayList<CmsCategory>(); if (m_categories.isEmpty()) { return result; } Iterator<CmsCategory> it = m_categories.iterator(); CmsCategory current = it.next(); while (it.hasNext()) { CmsCategory next = it.next(); if (!next.getPath().startsWith(current.getPath())) { result.add(current); } current = next; } result.add(current); return result; }
[ "Returns only the leaf categories of the wrapped categories.\n\nThe method assumes that categories are ordered in the list, i.e., parents are directly followed by their children.\n\nNOTE: In the complete category tree a leaf of the wrapped tree part may not be a leaf.\n\n@return only the leaf categories of the wrapped categories." ]
[ "Use this API to fetch all the nspbr6 resources that are configured on netscaler.\nThis uses nspbr6_args which is a way to provide additional arguments while fetching the resources.", "Use this API to fetch auditnslogpolicy_systemglobal_binding resources of given name .", "Stores a new certificate and its associated private key in the keystore.\n@param hostname\n@param cert\n@param privKey @throws KeyStoreException\n@throws CertificateException\n@throws NoSuchAlgorithmException", "Use this API to fetch snmpalarm resource of given name .", "Retrieve list of resource extended attributes.\n\n@return list of extended attributes", "Sets the matrix 'inv' equal to the inverse of the matrix that was decomposed.\n\n@param inv Where the value of the inverse will be stored. Modified.", "Performs a get all operation with the specified composite request object\n\n@param requestWrapper Composite request object containing a reference to\nthe Iterable keys\n\n@return Map of the keys to the corresponding versioned values", "Use this API to fetch transformpolicy resource of given name .", "The indices space is ignored for reduce ops other than min or max." ]
public void checkConstraints(String checkLevel) throws ConstraintException { // check constraints now after all classes have been processed for (Iterator it = getClasses(); it.hasNext();) { ((ClassDescriptorDef)it.next()).checkConstraints(checkLevel); } // additional model constraints that either deal with bigger parts of the model or // can only be checked after the individual classes have been checked (e.g. specific // attributes have been ensured) new ModelConstraints().check(this, checkLevel); }
[ "Checks constraints on this model.\n\n@param checkLevel The amount of checks to perform\n@throws ConstraintException If a constraint has been violated" ]
[ "Opens file for editing.\n\n@param currentChangeListId The current change list id to open the file for editing at\n@param filePath The filePath which contains the file we need to edit\n@throws IOException Thrown in case of perforce communication errors\n@throws InterruptedException", "Provisions a new app user in an enterprise using Box Developer Edition.\n@param api the API connection to be used by the created user.\n@param name the name of the user.\n@return the created user's info.", "Detect numbers using comma as a decimal separator and replace with period.\n\n@param value original numeric value\n@return corrected numeric value", "Adds a redeploy step to the composite operation.\n\n@param builder the builder to add the step to\n@param deployment the deployment being redeployed", "Validate that the configuration is valid.\n\n@return any validation errors.", "1-D Backward Discrete Cosine Transform.\n\n@param data Data.", "Use this API to fetch aaagroup_authorizationpolicy_binding resources of given name .", "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\"", "Copied from original SeleniumProxyHandler\nChanged SslRelay to SslListener and getSslRelayOrCreateNew to getSslRelayOrCreateNewOdo\nNo other changes to the function\n\n@param pathInContext\n@param pathParams\n@param request\n@param response\n@throws HttpException\n@throws IOException" ]
private static Object checkComponentType(Object array, Class<?> expectedComponentType) { Class<?> actualComponentType = array.getClass().getComponentType(); if (!expectedComponentType.isAssignableFrom(actualComponentType)) { throw new ArrayStoreException( String.format("The expected component type %s is not assignable from the actual type %s", expectedComponentType.getCanonicalName(), actualComponentType.getCanonicalName())); } return array; }
[ "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." ]
[ "Create a new instance of a single input function from an operator character\n@param op Which operation\n@param input Input variable\n@return Resulting operation", "Sets the value of a UDF.\n\n@param udf user defined field\n@param dataType MPXJ data type\n@param value field value", "Check that the parameter array has at least as many elements as it\nshould.\n\n@param parameterName\nThe name of the user-supplied parameter that we are validating\nso that the user can easily find the error in their code.\n@param actualLength\nThe actual array length\n@param minimumLength\nThe minimum array length", "Retrieve all Collection attributes of a given instance, and make all of the Proxy Collections\n\n@param newObj the instance to be loaded or refreshed\n@param cld the ClassDescriptor of the instance\n@param forced if set to true, loading is forced even if cld differs", "Establish a new tempo master, and if it is a change from the existing one, report it to the listeners.\n\n@param newMaster the packet which caused the change of masters, or {@code null} if there is now no master.", "Apply the necessary rotation to the transform so that it is in front of\nthe camera. The actual rotation is performed not using the yaw angle but\nusing equivalent quaternion values for better accuracy. But the yaw angle\nis still returned for backward compatibility.\n\n@param widget The transform to modify.\n@return The camera's yaw in degrees.", "Deletes all outgoing links of specified entity.\n\n@param entity the entity.", "Returns the currently set filters in a map column -> filter.\n\n@return the currently set filters in a map column -> filter.", "Retrieves the yearly absolute date.\n\n@param data recurrence data\n@return yearly absolute date" ]
public static nsrpcnode get(nitro_service service, String ipaddress) throws Exception{ nsrpcnode obj = new nsrpcnode(); obj.set_ipaddress(ipaddress); nsrpcnode response = (nsrpcnode) obj.get_resource(service); return response; }
[ "Use this API to fetch nsrpcnode resource of given name ." ]
[ "Returns the command line options to be used for scalaxb, excluding the\ninput file names.", "Main entry point to read criteria data.\n\n@param properties project properties\n@param data criteria data block\n@param dataOffset offset of the data start within the larger data block\n@param entryOffset offset of start node for walking the tree\n@param prompts optional list to hold prompts\n@param fields optional list of hold fields\n@param criteriaType optional array representing criteria types\n@return first node of the criteria", "Read an unsigned integer from the given byte array\n\n@param bytes The bytes to read from\n@param offset The offset to begin reading at\n@return The integer as a long", "Gets the path used for the results of XSLT Transforms.", "Check if values in the column \"property\" are written to the bundle files.\n@param property the property id of the table column.\n@return a flag, indicating if values of the table column are stored to the bundle files.", "Turn given source String array into sorted array.\n\n@param array the source array\n@return the sorted array (never <code>null</code>)", "Registers a new user with the given email and password.\n\n@param email the email to register with. This will be the username used during log in.\n@param password the password to associated with the email. The password must be between\n6 and 128 characters long.\n@return A {@link Task} that completes when registration completes/fails.", "This is the original, naive implementation, using the Wagner &\nFischer algorithm from 1974. It uses a flattened matrix for\nspeed, but still computes the entire matrix.", "Tells you if an expression is the expected constant.\n@param expression\nany expression\n@param expected\nthe expected int or String\n@return\nas described" ]
public static void writeCorrelationId(Message message, String correlationId) { if (!(message instanceof SoapMessage)) { return; } SoapMessage soapMessage = (SoapMessage) message; Header hdCorrelationId = soapMessage.getHeader(CORRELATION_ID_QNAME); if (hdCorrelationId != null) { LOG.warning("CorrelationId already existing in soap header, need not to write CorrelationId header."); return; } if ((soapMessage.getContent(javax.xml.stream.XMLStreamWriter.class) != null) && (soapMessage.getContent(javax.xml.stream.XMLStreamWriter.class) instanceof SAAJStreamWriter) && (((SAAJStreamWriter) soapMessage.getContent(javax.xml.stream.XMLStreamWriter.class)) .getDocument() .getElementsByTagNameNS("http://www.talend.com/esb/sam/correlationId/v1", "correlationId").getLength() > 0)) { LOG.warning("CorrelationId already existing in soap header, need not to write CorrelationId header."); return; } try { soapMessage.getHeaders().add( new Header(CORRELATION_ID_QNAME, correlationId, new JAXBDataBinding(String.class))); if (LOG.isLoggable(Level.FINE)) { LOG.fine("Stored correlationId '" + correlationId + "' in soap header: " + CORRELATION_ID_QNAME); } } catch (JAXBException e) { LOG.log(Level.SEVERE, "Couldn't create correlationId header.", e); } }
[ "Write correlation id to message.\n\n@param message the message\n@param correlationId the correlation id" ]
[ "Gets a SerialMessage with the SENSOR_ALARM_GET command\n@return the serial message", "Creates a new Box Developer Edition connection with App User token.\n@param userId the user ID to use for an App User.\n@param clientId the client ID to use when exchanging the JWT assertion for an access token.\n@param clientSecret the client secret to use when exchanging the JWT assertion for an access token.\n@param encryptionPref the encryption preferences for signing the JWT.\n@param accessTokenCache the cache for storing access token information (to minimize fetching new tokens)\n@return a new instance of BoxAPIConnection.", "Counts the number of elements in A which are true\n@param A input matrix\n@return number of true elements", "Read resource data.", "Fills a rectangle in the image.\n\n@param x rect�s start position in x-axis\n@param y rect�s start positioj in y-axis\n@param w rect�s width\n@param h rect�s height\n@param c rect�s color", "generate a prepared DELETE-Statement for the Class\ndescribed by cld.\n@param cld the ClassDescriptor", "Sets the upper limits for the \"moving\" body translation relative to joint point.\n\n@param limitX the X upper lower translation limit\n@param limitY the Y upper lower translation limit\n@param limitZ the Z upper lower translation limit", "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", "Checks the hour, minute and second are equal." ]
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 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", "Resize the given mesh keeping its aspect ration.\n@param mesh Mesh to be resized.\n@param size Max size for the axis.", "Use this API to fetch appfwlearningsettings resource of given name .", "Gets a list of AssignmentRows based on the current Assignments\n@return", "If the Artifact does not exist, it will add it to the database. Nothing if it already exit.\n\n@param fromClient DbArtifact", "Computes eigenvalues only\n\n@return", "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.", "Specifies the container object class to be instantiated\n\n@param containerObjectClass\ncontainer object class to be instantiated\n\n@return the current builder instance", "Write the auxiliary RDF data for encoding the given value.\n\n@param value\nthe value to write\n@param resource\nthe (subject) URI to use to represent this value in RDF\n@throws RDFHandlerException" ]
private static String loadUA(ClassLoader loader, String filename){ String ua = "cloudant-http"; String version = "unknown"; final InputStream propStream = loader.getResourceAsStream(filename); final Properties properties = new Properties(); try { if (propStream != null) { try { properties.load(propStream); } finally { propStream.close(); } } ua = properties.getProperty("user.agent.name", ua); version = properties.getProperty("user.agent.version", version); } catch (IOException e) { // Swallow exception and use default values. } return String.format(Locale.ENGLISH, "%s/%s", ua,version); }
[ "Loads the properties file using the classloader provided. Creating a string from the properties\n\"user.agent.name\" and \"user.agent.version\".\n@param loader The class loader to use to load the resource.\n@param filename The name of the file to load.\n@return A string that represents the first part of the UA string eg java-cloudant/2.6.1" ]
[ "Search one prototype using the prototype index which is equals to the view type. This method\nhas to be implemented because prototypes member is declared with Collection and that interface\ndoesn't allow the client code to get one element by index.\n\n@param prototypeIndex used to search.\n@return prototype renderer.", "Searches for a sequence of integers\n\nexample:\n1 2 3 4 6 7 -3", "Sets the top padding character for all cells in the row.\n@param paddingTopChar new padding character, ignored if null\n@return this to allow chaining", "Apply a filter to the list of all resources, and show the results.\n\n@param project project file\n@param filter filter", "Checks the status of one or more asynchronous photo upload tickets. This method does not require authentication.\n\n@param tickets\na set of ticket ids (Strings) or {@link Ticket} objects containing ids\n@return a list of {@link Ticket} objects.\n@throws FlickrException", "Allow for the use of text shading and auto formatting.", "at this point definition below is not really needed as it is the same as for 1.1, but it is here as place holder when subsystem parser evolves.", "Copy the given Collection into a Class array.\nThe Collection must contain Class elements only.\n@param collection the Collection to copy\n@return the Class array ({@code null} if the passed-in\nCollection was {@code null})", "returns true if a job was queued within a timeout" ]
public void deleteStoreDefinition(String storeName) { // acquire write lock writeLock.lock(); try { // Check if store exists if(!this.storeNames.contains(storeName)) { throw new VoldemortException("Requested store to be deleted does not exist !"); } // Otherwise remove from the STORES directory. Note: The version // argument is not required here since the // ConfigurationStorageEngine simply ignores this. this.storeDefinitionsStorageEngine.delete(storeName, null); // Update the metadata cache this.metadataCache.remove(storeName); // Re-initialize the store definitions. This is primarily required // to re-create the value for key: 'stores.xml'. This is necessary // for backwards compatibility. initStoreDefinitions(null); } finally { writeLock.unlock(); } }
[ "Function to delete the specified store from Metadata store. This involves\n\n1. Remove entry from the ConfigurationStorageEngine for STORES.\n\n2. Update the metadata cache.\n\n3. Re-create the 'stores.xml' key\n\n@param storeName specifies name of the store to be deleted." ]
[ "Add a value to this activity code.\n\n@param uniqueID value unique ID\n@param name value name\n@param description value description\n@return ActivityCodeValue instance", "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", "Internal method used to retrieve a integer from an\nembedded data block.\n\n@param blocks list of data blocks\n@return int value", "Check if all cluster objects in the list are congruent.\n\n@param clusterUrls of cluster objects\n@return", "Curries a procedure that takes one argument.\n\n@param procedure\nthe original procedure. May not be <code>null</code>.\n@param argument\nthe fixed argument.\n@return a procedure that takes no arguments. Never <code>null</code>.", "Only call async", "Use this API to fetch all the vridparam resources that are configured on netscaler.", "Sets a default style for every element that doesn't have one\n\n@throws JRException", "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" ]
public String renameApp(String appName, String newName) { return connection.execute(new AppRename(appName, newName), apiKey).getName(); }
[ "Rename an existing app.\n@param appName Existing app name. See {@link #listApps()} for names that can be used.\n@param newName New name to give the existing app.\n@return the new name of the object" ]
[ "If you register a CustomExpression with the name \"customExpName\", then this will create the text needed\nto invoke it in a JRDesignExpression\n\n@param customExpName\n@param usePreviousFieldValues\n@return", "Mark for creation all newly introduced dependent references.\nMark for deletion all nullified dependent references.\n@return the list of created objects", "Move the SQL value to the next one for version processing.", "Use this API to clear nsconfig.", "Retrieve the parent task based on its WBS.\n\n@param wbs parent WBS\n@return parent task", "change server state between OFFLINE_SERVER and NORMAL_SERVER\n\n@param setToOffline True if set to OFFLINE_SERVER", "Main database initialization. To be called only when _ds is a valid DataSource.", "Returns a source excerpt of the type parameters of this type, including angle brackets.\nAlways an empty string if the type class is not generic.\n\n<p>e.g. {@code <N, C>}", "Adds all edges for a given object envelope vertex. All edges are\nadded to the edgeList map.\n@param vertex the Vertex object to find edges for" ]