query
stringlengths
74
6.1k
positive
listlengths
1
1
negative
listlengths
9
9
protected <H extends EventHandler> HandlerRegistration addHandler(final H handler, GwtEvent.Type<H> type) { return ensureHandlers().addHandlerToSource(type, this, handler); }
[ "Adds this handler to the widget.\n\n@param <H> the type of handler to add\n@param type the event type\n@param handler the handler\n@return {@link HandlerRegistration} used to remove the handler" ]
[ "Get a random sample of k out of n elements.\n\nSee Algorithm S, D. E. Knuth, The Art of Computer Programming, Vol. 2, p.142.", "Update the installed identity using the modified state from the modification.\n\n@param name the identity name\n@param modification the modification\n@param state the installation state...
public SimpleFeatureSource getFeatureSource() throws LayerException { try { if (dataStore instanceof WFSDataStore) { return dataStore.getFeatureSource(featureSourceName.replace(":", "_")); } else { return dataStore.getFeatureSource(featureSourceName); } } catch (IOException e) { throw new LayerException(e, ExceptionCode.FEATURE_MODEL_PROBLEM, "Cannot find feature source " + featureSourceName); } catch (NullPointerException e) { throw new LayerException(e, ExceptionCode.FEATURE_MODEL_PROBLEM, "Cannot find feature source " + featureSourceName); } }
[ "Retrieve the FeatureSource object from the data store.\n\n@return An OpenGIS FeatureSource object;\n@throws LayerException\noops" ]
[ "Use this API to fetch appfwjsoncontenttype resource of given name .", "Checks the available space and sets max-height to the details field-set.", "Classify stdin by documents seperated by 3 blank line\n@param readerWriter\n@return boolean reached end of IO\n@throws IOException", "Ensures that the start and e...
public ManagementModelNode getSelectedNode() { if (tree.getSelectionPath() == null) return null; return (ManagementModelNode)tree.getSelectionPath().getLastPathComponent(); }
[ "Get the node that has been selected by the user, or null if\nnothing is selected.\n@return The node or <code>null</code>" ]
[ "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.", "Get logs for an app.\n@param appName App name. See {@link #listApps} for a list of apps that can be used.\n@return log stream response", "Recovers the st...
static ItemIdValueImpl fromIri(String iri) { int separator = iri.lastIndexOf('/') + 1; try { return new ItemIdValueImpl(iri.substring(separator), iri.substring(0, separator)); } catch (IllegalArgumentException e) { throw new IllegalArgumentException("Invalid Wikibase entity IRI: " + iri, e); } }
[ "Parses an item IRI\n\n@param iri\nthe item IRI like http://www.wikidata.org/entity/Q42\n@throws IllegalArgumentException\nif the IRI is invalid or does not ends with an item id" ]
[ "Main method, handles all the setup tasks for DataGenerator a user would normally do themselves\n\n@param args command line arguments", "get the getter method corresponding to given property", "Adds an item to the list box, specifying an initial value for the item.\n\n@param value the item's value, to be submi...
private double convertMaturity(int maturityInMonths) { Schedule schedule = fixMetaSchedule.generateSchedule(referenceDate, maturityInMonths, 12); return schedule.getFixing(0); }
[ "Convert maturity given as offset in months to year fraction.\n\n@param maturityInMonths The maturity as offset in months.\n@return The maturity as year fraction." ]
[ "Use this API to unset the properties of nsrpcnode resource.\nProperties that need to be unset are specified in args array.", "Performs a null edit on an item. This has some effects on Wikibase,\nsuch as refreshing the labels of the referred items in the UI.\n\n@param itemId\nthe document to perform a null edit o...
void setParent(ProjectCalendarWeek parent) { m_parent = parent; for (int loop = 0; loop < m_days.length; loop++) { if (m_days[loop] == null) { m_days[loop] = DayType.DEFAULT; } } }
[ "Set the parent from which this week is derived.\n\n@param parent parent week" ]
[ "This method allows nested tasks to be added, with the WBS being\ncompleted automatically.\n\n@return new task", "Emit a event object 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(EventObject, Object...)", ...
void initialize(DMatrixSparseCSC A) { m = A.numRows; n = A.numCols; int s = 4*n + (ata ? (n+m+1) : 0); gw.reshape(s); w = gw.data; // compute the transpose of A At.reshape(A.numCols,A.numRows,A.nz_length); CommonOps_DSCC.transpose(A,At,gw); // initialize w Arrays.fill(w,0,s,-1); // assign all values in workspace to -1 ancestor = 0; maxfirst = n; prevleaf = 2*n; first = 3*n; }
[ "Initializes class data structures and parameters" ]
[ "Possibly coalesces the newest change event to match the user's original intent. For example,\nan unsynchronized insert and update is still an insert.\n\n@param lastUncommittedChangeEvent the last change event known about for a document.\n@param newestChangeEvent the newest change event known about for a d...
public Map<DeckReference, TrackMetadata> getLoadedTracks() { ensureRunning(); // Make a copy so callers get an immutable snapshot of the current state. return Collections.unmodifiableMap(new HashMap<DeckReference, TrackMetadata>(hotCache)); }
[ "Get the metadata of all tracks currently loaded in any player, either on the play deck, or in a hot cue.\n\n@return the track information reported by all current players, including any tracks loaded in their hot cue slots\n\n@throws IllegalStateException if the MetadataFinder is not running" ]
[ "Per the navigation drawer design guidelines, updates the action bar to show the global app\n'context', rather than just what's in the current screen.", "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 mai...
public void printInferredRelations(ClassDoc c) { // check if the source is excluded from inference if (hidden(c)) return; Options opt = optionProvider.getOptionsFor(c); for (FieldDoc field : c.fields(false)) { if(hidden(field)) continue; // skip statics if(field.isStatic()) continue; // skip primitives FieldRelationInfo fri = getFieldRelationInfo(field); if (fri == null) continue; // check if the destination is excluded from inference if (hidden(fri.cd)) continue; // if source and dest are not already linked, add a dependency RelationPattern rp = getClassInfo(c, true).getRelation(fri.cd.toString()); if (rp == null) { String destAdornment = fri.multiple ? "*" : ""; relation(opt, opt.inferRelationshipType, c, fri.cd, "", "", destAdornment); } } }
[ "Prints associations recovered from the fields of a class. An association is inferred only\nif another relation between the two classes is not already in the graph.\n@param classes" ]
[ "Visit an exported package of the current module.\n\n@param packaze the qualified name of the exported package.\n@param access the access flag of the exported package,\nvalid values are among {@code ACC_SYNTHETIC} and\n{@code ACC_MANDATED}.\n@param modules the qualified names of the modules that can access to\nthe ...
private void attachMeta(final JSONObject o, final Context context) { // Memory consumption try { o.put("mc", Utils.getMemoryConsumption()); } catch (Throwable t) { // Ignore } // Attach the network type try { o.put("nt", Utils.getCurrentNetworkType(context)); } catch (Throwable t) { // Ignore } }
[ "Attaches meta info about the current state of the device to an event.\nTypically, this meta is added only to the ping event." ]
[ "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>&l...
protected boolean check(String id, List<String> includes) { if (null != includes) { for (String check : includes) { if (check(id, check)) { return true; } } } return false; }
[ "Check whether the given is is matched by one of the include expressions.\n\n@param id id to check\n@param includes list of include regular expressions\n@return true when id is included" ]
[ "Returns a copy of the given document.\n@param document the document to copy.\n@return a copy of the given document.", "Abort and close the transaction.\nCalling abort abandons all persistent object modifications and releases the\nassociated locks.\nIf transaction is not in progress a TransactionNotInProgressExce...
void writeBestRankTriples() { for (Resource resource : this.rankBuffer.getBestRankedStatements()) { try { this.rdfWriter.writeTripleUriObject(resource, RdfWriter.RDF_TYPE, RdfWriter.WB_BEST_RANK.toString()); } catch (RDFHandlerException e) { throw new RuntimeException(e.getMessage(), e); } } this.rankBuffer.clear(); }
[ "Writes triples to determine the statements with the highest rank." ]
[ "For recovery from the latest consistent snapshot, we should clean up the\nold files from the previous backup set, else we will fill the disk with\nuseless log files\n\n@param backupDir", "Create and add model controller handler to an existing management channel handler.\n\n@param handler the channel handler\n@re...
public final void notifyHeaderItemRangeChanged(int positionStart, int itemCount) { if (positionStart < 0 || itemCount < 0 || positionStart + itemCount >= headerItemCount) { throw new IndexOutOfBoundsException("The given range [" + positionStart + " - " + (positionStart + itemCount - 1) + "] is not within the position bounds for header items [0 - " + (headerItemCount - 1) + "]."); } notifyItemRangeChanged(positionStart, itemCount); }
[ "Notifies that multiple header items are changed.\n\n@param positionStart the position.\n@param itemCount the item count." ]
[ "Read one collection element from the current row of the JDBC result set\n\n@param optionalOwner the collection owner\n@param optionalKey the collection key\n@param persister the collection persister\n@param descriptor the collection aliases\n@param rs the result set\n@param session the session\n@throws HibernateEx...
public static double huntKennedyCMSFloorValue( double forwardSwaprate, double volatility, double swapAnnuity, double optionMaturity, double swapMaturity, double payoffUnit, double optionStrike) { double huntKennedyCMSOptionValue = huntKennedyCMSOptionValue(forwardSwaprate, volatility, swapAnnuity, optionMaturity, swapMaturity, payoffUnit, optionStrike); // A floor is an option plus the strike (max(X,K) = max(X-K,0) + K) return huntKennedyCMSOptionValue + optionStrike * payoffUnit; }
[ "Calculate the value of a CMS strike using the Black-Scholes model for the swap rate together with\nthe Hunt-Kennedy convexity adjustment.\n\n@param forwardSwaprate The forward swap rate\n@param volatility Volatility of the log of the swap rate\n@param swapAnnuity The swap annuity\n@param optionMaturity The option ...
[ "Retrieve the default number of minutes per year.\n\n@return minutes per year", "Reads Netscape extension to obtain iteration count.", "Check exactly the week check-boxes representing the given weeks.\n@param weeksToCheck the weeks selected.", "Returns the steps instances associated to CandidateSteps\n\n@para...
synchronized void bulkRegisterSingleton() { for (Map.Entry<Class<? extends AppService>, AppService> entry : registry.entrySet()) { if (isSingletonService(entry.getKey())) { app.registerSingleton(entry.getKey(), entry.getValue()); } } }
[ "Called when app's singleton registry has been initialized" ]
[ "With the QR algorithm it is possible for the found singular values to be negative. This\nmakes them all positive by multiplying it by a diagonal matrix that has", "Send a packet to the target device telling it to load the specified track from the specified source player.\n\n@param target an update from the play...
public boolean computeDirect( DMatrixRMaj A ) { initPower(A); boolean converged = false; for( int i = 0; i < maxIterations && !converged; i++ ) { // q0.print(); CommonOps_DDRM.mult(A,q0,q1); double s = NormOps_DDRM.normPInf(q1); CommonOps_DDRM.divide(q1,s,q2); converged = checkConverged(A); } return converged; }
[ "This method computes the eigen vector with the largest eigen value by using the\ndirect power method. This technique is the easiest to implement, but the slowest to converge.\nWorks only if all the eigenvalues are real.\n\n@param A The matrix. Not modified.\n@return If it converged or not." ]
[ "Clears all properties of specified entity.\n\n@param entity to clear.", "Use this API to update snmpoption.", "Build all combinations of graph structures for generic event stubs of a maximum length\n@param length Maximum number of nodes in each to generate\n@return All graph combinations of specified length or...
public File getBootFile() { if (bootFile == null) { synchronized (this) { if (bootFile == null) { if (bootFileReset) { //Reset the done bootup and the sequence, so that the old file we are reloading from // overwrites the main file on successful boot, and history is reset as when booting new doneBootup.set(false); sequence.set(0); } // If it's a reload with no new boot file name and we're persisting our config, we boot from mainFile, // as that's where we persist if (bootFileReset && !interactionPolicy.isReadOnly() && newReloadBootFileName == null) { // we boot from mainFile bootFile = mainFile; } else { // It's either first boot, or a reload where we're not persisting our config or with a new boot file. // So we need to figure out which file we're meant to boot from String bootFileName = this.bootFileName; if (newReloadBootFileName != null) { //A non-null new boot file on reload takes precedence over the reloadUsingLast functionality //A new boot file was specified. Use that and reset the new name to null bootFileName = newReloadBootFileName; newReloadBootFileName = null; } else if (interactionPolicy.isReadOnly() && reloadUsingLast) { //If we were reloaded, and it is not a persistent configuration we want to use the last from the history bootFileName = LAST; } boolean usingRawFile = bootFileName.equals(rawFileName); if (usingRawFile) { bootFile = mainFile; } else { bootFile = determineBootFile(configurationDir, bootFileName); try { bootFile = bootFile.getCanonicalFile(); } catch (IOException ioe) { throw ControllerLogger.ROOT_LOGGER.canonicalBootFileNotFound(ioe, bootFile); } } if (!bootFile.exists()) { if (!usingRawFile) { // TODO there's no reason usingRawFile should be an exception, // but the test infrastructure stuff is built around an assumption // that ConfigurationFile doesn't fail if test files are not // in the normal spot if (bootFileReset || interactionPolicy.isRequireExisting()) { throw ControllerLogger.ROOT_LOGGER.fileNotFound(bootFile.getAbsolutePath()); } } // Create it for the NEW and DISCARD cases if (!bootFileReset && !interactionPolicy.isRequireExisting()) { createBootFile(bootFile); } } else if (!bootFileReset) { if (interactionPolicy.isRejectExisting() && bootFile.length() > 0) { throw ControllerLogger.ROOT_LOGGER.rejectEmptyConfig(bootFile.getAbsolutePath()); } else if (interactionPolicy.isRemoveExisting() && bootFile.length() > 0) { if (!bootFile.delete()) { throw ControllerLogger.ROOT_LOGGER.cannotDelete(bootFile.getAbsoluteFile()); } createBootFile(bootFile); } } // else after first boot we want the file to exist } } } } return bootFile; }
[ "Gets the file from which boot operations should be parsed.\n@return the file. Will not be {@code null}" ]
[ "Returns the command line options to be used for scalaxb, excluding the\ninput file names.", "Get a property as an long or default value.\n\n@param key the property name\n@param defaultValue the default value", "Setter for \"addContentInfo\", indicating if content information should be added.\n@param doAddInfo ...
private static void registerImage(String imageId, String imageTag, String targetRepo, ArrayListMultimap<String, String> artifactsProps, int buildInfoId) throws IOException { DockerImage image = new DockerImage(imageId, imageTag, targetRepo, buildInfoId, artifactsProps); images.add(image); }
[ "Registers an image to the images cache, so that it can be captured by the build-info proxy.\n\n@param imageId\n@param imageTag\n@param targetRepo\n@param buildInfoId\n@throws IOException" ]
[ "Get unique values form the array.\n\n@param values Array of values.\n@return Unique values.", "commit all envelopes against the current broker", "Lookup an object instance from JNDI context.\n\n@param jndiName JNDI lookup name\n@return Matching object or <em>null</em> if none found.", "Returns the name of th...
@RequestMapping(value = "/api/profile/{profileIdentifier}/clients/{clientUUID}", method = RequestMethod.GET) public @ResponseBody HashMap<String, Object> getClient(Model model, @PathVariable("profileIdentifier") String profileIdentifier, @PathVariable("clientUUID") String clientUUID) throws Exception { Integer profileId = ControllerUtils.convertProfileIdentifier(profileIdentifier); HashMap<String, Object> valueHash = new HashMap<String, Object>(); valueHash.put("client", clientService.findClient(clientUUID, profileId)); return valueHash; }
[ "Returns information for a specific client\n\n@param model\n@param profileIdentifier\n@param clientUUID\n@return\n@throws Exception" ]
[ "Use this API to update nsdiameter.", "Calculates directory size as total size of all its files, recursively.\n\n@param self a file object\n@return directory size (length)\n@since 2.1\n\n@throws IOException if File object specified does not exist\n@throws IllegalArgumentException if the provided File object does ...
private void logMigration(DbMigration migration, boolean wasSuccessful) { BoundStatement boundStatement = logMigrationStatement.bind(wasSuccessful, migration.getVersion(), migration.getScriptName(), migration.getMigrationScript(), new Date()); session.execute(boundStatement); }
[ "Inserts the result of the migration into the migration table\n\n@param migration the migration that was executed\n@param wasSuccessful indicates if the migration was successful or not" ]
[ "Get a bean value from the context.\n\n@param name bean name\n@return bean value or null", "The parameter 'project' is not used at the moment, but will be used once schema and plugin support lands.", "Returns code number of Task field supplied.\n\n@param field - name\n@return - code no", "Retrieve the value f...
@SuppressWarnings("unchecked") public <T extends TermedStatementDocument> T updateTermsStatements(T currentDocument, List<MonolingualTextValue> addLabels, List<MonolingualTextValue> addDescriptions, List<MonolingualTextValue> addAliases, List<MonolingualTextValue> deleteAliases, List<Statement> addStatements, List<Statement> deleteStatements, String summary) throws MediaWikiApiErrorException, IOException { TermStatementUpdate termStatementUpdate = new TermStatementUpdate( currentDocument, addStatements, deleteStatements, addLabels, addDescriptions, addAliases, deleteAliases); termStatementUpdate.setGuidGenerator(guidGenerator); return (T) termStatementUpdate.performEdit(wbEditingAction, editAsBot, summary); }
[ "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...
[ "Determines a histogram of contiguous runs of partitions within a zone.\nI.e., for each run length of contiguous partitions, how many such runs\nare there.\n\nDoes not correctly address \"wrap around\" of partition IDs (i.e., the fact\nthat partition ID 0 is \"next\" to partition ID 'max')\n\n@param cluster\n@param...
public static double calculateBoundedness(double D, int N, double timelag, double confRadius){ double r = confRadius; double cov_area = a(N)*D*timelag; double res = cov_area/(4*r*r); return res; }
[ "Calculates the Boundedness value to given confinement radius, diffusion coefficient, timlag and number of steps.\n@param D diffusion coefficient\n@param N Number of steps\n@param timelag Timelag\n@param confRadius Confinement radius\n@return Boundedness value" ]
[ "This version assumes relativeIndices array no longer needs to\nbe copied. Further it is assumed that it has already been\nchecked or assured by construction that relativeIndices\nis sorted.", "if |a11-a22| >> |a12+a21| there might be a better way. see pg371", "Adds the scroll position CSS extension to the giv...
public static Cluster getCluster(ZkClient zkClient) { Cluster cluster = new Cluster(); List<String> nodes = getChildrenParentMayNotExist(zkClient, BrokerIdsPath); for (String node : nodes) { final String brokerInfoString = readData(zkClient, BrokerIdsPath + "/" + node); cluster.add(Broker.createBroker(Integer.valueOf(node), brokerInfoString)); } return cluster; }
[ "read all brokers in the zookeeper\n\n@param zkClient zookeeper client\n@return all brokers" ]
[ "Determines how many primary partitions each node within each zone should\nhave. The list of integers returned per zone is the same length as the\nnumber of nodes in that zone.\n\n@param nextCandidateCluster\n@param targetPartitionsPerZone\n@return A map of zoneId to list of target number of partitions per node\nwi...
protected boolean hasTimeStampHeader() { String originTime = request.getHeader(RestMessageHeaders.X_VOLD_REQUEST_ORIGIN_TIME_MS); boolean result = false; if(originTime != null) { try { // TODO: remove the originTime field from request header, // because coordinator should not accept the request origin time // from the client.. In this commit, we only changed // "this.parsedRequestOriginTimeInMs" from // "Long.parseLong(originTime)" to current system time, // The reason that we did not remove the field from request // header right now, is because this commit is a quick fix for // internal performance test to be available as soon as // possible. this.parsedRequestOriginTimeInMs = System.currentTimeMillis(); if(this.parsedRequestOriginTimeInMs < 0) { RestErrorHandler.writeErrorResponse(messageEvent, HttpResponseStatus.BAD_REQUEST, "Origin time cannot be negative "); } else { result = true; } } catch(NumberFormatException nfe) { logger.error("Exception when validating request. Incorrect origin time parameter. Cannot parse this to long: " + originTime, nfe); RestErrorHandler.writeErrorResponse(this.messageEvent, HttpResponseStatus.BAD_REQUEST, "Incorrect origin time parameter. Cannot parse this to long: " + originTime); } } else { logger.error("Error when validating request. Missing origin time parameter."); RestErrorHandler.writeErrorResponse(this.messageEvent, HttpResponseStatus.BAD_REQUEST, "Missing origin time parameter."); } return result; }
[ "Retrieve and validate the timestamp value from the REST request.\n\"X_VOLD_REQUEST_ORIGIN_TIME_MS\" is timestamp header\n\nTODO REST-Server 1. Change Time stamp header to a better name.\n\n@return true if present, false if missing" ]
[ "Log error information", "Use this API to fetch csvserver_spilloverpolicy_binding resources of given name .", "Warning emitter. Uses whatever alternative non-event communication channel is.", "Get a property as a array or throw exception.\n\n@param key the property name", "Retrieve the fixed data offset for...
SimpleJsonEncoder appendToJSONUnquoted(final String key, final Object value) { if (closed) { throw new IllegalStateException("Encoder already closed"); } if (value != null) { appendKey(key); sb.append(value); } return this; }
[ "Append field with quotes and escape characters added in the key, if required.\nThe value is added without quotes and any escape characters.\n\n@return this" ]
[ "Gets information about a trashed file that's limited to a list of specified fields.\n@param fileID the ID of the trashed file.\n@param fields the fields to retrieve.\n@return info about the trashed file containing only the specified fields.", "Determines the java.sql.Types constant value from an OJB\nFI...
protected String getExecutableJar() throws IOException { Manifest manifest = new Manifest(); manifest.getMainAttributes().put(Attributes.Name.MANIFEST_VERSION, "1.0"); manifest.getMainAttributes().put(Attributes.Name.MAIN_CLASS, MAIN); manifest.getMainAttributes().put(Attributes.Name.CLASS_PATH, getClasspath()); Path jar = createTempDirectory("exec").resolve("generate.jar"); try (JarOutputStream output = new JarOutputStream(Files.newOutputStream(jar), manifest)) { output.putNextEntry(new JarEntry("allure.properties")); Path allureConfig = PROPERTIES.getAllureConfig(); if (Files.exists(allureConfig)) { byte[] bytes = Files.readAllBytes(allureConfig); output.write(bytes); } output.closeEntry(); } return jar.toAbsolutePath().toString(); }
[ "Create an executable jar to generate the report. Created jar contains only\nallure configuration file." ]
[ "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.", "Returns all information related to a single texture.\n\n@param t...
public void removeExtension(Resource rootResource, String moduleName, ManagementResourceRegistration rootRegistration) throws IllegalStateException { final ManagementResourceRegistration profileReg; if (rootRegistration.getPathAddress().size() == 0) { //domain or server extension // Can't use processType.isServer() to determine where to look for profile reg because a lot of test infrastructure // doesn't add the profile mrr even in HC-based tests ManagementResourceRegistration reg = rootRegistration.getSubModel(PathAddress.pathAddress(PathElement.pathElement(PROFILE))); if (reg == null) { reg = rootRegistration; } profileReg = reg; } else { //host model extension profileReg = rootRegistration; } ManagementResourceRegistration deploymentsReg = processType.isServer() ? rootRegistration.getSubModel(PathAddress.pathAddress(PathElement.pathElement(DEPLOYMENT))) : null; ExtensionInfo extension = extensions.remove(moduleName); if (extension != null) { //noinspection SynchronizationOnLocalVariableOrMethodParameter synchronized (extension) { Set<String> subsystemNames = extension.subsystems.keySet(); final boolean dcExtension = processType.isHostController() ? rootRegistration.getPathAddress().size() == 0 : false; for (String subsystem : subsystemNames) { if (hasSubsystemsRegistered(rootResource, subsystem, dcExtension)) { // Restore the data extensions.put(moduleName, extension); throw ControllerLogger.ROOT_LOGGER.removingExtensionWithRegisteredSubsystem(moduleName, subsystem); } } for (Map.Entry<String, SubsystemInformation> entry : extension.subsystems.entrySet()) { String subsystem = entry.getKey(); profileReg.unregisterSubModel(PathElement.pathElement(ModelDescriptionConstants.SUBSYSTEM, subsystem)); if (deploymentsReg != null) { deploymentsReg.unregisterSubModel(PathElement.pathElement(ModelDescriptionConstants.SUBSYSTEM, subsystem)); deploymentsReg.unregisterSubModel(PathElement.pathElement(ModelDescriptionConstants.SUBDEPLOYMENT, subsystem)); } if (extension.xmlMapper != null) { SubsystemInformationImpl subsystemInformation = SubsystemInformationImpl.class.cast(entry.getValue()); for (String namespace : subsystemInformation.getXMLNamespaces()) { extension.xmlMapper.unregisterRootElement(new QName(namespace, SUBSYSTEM)); } } } } } }
[ "Cleans up a extension module's subsystems from the resource registration model.\n\n@param rootResource the model root resource\n@param moduleName the name of the extension's module. Cannot be {@code null}\n@throws IllegalStateException if the extension still has subsystems present in {@code rootResource} or its ...
[ "Add a forward to this curve.\n\n@param model An analytic model providing a context. The discount curve (if needed) is obtained from this model.\n@param fixingTime The given fixing time.\n@param forward The given forward.\n@param isParameter If true, then this point is server via {@link #getParameter()} and changed...
boolean applyDomainModel(ModelNode result) { if(! result.hasDefined(ModelDescriptionConstants.RESULT)) { return false; } final List<ModelNode> bootOperations= result.get(ModelDescriptionConstants.RESULT).asList(); return callback.applyDomainModel(bootOperations); }
[ "Apply the remote read domain model result.\n\n@param result the domain model result\n@return whether it was applied successfully or not" ]
[ "Helper method that stores in a hash map how often a certain key occurs.\nIf the key has not been encountered yet, a new entry is created for it in\nthe map. Otherwise the existing value for the key is incremented.\n\n@param map\nthe map where the counts are stored\n@param key\nthe key to be counted\n@param count\n...
public synchronized boolean isComplete(int requestId, boolean remove) { if (!operations.containsKey(requestId)) throw new VoldemortException("No operation with id " + requestId + " found"); if (operations.get(requestId).getStatus().isComplete()) { if (logger.isDebugEnabled()) logger.debug("Operation complete " + requestId); if (remove) operations.remove(requestId); return true; } return false; }
[ "Check if the an operation is done or not.\n\n@param requestId Id of the request\n@param remove Whether remove the request out of the list if it is done.\n@return True if request is complete, false otherwise" ]
[ "Creates a non-binary media type with the given type, subtype, and UTF-8 encoding\n@throws com.tngtech.jgiven.exception.JGivenWrongUsageException if any of the given arguments is {@code null}", "Generate a module graph regarding the filters\n\n@param moduleId String\n@return AbstractGraph", "Release the broker ...
private void addAllProjectModels(ApplicationReportIndexModel navIdx, ProjectModel projectModel) { navIdx.addProjectModel(projectModel); for (ProjectModel childProject : projectModel.getChildProjects()) { if (!Iterators.asSet(navIdx.getProjectModels()).contains(childProject)) addAllProjectModels(navIdx, childProject); } }
[ "Attach all project models within the application to the index. This will make it easy to navigate from the\nprojectModel to the application index." ]
[ "Generate a PageMetadata object for the page represented by the specified pagination token.\n\n@param paginationToken opaque pagination token\n@param initialParameters the initial view query parameters (i.e. for the page 1 request).\n@param <K> the view key type\n@param <V> the view va...
public MapBounds getRotatedBoundsAdjustedForPreciseRotatedMapSize() { Rectangle2D.Double paintAreaPrecise = getRotatedMapSizePrecise(); Rectangle paintArea = new Rectangle(MapfishMapContext.rectangleDoubleToDimension(paintAreaPrecise)); return getRotatedBounds(paintAreaPrecise, paintArea); }
[ "Return the map bounds rotated with the set rotation. The bounds are adapted to rounding changes of the\nsize of the set paint area.\n\n@return Rotated bounds." ]
[ "Function to clear all the metadata related to the given store\ndefinitions. This is needed when a put on 'stores.xml' is called, thus\nreplacing the existing state.\n\nThis method is not thread safe. It is expected that the caller of this\nmethod will handle concurrency related issues.\n\n@param storeNamesToDelete...
public GVRAnimator animate(int animIndex, float timeInSec) { if ((animIndex < 0) || (animIndex >= mAnimations.size())) { throw new IndexOutOfBoundsException("Animation index out of bounds"); } GVRAnimator anim = mAnimations.get(animIndex); anim.animate(timeInSec); return anim; }
[ "Evaluates the animation with the given index at the specified time.\n@param animIndex 0-based index of {@link GVRAnimator} to start\n@param timeInSec time to evaluate the animation at\n@see GVRAvatar#stop()\n@see #start(String)" ]
[ "creates a scope using the passed function to compute the names and sets the passed scope as the parent scope", "Returns true if templates are to be instantiated synchronously and false if\nasynchronously.", "Set hint number for country", "Use this API to clear Interface resources.", "Puts strings inside qu...
public static int allParametersAndArgumentsMatch(Parameter[] params, ClassNode[] args) { if (params==null) { params = Parameter.EMPTY_ARRAY; } int dist = 0; if (args.length<params.length) return -1; // we already know the lengths are equal for (int i = 0; i < params.length; i++) { ClassNode paramType = params[i].getType(); ClassNode argType = args[i]; if (!isAssignableTo(argType, paramType)) return -1; else { if (!paramType.equals(argType)) dist+=getDistance(argType, paramType); } } return dist; }
[ "Checks that arguments and parameter types match.\n@param params method parameters\n@param args type arguments\n@return -1 if arguments do not match, 0 if arguments are of the exact type and >0 when one or more argument is\nnot of the exact type but still match" ]
[ "Use this API to fetch sslpolicy_lbvserver_binding resources of given name .", "Transforms each character from this reader by passing it to the given\nclosure. The Closure should return each transformed character, which\nwill be passed to the Writer. The reader and writer will be both be\nclosed before this met...
private static <T> void readTableField(DatabaseTableConfig<T> config, String field, String value) { if (field.equals(FIELD_NAME_DATA_CLASS)) { try { @SuppressWarnings("unchecked") Class<T> clazz = (Class<T>) Class.forName(value); config.setDataClass(clazz); } catch (ClassNotFoundException e) { throw new IllegalArgumentException("Unknown class specified for dataClass: " + value); } } else if (field.equals(FIELD_NAME_TABLE_NAME)) { config.setTableName(value); } }
[ "Read a field into our table configuration for field=value line." ]
[ "Attempt to resolve the given expression string, recursing if resolution of one string produces\nanother expression.\n\n@param expressionString the expression string from a node of {@link ModelType#EXPRESSION}\n@param ignoreDMRResolutionFailure {@code false} if {@link org.jboss.dmr.ModelNode#resolve() basic DMR res...
public static CrashReport fromJson(String json) throws IllegalArgumentException { try { return new CrashReport(json); } catch (JSONException je) { throw new IllegalArgumentException(je.toString()); } }
[ "Exports json encoded content to CrashReport object\n\n@param json valid json body.\n@return new instance of CrashReport" ]
[ "Initialize the field factories for the messages table.", "Gets a JsonObject containing any pending changes to this object that can be sent back to the Box API.\n@return a JsonObject containing the pending changes.", "Inserts the LokenList immediately following the 'before' token", "Changes the volume of an e...
public boolean matchesWithMask(IPAddressSection other, IPAddressSection mask) { checkMaskSectionCount(mask); checkSectionCount(other); int divCount = getSegmentCount(); for(int i = 0; i < divCount; i++) { IPAddressSegment div = getSegment(i); IPAddressSegment maskSegment = mask.getSegment(i); IPAddressSegment otherSegment = other.getSegment(i); if(!div.matchesWithMask( otherSegment.getSegmentValue(), otherSegment.getUpperSegmentValue(), maskSegment.getSegmentValue())) { return false; } } return true; }
[ "Applies the mask to this address section and then compares values with the given address section\n\n@param mask\n@param other\n@return" ]
[ "Get the MonetaryAmount implementation class.\n\n@return the implementation class of the containing amount instance, never null.\n@see MonetaryAmount#getContext()", "Calculates the next date, starting from the provided date.\n\n@param date the current date.\n@param interval the number of month to add when moving ...
public static NodeList evaluateXpathExpression(Document dom, String xpathExpr) throws XPathExpressionException { XPathFactory factory = XPathFactory.newInstance(); XPath xpath = factory.newXPath(); XPathExpression expr = xpath.compile(xpathExpr); Object result = expr.evaluate(dom, XPathConstants.NODESET); return (NodeList) result; }
[ "Returns the list of nodes which match the expression xpathExpr in the Document dom.\n\n@param dom the Document to search in\n@param xpathExpr the xpath query\n@return the list of nodes which match the query\n@throws XPathExpressionException On error." ]
[ "Add the set with given bundles to the \"Export-Package\" main attribute.\n\n@param exportedPackages The set of all packages to add.", "Convert an Object to a DateTime.", "Delete a path recursively, not throwing Exception if it fails or if the path is null.\n@param path a Path pointing to a file or a directory ...
public static final int getShort(byte[] data, int offset) { int result = 0; int i = offset; for (int shiftBy = 0; shiftBy < 16; shiftBy += 8) { result |= ((data[i] & 0xff)) << shiftBy; ++i; } return result; }
[ "Read a two byte integer.\n\n@param data byte array\n@param offset offset into array\n@return integer value" ]
[ "Checks if the date is a holiday\n\n@param dateString the date\n@return true if it is a holiday, false otherwise", "For the given service name return list of endpoint references currently\nregistered at the service locator server endpoints.\n\n@param serviceName\nthe name of the service for which to get the endpo...
public static String analyzeInvalidMetadataRate(final Cluster currentCluster, List<StoreDefinition> currentStoreDefs, final Cluster finalCluster, List<StoreDefinition> finalStoreDefs) { StringBuilder sb = new StringBuilder(); sb.append("Dump of invalid metadata rates per zone").append(Utils.NEWLINE); HashMap<StoreDefinition, Integer> uniqueStores = StoreDefinitionUtils.getUniqueStoreDefinitionsWithCounts(currentStoreDefs); for(StoreDefinition currentStoreDef: uniqueStores.keySet()) { sb.append("Store exemplar: " + currentStoreDef.getName()) .append(Utils.NEWLINE) .append("\tThere are " + uniqueStores.get(currentStoreDef) + " other similar stores.") .append(Utils.NEWLINE); StoreRoutingPlan currentSRP = new StoreRoutingPlan(currentCluster, currentStoreDef); StoreDefinition finalStoreDef = StoreUtils.getStoreDef(finalStoreDefs, currentStoreDef.getName()); StoreRoutingPlan finalSRP = new StoreRoutingPlan(finalCluster, finalStoreDef); // Only care about existing zones for(int zoneId: currentCluster.getZoneIds()) { int zonePrimariesCount = 0; int invalidMetadata = 0; // Examine nodes in current cluster in existing zone. for(int nodeId: currentCluster.getNodeIdsInZone(zoneId)) { // For every zone-primary in current cluster for(int zonePrimaryPartitionId: currentSRP.getZonePrimaryPartitionIds(nodeId)) { zonePrimariesCount++; // Determine if original zone-primary node is still some // form of n-ary in final cluster. If not, // InvalidMetadataException will fire. if(!finalSRP.getZoneNAryPartitionIds(nodeId) .contains(zonePrimaryPartitionId)) { invalidMetadata++; } } } float rate = invalidMetadata / (float) zonePrimariesCount; sb.append("\tZone " + zoneId) .append(" : total zone primaries " + zonePrimariesCount) .append(", # that trigger invalid metadata " + invalidMetadata) .append(" => " + rate) .append(Utils.NEWLINE); } } return sb.toString(); }
[ "Compares current cluster with final cluster. Uses pertinent store defs\nfor each cluster to determine if a node that hosts a zone-primary in the\ncurrent cluster will no longer host any zone-nary in the final cluster.\nThis check is the precondition for a server returning an invalid metadata\nexception to a client...
[ "Check if values in the column \"property\" are written to the bundle descriptor.\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 descriptor.", "Use this API to fetch bridgegroup_nsip_binding resources of given name .", "Ge...
public static <T extends InterconnectObject> T fromJson(String data, Class<T> clazz) throws IOException { return InterconnectMapper.mapper.readValue(data, clazz); }
[ "Creates an object from the given JSON data.\n\n@param data the JSON data\n@param clazz the class object for the content of the JSON data\n@param <T> the type of the class object extending {@link InterconnectObject}\n@return the object contained in the given JSON data\n@throws JsonParseException if a the JSON ...
[ "Remove a handler from the list\n@param toRemove The handler to remove. Any handler object that\nmatches this class will be removed.\n@return true if this handler was in the list.", "Extracts baseline work from the MPP file for a specific baseline.\nReturns null if no baseline work is present, otherwise returns\n...
private static Document objectForInsert(Tuple tuple, Document dbObject) { MongoDBTupleSnapshot snapshot = (MongoDBTupleSnapshot) tuple.getSnapshot(); for ( TupleOperation operation : tuple.getOperations() ) { String column = operation.getColumn(); if ( notInIdField( snapshot, column ) ) { switch ( operation.getType() ) { case PUT: MongoHelpers.setValue( dbObject, column, operation.getValue() ); break; case PUT_NULL: case REMOVE: MongoHelpers.resetValue( dbObject, column ); break; } } } return dbObject; }
[ "Creates a Document that can be passed to the MongoDB batch insert function" ]
[ "Returns the value of the specified matrix element. Performs a bounds check to make sure\nthe requested element is part of the matrix.\n\n@param row The row of the element.\n@param col The column of the element.\n@return The value of the element.", "Read an optional string value form a JSON Object.\n@param json ...
private String readOptionalString(JSONObject json, String key, String defaultValue) { try { String str = json.getString(key); if (str != null) { return str; } } catch (JSONException e) { LOG.debug("Reading optional JSON string failed. Default to provided default value.", e); } return defaultValue; }
[ "Read an optional string value form a JSON Object.\n@param json the JSON object to read from.\n@param key the key for the string value in the provided JSON object.\n@param defaultValue the default value, to be returned if the string can not be read from the JSON object.\n@return the string or the default value if r...
[ "Use this API to fetch autoscaleaction resource of given name .", "Check whether vector addition works. This is pure Java code and should work.", "Ask the specified player for the album art in the specified slot with the specified rekordbox ID,\nusing cached media instead if it is available, and possibly giving...
private SortedSet<Date> filterExceptions(SortedSet<Date> dates) { SortedSet<Date> result = new TreeSet<Date>(); for (Date d : dates) { if (!m_exceptions.contains(d)) { result.add(d); } } return result; }
[ "Filters all exceptions from the provided dates.\n@param dates the dates to filter.\n@return the provided dates, except the ones that match some exception." ]
[ "True if deleted, false if not found.", "Use this API to fetch the statistics of all appfwprofile_stats resources that are configured on netscaler.", "Emit a string event with parameters and force all listener to be called synchronously.\n\n@param event\nthe target event\n@param args\nthe arguments passed in\n@...
private boolean absoluteAdvanced(int row) { boolean retval = false; try { if (getRsAndStmt().m_rs != null) { if (row == 0) { getRsAndStmt().m_rs.beforeFirst(); } else { retval = getRsAndStmt().m_rs.absolute(row); } m_current_row = row; setHasCalledCheck(false); } } catch (SQLException e) { advancedJDBCSupport = false; } return retval; }
[ "absolute for advancedJDBCSupport\n@param row" ]
[ "Returns a single sort option configuration as configured via the methods parameter, or null if the parameter does not specify a sort option.\n@param json The JSON sort option configuration.\n@return The sort option configuration, or null if the JSON could not be read.", "Convert gallery name to not found error ...
public synchronized void shutdownTaskScheduler(){ if (scheduler != null && !scheduler.isShutdown()) { scheduler.shutdown(); logger.info("shutdowned the task scheduler. No longer accepting new tasks"); scheduler = null; } }
[ "Shutdown task scheduler." ]
[ "Set the buttons span text.", "Gets a color formatted as an integer with ARGB ordering.\n\n@param json {@link JSONObject} to get the color from\n@param elementName Name of the color element\n@return An ARGB formatted integer\n@throws JSONException", "converts the file URIs with an absent authority to one with a...
public void setGamma(float rGamma, float gGamma, float bGamma) { this.rGamma = rGamma; this.gGamma = gGamma; this.bGamma = bGamma; initialized = false; }
[ "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" ]
[ "Abort an active extern transaction associated with the given PB.", "Retrieve the start slack.\n\n@return start slack", "Use this API to fetch authenticationldappolicy_authenticationvserver_binding resources of given name .", "Replace known tags in the current data values with actual values as appropriate\n\n...
synchronized boolean doReConnect() throws IOException { // In case we are still connected, test the connection and see if we can reuse it if(connectionManager.isConnected()) { try { final Future<Long> result = channelHandler.executeRequest(ManagementPingRequest.INSTANCE, null).getResult(); result.get(15, TimeUnit.SECONDS); // Hmm, perhaps 15 is already too much return true; } catch (Exception e) { ServerLogger.AS_ROOT_LOGGER.debugf(e, "failed to ping the host-controller, going to reconnect"); } // Disconnect - the HC might have closed the connection without us noticing and is asking for a reconnect final Connection connection = connectionManager.getConnection(); StreamUtils.safeClose(connection); if(connection != null) { try { // Wait for the connection to be closed connection.awaitClosed(); } catch (InterruptedException e) { throw new InterruptedIOException(); } } } boolean ok = false; final Connection connection = connectionManager.connect(); try { // Reconnect to the host-controller final ActiveOperation<Boolean, Void> result = channelHandler.executeRequest(new ServerReconnectRequest(), null); try { boolean inSync = result.getResult().get(); ok = true; reconnectRunner = null; return inSync; } catch (ExecutionException e) { throw new IOException(e); } catch (InterruptedException e) { throw new InterruptedIOException(); } } finally { if(!ok) { StreamUtils.safeClose(connection); } } }
[ "Reconnect to the HC.\n\n@return whether the server is still in sync\n@throws IOException" ]
[ "generate a message for loglevel FATAL\n\n@param pObject the message Object", "Retrieve a boolean field.\n\n@param type field type\n@return field data", "Returns a flag represented as a String, indicating if\nthe supplied day is a working day.\n\n@param mpxjCalendar MPXJ ProjectCalendar instance\n@param day Day...
private void readRelationships(net.sf.mpxj.ganttproject.schema.Task gpTask) { for (Depend depend : gpTask.getDepend()) { Task task1 = m_projectFile.getTaskByUniqueID(Integer.valueOf(NumberHelper.getInt(gpTask.getId()) + 1)); Task task2 = m_projectFile.getTaskByUniqueID(Integer.valueOf(NumberHelper.getInt(depend.getId()) + 1)); if (task1 != null && task2 != null) { Duration lag = Duration.getInstance(NumberHelper.getInt(depend.getDifference()), TimeUnit.DAYS); Relation relation = task2.addPredecessor(task1, getRelationType(depend.getType()), lag); m_eventManager.fireRelationReadEvent(relation); } } }
[ "Read the relationships for an individual GanttProject task.\n\n@param gpTask GanttProject task" ]
[ "Use this API to unset the properties of clusterinstance resource.\nProperties that need to be unset are specified in args array.", "Caches the given object using the given Identity as key\n\n@param oid The Identity key\n@param obj The object o cache", "Add image with a exception message in the PDF document.\...
protected ValueContainer[] getKeyValues(PersistenceBroker broker, ClassDescriptor cld, Identity oid) throws PersistenceBrokerException { return broker.serviceBrokerHelper().getKeyValues(cld, oid); }
[ "returns an Array with an Identities PK VALUES\n@throws PersistenceBrokerException if there is an erros accessing o field values" ]
[ "Read a list of sub projects.\n\n@param data byte array\n@param uniqueIDOffset offset of unique ID\n@param filePathOffset offset of file path\n@param fileNameOffset offset of file name\n@param subprojectIndex index of the subproject, used to calculate unique id offset", "Template method responsible for file compr...
@Override public List<JobInstance> getJobs(Query query) { return JqmClientFactory.getClient().getJobs(query); }
[ "Not exposed directly - the Query object passed as parameter actually contains results..." ]
[ "This method returns the actual raw class associated with the specified\ntype.", "A package of the specified class will be scanned and found classes will be added to the set of bean classes for the synthetic bean archive.\n\n@param scanRecursively\n@param packageClass\n@return self", "2-D Complex Gabor function...
public void loadObject(Object object, Set<String> excludedMethods) { m_model.setTableModel(createTableModel(object, excludedMethods)); }
[ "Populate the model with the object's properties.\n\n@param object object whose properties we're displaying\n@param excludedMethods method names to exclude" ]
[ "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...
public static DMatrixSparseCSC diag(double... values ) { int N = values.length; return diag(new DMatrixSparseCSC(N,N,N),values,0,N); }
[ "Returns a diagonal matrix with the specified diagonal elements.\n@param values values of diagonal elements\n@return A diagonal matrix" ]
[ "Invalidate the item in layout\n@param dataIndex data index", "Converts the suggestions from the Solrj format to JSON format.\n\n@param response The SpellCheckResponse object containing the spellcheck results.\n@return The spellcheck suggestions as JSON object or null if something goes wrong.", "Use this API to...
private void processFields(Map<FieldType, String> map, Row row, FieldContainer container) { for (Map.Entry<FieldType, String> entry : map.entrySet()) { FieldType field = entry.getKey(); String name = entry.getValue(); Object value; switch (field.getDataType()) { case INTEGER: { value = row.getInteger(name); break; } case BOOLEAN: { value = Boolean.valueOf(row.getBoolean(name)); break; } case DATE: { value = row.getDate(name); break; } case CURRENCY: case NUMERIC: case PERCENTAGE: { value = row.getDouble(name); break; } case DELAY: case WORK: case DURATION: { value = row.getDuration(name); break; } case RESOURCE_TYPE: { value = RESOURCE_TYPE_MAP.get(row.getString(name)); break; } case TASK_TYPE: { value = TASK_TYPE_MAP.get(row.getString(name)); break; } case CONSTRAINT: { value = CONSTRAINT_TYPE_MAP.get(row.getString(name)); break; } case PRIORITY: { value = PRIORITY_MAP.get(row.getString(name)); break; } case GUID: { value = row.getUUID(name); break; } default: { value = row.getString(name); break; } } container.set(field, value); } }
[ "Generic method to extract Primavera fields and assign to MPXJ fields.\n\n@param map map of MPXJ field types and Primavera field names\n@param row Primavera data container\n@param container MPXJ data contain" ]
[ "create a HashMap form the json properties and add it to the shape\n@param modelJSON\n@param current\n@throws org.json.JSONException", "Creates a Parameter\n\n@param name the name\n@param value the value, or <code>null</code>\n@return a name-value pair representing the arguments", "Awaits at most 5 minutes unt...
private ProjectFile handleZipFile(InputStream stream) throws Exception { File dir = null; try { dir = InputStreamHelper.writeZipStreamToTempDir(stream); ProjectFile result = handleDirectory(dir); if (result != null) { return result; } } finally { FileHelper.deleteQuietly(dir); } return null; }
[ "We have identified that we have a zip file. Extract the contents into\na temporary directory and process.\n\n@param stream schedule data\n@return ProjectFile instance" ]
[ "Use this API to fetch all the nsconfig resources that are configured on netscaler.", "Creates an SslHandler\n\n@param bufferAllocator the buffer allocator\n@return instance of {@code SslHandler}", "Handling out request.\n\n@param message\nthe message\n@throws Fault\nthe fault", "Use this API to fetch authent...
private static String getLogManagerLoggerName(final String name) { return (name.equals(RESOURCE_NAME) ? CommonAttributes.ROOT_LOGGER_NAME : name); }
[ "Returns the logger name that should be used in the log manager.\n\n@param name the name of the logger from the resource\n\n@return the name of the logger" ]
[ "Writes this IIMFile to writer.\n\n@param writer\nwriter to write to\n@throws IOException\nif file can't be written to", "Update the Target Filter of the ImporterService.\nApply the induce modifications on the links of the ImporterService\n\n@param serviceReference", "Ensures that every path starts and ends wit...
public CmsContextMenu getContextMenuForItem(Object itemId) { CmsContextMenu result = null; try { final Item item = m_container.getItem(itemId); Property<?> keyProp = item.getItemProperty(TableProperty.KEY); String key = (String)keyProp.getValue(); if ((null != key) && !key.isEmpty()) { loadAllRemainingLocalizations(); final Map<Locale, String> localesWithEntries = new HashMap<Locale, String>(); for (Locale l : m_localizations.keySet()) { if (l != m_locale) { String value = m_localizations.get(l).getProperty(key); if ((null != value) && !value.isEmpty()) { localesWithEntries.put(l, value); } } } if (!localesWithEntries.isEmpty()) { result = new CmsContextMenu(); ContextMenuItem mainItem = result.addItem( Messages.get().getBundle(UI.getCurrent().getLocale()).key( Messages.GUI_BUNDLE_EDITOR_CONTEXT_COPY_LOCALE_0)); for (final Locale l : localesWithEntries.keySet()) { ContextMenuItem menuItem = mainItem.addItem(l.getDisplayName(UI.getCurrent().getLocale())); menuItem.addItemClickListener(new ContextMenuItemClickListener() { public void contextMenuItemClicked(ContextMenuItemClickEvent event) { item.getItemProperty(TableProperty.TRANSLATION).setValue(localesWithEntries.get(l)); } }); } } } } catch (Exception e) { LOG.error(e.getLocalizedMessage(), e); //TODO: Improve } return result; }
[ "Returns the context menu for the table item.\n@param itemId the table item.\n@return the context menu for the given item." ]
[ "Create a new Date. To the last day.", "Returns an text table containing the matrix of Strings passed in.\nThe first dimension of the matrix should represent the rows, and the\nsecond dimension the columns.", "Use this API to update snmpmanager.", "Get a property as a boolean or throw exception.\n\n@param key...
public void setNodeMetaData(Object key, Object value) { if (key==null) throw new GroovyBugError("Tried to set meta data with null key on "+this+"."); if (metaDataMap == null) { metaDataMap = new ListHashMap(); } Object old = metaDataMap.put(key,value); if (old!=null) throw new GroovyBugError("Tried to overwrite existing meta data "+this+"."); }
[ "Sets the node meta data.\n\n@param key - the meta data key\n@param value - the meta data value\n@throws GroovyBugError if key is null or there is already meta\ndata under that key" ]
[ "Get the Upper triangular factor.\n\n@return U.", "Construct a pretty string documenting progress for this batch plan thus\nfar.\n\n@return pretty string documenting progress", "Configures a text field to look like a filter box for a table.\n\n@param searchBox the text field to configure", "This handler will ...
protected void propagateOnNoPick(GVRPicker picker) { if (mEventOptions.contains(EventOptions.SEND_PICK_EVENTS)) { if (mEventOptions.contains(EventOptions.SEND_TO_LISTENERS)) { getGVRContext().getEventManager().sendEvent(this, IPickEvents.class, "onNoPick", picker); } if (mEventOptions.contains(EventOptions.SEND_TO_SCENE) && (mScene != null)) { getGVRContext().getEventManager().sendEvent(mScene, IPickEvents.class, "onNoPick", picker); } } }
[ "Propagate onNoPick events to listeners\n@param picker GVRPicker which generated the event" ]
[ "Helper method which supports creation of proper error messages.\n\n@param ex An exception to include or <em>null</em>.\n@param message The error message or <em>null</em>.\n@param objectToIdentify The current used object or <em>null</em>.\n@param topLevelClass The object top-level class or <em>null</em>.\n@param re...
private ApplicationReportIndexModel createApplicationReportIndex(GraphContext context, ProjectModel applicationProjectModel) { ApplicationReportIndexService applicationReportIndexService = new ApplicationReportIndexService(context); ApplicationReportIndexModel index = applicationReportIndexService.create(); addAllProjectModels(index, applicationProjectModel); return index; }
[ "Create the index and associate it with all project models in the Application" ]
[ "Adds a path to the request response table with the specified values\n\n@param profileId ID of profile\n@param clientUUID UUID of client\n@param pathId ID of path\n@throws Exception exception", "except for the ones that make the content appear under the system bars.", "Returns a BoxStoragePolicyAssignment infor...
public static int getPrecedence( int type, boolean throwIfInvalid ) { switch( type ) { case LEFT_PARENTHESIS: return 0; case EQUAL: case PLUS_EQUAL: case MINUS_EQUAL: case MULTIPLY_EQUAL: case DIVIDE_EQUAL: case INTDIV_EQUAL: case MOD_EQUAL: case POWER_EQUAL: case LOGICAL_OR_EQUAL: case LOGICAL_AND_EQUAL: case LEFT_SHIFT_EQUAL: case RIGHT_SHIFT_EQUAL: case RIGHT_SHIFT_UNSIGNED_EQUAL: case BITWISE_OR_EQUAL: case BITWISE_AND_EQUAL: case BITWISE_XOR_EQUAL: return 5; case QUESTION: return 10; case LOGICAL_OR: return 15; case LOGICAL_AND: return 20; case BITWISE_OR: case BITWISE_AND: case BITWISE_XOR: return 22; case COMPARE_IDENTICAL: case COMPARE_NOT_IDENTICAL: return 24; case COMPARE_NOT_EQUAL: case COMPARE_EQUAL: case COMPARE_LESS_THAN: case COMPARE_LESS_THAN_EQUAL: case COMPARE_GREATER_THAN: case COMPARE_GREATER_THAN_EQUAL: case COMPARE_TO: case FIND_REGEX: case MATCH_REGEX: case KEYWORD_INSTANCEOF: return 25; case DOT_DOT: case DOT_DOT_DOT: return 30; case LEFT_SHIFT: case RIGHT_SHIFT: case RIGHT_SHIFT_UNSIGNED: return 35; case PLUS: case MINUS: return 40; case MULTIPLY: case DIVIDE: case INTDIV: case MOD: return 45; case NOT: case REGEX_PATTERN: return 50; case SYNTH_CAST: return 55; case PLUS_PLUS: case MINUS_MINUS: case PREFIX_PLUS_PLUS: case PREFIX_MINUS_MINUS: case POSTFIX_PLUS_PLUS: case POSTFIX_MINUS_MINUS: return 65; case PREFIX_PLUS: case PREFIX_MINUS: return 70; case POWER: return 72; case SYNTH_METHOD: case LEFT_SQUARE_BRACKET: return 75; case DOT: case NAVIGATE: return 80; case KEYWORD_NEW: return 85; } if( throwIfInvalid ) { throw new GroovyBugError( "precedence requested for non-operator" ); } return -1; }
[ "Returns the precedence of the specified operator. Non-operator's will\nreceive -1 or a GroovyBugError, depending on your preference." ]
[ "Use this API to update nsspparams.", "Copies from buffer to our internal strBufferIndex, expanding the internal buffer if necessary\n@param offset offset in the buffer to start copying from\n@param length length to copy", "Use this API to fetch nstrafficdomain_binding resources of given names .", "Set sessio...
public ItemRequest<Task> removeProject(String task) { String path = String.format("/tasks/%s/removeProject", task); return new ItemRequest<Task>(this, Task.class, path, "POST"); }
[ "Removes the task from the specified project. The task will still exist\nin the system, but it will not be in the project anymore.\n\nReturns an empty data block.\n\n@param task The task to remove from a project.\n@return Request object" ]
[ "This is a convenience method provided to allow a day to be set\nas working or non-working, by using the day number to\nidentify the required day.\n\n@param day required day\n@param working flag indicating if the day is a working day", "Helper method fro providers to fire hotkey event in a separate thread\n\n@par...
public static nspbr6_stats get(nitro_service service, String name) throws Exception{ nspbr6_stats obj = new nspbr6_stats(); obj.set_name(name); nspbr6_stats response = (nspbr6_stats) obj.stat_resource(service); return response; }
[ "Use this API to fetch statistics of nspbr6_stats resource of given name ." ]
[ "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.", "Use this API to fetch authenticationlocalpolicy_authenticationvserver_binding resources of given name .", "Get a property as a boolean or null.\n\n@param key the pr...
@SuppressWarnings("unchecked") public <T> DistributedFuture<GROUP, T> createFuture(HazeltaskTask<GROUP> task) { DistributedFuture<GROUP, T> future = new DistributedFuture<GROUP, T>(topologyService, task.getGroup(), task.getId()); this.futures.put(task.getId(), (DistributedFuture<GROUP, Serializable>) future); return future; }
[ "It is required that T be Serializable" ]
[ "Check if the right-hand side type may be assigned to the left-hand side\ntype following the Java generics rules.\n@param lhsType the target type\n@param rhsType the value type that should be assigned to the target type\n@return true if rhs is assignable to lhs", "create partitions in the broker\n\n@param topic t...
public CrosstabBuilder setRowStyles(Style headerStyle, Style totalStyle, Style totalHeaderStyle) { crosstab.setRowHeaderStyle(headerStyle); crosstab.setRowTotalheaderStyle(totalHeaderStyle); crosstab.setRowTotalStyle(totalStyle); return this; }
[ "Should be called after all rows have been created\n@param headerStyle\n@param totalStyle\n@param totalHeaderStyle\n@return" ]
[ "Convert to IPv6 EUI-64 section\n\nhttp://standards.ieee.org/develop/regauth/tut/eui64.pdf\n\n@param asMAC if true, this address is considered MAC and the EUI-64 is extended using ff-ff, otherwise this address is considered EUI-48 and extended using ff-fe\nNote that IPv6 treats MAC as EUI-48 and extends MAC to IPv6...
@UiThread protected void expandView() { setExpanded(true); onExpansionToggled(false); if (mParentViewHolderExpandCollapseListener != null) { mParentViewHolderExpandCollapseListener.onParentExpanded(getAdapterPosition()); } }
[ "Triggers expansion of the parent." ]
[ "Convenience wrapper for message parameters\n@param params\n@return", "Use this API to disable vserver of given name.", "Use this API to Shutdown shutdown.", "Lift a Java Func1 to a Scala Function1\n\n@param f the function to lift\n\n@returns the Scala function", "Gets the flags associated with this attribu...
private boolean containsCollectionAndMapsToDifferentTable(CollectionDescriptorDef origCollDef, TableDef origTableDef, ClassDescriptorDef classDef) { if (classDef.getBooleanProperty(PropertyHelper.OJB_PROPERTY_GENERATE_TABLE_INFO, true) && !origTableDef.getName().equals(classDef.getProperty(PropertyHelper.OJB_PROPERTY_TABLE))) { CollectionDescriptorDef curCollDef = classDef.getCollection(origCollDef.getName()); if ((curCollDef != null) && !curCollDef.getBooleanProperty(PropertyHelper.OJB_PROPERTY_IGNORE, false)) { return true; } } return false; }
[ "Checks whether the given class maps to a different table but also has the given collection.\n\n@param origCollDef The original collection to search for\n@param origTableDef The original table\n@param classDef The class descriptor to test\n@return <code>true</code> if the class maps to a different table and ha...
[ "Sleeps if necessary to slow down the caller.\n\n@param eventsSeen Number of events seen since last invocation. Basis for\ndetermining whether its necessary to sleep.", "Handles subscription verification callback from Facebook.\n@param subscription The subscription name.\n@param challenge A challenge that Faceboo...
@SuppressWarnings({"unused", "WeakerAccess"}) public int getInboxMessageUnreadCount(){ synchronized (inboxControllerLock) { if (this.ctInboxController != null) { return ctInboxController.unreadCount(); } else { getConfigLogger().debug(getAccountId(), "Notification Inbox not initialized"); return -1; } } }
[ "Returns the count of total number of unread inbox messages for the user\n@return int - count of all unread messages" ]
[ "Exchange an auth token from the old Authentication API, to an OAuth access token.\n\nCalling this method will delete the auth token used to make the request.\n\n@param authToken\n@throws FlickrException\n@see \"http://www.flickr.com/services/api/flickr.auth.oauth.getAccessToken.html\"", "decides which icon to ap...
public BufferedImage getBufferedImage(int width, int height) { // using the new approach of Java 2D API BufferedImage buf = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB); Graphics2D g2d = (Graphics2D) buf.getGraphics(); g2d.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BILINEAR); g2d.drawImage(image, 0, 0, width, height, null); g2d.dispose(); return (buf); }
[ "Resize and return the image passing the new height and width\n\n@param height\n@param width\n@return" ]
[ "Convert this update description to an update document.\n\n@return an update document with the appropriate $set and $unset documents.", "Ordinary noise function.\n\n@param x X Value.\n@param y Y Value.\n@return", "Registers the resource to the parent deployment resource. The model returned is that of the resour...
public Future<HazeltaskTask<GROUP>> addPendingTaskAsync(HazeltaskTask<GROUP> task) { return pendingTask.putAsync(task.getId(), task); }
[ "Asynchronously put the work into the pending map so we can work on submitting it to the worker\nif we wanted. Could possibly cause duplicate work if we execute the work, then add to the map.\n@param task\n@return" ]
[ "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.", ...
public static void mark(DeploymentUnit unit) { unit = DeploymentUtils.getTopDeploymentUnit(unit); unit.putAttachment(MARKER, Boolean.TRUE); }
[ "Mark the top level deployment as being a JPA deployment. If the deployment is not a top level deployment the parent is\nmarked instead" ]
[ "Use this API to rename a responderpolicy resource.", "Fall-back for types that are not handled by a subclasse's dispatch method.", "Validate that the Unique IDs for the entities in this container are valid for MS Project.\nIf they are not valid, i.e one or more of them are too large, renumber them.", "Retrie...
public static <X> String createTypeId(AnnotatedType<X> annotatedType) { String id = createTypeId(annotatedType.getJavaClass(), annotatedType.getAnnotations(), annotatedType.getMethods(), annotatedType.getFields(), annotatedType.getConstructors()); String hash = hash(id); MetadataLogger.LOG.tracef("Generated AnnotatedType id hash for %s: %s", id, hash); return hash; }
[ "Generates a unique signature for an annotated type. Members without\nannotations are omitted to reduce the length of the signature\n\n@param <X>\n@param annotatedType\n@return hash of a signature for a concrete annotated type" ]
[ "Calculate the value of a CMS option using the Black-Scholes model for the swap rate together with\nthe Hunt-Kennedy convexity adjustment.\n\n@param forwardSwaprate The forward swap rate\n@param volatility Volatility of the log of the swap rate\n@param swapAnnuity The swap annuity\n@param optionMaturity The option ...
public Object getProperty(Object object) { MetaMethod getter = getGetter(); if (getter == null) { if (field != null) return field.getProperty(object); //TODO: create a WriteOnlyException class? throw new GroovyRuntimeException("Cannot read write-only property: " + name); } return getter.invoke(object, MetaClassHelper.EMPTY_ARRAY); }
[ "Get the property of the given object.\n\n@param object which to be got\n@return the property of the given object\n@throws RuntimeException if the property could not be evaluated" ]
[ "Override the thread context ClassLoader with the environment's bean ClassLoader\nif necessary, i.e. if the bean ClassLoader is not equivalent to the thread\ncontext ClassLoader already.\n@param classLoaderToUse the actual ClassLoader to use for the thread context\n@return the original thread context ClassLoader, o...
public static final String printDateTime(Date value) { return (value == null ? null : DATE_FORMAT.get().format(value)); }
[ "Print a date time value.\n\n@param value date time value\n@return string representation" ]
[ "Gets existing config files.\n\n@return the existing config files", "Sets the character translator for all cells in the row.\nIt will also remove any other translator set.\nNothing will happen if the argument is null.\n@param charTranslator translator\n@return this to allow chaining", "This method is called by ...
public static void main(String[] args) throws Exception { Logger logger = Logger.getLogger("MASReader.main"); Properties beastConfigProperties = new Properties(); String beastConfigPropertiesFile = null; if (args.length > 0) { beastConfigPropertiesFile = args[0]; beastConfigProperties.load(new FileInputStream( beastConfigPropertiesFile)); logger.info("Properties file selected -> " + beastConfigPropertiesFile); } else { logger.severe("No properties file found. Set the path of properties file as argument."); throw new BeastException( "No properties file found. Set the path of properties file as argument."); } String loggerConfigPropertiesFile; if (args.length > 1) { Properties loggerConfigProperties = new Properties(); loggerConfigPropertiesFile = args[1]; try { FileInputStream loggerConfigFile = new FileInputStream( loggerConfigPropertiesFile); loggerConfigProperties.load(loggerConfigFile); LogManager.getLogManager().readConfiguration(loggerConfigFile); logger.info("Logging properties configured successfully. Logger config file: " + loggerConfigPropertiesFile); } catch (IOException ex) { logger.warning("WARNING: Could not open configuration file"); logger.warning("WARNING: Logging not configured (console output only)"); } } else { loggerConfigPropertiesFile = null; } MASReader.generateJavaFiles( beastConfigProperties.getProperty("requirementsFolder"), "\"" + beastConfigProperties.getProperty("MASPlatform") + "\"", beastConfigProperties.getProperty("srcTestRootFolder"), beastConfigProperties.getProperty("storiesPackage"), beastConfigProperties.getProperty("caseManagerPackage"), loggerConfigPropertiesFile, beastConfigProperties.getProperty("specificationPhase")); }
[ "Main method to start reading the plain text given by the client\n\n@param args\n, where arg[0] is Beast configuration file (beast.properties)\nand arg[1] is Logger configuration file (logger.properties)\n@throws Exception" ]
[ "Obtain the profile name associated with a profile ID\n\n@param id ID of profile\n@return Name of corresponding profile", "Read data for an individual task from the tables in a PEP file.\n\n@param parent parent task\n@param id task ID\n@return task instance", "Detailed request to track additional data about PUT...
public static <T> ServiceFuture<T> fromResponse(final Observable<ServiceResponse<T>> observable) { final ServiceFuture<T> serviceFuture = new ServiceFuture<>(); serviceFuture.subscription = observable .last() .subscribe(new Action1<ServiceResponse<T>>() { @Override public void call(ServiceResponse<T> t) { serviceFuture.set(t.body()); } }, new Action1<Throwable>() { @Override public void call(Throwable throwable) { serviceFuture.setException(throwable); } }); return serviceFuture; }
[ "Creates a ServiceCall from an observable object.\n\n@param observable the observable to create from\n@param <T> the type of the response\n@return the created ServiceCall" ]
[ "Whether the rows of the given association should be stored in a hash using the single row key column as key or\nnot.", "Used to determine if a particular day of the week is normally\na working day.\n\n@param mpxjCalendar ProjectCalendar instance\n@param day Day instance\n@return boolean flag", "Send a tempo ch...
protected static JRDesignExpression getExpressionFromVariable(JRDesignVariable var){ JRDesignExpression exp = new JRDesignExpression(); exp.setText("$V{" + var.getName() + "}"); exp.setValueClass(var.getValueClass()); return exp; }
[ "Generates an expression from a variable\n@param var The variable from which to generate the expression\n@return A expression that represents the given variable" ]
[ "Use this API to unset the properties of snmpalarm resource.\nProperties that need to be unset are specified in args array.", "Get a list of referrers from a given domain to a photoset.\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 ...
public static final String getUnicodeString(byte[] data, int offset) { int length = getUnicodeStringLengthInBytes(data, offset); return length == 0 ? "" : new String(data, offset, length, CharsetHelper.UTF16LE); }
[ "Reads a string of two byte characters from the input array.\nThis method assumes that the string finishes either at the\nend of the array, or when char zero is encountered.\nThe value starts at the position specified by the offset\nparameter.\n\n@param data byte array of data\n@param offset start point of unicode ...
[ "Convert given value to given target\n\n@param fromValue\nthe value to convert\n@param toType\ntarget target\n@param <T>\ntarget of the result\n@return the value converted to given target\n@throws TypeCastException\nif conversion was not possible", "Returns the bill for the month specified.\n\n@param month for wh...
public OperationTransformerEntry resolveOperationTransformer(final PathAddress address, final String operationName, PlaceholderResolver placeholderResolver) { final Iterator<PathElement> iterator = address.iterator(); final OperationTransformerEntry entry = resolveOperationTransformer(iterator, operationName, placeholderResolver); if(entry != null) { return entry; } // Default is forward unchanged return FORWARD; }
[ "Resolve an operation transformer entry.\n\n@param address the address\n@param operationName the operation name\n@param placeholderResolver a placeholder resolver used to resolve children of a placeholder registration\n@return the transformer entry" ]
[ "Calls the specified Stitch function, and decodes the response into an instance of the specified\ntype. The response will be decoded using the codec registry given.\n\n@param name the name of the Stitch function to call.\n@param args the arguments to pass to the Stitch function.\n@param requestTimeout the number of...
public boolean checkSuffixes(String uri, String[] patterns) { for (String pattern : patterns) { if (pattern.length() > 0) { if (uri.endsWith(pattern)) { return true; } } } return false; }
[ "Check whether the URL end with one of the given suffixes.\n\n@param uri URI\n@param patterns possible suffixes\n@return true when URL ends with one of the suffixes" ]
[ "Send Identify Node message to the controller.\n@param nodeId the nodeId of the node to identify\n@throws SerialInterfaceException when timing out or getting an invalid response.", "This method extracts project properties from a Planner file.\n\n@param project Root node of the Planner file", "Use this API to fe...
public Map<DeckReference, AlbumArt> getLoadedArt() { ensureRunning(); // Make a copy so callers get an immutable snapshot of the current state. return Collections.unmodifiableMap(new HashMap<DeckReference, AlbumArt>(hotCache)); }
[ "Get the art available for all tracks currently loaded in any player, either on the play deck, or in a hot cue.\n\n@return the album art associated with all current players, including for any tracks loaded in their hot cue slots\n\n@throws IllegalStateException if the ArtFinder is not running" ]
[ "Gets the current version of the database schema. This version is taken\nfrom the migration table and represent the latest successful entry.\n\n@return the current schema version", "This method computes the list of unnamed parameters, by filtering the\nlist of raw arguments, stripping out the named parameters.", ...
public final void updateLastCheckTime(final String id, final long lastCheckTime) { final CriteriaBuilder builder = getSession().getCriteriaBuilder(); final CriteriaUpdate<PrintJobStatusExtImpl> update = builder.createCriteriaUpdate(PrintJobStatusExtImpl.class); final Root<PrintJobStatusExtImpl> root = update.from(PrintJobStatusExtImpl.class); update.where(builder.equal(root.get("referenceId"), id)); update.set(root.get("lastCheckTime"), lastCheckTime); getSession().createQuery(update).executeUpdate(); }
[ "Update the lastCheckTime of the given record.\n\n@param id the id\n@param lastCheckTime the new value" ]
[ "Extract data for a single resource.\n\n@param row Synchro resource data", "Places a connection back in the originating partition.\n@param connectionHandle to place back\n@throws SQLException on error", "Get image ID from imageTag on the current agent.\n\n@param imageTag\n@return", "Method handle a change on ...
private TrackSourceSlot findTrackSourceSlot() { TrackSourceSlot result = TRACK_SOURCE_SLOT_MAP.get(packetBytes[41]); if (result == null) { return TrackSourceSlot.UNKNOWN; } return result; }
[ "Determine the enum value corresponding to the track source slot found in the packet.\n\n@return the proper value" ]
[ "read the prefetchInLimit from Config based on OJB.properties", "Initializes the counters for a property to zero if not done yet.\n\n@param usageStatistics\nstatistics object to initialize\n@param property\nthe property to count", "This method extracts project properties from a Phoenix file.\n\n@param phoenixSe...
@SuppressWarnings("unchecked") public static <E> E[] filter(E[] elems, Filter<E> filter) { List<E> filtered = new ArrayList<E>(); for (E elem: elems) { if (filter.accept(elem)) { filtered.add(elem); } } return (filtered.toArray((E[]) Array.newInstance(elems.getClass().getComponentType(), filtered.size()))); }
[ "Applies the given filter to each of the given elems, and returns the\nlist of elems that were accepted. The runtime type of the returned\narray is the same as the passed in array." ]
[ "Returns the last node that appears to be part of the prefix. This will be used to determine the current model\nobject that'll be the most special context instance in the proposal provider.", "Set the on-finish callback.\n\nThe basic {@link GVROnFinish} callback will notify you when the animation\nruns to complet...
private synchronized void finishTransition(final InternalState current, final InternalState next) { internalSetState(getTransitionTask(next), current, next); transition(); }
[ "Finish a state transition from a notification.\n\n@param current\n@param next" ]
[ "Obtains a local date in International Fixed calendar system from the\nera, year-of-era and day-of-year fields.\n\n@param era the International Fixed era, not null\n@param yearOfEra the year-of-era\n@param dayOfYear the day-of-year\n@return the International Fixed local date, not null\n@throws DateTimeException ...
private static List<CmsCategory> getCategories(CmsObject cms, CmsResource resource) { if ((null != resource) && (null != cms)) { try { return CmsCategoryService.getInstance().readResourceCategories(cms, resource); } catch (CmsException e) { LOG.error(e.getLocalizedMessage(), e); } } return new ArrayList<CmsCategory>(0); }
[ "Reads the categories for the given resource.\n\n@param cms the {@link CmsObject} used for reading the categories.\n@param resource the resource for which the categories should be read.\n@return the categories assigned to the given resource." ]
[ "Determine the relevant pieces of configuration which need to be included when processing the domain model.\n\n@param root the resource root\n@param requiredConfigurationHolder the resolution context\n@param serverConfig the server config\n@param extensionRegistry the extension registr...
public void writeTagsToJavaScript(Writer writer) throws IOException { writer.append("function fillTagService(tagService) {\n"); writer.append("\t// (name, isPrime, isPseudo, color), [parent tags]\n"); for (Tag tag : definedTags.values()) { writer.append("\ttagService.registerTag(new Tag("); escapeOrNull(tag.getName(), writer); writer.append(", "); escapeOrNull(tag.getTitle(), writer); writer.append(", ").append("" + tag.isPrime()) .append(", ").append("" + tag.isPseudo()) .append(", "); escapeOrNull(tag.getColor(), writer); writer.append(")").append(", ["); // We only have strings, not references, so we're letting registerTag() getOrCreate() the tag. for (Tag parentTag : tag.getParentTags()) { writer.append("'").append(StringEscapeUtils.escapeEcmaScript(parentTag.getName())).append("',"); } writer.append("]);\n"); } writer.append("}\n"); }
[ "Writes the JavaScript code describing the tags as Tag classes to given writer." ]
[ "Get the collection of the server groups\n\n@return Collection of active server groups", "Establishes a thread that on one second intervals reports the number of remaining WorkBlocks enqueued and the\ntotal number of lines written and reported by consumers", "One of the two main methods in this class. Creates a...
protected Map getParametersMap(ActionInvocation _invocation) { Map map = (Map) _invocation.getStack().findValue(this.parameters); if (map == null) map = new HashMap(); return map; }
[ "Returns the object pointed by the result-type parameter \"parameters\"\n@param _invocation\n@return" ]
[ "Reads data from the SP file.\n\n@return Project File instance", "Prints to a file. If the file does not exist, rewrites the file;\ndoes not append.", "Handles an incoming request message.\nAn incoming request message is a message initiated by a node or the controller.\n@param incomingMessage the incoming mess...
public static String getModuleVersion(final String moduleId) { final int splitter = moduleId.lastIndexOf(':'); if(splitter == -1){ return moduleId; } return moduleId.substring(splitter+1); }
[ "Split a module Id to get the module version\n@param moduleId\n@return String" ]
[ "binds the Identities Primary key values to the statement", "This function interprets the arguments of the main function. By doing\nthis it will set flags for the dump generation. See in the help text for\nmore specific information about the options.\n\n@param args\narray of arguments from the main function.\n@re...
private void updateDevices(DeviceAnnouncement announcement) { firstDeviceTime.compareAndSet(0, System.currentTimeMillis()); devices.put(announcement.getAddress(), announcement); }
[ "Record a device announcement in the devices map, so we know whe saw it.\n\n@param announcement the announcement to be recorded" ]
[ "Use this API to fetch all the cmppolicylabel resources that are configured on netscaler.", "Open the event stream\n\n@return true if successfully opened, false if not", "Returns the data sources belonging to a particular group of data\nsources. Data sources are grouped in record linkage mode, but not\nin dedup...
public static float[] toFloat(int[] array) { float[] n = new float[array.length]; for (int i = 0; i < array.length; i++) { n[i] = (float) array[i]; } return n; }
[ "1-D Integer array to float array.\n\n@param array Integer array.\n@return Float array." ]
[ "Indicates whether or not an event ID is a duplicate.\n\n<p>This method can be overridden by a subclass in order to provide custom de-duping logic.</p>\n\n@param eventID the event ID.\n@return true if the event is a duplicate; otherwise false.", "If the String argument locatorSelectionStrategy is as key ...
public <T extends Widget & Checkable> void clearChecks() { List<T> children = getCheckableChildren(); for (T c : children) { c.setChecked(false); } }
[ "Clears all checked widgets in the group" ]
[ "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 ...
public static void addActionsTo( SourceBuilder code, Set<MergeAction> mergeActions, boolean forBuilder) { SetMultimap<String, String> nounsByVerb = TreeMultimap.create(); mergeActions.forEach(mergeAction -> { if (forBuilder || !mergeAction.builderOnly) { nounsByVerb.put(mergeAction.verb, mergeAction.noun); } }); List<String> verbs = ImmutableList.copyOf(nounsByVerb.keySet()); String lastVerb = getLast(verbs, null); for (String verb : nounsByVerb.keySet()) { code.add(", %s%s", (verbs.size() > 1 && verb.equals(lastVerb)) ? "and " : "", verb); List<String> nouns = ImmutableList.copyOf(nounsByVerb.get(verb)); for (int i = 0; i < nouns.size(); ++i) { String separator = (i == 0) ? "" : (i == nouns.size() - 1) ? " and" : ","; code.add("%s %s", separator, nouns.get(i)); } } }
[ "Emits a sentence fragment combining all the merge actions." ]
[ "Print the class's constructors m", "Check whether the URL end with one of the given suffixes.\n\n@param uri URI\n@param patterns possible suffixes\n@return true when URL ends with one of the suffixes", "Evaluate the criteria and return a boolean result.\n\n@param container field container\n@param promptValues ...
public void close() { if (transac_open) { try { this._cnx.rollback(); } catch (Exception e) { // Ignore. } } for (Statement s : toClose) { closeQuietly(s); } toClose.clear(); closeQuietly(_cnx); _cnx = null; }
[ "Close all JDBC objects related to this connection." ]
[ "Process events in the order as they were received.\n\n<p/>\n\nThe overall time to process the events must be within the bounds of the\ntimeout or an {@link InsufficientOperationalNodesException} will be\nthrown.", "Returns all the retention policies with specified filters.\n@param name a name to filter the reten...
@Override protected void stopInner() { /* * TODO REST-Server Need to handle inflight operations. What happens to * the existing async operations when a channel.close() is issued in * Netty? */ if(this.nettyServerChannel != null) { this.nettyServerChannel.close(); } if(allChannels != null) { allChannels.close().awaitUninterruptibly(); } this.bootstrap.releaseExternalResources(); }
[ "Closes the Netty Channel and releases all resources" ]
[ "Internal method that finds the matching enum for a configured field that has the name argument.\n\n@return The matching enum value or null if blank enum name.\n@throws IllegalArgumentException\nIf the enum name is not known.", "Get the value for a single attribute on an MBean by name.\n@param attributeName the a...
private void processRemarks(GanttDesignerRemark remark) { for (GanttDesignerRemark.Task remarkTask : remark.getTask()) { Integer id = remarkTask.getRow(); Task task = m_projectFile.getTaskByID(id); String notes = task.getNotes(); if (notes.isEmpty()) { notes = remarkTask.getContent(); } else { notes = notes + '\n' + remarkTask.getContent(); } task.setNotes(notes); } }
[ "Read an individual remark type from a Gantt Designer file.\n\n@param remark remark type" ]
[ "Synchronize the required files to a slave HC from the master DC if this is required.\n@param fileRepository the HostFileRepository of the HC.\n@param contentRepository the ContentRepository of the HC.\n@param backup inidcates if this is a DC backup HC.\n@param oldHash the hash of the deployment to be replaced.\n@r...
public static int getId(Context context, String id) { final String defType; if (id.startsWith("R.")) { int dot = id.indexOf('.', 2); defType = id.substring(2, dot); } else { defType = "drawable"; } Log.d(TAG, "getId(): id: %s, extracted type: %s", id, defType); return getId(context, id, defType); }
[ "Parses the resource String id and get back the int res id\n@param context\n@param id String resource id\n@return int resource id" ]
[ "This method creates the flattened POM what is the main task of this plugin.\n\n@param pomFile is the name of the original POM file to read and transform.\n@return the {@link Model} of the flattened POM.\n@throws MojoExecutionException if anything goes wrong (e.g. POM can not be processed).\n@throws MojoFailureExce...
public static <T> List<T> load(ClassLoader classLoader, Class<T> serviceType) { List<T> foundServices = new ArrayList<>(); Iterator<T> iterator = ServiceLoader.load(serviceType, classLoader).iterator(); while (checkHasNextSafely(iterator)) { try { T item = iterator.next(); foundServices.add(item); LOGGER.debug(String.format("Found %s [%s]", serviceType.getSimpleName(), item.toString())); } catch (ServiceConfigurationError e) { LOGGER.trace("Can't find services using Java SPI", e); LOGGER.error(e.getMessage()); } } return foundServices; }
[ "Invoke to find all services for given service type using specified class loader\n\n@param classLoader specified class loader\n@param serviceType given service type\n@return List of found services" ]
[ "First close the connection. Then reply.\n\n@param response\nthe response\n@param error\nthe error\n@param errorMessage\nthe error message\n@param stackTrace\nthe stack trace\n@param statusCode\nthe status code\n@param statusCodeInt\nthe status code int", "Remove the given pair from a given map for obtaining a ne...
public void put(String key, String value) { synchronized (this.cache) { this.cache.put(key, value); } }
[ "Add an entry to the cache.\n@param key key to use.\n@param value access token information to store." ]
[ "Identifies the canonical type of an object heuristically.\n\n@return the canonical type identifier of the object's class\naccording to Jackson's type format (see {@link TypeFactory#constructFromCanonical(String)})", "Locks the bundle file that contains the translation for the provided locale.\n@param l the local...
private List<Versioned<byte[]>> filterExpiredEntries(ByteArray key, List<Versioned<byte[]>> vals) { Iterator<Versioned<byte[]>> valsIterator = vals.iterator(); while(valsIterator.hasNext()) { Versioned<byte[]> val = valsIterator.next(); VectorClock clock = (VectorClock) val.getVersion(); // omit if expired if(clock.getTimestamp() < (time.getMilliseconds() - this.retentionTimeMs)) { valsIterator.remove(); // delete stale value if configured if(deleteExpiredEntries) { getInnerStore().delete(key, clock); } } } return vals; }
[ "Performs the filtering of the expired entries based on retention time.\nOptionally, deletes them also\n\n@param key the key whose value is to be deleted if needed\n@param vals set of values to be filtered out\n@return filtered list of values which are currently valid" ]
[ "Set the map attribute.\n\n@param name the attribute name\n@param attribute the attribute", "Makes a DocumentReaderAndWriter based on the flags the CRFClassifier\nwas constructed with. Will create the flags.readerAndWriter and\ninitialize it with the CRFClassifier's flags.", "Does the bitwise conjunction with ...
public static void pushImage(String imageTag, String username, String password, String host) throws IOException { final AuthConfig authConfig = new AuthConfig(); authConfig.withUsername(username); authConfig.withPassword(password); DockerClient dockerClient = null; try { dockerClient = getDockerClient(host); dockerClient.pushImageCmd(imageTag).withAuthConfig(authConfig).exec(new PushImageResultCallback()).awaitSuccess(); } finally { closeQuietly(dockerClient); } }
[ "Push docker image using the docker java client.\n\n@param imageTag\n@param username\n@param password\n@param host" ]
[ "Opens the jar, wraps any IOException.", "Set the meta data for the photo.\n\nThis method requires authentication with 'write' permission.\n\n@param photoId\nThe photo ID\n@param title\nThe new title\n@param description\nThe new description\n@throws FlickrException", "This method writes extended attribute data ...