query
stringlengths
74
6.1k
positive
sequencelengths
1
1
negative
sequencelengths
9
9
public EventBus emitAsync(Enum<?> event, Object... args) { return _emitWithOnceBus(eventContextAsync(event, args)); }
[ "Emit an enum 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(Enum, Object...)" ]
[ "Sets the database dialect.\n\n@param dialect\nthe database dialect", "Search for interesting photos using the Flickr Interestingness algorithm.\n\n@param params\nAny search parameters\n@param perPage\nNumber of items per page\n@param page\nThe page to start on\n@return A PhotoList\n@throws FlickrException", "Prints a suggestion to stderr for the argument based on the levenshtein distance metric\n\n@param arg the argument which could not be assigned to a flag\n@param co the {@link ConfigOption} List where every flag is stored", "Builder method for specifying the name of an app.\n@param name The name to give an app.\n@return A copy of the {@link App}", "Switches from a sparse to dense matrix", "Set dates where the event should not take place, even if they are part of the series.\n@param dates dates to set.", "Assemble and send a packet that performs sync control, turning a device's sync mode on or off, or telling it\nto become the tempo master.\n\n@param target an update from the device whose sync state is to be set\n@param command the byte identifying the specific sync command to be sent\n\n@throws IOException if there is a problem sending the command to the device", "Checks to see if all the diagonal elements in the matrix are positive.\n\n@param a A matrix. Not modified.\n@return true if all the diagonal elements are positive, false otherwise.", "Creates a unique name, suitable for use with Resque.\n\n@return a unique name for this worker" ]
private void getAllDependents(Set<PathEntry> result, String name) { Set<String> depNames = dependenctRelativePaths.get(name); if (depNames == null) { return; } for (String dep : depNames) { PathEntry entry = pathEntries.get(dep); if (entry != null) { result.add(entry); getAllDependents(result, dep); } } }
[ "Call with pathEntries lock taken" ]
[ "Returns the connection count by key specified in this registry\n\nNote it might count connections that are closed but not removed from registry yet\n\n@param key\nthe key\n@return connection count by key", "Send message to socket's output stream.\n\n@param messageToSend message to send.\n\n@return {@code true} if message was sent successfully, {@code false} otherwise.", "Use this API to update nspbr6.", "capture center eye", "Remove the group and all references to it\n\n@param groupId ID of group", "Merges the two classes into a single class. The smaller class is\nremoved, while the largest class is kept.", "Releases a database connection, and cleans up any resources\nassociated with that connection.", "Split string of comma-delimited ints into an a int array\n\n@param str\n@return\n@throws IllegalArgumentException", "Sets the value to a default." ]
public MediaType copyQualityValue(MediaType mediaType) { if (!mediaType.parameters.containsKey(PARAM_QUALITY_FACTOR)) { return this; } Map<String, String> params = new LinkedHashMap<String, String>(this.parameters); params.put(PARAM_QUALITY_FACTOR, mediaType.parameters.get(PARAM_QUALITY_FACTOR)); return new MediaType(this, params); }
[ "Return a replica of this instance with the quality value of the given MediaType.\n@return the same instance if the given MediaType doesn't have a quality value, or a new one otherwise" ]
[ "Utility function that pauses and asks for confirmation on dangerous\noperations.\n\n@param confirm User has already confirmed in command-line input\n@param opDesc Description of the dangerous operation\n@throws IOException\n@return True if user confirms the operation in either command-line input\nor here.", "Returns the compact records for all teams to which user is assigned.\n\n@param user An identifier for the user. Can be one of an email address,\nthe globally unique identifier for the user, or the keyword `me`\nto indicate the current user making the request.\n@return Request object", "Prepare the document before rendering.\n\n@param outputStream output stream to render to, null if only for layout\n@param format format\n@throws DocumentException oops\n@throws IOException oops\n@throws PrintingException oops", "perform the actual matching", "Clears the internal used cache for object materialization.", "Use this API to fetch the statistics of all appfwprofile_stats resources that are configured on netscaler.", "This method writes project properties to a Planner file.", "Fixed length fancy formatting for doubles. If possible decimal notation is used. If all the significant digits\ncan't be shown then it will switch to exponential notation. If not all the space is needed then it will\nbe filled in to ensure it has the specified length.\n\n@param value value being formatted\n@param format default format before exponential\n@param length Maximum number of characters it can take.\n@param significant Number of significant decimal digits to show at a minimum.\n@return formatted string", "Delivers the correct JSON Object for the Stencilset\n\n@param stencilSet\n@throws org.json.JSONException" ]
public static boolean bidiagOuterBlocks( final int blockLength , final DSubmatrixD1 A , final double gammasU[], final double gammasV[]) { // System.out.println("---------- Orig"); // A.original.print(); int width = Math.min(blockLength,A.col1-A.col0); int height = Math.min(blockLength,A.row1-A.row0); int min = Math.min(width,height); for( int i = 0; i < min; i++ ) { //--- Apply reflector to the column // compute the householder vector if (!computeHouseHolderCol(blockLength, A, gammasU, i)) return false; // apply to rest of the columns in the column block rank1UpdateMultR_Col(blockLength,A,i,gammasU[A.col0+i]); // apply to the top row block rank1UpdateMultR_TopRow(blockLength,A,i,gammasU[A.col0+i]); System.out.println("After column stuff"); A.original.print(); //-- Apply reflector to the row if(!computeHouseHolderRow(blockLength,A,gammasV,i)) return false; // apply to rest of the rows in the row block rank1UpdateMultL_Row(blockLength,A,i,i+1,gammasV[A.row0+i]); System.out.println("After update row"); A.original.print(); // apply to the left column block // TODO THIS WON'T WORK!!!!!!!!!!!!! // Needs the whole matrix to have been updated by the left reflector to compute the correct solution // rank1UpdateMultL_LeftCol(blockLength,A,i,i+1,gammasV[A.row0+i]); System.out.println("After row stuff"); A.original.print(); } return true; }
[ "Performs a standard bidiagonal decomposition just on the outer blocks of the provided matrix\n\n@param blockLength\n@param A\n@param gammasU" ]
[ "Vend a SessionVar with the default value", "Sort MapRows based on a named attribute.\n\n@param rows map rows to sort\n@param attribute attribute to sort on\n@return list argument (allows method chaining)", "Use this API to clear nsconfig.", "Gets a byte within this sequence of bytes\n\n@param i index into sequence\n@return byte\n@throws IllegalArgumentException if i is out of range", "Try to set specified property to given marshaller\n\n@param marshaller specified marshaller\n@param name name of property to set\n@param value value of property to set", "Tells you if the expression is true, which can be true or Boolean.TRUE.\n@param expression\nexpression\n@return\nas described", "All address strings are comparable. If two address strings are invalid, their strings are compared.\nOtherwise, address strings are compared according to which type or version of string, and then within each type or version\nthey are compared using the comparison rules for addresses.\n\n@param other\n@return", "This method can be called to ensure that the IDs of all\nentities are sequential, and start from an\nappropriate point. If entities are added to and removed from\nthis list, then the project is loaded into Microsoft\nproject, if the ID values have gaps in the sequence, there will\nbe blank rows shown.", "Copy one Gradient into another.\n@param g the Gradient to copy into" ]
public static configstatus[] get(nitro_service service) throws Exception{ configstatus obj = new configstatus(); configstatus[] response = (configstatus[])obj.get_resources(service); return response; }
[ "Use this API to fetch all the configstatus resources that are configured on netscaler." ]
[ "Process a SQLite database PP file.\n\n@param inputStream file input stream\n@return ProjectFile instance", "Processes the template for all index descriptors of the current class definition.\n\n@param template The template\n@param attributes The attributes of the tag\n@exception XDocletException if an error occurs\[email protected] type=\"block\"", "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>.", "Removes the specified type from the frame.", "Use this API to fetch vpnvserver_authenticationsamlpolicy_binding resources of given name .", "Prints command-line help menu.", "Calculates the middle point between two points and multiplies its coordinates with the given\nsmoothness _Mulitplier.\n@param _P1 First point\n@param _P2 Second point\n@param _Result Resulting point\n@param _Multiplier Smoothness multiplier", "a useless object at the top level of the response JSON for no reason at all.", "Disallow the job type from being executed.\n@param jobType the job type to disallow" ]
public void applyXMLDSigAsFirstChild (@Nonnull final PrivateKey aPrivateKey, @Nonnull final X509Certificate aCertificate, @Nonnull final Document aDocument) throws Exception { ValueEnforcer.notNull (aPrivateKey, "privateKey"); ValueEnforcer.notNull (aCertificate, "certificate"); ValueEnforcer.notNull (aDocument, "document"); ValueEnforcer.notNull (aDocument.getDocumentElement (), "Document is missing a document element"); if (aDocument.getDocumentElement ().getChildNodes ().getLength () == 0) throw new IllegalArgumentException ("Document element has no children!"); // Check that the document does not contain another Signature element final NodeList aNodeList = aDocument.getElementsByTagNameNS (XMLSignature.XMLNS, XMLDSigSetup.ELEMENT_SIGNATURE); if (aNodeList.getLength () > 0) throw new IllegalArgumentException ("Document already contains an XMLDSig Signature element!"); // Create the XMLSignature, but don't sign it yet. final XMLSignature aXMLSignature = createXMLSignature (aCertificate); // Create a DOMSignContext and specify the RSA PrivateKey and // location of the resulting XMLSignature's parent element. // -> The signature is always the first child element of the document // element for ebInterface final DOMSignContext aDOMSignContext = new DOMSignContext (aPrivateKey, aDocument.getDocumentElement (), aDocument.getDocumentElement ().getFirstChild ()); // The namespace prefix to be used for the signed XML aDOMSignContext.setDefaultNamespacePrefix (DEFAULT_NS_PREFIX); // Marshal, generate, and sign the enveloped signature. aXMLSignature.sign (aDOMSignContext); }
[ "Apply an XMLDSig onto the passed document.\n\n@param aPrivateKey\nThe private key used for signing. May not be <code>null</code>.\n@param aCertificate\nThe certificate to be used. May not be <code>null</code>.\n@param aDocument\nThe document to be signed. The signature will always be the first\nchild element of the document element. The document may not contains\nany disg:Signature element. This element is inserted manually.\n@throws Exception\nIn case something goes wrong\n@see #createXMLSignature(X509Certificate)" ]
[ "END ODO CHANGES", "Find the index of this animation if it is in this animator.\n\n@param findme {@link GVRAnimation} to find.\n@returns 0 based index of animation or -1 if not found\n@see GVRAnimator#addAnimation(GVRAnimation)", "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", "Use this API to delete cacheselector resources of given names.", "Returns the compact records for all teams in the organization visible to\nthe authorized user.\n\n@param organization Globally unique identifier for the workspace or organization.\n@return Request object", "Starts or stops capturing.\n\n@param capture If true, capturing is started. If false, it is stopped.\n@param fps Capturing FPS (frames per second).", "Mark a PersistenceBroker as preferred choice for current Thread\n\n@param key The PBKey the broker is associated to\n@param broker The PersistenceBroker to mark as current", "Returns the x-coordinate of a vertex position.\n\n@param vertex the vertex index\n@return the x coordinate", "Generates a Map of query parameters for Module regarding the filters\n\n@return Map<String, Object>" ]
public URI build() { try { String uriString = String.format("%s%s", baseUri.toASCIIString(), (path.isEmpty() ? "" : path)); if(qParams != null && qParams.size() > 0) { //Add queries together if both exist if(!completeQuery.isEmpty()) { uriString = String.format("%s?%s&%s", uriString, getJoinedQuery(qParams.getParams()), completeQuery); } else { uriString = String.format("%s?%s", uriString, getJoinedQuery(qParams.getParams())); } } else if(!completeQuery.isEmpty()) { uriString = String.format("%s?%s", uriString, completeQuery); } return new URI(uriString); } catch (URISyntaxException e) { throw new IllegalArgumentException(e); } }
[ "Build and return the complete URI containing values\nsuch as the document ID, attachment ID, and query syntax." ]
[ "given is at the begining, of is at the end", "Iterates over the contents of an object or collection, and checks whether a\npredicate is valid for at least one element.\n\n@param self the object over which we iterate\n@param closure the closure predicate used for matching\n@return true if any iteration for the object matches the closure predicate\n@since 1.0", "Delete rows that match the prepared statement.", "This is the probability density function for the Gaussian\ndistribution.", "This method formats a time unit.\n\n@param timeUnit time unit instance\n@return formatted time unit instance", "Adds the deploy operation as a step to the composite operation.\n\n@param builder the builder to add the step to\n@param deployment the deployment to deploy", "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>", "Retrieves the class object for the class with the given name.\n\n@param name The class name\n@return The class object\n@throws ClassNotFoundException If the class is not on the classpath (the exception message contains the class name)", "Add a IN clause so the column must be equal-to one of the objects from the list passed in." ]
private void applyProperties(AssociationKey associationKey, Tuple associationRow, Relationship relationship) { String[] indexColumns = associationKey.getMetadata().getRowKeyIndexColumnNames(); for ( int i = 0; i < indexColumns.length; i++ ) { String propertyName = indexColumns[i]; Object propertyValue = associationRow.get( propertyName ); relationship.setProperty( propertyName, propertyValue ); } }
[ "The only properties added to a relationship are the columns representing the index of the association." ]
[ "Determines whether the object is a materialized object, i.e. no proxy or a\nproxy that has already been loaded from the database.\n\n@param object The object to test\n@return <code>true</code> if the object is materialized", "Sends a dummy statement to the server to keep the connection alive\n@param connection Connection handle to perform activity on\n@return true if test query worked, false otherwise", "Add custom fields to the tree.\n\n@param parentNode parent tree node\n@param file custom fields container", "Forceful cleanup the logs", "Set the pointer on the bar. With the Value value.\n\n@param value float between 0 and 1", "Read the header from the Phoenix file.\n\n@param stream input stream\n@return raw header data", "Whether the given column is part of this key family or not.\n\n@return {@code true} if the given column is part of this key, {@code false} otherwise.", "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.", "Set the degrees of rotation. Value will be set to -1, if not available.\n\n@param rotation" ]
public <FV> FV getFieldValueIfNotDefault(Object object) throws SQLException { @SuppressWarnings("unchecked") FV fieldValue = (FV) extractJavaFieldValue(object); if (isFieldValueDefault(fieldValue)) { return null; } else { return fieldValue; } }
[ "Return the value of field in the data argument if it is not the default value for the class. If it is the default\nthen null is returned." ]
[ "Organises the data from Asta into a hierarchy and converts this into tasks.\n\n@param bars bar data\n@param expandedTasks expanded task data\n@param tasks task data\n@param milestones milestone data", "Use this API to fetch the statistics of all rnat_stats resources that are configured on netscaler.", "Returns the flag, indicating if the characters in the query string that are commands to Solr should be escaped.\n@return the flag, indicating if the characters in the query string that are commands to Solr should be escaped.", "Use this API to kill systemsession.", "It is required that T be Serializable", "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.", "Used to determine if multiple cost rates apply to this assignment.\n\n@return true if multiple cost rates apply to this assignment", "Calculates ATM Bachelier implied volatilities.\n\n@see net.finmath.functions.AnalyticFormulas#bachelierOptionImpliedVolatility(double, double, double, double, double)\n\n@param optionValue RandomVarable representing the value of the option\n@param optionMaturity Time to maturity.\n@param swapAnnuity The swap annuity as seen on valuation time.\n@return The Bachelier implied volatility.", "Read the top level tasks from GanttProject.\n\n@param gpProject GanttProject project" ]
@UiHandler("m_currentTillEndCheckBox") void onCurrentTillEndChange(ValueChangeEvent<Boolean> event) { if (handleChange()) { m_controller.setCurrentTillEnd(event.getValue()); } }
[ "Handle a \"current till end\" change event.\n@param event the change event." ]
[ "Try to build an default PBKey for convenience PB create method.\n\n@return PBKey or <code>null</code> if default key was not declared in\nmetadata", "Formats a double value.\n\n@param number numeric value\n@return Double instance", "Send post request.\n\n@param url the url\n@param customHeaders the customHeaders\n@param params the params\n@return the string\n@throws IOException the io exception", "Set the given column name to the given value.\n\n@param name The column name to set.\n@param value the value to set.\n@return {@code this}\n@throws IllegalArgumentException if a column name does not exist in the table.", "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", "returns a unique long value for class clazz and field fieldName.\nthe returned number is unique accross all tables in the extent of clazz.", "Returns if a MongoDB document is a todo item.", "Parses and removes embedded gallery configuration strings.\n\n@param configuration the configuration string to parse\n\n@return a map containing both the string resulting from removing the embedded configurations, and the embedded configurations as a a map", "Use this API to fetch all the inat resources that are configured on netscaler." ]
public static double TruncatedPower(double value, double degree) { double x = Math.pow(value, degree); return (x > 0) ? x : 0.0; }
[ "Truncated power function.\n\n@param value Value.\n@param degree Degree.\n@return Result." ]
[ "Is alternative.\n\n@param annotated the annotated\n@param mergedStereotypes merged stereotypes\n@return true if alternative, false otherwise", "Gets an iterable of all the collections for the given user.\n@param api the API connection to be used when retrieving the collections.\n@return an iterable containing info about all the collections.", "Shutdown the container.\n\n@see Weld#initialize()", "Assign to the data object the val corresponding to the fieldType.", "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", "Processes the template for all procedure arguments of the current procedure.\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\"", "Unchecks the widget by index\n@param checkableIndex The index is in the range from 0 to size -1, where size is the number of\nCheckable widgets in the group. It does not take into account any\nnon-Checkable widgets added to the group widget.\n@return {@code True} if {@code checkableWidget} is a child of this {@code CheckableGroup} and\nwas not already unchecked; {@code false} otherwise.", "Executed read-resource-description and returns access-control info.\nReturns null in case there was any kind of problem.\n\n@param client\n@param address\n@return", "Removes a value from the list box. Nothing is done if the value isn't on\nthe list box.\n\n@param value the value to be removed from the list\n@param reload perform a 'material select' reload to update the DOM." ]
protected void addRow(int uniqueID, Map<String, Object> map) { m_rows.put(Integer.valueOf(uniqueID), new MapRow(map)); }
[ "Adds a row to the internal storage, indexed by primary key.\n\n@param uniqueID unique ID of the row\n@param map row data as a simpe map" ]
[ "Returns the key of the entity targeted by the represented association, retrieved from the given tuple.\n\n@param tuple the tuple from which to retrieve the referenced entity key\n@return the key of the entity targeted by the represented association", "Use this API to fetch onlinkipv6prefix resource of given name .", "This filter permit to return an image sized exactly as requested wherever is its ratio by\nfilling with chosen color the missing parts. Usually used with \"fit-in\" or \"adaptive-fit-in\"\n\n@param color integer representation of color.", "The specified interface must not contain methods, that changes the state of this object itself.\n\n@param code\nsource code of an interface which describes how to generate the <i>immutable</i>\n@param settings\nsettings to generate code\n@return generated source code as string in a result wrapper", "Detects if the current browser is a BlackBerry Touch\ndevice, such as the Storm, Torch, and Bold Touch. Excludes the Playbook.\n@return detection of a Blackberry touchscreen device", "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", "Returns a ReportWriter that which will use memory or a file depending on the parameter PAGES_THRESHOLD\n@param _jasperPrint\n@param _format\n@param _parameters\n@return", "Attempts to return the token from cache. If this is not possible because it is expired or was\nnever assigned, a new token is requested and parallel requests will block on retrieving a new\ntoken. As such no guarantee of maximum latency is provided.\n\nTo avoid blocking the token is refreshed before it's expiration, while parallel requests\ncontinue to use the old token.", "set custom response or request for a profile's default client, ensures profile and path are enabled\n\n@param profileName profileName to modift, default client is used\n@param pathName friendly name of path\n@param isResponse true if response, false for request\n@param customData custom response/request data\n@return true if success, false otherwise" ]
protected void addProcessedData(List<List<CRFDatum<Collection<String>, String>>> processedData, int[][][][] data, int[][] labels, int offset) { for (int i = 0, pdSize = processedData.size(); i < pdSize; i++) { int dataIndex = i + offset; List<CRFDatum<Collection<String>, String>> document = processedData.get(i); int dsize = document.size(); labels[dataIndex] = new int[dsize]; data[dataIndex] = new int[dsize][][]; for (int j = 0; j < dsize; j++) { CRFDatum<Collection<String>, String> crfDatum = document.get(j); // add label, they are offset by extra context labels[dataIndex][j] = classIndex.indexOf(crfDatum.label()); // add features List<Collection<String>> cliques = crfDatum.asFeatures(); int csize = cliques.size(); data[dataIndex][j] = new int[csize][]; for (int k = 0; k < csize; k++) { Collection<String> features = cliques.get(k); // Debug only: Remove // if (j < windowSize) { // System.err.println("addProcessedData: Features Size: " + // features.size()); // } data[dataIndex][j][k] = new int[features.size()]; int m = 0; try { for (String feature : features) { // System.err.println("feature " + feature); // if (featureIndex.indexOf(feature)) ; if (featureIndex == null) { System.out.println("Feature is NULL!"); } data[dataIndex][j][k][m] = featureIndex.indexOf(feature); m++; } } catch (Exception e) { e.printStackTrace(); System.err.printf("[index=%d, j=%d, k=%d, m=%d]\n", dataIndex, j, k, m); System.err.println("data.length " + data.length); System.err.println("data[dataIndex].length " + data[dataIndex].length); System.err.println("data[dataIndex][j].length " + data[dataIndex][j].length); System.err.println("data[dataIndex][j][k].length " + data[dataIndex][j].length); System.err.println("data[dataIndex][j][k][m] " + data[dataIndex][j][k][m]); return; } } } } }
[ "Adds the List of Lists of CRFDatums to the data and labels arrays, treating\neach datum as if it were its own document. Adds context labels in addition\nto the target label for each datum, meaning that for a particular document,\nthe number of labels will be windowSize-1 greater than the number of\ndatums.\n\n@param processedData\na List of Lists of CRFDatums" ]
[ "Create a new DateTime. To the last second. This will not create any\nextra-millis-seconds, which may cause bugs when writing to stores such as\ndatabases that round milli-seconds up and down.", "Lookup the group for the specified URL.\n\n@param url\nThe url\n@return The group\n@throws FlickrException", "Bessel function of the first kind, of order n.\n\n@param n Order.\n@param x Value.\n@return I value.", "Replaces current Collection mapped to key with the specified Collection.\nUse carefully!", "First reduce the Criteria to the normal disjunctive form, then\ncalculate the necessary tree of joined tables for each item, then group\nitems with the same tree of joined tables.", "Reads baseline values for the current resource.\n\n@param xmlResource MSPDI resource instance\n@param mpxjResource MPXJ resource instance", "Pops the top event off the current event stack. This action has to be\nperformed immediately after the event has been dispatched to all\nlisteners.\n\n@param <L> Type of the listener.\n@param expected The Event which is expected at the top of the stack.\n@see #pushEvent(Event)", "This method retrieves an integer of the specified type,\nbelonging to the item with the specified unique ID.\n\n@param id unique ID of entity to which this data belongs\n@param type data type identifier\n@return required integer data", "Returns true if the activity is a start milestone.\n\n@param activity Phoenix activity\n@return true if the activity is a milestone" ]
public boolean needsRefresh() { boolean needsRefresh; this.refreshLock.readLock().lock(); long now = System.currentTimeMillis(); long tokenDuration = (now - this.lastRefresh); needsRefresh = (tokenDuration >= this.expires - REFRESH_EPSILON); this.refreshLock.readLock().unlock(); return needsRefresh; }
[ "Determines if this connection's access token has expired and needs to be refreshed.\n@return true if the access token needs to be refreshed; otherwise false." ]
[ "A specific, existing tag can be deleted by making a DELETE request\non the URL for that tag.\n\nReturns an empty data record.\n\n@param tag The tag to delete.\n@return Request object", "Returns all resources that belong to the bundle\nThis includes the descriptor if one exists.\n\n@return List of the bundle resources, including the descriptor.", "Method to build Integration Flow for Mail. Suppress Warnings for\nMailInboundChannelAdapterSpec.\n@return Integration Flow object for Mail Source", "Create the work pattern assignment map.\n\n@param rows calendar rows\n@return work pattern assignment map", "Sets the target translator for all cells in the table.\nIt will also remove any other translator set.\nNothing will happen if the argument is null.\n@param targetTranslator translator\n@return this to allow chaining", "Blocking function which completes the migration of one store\n\n@param storeName The name of the store\n@param adminClient Admin client used to initiate the copying of data\n@param stealInfo The steal information\n@param isReadOnlyStore Boolean indicating that this is a read-only store", "Unregister all MBeans", "Use this API to add gslbsite.", "Create a new DirectByteBuffer from a given address and size.\nThe returned DirectByteBuffer does not release the memory by itself.\n\n@param addr\n@param size\n@param att object holding the underlying memory to attach to the buffer.\nThis will prevent the garbage collection of the memory area that's\nassociated with the new <code>DirectByteBuffer</code>\n@return" ]
public static base_response update(nitro_service client, rsskeytype resource) throws Exception { rsskeytype updateresource = new rsskeytype(); updateresource.rsstype = resource.rsstype; return updateresource.update_resource(client); }
[ "Use this API to update rsskeytype." ]
[ "Adds a redirect URL to the specified profile ID\n\n@param model\n@param profileId\n@param srcUrl\n@param destUrl\n@param hostHeader\n@return\n@throws Exception", "Loads the asset referenced by the file name\nunder the owner of this component.\nIf this component was constructed to replace the scene with\nthe asset, the main scene of the current context\nwill contain only the owner of this\ncomponent upon return. Otherwise, the loaded asset is a\nchild of this component's owner.\n\nLoading the asset is performed in a separate thread.\nThis function returns before the asset has finished loading.\nIAssetEvents are emitted to the input event handler and\nto any event listener on the context.\n\n@param handler\nIAssetEvents handler to process asset loading events", "Generate query parameters for a forward page with the specified start key.\n\n@param initialQueryParameters page 1 query parameters\n@param startkey the startkey for the forward page\n@param startkey_docid the doc id for the startkey (in case of duplicate keys)\n@param <K> the view key type\n@param <V> the view value type\n@return the query parameters for the forward page", "Parse the json string to the diagram model, assumes that the json is\nhierarchical ordered\n@param json\n@return Model with all shapes defined in JSON\n@throws org.json.JSONException", "Use this API to fetch dnssuffix resource of given name .", "Processes a row of the sites table and stores the site information found\ntherein.\n\n@param siteRow\nstring serialisation of a sites table row as found in the SQL\ndump", "Create and return a new Violation for this rule and the specified import\n@param sourceCode - the SourceCode\n@param importNode - the ImportNode for the import triggering the violation\n@return a new Violation object", "This loads plugin file information into a hash for lazy loading later on\n\n@param pluginDirectory path of plugin\n@throws Exception exception", "This method removes line breaks from a piece of text, and replaces\nthem with the supplied text.\n\n@param text source text\n@param replacement line break replacement text\n@return text with line breaks removed." ]
public static aaapreauthenticationpolicy_binding get(nitro_service service, String name) throws Exception{ aaapreauthenticationpolicy_binding obj = new aaapreauthenticationpolicy_binding(); obj.set_name(name); aaapreauthenticationpolicy_binding response = (aaapreauthenticationpolicy_binding) obj.get_resource(service); return response; }
[ "Use this API to fetch aaapreauthenticationpolicy_binding resource of given name ." ]
[ "Use this API to delete clusterinstance of given name.", "Set the week of the month the events should occur.\n@param weekOfMonth the week of month to set (first to fifth, where fifth means last).", "Use this API to fetch a vpnglobal_binding resource .", "Get the element value in the list by index\n@param index the position in the list from which to get the element\n@return the element value", "Compares two fields given by their names.\n\n@param objA The name of the first field\n@param objB The name of the second field\n@return\n@see java.util.Comparator#compare(java.lang.Object, java.lang.Object)", "Retrieves the value component of a criteria expression.\n\n@param field field type\n@param block block data\n@return field value", "Flushes this output stream and forces any buffered output bytes to be written out to the stream. If propagate is\ntrue, the wrapped stream will also be flushed.\n\n@param propagate\nboolean flag to indicate whether the wrapped OutputStream should also be flushed.\n@throws IOException\nif an I/O error occurs.", "Update the background color of the mBgCircle image view.", "A specific, existing project can be deleted by making a DELETE request\non the URL for that project.\n\nReturns an empty data record.\n\n@param project The project to delete.\n@return Request object" ]
public boolean detectBlackBerryHigh() { //Disambiguate for BlackBerry OS 6 or 7 (WebKit) browser if (detectBlackBerryWebKit()) { return false; } if (detectBlackBerry()) { if (detectBlackBerryTouch() || (userAgent.indexOf(deviceBBBold) != -1) || (userAgent.indexOf(deviceBBTour) != -1) || (userAgent.indexOf(deviceBBCurve) != -1)) { return true; } else { return false; } } else { return false; } }
[ "Detects if the current browser is a BlackBerry device AND\nhas a more capable recent browser. Excludes the Playbook.\nExamples, Storm, Bold, Tour, Curve2\nExcludes the new BlackBerry OS 6 and 7 browser!!\n@return detection of a Blackberry device with a better browser" ]
[ "Returns a new List containing the given objects.", "Use this API to count sslcertkey_crldistribution_binding resources configued on NetScaler.", "Use this API to fetch vpnclientlessaccesspolicy_binding resource of given name .", "Use this API to delete dnstxtrec.", "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", "Retrieve the Activity ID value for this task.\n@param task Task instance\n@return Activity ID value", "delete of files more than 1 day old", "Configs created by this ConfigBuilder will have the given Redis hostname.\n\n@param host the Redis hostname\n@return this ConfigBuilder", "Get the correct google api key.\nTries to read a workplace key first.\n\n@param cms CmsObject\n@param sitePath site path\n@return key value\n@throws CmsException exception" ]
private String toLengthText(long bytes) { if (bytes < 1024) { return bytes + " B"; } else if (bytes < 1024 * 1024) { return (bytes / 1024) + " KB"; } else if (bytes < 1024 * 1024 * 1024) { return String.format("%.2f MB", bytes / (1024.0 * 1024.0)); } else { return String.format("%.2f GB", bytes / (1024.0 * 1024.0 * 1024.0)); } }
[ "Converts a number of bytes to a human-readable string\n@param bytes the bytes\n@return the human-readable string" ]
[ "Convert an object to a list of maps.\n\n@param mapper the object mapper\n@param source the source object\n@return list", "Convert an object to a collection.\n\n@param mapper the object mapper\n@param source the source object\n@param targetCollectionType the target collection type\n@param targetElementType the target collection element type\n@return collection", "Set a knot blend type.\n@param n the knot index\n@param type the knot blend type\n@see #getKnotBlend", "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", "Adds a directory to the collection of module paths.\n\n@param moduleDir the module directory to add\n\n@throws java.lang.IllegalArgumentException if the path is {@code null}", "Describes the scenario. Must be called before any step invocation.\n@param description the description\n@return this for a fluent interface", "Retrieves state and metrics information for all client connections across the cluster.\n\n@return list of connections across the cluster", "Deletes an organization\n\n@param organizationId String", "To populate the dropdown list from the jelly" ]
public static AT_Row createRule(TableRowType type, TableRowStyle style){ Validate.notNull(type); Validate.validState(type!=TableRowType.UNKNOWN); Validate.validState(type!=TableRowType.CONTENT); Validate.notNull(style); Validate.validState(style!=TableRowStyle.UNKNOWN); return new AT_Row(){ @Override public TableRowType getType(){ return type; } @Override public TableRowStyle getStyle(){ return style; } }; }
[ "Creates a new row representing a rule.\n@param type the type for the rule row, must not be null nor {@link TableRowType#CONTENT} nor {@link TableRowType#UNKNOWN}\n@param style the style for the rule row, must not be null nor {@link TableRowStyle#UNKNOWN}\n@return a new row representing a rule\n@throws {@link NullPointerException} if type or style where null\n@throws {@link IllegalStateException} if type or style where unknown or if type was {@link TableRowType#CONTENT}" ]
[ "Emit information about all of suite's tests.", "Returns the base URL of the print servlet.\n\n@param httpServletRequest the request", "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", "Sets the upper limits for the \"moving\" body rotation relative to joint point.\n\n@param limitX the X axis upper rotation limit (in radians)\n@param limitY the Y axis upper rotation limit (in radians)\n@param limitZ the Z axis upper rotation limit (in radians)", "Get a list of all active server mappings defined for current profile\n\n@return Collection of ServerRedirects", "Send a tempo changed announcement to all registered master listeners.\n\n@param tempo the new master tempo", "Add views to the tree.\n\n@param parentNode parent tree node\n@param file views container", "To be used with AutoText class constants ALIGMENT_LEFT, ALIGMENT_CENTER and ALIGMENT_RIGHT\n@param aligment\n@return", "Allows to access the names of the current defined roundings.\n\n@param providers the providers and ordering to be used. By default providers and ordering as defined in\n#getDefaultProviders is used.\n@return the set of custom rounding ids, never {@code null}." ]
private static ModelNode createOperation(ServerIdentity identity) { // The server address final ModelNode address = new ModelNode(); address.add(ModelDescriptionConstants.HOST, identity.getHostName()); address.add(ModelDescriptionConstants.RUNNING_SERVER, identity.getServerName()); // final ModelNode operation = OPERATION.clone(); operation.get(ModelDescriptionConstants.OP_ADDR).set(address); return operation; }
[ "Transform the operation into something the proxy controller understands.\n\n@param identity the server identity\n@return the transformed operation" ]
[ "public because it's used by other packages that use Duke", "Within a single zone, swaps one random partition on one random node with\nanother random partition on different random node.\n\n@param nextCandidateCluster\n@param zoneId Zone ID within which to shuffle partitions\n@return updated cluster", "Returns all scripts\n\n@param model\n@param type - optional to specify type of script to return\n@return\n@throws Exception", "Extract WOEID after XML loads", "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.", "Initializes an annotation class\n\n@param name The name of the annotation class\n@return The instance of the annotation. Returns a dummy if the class was\nnot found", "Ends interception context if it was previously stated. This is indicated by a local variable with index 0.", "Given a protobuf rebalance-partition info, converts it into our\nrebalance-partition info\n\n@param rebalanceTaskInfoMap Proto-buff version of\nRebalanceTaskInfoMap\n@return RebalanceTaskInfo object.", "Record a new event." ]
public static base_responses flush(nitro_service client, cachecontentgroup resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { cachecontentgroup flushresources[] = new cachecontentgroup[resources.length]; for (int i=0;i<resources.length;i++){ flushresources[i] = new cachecontentgroup(); flushresources[i].name = resources[i].name; flushresources[i].query = resources[i].query; flushresources[i].host = resources[i].host; flushresources[i].selectorvalue = resources[i].selectorvalue; flushresources[i].force = resources[i].force; } result = perform_operation_bulk_request(client, flushresources,"flush"); } return result; }
[ "Use this API to flush cachecontentgroup resources." ]
[ "Print an accrue type.\n\n@param value AccrueType instance\n@return accrue type value", "Attempts to create a human-readable String representation of the provided rule.", "Return all valid maturities for a given moneyness.\nUses the fixing times of the fix schedule to determine fractions.\n\n@param moneyness The moneyness as actual offset from par swap rate for which to get the maturities.\n@return The maturities as year fraction from reference date.", "Extract a list of time entries.\n\n@param shiftData string representation of time entries\n@return list of time entry rows", "Handles a complete record at a time, stores it in a form ready for\nfurther processing.\n\n@param record record to be processed\n@return flag indicating if this is the last record in the file to be processed\n@throws MPXJException", "Get a collection of methods declared on this object by method name and parameter count.\n\n@param name the name of the method\n@param paramCount the number of parameters\n@return the (possibly empty) collection of methods with the given name and parameter count", "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.", "Use this API to unset the properties of nsacl6 resource.\nProperties that need to be unset are specified in args array.", "Read the table headers. This allows us to break the file into chunks\nrepresenting the individual tables.\n\n@param is input stream\n@return list of tables in the file" ]
private void processResource(MapRow row) throws IOException { Resource resource = m_project.addResource(); resource.setName(row.getString("NAME")); resource.setGUID(row.getUUID("UUID")); resource.setEmailAddress(row.getString("EMAIL")); resource.setHyperlink(row.getString("URL")); resource.setNotes(getNotes(row.getRows("COMMENTARY"))); resource.setText(1, row.getString("DESCRIPTION")); resource.setText(2, row.getString("SUPPLY_REFERENCE")); resource.setActive(true); List<MapRow> resources = row.getRows("RESOURCES"); if (resources != null) { for (MapRow childResource : sort(resources, "NAME")) { processResource(childResource); } } m_resourceMap.put(resource.getGUID(), resource); }
[ "Extract data for a single resource.\n\n@param row Synchro resource data" ]
[ "Add all headers in a header map.\n\n@param headers a map of headers.\n@return the interceptor instance itself.", "Parses command line arguments.\n\n@param args\nArray of arguments, like the ones provided by\n{@code void main(String[] args)}\n@param objs\nOne or more objects with annotated public fields.\n@return A {@code List} containing all unparsed arguments (i.e. arguments\nthat are no switches)\n@throws IOException\nif a parsing error occurred.\n@see CmdArgument", "Gets the event type from message.\n\n@param message the message\n@return the event type", "Returns a new created connection\n\n@param jcd the connection descriptor\n@return an instance of Connection from the drivermanager", "Use this API to fetch a appfwglobal_auditnslogpolicy_binding resources.", "This private method allows the caller to determine if a given date is a\nworking day. This method takes account of calendar exceptions. It assumes\nthat the caller has already calculated the day of the week on which\nthe given day falls.\n\n@param date Date to be tested\n@param day Day of the week for the date under test\n@return boolean flag", "Get a value as a string.\n\n@param key the key for looking up the value.\n@param type the type of the object\n@param <V> the type", "This method takes an array of data and uses this to populate the\nfield map.\n\n@param defaultData field map default data", "Sign in a connection to the registry by key.\n\nNote multiple connections can be attached to the same key\n\n@param key\nthe key\n@param connection\nthe websocket connection\n@see #register(String, WebSocketConnection)" ]
public void serializeTimingData(Path outputPath) { //merge subThreads instances into the main instance merge(); try (FileWriter fw = new FileWriter(outputPath.toFile())) { fw.write("Number Of Executions, Total Milliseconds, Milliseconds per execution, Type\n"); for (Map.Entry<String, TimingData> timing : executionInfo.entrySet()) { TimingData data = timing.getValue(); long totalMillis = (data.totalNanos / 1000000); double millisPerExecution = (double) totalMillis / (double) data.numberOfExecutions; fw.write(String.format("%6d, %6d, %8.2f, %s\n", data.numberOfExecutions, totalMillis, millisPerExecution, StringEscapeUtils.escapeCsv(timing.getKey()) )); } } catch (Exception e) { e.printStackTrace(); } }
[ "Serializes the timing data to a \"~\" delimited file at outputPath." ]
[ "Returns a CmsSolrQuery representation of this class.\n@param cms the openCms object.\n@return CmsSolrQuery representation of this class.", "Execute push docker image on agent\n\n@param launcher\n@param log\n@param imageTag\n@param username\n@param password\n@param host @return\n@throws IOException\n@throws InterruptedException", "Lookup the Gallery for the specified ID.\n\n@param galleryId\nThe user profile URL\n@return The Gallery\n@throws FlickrException", "Utility method used to convert a Number into a BigInteger.\n\n@param value Number instance\n@return BigInteger instance", "Use this API to fetch all the gslbldnsentries resources that are configured on netscaler.", "Get FieldDescriptor from joined superclass.", "Adds the deploy operation as a step to the composite operation.\n\n@param builder the builder to add the step to\n@param deployment the deployment to deploy", "Creates a slice for directly a raw memory address. This is\ninherently unsafe as it may be used to access arbitrary memory.\nThe slice will hold the specified object reference to prevent the\ngarbage collector from freeing it while it is in use by the slice.\n\n@param address the raw memory address base\n@param size the size of the slice\n@param reference the object reference\n@return the unsafe slice", "Set a proxy for REST-requests.\n\n@param proxyHost\n@param proxyPort" ]
private void setBandFinalHeight(JRDesignBand band, int currHeigth, boolean fitToContent) { if (band != null) { int finalHeight = LayoutUtils.findVerticalOffset(band); //noinspection StatementWithEmptyBody if (finalHeight < currHeigth && !fitToContent) { //nothing } else { band.setHeight(finalHeight); } } }
[ "Removes empty space when \"fitToContent\" is true and real height of object is\ntaller than current bands height, otherwise, it is not modified\n\n@param band\n@param currHeigth\n@param fitToContent" ]
[ "Hide keyboard from phoneEdit field", "set the textColor of the ColorHolder to a view\n\n@param view", "Simple context menu handler for multi-select tables.\n\n@param table the table\n@param menu the table's context menu\n@param event the click event\n@param entries the context menu entries", "Indicates that all of the packages within an archive are \"known\" by the package mapper. Generally\nthis indicates that the archive does not contain customer code.", "Return the command line argument\n\n@return \" --server-groups=\" plus a comma-separated list\nof selected server groups. Return empty String if none selected.", "Use this API to fetch the statistics of all ipseccounters_stats resources that are configured on netscaler.", "Tests whether a Row name occurs more than once in the list of rows\n@param name\n@return", "Use this API to create sslfipskey.", "The point that is the GOLDEN_SECTION along the way from a to b.\na may be less or greater than b, you find the point 60-odd percent\nof the way from a to b.\n\n@param a Interval minimum\n@param b Interval maximum\n@return The GOLDEN_SECTION along the way from a to b." ]
public static List<String> createBacktrace(final Throwable t) { final List<String> bTrace = new LinkedList<String>(); for (final StackTraceElement ste : t.getStackTrace()) { bTrace.add(BT_PREFIX + ste.toString()); } if (t.getCause() != null) { addCauseToBacktrace(t.getCause(), bTrace); } return bTrace; }
[ "Creates a Resque backtrace from a Throwable's stack trace. Includes\ncauses.\n\n@param t\nthe Exception to use\n@return a list of strings that represent how the exception's stacktrace\nappears." ]
[ "Determines the mutator method name based on a field name.\n\n@param fieldName\na field name\n@return the resulting method name", "Updates the terms and statements of the current document.\nThe updates are computed with respect to the current data in the document,\nmaking 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 currentDocument\nthe document to be updated; needs to have a correct revision id and\nentity id\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", "Use this API to fetch all the autoscaleaction resources that are configured on netscaler.", "Parse JSON parameters from this request.\n\n@param jsonRequest The request in the JSON format.\n@return CmsSpellcheckingRequest object that contains parsed parameters or null, if JSON input is not well\ndefined.", "Process a single project.\n\n@param reader Primavera reader\n@param projectID required project ID\n@param outputFile output file name", "Decompiles the given .class file and creates the specified output source file.\n\n@param classFilePath the .class file to be decompiled.\n@param outputDir The directory where decompiled .java files will be placed.", "returns true if the primary key fields are valid for delete, else false.\nPK fields are valid if each of them contains a valid non-null value\n@param cld the ClassDescriptor\n@param obj the object\n@return boolean", "Return the list of module that uses the targeted artifact\n\n@param gavc String\n@param filters FiltersHolder\n@return List<DbModule>", "Determine how many forked JVMs to use." ]
private String randomString(String[] s) { if (s == null || s.length <= 0) return ""; return s[this.random.nextInt(s.length)]; }
[ "Random string from string array\n\n@param s Array\n@return String" ]
[ "Reads a duration value. This method relies on the fact that\nthe units of the duration have been specified elsewhere.\n\n@param value Duration value\n@param type type of units of the duration\n@return Duration instance", "Specify the proxy and the authentication parameters to be used\nto establish the connections to Apple Servers.\n\n<p>Read the <a href=\"http://java.sun.com/javase/6/docs/technotes/guides/net/proxies.html\">\nJava Networking and Proxies</a> guide to understand the\nproxies complexity.\n\n@param proxy the proxy object to be used to create connections\n@param proxyUsername a String object representing the username of the proxy server\n@param proxyPassword a String object representing the password of the proxy server\n@return this", "resolves a Field or Property node generics by using the current class and\nthe declaring class to extract the right meaning of the generics symbols\n@param an a FieldNode or PropertyNode\n@param type the origin type\n@return the new ClassNode with corrected generics", "Render the scalebar.\n\n@param mapContext The context of the map for which the scalebar is created.\n@param scalebarParams The scalebar parameters.\n@param tempFolder The directory in which the graphic file is created.\n@param template The template that containts the scalebar processor", "Extract a list of exception assignments.\n\n@param exceptionData string representation of exception assignments\n@return list of exception assignment rows", "Sets the left padding for all cells in the table.\n@param paddingLeft new padding, ignored if smaller than 0\n@return this to allow chaining", "Delivers the correct JSON Object for the target\n\n@param target\n@throws org.json.JSONException", "This method retrieves a Duration instance representing the amount of\nwork between two dates based on this calendar.\n\n@param startDate start date\n@param endDate end date\n@param format required duration format\n@return amount of work", "the applications main loop." ]
private void initPatternControllers() { m_patternControllers.put(PatternType.NONE, new CmsPatternPanelNoneController()); m_patternControllers.put(PatternType.DAILY, new CmsPatternPanelDailyController(m_model, this)); m_patternControllers.put(PatternType.WEEKLY, new CmsPatternPanelWeeklyController(m_model, this)); m_patternControllers.put(PatternType.MONTHLY, new CmsPatternPanelMonthlyController(m_model, this)); m_patternControllers.put(PatternType.YEARLY, new CmsPatternPanelYearlyController(m_model, this)); // m_patternControllers.put(PatternType.INDIVIDUAL, new CmsPatternPanelIndividualController(m_model, this)); }
[ "Initialize the pattern controllers." ]
[ "Adds the HIBC prefix and check digit to the specified data, returning the resultant data string.\n\n@see <a href=\"https://sourceforge.net/p/zint/code/ci/master/tree/backend/library.c\">Corresponding Zint code</a>", "Exit reporting up to distributor, using information gained from status reports to the LineCountManager\n\n@return a boolean of whether this consumer should immediately exit", "Create a Count-Query for QueryBySQL\n\n@param aQuery\n@return The count query", "Ask the specified player for an Artist menu.\n\n@param slotReference the player and slot for which the menu is desired\n@param sortOrder the order in which responses should be sorted, 0 for default, see Section 6.11.1 of the\n<a href=\"https://github.com/Deep-Symmetry/dysentery/blob/master/doc/Analysis.pdf\">Packet Analysis\ndocument</a> for details\n\n@return the entries in the artist menu\n\n@throws Exception if there is a problem obtaining the menu", "Mark a PersistenceBroker as preferred choice for current Thread\n\n@param key The PBKey the broker is associated to\n@param broker The PersistenceBroker to mark as current", "Creates a triangular matrix where the amount of fill is randomly selected too.\n\n@param upper true for upper triangular and false for lower\n@param N number of rows and columns\ner * @param minFill minimum fill fraction\n@param maxFill maximum fill fraction\n@param rand random number generator\n@return Random matrix", "Checks if the categoryfolder setting needs to be updated.\n\n@return true if the categoryfolder setting needs to be updated", "Creates a sort configuration iff at least one of the parameters is not null and the options list is not empty.\n@param sortParam The request parameter used to send the currently chosen search option.\n@param options The available sort options.\n@param defaultOption The default sort option.\n@return the sort configuration or null, depending on the arguments.", "Convert the Phoenix representation of a duration into a Duration instance.\n\n@param value Phoenix duration\n@return Duration instance" ]
public int getHistoryCount(int profileId, String clientUUID, HashMap<String, String[]> searchFilter) { int count = 0; Statement query = null; ResultSet results = null; try (Connection sqlConnection = sqlService.getConnection()) { String sqlQuery = "SELECT COUNT(" + Constants.GENERIC_ID + ") FROM " + Constants.DB_TABLE_HISTORY + " "; // see if profileId is set or not (-1) if (profileId != -1) { sqlQuery += "WHERE " + Constants.GENERIC_PROFILE_ID + "=" + profileId + " "; } if (clientUUID != null && clientUUID.compareTo("") != 0) { sqlQuery += "AND " + Constants.GENERIC_CLIENT_UUID + "='" + clientUUID + "' "; } sqlQuery += ";"; logger.info("Query: {}", sqlQuery); query = sqlConnection.createStatement(); results = query.executeQuery(sqlQuery); if (results.next()) { count = results.getInt(1); } query.close(); } catch (Exception e) { } finally { try { if (results != null) { results.close(); } } catch (Exception e) { } try { if (query != null) { query.close(); } } catch (Exception e) { } } return count; }
[ "Returns the number of history entries for a client\n\n@param profileId ID of profile\n@param clientUUID UUID of client\n@param searchFilter unused\n@return number of history entries" ]
[ "Split a span into two by adding a knot in the middle.\n@param n the span index", "Retrieve the routing type value from the REST request.\n\"X_VOLD_ROUTING_TYPE_CODE\" is the routing type header.\n\nBy default, the routing code is set to NORMAL\n\nTODO REST-Server 1. Change the header name to a better name. 2. Assumes\nthat integer is passed in the header", "These exact lines are shared between three different tools, so\nthey have been moved here to reduce code duplication.\n@return The parsed command-line, with options removed.", "Use this API to fetch appfwprofile_excluderescontenttype_binding resources of given name .", "Generate a path select string\n\n@return Select query string", "Read an optional month value form a JSON value.\n@param val the JSON value that should represent the month.\n@return the month from the JSON or null if reading the month fails.", "Output method responsible for sending the updated content to the Subscribers.\n\n@param cn", "Set a range of the colormap, interpolating between two colors.\n@param firstIndex the position of the first color\n@param lastIndex the position of the second color\n@param color1 the first color\n@param color2 the second color", "Builder method for specifying the name of an app.\n@param name The name to give an app.\n@return A copy of the {@link App}" ]
public GroovyClassDoc[] innerClasses() { Collections.sort(nested); return nested.toArray(new GroovyClassDoc[nested.size()]); }
[ "returns a sorted array of nested classes and interfaces" ]
[ "Retrieve an enterprise field value.\n\n@param index field index\n@return field value", "Returns the device push token or null\n\n@param type com.clevertap.android.sdk.PushType (FCM or GCM)\n@return String device token or null\nNOTE: on initial install calling getDevicePushToken may return null, as the device token is\nnot yet available\nImplement CleverTapAPI.DevicePushTokenRefreshListener to get a callback once the token is\navailable", "Return all valid tenors for a given moneyness and maturity.\nUses the payment times of the fix schedule to determine fractions.\n\n@param moneyness The moneyness as actual offset from par swap rate for which to get the maturities.\n@param maturity The maturities as year fraction from the reference date.\n@return The tenors as year fraction from reference date.", "Generates the points for an arc based on two bearings from a centre point\nand a radius.\n\n@param center The LatLong point of the center.\n@param startBearing North is 0 degrees, East is 90 degrees, etc.\n@param endBearing North is 0 degrees, East is 90 degrees, etc.\n@param radius In metres\n@return An array of LatLong points in an MVC array representing the arc.\nUsing this method directly you will need to push the centre point onto\nthe array in order to close it, if desired.", "Sets the elements in this matrix to be equal to the elements in the passed in matrix.\nBoth matrix must have the same dimension.\n\n@param a The matrix whose value this matrix is being set to.", "Set editable state on an attribute. This needs to also set the state on the associated attributes.\n\n@param attribute attribute for which the editable state needs to be set\n@param editable new editable state", "Bessel function of the first kind, of order n.\n\n@param n Order.\n@param x Value.\n@return I value.", "Use this API to count nstrafficdomain_bridgegroup_binding resources configued on NetScaler.", "Return true if c has a @hidden tag associated with it" ]
@SuppressWarnings("unchecked") private static void parseProperties(JSONObject modelJSON, Shape current, Boolean keepGlossaryLink) throws JSONException { if (modelJSON.has("properties")) { JSONObject propsObject = modelJSON.getJSONObject("properties"); Iterator<String> keys = propsObject.keys(); Pattern pattern = Pattern.compile(jsonPattern); while (keys.hasNext()) { StringBuilder result = new StringBuilder(); int lastIndex = 0; String key = keys.next(); String value = propsObject.getString(key); if (!keepGlossaryLink) { Matcher matcher = pattern.matcher(value); while (matcher.find()) { String id = matcher.group(1); current.addGlossaryIds(id); String text = matcher.group(2); result.append(text); lastIndex = matcher.end(); } result.append(value.substring(lastIndex)); value = result.toString(); } current.putProperty(key, value); } } }
[ "create a HashMap form the json properties and add it to the shape\n@param modelJSON\n@param current\n@throws org.json.JSONException" ]
[ "Returns the list of module dependencies regarding the provided filters\n\n@param moduleId String\n@param filters FiltersHolder\n@return List<Dependency>", "This returns a string from decimal digit smallestDigit to decimal digit\nbiggest digit. Smallest digit is labeled 1, and the limits are\ninclusive.", "Processes a runtime procedure argument tag.\n\n@param template The template\n@param attributes The attributes of the tag\n@exception XDocletException If an error occurs\[email protected] type=\"content\"\[email protected] name=\"attributes\" optional=\"true\" description=\"Attributes of the procedure as name-value pairs 'name=value',\nseparated by commas\"\[email protected] name=\"documentation\" optional=\"true\" description=\"Documentation on the procedure\"\[email protected] name=\"field-ref\" optional=\"true\" description=\"Identifies the field that provides the value\nif a runtime argument; if not set, then null is used\"\[email protected] name=\"name\" optional=\"false\" description=\"The identifier of the argument tag\"\[email protected] name=\"return\" optional=\"true\" description=\"Whether this is a return value (if a runtime argument)\"\nvalues=\"true,false\"\[email protected] name=\"value\" optional=\"false\" description=\"The value if a constant argument\"", "Starts given docker machine.\n\n@param cliPathExec\nlocation of docker-machine or null if it is on PATH.\n@param machineName\nto be started.", "Save an HTTP response to a file\n@param response the response to save\n@param destFile the destination file\n@throws IOException if the response could not be downloaded", "Remove any protocol-level headers from the remote server's response that\ndo not apply to the new response we are sending.\n\n@param response", "Use this API to renumber nspbr6.", "This method extracts calendar data from an MSPDI file.\n\n@param project Root node of the MSPDI file\n@param map Map of calendar UIDs to names", "It's enough to just set the disabled attribute on the\nelement, but we want to also add a \"disabled\" class so that we can\nstyle it.\n\nAt some point we'll just be able to use .button:disabled,\nbut that doesn't work in IE8-" ]
protected void updateModel(final ModelNode operation, final Resource resource) throws OperationFailedException { updateModel(operation, resource.getModel()); }
[ "Update the given resource in the persistent configuration model based on the values in the given operation.\n\n@param operation the operation\n@param resource the resource that corresponds to the address of {@code operation}\n\n@throws OperationFailedException if {@code operation} is invalid or populating the model otherwise fails" ]
[ "Inserts a column name, value pair into the SQL.\n\n@param column\nName of the table column.\n@param value\nValue to substitute in. InsertBuilder does *no* interpretation\nof this. If you want a string constant inserted, you must\nprovide the single quotes and escape the internal quotes. It\nis more common to use a question mark or a token in the style\nof {@link ParameterizedPreparedStatementCreator}, e.g. \":foo\".", "Load the view port execution.\n\n@param then callback when the view port is detected.\n@param fallback fallback when no view port detected or failure to detect the given\n{@link Boundary} (using {@link #propagateFallback(boolean)})", "Add tags to a photo.\n\nThis method requires authentication with 'write' permission.\n\n@param photoId\nThe photo ID\n@param tags\nThe tags\n@throws FlickrException", "Returns the context the view is running in, through which it can\naccess the current theme, resources, etc.\n\n@return The view's Context.", "Get the content-type, including the optional \";base64\".", "Add a photo to the user's favorites.\n\n@param photoId\nThe photo ID\n@throws FlickrException", "Create an IPv6 mixed address using the given ipv6 segments and using this address for the embedded IPv4 segments\n\n@param segs\n@return", "Resets the text box by removing its content and resetting visual state.", "Returns the configured bundle, or the provided default bundle.\n@param defaultMessages the default bundle\n@param locale the preferred locale\n@return the configured bundle or, if not found, the default bundle." ]
public ThumborUrlBuilder align(VerticalAlign valign, HorizontalAlign halign) { return align(valign).align(halign); }
[ "Set the horizontal and vertical alignment for the image when image gets cropped by resizing.\n\n@param valign Vertical alignment.\n@param halign Horizontal alignment.\n@throws IllegalStateException if image has not been marked for resize." ]
[ "Returns the Euclidean distance between this vector and vector v.\n\n@return distance between this vector and v", "Remove contents from the deployment and attach a \"transformed\" slave operation to the operation context.\n\n@param context the operation context\n@param operation the original operation\n@param contentRepository the content repository\n@return the hash of the uploaded deployment content\n@throws IOException\n@throws OperationFailedException", "Total count of partition-stores moved in this task.\n\n@return number of partition stores moved in this task.", "Determine whether we should use the normal repaint process, or delegate that to another component that is\nhosting us in a soft-loaded manner to save memory.\n\n@param x the left edge of the region that we want to have redrawn\n@param y the top edge of the region that we want to have redrawn\n@param width the width of the region that we want to have redrawn\n@param height the height of the region that we want to have redrawn", "Read assignment data.", "Set a colspan in a group of columns. First add the cols to the report\n\n@param colNumber the index of the col\n@param colQuantity the number of cols how i will take\n@param colspanTitle colspan title\n@return a Dynamic Report Builder\n@throws ColumnBuilderException When the index of the cols is out of\nbounds.", "Run the configured crawl. This method blocks until the crawl is done.\n\n@return the CrawlSession once the crawl is done.", "Add an accessory to be handled and advertised by this root. Any existing Homekit connections\nwill be terminated to allow the clients to reconnect and see the updated accessory list. When\nusing this for a bridge, the ID of the accessory must be greater than 1, as that ID is reserved\nfor the Bridge itself.\n\n@param accessory to advertise and handle.", "Write a message to the console.\n\n@param pattern\nA {@link String#format(String, Object...)} pattern\n@param parameters\nOptional parameters to plug into the pattern" ]
private void started(final ProcessorGraphNode processorGraphNode) { this.processorLock.lock(); try { this.runningProcessors.put(processorGraphNode.getProcessor(), null); } finally { this.processorLock.unlock(); } }
[ "Flag that the processor has started execution.\n\n@param processorGraphNode the node that has started." ]
[ "Provides a message which describes the expected format and arguments\nfor this command. This is used to provide user feedback when a command\nrequest is malformed.\n\n@return A message describing the command protocol format.", "Read activities.", "Set the header names to forward from the request. Should not be defined if all is set to true\n\n@param names the header names.", "TestNG returns a compound thread ID that includes the thread name and its numeric ID,\nseparated by an 'at' sign. We only want to use the thread name as the ID is mostly\nunimportant and it takes up too much space in the generated report.\n@param threadId The compound thread ID.\n@return The thread name.", "Defines how messages should be logged. This method can be modified to\nrestrict the logging messages that are shown on the console or to change\ntheir formatting. See the documentation of Log4J for details on how to do\nthis.", "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", "Returns the value of the element with the minimum value\n@param A (Input) Matrix. Not modified.\n@return scalar", "Use this API to fetch appfwprofile_denyurl_binding resources of given name .", "in truth we probably only need the types as injected by the metadata binder" ]
private Duration getDuration(TimeUnit units, Double duration) { Duration result = null; if (duration != null) { double durationValue = duration.doubleValue() * 100.0; switch (units) { case MINUTES: { durationValue *= MINUTES_PER_DAY; break; } case HOURS: { durationValue *= HOURS_PER_DAY; break; } case DAYS: { durationValue *= 3.0; break; } case WEEKS: { durationValue *= 0.6; break; } case MONTHS: { durationValue *= 0.15; break; } default: { throw new IllegalArgumentException("Unsupported time units " + units); } } durationValue = Math.round(durationValue) / 100.0; result = Duration.getInstance(durationValue, units); } return result; }
[ "Read a duration.\n\n@param units duration units\n@param duration duration value\n@return Duration instance" ]
[ "Returns the error correction codewords for the specified data codewords.\n\n@param codewords the codewords that we need error correction codewords for\n@param ecclen the number of error correction codewords needed\n@return the error correction codewords for the specified data codewords", "Remove an write lock.", "Sets the HTML entity translator.\nIt will also remove any other translator set.\nNothing will happen if the argument is null.\n@param htmlElementTranslator translator", "Checks that locking and update-lock are only used for fields of TIMESTAMP or INTEGER type.\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", "Gets the estimated time remaining in milliseconds based upon the total number of work units, the start time, and how many units have been done\nso far.\n\nThis should not be called before any work units have been done.", "Returns the compact task records for all tasks within the given project,\nordered by their priority within the project.\n\n@param projectId The project in which to search for tasks.\n@return Request object", "Check if this type is assignable from the given Type.", "Gets the logger.\n\n@return Returns a Category", "Specify the address of the SOCKS proxy the connection should\nuse.\n\n<p>Read the <a href=\"http://java.sun.com/javase/6/docs/technotes/guides/net/proxies.html\">\nJava Networking and Proxies</a> guide to understand the\nproxies complexity.\n\n<p>Be aware that this method only handles SOCKS proxies, not\nHTTPS proxies. Use {@link #withProxy(Proxy)} instead.\n\n@param host the hostname of the SOCKS proxy\n@param port the port of the SOCKS proxy server\n@return this" ]
public void mark() { final long currentTimeMillis = clock.currentTimeMillis(); synchronized (queue) { if (queue.size() == capacity) { /* * we're all filled up already, let's dequeue the oldest * timestamp to make room for this new one. */ queue.removeFirst(); } queue.addLast(currentTimeMillis); } }
[ "Record a new event." ]
[ "Removes the specified object in index from the array.\n\n@param index The index to remove.", "Returns the name from the inverse side if the given property de-notes a one-to-one association.", "Resolves the path relative to the parent and normalizes it.\n\n@param parent the parent path\n@param path the path\n\n@return the normalized path", "Decrements the client's use count, and makes it eligible for closing if it is no longer in use.\n\n@param client the dbserver connection client which is no longer being used for a task", "Puts value at given column\n\n@param value Will be encoded using UTF-8", "Takes the specified object and converts the argument to a String.\n\n@param arg The object to convert\n@return A String representation of the argument.", "Converts a date to an instance date bean.\n@return the instance date bean.", "Puts as many of the given bytes as possible into this buffer.\n\n@return number of bytes actually put into this buffer (0 if the buffer is full)", "Handle click on \"Add\" button.\n@param e the click event." ]
public static List<String> asListLines(String content) { List<String> retorno = new ArrayList<String>(); content = content.replace(CARRIAGE_RETURN, RETURN); content = content.replace(RETURN, CARRIAGE_RETURN); for (String str : content.split(CARRIAGE_RETURN)) { retorno.add(str); } return retorno; }
[ "Split string content into list\n@param content String content\n@return list" ]
[ "Creates the event for endpoint with specific type.\n\n@param endpoint the endpoint\n@param type the type\n@return the event", "Find the next match of the pattern on the tree\n\n@return whether there is a match somewhere in the tree", "Check all abstract methods are declared by the decorated types.\n\n@param type\n@param beanManager\n@param delegateType\n@throws DefinitionException If any of the abstract methods is not declared by the decorated types", "123.2.3.4 is 4.3.2.123.in-addr.arpa.", "Notification that the process has become unstable.\n\n@return {@code true} if this is a change in status", "Use this API to fetch ipset_nsip6_binding resources of given name .", "Redirect to page\n\n@param model\n@return", "Tries to return the single table to which all classes in the hierarchy with the given\nclass as the root map.\n\n@param classDef The root class of the hierarchy\n@return The table name or <code>null</code> if the classes map to more than one table\nor no class in the hierarchy maps to a table", "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" ]
@Override public DecompilationResult decompileClassFile(Path rootDir, Path classFilePath, Path outputDir) throws DecompilationException { Checks.checkDirectoryToBeRead(rootDir.toFile(), "Classes root dir"); File classFile = classFilePath.toFile(); Checks.checkFileToBeRead(classFile, "Class file"); Checks.checkDirectoryToBeFilled(outputDir.toFile(), "Output directory"); log.info("Decompiling .class '" + classFilePath + "' to '" + outputDir + "' from: '" + rootDir + "'"); String name = classFilePath.normalize().toAbsolutePath().toString().substring(rootDir.toAbsolutePath().toString().length() + 1); final String typeName = StringUtils.removeEnd(name, ".class");// .replace('/', '.'); DecompilationResult result = new DecompilationResult(); try { DecompilerSettings settings = getDefaultSettings(outputDir.toFile()); this.procyonConf.setDecompilerSettings(settings); // TODO: This is horrible mess. final ITypeLoader typeLoader = new CompositeTypeLoader(new WindupClasspathTypeLoader(rootDir.toString()), new ClasspathTypeLoader()); WindupMetadataSystem metadataSystem = new WindupMetadataSystem(typeLoader); File outputFile = this.decompileType(settings, metadataSystem, typeName); result.addDecompiled(Collections.singletonList(classFilePath.toString()), outputFile.getAbsolutePath()); } catch (Throwable e) { DecompilationFailure failure = new DecompilationFailure("Error during decompilation of " + classFilePath.toString() + ":\n " + e.getMessage(), Collections.singletonList(name), e); log.severe(failure.getMessage()); result.addFailure(failure); } return result; }
[ "Decompiles the given .class file and creates the specified output source file.\n\n@param classFilePath the .class file to be decompiled.\n@param outputDir The directory where decompiled .java files will be placed." ]
[ "This method converts an offset value into an array index, which in\nturn allows the data present in the fixed block to be retrieved. Note\nthat if the requested offset is not found, then this method returns -1.\n\n@param offset Offset of the data in the fixed block\n@return Index of data item within the fixed data block", "Load the given metadata profile for the current thread.", "Computes the distance from a point p to the plane of this face.\n\n@param p\nthe point\n@return distance from the point to the plane", "Install the installation manager service.\n\n@param serviceTarget\n@return the service controller for the installed installation manager", "Decides what are the preferred credentials to use for resolving the repo keys of the server\n\n@return Preferred credentials for repo resolving. Never null.", "Provisions a new user in an enterprise.\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@return the created user's info.", "Returns the item at the specified position.\n\n@param position index of the item to return\n@return the item at the specified position or {@code null} when not found", "Utility function to find the first index of a value in a\nListBox.", "Create new logging action\nThis method check if there is an old instance for this thread-local\nIf not - Initialize new instance and set it as this thread-local's instance\n@param logger\n@param auditor\n@param instance\n@return whether new instance was set to thread-local" ]
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" ]
[ "Parse a date value.\n\n@param value String representation\n@return Date instance", "Use this API to clear Interface resources.", "Adds a member to this group with the specified role.\n@param user the member to be added to this group.\n@param role the role of the user in this group. Can be null to assign the default role.\n@return info about the new group membership.", "Uses an IdentityMap to make sure we don't recurse infinitely on the same object in a cyclic object model.\nProxies\n@param obj\n@return", "Do not call directly.\n@deprecated", "Add the string representation of the given object to this sequence. The given indentation will be prepended to\neach line except the first one if the object has a multi-line string representation.\n\n@param object\nthe appended object.\n@param indentation\nthe indentation string that should be prepended. May not be <code>null</code>.", "Extract task data.", "Extracts assignment baseline data.\n\n@param assignment xml assignment\n@param mpx mpxj assignment", "Returns a unique file name\n@param baseFileName the requested base name for the file\n@param extension the requested extension for the file\n@param cleanBaseFileName specify if the <code>baseFileName</code> has to be cleaned before being used (i.e. 'jboss-web' should not be cleaned to avoid '-' to become '_')\n@param ancestorFolders specify the ancestor folders for the file (if there's no ancestor folder, just pass 'null' value)\n@return a String representing the unique file generated" ]
protected String consumeQuoted(ImapRequestLineReader request) throws ProtocolException { // The 1st character must be '"' consumeChar(request, '"'); StringBuilder quoted = new StringBuilder(); char next = request.nextChar(); while (next != '"') { if (next == '\\') { request.consume(); next = request.nextChar(); if (!isQuotedSpecial(next)) { throw new ProtocolException("Invalid escaped character in quote: '" + next + '\''); } } quoted.append(next); request.consume(); next = request.nextChar(); } consumeChar(request, '"'); return quoted.toString(); }
[ "Reads a quoted string value from the request." ]
[ "Checks if class package match provided list of package locators\n\n@param classPackageName\nname of class package\n@return true if class package is on the {@link #packageLocators} list", "An extremely simple method for identifying multimedia. This\ncould be improved, but it's good enough for this example.\n\n@param file which could be an image or a video\n@return true if the file can be previewed, false otherwise", "Extracts the row from a matrix.\n@param a Input matrix\n@param row Which row is to be extracted\n@param out output. Storage for the extracted row. If null then a new vector will be returned.\n@return The extracted row.", "Determine if a CharSequence can be parsed as a BigDecimal.\n\n@param self a CharSequence\n@return true if the CharSequence can be parsed\n@see #isBigDecimal(String)\n@since 1.8.2", "Retrieve the date range at the specified index.\nThe index is zero based, and this method will return\nnull if the requested date range does not exist.\n\n@param index range index\n@return date range instance", "Adds a new Pie Slice to the PieChart. After inserting and calculation of the highlighting color\na complete recalculation is initiated.\n\n@param _Slice The newly added PieSlice.", "Use this API to disable nsacl6 resources of given names.", "Retrieves the timephased breakdown of the planned overtime work for this\nresource assignment.\n\n@return timephased planned work", "Write resource assignment.\n\n@param record resource assignment instance\n@throws IOException" ]
public String getDefaultTableName() { String name = getName(); int lastDotPos = name.lastIndexOf('.'); int lastDollarPos = name.lastIndexOf('$'); return lastDollarPos > lastDotPos ? name.substring(lastDollarPos + 1) : name.substring(lastDotPos + 1); }
[ "Returns the default table name for this class which is the unqualified class name.\n\n@return The default table name" ]
[ "Process encoded payload.\n\n@throws IOException Signals that an I/O exception has occurred.", "This method is used to parse a string representation of a time\nunit, and return the appropriate constant value.\n\n@param units string representation of a time unit\n@param locale target locale\n@return numeric constant\n@throws MPXJException normally thrown when parsing fails", "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", "If this node represents a bean property this method returns all annotations of its getter.\n\n@return A set of annotations of this nodes property getter or an empty set.", "Look up all recorded playback state information.\n\n@return the playback state recorded for any player\n@since 0.5.0", "Converts the Conditionals into real headers.\n@return real headers.", "Use this API to fetch vlan_nsip6_binding resources of given name .", "Transforms a length according to the current transformation matrix.", "Use this API to fetch a appflowglobal_binding resource ." ]
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" ]
[ "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", "Converts the given list of a type to paged list of a different type.\n\n@param list the list to convert to paged list\n@param mapper the mapper to map type in input list to output list\n@param <OutT> the type of items in output paged list\n@param <InT> the type of items in input paged list\n@return the paged list", "SearchService is a service which shares the information about Persons with the PersonService.\nIt lets users search for individual people using simple or complex search expressions.\nThe interaction with this service also verifies that the JAX-RS server is capable of supporting multiple\nroot resource classes", "Create the navigation frame.\n@param outputDirectory The target directory for the generated file(s).", "Serialize this `AppDescriptor` and output byte array\n\n@return\nserialize this `AppDescriptor` into byte array", "Waits for the current outstanding request retrying it with exponential backoff if it fails.\n\n@throws ClosedByInterruptException if request was interrupted\n@throws IOException In the event of FileNotFoundException, MalformedURLException\n@throws RetriesExhaustedException if exceeding the number of retries", "Remove the listener active in this session.\n\n@param listenerId the id of the listener to remove", "Set a range of the colormap to a single color.\n@param firstIndex the position of the first color\n@param lastIndex the position of the second color\n@param color the color", "Returns the log conditional likelihood of the given dataset.\n\n@return The log conditional likelihood of the given dataset." ]
public static nstimeout get(nitro_service service) throws Exception{ nstimeout obj = new nstimeout(); nstimeout[] response = (nstimeout[])obj.get_resources(service); return response[0]; }
[ "Use this API to fetch all the nstimeout resources that are configured on netscaler." ]
[ "Use this API to fetch dnstxtrec resource of given name .", "Sets the yearly absolute date.\n\n@param date yearly absolute date", "Get a list of topics from a group.\n\n@param groupId\nUnique identifier of a group returns a list of topics for a given group {@link Group}.\n@param perPage\nNumber of records per page.\n@param page\nResult-section.\n@return A group topic list\n@throws FlickrException\n@see <a href=\"http://www.flickr.com/services/api/flickr.groups.discuss.topics.getList.html\">API Documentation</a>", "Adds the specified list of users as members of the project. Returns the updated project record.\n\n@param project The project to add members to.\n@return Request object", "Obtain the class of a given className\n\n@param className\n@return\n@throws Exception", "Reads the table data from an input stream and breaks\nit down into rows.\n\n@param is input stream", "creates option map for remoting connections\n@param resolver\n@param model\n@param defaults\n@return\n@throws OperationFailedException\n@deprecated configuring xnio worker options is no longer supported and should be replaced for referencing IO subsystem", "Get an image using the specified URL suffix.\n\n@deprecated\n@param suffix\nThe URL suffix, including the .extension\n@return The BufferedImage object\n@throws IOException", "Print the class's operations m" ]
private JsonArray formatBoxMetadataFilterRequest() { JsonArray boxMetadataFilterRequestArray = new JsonArray(); JsonObject boxMetadataFilter = new JsonObject() .add("templateKey", this.metadataFilter.getTemplateKey()) .add("scope", this.metadataFilter.getScope()) .add("filters", this.metadataFilter.getFiltersList()); boxMetadataFilterRequestArray.add(boxMetadataFilter); return boxMetadataFilterRequestArray; }
[ "Add BoxMetaDataFilter to the JsonArray boxMetadataFilterRequestArray.\n@param @param bmf accepts a filter that has templateKey, scope, and filters populated.\n@return JsonArray that is formated Json request" ]
[ "Return the value from the field in the object that is defined by this FieldType.", "Ask the specified player for the specified waveform preview from the specified media slot, first checking if we\nhave a cached copy.\n\n@param dataReference uniquely identifies the desired waveform preview\n\n@return the preview, if it was found, or {@code null}\n\n@throws IllegalStateException if the WaveformFinder is not running", "Downloads a part of this file's contents, starting at rangeStart and stopping at rangeEnd, while reporting the\nprogress to a ProgressListener.\n\n@param output the stream to where the file will be written.\n@param rangeStart the byte offset at which to start the download.\n@param rangeEnd the byte offset at which to stop the download.\n@param listener a listener for monitoring the download's progress.", "Gets the groupby for ReportQueries of all Criteria and Sub Criteria\nthe elements are of class FieldHelper\n@return List of FieldHelper", "Retrieves the members of the given type.\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 Members attribute\n@param paramValue The feature to be added to the Members attribute\n@throws XDocletException If an error occurs", "Creates all propertyvfsbundle files for the currently loaded translations.\nThe method is used to convert xmlvfsbundle files into propertyvfsbundle files.\n\n@throws CmsIllegalArgumentException thrown if resource creation fails.\n@throws CmsLoaderException thrown if the propertyvfsbundle type can't be read from the resource manager.\n@throws CmsException thrown if creation, type retrieval or locking fails.", "Retrieve the default aliases to be applied to MPXJ task and resource fields.\n\n@return map of aliases", "Create a WebDriver backed EmbeddedBrowser.\n\n@param driver The WebDriver to use.\n@param filterAttributes the attributes to be filtered from DOM.\n@param crawlWaitReload the period to wait after a reload.\n@param crawlWaitEvent the period to wait after an event is fired.\n@return The EmbeddedBrowser.", "Copy the contents of the given InputStream into a String.\nLeaves the stream open when done.\n@param in the InputStream to copy from\n@return the String that has been copied to\n@throws IOException in case of I/O errors" ]
public Indexes listIndexes() { URI uri = new DatabaseURIHelper(db.getDBUri()).path("_index").build(); return client.couchDbClient.get(uri, Indexes.class); }
[ "List the indexes in the database. The returned object allows for listing indexes by type.\n\n@return indexes object with methods for getting indexes of a particular type" ]
[ "Use this API to unset the properties of systemcollectionparam resource.\nProperties that need to be unset are specified in args array.", "Determine if a CharSequence can be parsed as a BigInteger.\n\n@param self a CharSequence\n@return true if the CharSequence can be parsed\n@see #isBigInteger(String)\n@since 1.8.2", "Find out the scrollable child view from a ViewGroup.\n\n@param viewGroup", "Reads a data block and adds it to the list of blocks.\n\n@param text RTF data\n@param offset current offset\n@param length next block length\n@param blocks list of blocks\n@return next offset", "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", "Get image ID from imageTag on the current agent.\n\n@param imageTag\n@return", "Convert the Values using the FieldConversion.sqlToJava\n@param fcs\n@param values", "This will blur the view behind it and set it in\na imageview over the content with a alpha value\nthat corresponds to slideOffset.", "a small helper to set the text color to a textView null save\n\n@param textView\n@param colorDefault" ]
public boolean removeChildObjectByName(final String name) { if (null != name && !name.isEmpty()) { GVRSceneObject found = null; for (GVRSceneObject child : mChildren) { GVRSceneObject object = child.getSceneObjectByName(name); if (object != null) { found = object; break; } } if (found != null) { removeChildObject(found); return true; } } return false; }
[ "Performs case-sensitive depth-first search for a child object and then\nremoves it if found.\n\n@param name name of scene object to be removed.\n\n@return true if child was found (and removed), else false" ]
[ "Use this API to Reboot reboot.", "Returns the name of this alias if path has been added\nto the aliased portions of attributePath\n\n@param path the path to test for inclusion in the alias", "Record the connection establishment time\n\n@param dest Destination of the socket to connect to. Will actually record\nif null. Otherwise will call this on self and corresponding child\nwith this param null.\n@param connEstTimeUs The number of us to wait before establishing a\nconnection", "Converts string to UUID and returns it, or null if the conversion is not possible.\n\n@param uuid the potential UUID string\n@return the UUID, or null if conversion is not possible", "Read a single field alias from an extended attribute.\n\n@param attribute extended attribute", "Performs all actions that have been configured.", "Checks the given class descriptor for correct object cache setting.\n\n@param classDef The class descriptor\n@param checkLevel The current check level (this constraint is only checked in strict)\n@exception ConstraintException If the constraint has been violated", "Transform the operation into something the proxy controller understands.\n\n@param identity the server identity\n@return the transformed operation", "Get bean manager from portlet context.\n\n@param ctx the portlet context\n@return bean manager if found" ]
private static void parseStencil(JSONObject modelJSON, Shape current) throws JSONException { // get stencil type if (modelJSON.has("stencil")) { JSONObject stencil = modelJSON.getJSONObject("stencil"); // TODO other attributes of stencil String stencilString = ""; if (stencil.has("id")) { stencilString = stencil.getString("id"); } current.setStencil(new StencilType(stencilString)); } }
[ "parse the stencil out of a JSONObject and set it to the current shape\n@param modelJSON\n@param current\n@throws org.json.JSONException" ]
[ "Get log file\n\n@return log file", "Saves the current translations from the container to the respective localization.", "Returns first resolver that accepts the given resolverId.\nIn case none is found null is returned.\n@param resolverId identifier of the resolver\n@return found resolver or null otherwise", "Use this API to delete dnsaaaarec resources.", "Return the profileId for a path\n\n@param path_id ID of path\n@return ID of profile\n@throws Exception exception", "Closes any registered stream entries that have not yet been consumed", "Returns a string that should be used as a label for the given property.\n\n@param propertyIdValue\nthe property to label\n@return the label", "If supported by the WMS server, a parameter \"angle\" can be set on \"customParams\" or \"mergeableParams\".\nIn this case the rotation will be done natively by the WMS.", "return request is success by JsonRtn object\n\n@param jsonRtn\n@return" ]
public String getString(Integer offset) { String result = null; if (offset != null) { byte[] value = m_map.get(offset); if (value != null) { result = MPPUtility.getString(value, 0); } } return (result); }
[ "This method retrieves the data at the given offset and returns\nit as a String, assuming the underlying data is composed of\nsingle byte characters.\n\n@param offset offset of required data\n@return string containing required data" ]
[ "Converts any string into a string that is safe to use as a file name.\nThe result will only include ascii characters and numbers, and the \"-\",\"_\", and \".\" characters.", "Configure all UI elements in the \"ending\"-options panel.", "Returns all the dependencies of a module\n\n@param module Module\n@return List<Dependency>", "k\nReturns a list of artifact regarding the filters\n\n@return List<DbArtifact>", "Read all task relationships from a ConceptDraw PROJECT file.\n\n@param cdp ConceptDraw PROJECT file", "binds the Identities Primary key values to the statement", "Calls the provided closure for a \"page\" of rows from the table represented by this DataSet.\nA page is defined as starting at a 1-based offset, and containing a maximum number of rows.\n\n@param offset the 1-based offset for the first row to be processed\n@param maxRows the maximum number of rows to be processed\n@param closure called for each row with a GroovyResultSet\n@throws SQLException if a database access error occurs\n@see groovy.sql.Sql#eachRow(String, java.util.List, int, int, groovy.lang.Closure)", "Recursively searches for formatting annotations.\n\n@param visitedTypes used to prevent an endless loop\n@param parameterName", "Required to close the connection reading on the terminal, otherwise\nit can't be interrupted.\n\n@throws InterruptedException" ]
public void setMaintenanceMode(String appName, boolean enable) { connection.execute(new AppUpdate(appName, enable), apiKey); }
[ "Sets maintenance mode for the given app\n\n@param appName See {@link #listApps} for a list of apps that can be used.\n@param enable true to enable; false to disable" ]
[ "Computes the p=1 norm. If A is a matrix then the induced norm is computed.\n\n@param A Matrix or vector.\n@return The norm.", "Toggle between single events and series.\n@param isSeries flag, indicating if we want a series of events.", "Returns the body of the request. This method is used to read posted JSON data.\n\n@param request The request.\n\n@return String representation of the request's body.\n\n@throws IOException in case reading the request fails", "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.", "Add a resource assignment which has been populated elsewhere.\n\n@param assignment resource assignment", "Accessor method used to retrieve a Boolean object representing the\ncontents of an individual field. If the field does not exist in the\nrecord, null is returned.\n\n@param field the index number of the field to be retrieved\n@return the value of the required field", "Creates a code location URL from a class\n\n@param codeLocationClass the class\n@return A URL created from Class\n@throws InvalidCodeLocation if URL creation fails", "Returns true if a Map literal that contains only entries where both key and value are constants.\n@param expression - any expression", "Adds a set of tests based on pattern matching." ]
public void clearHistory(int profileId, String clientUUID) { PreparedStatement query = null; try (Connection sqlConnection = sqlService.getConnection()) { String sqlQuery = "DELETE FROM " + Constants.DB_TABLE_HISTORY + " "; // see if profileId is null or not (-1) if (profileId != -1) { sqlQuery += "WHERE " + Constants.GENERIC_PROFILE_ID + "=" + profileId; } // see if clientUUID is null or not if (clientUUID != null && clientUUID.compareTo("") != 0) { sqlQuery += " AND " + Constants.GENERIC_CLIENT_UUID + "='" + clientUUID + "'"; } sqlQuery += ";"; logger.info("Query: {}", sqlQuery); query = sqlConnection.prepareStatement(sqlQuery); query.executeUpdate(); } catch (Exception e) { } finally { try { if (query != null) { query.close(); } } catch (Exception e) { } } }
[ "Clear history for a client\n\n@param profileId ID of profile\n@param clientUUID UUID of client" ]
[ "Gets the node meta data.\n\n@param key - the meta data key\n@return the node meta data value for this key", "Use this API to enable Interface of given name.", "Returns all keys of all rows contained within this association.\n\n@return all keys of all rows contained within this association", "Go over the task list and create a map of stealerId -> Tasks\n\n@param sbTaskList List of all stealer-based rebalancing tasks to be\nscheduled.", "Set a status message in the JTextComponent passed to this\nmodel.\n@param message The message that should be displayed.", "Convert an ObjectBank to arrays of data features and labels.\n\n@return A Pair, where the first element is an int[][][][] representing the\ndata and the second element is an int[][] representing the labels.", "Searches for brackets which are only used to construct new matrices by concatenating\n1 or more matrices together", "StartMain passes in the command line args here.\n\n@param args The command line arguments. If null is given then an empty\narray will be used instead.", "Use this API to delete systemuser of given name." ]
public void cmdProc(Interp interp, TclObject argv[]) throws TclException { int currentObjIndex, len, i; int objc = argv.length - 1; boolean doBackslashes = true; boolean doCmds = true; boolean doVars = true; StringBuffer result = new StringBuffer(); String s; char c; for (currentObjIndex = 1; currentObjIndex < objc; currentObjIndex++) { if (!argv[currentObjIndex].toString().startsWith("-")) { break; } int opt = TclIndex.get(interp, argv[currentObjIndex], validCmds, "switch", 0); switch (opt) { case OPT_NOBACKSLASHES: doBackslashes = false; break; case OPT_NOCOMMANDS: doCmds = false; break; case OPT_NOVARS: doVars = false; break; default: throw new TclException(interp, "SubstCrCmd.cmdProc: bad option " + opt + " index to cmds"); } } if (currentObjIndex != objc) { throw new TclNumArgsException(interp, currentObjIndex, argv, "?-nobackslashes? ?-nocommands? ?-novariables? string"); } /* * Scan through the string one character at a time, performing * command, variable, and backslash substitutions. */ s = argv[currentObjIndex].toString(); len = s.length(); i = 0; while (i < len) { c = s.charAt(i); if ((c == '[') && doCmds) { ParseResult res; try { interp.evalFlags = Parser.TCL_BRACKET_TERM; interp.eval(s.substring(i + 1, len)); TclObject interp_result = interp.getResult(); interp_result.preserve(); res = new ParseResult(interp_result, i + interp.termOffset); } catch (TclException e) { i = e.errIndex + 1; throw e; } i = res.nextIndex + 2; result.append( res.value.toString() ); res.release(); /** * Removed (ToDo) may not be portable on Mac } else if (c == '\r') { i++; */ } else if ((c == '$') && doVars) { ParseResult vres = Parser.parseVar(interp, s.substring(i, len)); i += vres.nextIndex; result.append( vres.value.toString() ); vres.release(); } else if ((c == '\\') && doBackslashes) { BackSlashResult bs = Interp.backslash(s, i, len); i = bs.nextIndex; if (bs.isWordSep) { break; } else { result.append( bs.c ); } } else { result.append( c ); i++; } } interp.setResult(result.toString()); }
[ "This procedure is invoked to process the \"subst\" Tcl command.\nSee the user documentation for details on what it does.\n\n@param interp the current interpreter.\n@param argv command arguments.\n@exception TclException if wrong # of args or invalid argument(s)." ]
[ "Returns the invocation handler object of the given proxy object.\n\n@param obj The object\n@return The invocation handler if the object is an OJB proxy, or <code>null</code>\notherwise", "Upload a photo from a byte-array.\n\n@param data\nThe photo data as a byte array\n@param metaData\nThe meta data\n@return photoId or ticketId\n@throws FlickrException", "This method writes a resource's availability table.\n\n@param xml MSPDI resource\n@param mpx MPXJ resource", "Polls from the provided URL and updates the polling state with the\npolling response.\n\n@param pollingState the polling state for the current operation.\n@param url the url to poll from\n@param <T> the return type of the caller.", "Serialize a parameterized object to an OutputStream.\n\n@param object The object to serialize.\n@param parameterizedType The ParameterizedType describing the object. Ex: LoganSquare.serialize(object, new ParameterizedType&lt;MyModel&lt;OtherModel&gt;&gt;() { }, os);\n@param os The OutputStream being written to.", "Returns true if the addon depends on reporting.", "Sets the maximum time to wait before a call to getConnection is timed out.\n\nSetting this to zero is similar to setting it to Long.MAX_VALUE\n\n@param connectionTimeout\n@param timeUnit the unit of the connectionTimeout argument", "Get range around median containing specified percentage of values.\n@param values Values.\n@param percent Values percentage around median.\n@return Returns the range which containes specifies percentage of values.", "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" ]
public static int nullity(SingularValueDecomposition_F64 svd , double threshold ) { int ret = 0; double w[]= svd.getSingularValues(); int N = svd.numberOfSingularValues(); int numCol = svd.numCols(); for( int j = 0; j < N; j++ ) { if( w[j] <= threshold) ret++; } return ret + numCol-N; }
[ "Extracts the nullity of a matrix using a preexisting decomposition.\n\n@see #singularThreshold(SingularValueDecomposition_F64)\n\n@param svd A precomputed decomposition. Not modified.\n@param threshold Tolerance used to determine of a singular value is singular.\n@return The nullity of the decomposed matrix." ]
[ "A simple convinience function that decomposes the matrix but automatically checks the input ti make\nsure is not being modified.\n\n@param decomp Decomposition which is being wrapped\n@param M THe matrix being decomposed.\n@param <T> Matrix type.\n@return If the decomposition was successful or not.", "Refresh children using read-resource operation.", "Two stage distribution, dry run and actual promotion to verify correctness.\n\n@param distributionBuilder\n@param client\n@param listener\n@param buildName\n@param buildNumber\n@throws IOException", "Create and serialize a JobFailure.\n\n@param thrwbl the Throwable that occurred\n@param queue the queue the job came from\n@param job the Job that failed\n@return the JSON representation of a new JobFailure\n@throws IOException if there was an error serializing the JobFailure", "Reads and returns the mediator URN from the JSON content.\n\n@see #RegistrationConfig(String)", "This method dumps the entire contents of a file to an output\nprint writer as hex and ASCII data.\n\n@param is Input Stream\n@param pw Output PrintWriter\n@return number of bytes read\n@throws Exception Thrown on file read errors", "Returns a flag, indicating if search should be performed using a wildcard if the empty query is given.\n@return A flag, indicating if search should be performed using a wildcard if the empty query is given.", "Used by the slave host when creating the host info dmr sent across to the DC during the registration process\n\n@param ignoreUnaffectedServerGroups whether the slave host is set up to ignore config for server groups it does not have servers for\n@param hostModel the resource containing the host model\n@param model the dmr sent across to theDC\n@return the modified dmr", "characters callback." ]
public void executeDelete(ClassDescriptor cld, Object obj) throws PersistenceBrokerException { if (logger.isDebugEnabled()) { logger.debug("executeDelete: " + obj); } final StatementManagerIF sm = broker.serviceStatementManager(); PreparedStatement stmt = null; try { stmt = sm.getDeleteStatement(cld); if (stmt == null) { logger.error("getDeleteStatement returned a null statement"); throw new PersistenceBrokerException("JdbcAccessImpl: getDeleteStatement returned a null statement"); } sm.bindDelete(stmt, cld, obj); if (logger.isDebugEnabled()) logger.debug("executeDelete: " + stmt); // @todo: clearify semantics // thma: the following check is not secure. The object could be deleted *or* changed. // if it was deleted it makes no sense to throw an OL exception. // does is make sense to throw an OL exception if the object was changed? if (stmt.executeUpdate() == 0 && cld.isLocking()) //BRJ { /** * Kuali Foundation modification -- 6/19/2009 */ String objToString = ""; try { objToString = obj.toString(); } catch (Exception ex) {} throw new OptimisticLockException("Object has been modified or deleted by someone else: " + objToString, obj); /** * End of Kuali Foundation modification */ } // Harvest any return values. harvestReturnValues(cld.getDeleteProcedure(), obj, stmt); } catch (OptimisticLockException e) { // Don't log as error if (logger.isDebugEnabled()) logger.debug("OptimisticLockException during the execution of delete: " + e.getMessage(), e); throw e; } catch (PersistenceBrokerException e) { logger.error("PersistenceBrokerException during the execution of delete: " + e.getMessage(), e); throw e; } catch (SQLException e) { final String sql = broker.serviceSqlGenerator().getPreparedDeleteStatement(cld).getStatement(); throw ExceptionHelper.generateException(e, sql, cld, logger, obj); } finally { sm.closeResources(stmt, null); } }
[ "performs a DELETE operation against RDBMS.\n@param cld ClassDescriptor providing mapping information.\n@param obj The object to be deleted." ]
[ "Set day.\n\n@param d day instance", "Use this API to add route6.", "disables the current active id, enables the new one selected\n\n@param profileId profile ID of the client\n@param clientUUID UUID of the client\n@param active true to make client active, false to make client inactive\n@throws Exception exception", "Start the initialization.\n\n@param id\n@param manager\n@param bootstrap\n@return the initialized Weld container", "Determines if the queue identified by the given key is used.\n\n@param jedis\nconnection to Redis\n@param key\nthe key that identifies a queue\n@return true if the key is used, false otherwise", "Lock the given region. Does not report failures.", "Extract a list of work pattern assignments.\n\n@param workPatterns string representation of work pattern assignments\n@return list of work pattern assignment rows", "Set the end time.\n@param date the end time to set.", "Append the html-code to finish a html mail message to the given buffer.\n\n@param buffer The StringBuffer to add the html code to." ]
public static long getVisibilityCacheWeight(FluoConfiguration conf) { long size = conf.getLong(VISIBILITY_CACHE_WEIGHT, VISIBILITY_CACHE_WEIGHT_DEFAULT); if (size <= 0) { throw new IllegalArgumentException( "Cache size must be positive for " + VISIBILITY_CACHE_WEIGHT); } return size; }
[ "Gets the visibility cache weight\n\n@param conf The FluoConfiguration\n@return The size of the cache value from the property value {@value #VISIBILITY_CACHE_WEIGHT}\nif it is set, else the value of the default value\n{@value #VISIBILITY_CACHE_WEIGHT_DEFAULT}" ]
[ "Return a list of segments where each segment is either the content of a line in the given text or a line-break\naccording to the configured delimiter. Existing line-breaks in the text will be replaced by this's\ninstances delimiter.\n\n@param text\nthe to-be-splitted text. May be <code>null</code>.\n@return a list of segments. Is never <code>null</code>.", "Uncheck all items in the list including all sub-items.\n@param list list of CmsTreeItem entries.", "Caches the results of radix to the given power.\n\n@param radix\n@param power\n@return", "Adds an additional interface that the proxy should implement. The default\nimplementation will be to forward invocations to the bean instance.\n\n@param newInterface an interface", "Generate the next permutation and return an array containing\nthe elements in the appropriate order.\n@see #nextPermutationAsArray(Object[])\n@see #nextPermutationAsList()\n@return The next permutation as an array.", "Writes an activity to a PM XML file.\n\n@param mpxj MPXJ Task instance", "Returns all the URL that should be inside the classpath. This includes the jar itself if any.\n\n@throws JqmPayloadException", "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", "Creates a metadata cache archive file of all tracks in the specified slot on the specified player. Any\nprevious contents of the specified file will be replaced.\n\n@param slot the slot in which the media to be cached can be found\n@param playlistId the id of playlist to be cached, or 0 of all tracks should be cached\n@param cache the file into which the metadata cache should be written\n\n@throws Exception if there is a problem communicating with the player or writing the cache file." ]
private static void parseDockers(JSONObject modelJSON, Shape current) throws JSONException { if (modelJSON.has("dockers")) { ArrayList<Point> dockers = new ArrayList<Point>(); JSONArray dockersObject = modelJSON.getJSONArray("dockers"); for (int i = 0; i < dockersObject.length(); i++) { Double x = dockersObject.getJSONObject(i).getDouble("x"); Double y = dockersObject.getJSONObject(i).getDouble("y"); dockers.add(new Point(x, y)); } if (dockers.size() > 0) { current.setDockers(dockers); } } }
[ "creates a point array of all dockers and add it to the current shape\n@param modelJSON\n@param current\n@throws org.json.JSONException" ]
[ "Write exceptions into the format used by MSPDI files from\nProject 2007 onwards.\n\n@param calendar parent calendar\n@param exceptions list of exceptions", "Changes the index buffer associated with this mesh.\n@param ibuf new index buffer to use\n@see #setIndices(int[])\n@see #getIndexBuffer()\n@see #getIntIndices()", "helper method to set the TranslucentNavigationFlag\n\n@param on", "Get the sub registry for the hosts.\n\n@param range the version range\n@return the sub registry", "The transaction will be executed. While it is running, any semantic state change\nin the given resource will be ignored and the cache will not be cleared.", "Remove a partition from the node provided\n\n@param node The node from which we're removing the partition\n@param donatedPartition The partitions to remove\n@return The new node without the partition", "get an AdminClient from the cache if exists, if not create new one\nand return it. This method is non-blocking.\n\nAll AdminClient returned from checkout, once after the completion of\nusage must be returned to the pool by calling checkin. If not,\nthere will be leak of AdminClients (connections, threads and file handles).\n\n@return AdminClient", "Sets a listener to inform when the user closes the SearchView.\n\n@param listener the listener to call when the user closes the SearchView.", "adds a CmsJspImageBean as hi-DPI variant to this image\n@param factor the variant multiplier, e.g. \"2x\" (the common retina multiplier)\n@param image the image to be used for this variant" ]
public long getTimeFor(int player) { TrackPositionUpdate update = positions.get(player); if (update != null) { return interpolateTimeSinceUpdate(update, System.nanoTime()); } return -1; // We don't know. }
[ "Get the best guess we have for the current track position on the specified player.\n\n@param player the player number whose position is desired\n\n@return the milliseconds into the track that we believe playback has reached, or -1 if we don't know\n\n@throws IllegalStateException if the TimeFinder is not running" ]
[ "This method removes trailing delimiter characters.\n\n@param buffer input sring buffer", "Validates the binding types", "Adds the task to the specified project, in the optional location\nspecified. If no location arguments are given, the task will be added to\nthe end of the project.\n\n`addProject` can also be used to reorder a task within a project or section that\nalready contains it.\n\nAt most one of `insert_before`, `insert_after`, or `section` should be\nspecified. Inserting into a section in an non-order-dependent way can be\ndone by specifying `section`, otherwise, to insert within a section in a\nparticular place, specify `insert_before` or `insert_after` and a task\nwithin the section to anchor the position of this task.\n\nReturns an empty data block.\n\n@param task The task to add to a project.\n@return Request object", "Calculate the first argument raised to the power of the second.\nThis method only supports non-negative powers.\n@param value The number to be raised.\n@param power The exponent (must be positive).\n@return {@code value} raised to {@code power}.", "copy all fields from the \"from\" object to the \"to\" object.\n\n@param from source object\n@param to from's clone\n@param fields fields to be populated\n@param accessible 'true' if all 'fields' have been made accessible during\ntraversal", "Given an array of variable names, returns a JsonObject\nof values.\n\n@param dataMap an map containing variable names and their corresponding values\nnames.\n@return a json object of values", "This method performs a series of permissions checks given a directory and properties file path.\n\n1 - Check whether the parent directory dirPath has proper execute and read permissions\n2 - Check whether properties file path is readable and writable\n\nIf either of the permissions checks fail, update validFilePermissions and filePermissionsProblemPath\nappropriately.", "Returns whether this represents a valid host name or address format.\n@return", "Search for the first entry in the first database. Use this method for databases configured with no duplicates.\n\n@param txn enclosing transaction\n@param first first key.\n@return null if no entry found, otherwise the value." ]
public ContentAssistContext.Builder copy() { Builder result = builderProvider.get(); result.copyFrom(this); return result; }
[ "Use this context as prototype for a new mutable builder. The new builder is\npre-populated with the current settings of this context instance." ]
[ "Reads a file and returns the result in a String\n\n@param file File\n@return String\n@throws IOException", "Adds multiple observers using unique integer prefixes for each.\n\n@deprecated since 1.1.0. Replaced by {@link #setObserverProvider(String)} and\n{@link #getObserverProvider()}", "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", "Arrange to become the tempo master. Starts a sequence of interactions with the other players that should end\nup with us in charge of the group tempo and beat alignment.\n\n@throws IllegalStateException if we are not sending status updates\n@throws IOException if there is a problem sending the master yield request", "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", "Create a Task instance from a Phoenix activity.\n\n@param activity Phoenix activity data", "A property tied to the map, updated when the idle state event is fired.\n\n@return", "Checks the orderby attribute.\n\n@param collDef The collection descriptor\n@param checkLevel The current check level (this constraint is checked in basic and strict)\n@exception ConstraintException If the value for orderby is invalid (unknown field or ordering)", "The length of the region left to the completion offset that is part of the\nreplace region." ]
public static FreeMarkerOperation create(Furnace furnace, String templatePath, String outputFilename, String... varNames) { return new FreeMarkerOperation(furnace, templatePath, outputFilename, varNames); }
[ "Create a FreeMarkerOperation with the provided furnace instance template path, and varNames.\n\nThe variables in varNames will be provided to the template, and a new ReportModel will be created with these variables attached." ]
[ "It will look for all the deployments under the deploymentsRootAddress with a runtimeName in the specified list of\nruntime names and then transform the operation so that every server having those deployments will redeploy the\naffected deployments.\n\n@see #transformOperation\n@param removeOperation\n@param context\n@param deploymentsRootAddress\n@param runtimeNames\n@throws OperationFailedException", "Serializes this RuleSet in an XML document.\n\n@param destination The writer to which the XML document shall be written.", "Specifies the ARM resource id of the user assigned managed service identity resource that\nshould be used to retrieve the access token.\n\n@param identityId the ARM resource id of the user assigned identity resource\n@return MSICredentials", "Check the version of a command class by sending a VERSION_COMMAND_CLASS_GET message to the node.\n@param commandClass the command class to check the version for.", "Determine whether the given method is a \"readString\" method.\n\n@see Object#toString()", "Set the duration option.\n@param value the duration option to set ({@link EndType} as string).", "Get EditMode based on os and mode\n\n@return edit mode", "Updates the text style according to a new text position\n@param bstyle the style to be updated\n@param text the text position", "Helper method that encapsulates the minimum logic for adding a job to a\nqueue.\n\n@param jedis\nthe connection to Redis\n@param namespace\nthe Resque namespace\n@param queue\nthe Resque queue name\n@param jobJson\nthe job serialized as JSON" ]
public void createEnablement() { GlobalEnablementBuilder builder = beanManager.getServices().get(GlobalEnablementBuilder.class); ModuleEnablement enablement = builder.createModuleEnablement(this); beanManager.setEnabled(enablement); if (BootstrapLogger.LOG.isDebugEnabled()) { BootstrapLogger.LOG.enabledAlternatives(this.beanManager, WeldCollections.toMultiRowString(enablement.getAllAlternatives())); BootstrapLogger.LOG.enabledDecorators(this.beanManager, WeldCollections.toMultiRowString(enablement.getDecorators())); BootstrapLogger.LOG.enabledInterceptors(this.beanManager, WeldCollections.toMultiRowString(enablement.getInterceptors())); } }
[ "Initializes module enablement.\n\n@see ModuleEnablement" ]
[ "Stop announcing ourselves and listening for status updates.", "Perform the given work with a Jedis connection from the given pool.\nWraps any thrown checked exceptions in a RuntimeException.\n\n@param pool the resource pool\n@param work the work to perform\n@param <V> the result type\n@return the result of the given work", "Creates an internal project and repositories such as a token storage.", "Converts a list of dates to a Json array with the long representation of the dates as strings.\n@param individualDates the list to convert.\n@return Json array with long values of dates as string", "Copy a patch element\n\n@param entry the patch entry\n@param patchId the patch id for the element\n@param modifications the element modifications\n@return the new patch element", "The documentation for InputStream.skip indicates that it can bail out early, and not skip\nthe requested number of bytes. I've encountered this in practice, hence this helper method.\n\n@param stream InputStream instance\n@param skip number of bytes to skip", "Prepare a parallel HTTP PUT Task.\n\n@param url\nthe UrlPostfix: e.g. in http://localhost:8080/index.html.,the url is \"/index.html\"\n@return the parallel task builder", "Get the bar size.\n\n@param settings Parameters for rendering the scalebar.", "Loads the SPI backing bean.\n\n@return the instance of MonetaryFormatsSingletonSpi to be used by this singleton." ]
public static <T extends Annotation> List<T> searchForAnnotation(Method method, Class<T> annotation) { if (method == null) { return Lists.newArrayList(); } return searchClasses(method, annotation, method.getDeclaringClass()); }
[ "Searches for all annotations of the given type on this method or on type level for all interfaces and superclasses\n\n@param method the method to scan\n@param annotation the annotation to search for\n@param <T> the type of the annotation\n@return the list of all method or type level annotations in the type hierarchy" ]
[ "Look at the comments on cluster variable to see why this is problematic", "Look up the database server port reported by a given player. You should not use this port directly; instead\nask this class for a session to use while you communicate with the database.\n\n@param player the player number of interest\n\n@return the port number on which its database server is running, or -1 if unknown\n\n@throws IllegalStateException if not running", "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)", "Record operation for sync ops time\n\n@param dest Destination of the socket to connect to. Will actually record\nif null. Otherwise will call this on self and corresponding child\nwith this param null.\n@param opTimeUs The number of us for the op to finish", "Prepares transformation interceptors for a client.\n\n@param clientConfig the client configuration\n@param newClient indicates if it is a new/updated client", "Gets a legend graphic with the specified metadata parameters. All parameters are passed as request parameters.\n\n@param layerId\nthe layer id\n@param styleName\nthe style name\n@param ruleIndex\nthe rule index\n@param format\nthe image format ('png','jpg','gif')\n@param width\nthe graphic's width\n@param height\nthe graphic's height\n@param scale\nthe scale denominator (not supported yet)\n@param allRules\nif true the image will contain all rules stacked vertically\n@param request\nthe servlet request object\n@return the model and view\n@throws GeomajasException\nwhen a style or rule does not exist or is not renderable", "Create a model mbean from an object using the description given in the\nJmx annotation if present. Only operations are supported so far, no\nattributes, constructors, or notifications\n\n@param o The object to create an MBean for\n@return The ModelMBean for the given object", "Make log segment file name from offset bytes. All this does is pad out the offset number\nwith zeros so that ls sorts the files numerically\n@param offset offset value (padding with zero)\n@return filename with offset", "Converts the given string to a clob object\n\n@param stringName string name to clob\n@param sqlConnection Connection object\n@return Clob object or NULL" ]
public <T> T get(Contextual<T> contextual, CreationalContext<T> creationalContext) { if (!isActive()) { throw new ContextNotActiveException(); } if (creationalContext != null) { T instance = contextual.create(creationalContext); if (creationalContext instanceof WeldCreationalContext<?>) { addDependentInstance(instance, contextual, (WeldCreationalContext<T>) creationalContext); } return instance; } else { return null; } }
[ "Overridden method always creating a new instance\n\n@param contextual The bean to create\n@param creationalContext The creation context" ]
[ "Returns the corresponding ModuleSpec service name for the given module.\n\n@param identifier The module identifier\n@return The service name of the ModuleSpec service", "Consumes a produced result. Calls every transformer in sequence, then\ncalls every dataWriter in sequence.\n\n@param initialVars a map containing the initial variables assignments\n@return the number of lines written", "Bilinear interpolation of ARGB values.\n@param x the X interpolation parameter 0..1\n@param y the y interpolation parameter 0..1\n@param rgb array of four ARGB values in the order NW, NE, SW, SE\n@return the interpolated value", "Start a server.\n\n@return the http server\n@throws Exception the exception", "Delivers the correct JSON Object for the Bounds\n\n@param bounds\n@throws org.json.JSONException", "Gets the actual key - will create a new row with the max key of table if it\ndoes not exist.\n@param field\n@return\n@throws SequenceManagerException", "This method extracts data for a single predecessor from an MSPDI file.\n\n@param currTask Current task object\n@param link Predecessor data", "Sets the ssh priv key relative path wtih passphrase.\n\n@param privKeyRelativePath the priv key relative path\n@param passphrase the passphrase\n@return the parallel task builder", "Creates a sort configuration iff at least one of the parameters is not null and the options list is not empty.\n@param sortParam The request parameter used to send the currently chosen search option.\n@param options The available sort options.\n@param defaultOption The default sort option.\n@return the sort configuration or null, depending on the arguments." ]
public Script getScript(int id) { PreparedStatement statement = null; ResultSet results = null; try (Connection sqlConnection = SQLService.getInstance().getConnection()) { statement = sqlConnection.prepareStatement( "SELECT * FROM " + Constants.DB_TABLE_SCRIPT + " WHERE id = ?" ); statement.setInt(1, id); results = statement.executeQuery(); if (results.next()) { return scriptFromSQLResult(results); } } catch (Exception e) { } finally { try { if (results != null) { results.close(); } } catch (Exception e) { } try { if (statement != null) { statement.close(); } } catch (Exception e) { } } return null; }
[ "Get the script for a given ID\n\n@param id ID of script\n@return Script if found, otherwise null" ]
[ "Produces or returns the existing proxy class. The operation is thread-safe.\n\n@return always the class of the proxy", "Copies the given container page to the provided root path.\n@param originalPage the page to copy\n@param targetPageRootPath the root path of the copy target.\n@throws CmsException thrown if something goes wrong.\n@throws NoCustomReplacementException if a custom replacement is not found for a type which requires it.", "This takes into account objects that breaks the JavaBean convention\nand have as getter for Boolean objects an \"isXXX\" method.\n@param dest\n@param orig", "Gets an iterable of all the collections for the given user.\n@param api the API connection to be used when retrieving the collections.\n@return an iterable containing info about all the collections.", "The nullity of the decomposed matrix.\n\n@see SingularOps_DDRM#nullity(SingularValueDecomposition_F64, double)\n\n@return The matrix's nullity", "Finds to a given point p the point on the spline with minimum distance.\n@param p Point where the nearest distance is searched for\n@param nPointsPerSegment Number of interpolation points between two support points\n@return Point spline which has the minimum distance to p", "Given a class configures the binding between a class and a Renderer class.\n\n@param clazz to bind.\n@param prototype used as Renderer.\n@return the current RendererBuilder instance.", "Send a master changed announcement to all registered master listeners.\n\n@param update the message announcing the new tempo master", "Used internally to find the solution to a single column vector." ]
public static base_responses add(nitro_service client, nspbr6 resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { nspbr6 addresources[] = new nspbr6[resources.length]; for (int i=0;i<resources.length;i++){ addresources[i] = new nspbr6(); addresources[i].name = resources[i].name; addresources[i].td = resources[i].td; addresources[i].action = resources[i].action; addresources[i].srcipv6 = resources[i].srcipv6; addresources[i].srcipop = resources[i].srcipop; addresources[i].srcipv6val = resources[i].srcipv6val; addresources[i].srcport = resources[i].srcport; addresources[i].srcportop = resources[i].srcportop; addresources[i].srcportval = resources[i].srcportval; addresources[i].destipv6 = resources[i].destipv6; addresources[i].destipop = resources[i].destipop; addresources[i].destipv6val = resources[i].destipv6val; addresources[i].destport = resources[i].destport; addresources[i].destportop = resources[i].destportop; addresources[i].destportval = resources[i].destportval; addresources[i].srcmac = resources[i].srcmac; addresources[i].protocol = resources[i].protocol; addresources[i].protocolnumber = resources[i].protocolnumber; addresources[i].vlan = resources[i].vlan; addresources[i].Interface = resources[i].Interface; addresources[i].priority = resources[i].priority; addresources[i].state = resources[i].state; addresources[i].msr = resources[i].msr; addresources[i].monitor = resources[i].monitor; addresources[i].nexthop = resources[i].nexthop; addresources[i].nexthopval = resources[i].nexthopval; addresources[i].nexthopvlan = resources[i].nexthopvlan; } result = add_bulk_request(client, addresources); } return result; }
[ "Use this API to add nspbr6 resources." ]
[ "Support the subscript operator for GString.\n\n@param text a GString\n@param index the index of the Character to get\n@return the Character at the given index\n@since 2.3.7", "Use this API to unset the properties of snmpalarm resources.\nProperties that need to be unset are specified in args array.", "Build the crosstab. Throws LayoutException if anything is wrong\n@return", "Prepares a representation of the model that is easier accessible for our purposes.\n\n@param model The original model\n@return The model representation", "Add the given, single header value under the given name.\n@param headerName the header name\n@param headerValue the header value\n@throws UnsupportedOperationException if adding headers is not supported\n@see #put(String, List)\n@see #set(String, String)", "Sets no of currency digits.\n\n@param currDigs Available values, 0,1,2", "add a FK column pointing to This Class", "Attempts to create a human-readable String representation of the provided rule.", "Deletes data associated with the given profile ID\n\n@param profileId ID of profile" ]
public static int getMemberDimension() throws XDocletException { if (getCurrentField() != null) { return getCurrentField().getDimension(); } else if (getCurrentMethod() != null) { XMethod method = getCurrentMethod(); if (MethodTagsHandler.isGetterMethod(method)) { return method.getReturnType().getDimension(); } else if (MethodTagsHandler.isSetterMethod(method)) { XParameter param = (XParameter)method.getParameters().iterator().next(); return param.getDimension(); } } return 0; }
[ "Returns the dimension of the type of the current member.\n\n@return The member dimension\n@exception XDocletException if an error occurs\n@see OjbMemberTagsHandler#getMemberType()" ]
[ "Encrypt a string with AES-128 using the specified key.\n\n@param message Input string.\n@param key Encryption key.\n@return Encrypted output.", "Checks whether the compilation has been canceled and reports the given work increment to the compiler progress.", "Use this API to add transformpolicy.", "Use this API to update route6 resources.", "Synthesize and forward a KeyEvent to the library.\n\nThis call is made from the native layer.\n\n@param code id of the button\n@param action integer representing the action taken on the button", "Converts SMatrixTriplet_64 into a SMatrixCC_64.\n\n@param src Original matrix which is to be copied. Not modified.\n@param dst Destination. Will be a copy. Modified.\n@param hist Workspace. Should be at least as long as the number of columns. Can be null.", "Get the pickers date.", "Use this API to fetch all the linkset resources that are configured on netscaler.", "Use this API to fetch nstrafficdomain_binding resources of given names ." ]
public static int cudnnRestoreDropoutDescriptor( cudnnDropoutDescriptor dropoutDesc, cudnnHandle handle, float dropout, Pointer states, long stateSizeInBytes, long seed) { return checkResult(cudnnRestoreDropoutDescriptorNative(dropoutDesc, handle, dropout, states, stateSizeInBytes, seed)); }
[ "Restores the dropout descriptor to a previously saved-off state" ]
[ "Stops and clears all transitions", "Obtains a local date in Coptic 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 Coptic local date, not null\n@throws DateTimeException if unable to create the date", "Writes triples to determine the statements with the highest rank.", "Get the primitive attributes for the associated object.\n\n@return attributes for associated objects\n@deprecated replaced by {@link #getAllAttributes()} after introduction of nested associations", "Rollback to the specified push version\n\n@param rollbackToDir The version directory to rollback to", "Build a stack trace for this path. This can be used in generating more meaningful exceptions\nwhile using Crawljax in conjunction with JUnit for example.\n\n@return a array of StackTraceElements denoting the steps taken by this path. The first\nelement [0] denotes the last {@link Eventable} on this path while the last item\ndenotes the first {@link Eventable} executed.", "Returns the expression string required\n\n@param ds\n@return", "Helper function to bind script bundler to various targets", "Factory for 'and' and 'or' predicates." ]
public boolean isPublisherWrapped(AbstractProject<?, ?> project, Class<T> type) { return find(project, type) != null; }
[ "Determines whether a project has the specified publisher type, wrapped by the \"Flexible Publish\" publisher.\n@param project The project\n@param type The type of the publisher\n@return true if the project contains a publisher of the specified type wrapped by the \"Flexible Publish\" publisher." ]
[ "Create a model mbean from an object using the description given in the\nJmx annotation if present. Only operations are supported so far, no\nattributes, constructors, or notifications\n\n@param o The object to create an MBean for\n@return The ModelMBean for the given object", "Removes the expiration flag.", "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", "Registers all custom Externalizer implementations that Hibernate OGM needs into an Infinispan CacheManager\nconfiguration.\n\n@see ExternalizerIds\n@param cfg the Serialization section of a GlobalConfiguration builder", "Use this API to export appfwlearningdata resources.", "Retrieves the index of a cost rate table entry active on a given date.\n\n@param date target date\n@return cost rate table entry index", "Constructs a string representing this address according to the given parameters\n\n@param keepMixed if this address was constructed from a string with mixed representation (a:b:c:d:e:f:1.2.3.4), whether to keep it that way (ignored if makeMixed is true in the params argument)\n@param params the parameters for the address string", "Get the response headers for URL, following redirects\n\n@param stringUrl URL to use\n@param followRedirects whether to follow redirects\n@return headers HTTP Headers\n@throws IOException I/O error happened", "Adds a file to your assembly but automatically genarates the name of the file.\n\n@param inputStream {@link InputStream} the file to be uploaded." ]
public static <X, T> ProducerField<X, T> of(BeanAttributes<T> attributes, EnhancedAnnotatedField<T, ? super X> field, AbstractClassBean<X> declaringBean, DisposalMethod<X, ?> disposalMethod, BeanManagerImpl beanManager, ServiceRegistry services) { return new ProducerField<X, T>(attributes, field, declaringBean, disposalMethod, beanManager, services); }
[ "Creates a producer field\n\n@param field The underlying method abstraction\n@param declaringBean The declaring bean abstraction\n@param beanManager the current manager\n@return A producer field" ]
[ "Grab random holiday from the equivalence class that falls between the two dates\n\n@param earliest the earliest date parameter as defined in the model\n@param latest the latest date parameter as defined in the model\n@return a holiday that falls between the dates", "Inserts a new instance but references via the outIdentifier, which is returned as part of the ExecutionResults\n\n@param object\n@param outIdentifier\n@return", "Generates a License regarding the parameters.\n\n@param name String\n@param longName String\n@param comments String\n@param regexp String\n@param url String\n@return License", "Use this API to export sslfipskey resources.", "Reads GIF image from byte array.\n\n@param data containing GIF file.\n@return read status code (0 = no errors).", "Dump the buffer contents to a file\n@param file\n@throws IOException", "Convenience method to escape any character that is special to the regex system.\n\n@param inString\nthe string to fix\n\n@return the fixed string", "Traces the duration between origin time in the http Request and time just\nbefore being processed by the fat client\n\n@param operationType\n@param originTimeInMS - origin time in the Http Request\n@param requestReceivedTimeInMs - System Time in ms\n@param keyString", "Indicates if the type is a simple Web Bean\n\n@param clazz The type to inspect\n@return True if simple Web Bean, false otherwise" ]
void close() { try { performTeardownExchange(); } catch (IOException e) { logger.warn("Problem reporting our intention to close the dbserver connection", e); } try { channel.close(); } catch (IOException e) { logger.warn("Problem closing dbserver client output channel", e); } try { os.close(); } catch (IOException e) { logger.warn("Problem closing dbserver client output stream", e); } try { is.close(); } catch (IOException e) { logger.warn("Problem closing dbserver client input stream", e); } try { socket.close(); } catch (IOException e) { logger.warn("Problem closing dbserver client socket", e); } }
[ "Closes the connection to the dbserver. This instance can no longer be used after this action." ]
[ "Gets the favorite entries corresponding to the currently displayed favorite widgets.\n\n@return the list of favorite entries", "Render json.\n\n@param o\nthe o\n@return the string", "Use this API to update nsrpcnode.", "If users want to implement clone on all their objects, we can use this\nto make copies. This is hazardous as user may mess it up, but it is also\npotentially the fastest way of making a copy.\n\nUsually the OjbCloneable interface should just be delegating to the clone()\noperation that the user has implemented.\n\n@see org.apache.ojb.otm.copy.ObjectCopyStrategy#copy(Object)", "Returns the z-coordinate of a vertex position.\n\n@param vertex the vertex index\n@return the z coordinate", "Checks the preconditions for creating a new StrRegExReplace processor.\n\n@param regex\nthe supplied regular expression\n@param replacement\nthe supplied replacement text\n@throws IllegalArgumentException\nif regex is empty\n@throws NullPointerException\nif regex or replacement is null", "Gets an app client by its client app id if it has been initialized; throws if none can be\nfound.\n\n@param clientAppId the client app id of the app client to get.\n@return the app client associated with the client app id.", "Returns a persistence strategy based on the passed configuration.\n\n@param cacheMapping the selected {@link org.hibernate.ogm.datastore.keyvalue.options.CacheMappingType}\n@param externalCacheManager the infinispan cache manager\n@param configurationUrl the location of the configuration file\n@param jtaPlatform the {@link JtaPlatform}\n@param entityTypes the meta-data of the entities\n@param associationTypes the meta-data of the associations\n@param idSourceTypes the meta-data of the id generators\n@return the persistence strategy", "Checks the extents specifications and removes unnecessary entries.\n\n@param classDef The class 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" ]
public void setHtmlElementTranslator(HtmlElementTranslator htmlElementTranslator) { if(htmlElementTranslator!=null){ this.htmlElementTranslator = htmlElementTranslator; this.charTranslator = null; this.targetTranslator = null; } }
[ "Sets the HTML entity translator.\nIt will also remove any other translator set.\nNothing will happen if the argument is null.\n@param htmlElementTranslator translator" ]
[ "Format event to string buffer.\n\n@param sbuf\nstring buffer to receive formatted event, may not be null.\n@param event\nevent to format, may not be null.", "Instruct a query to use a specific index.\n@param designDocument Design document to use.\n@param indexName Index name to use.\n@return {@code QueryBuilder} object for method chaining.", "Method to send Request messages to a specific df_service\n\n@param df_service\nThe name of the df_service\n@param msgContent\nThe content of the message to be sent\n@return Message sent to + the name of the df_service", "Gets the txinfo cache weight\n\n@param conf The FluoConfiguration\n@return The size of the cache value from the property value {@value #TX_INFO_CACHE_WEIGHT} if\nit is set, else the value of the default value {@value #TX_INFO_CACHE_WEIGHT_DEFAULT}", "Redirect URL to the specified profile ID\n\n@param model\n@param profileId\n@return\n@throws Exception", "Log a info message with a throwable.", "Find the index of the first matching element in the list\n@param element the element value to find\n@return the index of the first matching element, or <code>-1</code> if none found", "Calculate start dates for a yearly relative recurrence.\n\n@param calendar current date\n@param dates array of start dates", "Exports json encoded content to CrashReport object\n\n@param json valid json body.\n@return new instance of CrashReport" ]
public static <T> NewManagedBean<T> of(BeanAttributes<T> attributes, EnhancedAnnotatedType<T> clazz, BeanManagerImpl beanManager) { return new NewManagedBean<T>(attributes, clazz, new StringBeanIdentifier(BeanIdentifiers.forNewManagedBean(clazz)), beanManager); }
[ "Creates an instance of a NewSimpleBean from an annotated class\n\n@param clazz The annotated class\n@param beanManager The Bean manager\n@return a new NewSimpleBean instance" ]
[ "Remove a column from the Document\n\n@param entity the {@link Document} with the column\n@param column the column to remove", "Detailed request to track additional data about PUT, GET and GET_ALL\n\n@param timeNS The time in nanoseconds that the operation took to complete\n@param numEmptyResponses For GET and GET_ALL, how many keys were no values found\n@param valueBytes Total number of bytes across all versions of values' bytes\n@param keyBytes Total number of bytes in the keys\n@param getAllAggregatedCount Total number of keys returned for getAll calls", "Helper method to add a Java integer value to a message digest.\n\n@param digest the message digest being built\n@param value the integer whose bytes should be included in the digest", "Check if all cluster objects in the list are congruent.\n\n@param clusterUrls of cluster objects\n@return", "add a converted object to the pool\n\n@param converter\nthe converter that made the conversion\n@param sourceObject\nthe source object that has been converted\n@param destinationType\nthe destination type\n@param convertedObject\nthe converted object", "EAP 7.1", "Adds two complex numbers.\n\n@param z1 Complex Number.\n@param z2 Complex Number.\n@return Returns new ComplexNumber instance containing the sum of specified complex numbers.", "Use this API to add authenticationradiusaction resources.", "Adds the given value to the list of values that should still be\nserialized. The given RDF resource will be used as a subject.\n\n@param value\nthe value to be serialized\n@param resource\nthe RDF resource that is used as a subject for serialization" ]
@Pure public static <P1> Procedure0 curry(final Procedure1<? super P1> procedure, final P1 argument) { if (procedure == null) throw new NullPointerException("procedure"); return new Procedure0() { @Override public void apply() { procedure.apply(argument); } }; }
[ "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>." ]
[ "Construct a Libor index for a given curve and schedule.\n\n@param forwardCurveName\n@param schedule\n@return The Libor index or null, if forwardCurveName is null.", "Copies the non-zero structure of orig into \"this\"\n@param orig Matrix who's structure is to be copied", "Invokes the setter on the bean with the supplied value.\n\n@param bean\nthe bean\n@param setMethod\nthe setter method for the field\n@param fieldValue\nthe field value to set\n@throws SuperCsvException\nif there was an exception invoking the setter", "Delete inactive contents.", "Returns the header with the specified name from the supplied map. The\nheader lookup is case-insensitive.\n\n@param headers A <code>Map</code> containing the HTTP request headers.\n@param name The name of the header to return.\n@return The value of specified header, or a comma-separated list if there\nwere multiple headers of that name.", "Cleans up the given group and adds it to the list of groups if still valid\n@param group\n@param groups", "Print the class's operations m", "Find a Constructor on the given type that matches the given arguments.\n\n@param <T> the object type\n@param clazz\nthe type to create\n@param args\nthe arguments to the constructor\n@return a Constructor from the given type that matches 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", "Use this API to add systemuser resources." ]
public Date getCompleteThrough() { Date value = (Date) getCachedValue(TaskField.COMPLETE_THROUGH); if (value == null) { int percentComplete = NumberHelper.getInt(getPercentageComplete()); switch (percentComplete) { case 0: { break; } case 100: { value = getActualFinish(); break; } default: { Date actualStart = getActualStart(); Duration duration = getDuration(); if (actualStart != null && duration != null) { double durationValue = (duration.getDuration() * percentComplete) / 100d; duration = Duration.getInstance(durationValue, duration.getUnits()); ProjectCalendar calendar = getEffectiveCalendar(); value = calendar.getDate(actualStart, duration, true); } break; } } set(TaskField.COMPLETE_THROUGH, value); } return value; }
[ "Retrieve the \"complete through\" date.\n\n@return complete through date" ]
[ "Load the installation state based on the identity\n\n@param installedIdentity the installed identity\n@return the installation state\n@throws IOException", "Writes and reads the XOP attachment using a CXF JAX-RS Proxy\nThe proxy automatically sets the \"mtom-enabled\" property by checking\nthe CXF EndpointProperty set on the XopAttachment interface.\n\n@throws Exception", "Test for convergence by seeing if the element with the largest change\nis smaller than the tolerance. In some test cases it alternated between\nthe + and - values of the eigen vector. When this happens it seems to have \"converged\"\nto a non-dominant eigen vector. At least in the case I looked at. I haven't devoted\na lot of time into this issue...", "Checks if this child holds the current active state.\nIf the child is or contains the active state it is applied.", "Aggregates a list of templates specified by @Template", "Prints a balance analysis to a file.\n\n@param outputDirName\n@param baseFileName suffix '.analysis' is appended to baseFileName.\n@param partitionBalance", "Compute the A matrix from the Q and R matrices.\n\n@return The A matrix.", "Creates a resource key defined as a child of key defined by enumeration value.\n@see #key(Enum)\n@see #child(String)\n@param enumValue the enumeration value defining the parent key\n@param key the child id\n@return the resource key", "Add the operation at the end of Stage MODEL if this operation has not already been registered.\n\nThis operation should be added if any of the following occur: -\n- The authorization configuration is removed from a security realm.\n- The rbac provider is changed to rbac.\n- A role is removed.\n- An include is removed from a role.\n- A management interface is removed.\n\nNote: This list only includes actions that could invalidate the configuration, actions that would not invalidate the\nconfiguration do not need this operation registering. e.g. Adding a role, if the configuration was already valid this\ncould not invalidate it.\n\n@param context - The OperationContext to use to register the step." ]
public DbProduct getProduct(final String name) { final DbProduct dbProduct = repositoryHandler.getProduct(name); if(dbProduct == null){ throw new WebApplicationException(Response.status(Response.Status.NOT_FOUND) .entity("Product " + name + " does not exist.").build()); } return dbProduct; }
[ "Returns a product regarding its name\n\n@param name String\n@return DbProduct" ]
[ "Use this API to fetch all the ipv6 resources that are configured on netscaler.", "This method is called by the client to load the most recent list of resources.\nThis method should only be called by the service client.\n\n@param result the most recent list of resources.", "Return a replica of this instance with its quality value removed.\n@return the same instance if the media type doesn't contain a quality value, or a new one otherwise", "Call the no-arg constructor for the given class\n\n@param <T> The type of the thing to construct\n@param klass The class\n@return The constructed thing", "Creates a new Box Developer Edition connection with enterprise token leveraging an access token cache.\n@param enterpriseId the enterprise ID to use for requesting access token.\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.", "This method is called to alert project listeners to the fact that\na task has been written to a project file.\n\n@param task task instance", "Returns a new ObjectPool for the specified connection descriptor.\nOverride this method to setup your own pool.\n@param jcd the connection descriptor for which to set up the pool\n@return a newly created object pool", "Return the equivalence class of the argument. If the argument is not contained in\nand equivalence class, then an empty string is returned.\n\n@param punc\n@return The class name if found. Otherwise, an empty string.", "Translate the each ByteArray in an iterable into a hexadecimal string\n\n@param arrays The array of bytes to translate\n@return An iterable of converted strings" ]
protected void setProperty(String propertyName, JavascriptEnum propertyValue) { jsObject.setMember(propertyName, propertyValue.getEnumValue()); }
[ "Sets a property on this Javascript object for which the value is a\nJavascriptEnum\n\nThe value is set to what is returned by the getEnumValue() method on the JavascriptEnum\n\n@param propertyName The name of the property.\n@param propertyValue The value of the property." ]
[ "Replaces the first substring of this CharSequence that matches the given\nregular expression with the given replacement.\n\n@param self a CharSequence\n@param regex the capturing regex\n@param replacement the CharSequence to be substituted for each match\n@return a CharSequence with replaced content\n@throws java.util.regex.PatternSyntaxException if the regular expression's syntax is invalid\n@see String#replaceFirst(String, String)\n@since 1.8.2", "Try to open a file at the given position.", "Creates a favorite widget for a favorite entry.\n\n@param entry the favorite entry\n@return the favorite widget\n\n@throws CmsException if something goes wrong", "Read a short int from an input stream.\n\n@param is input stream\n@return int value", "Read relationship data from a PEP file.", "Draw a rounded rectangular boundary.\n\n@param rect rectangle\n@param color colour\n@param linewidth line width\n@param r radius for rounded corners", "Get the element at the index as an integer.\n\n@param i the index of the element to access", "Use this API to update responderpolicy resources.", "Writes image files for all data that was collected and the statistics\nfile for all sites." ]
private static void defineField(Map<String, FieldType> container, String name, FieldType type) { defineField(container, name, type, null); }
[ "Configure the mapping between a database column and a field.\n\n@param container column to field map\n@param name column name\n@param type field type" ]
[ "Constructs a list of items with given separators.\n\n@param sql\nStringBuilder to which the constructed string will be\nappended.\n@param list\nList of objects (usually strings) to join.\n@param init\nString to be added to the start of the list, before any of the\nitems.\n@param sep\nSeparator string to be added between items in the list.", "Get a compatible constructor\n\n@param type\nClass to look for constructor in\n@param argumentType\nArgument type for constructor\n@return the compatible constructor or null if none found", "Calculate the layout offset", "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", "Adds a filter definition to this project file.\n\n@param filter filter definition", "Create a WebMBeanAdaptor for a specified MBean name.\n@param mBeanName the MBean name (can be URL-encoded).\n@param encoding the string encoding to be used (i.e. UTF-8)\n@return the created WebMBeanAdaptor.\n@throws JMException Java Management Exception\n@throws UnsupportedEncodingException if the encoding is not supported.", "Handling out responce.\n\n@param message\nthe message\n@throws Fault\nthe fault", "Release a connection by placing the connection back in the pool.\n@param connectionHandle Connection being released.\n@throws SQLException", "Implement the persistence handler for storing the group properties." ]
public static XClass getMemberType() throws XDocletException { if (getCurrentField() != null) { return getCurrentField().getType(); } else if (getCurrentMethod() != null) { XMethod method = getCurrentMethod(); if (MethodTagsHandler.isGetterMethod(method)) { return method.getReturnType().getType(); } else if (MethodTagsHandler.isSetterMethod(method)) { XParameter param = (XParameter)method.getParameters().iterator().next(); return param.getType(); } } return null; }
[ "Returns the type of the current member which is the type in the case of a field, the return type for a getter\nmethod, or the type of the parameter for a setter method.\n\n@return The member type\n@exception XDocletException if an error occurs" ]
[ "Parses formatter attributes.\n\n@param formatterLoc the node location\n@return the map of formatter attributes (unmodifiable)", "This method can be called to ensure that the IDs of all\nentities are sequential, and start from an\nappropriate point. If entities are added to and removed from\nthis list, then the project is loaded into Microsoft\nproject, if the ID values have gaps in the sequence, there will\nbe blank rows shown.", "Search for the attribute \"id\" and return the value.\n\n@return the id of this element or null when not found", "Boyer Moore scan that proceeds forwards from the end of the file looking for the first LOCSIG", "Gets the health memory.\n\n@return the health memory", "Use this API to fetch responderpolicylabel_responderpolicy_binding resources of given name .", "Put new sequence object for given sequence name.\n@param sequenceName Name of the sequence.\n@param seq The sequence object to add.", "Use this API to fetch appfwprofile_xmlvalidationurl_binding resources of given name .", "Controls whether we are currently staying in sync with the tempo master. Will only be meaningful if we are\nsending status packets.\n\n@param sync if {@code true}, our status packets will be tempo and beat aligned with the tempo master" ]
public void deleteServerGroup(int id) { try { sqlService.executeUpdate("DELETE FROM " + Constants.DB_TABLE_SERVER_GROUPS + " WHERE " + Constants.GENERIC_ID + " = " + id + ";"); sqlService.executeUpdate("DELETE FROM " + Constants.DB_TABLE_SERVERS + " WHERE " + Constants.SERVER_REDIRECT_GROUP_ID + " = " + id); } catch (Exception e) { e.printStackTrace(); } }
[ "Delete a server group by id\n\n@param id server group ID" ]
[ "Helper method to load a property file from class path.\n\n@param filesToLoad\nan array of paths (class path paths) designating where the files may be. All files are loaded, in the order\ngiven. Missing files are silently ignored.\n\n@return a Properties object, which may be empty but not null.", "Set the depth of the cursor.\nThis is the length of the ray from the origin\nto the cursor.\n@param depth default cursor depth", "Create the index file that sets up the frameset.\n@param outputDirectory The target directory for the generated file(s).", "Adds the download button.\n\n@param view layout which displays the log file", "Runs a Story with the given configuration and steps, applying the given\nmeta filter, and staring from given state.\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@param beforeStories the State before running any of the stories, if not\n<code>null</code>\n@throws Throwable if failures occurred and FailureStrategy dictates it to\nbe re-thrown.", "Adds an access constraint to the set used with the attribute\n@param accessConstraint the constraint\n@return a builder that can be used to continue building the attribute definition", "This method must be called on the start of the component. Initialize and start the directory monitor.\n\n@param monitoredDirectory\n@param pollingTime", "Checks for duplicate elements. A is sorted\n@param A Matrix to be tested.\n@return true if duplicates or false if false duplicates", "Special multiplication that takes in account the zeros and one in Y, which\nis the matrix that stores the householder vectors." ]
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." ]
[ "Establish connection to the ChromeCast device", "Send a device lost announcement to all registered listeners.\n\n@param announcement the last message received from the vanished device", "Returns the difference of sets s1 and s2.", "Calling EventProducerInterceptor in case of logging faults.\n\n@param exchange\nthe message exchange\n@param reqFid\nthe FlowId\n\n@throws Fault\nthe fault", "Removes the specified entry point\n\n@param controlPoint The entry point", "Returns a reference definition of the given name if it exists.\n\n@param name The name of the reference\n@return The reference def or <code>null</code> if there is no such reference", "If the workspace for your project _is_ an organization, you must also\nsupply a `team` to share the project with.\n\nReturns the full record of the newly created project.\n\n@param workspace The workspace or organization to create the project in.\n@return Request object", "Unmarshals the XML content and adds the file to the bundle files.\n@throws CmsException thrown if reading the file or unmarshaling fails.", "Checks to see within the flags if a reload, i.e. not a full restart, is required.\n\n@param flags the flags to check\n\n@return {@code true} if a reload is required, otherwise {@code false}" ]
private void initStoreDefinitions(Version storesXmlVersion) { if(this.storeDefinitionsStorageEngine == null) { throw new VoldemortException("The store definitions directory is empty"); } String allStoreDefinitions = "<stores>"; Version finalStoresXmlVersion = null; if(storesXmlVersion != null) { finalStoresXmlVersion = storesXmlVersion; } this.storeNames.clear(); ClosableIterator<Pair<String, Versioned<String>>> storesIterator = this.storeDefinitionsStorageEngine.entries(); // Some test setups may result in duplicate entries for 'store' element. // Do the de-dup here Map<String, Versioned<String>> storeNameToDefMap = new HashMap<String, Versioned<String>>(); Version maxVersion = null; while(storesIterator.hasNext()) { Pair<String, Versioned<String>> storeDetail = storesIterator.next(); String storeName = storeDetail.getFirst(); Versioned<String> versionedStoreDef = storeDetail.getSecond(); storeNameToDefMap.put(storeName, versionedStoreDef); Version curVersion = versionedStoreDef.getVersion(); // Get the highest version from all the store entries if(maxVersion == null) { maxVersion = curVersion; } else if(maxVersion.compare(curVersion) == Occurred.BEFORE) { maxVersion = curVersion; } } // If the specified version is null, assign highest Version to // 'stores.xml' key if(finalStoresXmlVersion == null) { finalStoresXmlVersion = maxVersion; } // Go through all the individual stores and update metadata for(Entry<String, Versioned<String>> storeEntry: storeNameToDefMap.entrySet()) { String storeName = storeEntry.getKey(); Versioned<String> versionedStoreDef = storeEntry.getValue(); // Add all the store names to the list of storeNames this.storeNames.add(storeName); this.metadataCache.put(storeName, new Versioned<Object>(versionedStoreDef.getValue(), versionedStoreDef.getVersion())); } Collections.sort(this.storeNames); for(String storeName: this.storeNames) { Versioned<String> versionedStoreDef = storeNameToDefMap.get(storeName); // Stitch together to form the complete store definition list. allStoreDefinitions += versionedStoreDef.getValue(); } allStoreDefinitions += "</stores>"; // Update cache with the composite store definition list. metadataCache.put(STORES_KEY, convertStringToObject(STORES_KEY, new Versioned<String>(allStoreDefinitions, finalStoresXmlVersion))); }
[ "Function to go through all the store definitions contained in the STORES\ndirectory and\n\n1. Update metadata cache.\n\n2. Update STORES_KEY by stitching together all these keys.\n\n3. Update 'storeNames' list.\n\nThis method is not thread safe. It is expected that the caller of this\nmethod will correctly handle concurrency issues. Currently this is not an\nissue since its invoked by init, put, add and delete store all of which\nuse locks to deal with any concurrency related issues." ]
[ "Extracts the column from the matrix a.\n@param a Input matrix\n@param column Which column is to be extracted\n@param out output. Storage for the extracted column. If null then a new vector will be returned.\n@return The extracted column.", "Adds an item to the list box, specifying an initial value for the item.\n\n@param value the item's value, to be submitted if it is part of a\n{@link FormPanel}; cannot be <code>null</code>\n@param text the text of the item to be added\n@param reload perform a 'material select' reload to update the DOM.", "Use this API to fetch all the systemsession resources that are configured on netscaler.", "Resizes an image to the specified height, changing width in the same proportion\n@param originalImage Image in memory\n@param heightOut The height to resize\n@return New Image in memory", "This method extracts calendar data from an MSPDI file.\n\n@param project Root node of the MSPDI file\n@param map Map of calendar UIDs to names", "This method calculates the total amount of working time in a single\nday, which intersects with the supplied time range.\n\n@param hours collection of working hours in a day\n@param startDate time range start\n@param endDate time range end\n@return length of time in milliseconds", "Allocates a database connection.\n\n@throws SQLException", "Helper method to set a value in the internal header list.\n\n@param headers the headers to set the value in\n@param name the name to set\n@param value the value to set", "Checks if the required option exists.\n\n@param options OptionSet to checked\n@param opt Required option to check\n@throws VoldemortException" ]
public void removeValue(T value, boolean reload) { int idx = getIndex(value); if (idx >= 0) { removeItemInternal(idx, reload); } }
[ "Removes a value from the list box. Nothing is done if the value isn't on\nthe list box.\n\n@param value the value to be removed from the list\n@param reload perform a 'material select' reload to update the DOM." ]
[ "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", "Notifies that an existing footer item is moved to another position.\n\n@param fromPosition the original position.\n@param toPosition the new position.", "Sets the replacement var map.\n\n@param replacementVarMap\nthe replacement var map\n@return the parallel task builder", "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", "Get a collection of public groups for the user.\n\nThe groups will contain only the members nsid, name, admin and eighteenplus. If you want the whole group-information, you have to call\n{@link com.flickr4java.flickr.groups.GroupsInterface#getInfo(String)}.\n\nThis method does not require authentication.\n\n@param userId\nThe user ID\n@return The public groups\n@throws FlickrException", "Adds a word to the end of the token list\n@param word word which is to be added\n@return The new Token created around symbol", "judge a->b is ordered clockwise\n\n@param center\n@param a\n@param b\n@return", "remove a converted object from the pool\n\n@param converter\n@param sourceObject\n@param destinationType", "Use this API to change sslcertkey." ]
private int bestSurroundingSet(int index, int length, int... valid) { int option1 = set[index - 1]; if (index + 1 < length) { // we have two options to check int option2 = set[index + 1]; if (contains(valid, option1) && contains(valid, option2)) { return Math.min(option1, option2); } else if (contains(valid, option1)) { return option1; } else if (contains(valid, option2)) { return option2; } else { return valid[0]; } } else { // we only have one option to check if (contains(valid, option1)) { return option1; } else { return valid[0]; } } }
[ "Guesses the best set to use at the specified index by looking at the surrounding sets. In general, characters in\nlower-numbered sets are more common, so we choose them if we can. If no good surrounding sets can be found, the default\nvalue returned is the first value from the valid set.\n\n@param index the current index\n@param length the maximum length to look at\n@param valid the valid sets for this index\n@return the best set to use at the specified index" ]
[ "Checks to see if the rows of the provided matrix are linearly independent.\n\n@param A Matrix whose rows are being tested for linear independence.\n@return true if linearly independent and false otherwise.", "This method is used to change the credentials of CleverTap account Id, token and region programmatically\n@param accountID CleverTap Account Id\n@param token CleverTap Account Token\n@param region Clever Tap Account Region", "Start a process using the given parameters.\n\n@param processId\n@param parameters\n@return", "Returns a list of all parts that have been uploaded to an upload session.\n@param offset paging marker for the list of parts.\n@param limit maximum number of parts to return.\n@return the list of parts.", "This method performs a set of queries to retrieve information\nfrom the an MPP or an MPX file.\n\n@param filename name of the MPX file\n@throws Exception on file read error", "Get a list of referring domains for a photo.\n\n@param date\n(Required) Stats will be returned for this date. A day according to Flickr Stats starts at midnight GMT for all users, and timestamps will\nautomatically be rounded down to the start of the day.\n@param photoId\n(Optional) The id of the photo to get stats for. If not provided, stats for all photos will be returned.\n@param perPage\n(Optional) Number of domains to return per page. If this argument is omitted, it defaults to 25. The maximum allowed value is 100.\n@param page\n(Optional) The page of results to return. If this argument is omitted, it defaults to 1.\n@see \"http://www.flickr.com/services/api/flickr.stats.getPhotoDomains.html\"", "Returns a product regarding its name\n\n@param name String\n@return DbProduct", "Gets the list of failed invocations that has been collected by this collector.\n\n@return The failed invocations.", "Add a calendar day node.\n\n@param parentNode parent node\n@param calendar ProjectCalendar instance\n@param day calendar day" ]
public List<T> parseList(JsonParser jsonParser) throws IOException { List<T> list = new ArrayList<>(); if (jsonParser.getCurrentToken() == JsonToken.START_ARRAY) { while (jsonParser.nextToken() != JsonToken.END_ARRAY) { list.add(parse(jsonParser)); } } return list; }
[ "Parse a list of objects from a JsonParser.\n\n@param jsonParser The JsonParser, preconfigured to be at the START_ARRAY token." ]
[ "Entry point with no system exit", "Convenience method for retrieving an Integer resource.\n\n@param locale locale identifier\n@param key resource key\n@return resource value", "Returns the count of all inbox messages for the user\n@return int - count of all inbox messages", "Creates the button for converting an XML bundle in a property bundle.\n@return the created button.", "Initialization necessary for editing a property bundle.\n\n@throws CmsLoaderException thrown if loading a bundle file fails.\n@throws CmsException thrown if loading a bundle file fails.\n@throws IOException thrown if loading a bundle file fails.", "Function to perform forward pooling", "Retrieves an object that has been attached to this context.\n\n@param key the key to the attachment.\n@param <V> the value type of the attachment.\n\n@return the attachment if found otherwise {@code null}.", "Creates a CSS rgb specification from a PDF color\n@param pdcolor\n@return the rgb() string", "Finds the missing value. Seems to lose a degree of freedom, but it\ndoesn't. That degree of freedom is already lost by the sensor." ]
public static <T> int createTable(ConnectionSource connectionSource, DatabaseTableConfig<T> tableConfig) throws SQLException { Dao<T, ?> dao = DaoManager.createDao(connectionSource, tableConfig); return doCreateTable(dao, false); }
[ "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." ]
[ "Print a day.\n\n@param day Day instance\n@return day value", "Changes the given filenames suffix from the current suffix to the provided suffix.\n\n<b>Directly exposed for JSP EL</b>, not through {@link org.opencms.jsp.util.CmsJspElFunctions}.<p>\n\n@param filename the filename to be changed\n@param suffix the new suffix of the file\n\n@return the filename with the replaced suffix", "Returns a flag indicating if also expired resources should be found.\n@return A flag indicating if also expired resources should be found.", "Unzip a file to a target directory.\n@param zip the path to the zip file.\n@param target the path to the target directory into which the zip file will be unzipped.\n@throws IOException", "Add server redirect to a profile, using current active ServerGroup\n\n@param region region\n@param srcUrl source URL\n@param destUrl destination URL\n@param hostHeader host header\n@param profileId profile ID\n@return ID of added ServerRedirect\n@throws Exception exception", "Retrieves the project start date. If an explicit start date has not been\nset, this method calculates the start date by looking for\nthe earliest task start date.\n\n@return project start date", "Concats an element and an array.\n\n@param firstElement the first element\n@param array the array\n@param <T> the type of the element in the array\n@return a new array created adding the element in the second array after the first element", "Returns iterable with all non-deleted file version legal holds for this legal hold policy.\n@param limit the limit of entries per response. The default value is 100.\n@param fields the fields to retrieve.\n@return an iterable containing file version legal holds info.", "Request a scoped transactional token for a particular resource.\n@param accessToken application access token.\n@param scope scope of transactional token.\n@param resource resource transactional token has access to.\n@return a BoxAPIConnection which can be used to perform transactional requests." ]
public static SPIProviderResolver getInstance(ClassLoader cl) { SPIProviderResolver resolver = (SPIProviderResolver)ServiceLoader.loadService(SPIProviderResolver.class.getName(), DEFAULT_SPI_PROVIDER_RESOLVER, cl); return resolver; }
[ "Get the SPIProviderResolver instance using the provided classloader for lookup\n\n@param cl classloader to use for lookup\n@return instance of this class" ]
[ "Use this API to fetch aaauser_auditsyslogpolicy_binding resources of given name .", "Retrieve the parent task based on its WBS.\n\n@param wbs parent WBS\n@return parent task", "OR operation which takes the previous clause and the next clause and OR's them together.", "Convert weekly recurrence days into a bit field.\n\n@param task recurring task\n@return bit field as a string", "Get cached value that is dynamically loaded by the Acacia content editor.\n\n@param attribute the attribute to load the value to\n@return the cached value", "Add \"ORDER BY\" clause to the SQL query statement. This can be called multiple times to add additional \"ORDER BY\"\nclauses. Ones earlier are applied first.", "Print the method parameter p", "Determines if the queue identified by the given key can be used as a delayed queue.\n\n@param jedis\nconnection to Redis\n@param key\nthe key that identifies a queue\n@return true if the key already is a delayed queue or is not currently used, false otherwise", "Search for the second entry in the second database. Use this method for databases configured with no duplicates.\n\n@param second second key (value for first).\n@return null if no entry found, otherwise the value." ]
public void updateColor(TestColor color) { switch (color) { case green: m_forwardButton.setEnabled(true); m_confirmCheckbox.setVisible(false); m_status.setValue(STATUS_GREEN); break; case yellow: m_forwardButton.setEnabled(false); m_confirmCheckbox.setVisible(true); m_status.setValue(STATUS_YELLOW); break; case red: m_forwardButton.setEnabled(false); m_confirmCheckbox.setVisible(true); m_status.setValue(STATUS_RED); break; default: break; } }
[ "Sets test status." ]
[ "Migrate to Jenkins \"Credentials\" plugin from the old credential implementation", "Sorts the entries into the order we want to present them in, which is by position, with hot cues coming after\nordinary memory points if both exist at the same position, which often happens.\n\n@param loadedEntries the unsorted entries we have loaded from a dbserver message, metadata cache, or rekordbox\ndatabase export\n@return an immutable list of the collections in the proper order", "Applies the matrices computed from the scene object's\nlinked to the skeleton bones to the current pose.\n@see #applyPose(GVRPose, int)\n@see #setPose(GVRPose)", "Returns the indices that would sort an array.\n\n@param array Array.\n@param ascending Ascending order.\n@return Array of indices.", "Performs the transformation.\n\n@return True if the file was modified.", "Perform the given work with a Jedis connection from the given pool.\n\n@param pool the resource pool\n@param work the work to perform\n@param <V> the result type\n@return the result of the given work\n@throws Exception if something went wrong", "Returns the query string currently in the text field.\n\n@return the query string", "Indicates that all of the packages within an archive are \"known\" by the package mapper. Generally\nthis indicates that the archive does not contain customer code.", "Function to perform forward activation" ]
public static DoubleMatrix[] fullSVD(DoubleMatrix A) { int m = A.rows; int n = A.columns; DoubleMatrix U = new DoubleMatrix(m, m); DoubleMatrix S = new DoubleMatrix(min(m, n)); DoubleMatrix V = new DoubleMatrix(n, n); int info = NativeBlas.dgesvd('A', 'A', m, n, A.dup().data, 0, m, S.data, 0, U.data, 0, m, V.data, 0, n); if (info > 0) { throw new LapackConvergenceException("GESVD", info + " superdiagonals of an intermediate bidiagonal form failed to converge."); } return new DoubleMatrix[]{U, S, V.transpose()}; }
[ "Compute a singular-value decomposition of A.\n\n@return A DoubleMatrix[3] array of U, S, V such that A = U * diag(S) * V'" ]
[ "Unmarshals the XML content and adds the file to the bundle files.\n@throws CmsException thrown if reading the file or unmarshaling fails.", "Export modules and check them in. Assumes the log stream already open.\n@return exit code of the commit-script.", "Create dummy groups for each concatenated report, and in the footer of\neach group adds the subreport.", "Use this API to unset the properties of inatparam resource.\nProperties that need to be unset are specified in args array.", "Get the named method from the class\n\n@param c The class to get the method from\n@param name The method name\n@param argTypes The argument types\n@return The method", "Use this API to fetch all the appfwlearningdata resources that are configured on netscaler.\nThis uses appfwlearningdata_args which is a way to provide additional arguments while fetching the resources.", "Gets the current page\n@return", "Produces the Soundex key for the given string.", "Get the account knowing his position\n@param position the position of the account (it can change at runtime!)\n@return the account" ]
private ProductDescriptor getSwapProductDescriptor(Element trade) { InterestRateSwapLegProductDescriptor legReceiver = null; InterestRateSwapLegProductDescriptor legPayer = null; NodeList legs = trade.getElementsByTagName("swapStream"); for(int legIndex = 0; legIndex < legs.getLength(); legIndex++) { Element leg = (Element) legs.item(legIndex); boolean isPayer = leg.getElementsByTagName("payerPartyReference").item(0).getAttributes().getNamedItem("href").getNodeValue().equals(homePartyId); if(isPayer) { legPayer = getSwapLegProductDescriptor(leg); } else { legReceiver = getSwapLegProductDescriptor(leg); } } return new InterestRateSwapProductDescriptor(legReceiver, legPayer); }
[ "Construct an InterestRateSwapProductDescriptor from a node in a FpML file.\n\n@param trade The node containing the swap.\n@return Descriptor of the swap." ]
[ "Use this API to fetch all the nspbr6 resources that are configured on netscaler.", "This method is called to alert project listeners to the fact that\na relation has been read from a project file.\n\n@param relation relation instance", "Function to go through all the store definitions contained in the STORES\ndirectory and\n\n1. Update metadata cache.\n\n2. Update STORES_KEY by stitching together all these keys.\n\n3. Update 'storeNames' list.\n\nThis method is not thread safe. It is expected that the caller of this\nmethod will correctly handle concurrency issues. Currently this is not an\nissue since its invoked by init, put, add and delete store all of which\nuse locks to deal with any concurrency related issues.", "Get an exception reporting an unexpected end tag for an XML element.\n@param reader the stream reader\n@return the exception", "Creates a clone using java serialization\n\n@param from Object to be cloned\n@param <T> type of the cloned object\n@return Clone of the object", "Use this API to delete nsip6.", "Initialize the service with a context\n@param context the servlet context to initialize the profile.", "Adds a Statement.\n\n@param rank\nrank of the statement\n@param subject\nrdf resource that refers to the statement", "Get the JSON string representation of the selector configured for this index.\n\n@return selector JSON as string" ]
private void deleteByQuery(Query query, ClassDescriptor cld) throws PersistenceBrokerException { if (logger.isDebugEnabled()) { logger.debug("deleteByQuery " + cld.getClassNameOfObject() + ", " + query); } if (query instanceof QueryBySQL) { String sql = ((QueryBySQL) query).getSql(); this.dbAccess.executeUpdateSQL(sql, cld); } else { // if query is Identity based transform it to a criteria based query first if (query instanceof QueryByIdentity) { QueryByIdentity qbi = (QueryByIdentity) query; Object oid = qbi.getExampleObject(); // make sure it's an Identity if (!(oid instanceof Identity)) { oid = serviceIdentity().buildIdentity(oid); } query = referencesBroker.getPKQuery((Identity) oid); } if (!cld.isInterface()) { this.dbAccess.executeDelete(query, cld); } // if class is an extent, we have to delete all extent classes too String lastUsedTable = cld.getFullTableName(); if (cld.isExtent()) { Iterator extents = getDescriptorRepository().getAllConcreteSubclassDescriptors(cld).iterator(); while (extents.hasNext()) { ClassDescriptor extCld = (ClassDescriptor) extents.next(); // read same table only once if (!extCld.getFullTableName().equals(lastUsedTable)) { lastUsedTable = extCld.getFullTableName(); this.dbAccess.executeDelete(query, extCld); } } } } }
[ "Extent aware Delete by Query\n@param query\n@param cld\n@throws PersistenceBrokerException" ]
[ "Retrieves a vertex attribute as a float array.\nThe attribute name must be one of the\nattributes named in the descriptor passed to the constructor.\n@param attributeName name of the attribute to update\n@throws IllegalArgumentException if attribute name not in descriptor vertex attribute is not <i>float</i>\n@see #setFloatVec(String, FloatBuffer)\n@see #getFloatArray(String)", "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", "The sniffing Loggers are some special Loggers, whose level will be set to TRACE forcedly.\n@param logger", "Use this API to enable nsacl6 resources of given names.", "Adds an additional alias to the constructed document.\n\n@param text\nthe text of the alias\n@param languageCode\nthe language code of the alias\n@return builder object to continue construction", "Use this API to fetch nd6ravariables resource of given name .", "Updates the exceptions.\n@param exceptions the exceptions to set", "Use this API to fetch a filterglobal_filterpolicy_binding resources.", "Set the pattern scheme.\n@param isWeekDayBased flag, indicating if the week day based scheme should be set." ]
@Override public boolean retainAll(Collection<?> collection) { if (dao == null) { return false; } boolean changed = false; CloseableIterator<T> iterator = closeableIterator(); try { while (iterator.hasNext()) { T data = iterator.next(); if (!collection.contains(data)) { iterator.remove(); changed = true; } } return changed; } finally { IOUtils.closeQuietly(iterator); } }
[ "Uses the iterator to run through the dao and retain only the items that are in the passed in collection. This\nwill remove the items from the associated database table as well.\n\n@return Returns true of the collection was changed at all otherwise false." ]
[ "Reads all text of the XML tag and returns it as a String.\nAssumes that a '<' character has already been read.\n\n@param r The reader to read from\n@return The String representing the tag, or null if one couldn't be read\n(i.e., EOF). The returned item is a complete tag including angle\nbrackets, such as <code>&lt;TXT&gt;</code>", "Sets the polling status.\n\n@param status the polling status.\n@param statusCode the HTTP status code\n@throws IllegalArgumentException thrown if status is null.", "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", "Append the text at the end of the Path.\n\n@param self a Path\n@param text the text to append at the end of the Path\n@throws java.io.IOException if an IOException occurs.\n@since 2.3.0", "Read string from url generic.\n\n@param url\nthe url\n@return the string\n@throws IOException\nSignals that an I/O exception has occurred.", "Returns a list of all templates under the user account\n\n@param options {@link Map} extra options to send along with the request.\n@return {@link ListResponse}\n\n@throws RequestException if request to transloadit server fails.\n@throws LocalOperationException if something goes wrong while running non-http operations.", "Make sure that we have some reasonable defaults available. These would typically be provided by the rulesets\nin the real world.", "Enable clipping for the Widget. Widget content including its children will be clipped by a\nrectangular View Port. By default clipping is disabled.", "Unmarshals the XML content and adds the file to the bundle files.\n@throws CmsException thrown if reading the file or unmarshaling fails." ]
@SuppressWarnings("unchecked") public final FluentModelImplT withoutTag(String key) { if (this.inner().getTags() != null) { this.inner().getTags().remove(key); } return (FluentModelImplT) this; }
[ "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" ]
[ "Add assignments to the tree.\n\n@param parentNode parent tree node\n@param file assignments container", "Return the entity of a resource\n\n@param resource the resource\n@param <T> the type of the resource's entity\n@param <R> the resource type\n@return the resource's entity", "Operators which affect the variables to its left and right", "Use this API to unset the properties of nslimitselector resource.\nProperties that need to be unset are specified in args array.", "Returns the shared prefix of these columns. Null otherwise.\n\n@param associationKeyColumns the columns sharing a prefix\n@return the shared prefix of these columns. {@code null} otherwise.", "Convenience method which allows all projects in the database to\nbe read in a single operation.\n\n@return list of ProjectFile instances\n@throws MPXJException", "Make a sort order for use in a query.", "Scans a path on the filesystem for resources inside the given classpath location.\n\n@param location The system-independent location on the classpath.\n@param locationUri The system-specific physical location URI.\n@return a sorted set containing all the resources inside the given location\n@throws IOException if an error accessing the filesystem happens", "The Baseline Duration field shows the original span of time planned\nto complete a task.\n\n@return - duration string" ]
public static List<Representation> parseRepresentations(JsonObject jsonObject) { List<Representation> representations = new ArrayList<Representation>(); for (JsonValue representationJson : jsonObject.get("entries").asArray()) { Representation representation = new Representation(representationJson.asObject()); representations.add(representation); } return representations; }
[ "Parse representations from a file object response.\n@param jsonObject representations json object in get response for /files/file-id?fields=representations\n@return list of representations" ]
[ "Revert all the working copy changes.", "given the groupId, returns the groupName\n\n@param groupId ID of group\n@return name of group", "Returns all the deployment runtime names associated with an overlay accross all server groups.\n\n@param context the current OperationContext.\n@param overlay the name of the overlay.\n@return all the deployment runtime names associated with an overlay accross all server groups.", "Add a management request handler factory to this context.\n\n@param factory the request handler to add", "Retrieve the dir pointed to by 'latest' symbolic-link or the current\nversion dir\n\n@return Current version directory, else null", "Use this API to fetch all the protocolhttpband resources that are configured on netscaler.\nThis uses protocolhttpband_args which is a way to provide additional arguments while fetching the resources.", "Returns the service id with the propertype.\n\n@param serviceReference\n@return long value for the service id", "Process the hours and exceptions for an individual calendar.\n\n@param calendar project calendar\n@param calendarData hours and exception rows for this calendar", "Roll the java.util.Date forward or backward.\n\n@param startDate - The start date\n@param period Calendar.YEAR etc\n@param amount - Negative to rollbackwards." ]
private void parseLdapAuthorization_1_5(final XMLExtendedStreamReader reader, final ModelNode realmAddress, final List<ModelNode> list) throws XMLStreamException { ModelNode addr = realmAddress.clone().add(AUTHORIZATION, LDAP); ModelNode ldapAuthorization = Util.getEmptyOperation(ADD, addr); list.add(ldapAuthorization); Set<Attribute> required = EnumSet.of(Attribute.CONNECTION); final int count = reader.getAttributeCount(); for (int i = 0; i < count; i++) { final String value = reader.getAttributeValue(i); if (!isNoNamespaceAttribute(reader, i)) { throw unexpectedAttribute(reader, i); } else { final Attribute attribute = Attribute.forName(reader.getAttributeLocalName(i)); required.remove(attribute); switch (attribute) { case CONNECTION: { LdapAuthorizationResourceDefinition.CONNECTION.parseAndSetParameter(value, ldapAuthorization, reader); break; } default: { throw unexpectedAttribute(reader, i); } } } } if (required.isEmpty() == false) { throw missingRequired(reader, required); } Set<Element> foundElements = new HashSet<Element>(); while (reader.hasNext() && reader.nextTag() != END_ELEMENT) { requireNamespace(reader, namespace); final Element element = Element.forName(reader.getLocalName()); if (foundElements.add(element) == false) { throw unexpectedElement(reader); // Only one of each allowed. } switch (element) { case USERNAME_TO_DN: { switch (namespace.getMajorVersion()) { case 1: // 1.5 up to but not including 2.0 parseUsernameToDn_1_5(reader, addr, list); break; default: // 2.0 and onwards parseUsernameToDn_2_0(reader, addr, list); break; } break; } case GROUP_SEARCH: { switch (namespace) { case DOMAIN_1_5: case DOMAIN_1_6: parseGroupSearch_1_5(reader, addr, list); break; default: parseGroupSearch_1_7_and_2_0(reader, addr, list); break; } break; } default: { throw unexpectedElement(reader); } } } }
[ "1.5 and on, 2.0 and on, 3.0 and on." ]
[ "Reads the cost rate tables from the file.\n\n@param resource parent resource\n@param rates XML cot rate tables", "Deletes all of the Directories in root that match the FileFilter\n\n@param root\n@param filter", "Adds a function to the end of the token list\n@param function Function which is to be added\n@return The new Token created around function", "Use this API to fetch lbvserver resource of given name .", "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", "Adds listeners and reads from a stream.\n\n@param reader reader for file type\n@param stream schedule data\n@return ProjectFile instance", "Stops the emulator. Multiple calls are allowed.\n\n@throws DatastoreEmulatorException if the emulator cannot be stopped", "Get the collection of the server groups\n\n@return Collection of active server groups", "Process TestCaseStartedEvent. New testCase will be created and added\nto suite as child.\n\n@param event to process" ]
private void wrapSetterMethod(ClassNode classNode, boolean bindable, String propertyName) { String getterName = "get" + MetaClassHelper.capitalize(propertyName); MethodNode setter = classNode.getSetterMethod("set" + MetaClassHelper.capitalize(propertyName)); if (setter != null) { // Get the existing code block Statement code = setter.getCode(); Expression oldValue = varX("$oldValue"); Expression newValue = varX("$newValue"); Expression proposedValue = varX(setter.getParameters()[0].getName()); BlockStatement block = new BlockStatement(); // create a local variable to hold the old value from the getter block.addStatement(declS(oldValue, callThisX(getterName))); // add the fireVetoableChange method call block.addStatement(stmt(callThisX("fireVetoableChange", args( constX(propertyName), oldValue, proposedValue)))); // call the existing block, which will presumably set the value properly block.addStatement(code); if (bindable) { // get the new value to emit in the event block.addStatement(declS(newValue, callThisX(getterName))); // add the firePropertyChange method call block.addStatement(stmt(callThisX("firePropertyChange", args(constX(propertyName), oldValue, newValue)))); } // replace the existing code block with our new one setter.setCode(block); } }
[ "Wrap an existing setter." ]
[ "Append the text at the end of the Path.\n\n@param self a Path\n@param text the text to append at the end of the Path\n@throws java.io.IOException if an IOException occurs.\n@since 2.3.0", "sets the class object described by this descriptor.\n@param c the class to describe", "Returns whether this represents a valid host name or address format.\n@return", "Finishes the process of attaching a metadata cache file once it has been opened and validated.\n\n@param slot the slot to which the cache should be attached\n@param cache the opened, validated metadata cache file", "Calculate the child size along the axis and measure the offset inside the\nlayout container\n@param dataIndex of child in Container\n@return true item fits the container, false - otherwise", "Render a zero Double as null.\n\n@param value double value\n@return null if the double value is zero", "will trigger workers to cancel then wait for it to report back.", "Converts the given hash code into an index into the\nhash table.", "Remove all children that have been added to the owner object of this camera rig; except the\ncamera objects." ]
private ReferenceDescriptorDef cloneReference(ReferenceDescriptorDef refDef, String prefix) { ReferenceDescriptorDef copyRefDef = new ReferenceDescriptorDef(refDef, prefix); copyRefDef.setOwner(this); // we remove properties that are only relevant to the class the features are declared in copyRefDef.setProperty(PropertyHelper.OJB_PROPERTY_IGNORE, null); Properties mod = getModification(copyRefDef.getName()); if (mod != null) { if (!PropertyHelper.toBoolean(mod.getProperty(PropertyHelper.OJB_PROPERTY_IGNORE), false) && hasFeature(copyRefDef.getName())) { LogHelper.warn(true, ClassDescriptorDef.class, "process", "Class "+getName()+" has a feature that has the same name as its included reference "+ copyRefDef.getName()+" from class "+refDef.getOwner().getName()); } copyRefDef.applyModifications(mod); } return copyRefDef; }
[ "Clones the given reference.\n\n@param refDef The reference descriptor\n@param prefix A prefix for the name\n@return The cloned reference" ]
[ "Retrieve from the parent pom the path to the modules of the project", "This method extracts assignment data from an MSPDI file.\n\n@param project Root node of the MSPDI file", "Handle an end time change.\n@param event the change event.", "Creates an internal project and repositories such as a token storage.", "Create a clone of this volatility surface using a generic calibration\nof its parameters to given market data.\n\n@param calibrationModel The model used during calibration (contains additional objects required during valuation, e.g. curves).\n@param calibrationProducts The calibration products.\n@param calibrationTargetValues The target values of the calibration products.\n@param calibrationParameters A map containing additional settings like \"evaluationTime\" (Double).\n@param parameterTransformation An optional parameter transformation.\n@param optimizerFactory The factory providing the optimizer to be used during calibration.\n@return An object having the same type as this one, using (hopefully) calibrated parameters.\n@throws SolverException Exception thrown when solver fails.", "The local event will decide the next state of the document in question.\n\n@param <T> the type of class represented by the document in the change event.\n@return the local full document which may be null.", "Get the Avro Schema of the input path, assuming the path contains just one\nschema version in all files under that path.", "needs to be resolved once extension beans are deployed", "The documentation for InputStream.skip indicates that it can bail out early, and not skip\nthe requested number of bytes. I've encountered this in practice, hence this helper method.\n\n@param stream InputStream instance\n@param skip number of bytes to skip" ]
public static final String printWorkGroup(WorkGroup value) { return (Integer.toString(value == null ? WorkGroup.DEFAULT.getValue() : value.getValue())); }
[ "Print a work group.\n\n@param value WorkGroup instance\n@return work group value" ]
[ "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", "Handles a faulted task.\n\n@param faultedEntry the entry holding faulted task\n@param throwable the reason for fault\n@param context the context object shared across all the task entries in this group during execution\n\n@return an observable represents asynchronous operation in the next stage", "Send an event to other applications\n\n@param context context in which to send the broadcast\n@param event event to send", "Convert a request type string to value\n\n@param requestType String value of request type GET/POST/PUT/DELETE\n@return Matching REQUEST_TYPE. Defaults to ALL", "This utility displays a list of available task filters, and a\nlist of available resource filters.\n\n@param project project file", "Lock the given region. Does not report failures.", "Collect environment variables and system properties under with filter constrains", "Transposes an individual block inside a block matrix.", "If the `invokerClass` specified is singleton, or without field or all fields are\nstateless, then return an instance of the invoker class. Otherwise, return null\n@param invokerClass the invoker class\n@param app the app\n@return an instance of the invokerClass or `null` if invoker class is stateful class" ]
public static systementitydata[] get(nitro_service service, systementitydata_args args) throws Exception{ systementitydata obj = new systementitydata(); options option = new options(); option.set_args(nitro_util.object_to_string_withoutquotes(args)); systementitydata[] response = (systementitydata[])obj.get_resources(service, option); return response; }
[ "Use this API to fetch all the systementitydata resources that are configured on netscaler.\nThis uses systementitydata_args which is a way to provide additional arguments while fetching the resources." ]
[ "Transforms the category path of a category to the category.\n@return a map from root or site path to category.", "Random string from string array\n\n@param s Array\n@return String", "By default all bean archives see each other.", "Check the variable name and if not set, set it with the singleton variable being on the top of the stack.", "Compare the controlDOM and testDOM and save and return the differences in a list.\n\n@return list with differences", "Returns the complete Grapes root URL\n\n@return String", "Handles the deletion of a key.\n@param key the deleted key.\n@return <code>true</code> if the deletion was successful, <code>false</code> otherwise.", "Use this API to fetch netbridge_vlan_binding resources of given name .", "Helper to get locale specific properties.\n\n@return the locale specific properties map." ]
public void splitSpan(int n) { int x = (xKnots[n] + xKnots[n+1])/2; addKnot(x, getColor(x/256.0f), knotTypes[n]); rebuildGradient(); }
[ "Split a span into two by adding a knot in the middle.\n@param n the span index" ]
[ "Write an integer field to the JSON file.\n\n@param fieldName field name\n@param value field value", "Use this API to fetch vlan_interface_binding resources of given name .", "Use this API to save nsconfig.", "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.", "Method to initialize the list.\n\n@param resList a given instance or null\n@return an instance", "Executes the given side effecting function on each pixel.\n\n@param fn a function that accepts 3 parameters - the x,y coordinate and the pixel at that coordinate", "Iterates over all tokens in current member tag with the name tagName and evaluates the body for every token.\n\n@param template The body of the block tag\n@param attributes The attributes of the template tag\n@exception XDocletException If an error occurs\[email protected] type=\"block\"\[email protected] name=\"tagName\" optional=\"false\" description=\"The tag name.\"\[email protected] name=\"delimiter\" description=\"delimiter for the StringTokenizer. consult javadoc for\njava.util.StringTokenizer default is ','\"\[email protected] name=\"skip\" description=\"how many tokens to skip on start\"", "Updates the Q matrix to take inaccount the row that was removed by only multiplying e\nlements that need to be. There is still some room for improvement here...\n@param rowIndex", "Processes the template for all extents of the current class.\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\"" ]
public static void calculateLegendInformation(List<? extends BaseModel> _Models, float _StartX, float _EndX, Paint _Paint) { float textMargin = Utils.dpToPx(10.f); float lastX = _StartX; // calculate the legend label positions and check if there is enough space to display the label, // if not the label will not be shown for (BaseModel model : _Models) { if (!model.isIgnore()) { Rect textBounds = new Rect(); RectF legendBounds = model.getLegendBounds(); _Paint.getTextBounds(model.getLegendLabel(), 0, model.getLegendLabel().length(), textBounds); model.setTextBounds(textBounds); float centerX = legendBounds.centerX(); float centeredTextPos = centerX - (textBounds.width() / 2); float textStartPos = centeredTextPos - textMargin; // check if the text is too big to fit on the screen if (centeredTextPos + textBounds.width() > _EndX - textMargin) { model.setShowLabel(false); } else { // check if the current legend label overrides the label before // if the label overrides the label before, the current label will not be shown. // If not the label will be shown and the label position is calculated if (textStartPos < lastX) { if (lastX + textMargin < legendBounds.left) { model.setLegendLabelPosition((int) (lastX + textMargin)); model.setShowLabel(true); lastX = lastX + textMargin + textBounds.width(); } else { model.setShowLabel(false); } } else { model.setShowLabel(true); model.setLegendLabelPosition((int) centeredTextPos); lastX = centerX + (textBounds.width() / 2); } } } } }
[ "Calculates the legend positions and which legend title should be displayed or not.\n\nImportant: the LegendBounds in the _Models should be set and correctly calculated before this\nfunction is called!\n@param _Models The graph data which should have the BaseModel class as parent class.\n@param _StartX Left starting point on the screen. Should be the absolute pixel value!\n@param _Paint The correctly set Paint which will be used for the text painting in the later process" ]
[ "Replaces sequences of whitespaces with tabs.\n\n@param self A CharSequence to unexpand\n@param tabStop The number of spaces a tab represents\n@return an unexpanded String\n@since 1.8.2", "Get a list of all methods.\n\n@return The method names\n@throws FlickrException", "Sets the stream for a resource.\nThis function allows you to provide a stream that is already open to\nan existing resource. It will throw an exception if that resource\nalready has an open stream.\n@param s InputStream currently open stream to use for I/O.", "Get a collection of recent photos.\n\nThis method does not require authentication.\n\n@see com.flickr4java.flickr.photos.Extras\n@param extras\nSet of extra-fields\n@param perPage\nThe number of photos per page\n@param page\nThe page offset\n@return A collection of Photo objects\n@throws FlickrException", "Answer the FieldConversions for the PkFields\n@param cld\n@return the pk FieldConversions", "Extracts the service name from a Server.\n@param server\n@return", "Disable certificate verification.\n\n@throws KeyManagementException\nthe key management exception\n@throws NoSuchAlgorithmException\nthe no such algorithm exception", "Helper method for getting the current parameter values from a list of annotated parameters.\n\n@param parameters The list of annotated parameter to look up\n@param manager The Bean manager\n@return The object array of looked up values", "Use this API to delete dnsaaaarec resources of given names." ]
static void init() {// NOPMD determineIfNTEventLogIsSupported(); URL resource = null; final String configurationOptionStr = OptionConverter.getSystemProperty(DEFAULT_CONFIGURATION_KEY, null); if (configurationOptionStr != null) { try { resource = new URL(configurationOptionStr); } catch (MalformedURLException ex) { // so, resource is not a URL: // attempt to get the resource from the class path resource = Loader.getResource(configurationOptionStr); } } if (resource == null) { resource = Loader.getResource(DEFAULT_CONFIGURATION_FILE); // NOPMD } if (resource == null) { System.err.println("[FoundationLogger] Can not find resource: " + DEFAULT_CONFIGURATION_FILE); // NOPMD throw new FoundationIOException("Can not find resource: " + DEFAULT_CONFIGURATION_FILE); // NOPMD } // update the log manager to use the Foundation repository. final RepositorySelector foundationRepositorySelector = new FoundationRepositorySelector(FoundationLogFactory.foundationLogHierarchy); LogManager.setRepositorySelector(foundationRepositorySelector, null); // set logger to info so we always want to see these logs even if root // is set to ERROR. final Logger logger = getLogger(FoundationLogger.class); final String logPropFile = resource.getPath(); log4jConfigProps = getLogProperties(resource); // select and configure again so the loggers are created with the right // level after the repository selector was updated. OptionConverter.selectAndConfigure(resource, null, FoundationLogFactory.foundationLogHierarchy); // start watching for property changes setUpPropFileReloading(logger, logPropFile, log4jConfigProps); // add syslog appender or windows event viewer appender // setupOSSystemLog(logger, log4jConfigProps); // parseMarkerPatterns(log4jConfigProps); // parseMarkerPurePattern(log4jConfigProps); // udpateMarkerStructuredLogOverrideMap(logger); AbstractFoundationLoggingMarker.init(); updateSniffingLoggersLevel(logger); setupJULSupport(resource); }
[ "Initialize that Foundation Logging library." ]
[ "Use this API to delete route6 of given name.", "This method extracts task data from an MSPDI file.\n\n@param project Root node of the MSPDI file", "Modify the tranform's current rotation in quaternion terms, around a\npivot other than the origin.\n\n@param w\n'W' component of the quaternion.\n@param x\n'X' component of the quaternion.\n@param y\n'Y' component of the quaternion.\n@param z\n'Z' component of the quaternion.\n@param pivotX\n'X' component of the pivot's location.\n@param pivotY\n'Y' component of the pivot's location.\n@param pivotZ\n'Z' component of the pivot's location.", "For given field name get the actual hint message", "Create a field map for enterprise custom fields.\n\n@param props props data\n@param c target class", "Convert an array of column definitions into a map keyed by column name.\n\n@param columns array of column definitions\n@return map of column definitions", "This produces a shorter string for the address that uses the canonical representation but not using leading zeroes.\n\nEach address has a unique compressed string.", "Check if this type is assignable from the given Type.", "Sets the working directory.\n\n@param dir The directory\n@throws IOException If the directory does not exist or cannot be written/read" ]
public Style createStyle(final List<Rule> styleRules) { final Rule[] rulesArray = styleRules.toArray(new Rule[0]); final FeatureTypeStyle featureTypeStyle = this.styleBuilder.createFeatureTypeStyle(null, rulesArray); final Style style = this.styleBuilder.createStyle(); style.featureTypeStyles().add(featureTypeStyle); return style; }
[ "Create a style from a list of rules.\n\n@param styleRules the rules" ]
[ "Returns the Java executable command.\n\n@param javaHome the java home directory or {@code null} to use the default\n\n@return the java command to use", "Check if the object has a property with the key.\n\n@param key key to check for.", "Emit status line for an aggregated event.", "Retrieves from all the Jenkins agents all the docker images, which have been registered for a specific build-info ID\nOnly images for which manifests have been captured are returned.\n\n@param buildInfoId\n@return\n@throws IOException\n@throws InterruptedException", "Moves the cursor to the given row number in the iterator. If the row\nnumber is positive, the cursor moves to the given row number with\nrespect to the beginning of the iterator. The first row is row 1, the\nsecond is row 2, and so on.\n\n@param row the row to move to in this iterator, by absolute number", "Use this API to fetch the statistics of all appfwpolicylabel_stats resources that are configured on netscaler.", "Create a new builder for multiple unpaginated requests on the view.\n\n@param keyType {@link com.cloudant.client.api.views.Key.Type} of the key emitted by the\nview\n@param valueType class of the type of value emitted by the view\n@param <K> type of key emitted by the view\n@param <V> type of value emitted by the view\n@return a new {@link MultipleRequestBuilder} for the database view specified by this\nViewRequestBuilder", "Tests that the area is valid geojson, the style ref is valid or null and the display is non-null.", "Send a request to another handler internal to the server, getting back the response body and response code.\n\n@param request request to send to another handler.\n@return {@link InternalHttpResponse} containing the response code and body." ]
public static nssimpleacl get(nitro_service service, String aclname) throws Exception{ nssimpleacl obj = new nssimpleacl(); obj.set_aclname(aclname); nssimpleacl response = (nssimpleacl) obj.get_resource(service); return response; }
[ "Use this API to fetch nssimpleacl resource of given name ." ]
[ "Internal method used to retrieve a integer from an\nembedded data block.\n\n@param blocks list of data blocks\n@return int value", "Create a clone of the Renderer. This method is the base of the prototype mechanism implemented\nto avoid create new objects from RendererBuilder. Pay an special attention implementing clone\nmethod in Renderer subtypes.\n\n@return a copy of the current renderer.", "Indicates that contextual session bean instance has been constructed.", "Get the content-type, including the optional \";base64\".", "Description accessor provided for JSON serialization only.", "Checks to make sure that pseudo scoped beans (i.e. @Dependent scoped beans) have no circular dependencies.", "Process the module and bundle roots and cross check with the installed information.\n\n@param conf the installed configuration\n@param moduleRoots the module roots\n@param bundleRoots the bundle roots\n@return the processed layers\n@throws IOException", "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", "Creates an upper triangular matrix whose values are selected from a uniform distribution. If hessenberg\nis greater than zero then a hessenberg matrix of the specified degree is created instead.\n\n@param dimen Number of rows and columns in the matrix..\n@param hessenberg 0 for triangular matrix and &gt; 0 for hessenberg matrix.\n@param min minimum value an element can be.\n@param max maximum value an element can be.\n@param rand random number generator used.\n@return The randomly generated matrix." ]