query
stringlengths
74
6.1k
positive
sequencelengths
1
1
negative
sequencelengths
9
9
public static int scanright(Color color, int height, int width, int col, PixelsExtractor f, int tolerance) { if (col == width || !PixelTools.colorMatches(color, tolerance, f.apply(new Area(col, 0, 1, height)))) return col; else return scanright(color, height, width, col + 1, f, tolerance); }
[ "Starting with the given column index, will return the first column index\nwhich contains a colour that does not match the given color." ]
[ "Removes trailing and leading whitespace, and also reduces each\nsequence of internal whitespace to a single space.", "Checks the available space and sets max-height to the details field-set.", "The entity instance is not in the session cache\n\nCopied from Loader#instanceNotYetLoaded", "Sets the indirection handler class.\n\n@param indirectionHandlerClass The class for indirection handlers", "Given a BSON document, remove any forbidden fields and return the document. If no changes are\nmade, the original document reference is returned. If changes are made, a cloned copy of the\ndocument with the changes will be returned.\n\n@param document the document from which to remove forbidden fields\n\n@return a BsonDocument without any forbidden fields.", "Sets the maxConnectionAge. Any connections older than this setting will be closed\noff whether it is idle or not. Connections currently in use will not be affected until they\nare returned to the pool.\n\n@param maxConnectionAge the maxConnectionAge to set.\n@param timeUnit the unit of the maxConnectionAge argument.", "Sets the specified many-to-one attribute to the specified value.\n\n@param name name of the attribute\n@param value value of the attribute\n@since 1.9.0", "Returns the configured fields of the current field configuration.\n\n@return the configured fields of the current field configuration", "To be used with AutoText class constants ALIGMENT_LEFT, ALIGMENT_CENTER and ALIGMENT_RIGHT\n@param aligment\n@return" ]
private List<Map<Class<? extends Annotation>, ParameterInfo<?>>> createParametersInfos(Method method) { if (method.getParameterTypes().length <= 2) { return Collections.emptyList(); } List<Map<Class<? extends Annotation>, ParameterInfo<?>>> result = new ArrayList<>(); Type[] parameterTypes = method.getGenericParameterTypes(); Annotation[][] parameterAnnotations = method.getParameterAnnotations(); for (int i = 2; i < parameterAnnotations.length; i++) { Annotation[] annotations = parameterAnnotations[i]; Map<Class<? extends Annotation>, ParameterInfo<?>> paramAnnotations = new IdentityHashMap<>(); for (Annotation annotation : annotations) { Class<? extends Annotation> annotationType = annotation.annotationType(); ParameterInfo<?> parameterInfo; if (PathParam.class.isAssignableFrom(annotationType)) { parameterInfo = ParameterInfo.create(annotation, ParamConvertUtils.createPathParamConverter(parameterTypes[i])); } else if (QueryParam.class.isAssignableFrom(annotationType)) { parameterInfo = ParameterInfo.create(annotation, ParamConvertUtils.createQueryParamConverter(parameterTypes[i])); } else if (HeaderParam.class.isAssignableFrom(annotationType)) { parameterInfo = ParameterInfo.create(annotation, ParamConvertUtils.createHeaderParamConverter(parameterTypes[i])); } else { parameterInfo = ParameterInfo.create(annotation, null); } paramAnnotations.put(annotationType, parameterInfo); } // Must have either @PathParam, @QueryParam or @HeaderParam, but not two or more. int presence = 0; for (Class<? extends Annotation> annotationClass : paramAnnotations.keySet()) { if (SUPPORTED_PARAM_ANNOTATIONS.contains(annotationClass)) { presence++; } } if (presence != 1) { throw new IllegalArgumentException( String.format("Must have exactly one annotation from %s for parameter %d in method %s", SUPPORTED_PARAM_ANNOTATIONS, i, method)); } result.add(Collections.unmodifiableMap(paramAnnotations)); } return Collections.unmodifiableList(result); }
[ "Gathers all parameters' annotations for the given method, starting from the third parameter." ]
[ "Set the enum representing the type of this column.\n\n@param tableType type of table to which this column belongs", "Check that the scope type is allowed by the stereotypes on the bean and\nthe bean type", "Collapse repeated records, using exact string match on the record.\nThis is generally useful for making very verbose logs more readable.\n@return this", "Use this API to fetch aaauser_binding resource of given name .", "Creates a template node for the given templateString and appends it to the given parent node.\n\nTemplates are translated to generator node trees and expressions in templates can be of type IGeneratorNode.\n\n@return the given parent node", "Retrieve an instance of the TaskField class based on the data read from an\nMPX file.\n\n@param value value from an MS Project file\n@return TaskField instance", "returns an Enumeration of PrimaryKey Objects for objects of class DataClass.\nThe Elements returned come from a SELECT ... WHERE Statement\nthat is defined by the fields and their coresponding values of listFields\nand listValues.\nUseful for EJB Finder Methods...\n@param primaryKeyClass the pk class for the searched objects\n@param query the query", "Joins a collection in a string using a delimiter\n@param col Collection\n@param delim Delimiter\n@return String", "Runs the module import script.\n\n@param cms the CMS context to use\n@param module the module for which to run the script" ]
private ResultAction getFailedResultAction(Throwable cause) { if (currentStage == Stage.MODEL || cancelled || isRollbackOnRuntimeFailure() || isRollbackOnly() || (cause != null && !(cause instanceof OperationFailedException))) { return ResultAction.ROLLBACK; } return ResultAction.KEEP; }
[ "Decide whether failure should trigger a rollback.\n\n@param cause\nthe cause of the failure, or {@code null} if failure is not\nthe result of catching a throwable\n@return the result action" ]
[ "Set the dither matrix.\n@param matrix the dither matrix\n@see #getMatrix", "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", "Resets the calendar", "Visits a dependence of the current module.\n\n@param module the qualified name of the dependence.\n@param access the access flag of the dependence among\nACC_TRANSITIVE, ACC_STATIC_PHASE, ACC_SYNTHETIC\nand ACC_MANDATED.\n@param version the module version at compile time or null.", "The amount of time to keep an idle client thread alive\n\n@param threadIdleTime", "Term value.\n\n@param term\nthe term\n@return the string", "Bessel function of the second kind, of order 0.\n\n@param x Value.\n@return Y0 value.", "package scope in order to test the method", "Sets a default style for every element that doesn't have one\n\n@throws JRException" ]
public Optional<URL> getServiceUrl() { Optional<Service> optionalService = client.services().inNamespace(namespace) .list().getItems() .stream() .findFirst(); return optionalService .map(this::createUrlForService) .orElse(Optional.empty()); }
[ "Gets the URL of the first service that have been created during the current session.\n\n@return URL of the first service." ]
[ "Uploads a new file to this folder while reporting the progress to a ProgressListener.\n\n@param fileContent a stream containing the contents of the file to upload.\n@param name the name to give the uploaded file.\n@param fileSize the size of the file used for determining the progress of the upload.\n@param listener a listener for monitoring the upload's progress.\n@return the uploaded file's info.", "Get the value for a particular configuration property\n\n@param name - name of the property\n@return The first value encountered or null", "Sets the top padding character for all cells in the row.\n@param paddingTopChar new padding character, ignored if null\n@return this to allow chaining", "Visits an annotation on a local variable type.\n\n@param typeRef\na reference to the annotated type. The sort of this type\nreference must be {@link TypeReference#LOCAL_VARIABLE\nLOCAL_VARIABLE} or {@link TypeReference#RESOURCE_VARIABLE\nRESOURCE_VARIABLE}. See {@link TypeReference}.\n@param typePath\nthe path to the annotated type argument, wildcard bound, array\nelement type, or static inner type within 'typeRef'. May be\n<tt>null</tt> if the annotation targets 'typeRef' as a whole.\n@param start\nthe fist instructions corresponding to the continuous ranges\nthat make the scope of this local variable (inclusive).\n@param end\nthe last instructions corresponding to the continuous ranges\nthat make the scope of this local variable (exclusive). This\narray must have the same size as the 'start' array.\n@param index\nthe local variable's index in each range. This array must have\nthe same size as the 'start' array.\n@param desc\nthe class descriptor of the annotation class.\n@param visible\n<tt>true</tt> if the annotation is visible at runtime.\n@return a visitor to visit the annotation values, or <tt>null</tt> if\nthis visitor is not interested in visiting this annotation.", "Computes the p=2 norm. If A is a matrix then the induced norm is computed.\n\n@param A Matrix or vector.\n@return The norm.", "Creates an element that represents a single positioned box with no content.\n@return the resulting DOM element", "Update server mapping's host header\n\n@param serverMappingId ID of server mapping\n@param hostHeader value of host header\n@return updated ServerRedirect", "Obtain the profile name associated with a profile ID\n\n@param id ID of profile\n@return Name of corresponding profile", "Register the given mbean with the platform mbean server\n\n@param mbean The mbean to register\n@param name The name to register under" ]
protected long preConnection() throws SQLException{ long statsObtainTime = 0; if (this.pool.poolShuttingDown){ throw new SQLException(this.pool.shutdownStackTrace); } if (this.pool.statisticsEnabled){ statsObtainTime = System.nanoTime(); this.pool.statistics.incrementConnectionsRequested(); } return statsObtainTime; }
[ "Prep for a new connection\n@return if stats are enabled, return the nanoTime when this connection was requested.\n@throws SQLException" ]
[ "Logs an error by sending an error event to all listeners.\n\nError events can be generated by any part of GearVRF,\nfrom any thread. They are always sent to the event receiver\nof the GVRContext.\n\n@param message error message\n@param sender object which had the error\n@see IErrorEvents", "Establish connection to the ChromeCast device", "Creates a new instance with the given key and value.\nMay be used instead of the constructor for convenience reasons.\n\n@param k\nthe key. May be <code>null</code>.\n@param v\nthe value. May be <code>null</code>.\n@return a newly created pair. Never <code>null</code>.\n@since 2.3", "This method returns the value of the product using a Black-Scholes model for the swap rate\nThe model is determined by a discount factor curve and a swap rate volatility.\n\n@param forwardCurve The forward curve on which to value the swap.\n@param swaprateVolatility The Black volatility.\n@return Value of this product", "Given counters of true positives, false positives, and false\nnegatives, prints out precision, recall, and f1 for each key.", "Starts this EventStream and begins long polling the API.\n@throws IllegalStateException if the EventStream is already started.", "Sets the set of property filters based on the given string.\n\n@param filters\ncomma-separates list of property ids, or \"-\" to filter all\nstatements", "Add a Opacity bar to the color wheel.\n\n@param bar The instance of the Opacity bar.", "Imports a file via assimp without post processing.\n\n@param filename the file to import\n@return the loaded scene\n@throws IOException if an error occurs" ]
public static Class<?> getRawType(Type type) { if (type instanceof Class) { return (Class<?>) type; } else if (type instanceof ParameterizedType) { ParameterizedType actualType = (ParameterizedType) type; return getRawType(actualType.getRawType()); } else if (type instanceof GenericArrayType) { GenericArrayType genericArrayType = (GenericArrayType) type; Object rawArrayType = Array.newInstance(getRawType(genericArrayType .getGenericComponentType()), 0); return rawArrayType.getClass(); } else if (type instanceof WildcardType) { WildcardType castedType = (WildcardType) type; return getRawType(castedType.getUpperBounds()[0]); } else { throw new IllegalArgumentException( "Type \'" + type + "\' is not a Class, " + "ParameterizedType, or GenericArrayType. Can't extract class."); } }
[ "This method returns the actual raw class associated with the specified\ntype." ]
[ "Called when the end type is changed.", "Calculate the layout container size along the axis\n@param axis {@link Axis}\n@return size", "calculate and set position to menu items", "Sets the hostname and port to connect to.\n\n@param hostname the host name\n@param port the port\n\n@return the builder", "Fetch the next event from a given stream\n@return the next event\n@throws IOException any io exception that could occur", "Use this API to update tmtrafficaction.", "Sets the replacement var map node specific.\n\n@param replacementVarMapNodeSpecific\nthe replacement var map node specific\n@return the parallel task builder", "Configure properties needed to connect to a Fluo application\n\n@param conf Job configuration\n@param config use {@link FluoConfiguration} to configure programmatically", "Use this API to fetch appfwprofile_xmlvalidationurl_binding resources of given name ." ]
public Integer getGroupIdFromName(String groupName) { return (Integer) sqlService.getFromTable(Constants.GENERIC_ID, Constants.GROUPS_GROUP_NAME, groupName, Constants.DB_TABLE_GROUPS); }
[ "given the groupName, it returns the groupId\n\n@param groupName name of group\n@return ID of group" ]
[ "Sets the replace var map to single target from map.\n\n@param replacementVarMapNodeSpecific\nthe replacement var map node specific\n@param uniformTargetHost\nthe uniform target host\n@return the parallel task builder", "Returns the bill for the month specified.\n\n@param month for which bill to retrieve.\n@param year for which bill to retrieve.\n@return {@link Response}\n\n@throws RequestException if request to transloadit server fails.\n@throws LocalOperationException if something goes wrong while running non-http operations.", "Sets the value for the API's \"sitefilter\" parameter based on the current\nsettings.\n\n@param properties\ncurrent setting of parameters", "Get all field attributes in an unmodifiable Map, or null if no attributes have been added\n\n@return all field attributes, or <code>NULL</code> if none exist", "Returns the number of key-value mappings in this map for the third key.\n\n@param firstKey\nthe first key\n@param secondKey\nthe second key\n@return Returns the number of key-value mappings in this map for the third key.", "Decorates a node with the affected operator, if any.\n\n@param context\n@param tree\n@param operations\n@return", "Read an optional string value form a JSON Object.\n@param json the JSON object to read from.\n@param key the key for the string value in the provided JSON object.\n@param defaultValue the default value, to be returned if the string can not be read from the JSON object.\n@return the string or the default value if reading the string fails.", "Utility method to retrieve the next working date start time, given\na date and time as a starting point.\n\n@param date date and time start point\n@return date and time of next work start", "If you want to stop recorded events from being sent to the server, use this method to set the SDK instance to offline.\nOnce offline, events will be recorded and queued locally but will not be sent to the server until offline is disabled.\nCalling this method again with offline set to false will allow events to be sent to server and the SDK instance will immediately attempt to send events that have been queued while offline.\n\n@param value boolean, true sets the sdk offline, false sets the sdk back online" ]
public static nsspparams get(nitro_service service) throws Exception{ nsspparams obj = new nsspparams(); nsspparams[] response = (nsspparams[])obj.get_resources(service); return response[0]; }
[ "Use this API to fetch all the nsspparams resources that are configured on netscaler." ]
[ "Ends the transition", "Use this API to fetch aaauser_binding resource of given name .", "add converter at given index. The index can be changed during conversion\nif canReorder is true\n\n@param index\n@param converter", "Return a replica of this instance with the quality value of the given MediaType.\n@return the same instance if the given MediaType doesn't have a quality value, or a new one otherwise", "Gets all data set values.\n\n@param dataSet\nIIM record and dataset code (See constants in {@link IIM})\n@return data set value\n@throws SerializationException\nif value can't be deserialized from binary representation", "Whether the address is IPv4-compatible\n\n@see java.net.Inet6Address#isIPv4CompatibleAddress()", "Log a warning for the resource at the provided address and the given attributes. The detail message is a default\n'Attributes are not understood in the target model version and this resource will need to be ignored on the target host.'\n\n@param address where warning occurred\n@param attributes attributes we are warning about", "Apply filter to an image.\n\n@param source FastBitmap", "Calculated the numeraire relative value of an underlying swap leg.\n\n@param model The Monte Carlo model.\n@param legSchedule The schedule of the leg.\n@param paysFloat If true a floating rate is payed.\n@param swaprate The swaprate. May be 0.0 for pure floating leg.\n@param notional The notional.\n@return The sum of the numeraire relative cash flows.\n@throws CalculationException Thrown if underlying model failed to calculate stochastic process." ]
protected final void setParentNode(final DiffNode parentNode) { if (this.parentNode != null && this.parentNode != parentNode) { throw new IllegalStateException("The parent of a node cannot be changed, once it's set."); } this.parentNode = parentNode; }
[ "Sets the parent node.\n\n@param parentNode The parent of this node. May be null, if this is a root node." ]
[ "Find the logging profile attached to any resource.\n\n@param resourceRoot the root resource\n\n@return the logging profile name or {@code null} if one was not found", "Use this API to fetch all the lbvserver resources that are configured on netscaler.", "Use this API to update clusterinstance resources.", "Add a custom query parameter to the _changes request. Useful for specifying extra parameters\nto a filter function for example.\n\n@param name the name of the query parameter\n@param value the value of the query parameter\n@return this Changes instance\n@since 2.5.0", "Log table contents.\n\n@param label label text\n@param klass reader class name\n@param map table data", "Retrieves a vertex attribute as an integer array.\nThe attribute name must be one of the\nattributes named in the descriptor passed to the constructor.\n@param attributeName name of the attribute to update\n@throws IllegalArgumentException if attribute name not in descriptor vertex attribute is not <i>int</i>\n@see #setIntVec(String, IntBuffer)\n@see #getIntArray(String)", "Answer the search class.\nThis is the class of the example object or\nthe class represented by Identity.\n@return Class", "Feeds input stream to data consumer using metadata from tar entry.\n@param consumer the consumer\n@param inputStream the stream to feed\n@param entry the entry to use for metadata\n@throws IOException on consume error", "The entity instance is not in the session cache\n\nCopied from Loader#instanceNotYetLoaded" ]
public void init(final MultivaluedMap<String, String> queryParameters) { final String scopeCompileParam = queryParameters.getFirst(ServerAPI.SCOPE_COMPILE_PARAM); if(scopeCompileParam != null){ this.scopeComp = Boolean.valueOf(scopeCompileParam); } final String scopeProvidedParam = queryParameters.getFirst(ServerAPI.SCOPE_PROVIDED_PARAM); if(scopeProvidedParam != null){ this.scopePro = Boolean.valueOf(scopeProvidedParam); } final String scopeRuntimeParam = queryParameters.getFirst(ServerAPI.SCOPE_RUNTIME_PARAM); if(scopeRuntimeParam != null){ this.scopeRun = Boolean.valueOf(scopeRuntimeParam); } final String scopeTestParam = queryParameters.getFirst(ServerAPI.SCOPE_TEST_PARAM); if(scopeTestParam != null){ this.scopeTest = Boolean.valueOf(scopeTestParam); } }
[ "The parameter must never be null\n\n@param queryParameters" ]
[ "Calculate a shift value that can be used to create a power-of-two value between\nthe specified maximum and minimum values.\n@param minimumValue the minimum value\n@param maximumValue the maximum value\n@return the calculated shift (use {@code 1 << shift} to obtain a value)", "Notifies that a content item is changed.\n\n@param position the position.", "Return the area polygon as the only feature in the feature collection.\n\n@param mapAttributes the attributes that this aoi is part of.", "Use this API to export sslfipskey resources.", "The specified interface must not contain methods, that changes the state of this object itself.\n\n@param code\nsource code of an interface which describes how to generate the <i>immutable</i>\n@param settings\nsettings to generate code\n@return generated source code as string in a result wrapper", "Retrieve the fixed data offset for a specific field.\n\n@param type field type\n@return offset", "Load in a number of database configuration entries from a buffered reader.", "Active inverter colors", "Processes one item document. This is often the main workhorse that\ngathers the data you are interested in. You can modify this code as you\nwish." ]
public void setBundleActivator(String bundleActivator) { String old = mainAttributes.get(BUNDLE_ACTIVATOR); if (!bundleActivator.equals(old)) { this.mainAttributes.put(BUNDLE_ACTIVATOR, bundleActivator); this.modified = true; this.bundleActivator = bundleActivator; } }
[ "Set the main attribute \"Bundle-Activator\" to the given value.\n\n@param bundleActivator The new value" ]
[ "Here we specify the configuration, starting from default MostUsefulConfiguration, and changing only what is needed", "Build all children.\n\n@return the child descriptions", "Move the animation frame counter forward.\n\n@return boolean specifying if animation should continue or if loopCount has been fulfilled.", "Set the value for a custom request\n\n@param pathId ID of path\n@param customRequest value of custom request\n@param clientUUID UUID of client", "Parse a currency symbol position value.\n\n@param value currency symbol position\n@return CurrencySymbolPosition instance", "Replace the last element of an address with a static path element.\n\n@param element the path element\n@return the operation address transformer", "Computes the p=1 norm. If A is a matrix then the induced norm is computed.\n\n@param A Matrix or vector.\n@return The norm.", "Returns a reasonable timeout duration for a watch request.\n\n@param expectedTimeoutMillis timeout duration that a user wants to use, in milliseconds\n@param bufferMillis buffer duration which needs to be added, in milliseconds\n@return timeout duration in milliseconds, between the specified {@code bufferMillis} and\nthe {@link #MAX_MILLIS}.", "Retrieves and validates the content type from the REST requests\n\n@return true if has content type." ]
private String commaSeparate(Collection<String> strings) { StringBuilder buffer = new StringBuilder(); Iterator<String> iterator = strings.iterator(); while (iterator.hasNext()) { String string = iterator.next(); buffer.append(string); if (iterator.hasNext()) { buffer.append(", "); } } return buffer.toString(); }
[ "Takes a list of Strings and combines them into a single comma-separated\nString.\n@param strings The Strings to combine.\n@return The combined, comma-separated, String." ]
[ "This method is called to format a constraint type.\n\n@param type constraint type\n@return formatted constraint type", "Use this API to fetch the statistics of all cmppolicylabel_stats resources that are configured on netscaler.", "Adds a new step to the list of steps.\n\n@param name Name of the step to add.\n@param robot The name of the robot ot use with the step.\n@param options extra options required for the step.", "Checks if class is on class path\n@param className of the class to check.\n@return true if class in on class path, false otherwise.", "Get the list of build numbers that are to be kept forever.", "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", "Set the custom projection matrix with individual matrix elements.", "Boyer Moore scan that proceeds backwards from the end of the file looking for endsig\n\n@param file the file being checked\n@param channel the channel\n@param context the scan context\n@return\n@throws IOException", "Set default values for annotations.\nInitial annotation take precedence over the default annotation when both annotation types are present\n\n@param defaultAnnotations default value for annotations" ]
private void logOriginalResponseHistory( PluginResponse httpServletResponse, History history) throws URIException { RequestInformation requestInfo = requestInformation.get(); if (requestInfo.handle && requestInfo.client.getIsActive()) { logger.info("Storing original response history"); history.setOriginalResponseHeaders(HttpUtilities.getHeaders(httpServletResponse)); history.setOriginalResponseCode(Integer.toString(httpServletResponse.getStatus())); history.setOriginalResponseContentType(httpServletResponse.getContentType()); history.setOriginalResponseData(httpServletResponse.getContentString()); logger.info("Done storing"); } }
[ "Log original response\n\n@param httpServletResponse\n@param history\n@throws URIException" ]
[ "Want to make arbitrary probability queries? Then this is the method for\nyou. Given the filename, it reads it in and breaks it into documents, and\nthen makes a CRFCliqueTree for each document. you can then ask the clique\ntree for marginals and conditional probabilities of almost anything you\nwant.", "Apply the matching client UUID for the request\n\n@param httpServletRequest\n@param history", "Merge two maps of configuration properties. If the original contains a mapping for the same key, the new mapping is ignored.\n\n@param original\n@param toMerge", "Post a license to the server\n\n@param license\n@param user\n@param password\n@throws GrapesCommunicationException\n@throws javax.naming.AuthenticationException", "Loads the configuration XML from the given string.\n@since 1.3", "Use this API to fetch all the nslimitselector resources that are configured on netscaler.", "This function computes which reduce task to shuffle a record to.", "Add an empty work week.\n\n@return new work week", "Sets the max min.\n\n@param n the new max min" ]
public static int getDayAsReadableInt(long time) { Calendar cal = calendarThreadLocal.get(); cal.setTimeInMillis(time); return getDayAsReadableInt(cal); }
[ "Readable yyyyMMdd int representation of a day, which is also sortable." ]
[ "Utility function that fetches all stores on a node.\n\n@param adminClient An instance of AdminClient points to given cluster\n@param nodeId Node id to fetch stores from\n@return List of all store names", "Returns the value of a property of the current object on the specified level.\n\n@param attributes The attributes of the tag\n@return The property value\n@exception XDocletException If an error occurs\[email protected] type=\"content\"\[email protected] name=\"level\" optional=\"false\" description=\"The level for the current object\"\nvalues=\"class,field,reference,collection\"\[email protected] name=\"name\" optional=\"false\" description=\"The name of the property\"\[email protected] name=\"default\" optional=\"true\" description=\"A default value to use if the property\nis not defined\"", "Read the version number.\n\n@param is input stream", "Copy new data to an existing float-point texture.\n\nCreating a new {@link GVRFloatImage} is pretty cheap, but it's still\nnot a totally trivial operation: it does involve some memory management\nand some GL hardware handshaking. Reusing the texture reduces this\noverhead (primarily by delaying garbage collection). Do be aware that\nupdating a texture will affect any and all {@linkplain GVRMaterial\nmaterials} (and/or post effects that use the texture!\n\n@param width\nTexture width, in pixels\n@param height\nTexture height, in pixels\n@param data\nA linear array of float pairs.\n@return {@code true} if the updateGPU succeeded, and {@code false} if it\nfailed. Updating a texture requires that the new data parameter\nhas the exact same {@code width} and {@code height} and pixel\nformat as the original data.\n@throws IllegalArgumentException\nIf {@code width} or {@code height} is {@literal <= 0,} or if\n{@code data} is {@code null}, or if\n{@code data.length < height * width * 2}", "Returns the export format indicated in the result-type parameter \"layoutManager\"\n@param _invocation\n@return", "Should the URI be cached?\n\n@param requestUri request URI\n@return true when caching is needed", "Microsoft Project bases the order of tasks displayed on their ID\nvalue. This method takes the hierarchical structure of tasks\nrepresented in MPXJ and renumbers the ID values to ensure that\nthis structure is displayed as expected in Microsoft Project. This\nis typically used to deal with the case where a hierarchical task\nstructure has been created programmatically in MPXJ.", "Traces the time taken just by the fat client inside Coordinator to\nprocess this request\n\n\n@param operationType\n@param OriginTimeInMs - Original request time in Http Request\n@param RequestStartTimeInMs - Time recorded just before fat client\nstarted processing\n@param ResponseReceivedTimeInMs - Time when Response was received from\nfat client\n@param keyString - Hex denotation of the key(s)\n@param numVectorClockEntries - represents the sum of entries size of all\nvector clocks received in response. Size of a single vector clock\nrepresents the number of entries(nodes) in the vector", "Send a device update to all registered update listeners.\n\n@param update the device update that has just arrived" ]
public static List<String> getLayersDigests(String manifestContent) throws IOException { List<String> dockerLayersDependencies = new ArrayList<String>(); JsonNode manifest = Utils.mapper().readTree(manifestContent); JsonNode schemaVersion = manifest.get("schemaVersion"); if (schemaVersion == null) { throw new IllegalStateException("Could not find 'schemaVersion' in manifest"); } boolean isSchemeVersion1 = schemaVersion.asInt() == 1; JsonNode fsLayers = getFsLayers(manifest, isSchemeVersion1); for (JsonNode fsLayer : fsLayers) { JsonNode blobSum = getBlobSum(isSchemeVersion1, fsLayer); dockerLayersDependencies.add(blobSum.asText()); } dockerLayersDependencies.add(getConfigDigest(manifestContent)); //Add manifest sha1 String manifestSha1 = Hashing.sha1().hashString(manifestContent, Charsets.UTF_8).toString(); dockerLayersDependencies.add("sha1:" + manifestSha1); return dockerLayersDependencies; }
[ "Get a list of layer digests from docker manifest.\n\n@param manifestContent\n@return\n@throws IOException" ]
[ "Create a Collection Proxy for a given query.\n\n@param brokerKey The key of the persistence broker\n@param query The query\n@param collectionClass The class to build the proxy for\n@return The collection proxy", "Write the patch.xml\n\n@param rollbackPatch the patch\n@param file the target file\n@throws IOException", "Output method that sends a subscription confirmation for the subscriber to avoid DoS attacks, or false subscription.\n\n@param sr\n@return True case the subscription was confirmed, or False otherwise\n@throws org.ow2.chameleon.fuchsia.push.base.hub.exception.SubscriptionOriginVerificationException", "Resolves the gav using the resolver. If the gav corresponds to the project artifact and is an unresolved version\nfor a RELEASE or LATEST, the gav is resolved such it a release not newer than the project version is found that\noptionally corresponds to the provided version regex, if provided.\n\n<p>If the gav exactly matches the current project, the file of the artifact is found on the filesystem in\ntarget directory and the resolver is ignored.\n\n@param project the project to restrict by, if applicable\n@param gav the gav to resolve\n@param versionRegex the optional regex the version must match to be considered.\n@param resolver the version resolver to use\n@return the resolved artifact matching the criteria.\n@throws VersionRangeResolutionException on error\n@throws ArtifactResolutionException on error", "Updates the terms and statements of the current document.\nThe updates are computed with respect to the current data in the document,\nmaking sure that no redundant deletions or duplicate insertions\nhappen. The references of duplicate statements will be merged. The labels\nand aliases in a given language are kept distinct.\n\n@param currentDocument\nthe document to be updated; needs to have a correct revision id and\nentity id\n@param addLabels\nlabels to be set on the item. They will overwrite existing values\nin the same language.\n@param addDescriptions\ndescription to be set on the item. They will overwrite existing values\nin the same language.\n@param addAliases\naliases to be added. Existing aliases will be kept.\n@param deleteAliases\naliases to be deleted.\n@param addStatements\nthe list of statements to be added or updated; statements with\nempty statement id will be added; statements with non-empty\nstatement id will be updated (if such a statement exists)\n@param deleteStatements\nthe list of statements to be deleted; statements will only be\ndeleted if they are present in the current document (in\nexactly the same form, with the same id)\n@param summary\nshort edit summary\n@return the updated document\n@throws MediaWikiApiErrorException\nif the API returns errors\n@throws IOException\nif there are any IO errors, such as missing network connection", "Function to perform the forward pass for batch convolution", "Configure properties needed to connect to a Fluo application\n\n@param conf Job configuration\n@param config use {@link FluoConfiguration} to configure programmatically", "Gets the date time str.\n\n@param d\nthe d\n@return the date time str", "Retrieves the amount of work on a given day, and\nreturns it in the specified format.\n\n@param date target date\n@param format required format\n@return work duration" ]
public static String createCustomExpressionInvocationText(CustomExpression customExpression, String customExpName, boolean usePreviousFieldValues) { String stringExpression; if (customExpression instanceof DJSimpleExpression) { DJSimpleExpression varexp = (DJSimpleExpression) customExpression; String symbol; switch (varexp.getType()) { case DJSimpleExpression.TYPE_FIELD: symbol = "F"; break; case DJSimpleExpression.TYPE_VARIABLE: symbol = "V"; break; case DJSimpleExpression.TYPE_PARAMATER: symbol = "P"; break; default: throw new DJException("Invalid DJSimpleExpression, type must be FIELD, VARIABLE or PARAMETER"); } stringExpression = "$" + symbol + "{" + varexp.getVariableName() + "}"; } else { String fieldsMap = "((" + DJDefaultScriptlet.class.getName() + ")$P{REPORT_SCRIPTLET}).getCurrentFields()"; if (usePreviousFieldValues) { fieldsMap = "((" + DJDefaultScriptlet.class.getName() + ")$P{REPORT_SCRIPTLET}).getPreviousFields()"; } String parametersMap = "((" + DJDefaultScriptlet.class.getName() + ")$P{REPORT_SCRIPTLET}).getCurrentParams()"; String variablesMap = "((" + DJDefaultScriptlet.class.getName() + ")$P{REPORT_SCRIPTLET}).getCurrentVariables()"; stringExpression = "((" + CustomExpression.class.getName() + ")$P{REPORT_PARAMETERS_MAP}.get(\"" + customExpName + "\"))." + CustomExpression.EVAL_METHOD_NAME + "( " + fieldsMap + ", " + variablesMap + ", " + parametersMap + " )"; } return stringExpression; }
[ "If you register a CustomExpression with the name \"customExpName\", then this will create the text needed\nto invoke it in a JRDesignExpression\n\n@param customExpName\n@param usePreviousFieldValues\n@return" ]
[ "Returns script view\n\n@param model\n@return\n@throws Exception", "This method retrieves the offset of a given entry in the Var2Data block.\nEach entry can be uniquely located by the identifier of the object to\nwhich the data belongs, and the type of the data.\n\n@param id unique identifier of an entity\n@param type data type identifier\n@return offset of requested item", "Get image ID from imageTag on the current agent.\n\n@param imageTag\n@return", "Searches all descendant folders using a given query and query parameters.\n@param offset is the starting position.\n@param limit the maximum number of items to return. The default is 30 and the maximum is 200.\n@param bsp containing query and advanced search capabilities.\n@return a PartialCollection containing the search results.", "Simple, high-level API to enable or disable eye picking for this scene\nobject.\n\nThe {@linkplain #attachCollider low-level\nAPI} gives you a lot of control over eye picking, but it does involve an\nawful lot of details. This method\n(and {@link #getPickingEnabled()}) provides a simple boolean property.\nIt attaches a GVRSphereCollider to the scene object. If you want more\naccurate picking, you can use {@link #attachComponent(GVRComponent)} to attach a\nmesh collider instead. The mesh collider is more accurate but also\ncosts more to compute.\n\n@param enabled\nShould eye picking 'see' this scene object?\n\n@since 2.0.2\n@see GVRSphereCollider\n@see GVRMeshCollider", "Adds a perspective camera constructed from the designated\nperspective camera to describe the shadow projection.\nThis type of camera is used for shadows generated by spot lights.\n@param centerCam GVRPerspectiveCamera to derive shadow projection from\n@param coneAngle spot light cone angle\n@return Perspective camera to use for shadow casting\n@see GVRSpotLight", "get an AdminClient from the cache if exists, if not create new one\nand return it. This method is non-blocking.\n\nAll AdminClient returned from checkout, once after the completion of\nusage must be returned to the pool by calling checkin. If not,\nthere will be leak of AdminClients (connections, threads and file handles).\n\n@return AdminClient", "Must be called with pathEntries lock taken", "Returns the address for the operation.\n\n@param op the operation\n\n@return the operation address or a new undefined model node" ]
public RandomVariable[] getGradient(){ // for now let us take the case for output-dimension equal to one! int numberOfVariables = getNumberOfVariablesInList(); int numberOfCalculationSteps = factory.getNumberOfEntriesInList(); RandomVariable[] omega_hat = new RandomVariable[numberOfCalculationSteps]; // first entry gets initialized omega_hat[numberOfCalculationSteps-1] = new RandomVariableFromDoubleArray(1.0); /* * TODO: Find way that calculations form here on are not 'recorded' by the factory * IDEA: Let the calculation below run on {@link RandomVariableFromDoubleArray}, ie cast everything down! * */ for(int functionIndex = numberOfCalculationSteps - 2; functionIndex > 0; functionIndex--){ // apply chain rule omega_hat[functionIndex] = new RandomVariableFromDoubleArray(0.0); /*TODO: save all D_{i,j}*\omega_j in vector and sum up later */ for(RandomVariableUniqueVariable parent:parentsVariables){ int variableIndex = parent.getVariableID(); omega_hat[functionIndex] = omega_hat[functionIndex].add(getPartialDerivative(functionIndex, variableIndex).mult(omega_hat[variableIndex])); } } /* Due to the fact that we can still introduce 'new' true variables on the fly they are NOT the last couple of indices! * Thus save the indices of the true variables and recover them after finalizing all the calculations * IDEA: quit calculation after minimal true variable index is reached */ RandomVariable[] gradient = new RandomVariable[numberOfVariables]; /* TODO: sort array in correct manner! */ int[] indicesOfVariables = getIDsOfVariablesInList(); for(int i = 0; i < numberOfVariables; i++){ gradient[i] = omega_hat[numberOfCalculationSteps - numberOfVariables + indicesOfVariables[i]]; } return gradient; }
[ "Apply the AAD algorithm to this very variable\n\nNOTE: in this case it is indeed correct to assume that the output dimension is \"one\"\nmeaning that there is only one {@link RandomVariableUniqueVariable} as an output.\n\n@return gradient for the built up function" ]
[ "Record the checkout wait time in us\n\n@param dest Destination of the socket to checkout. Will actually record\nif null. Otherwise will call this on self and corresponding child\nwith this param null.\n@param checkoutTimeUs The number of us to wait before getting a socket", "Get the items for the key.\n\n@param key\n@return the items for the given key", "remove drag support from the given Component.\n@param c the Component to remove", "Checks the id value.\n\n@param fieldDef The field descriptor\n@param checkLevel The current check level (this constraint is checked in basic and strict)\n@exception ConstraintException If the constraint has been violated", "List the slack values for each task.\n\n@param file ProjectFile instance", "If status is in failed state then throw CloudException.", "URLEncode a string\n@param s\n@return", "Test to determine if this is a split task.\n\n@param calendar current calendar\n@param list timephased resource assignment list\n@return boolean flag", "Loads the asset referenced by the file name\nunder the owner of this component.\nIf this component was constructed to replace the scene with\nthe asset, the main scene of the current context\nwill contain only the owner of this\ncomponent upon return. Otherwise, the loaded asset is a\nchild of this component's owner.\n\nLoading the asset is performed in a separate thread.\nThis function returns before the asset has finished loading.\nIAssetEvents are emitted to the input event handler and\nto any event listener on the context.\n\n@param handler\nIAssetEvents handler to process asset loading events" ]
private static int resolveDomainTimeoutAdder() { String propValue = WildFlySecurityManager.getPropertyPrivileged(DOMAIN_TEST_SYSTEM_PROPERTY, DEFAULT_DOMAIN_TIMEOUT_STRING); if (sysPropDomainValue == null || !sysPropDomainValue.equals(propValue)) { // First call or the system property changed sysPropDomainValue = propValue; int number = -1; try { number = Integer.valueOf(sysPropDomainValue); } catch (NumberFormatException nfe) { // ignored } if (number > 0) { defaultDomainValue = number; // this one is in ms } else { ControllerLogger.MGMT_OP_LOGGER.invalidDefaultBlockingTimeout(sysPropDomainValue, DOMAIN_TEST_SYSTEM_PROPERTY, DEFAULT_DOMAIN_TIMEOUT_ADDER); defaultDomainValue = DEFAULT_DOMAIN_TIMEOUT_ADDER; } } return defaultDomainValue; }
[ "Allows testsuites to shorten the domain timeout adder" ]
[ "Used to ensure that the general footer label will be at the same Y position as the variables in the band.\n@param band\n@return", "Create the index file that sets up the frameset.\n@param outputDirectory The target directory for the generated file(s).", "Internal used method to retrieve object based on Identity.\n\n@param id\n@return\n@throws PersistenceBrokerException", "Close the open stream.\n\nClose the stream if it was opened before", "Insert a value into the right bucket of the histogram. If the value is\nlarger than any bound, insert into the last bucket. If the value is less\nthan zero, then ignore it.\n\n@param data The value to insert into the histogram", "Write a list of custom field attributes.", "Checks the given reference descriptor.\n\n@param refDef The reference descriptor\n@param checkLevel The amount of checks to perform\n@exception ConstraintException If a constraint has been violated", "Adds all rows from the file specified, using the provided parser.\n\n@param file File to read the data from.\n@param fileParser Parser to be used to parse the file.\n@return {@code this}", "The transaction will be executed. While it is running, any semantic state change\nin the given resource will be ignored and the cache will not be cleared." ]
private void addJoinInfo(JoinType type, String localColumnName, String joinedColumnName, QueryBuilder<?, ?> joinedQueryBuilder, JoinWhereOperation operation) throws SQLException { JoinInfo joinInfo = new JoinInfo(type, joinedQueryBuilder, operation); if (localColumnName == null) { matchJoinedFields(joinInfo, joinedQueryBuilder); } else { matchJoinedFieldsByName(joinInfo, localColumnName, joinedColumnName, joinedQueryBuilder); } if (joinList == null) { joinList = new ArrayList<JoinInfo>(); } joinList.add(joinInfo); }
[ "Add join info to the query. This can be called multiple times to join with more than one table." ]
[ "Emit an enum event with parameters supplied.\n\nThis will invoke all {@link SimpleEventListener} bound to the specific\nenum value and all {@link SimpleEventListener} bound to the enum class\ngiven the listeners has the matching argument list.\n\nFor example, given the following enum definition:\n\n```java\npublic enum UserActivity {LOGIN, LOGOUT}\n```\n\nWe have the following simple event listener methods:\n\n```java\n{@literal @}OnEvent\npublic void handleUserActivity(UserActivity, User user) {...}\n\n{@literal @}OnUserActivity(UserActivity.LOGIN)\npublic void logUserLogin(User user, long timestamp) {...}\n\n{@literal @}OnUserActivity(UserActivity.LOGOUT)\npublic void logUserLogout(User user) {...}\n```\n\nThe following code will invoke `logUserLogin` method:\n\n```java\nUser user = ...;\neventBus.emit(UserActivity.LOGIN, user, System.currentTimeMills());\n```\n\nThe `handleUserActivity` is not invoked because\n\n* The method parameter `(UserActivity, User, long)` does not match the declared argument list `(UserActivity, User)`\n\nWhile the following code will invoke both `handleUserActivity` and `logUserLogout` methods:\n\n```java\nUser user = ...;\neventBus.emit(UserActivity.LOGOUT, user);\n```\n\nThe `logUserLogin` method will not be invoked because\n\n1. the method is bound to `UserActivity.LOGIN` enum value specifically, while `LOGOUT` is triggered\n2. the method has a `long timestamp` in the argument list and it is not passed to `eventBus.emit`\n\n@param event\nthe target event\n@param args\nthe arguments passed in\n@see SimpleEventListener", "Checks if the provided module is valid and could be stored into the database\n\n@param module the module to test\n@throws WebApplicationException if the data is corrupted", "sorts are a bit more awkward and need a helper...", "Calculate the value of a CMS strike using the Black-Scholes model for the swap rate together with\nthe Hunt-Kennedy convexity adjustment.\n\n@param forwardSwaprate The forward swap rate\n@param volatility Volatility of the log of the swap rate\n@param swapAnnuity The swap annuity\n@param optionMaturity The option maturity\n@param swapMaturity The swap maturity\n@param payoffUnit The payoff unit, e.g., the discount factor corresponding to the payment date\n@param optionStrike The option strike\n@return Value of the CMS strike", "OR operation which takes 2 arguments and OR's them together.\n\n<p>\n<b>NOTE:</b> There is no guarantee of the order of the clauses that are generated in the final query.\n</p>\n<p>\n<b>NOTE:</b> I can't remove the generics code warning that can be associated with this method. You can instead\nuse the {@link #or(int)} method.\n</p>", "Get a collection of methods declared on this object by method name and parameter count.\n\n@param name the name of the method\n@param paramCount the number of parameters\n@return the (possibly empty) collection of methods with the given name and parameter count", "Read hints from a file and merge with the given hints map.", "Main entry point. Reads a directory containing a P3 Btrieve database files\nand returns a map of table names and table content.\n\n@param directory directory containing the database\n@param prefix file name prefix used to identify files from the same database\n@return Map of table names to table data", "Returns the value of the sum of discounted cash flows of the bond where\nthe discounting is done with the given reference curve and an additional spread.\nThis method can be used for optimizer.\n\n@param evaluationTime The evaluation time as double. Cash flows prior and including this time are not considered.\n@param referenceCurve The reference curve used for discounting the coupon payments.\n@param spread The spread which should be added to the discount curve.\n@param model The model under which the product is valued.\n@return The value of the bond for the given curve and spread." ]
public static MediaType nonBinary( MediaType.Type type, String subType, Charset charSet ) { ApiUtil.notNull( charSet, "charset must not be null" ); return new MediaType( type, subType, charSet ); }
[ "Creates a non-binary media type with the given type, subtype, and charSet\n@throws com.tngtech.jgiven.exception.JGivenWrongUsageException if any of the given arguments is {@code null}" ]
[ "List app dynos for an app\n\n@param appName See {@link #listApps} for a list of apps that can be used.", "Sets the set of site filters based on the given string.\n\n@param filters\ncomma-separates list of site keys, or \"-\" to filter all site\nlinks", "Adds a license to an artifact if the license exist into the database\n\n@param gavc String\n@param licenseId String", "Adds a directory to the collection of module paths.\n\n@param moduleDir the module directory to add\n\n@throws java.lang.IllegalArgumentException if the path is {@code null}", "Read correlation id.\n\n@param message the message\n@return correlation id from the message", "Fill the buffer of the specified range with a given value\n@param offset\n@param length\n@param value", "This method retrieves all security permissions contained within the specified node.\n\n@param context the {@link OperationContext} used to resolve the permission attributes.\n@param node the {@link ModelNode} that might contain security permissions metadata.\n@return a {@link List} containing the retrieved permissions. They are wrapped as {@link PermissionFactory} instances.\n@throws OperationFailedException if an error occurs while retrieving the security permissions.", "Creates the event type.\n\n@param type the EventEnumType\n@return the event type", "Compute Cholesky decomposition of A\n\n@param A symmetric, positive definite matrix (only upper half is used)\n@return upper triangular matrix U such that A = U' * U" ]
public static final Double getDouble(InputStream is) throws IOException { double result = Double.longBitsToDouble(getLong(is)); if (Double.isNaN(result)) { result = 0; } return Double.valueOf(result); }
[ "Retrieve a Double from an input stream.\n\n@param is input stream\n@return Double instance" ]
[ "Use this API to fetch appfwpolicy_csvserver_binding resources of given name .", "Classify stdin by documents seperated by 3 blank line\n@param readerWriter\n@return boolean reached end of IO\n@throws IOException", "Changes the volume of an existing sound.\n@param volume volume value. Should range from 0 (mute) to 1 (max)", "Execute a set of API calls as batch request.\n@param requests list of api requests that has to be executed in batch.\n@return list of BoxAPIResponses", "Initialization method.\n\n@param t1\n@param t2", "Add the buildInfo to step variables if missing and set its cps script.\n\n@param cpsScript the cps script\n@param stepVariables step variables map\n@return the build info", "Merges a specialized archetype with its parent. Merge will be done in-place on the specialized parameter.\n\n@param flatParent Flat parent archetype\n@param specialized Specialized archetype", "Use this API to fetch wisite_binding resources of given names .", "Add a task to the project.\n\n@return new task instance" ]
public static ServiceController<String> addService(final ServiceName name, final String path, boolean possiblyAbsolute, final String relativeTo, final ServiceTarget serviceTarget) { if (possiblyAbsolute && isAbsoluteUnixOrWindowsPath(path)) { return AbsolutePathService.addService(name, path, serviceTarget); } RelativePathService service = new RelativePathService(path); ServiceBuilder<String> builder = serviceTarget.addService(name, service) .addDependency(pathNameOf(relativeTo), String.class, service.injectedPath); ServiceController<String> svc = builder.install(); return svc; }
[ "Installs a path service.\n\n@param name the name to use for the service\n@param path the relative portion of the path\n@param possiblyAbsolute {@code true} if {@code path} may be an {@link #isAbsoluteUnixOrWindowsPath(String) absolute path}\nand should be {@link AbsolutePathService installed as such} if it is, with any\n{@code relativeTo} parameter ignored\n@param relativeTo the name of the path that {@code path} may be relative to\n@param serviceTarget the {@link ServiceTarget} to use to install the service\n@return the ServiceController for the path service" ]
[ "required for rest assured base URI configuration.", "Set new point coordinates somewhere on screen and apply new direction\n\n@param position the point position to apply new values to", "Use this API to fetch wisite_binding resources of given names .", "Build a request URL using a given scheme.\n\n@param scheme the scheme, either {@code http} or {@code https}\n@param host\nThe host\n@param port\nThe port\n@param path\nThe path\n@param parameters\nThe parameters\n@return The URL\n@throws MalformedURLException", "Get the bar size.\n\n@param settings Parameters for rendering the scalebar.", "Performs case-sensitive depth-first search for a child object and then\nremoves it if found.\n\n@param name name of scene object to be removed.\n\n@return true if child was found (and removed), else false", "Returns a new instance of the given class using the constructor with the specified parameter.\n\n@param target The class to instantiate\n@param type The types of the single parameter of the constructor\n@param arg The argument\n@return The instance", "Support the range subscript operator for CharSequence with IntRange\n\n@param text a CharSequence\n@param range an IntRange\n@return the subsequence CharSequence\n@since 1.0", "Executed read-resource-description and returns access-control info.\nReturns null in case there was any kind of problem.\n\n@param client\n@param address\n@return" ]
public static base_response unset(nitro_service client, sslocspresponder resource, String[] args) throws Exception{ sslocspresponder unsetresource = new sslocspresponder(); unsetresource.name = resource.name; unsetresource.insertclientcert = resource.insertclientcert; return unsetresource.unset_resource(client,args); }
[ "Use this API to unset the properties of sslocspresponder resource.\nProperties that need to be unset are specified in args array." ]
[ "Closes the HTTP client and recycles the resources associated. The threads will\nbe recycled after 60 seconds of inactivity.", "This method permanently removes a webhook. Note that it may be possible\nto receive a request that was already in flight after deleting the\nwebhook, but no further requests will be issued.\n\n@param webhook The webhook to delete.\n@return Request object", "Use this API to delete snmpmanager.", "Cancel the pause operation", "Parses command-line and synchronizes metadata versions across all\nnodes.\n\n@param args Command-line input\n@param printHelp Tells whether to print help only or execute command\nactually\n@throws IOException", "Return true only if the specified object responds to the named method\n@param object - the object to check\n@param methodName - the name of the method\n@return true if the object responds to the named method", "Alternate version of autoGeneratedKeys.\n@param sql\n@param autoGeneratedKeys\n@return cache key to use.", "Updates the information about this collaboration with any info fields that have been modified locally.\n\n@param info the updated info.", "Function to perform forward activation" ]
public static void closeThrowSqlException(Closeable closeable, String label) throws SQLException { if (closeable != null) { try { closeable.close(); } catch (IOException e) { throw SqlExceptionUtil.create("could not close " + label, e); } } }
[ "Close it and ignore any exceptions." ]
[ "Checks that index is valid an throw an exception if not.\n\n@param type the type\n@param index the index to check", "Determine the consistency level of a key\n\n@param versionNodeSetMap A map that maps version to set of PrefixNodes\n@param replicationFactor Total replication factor for the set of clusters\n@return ConsistencyLevel Enum", "Initialize the fat client for the given store.\n\n1. Updates the coordinatorMetadata 2.Gets the new store configs from the\nconfig file 3.Creates a new @SocketStoreClientFactory 4. Subsequently\ncaches the @StoreClient obtained from the factory.\n\n\nThis is synchronized because if Coordinator Admin is already doing some\nchange we want the AsyncMetadataVersionManager to wait.\n\n@param storeName", "Get the default providers list to be used.\n\n@return the default provider list and ordering, not null.", "Merge this ExecutionStatistics with all the statistics created within the child threads. All the child threads had to be created using Windup-specific\nThreadFactory in order to contain a reference to the parent thread.", "Notification that boot has completed successfully and the configuration history should be updated", "Pick arbitrary wrapping method. No generics should be set.\n@param builder", "Returns status message.\n\n@param user CmsUser\n@param disabled boolean\n@param newUser boolean\n@return String", "Create a Css Selector Transform" ]
@Nullable public final Credentials toCredentials(final AuthScope authscope) { try { if (!matches(MatchInfo.fromAuthScope(authscope))) { return null; } } catch (UnknownHostException | MalformedURLException | SocketException e) { throw new RuntimeException(e); } if (this.username == null) { return null; } final String passwordString; if (this.password != null) { passwordString = new String(this.password); } else { passwordString = null; } return new UsernamePasswordCredentials(this.username, passwordString); }
[ "Check if this applies to the provided authorization scope and return the credentials for that scope or\nnull if it doesn't apply to the scope.\n\n@param authscope the scope to test against." ]
[ "Create an `AppDescriptor` with appName and entry class specified.\n\nIf `appName` is `null` or blank, it will try the following\napproach to get app name:\n\n1. check the {@link Version#getArtifactId() artifact id} and use it unless\n2. if artifact id is null or empty, then infer app name using {@link AppNameInferer}\n\n@param appName\nthe app name\n@param entryClass\nthe entry class\n@return\nan `AppDescriptor` instance", "Remove a tag from a photo.\n\nThis method requires authentication with 'write' permission.\n\n@param tagId\nThe tag ID\n@throws FlickrException", "parse when there are two date-times", "True if deleted, false if not found.", "Returns the compact representations of all of the dependents of a task.\n\n@param task The task to get dependents on.\n@return Request object", "Add a new PropertyChangeListener to this node for a specific property.\nThis functionality has\nbeen borrowed from the java.beans package, though this class has\nnothing to do with a bean", "Get list of asynchronous operations on this node. By default, only the\npending operations are returned.\n\n@param showCompleted Show completed operations\n@return A list of operation ids.", "Parse rate.\n\n@param value rate value\n@return Rate instance", "Use this API to login into Netscaler.\n@param username Username\n@param password Password for the Netscaler.\n@param timeout timeout for netscaler session.Default is 1800secs\n@return status of the operation performed.\n@throws Exception nitro exception is thrown." ]
static Artifact resolveConstrained(MavenProject project, String gav, Pattern versionRegex, ArtifactResolver resolver) throws VersionRangeResolutionException, ArtifactResolutionException { boolean latest = gav.endsWith(":LATEST"); if (latest || gav.endsWith(":RELEASE")) { Artifact a = new DefaultArtifact(gav); if (latest) { versionRegex = versionRegex == null ? ANY : versionRegex; } else { versionRegex = versionRegex == null ? ANY_NON_SNAPSHOT : versionRegex; } String upTo = project.getGroupId().equals(a.getGroupId()) && project.getArtifactId().equals(a.getArtifactId()) ? project.getVersion() : null; return resolver.resolveNewestMatching(gav, upTo, versionRegex, latest, latest); } else { String projectGav = getProjectArtifactCoordinates(project, null); Artifact ret = null; if (projectGav.equals(gav)) { ret = findProjectArtifact(project); } return ret == null ? resolver.resolveArtifact(gav) : ret; } }
[ "Resolves the gav using the resolver. If the gav corresponds to the project artifact and is an unresolved version\nfor a RELEASE or LATEST, the gav is resolved such it a release not newer than the project version is found that\noptionally corresponds to the provided version regex, if provided.\n\n<p>If the gav exactly matches the current project, the file of the artifact is found on the filesystem in\ntarget directory and the resolver is ignored.\n\n@param project the project to restrict by, if applicable\n@param gav the gav to resolve\n@param versionRegex the optional regex the version must match to be considered.\n@param resolver the version resolver to use\n@return the resolved artifact matching the criteria.\n@throws VersionRangeResolutionException on error\n@throws ArtifactResolutionException on error" ]
[ "Operators which affect the variables to its left and right", "Take a stab at fixing validation problems ?\n\n@param object", "Create the grid feature type.\n\n@param mapContext the map context containing the information about the map the grid will be\nadded to.\n@param geomClass the geometry type", "Computes the householder vector used in QR decomposition.\n\nu = x / max(x)\nu(0) = u(0) + |u|\nu = u / u(0)\n\n@param x Input vector. Unmodified.\n@return The found householder reflector vector", "Adds a free connection.\n\n@param connectionHandle\n@throws SQLException on error", "Recursively write tasks.\n\n@param tasks list of tasks\n@throws IOException", "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 milliseconds the client should wait for a response from the\nserver before failing with an error.\n@param resultClass the class that the Stitch response should be decoded as.\n@param <T> the type into which the Stitch response will be decoded.\n@param codecRegistry the codec registry that will be used to encode/decode the function call.\n@return the decoded value.", "Validates this string is a valid address, and if not, throws an exception with a descriptive message indicating why it is not.\n@throws AddressStringException", "Set the pattern scheme to either \"by weekday\" or \"by day of month\".\n@param isByWeekDay flag, indicating if the pattern \"by weekday\" should be set.\n@param fireChange flag, indicating if a value change event should be fired." ]
public void setEnterpriseDate(int index, Date value) { set(selectField(AssignmentFieldLists.ENTERPRISE_DATE, index), value); }
[ "Set an enterprise date value.\n\n@param index date index (1-30)\n@param value date value" ]
[ "Validate the Combination filter field in Multi configuration jobs", "Sets the right padding character for all cells in the row.\n@param paddingRightChar new padding character, ignored if null\n@return this to allow chaining", "apply the base fields to other views if configured to do so.", "return a generic Statement for the given ClassDescriptor", "Executed read-resource-description and returns access-control info.\nReturns null in case there was any kind of problem.\n\n@param client\n@param address\n@return", "Record operation for sync ops time\n\n@param dest Destination of the socket to connect to. Will actually record\nif null. Otherwise will call this on self and corresponding child\nwith this param null.\n@param opTimeUs The number of us for the op to finish", "Handles a complete record at a time, stores it in a form ready for\nfurther processing.\n\n@param record record to be processed\n@return flag indicating if this is the last record in the file to be processed\n@throws MPXJException", "Analyzes the source code of an interface. The specified interface must not contain methods, that changes the\nstate of the corresponding object itself.\n\n@param code\nsource code of an interface which describes how to generate the <i>immutable</i>\n@return analysis result", "Mbeans for SLOP_UPDATE" ]
private void recordRollbackLoader(final String patchId, PatchableTarget.TargetInfo target) { // setup the content loader paths final DirectoryStructure structure = target.getDirectoryStructure(); final InstalledImage image = structure.getInstalledImage(); final File historyDir = image.getPatchHistoryDir(patchId); final File miscRoot = new File(historyDir, PatchContentLoader.MISC); final File modulesRoot = structure.getModulePatchDirectory(patchId); final File bundlesRoot = structure.getBundlesPatchDirectory(patchId); final PatchContentLoader loader = PatchContentLoader.create(miscRoot, bundlesRoot, modulesRoot); // recordContentLoader(patchId, loader); }
[ "Add a rollback loader for a give patch.\n\n@param patchId the patch id.\n@param target the patchable target\n@throws XMLStreamException\n@throws IOException" ]
[ "The main entry point for processing graphical indicator definitions.\n\n@param indicators graphical indicators container\n@param properties project properties\n@param props properties data", "Resolves the configuration.\n\n@param config The specified configuration.\n@return The resolved configuration.", "Joins the given parts to recover the original secret.\n\n<p><b>N.B.:</b> There is no way to determine whether or not the returned value is actually the\noriginal secret. If the parts are incorrect, or are under the threshold value used to split the\nsecret, a random value will be returned.\n\n@param parts a map of part IDs to part values\n@return the original secret\n@throws IllegalArgumentException if {@code parts} is empty or contains values of varying\nlengths", "Detect what has changed in the store definition and rewire BDB\nenvironments accordingly.\n\n@param storeDef updated store definition", "Unzip a file or a folder\n@param zipFile\n@param unzippedFolder optional, if null the file/folder will be extracted in the same folder as zipFile\n@return", "Sets the time to wait when close connection watch threads are enabled. 0 = wait forever.\n@param closeConnectionWatchTimeout the watchTimeout to set\n@param timeUnit Time granularity", "Removes the specified object in index from the array.\n\n@param index The index to remove.", "Init the headers of the table regarding the filters\n\n@return String[]", "Adds a new point.\n\n@param point a point\n@return this for chaining" ]
@UiThread private int getFlatParentPosition(int parentPosition) { int parentCount = 0; int listItemCount = mFlatItemList.size(); for (int i = 0; i < listItemCount; i++) { if (mFlatItemList.get(i).isParent()) { parentCount++; if (parentCount > parentPosition) { return i; } } } return INVALID_FLAT_POSITION; }
[ "Gets the index of a ExpandableWrapper within the helper item list based on\nthe index of the ExpandableWrapper.\n\n@param parentPosition The index of the parent in the list of parents\n@return The index of the parent in the merged list of children and parents" ]
[ "Make a list value containing the specified values.", "Return the first header value for the given header name, if any.\n@param headerName the header name\n@return the first header value, or {@code null} if none", "Set the String-representation of size.\n\nLike: Square, Thumbnail, Small, Medium, Large, Original.\n\n@param label", "Calculate start dates for a monthly absolute recurrence.\n\n@param calendar current date\n@param frequency frequency\n@param dates array of start dates", "Sets a header per-request\n\n@param key Header key\n@param value Header value\n@return The request itself", "Infer the type of and create a new output variable using the results from the right side of the equation.\nIf the type is already known just return that.", "Total count of partition-stores moved in this task.\n\n@return number of partition stores moved in this task.", "You can register styles object for later reference them directly. Parent\nstyles should be registered this way\n\n@param style\n@return\n@throws DJBuilderException", "Set the attributes for this template.\n\n@param attributes the attribute map" ]
public HashSet<String> getDataById(String id) throws IOException { if (idToVersion.containsKey(id)) { return get(id); } else { return null; } }
[ "Gets the data by id.\n\n@param id the id\n@return the data by id\n@throws IOException Signals that an I/O exception has occurred." ]
[ "Splits switch in specialStateTransition containing more than maxCasesPerSwitch\ncases into several methods each containing maximum of maxCasesPerSwitch cases\nor less.\n@since 2.9", "Delete all enabled overrides for a client\n\n@param profileId profile ID of teh client\n@param client_uuid UUID of teh client", "This method extracts resource data from a Phoenix file.\n\n@param phoenixProject parent node for resources", "Detects if the current browser is a Sony Mylo device.\n@return detection of a Sony Mylo device", "Build a String representation of given arguments.", "This method is called to format a rate.\n\n@param value rate value\n@return formatted rate", "Returns the deployment names with the specified runtime names at the specified deploymentRootAddress.\n\n@param deploymentRootResource\n@param runtimeNames\n@return the deployment names with the specified runtime names at the specified deploymentRootAddress.", "Read the tag structure from the provided stream.", "This method converts a node to text.\n\nLeading and trailing text from hidden tokens (whitespace/comments) is removed. Text from hidden tokens that is\nsurrounded by text from non-hidden tokens is summarized to a single whitespace.\n\nThe preferred use case of this method is to convert the {@link ICompositeNode} that has been created for a data\ntype rule to text.\n\nThis is also the recommended way to convert a node to text if you want to invoke\n{@link org.eclipse.xtext.conversion.IValueConverterService#toValue(String, String, INode)}" ]
public static boolean check(String passwd, String hashed) { try { String[] parts = hashed.split("\\$"); if (parts.length != 5 || !parts[1].equals("s0")) { throw new IllegalArgumentException("Invalid hashed value"); } long params = Long.parseLong(parts[2], 16); byte[] salt = decode(parts[3].toCharArray()); byte[] derived0 = decode(parts[4].toCharArray()); int N = (int) Math.pow(2, params >> 16 & 0xffff); int r = (int) params >> 8 & 0xff; int p = (int) params & 0xff; byte[] derived1 = SCrypt.scrypt(passwd.getBytes("UTF-8"), salt, N, r, p, 32); if (derived0.length != derived1.length) return false; int result = 0; for (int i = 0; i < derived0.length; i++) { result |= derived0[i] ^ derived1[i]; } return result == 0; } catch (UnsupportedEncodingException e) { throw new IllegalStateException("JVM doesn't support UTF-8?"); } catch (GeneralSecurityException e) { throw new IllegalStateException("JVM doesn't support SHA1PRNG or HMAC_SHA256?"); } }
[ "Compare the supplied plaintext password to a hashed password.\n\n@param passwd Plaintext password.\n@param hashed scrypt hashed password.\n\n@return true if passwd matches hashed value." ]
[ "Creates a random symmetric matrix whose values are selected from an uniform distribution\nfrom min to max, inclusive.\n\n@param length Width and height of the matrix.\n@param min Minimum value an element can have.\n@param max Maximum value an element can have.\n@param rand Random number generator.\n@return A symmetric matrix.", "compare between two points.", "Resolves the configuration.\n\n@param config The specified configuration.\n@return The resolved configuration.", "Record a prepared operation.\n\n@param identity the server identity\n@param prepared the prepared operation", "Tries to guess location of the user secure keyring using various\nheuristics.\n\n@return path to the keyring file\n@throws FileNotFoundException if no keyring file found", "Parses the buffer into body content\n@param in ByteBuffer to parse\n@return a ByteBuffer with the parsed body content. Buffer in may not be depleted. If more data is\nneeded, null is returned. In the case of content complete, an empty ByteBuffer is returned.\n@throws BaseExceptions.ParserException", "Confirms that both clusters have the same number of total partitions.\n\n@param lhs\n@param rhs", "Validates a String to be a valid name to be used in MongoDB for a collection name.\n\n@param collectionName", "Creates the container for a bundle without descriptor.\n@return the container for a bundle without descriptor.\n@throws IOException thrown if reading the bundle fails.\n@throws CmsException thrown if reading the bundle fails." ]
private void handleChange(Object propertyId) { if (!m_saveBtn.isEnabled()) { m_saveBtn.setEnabled(true); m_saveExitBtn.setEnabled(true); } m_model.handleChange(propertyId); }
[ "Handle a value change.\n@param propertyId the column in which the value has changed." ]
[ "Set a knot type.\n@param n the knot index\n@param type the type\n@see #getKnotType", "Painter the tile, by building a URL where the image can be found.\n\n@param tile\nMust be an instance of {@link InternalTile}, and must have a non-null {@link RasterUrlBuilder}.\n@return Returns a {@link InternalTile}.", "Return a product descriptor for a specific strike.\n\n@param referenceDate The reference date (translating the maturity floating point date to dates.\n@param index The index corresponding to the strike grid.\n@return a product descriptor for a specific strike.\n@throws ArrayIndexOutOfBoundsException Thrown if index is out of bound.", "Notifies that multiple header items are inserted.\n\n@param positionStart the position.\n@param itemCount the item count.", "Returns a copy of this year-quarter with the new year and quarter, checking\nto see if a new object is in fact required.\n\n@param newYear the year to represent, validated from MIN_YEAR to MAX_YEAR\n@param newQuarter the quarter-of-year to represent, validated not null\n@return the year-quarter, not null", "ChromeCast does not allow you to jump levels too quickly to avoid blowing speakers.\nSetting by increment allows us to easily get the level we want\n\n@param level volume level from 0 to 1 to set\n@throws IOException\n@see <a href=\"https://developers.google.com/cast/docs/design_checklist/sender#sender-control-volume\">sender</a>", "Convert an Object to a Time.", "Searches for commas in the set of tokens. Used for inputs to functions.\n\nIgnore comma's which are inside a [ ] block\n\n@return List of output tokens between the commas", "This method is called to alert project listeners to the fact that\na task has been written to a project file.\n\n@param task task instance" ]
static PatchingTask createTask(final PatchingTasks.ContentTaskDefinition definition, final PatchContentProvider provider, final IdentityPatchContext.PatchEntry context) { final PatchContentLoader contentLoader = provider.getLoader(definition.getTarget().getPatchId()); final PatchingTaskDescription description = PatchingTaskDescription.create(definition, contentLoader); return PatchingTask.Factory.create(description, context); }
[ "Create the patching task based on the definition.\n\n@param definition the task description\n@param provider the content provider\n@param context the task context\n@return the created task" ]
[ "2-D Perlin noise function.\n\n@param x X Value.\n@param y Y Value.\n@return Returns function's value at point xy.", "Ask the specified player for the specified waveform detail from the specified media slot, first checking if we\nhave a cached copy.\n\n@param dataReference uniquely identifies the desired waveform detail\n\n@return the waveform detail, if it was found, or {@code null}\n\n@throws IllegalStateException if the WaveformFinder is not running", "remove files from directory. All-or-nothing operation - if any of the files fails to be removed, all deleted files are restored.\n\nThe operation is performed in two steps - first all the files are moved to a backup folder, and afterwards backup folder is removed.\nIf an error occurs in the first step of the operation, all files are restored and the operation ends with status {@code false}.\nIf an error occurs in the second step, the operation ends with status {@code false}, but the files are not rolled back.\n\n@throws IOException if an error occurred", "Method generates abbreviated exception message.\n\n@param message\nOriginal log message\n@param throwable\nThe attached throwable\n@return Abbreviated exception message", "Read the set of property files. Keys and Values are automatically validated and converted.\n\n@param resourceLoader\n@return all the properties from the weld.properties file", "Checks if ranges contain the uid\n\n@param idRanges the id ranges\n@param uid the uid\n@return true, if ranges contain given uid", "Set the individual dates where the event should take place.\n@param dates the dates to set.", "Process normal calendar working and non-working days.\n\n@param calendar parent calendar", "Gets the value of the callout property.\n\n<p>\nThis accessor method returns a reference to the live list,\nnot a snapshot. Therefore any modification you make to the\nreturned list will be present inside the JAXB object.\nThis is why there is not a <CODE>set</CODE> method for the callout property.\n\n<p>\nFor example, to add a new item, do as follows:\n<pre>\ngetCallout().add(newItem);\n</pre>\n\n\n<p>\nObjects of the following type(s) are allowed in the list\n{@link Callouts.Callout }" ]
public static Span exact(CharSequence row) { Objects.requireNonNull(row); return exact(Bytes.of(row)); }
[ "Creates a Span that covers an exact row. String parameters will be encoded as UTF-8" ]
[ "Determines the java.sql.Types constant value from an OJB\nFIELDDESCRIPTOR value.\n\n@param type The FIELDDESCRIPTOR which JDBC type is to be determined.\n\n@return int the int value representing the Type according to\n\n@throws SQLException if the type is not a valid jdbc type.\njava.sql.Types", "Pads the given String to the left with the given character to ensure that\nit's at least totalChars long.", "Remove a named object", "Read an element which contains only a single list attribute of a given\ntype, returning it as an array.\n@param reader the reader\n@param attributeName the attribute name, usually \"value\"\n@param type the value type class\n@param <T> the value type\n@return the value list as an array\n@throws javax.xml.stream.XMLStreamException if an error occurs or if the\nelement does not contain the specified attribute, contains other\nattributes, or contains child elements.", "Is the given resource type id free?\n@param id to be checked\n@return boolean", "Set the role info for this user. If set, this will be used to set the user's authorizations.\n\n@param roles the roles\n@since 1.10.0", "Convenience method to convert a CSV string list to a set. Note that this\nwill suppress duplicates.\n\n@param str the input String\n@return a Set of String entries in the list", "Reads a single resource from a ConceptDraw PROJECT file.\n\n@param resource ConceptDraw PROJECT resource", "Gets the attributes provided by the processor.\n\n@return the attributes" ]
private static Originator mapOriginatorType(OriginatorType originatorType) { Originator originator = new Originator(); if (originatorType != null) { originator.setCustomId(originatorType.getCustomId()); originator.setHostname(originatorType.getHostname()); originator.setIp(originatorType.getIp()); originator.setProcessId(originatorType.getProcessId()); originator.setPrincipal(originatorType.getPrincipal()); } return originator; }
[ "Map originator type.\n\n@param originatorType the originator type\n@return the originator" ]
[ "Facade method for operating the Unix-like terminal supporting line editing and command\nhistory.\n\n@param prompt Prompt to be displayed\n@param appName The app name string\n@param mainHandler Main command handler\n@param input Input stream.\n@param output Output stream.\n@return Shell that can be either further customized or run directly by calling commandLoop().", "Run a task periodically and indefinitely.\n\n@param task\nTask to run.\n@param delay\nThe first execution will happen in {@code delay} seconds.\n@param period\nSubsequent executions will happen every {@code period} seconds\nafter the first.\n@return An interface that lets you query the status; cancel; or\nreschedule the event.", "Add a resource assignment which has been populated elsewhere.\n\n@param assignment resource assignment", "Creates a Bytes object by copying the value of the given String with a given charset", "Parses an adl source into a differential archetype.\n\n@param adl contents of an adl source file\n@return parsed archetype\n@throws org.openehr.adl.parser.AdlParserException if an error occurred while parsing", "Assigns this retention policy to a metadata template, optionally with certain field values.\n@param templateID the ID of the metadata template to apply to.\n@param fieldFilters optional field value filters.\n@return info about the created assignment.", "Allows to access the names of the current defined roundings.\n\n@param providers the providers and ordering to be used. By default providers and ordering as defined in\n#getDefaultProviders is used.\n@return the set of custom rounding ids, never {@code null}.", "Creates a color item that represents a color field found for a track based on a dbserver message.\n\n@param menuItem the rendered menu item containing the color metadata field\n\n@return the color metadata field", "prevent too many refreshes happening one after the other." ]
public static sslcipher get(nitro_service service, String ciphergroupname) throws Exception{ sslcipher obj = new sslcipher(); obj.set_ciphergroupname(ciphergroupname); sslcipher response = (sslcipher) obj.get_resource(service); return response; }
[ "Use this API to fetch sslcipher resource of given name ." ]
[ "This method retrieves a byte array containing the data at the\ngiven index in the block. If no data is found at the given index\nthis method returns null.\n\n@param index index of the data item to be retrieved\n@return byte array containing the requested data", "Inserts the currently contained data objects into the database.\n\n@param platform The (connected) database platform for inserting data\n@param model The database model\n@param batchSize The batch size; use 1 for not using batch mode", "Handle a start time change.\n\n@param event the change event", "Returns the value of the primitive type from the given string value.\n\n@param value the value to parse\n@param cls the primitive type class\n@return the boxed type value or {@code null} if the given class is not a primitive type", "Checks the preconditions for creating a new IsIncludedIn processor with a Set of Objects.\n\n@param possibleValues\nthe Set of possible values\n@throws NullPointerException\nif possibleValues is null\n@throws IllegalArgumentException\nif possibleValues is empty", "We have obtained a waveform preview for a device, so store it and alert any listeners.\n\n@param update the update which caused us to retrieve this waveform preview\n@param preview the waveform preview which we retrieved", "Searches for pairs of parentheses and processes blocks inside of them. Embedded parentheses are handled\nwith no problem. On output only a single token should be in tokens.\n@param tokens List of parsed tokens\n@param sequence Sequence of operators", "Adds OPT_J | OPT_JSON option to OptionParser, with multiple arguments.\n\n@param parser OptionParser to be modified\n@param required Tells if this option is required or optional", "Return all URI schemes that are supported in the system." ]
@VisibleForTesting protected static String createLabelText( final DistanceUnit scaleUnit, final double value, final DistanceUnit intervalUnit) { double scaledValue = scaleUnit.convertTo(value, intervalUnit); // assume that there is no interval smaller then 0.0001 scaledValue = Math.round(scaledValue * 10000) / 10000; String decimals = Double.toString(scaledValue).split("\\.")[1]; if (Double.valueOf(decimals) == 0) { return Long.toString(Math.round(scaledValue)); } else { return Double.toString(scaledValue); } }
[ "Format the label text.\n\n@param scaleUnit The unit used for the scalebar.\n@param value The scale value.\n@param intervalUnit The scaled unit for the intervals." ]
[ "Set up the services to create a channel listener and operation handler service.\n@param serviceTarget the service target to install the services into\n@param endpointName the endpoint name to install the services into\n@param channelName the name of the channel\n@param executorServiceName service name of the executor service to use in the operation handler service\n@param scheduledExecutorServiceName service name of the scheduled executor service to use in the operation handler service", "This method takes the textual version of an accrue type name\nand populates the class instance appropriately. Note that unrecognised\nvalues are treated as \"Prorated\".\n\n@param type text version of the accrue type\n@param locale target locale\n@return AccrueType class instance", "Formats a vertex using it's properties. Debugging purposes.", "Save current hostname and reuse it.\n\n@return hostname as String", "Backup all xml files in a given directory.\n\n@param source the source directory\n@param target the target directory\n@throws IOException for any error", "Checks the id value.\n\n@param fieldDef The field descriptor\n@param checkLevel The current check level (this constraint is checked in basic and strict)\n@exception ConstraintException If the constraint has been violated", "Convert the MSPDI representation of a UUID into a Java UUID instance.\n\n@param value MSPDI UUID\n@return Java UUID instance", "Removes a metadata provider so it will no longer be consulted to provide metadata for tracks loaded from any\nmedia.\n\n@param provider the metadata provider to remove.", "Checks if the InputStream have the text\n\n@param in InputStream to read\n@param text Text to check\n@return whether the inputstream has the text" ]
public List<ServerGroup> tableServerGroups(int profileId) { ArrayList<ServerGroup> serverGroups = new ArrayList<>(); PreparedStatement queryStatement = null; ResultSet results = null; try (Connection sqlConnection = sqlService.getConnection()) { queryStatement = sqlConnection.prepareStatement( "SELECT * FROM " + Constants.DB_TABLE_SERVER_GROUPS + " WHERE " + Constants.GENERIC_PROFILE_ID + " = ? " + "ORDER BY " + Constants.GENERIC_NAME ); queryStatement.setInt(1, profileId); results = queryStatement.executeQuery(); while (results.next()) { ServerGroup curServerGroup = new ServerGroup(results.getInt(Constants.GENERIC_ID), results.getString(Constants.GENERIC_NAME), results.getInt(Constants.GENERIC_PROFILE_ID)); curServerGroup.setServers(tableServers(profileId, curServerGroup.getId())); serverGroups.add(curServerGroup); } } catch (SQLException e) { e.printStackTrace(); } finally { try { if (results != null) { results.close(); } } catch (Exception e) { } try { if (queryStatement != null) { queryStatement.close(); } } catch (Exception e) { } } return serverGroups; }
[ "Return all server groups for a profile\n\n@param profileId ID of profile\n@return collection of ServerGroups for a profile" ]
[ "Set the rate types.\n\n@param rateTypes the rate types, not null and not empty.\n@return this, for chaining.\n@throws IllegalArgumentException when not at least one {@link RateType} is provided.", "Returns a string that encodes the result of a method invocation.\nEffectively, this just removes any headers from the encoded response.\n\n@param encodedResponse\n@return string that encodes the result of a method invocation", "Entry point for processing filter definitions.\n\n@param properties project properties\n@param filters project filters\n@param fixedData filter fixed data\n@param varData filter var data", "Checks if the link target is a secure link.<p\n\n@param cms the current CMS context\n@param vfsName the path of the link target\n@param targetSite the target site containing the detail page\n@param secureRequest true if the currently running request is secure\n\n@return true if the link should be a secure link", "Helper method to check if log4j is already configured", "changes an existing property with the same name, or adds a new one\n@param key property name with which the specified value is to be\nassociated\n@param value value to be associated with the specified property name\n@return the previous value associated with property name, or null if\nthere was no mapping for property name. (A null return can also\nindicate that the map previously associated null with key.)", "Writes task baseline data.\n\n@param xmlTask MSPDI task\n@param mpxjTask MPXJ task", "For running queries embebed in the report design\n\n@param dr\n@param layoutManager\n@param con\n@param _parameters\n@return\n@throws JRException", "Use this API to fetch all the dnsnsecrec resources that are configured on netscaler." ]
public double getProgressFromResponse(ResponseOnSingeRequest myResponse) { double progress = 0.0; try { if (myResponse == null || myResponse.isFailObtainResponse()) { return progress; } String responseBody = myResponse.getResponseBody(); Pattern regex = Pattern.compile(progressRegex); Matcher matcher = regex.matcher(responseBody); if (matcher.matches()) { String progressStr = matcher.group(1); progress = Double.parseDouble(progressStr); } } catch (Exception t) { logger.error("fail " + t); } return progress; }
[ "Gets the progress from response.\n\n@param myResponse\nthe my response\n@return the progress from response" ]
[ "Use this API to fetch clusterinstance resources of given names .", "Unloads the sound file for this source, if any.", "returns a sorted array of constructors", "Return a long value which is the number of rows in the table.", "Get the last non-white X point\n@param img Image in memory\n@return the trimmed width", "Writes a resource's cost rate tables.\n\n@param xml MSPDI resource\n@param mpx MPXJ resource", "Sets the text alignment for all cells in the table.\n@param textAlignment new text alignment\n@throws NullPointerException if the argument was null\n@return this to allow chaining\n@throws {@link NullPointerException} if the argument was null", "Get the photos for the specified group pool, optionally filtering by taf.\n\nThis method does not require authentication.\n\n@see com.flickr4java.flickr.photos.Extras\n@param groupId\nThe group ID\n@param userId\nThe user ID (may be null)\n@param tags\nThe optional tags (may be null)\n@param extras\nSet of extra-attributes to include (may be null)\n@param perPage\nThe number of photos per page (0 to ignore)\n@param page\nThe page offset (0 to ignore)\n@return A Collection of Photo objects\n@throws FlickrException", "Does a query for the object's Id and copies in each of the field values from the database to refresh the data\nparameter." ]
public static <T> String join(Collection<T> col, String delim) { StringBuilder sb = new StringBuilder(); Iterator<T> iter = col.iterator(); if (iter.hasNext()) sb.append(iter.next().toString()); while (iter.hasNext()) { sb.append(delim); sb.append(iter.next().toString()); } return sb.toString(); }
[ "Joins a collection in a string using a delimiter\n@param col Collection\n@param delim Delimiter\n@return String" ]
[ "Returns a reference definition of the given name if it exists.\n\n@param name The name of the reference\n@return The reference def or <code>null</code> if there is no such reference", "Sets the content type for this ID\n\n@param pathId ID of path\n@param contentType content type value", "Curries a function that takes one argument.\n\n@param function\nthe original function. May not be <code>null</code>.\n@param argument\nthe fixed argument.\n@return a function that takes no arguments. Never <code>null</code>.", "crates a StencilSet object and add it to the current diagram\n@param modelJSON\n@param current\n@throws org.json.JSONException", "Get content for URL only\n\n@param stringUrl URL to get content\n@return the content\n@throws IOException I/O error happened", "Skips the stream over the specified number of bytes, adding the skipped\namount to the count.\n\n@param length the number of bytes to skip\n@return the actual number of bytes skipped\n@throws java.io.IOException if an I/O error occurs\n@see java.io.InputStream#skip(long)", "Propagates the names of all facets to each single facet.", "Append this message to the message set\n@param messages message to append\n@return the written size and first offset\n@throws IOException file write exception", "Initializes the alarm sensor command class. Requests the supported alarm types." ]
public long getStartTime(List<IInvokedMethod> methods) { long startTime = System.currentTimeMillis(); for (IInvokedMethod method : methods) { startTime = Math.min(startTime, method.getDate()); } return startTime; }
[ "Find the earliest start time of the specified methods.\n@param methods A list of test methods.\n@return The earliest start time." ]
[ "Emit status line for an aggregated event.", "Add the specified files in reverse order.", "Session connect generate channel.\n\n@param session\nthe session\n@return the channel\n@throws JSchException\nthe j sch exception", "This method performs database modification at the very and of transaction.", "This method is used to configure the primary and alternative\nformat patterns.\n\n@param primaryPattern new format pattern\n@param alternativePatterns alternative format patterns\n@param decimalSeparator Locale specific decimal separator to replace placeholder\n@param groupingSeparator Locale specific grouping separator to replace placeholder", "Issue the database statements to drop the table associated with a class.\n\n<p>\n<b>WARNING:</b> This is [obviously] very destructive and is unrecoverable.\n</p>\n\n@param connectionSource\nAssociated connection source.\n@param dataClass\nThe class for which a table will be dropped.\n@param ignoreErrors\nIf set to true then try each statement regardless of {@link SQLException} thrown previously.\n@return The number of statements executed to do so.", "Write all state items to the log file.\n\n@param fileRollEvent the event to log", "Retrieves the default calendar for this project based on the calendar name\ngiven in the project properties. If a calendar of this name cannot be found, then\nthe first calendar listed for the project will be returned. If the\nproject contains no calendars, then a default calendar is added.\n\n@return default projectCalendar instance", "If the specified value is not greater than or equal to the specified minimum and\nless than or equal to the specified maximum, adjust it so that it is.\n@param value The value to check.\n@param min The minimum permitted value.\n@param max The maximum permitted value.\n@return {@code value} if it is between the specified limits, {@code min} if the value\nis too low, or {@code max} if the value is too high.\n@since 1.2" ]
public void animate(float timeInSec) { GVRSkeleton skel = getSkeleton(); GVRPose pose = skel.getPose(); computePose(timeInSec,pose); skel.poseToBones(); skel.updateBonePose(); skel.updateSkinPose(); }
[ "Compute pose of skeleton at the given time from the animation channels.\n@param timeInSec animation time in seconds." ]
[ "Parses the result and returns the failure description. If the result was successful, an empty string is\nreturned.\n\n@param result the result of executing an operation\n\n@return the failure message or an empty string", "Insert an entity into the datastore.\n\nThe entity must have no ids.\n\n@return The key for the inserted entity.\n@throws DatastoreException on error", "Deals with the case where we have had to map a task ID to a new value.\n\n@param id task ID from database\n@return mapped task ID", "Gets the numeric codes. Setting it to -1 search for currencies that have no numeric code.\n\n@return the query for chaining.", "Use this API to fetch dnspolicy_dnsglobal_binding resources of given name .", "Parse an extended attribute date value.\n\n@param value string representation\n@return date value", "Get the element value in the list by index\n@param index the position in the list from which to get the element\n@return the element value", "Sets the specified starting partition key.\n\n@param paging a paging state", "prefix length in this section is ignored when converting to MAC" ]
public static Object parsePrimitive( final String fieldName, final PrimitiveAttribute<?> pAtt, final PObject requestData) { Class<?> valueClass = pAtt.getValueClass(); Object value; try { value = parseValue(false, new String[0], valueClass, fieldName, requestData); } catch (UnsupportedTypeException e) { String type = e.type.getName(); if (e.type.isArray()) { type = e.type.getComponentType().getName() + "[]"; } throw new RuntimeException( "The type '" + type + "' is not a supported type when parsing json. " + "See documentation for supported types.\n\nUnsupported type found in attribute " + fieldName + "\n\nTo support more types add the type to " + "parseValue and parseArrayValue in this class and add a test to the test class", e); } pAtt.validateValue(value); return value; }
[ "Get the value of a primitive type from the request data.\n\n@param fieldName the name of the attribute to get from the request data.\n@param pAtt the primitive attribute.\n@param requestData the data to retrieve the value from." ]
[ "Use this API to enable the mode on Netscaler.\n@param mode mode to be enabled.\n@return status of the operation performed.\n@throws Exception Nitro exception.", "Use this API to fetch all the sslfipskey resources that are configured on netscaler.", "Checks the given class descriptor for correct object cache setting.\n\n@param classDef The class descriptor\n@param checkLevel The current check level (this constraint is only checked in strict)\n@exception ConstraintException If the constraint has been violated", "Requests the beat grid for a specific track ID, given a connection to a player that has already been set up.\n\n@param rekordboxId the track of interest\n@param slot identifies the media slot we are querying\n@param client the dbserver client that is communicating with the appropriate player\n\n@return the retrieved beat grid, or {@code null} if there was none available\n\n@throws IOException if there is a communication problem", "Finds and sets up the Listeners in the given rootView.\n\n@param rootView a View to traverse looking for listeners.\n@return the list of refinement attributes found on listeners.", "Sets a file whose contents will be prepended to the JAR file's data.\n\n@param file the prefix file, or {@code null} for none.\n@return {@code this}", "Use this API to fetch lbvserver_servicegroup_binding resources of given name .", "This method is called to alert project listeners to the fact that\na resource assignment has been written to a project file.\n\n@param resourceAssignment resourceAssignment instance", "Return true if the processor of the node is currently being executed.\n\n@param processorGraphNode the node to test." ]
private static String getAttribute(String name, Element firstElement, Element secondElement) { String val = firstElement.getAttribute(name); if (val.length() == 0 && secondElement != null) { val = secondElement.getAttribute(name); } return val; }
[ "Try to get an attribute value from two elements.\n\n@param firstElement\n@param secondElement\n@return attribute value" ]
[ "Return the class of one of the properties of another class from which the Hibernate metadata is given.\n\n@param meta\nThe parent class to search a property in.\n@param propertyName\nThe name of the property in the parent class (provided by meta)\n@return Returns the class of the property in question.\n@throws HibernateLayerException\nThrows an exception if the property name could not be retrieved.", "This method processes any extended attributes associated with a\nresource assignment.\n\n@param xml MSPDI resource assignment instance\n@param mpx MPX task instance", "Convert an object to a list of maps.\n\n@param mapper the object mapper\n@param source the source object\n@return list", "Process StepFinishedEvent. Change last added to stepStorage step\nand add it as child of previous step.\n\n@param event to process", "Returns the current version info for a provided remote document.\n@param remoteDocument the remote BSON document from which to extract version info\n@return a DocumentVersionInfo", "Use this API to update rnatparam.", "this method will be invoked after methodToBeInvoked is invoked", "Convert raw value as read from the MPP file into a Java type.\n\n@param type MPP value type\n@param value raw value data\n@return Java object", "Recursively read the WBS structure from a PEP file.\n\n@param parent parent container for tasks\n@param id initial WBS ID" ]
public Optional<URL> getRoute() { Optional<Route> optionalRoute = getClient().routes().inNamespace(namespace) .list().getItems() .stream() .findFirst(); return optionalRoute .map(OpenShiftRouteLocator::createUrlFromRoute); }
[ "Returns the URL of the first route.\n@return URL backed by the first route." ]
[ "Load a model to attach to the avatar\n@param avatarResource resource with avatar model\n@param attachBone name of bone to attach model to", "Use this API to delete nsacl6 of given name.", "Get a property as a double or defaultValue.\n\n@param key the property name\n@param defaultValue the default value", "Returns whether the given host matches this one. For hosts to match, they must represent the same addresses or have the same host names.\nHosts are not resolved when matching. Also, hosts must have the same port and service. They must have the same masks if they are host names.\nEven if two hosts are invalid, they match if they have the same invalid string.\n\n@param host\n@return", "Creates a date from the equivalent long value. This conversion\ntakes account of the time zone.\n\n@param date date expressed as a long integer\n@return new Date instance", "Scale all widgets in Main Scene hierarchy\n@param scale", "Send message to all connections tagged with all given tags\n@param message the message\n@param labels the tag labels", "Get an extent aware Iterator based on the ReportQuery\n\n@param query\n@param cld\n@return OJBIterator", "Process an individual work week day.\n\n@param data calendar data\n@param offset current offset into data\n@param week parent week\n@param day current day" ]
private static boolean checkModifiers(Class<? extends AbstractPlugin> pluginClass) { int modifiers = pluginClass.getModifiers(); return !Modifier.isAbstract(modifiers) && !Modifier.isInterface(modifiers) && !Modifier.isPrivate(modifiers); }
[ "Check given class modifiers. Plugin with resources plugin should not be private or abstract\nor interface." ]
[ "Calls the stored procedure stored procedure throws an\nerror if it doesn't exist.\n@param broker\n@param cld\n@param sequenceName\n@return\n@throws LookupException\n@throws SQLException", "returns IsolationLevel literal as matching\nto the corresponding id\n@return the IsolationLevel literal", "Fetches the HttpMethod from annotations and returns String representation of HttpMethod.\nReturn emptyString if not present.\n\n@param method Method handling the http request.\n@return String representation of HttpMethod from annotations or emptyString as a default.", "Sets the values of this input field. Only Applicable check-boxes and a radio buttons.\n\n@param values Values to set.", "For missing objects associated by one-to-one with another object in the\nresult set, register the fact that the object is missing with the\nsession.\n\ncopied form Loader#registerNonExists", "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", "Get the node that has been selected by the user, or null if\nnothing is selected.\n@return The node or <code>null</code>", "Verifies if the new value is different from the field's old value. It's\nuseful, for example, in NoSQL databases that replicates data between\nservers. This verification prevents to mark a field as modified and to be\nreplicated needlessly.\n\n@param field\nthe field that we are checking before to be modified\n@param value\nthe new value\n@return true if the new and the old values are different and the value\nwas changed.", "converts the file URIs with an absent authority to one with an empty" ]
private void pushDeviceToken(final String token, final boolean register, final PushType type) { pushDeviceToken(this.context, token, register, type); }
[ "For internal use, don't call the public API internally" ]
[ "Internal utility to help JNI add hit objects to the pick list. Specifically for MeshColliders with picking\nfor UV, Barycentric, and normal coordinates enabled", "Log a warning for the resource at the provided address and the given attributes. The detail message is a default\n'Attributes are not understood in the target model version and this resource will need to be ignored on the target host.'\n\n@param address where warning occurred\n@param attributes attributes we are warning about", "Add BoxMetaDataFilter to the JsonArray boxMetadataFilterRequestArray.\n@param @param bmf accepts a filter that has templateKey, scope, and filters populated.\n@return JsonArray that is formated Json request", "Handles retrieval of primitive char type.\n\n@param field required field\n@param defaultValue default value if field is missing\n@return char value", "Use this API to clear gslbldnsentries resources.", "Sets the highlight strength for the InnerPaddingOutline.\n\n@param _highlightStrength The highlighting value for the outline.", "Post-configure retreival of server engine.", "Checks whether two internet addresses are on the same subnet.\n\n@param prefixLength the number of bits within an address that identify the network\n@param address1 the first address to be compared\n@param address2 the second address to be compared\n\n@return true if both addresses share the same network bits", "Determine which type of percent complete is used on on this task,\nand calculate the required value.\n\n@param row task data\n@return percent complete value" ]
public static String encodeAuthority(String authority, String encoding) throws UnsupportedEncodingException { return HierarchicalUriComponents.encodeUriComponent(authority, encoding, HierarchicalUriComponents.Type.AUTHORITY); }
[ "Encodes the given URI authority with the given encoding.\n@param authority the authority to be encoded\n@param encoding the character encoding to encode to\n@return the encoded authority\n@throws UnsupportedEncodingException when the given encoding parameter is not supported" ]
[ "Returns true if this Bytes object equals another. This method checks it's arguments.\n\n@since 1.2.0", "Converts a collection of dates to a JSON array with the long representation of the dates as strings.\n@param dates the list to convert.\n@return JSON array with long values of dates as string", "Get the list of all nodes and the list of active nodes in the cluster.\n\n@return Membership object encapsulating lists of all nodes and the cluster nodes\n@see <a\nhref=\"https://console.bluemix.net/docs/services/Cloudant/api/advanced.html#-get-_membership-\">\n_membership</a>", "This method will return a list of installed identities for which\nthe corresponding .conf file exists under .installation directory.\nThe list will also include the default identity even if the .conf\nfile has not been created for it.", "Creates the \"Add key\" button.\n@return the \"Add key\" button.", "Sets the underlying read timeout in milliseconds.\nA value of 0 specifies an infinite timeout.\n@see okhttp3.OkHttpClient.Builder#readTimeout(long, TimeUnit)", "Makes sure that the operation name and the address have been set and returns a ModelNode\nrepresenting the operation request.", "Return the count of all objects found\nfor given class, using the PB-api within\nODMG - this may change in further versions.", "In common shader cases, NaN makes little sense. Correspondingly, GVRF is\ngoing to use Float.NaN as illegal flag in many cases. Therefore, we need\na function to check if there is any setX that is using NaN as input.\n\n@param parameterName\nThe name of the user-supplied parameter that we are validating\nso that the user can easily find the error in their code.\n@param data\nA single float data.\n@throws IllegalArgumentException\nif the data includes NaN." ]
public static Object unmarshal(String message, Class<?> childClass) { try { Class<?>[] reverseAndToArray = Iterables.toArray(Lists.reverse(getAllSuperTypes(childClass)), Class.class); JAXBContext jaxbCtx = JAXBContext.newInstance(reverseAndToArray); Unmarshaller unmarshaller = jaxbCtx.createUnmarshaller(); return unmarshaller.unmarshal(new StringReader(message)); } catch (Exception e) { } return null; }
[ "xml -> object\n\n@param message\n@param childClass\n@return" ]
[ "Add the value to list of values to be used as part of the\nevaluation of this indicator.\n\n@param index position in the list\n@param value evaluation value", "Decomposes and overwrites the input matrix.\n\n@param A Semi-Positive Definite (SPD) system matrix. Modified. Reference saved.\n@return If the matrix can be decomposed. Will always return false of not SPD.", "This method extracts data for a single predecessor from an MSPDI file.\n\n@param currTask Current task object\n@param link Predecessor data", "Adds a redeploy step to the composite operation.\n\n@param builder the builder to add the step to\n@param deployment the deployment being redeployed", "Permanently deletes a trashed file.\n@param fileID the ID of the trashed folder to permanently delete.", "Utility function that copies a string array and add another string to\nfirst\n\n@param arr Original array of strings\n@param add\n@return Copied array of strings", "Checks to see if the two matrices are inverses of each other.\n\n@param a A matrix. Not modified.\n@param b A matrix. Not modified.", "Returns the coupon payment of the period with the given index. The analytic model is needed in case of floating bonds.\n\n@param periodIndex The index of the period of interest.\n@param model The model under which the product is valued.\n@return The value of the coupon payment in the given period.", "Creates a Document that can be passed to the MongoDB batch insert function" ]
private static boolean syncWithMaster(final Resource domain, final PathElement hostElement) { final Resource host = domain.getChild(hostElement); assert host != null; final Set<String> profiles = new HashSet<>(); final Set<String> serverGroups = new HashSet<>(); final Set<String> socketBindings = new HashSet<>(); for (final Resource.ResourceEntry serverConfig : host.getChildren(SERVER_CONFIG)) { final ModelNode model = serverConfig.getModel(); final String group = model.require(GROUP).asString(); if (!serverGroups.contains(group)) { serverGroups.add(group); } if (model.hasDefined(SOCKET_BINDING_GROUP)) { processSocketBindingGroup(domain, model.require(SOCKET_BINDING_GROUP).asString(), socketBindings); } } // process referenced server-groups for (final Resource.ResourceEntry serverGroup : domain.getChildren(SERVER_GROUP)) { // If we have an unreferenced server-group if (!serverGroups.remove(serverGroup.getName())) { return true; } final ModelNode model = serverGroup.getModel(); final String profile = model.require(PROFILE).asString(); // Process the profile processProfile(domain, profile, profiles); // Process the socket-binding-group processSocketBindingGroup(domain, model.require(SOCKET_BINDING_GROUP).asString(), socketBindings); } // If we are missing a server group if (!serverGroups.isEmpty()) { return true; } // Process profiles for (final Resource.ResourceEntry profile : domain.getChildren(PROFILE)) { // We have an unreferenced profile if (!profiles.remove(profile.getName())) { return true; } } // We are missing a profile if (!profiles.isEmpty()) { return true; } // Process socket-binding groups for (final Resource.ResourceEntry socketBindingGroup : domain.getChildren(SOCKET_BINDING_GROUP)) { // We have an unreferenced socket-binding group if (!socketBindings.remove(socketBindingGroup.getName())) { return true; } } // We are missing a socket-binding group if (!socketBindings.isEmpty()) { return true; } // Looks good! return false; }
[ "Determine whether all references are available locally.\n\n@param domain the domain model\n@param hostElement the host path element\n@return whether to a sync with the master is required" ]
[ "Take a stab at fixing validation problems ?\n\n@param object", "Gets the URL of the service with the given name that has been created during the current session.\n\n@param name to return its URL\n@return URL of the service.", "Use this API to fetch rewritepolicy_csvserver_binding resources of given name .", "Get the element as a boolean.\n\n@param i the index of the element to access", "Checks the preconditions for creating a new LMinMax processor.\n\n@param min\nthe minimum value (inclusive)\n@param max\nthe maximum value (inclusive)\n@throws IllegalArgumentException\nif {@code max < min}", "Legacy conversion.\n@param map\n@return Properties", "Ensures that generate-table-info is set to false if generate-repository-info is set to false.\n\n@param classDef The class descriptor\n@param checkLevel The current check level (this constraint is checked in all levels)", "defines the KEY in the parent report parameters map where to get the subreport parameters map.\n@param path where to get the parameter map for the subrerpot.\n@return", "Looks up and returns the value of the given key in the properties file of\nthe currently-selected theme.\n\n@param code Key to look up in the theme properties file.\n@return The value of the code in the current theme properties file, or an\nempty string if the code could not be resolved." ]
public static appfwprofile_safeobject_binding[] get(nitro_service service, String name) throws Exception{ appfwprofile_safeobject_binding obj = new appfwprofile_safeobject_binding(); obj.set_name(name); appfwprofile_safeobject_binding response[] = (appfwprofile_safeobject_binding[]) obj.get_resources(service); return response; }
[ "Use this API to fetch appfwprofile_safeobject_binding resources of given name ." ]
[ "Sets up internal data structures and creates a copy of the input matrix.\n\n@param A The input matrix. Not modified.", "A convenience method for creating an immutable list.\n\n@param self a Set\n@return an immutable Set\n@see java.util.Collections#unmodifiableSet(java.util.Set)\n@since 1.0", "Produces a new ConditionalCounter.\n\n@return a new ConditionalCounter, where order of indices is reversed", "Reads a single byte from the input stream.", "Creates a bridge accessory, capable of holding multiple child accessories. This has the\nadvantage over multiple standalone accessories of only requiring a single pairing from iOS for\nthe bridge.\n\n@param authInfo authentication information for this accessory. These values should be persisted\nand re-supplied on re-start of your application.\n@param label label for the bridge. This will show in iOS during pairing.\n@param manufacturer manufacturer of the bridge. This information is exposed to iOS for unknown\npurposes.\n@param model model of the bridge. This is also exposed to iOS for unknown purposes.\n@param serialNumber serial number of the bridge. Also exposed. Purposes also unknown.\n@return the bridge, from which you can {@link HomekitRoot#addAccessory add accessories} and\nthen {@link HomekitRoot#start start} handling requests.\n@throws IOException when mDNS cannot connect to the network", "Finds the most recent dump of the given type that is actually available.\n\n@param dumpContentType\nthe type of the dump to look for\n@return most recent main dump or null if no such dump exists", "determinates if this triangle contains the point p.\n@param p the query point\n@return true iff p is not null and is inside this triangle (Note: on boundary is considered inside!!).", "Handle content length.\n\n@param event\nthe event", "Given the comma separated list of properties as a string, splits it\nmultiple strings\n\n@param paramValue Concatenated string\n@param type Type of parameter ( to throw exception )\n@return List of string properties" ]
public static base_responses update(nitro_service client, sslocspresponder resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { sslocspresponder updateresources[] = new sslocspresponder[resources.length]; for (int i=0;i<resources.length;i++){ updateresources[i] = new sslocspresponder(); updateresources[i].name = resources[i].name; updateresources[i].url = resources[i].url; updateresources[i].cache = resources[i].cache; updateresources[i].cachetimeout = resources[i].cachetimeout; updateresources[i].batchingdepth = resources[i].batchingdepth; updateresources[i].batchingdelay = resources[i].batchingdelay; updateresources[i].resptimeout = resources[i].resptimeout; updateresources[i].respondercert = resources[i].respondercert; updateresources[i].trustresponder = resources[i].trustresponder; updateresources[i].producedattimeskew = resources[i].producedattimeskew; updateresources[i].signingcert = resources[i].signingcert; updateresources[i].usenonce = resources[i].usenonce; updateresources[i].insertclientcert = resources[i].insertclientcert; } result = update_bulk_request(client, updateresources); } return result; }
[ "Use this API to update sslocspresponder resources." ]
[ "Read task relationships.", "Extracts the rank of a matrix using a preexisting decomposition.\n\n@see #singularThreshold(SingularValueDecomposition_F64)\n\n@param svd A precomputed decomposition. Not modified.\n@param threshold Tolerance used to determine of a singular value is singular.\n@return The rank of the decomposed matrix.", "Verify store definitions are congruent with cluster definition.\n\n@param cluster\n@param storeDefs", "Returns the configured mappings of the current field.\n\n@return the configured mappings of the current field", "Print formatted string in the center of 80 chars line, left and right padded.\n\n@param format\nThe string format pattern\n@param args\nThe string format arguments", "Remove control from the control bar. Size of control bar is updated based on new number of\ncontrols.\n@param name name of the control to remove", "Updates the indices in the index buffer from a Java int array.\nAll of the entries of the input int array are copied into\nthe storage for the index buffer. The new indices must be the\nsame size as the old indices - the index buffer size cannot be changed.\n@param data char array containing the new values\n@throws IllegalArgumentException if int array is wrong size", "Computes execution time\n@param extra", "Prepare the filter for the transiton at a given time.\nThe default implementation sets the given filter property, but you could override this method to make other changes.\n@param transition the transition time in the range 0 - 1" ]
public static Filter.Builder makeAndFilter(Iterable<Filter> subfilters) { return Filter.newBuilder() .setCompositeFilter(CompositeFilter.newBuilder() .addAllFilters(subfilters) .setOp(CompositeFilter.Operator.AND)); }
[ "Make a composite filter from the given sub-filters using AND to combine filters." ]
[ "Gets the thread usage.\n\n@return the thread usage", "Writes a buffered some-value restriction.\n\n@param propertyUri\nURI of the property to which the restriction applies\n@param rangeUri\nURI of the class or datatype to which the restriction applies\n@param bnode\nblank node representing the restriction\n@throws RDFHandlerException\nif there was a problem writing the RDF triples", "Click no children of the specified parent element.\n\n@param tagName The tag name of which no children should be clicked.\n@return The builder to append more options.", "Get an extent aware Iterator based on the ReportQuery\n\n@param query\n@param cld\n@return OJBIterator", "Get the title and read the Title property according the provided locale.\n@return The map from locales to the locale specific titles.", "Internal used method to retrieve object based on Identity.\n\n@param id\n@return\n@throws PersistenceBrokerException", "Enqueues a message for sending on the send thread.\n@param serialMessage the serial message to enqueue.", "This method lists all resources defined in the file.\n\n@param file MPX file", "Use the jgrapht cycle checker to detect any cycles in the provided dependency graph." ]
@SuppressWarnings("deprecation") public static boolean dateTimeEquals(java.util.Date d1, java.util.Date d2) { if (d1 == null || d2 == null) { return false; } return d1.getDate() == d2.getDate() && d1.getMonth() == d2.getMonth() && d1.getYear() == d2.getYear() && d1.getHours() == d2.getHours() && d1.getMinutes() == d2.getMinutes() && d1.getSeconds() == d2.getSeconds(); }
[ "Checks the second, hour, month, day, month and year are equal." ]
[ "This method displays the resource assignments for each task. This time\nrather than just iterating through the list of all assignments in\nthe file, we extract the assignments on a task-by-task basis.\n\n@param file MPX file", "Try to fire a given event on the Browser.\n\n@param eventable the eventable to fire\n@return true iff the event is fired", "Set an enterprise number value.\n\n@param index number index (1-40)\n@param value number value", "Removes a parameter from this configuration.\n\n@param key the parameter to remove", "When an alias for a field is added, index it here to allow lookup by alias and type.\n\n@param type field type\n@param alias field alias", "Get an extent aware Iterator based on the Query\n\n@param query\n@param cld the ClassDescriptor\n@return OJBIterator", "Use this API to fetch filtered set of dbdbprofile resources.\nset the filter parameter values in filtervalue object.", "Map the Primavera UDF to a custom field.\n\n@param fieldType parent object type\n@param dataType UDF data type\n@param name UDF name\n@return FieldType instance", "Joins with another IPv4 segment to produce a IPv6 segment.\n\n@param creator\n@param low\n@return" ]
public static base_responses unset(nitro_service client, String ipaddress[], String args[]) throws Exception { base_responses result = null; if (ipaddress != null && ipaddress.length > 0) { nsrpcnode unsetresources[] = new nsrpcnode[ipaddress.length]; for (int i=0;i<ipaddress.length;i++){ unsetresources[i] = new nsrpcnode(); unsetresources[i].ipaddress = ipaddress[i]; } result = unset_bulk_request(client, unsetresources,args); } return result; }
[ "Use this API to unset the properties of nsrpcnode resources.\nProperties that need to be unset are specified in args array." ]
[ "Renumbers all entity unique IDs.", "Unmarshals the descriptor content.\n\n@throws CmsXmlException thrown if the XML structure of the descriptor is wrong.\n@throws CmsException thrown if reading the descriptor file fails.", "Grab random holiday from the equivalence class that falls between the two dates\n\n@param earliest the earliest date parameter as defined in the model\n@param latest the latest date parameter as defined in the model\n@return a holiday that falls between the dates", "Return a replica of this instance with the quality value of the given MediaType.\n@return the same instance if the given MediaType doesn't have a quality value, or a new one otherwise", "Write a calendar.\n\n@param record calendar instance\n@throws IOException", "Sets the appropriate OpenCms context.\n@param cms The OpenCms instance object.", "Update the installed identity using the modified state from the modification.\n\n@param name the identity name\n@param modification the modification\n@param state the installation state\n@return the installed identity", "Constructs credentials for the given account and key file.\n\n@param serviceAccountId service account ID (typically an e-mail address).\n@param privateKeyFile the file name from which to get the private key.\n@param serviceAccountScopes Collection of OAuth scopes to use with the the service\naccount flow or {@code null} if not.\n@return valid credentials or {@code null}", "Draw text in the center of the specified box.\n\n@param text text\n@param font font\n@param box box to put text int\n@param fontColor colour" ]
public ProteusApplication setServerConfigurationFunction(Function<Undertow.Builder, Undertow.Builder> serverConfigurationFunction) { this.serverConfigurationFunction = serverConfigurationFunction; return this; }
[ "Allows direct access to the Undertow.Builder for custom configuration\n\n@param serverConfigurationFunction the serverConfigurationFunction" ]
[ "Returns the error correction codewords for the specified data codewords.\n\n@param codewords the codewords that we need error correction codewords for\n@param ecclen the number of error correction codewords needed\n@return the error correction codewords for the specified data codewords", "Test whether the operation has a defined criteria attribute.\n\n@param operation the operation\n@return", "Singleton of MetaClassRegistry.\n\n@param includeExtension\n@return the registry", "Generate debug dump of the tree from the scene object.\nIt should include a newline character at the end.\n\n@param sb the {@code StringBuffer} to dump the object.\n@param indent indentation level as number of spaces.", "Retrieve an enterprise field value.\n\n@param index field index\n@return field value", "Returns the address for the operation.\n\n@param op the operation\n\n@return the operation address or a new undefined model node", "Returns the string in the buffer minus an leading or trailing whitespace or quotes", "Creates a field map for resources.\n\n@param props props data", "Given a protobuf rebalance-partition info, converts it into our\nrebalance-partition info\n\n@param rebalanceTaskInfoMap Proto-buff version of\nRebalanceTaskInfoMap\n@return RebalanceTaskInfo object." ]
public static cachepolicylabel_binding get(nitro_service service, String labelname) throws Exception{ cachepolicylabel_binding obj = new cachepolicylabel_binding(); obj.set_labelname(labelname); cachepolicylabel_binding response = (cachepolicylabel_binding) obj.get_resource(service); return response; }
[ "Use this API to fetch cachepolicylabel_binding resource of given name ." ]
[ "Returns the parent of this path or null if this path is the root path.\n\n@return the parent of this path or null if this path is the root path.", "Returns a the list of available version of an artifact\n\n@param gavc String\n@return List<String>", "Get image Id from imageTag using DockerBuildInfoHelper client.\n\n@param imageTag\n@param host\n@return", "Returns a OkHttpClient that ignores SSL cert errors\n@return", "get all parts of module name apart from first", "Normalizes the name so it can be used as Maven artifactId or groupId.", "Use this API to fetch lbvserver_auditnslogpolicy_binding resources of given name .", "Call the constructor for the given class, inferring the correct types for\nthe arguments. This could be confusing if there are multiple constructors\nwith the same number of arguments and the values themselves don't\ndisambiguate.\n\n@param klass The class to construct\n@param args The arguments\n@return The constructed value", "Retrieve the start slack.\n\n@return start slack" ]
protected Element createPageElement() { String pstyle = ""; PDRectangle layout = getCurrentMediaBox(); if (layout != null) { /*System.out.println("x1 " + layout.getLowerLeftX()); System.out.println("y1 " + layout.getLowerLeftY()); System.out.println("x2 " + layout.getUpperRightX()); System.out.println("y2 " + layout.getUpperRightY()); System.out.println("rot " + pdpage.findRotation());*/ float w = layout.getWidth(); float h = layout.getHeight(); final int rot = pdpage.getRotation(); if (rot == 90 || rot == 270) { float x = w; w = h; h = x; } pstyle = "width:" + w + UNIT + ";" + "height:" + h + UNIT + ";"; pstyle += "overflow:hidden;"; } else log.warn("No media box found"); Element el = doc.createElement("div"); el.setAttribute("id", "page_" + (pagecnt++)); el.setAttribute("class", "page"); el.setAttribute("style", pstyle); return el; }
[ "Creates an element that represents a single page.\n@return the resulting DOM element" ]
[ "Check given class modifiers. Plugin with resources plugin should not be private or abstract\nor interface.", "Hashes a path, if the path points to a directory then hashes the contents recursively.\n@param messageDigest the digest used to hash.\n@param path the file/directory we want to hash.\n@return the resulting hash.\n@throws IOException", "Create button message key.\n\n@param gallery name\n@return Button message key as String", "Checks the given class descriptor for correct procedure settings.\n\n@param classDef The class descriptor\n@param checkLevel The current check level (this constraint is checked in basic and strict)\n@exception ConstraintException If the constraint has been violated", "Returns the configured bundle, or the provided default bundle.\n@param defaultMessages the default bundle\n@param locale the preferred locale\n@return the configured bundle or, if not found, the default bundle.", "Creates a db handling object.\n\n@return The db handling object\n@throws BuildException If the handling is invalid", "Sets the right padding character for all cells in the row.\n@param paddingRightChar new padding character, ignored if null\n@return this to allow chaining", "Synchronize the required files to a slave HC from the master DC if this is required.\n@param fileRepository the HostFileRepository of the HC.\n@param contentRepository the ContentRepository of the HC.\n@param backup inidcates if this is a DC backup HC.\n@param oldHash the hash of the deployment to be replaced.\n@return true if the content should be pulled by the slave HC - false otherwise.", "This method writes task data to an MSPDI file.\n\n@param project Root node of the MSPDI file" ]
private static void embedSvgGraphic( final SVGElement svgRoot, final SVGElement newSvgRoot, final Document newDocument, final Dimension targetSize, final Double rotation) { final String originalWidth = svgRoot.getAttributeNS(null, "width"); final String originalHeight = svgRoot.getAttributeNS(null, "height"); /* * To scale the SVG graphic and to apply the rotation, we distinguish two * cases: width and height is set on the original SVG or not. * * Case 1: Width and height is set * If width and height is set, we wrap the original SVG into 2 new SVG elements * and a container element. * * Example: * Original SVG: * <svg width="100" height="100"></svg> * * New SVG (scaled to 300x300 and rotated by 90 degree): * <svg width="300" height="300"> * <g transform="rotate(90.0 150 150)"> * <svg width="100%" height="100%" viewBox="0 0 100 100"> * <svg width="100" height="100"></svg> * </svg> * </g> * </svg> * * The requested size is set on the outermost <svg>. Then, the rotation is applied to the * <g> container and the scaling is achieved with the viewBox parameter on the 2nd <svg>. * * * Case 2: Width and height is not set * In this case the original SVG is wrapped into just one container and one new SVG element. * The rotation is set on the container, and the scaling happens automatically. * * Example: * Original SVG: * <svg viewBox="0 0 61.06 91.83"></svg> * * New SVG (scaled to 300x300 and rotated by 90 degree): * <svg width="300" height="300"> * <g transform="rotate(90.0 150 150)"> * <svg viewBox="0 0 61.06 91.83"></svg> * </g> * </svg> */ if (!StringUtils.isEmpty(originalWidth) && !StringUtils.isEmpty(originalHeight)) { Element wrapperContainer = newDocument.createElementNS(SVG_NS, "g"); wrapperContainer.setAttributeNS( null, SVGConstants.SVG_TRANSFORM_ATTRIBUTE, getRotateTransformation(targetSize, rotation)); newSvgRoot.appendChild(wrapperContainer); Element wrapperSvg = newDocument.createElementNS(SVG_NS, "svg"); wrapperSvg.setAttributeNS(null, "width", "100%"); wrapperSvg.setAttributeNS(null, "height", "100%"); wrapperSvg.setAttributeNS(null, "viewBox", "0 0 " + originalWidth + " " + originalHeight); wrapperContainer.appendChild(wrapperSvg); Node svgRootImported = newDocument.importNode(svgRoot, true); wrapperSvg.appendChild(svgRootImported); } else if (StringUtils.isEmpty(originalWidth) && StringUtils.isEmpty(originalHeight)) { Element wrapperContainer = newDocument.createElementNS(SVG_NS, "g"); wrapperContainer.setAttributeNS( null, SVGConstants.SVG_TRANSFORM_ATTRIBUTE, getRotateTransformation(targetSize, rotation)); newSvgRoot.appendChild(wrapperContainer); Node svgRootImported = newDocument.importNode(svgRoot, true); wrapperContainer.appendChild(svgRootImported); } else { throw new IllegalArgumentException( "Unsupported or invalid north-arrow SVG graphic: The same unit (px, em, %, ...) must be" + " " + "used for `width` and `height`."); } }
[ "Embeds the given SVG element into a new SVG element scaling the graphic to the given dimension and\napplying the given rotation." ]
[ "This method writes data for a single task to a Planner file.\n\n@param mpxjTask MPXJ Task instance\n@param taskList list of child tasks for current parent", "Notifies that a content item is removed.\n\n@param position the position.", "Sets the columns width by reading some report options like the\nprintableArea and useFullPageWidth.\ncolumns with fixedWidth property set in TRUE will not be modified", "Obtain the destination hostname for a source host\n\n@param hostName\n@return", "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.", "Stops all servers.\n\n{@inheritDoc}", "Utility function that fetches node ids.\n\n@param adminClient An instance of AdminClient points to given cluster\n@return Node ids in cluster", "Log table contents.\n\n@param label label text\n@param klass reader class name\n@param map table data", "Open a database and build a set of table names.\n\n@param url database URL\n@return set containing table names" ]
private static Clique valueOfHelper(int[] relativeIndices) { // if clique already exists, return that one Clique c = new Clique(); c.relativeIndices = relativeIndices; return intern(c); }
[ "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." ]
[ "Gets the SerialMessage as a byte array.\n@return the message", "Indicate whether the given URI matches this template.\n@param uri the URI to match to\n@return {@code true} if it matches; {@code false} otherwise", "Use this API to fetch csvserver_cmppolicy_binding resources of given name .", "Whether the address is IPv4-compatible\n\n@see java.net.Inet6Address#isIPv4CompatibleAddress()", "This method converts a node to text.\n\nLeading and trailing text from hidden tokens (whitespace/comments) is removed. Text from hidden tokens that is\nsurrounded by text from non-hidden tokens is summarized to a single whitespace.\n\nThe preferred use case of this method is to convert the {@link ICompositeNode} that has been created for a data\ntype rule to text.\n\nThis is also the recommended way to convert a node to text if you want to invoke\n{@link org.eclipse.xtext.conversion.IValueConverterService#toValue(String, String, INode)}", "Check, if the current user has permissions on the document's resource.\n@param cms the context\n@param doc the solr document (from the search result)\n@param filter the resource filter to use for checking permissions\n@return <code>true</code> iff the resource mirrored by the search result can be read by the current user.", "generate a prepared DELETE-Statement according to query\n@param query the Query\n@param cld the ClassDescriptor", "return a new managed connection. This connection is wrapped around the real connection and delegates to it\nto get work done.\n@param subject\n@param info\n@return", "Determine the consistency level of a key\n\n@param versionNodeSetMap A map that maps version to set of PrefixNodes\n@param replicationFactor Total replication factor for the set of clusters\n@return ConsistencyLevel Enum" ]
protected String getBundleJarPath() throws MalformedURLException { Path path = PROPERTIES.getAllureHome().resolve("app/allure-bundle.jar").toAbsolutePath(); if (Files.notExists(path)) { throw new AllureCommandException(String.format("Bundle not found by path <%s>", path)); } return path.toUri().toURL().toString(); }
[ "Returns the bundle jar classpath element." ]
[ "Register a new PerformanceMonitor with Spring if it does not already exist.\n\n@param beanName The name of the bean that this performance monitor is wrapped around\n@param registry The registry where all the spring beans are registered", "Indicates if a bean is proxyable\n\n@param bean The bean to test\n@return True if proxyable, false otherwise", "calculate arc angle between point a and point b\n\n@param center\n@param a\n@param b\n@param area\n@param radius\n@return", "public for testing purpose", "Convenience method for retrieving a char resource.\n\n@param locale locale identifier\n@param key resource key\n@return resource value", "Print a class's relations", "Execute a Runnable on a thread pool thread\n\n@param priority\nThe thread priority. Be careful with this! <blockquote>\n<b>Note:</b> Use Thread.MIN_PRIORITY..Thread.MAX_PRIORITY\n(1..10), <b>not</b> the Process/Linux -20..19 range!\n</blockquote>\n@param threadProc\nThe code to run. It doesn't matter if this code never returns\n- by using spawn (and, hence the thread pool) there is at\nleast a chance that you will be reusing a thread, thus saving\nteardown/startup costs.\n\n@return A Future<?> that lets you wait for thread completion, if\nnecessary", "Queues a job for execution in specified time.\n\n@param job the job.\n@param millis execute the job in this time.", "Helper method to set a value in the internal header list.\n\n@param headers the headers to set the value in\n@param name the name to set\n@param value the value to set" ]
public void wireSteps( CanWire canWire ) { for( StageState steps : stages.values() ) { canWire.wire( steps.instance ); } }
[ "Used for DI frameworks to inject values into stages." ]
[ "Override for customizing XmlMapper and ObjectMapper", "Adds a file to your assembly but automatically genarates the name of the file.\n\n@param inputStream {@link InputStream} the file to be uploaded.", "Adds to this set all of the elements in the specified map of members and their score.\n@param scoredMember the members to add together with their scores\n@return the number of members actually added", "Write the text to the Path, using the specified encoding.\n\n@param self a Path\n@param text the text to write to the Path\n@param charset the charset used\n@throws java.io.IOException if an IOException occurs.\n@since 2.3.0", "Create a ModelNode representing the JVM the instance is running on.\n\n@return a ModelNode representing the JVM the instance is running on.\n@throws OperationFailedException", "Write correlation id.\n\n@param message the message\n@param correlationId the correlation id", "Set the time and value of the key at the given index\n@param keyIndex 0 based index of key\n@param time key time in seconds\n@param values key values", "package for testing purpose", "Create a Collection Proxy for a given query.\n\n@param brokerKey The key of the persistence broker\n@param query The query\n@param collectionClass The class to build the proxy for\n@return The collection proxy" ]
void reportError(Throwable throwable) { if (logger != null) logger.error("Timer reported error", throwable); status = "Thread blocked on error: " + throwable; error_skips = error_factor; }
[ "called by timer thread" ]
[ "Generates a full list of all parents and their children, in order.\n\n@param parentList A list of the parents from\nthe {@link ExpandableRecyclerAdapter}\n@return A list of all parents and their children, expanded", "Maps a story if it is allowed by the meta filter\n\n@param story\nthe Story\n@param metaFilter\nthe meta filter", "Set the week of month.\n@param weekOfMonthStr the week of month to set.", "Returns all information related to a single texture.\n\n@param type the texture type\n@param index the index in the texture stack\n@return the texture information", "Curries a function that takes three arguments.\n\n@param function\nthe original function. May not be <code>null</code>.\n@param argument\nthe fixed first argument of {@code function}.\n@return a function that takes two arguments. Never <code>null</code>.", "Toggle between single events and series.\n@param isSeries flag, indicating if we want a series of events.", "Finish initializing.\n\n@throws GeomajasException oops", "test, how many times the group was present in the list of groups.", "Get a collection of recent photos.\n\nThis method does not require authentication.\n\n@see com.flickr4java.flickr.photos.Extras\n@param extras\nSet of extra-fields\n@param perPage\nThe number of photos per page\n@param page\nThe page offset\n@return A collection of Photo objects\n@throws FlickrException" ]
private String formatRate(Rate value) { String result = null; if (value != null) { StringBuilder buffer = new StringBuilder(m_formats.getCurrencyFormat().format(value.getAmount())); buffer.append("/"); buffer.append(formatTimeUnit(value.getUnits())); result = buffer.toString(); } return (result); }
[ "This method is called to format a rate.\n\n@param value rate value\n@return formatted rate" ]
[ "Gets the UTF-8 sequence length of the code point.\n\n@throws InvalidCodePointException if code point is not within a valid range", "Performs a null edit on a property. This has some effects on Wikibase,\nsuch as refreshing the labels of the referred items in the UI.\n\n@param propertyId\nthe document to perform a null edit on\n@throws MediaWikiApiErrorException\nif the API returns errors\n@throws IOException\nif there are any IO errors, such as missing network connection", "Look at the comments on cluster variable to see why this is problematic", "Create a container in the platform\n\n@param container\nThe name of the container", "Use this API to add nssimpleacl.", "Save current hostname and reuse it.\n\n@return hostname as String", "This method handles submitting and then waiting for the request from the\nserver. It uses the ClientRequest API to actually write the request and\nthen read back the response. This implementation will block for a\nresponse from the server.\n\n@param <T> Return type\n\n@param clientRequest ClientRequest implementation used to write the\nrequest and read the response\n@param operationName Simple string representing the type of request\n\n@return Data returned by the individual requests", "Extract site path, base name and locale from the resource opened with the editor.", "handles when a member leaves and hazelcast partition data is lost. We want\nto find the Futures that are waiting on lost data and error them" ]
public Object getProperty(Object object) { return java.lang.reflect.Array.getLength(object); }
[ "Get this property from the given object.\n@param object an array\n@return the length of the array object\n@throws IllegalArgumentException if object is not an array" ]
[ "Obtains a local date in Pax calendar system from the\nproleptic-year, month-of-year and day-of-month fields.\n\n@param prolepticYear the proleptic-year\n@param month the month-of-year\n@param dayOfMonth the day-of-month\n@return the Pax local date, not null\n@throws DateTimeException if unable to create the date", "Create a new instance of a single input function from an operator character\n@param op Which operation\n@param input Input variable\n@return Resulting operation", "Method to close the file caseManager. It is called just one time, by the\nMASReader, once every test and stroy have been added.\n\n@param caseManager", "Appends a String to the string representation of this number.\n\n@param value a Number\n@param right a String\n@return a String\n@since 1.0", "Creates the server setup, depending on the protocol flags.\n\n@return the configured server setups.", "The way calendars are stored in an MSPDI file means that there\ncan be forward references between the base calendar unique ID for a\nderived calendar, and the base calendar itself. To get around this,\nwe initially populate the base calendar name attribute with the\nbase calendar unique ID, and now in this method we can convert those\nID values into the correct names.\n\n@param baseCalendars list of calendars and base calendar IDs\n@param map map of calendar ID values and calendar objects", "Change the value that is returned by this generator.\n@param value The new value to return.", "Return the number of rows affected.", "Decode the password from the given data. Will decode the data block as well.\n\n@param data encrypted data block\n@param encryptionCode encryption code\n\n@return password" ]
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" ]
[ "Resolve a path from the rootPath checking that it doesn't go out of the rootPath.\n@param rootPath the starting point for resolution.\n@param path the path we want to resolve.\n@return the resolved path.\n@throws IllegalArgumentException if the resolved path is out of the rootPath or if the resolution failed.", "Create an object of the given type using a constructor that matches the\nsupplied arguments.\n\n@param <T> the object type\n@param clazz\nthe type to create\n@param args\nthe arguments to the constructor\n@return a new object of the given type, initialized with the given\narguments\n@throws NoSuchConstructorException\nif there is not a constructor that matches the given\narguments\n@throws AmbiguousConstructorException\nif there is more than one constructor that matches the given\narguments\n@throws ReflectiveOperationException\nif any of the reflective operations throw an exception", "Checks to see if a valid deployment parameter has been defined.\n\n@param operation the operation to check.\n\n@return {@code true} of the parameter is valid, otherwise {@code false}.", "Look for the closing parenthesis corresponding to the one at position\nrepresented by the opening index.\n\n@param text input expression\n@param opening opening parenthesis index\n@return closing parenthesis index", "Returns the sentence as a string with a space between words.\nDesigned to work robustly, even if the elements stored in the\n'Sentence' are not of type Label.\n\nThis one uses the default separators for any word type that uses\nseparators, such as TaggedWord.\n\n@param justValue If <code>true</code> and the elements are of type\n<code>Label</code>, return just the\n<code>value()</code> of the <code>Label</code> of each word;\notherwise,\ncall the <code>toString()</code> method on each item.\n@return The sentence in String form", "Initializes an annotation class\n\n@param name The name of the annotation class\n@return The instance of the annotation. Returns a dummy if the class was\nnot found", "Serialize a parameterized object to a JSON String.\n\n@param object The object to serialize.\n@param parameterizedType The ParameterizedType describing the object. Ex: LoganSquare.serialize(object, new ParameterizedType&lt;MyModel&lt;OtherModel&gt;&gt;() { });", "Get a list of the members of a group. The call must be signed on behalf of a Flickr member, and the ability to see the group membership will be\ndetermined by the Flickr member's group privileges.\n\n@param groupId\nReturn a list of members for this group. The group must be viewable by the Flickr member on whose behalf the API call is made.\n@param memberTypes\nA set of Membertypes as available as constants in {@link Member}.\n@param perPage\nNumber of records per page.\n@param page\nResult-section.\n@return A members-list\n@throws FlickrException\n@see <a href=\"http://www.flickr.com/services/api/flickr.groups.members.getList.html\">API Documentation</a>", "Helper method fro providers to fire hotkey event in a separate thread\n\n@param hotKey hotkey to fire" ]
public static RebalanceTaskInfoMap encodeRebalanceTaskInfoMap(RebalanceTaskInfo stealInfo) { return RebalanceTaskInfoMap.newBuilder() .setStealerId(stealInfo.getStealerId()) .setDonorId(stealInfo.getDonorId()) .addAllPerStorePartitionIds(ProtoUtils.encodeStoreToPartitionsTuple(stealInfo.getStoreToPartitionIds())) .setInitialCluster(new ClusterMapper().writeCluster(stealInfo.getInitialCluster())) .build(); }
[ "Given a rebalance-task info, convert it into the protobuf equivalent\n\n@param stealInfo Rebalance task info\n@return Protobuf equivalent of the same" ]
[ "A final cluster ought to be a super set of current cluster. I.e.,\nexisting node IDs ought to map to same server, but partition layout can\nhave changed and there may exist new nodes.\n\n@param currentCluster\n@param finalCluster", "Given a RendererViewHolder passed as argument and a position renders the view using the\nRenderer previously stored into the RendererViewHolder.\n\n@param viewHolder with a Renderer class inside.\n@param position to render.", "Only converts the B matrix and passes that onto solve. Te result is then copied into\nthe input 'X' matrix.\n\n@param B A matrix &real; <sup>m &times; p</sup>. Not modified.\n@param X A matrix &real; <sup>n &times; p</sup>, where the solution is written to. Modified.", "Provides lookup of elements by non-namespaced name.\n\n@param name the name or shortcut key for nodes of interest\n@return the nodes of interest which match name", "Return all methods for a list of groupIds\n\n@param groupIds array of group IDs\n@param filters array of filters to apply to method selection\n@return collection of Methods found\n@throws Exception exception", "Returns the intersection of this range with the given range, a range which includes those addresses in both this and the given rqnge.\n@param other\n@return", "Writes triples to determine the statements with the highest rank.", "Stops the server. This method does nothing if the server is stopped already.", "Adds an orthographic camera constructed from the designated\nperspective camera to describe the shadow projection.\nThe field of view and aspect ration of the perspective\ncamera are used to obtain the view volume of the\northographic camera. This type of camera is used\nfor shadows generated by direct lights at infinite distance.\n@param centerCam GVRPerspectiveCamera to derive shadow projection from\n@return Orthographic camera to use for shadow casting\n@see GVRDirectLight" ]
private String createPomPath(String relativePath, String moduleName) { if (!moduleName.contains(".xml")) { // Inside the parent pom, the reference is to the pom.xml file return relativePath + "/" + POM_NAME; } // There is a reference to another xml file, which is not the pom. String dirName = relativePath.substring(0, relativePath.indexOf("/")); return dirName + "/" + moduleName; }
[ "Creates the actual path to the xml file of the module." ]
[ "Alternative entry point allowing an MPP file to be read from\na user-supplied POI file stream.\n\n@param fs POI file stream\n@return ProjectFile instance\n@throws MPXJException", "Remove any overrides for an endpoint\n\n@param pathValue path (endpoint) value\n@param requestType path request type. \"GET\", \"POST\", etc\n@return true if success, false otherwise", "Use this API to fetch aaauser_aaagroup_binding resources of given name .", "Add statistics about a created map.\n\n@param mapContext the\n@param mapValues the", "refresh the most recent history entries\n\n@param limit number of entries to populate\n@param offset number of most recent entries to skip\n@return populated history entries\n@throws Exception exception", "Sets the segment reject as a string. This method is for convenience\nto be able to set percent reject type just by calling with '3%' and\notherwise it uses rows. All this assuming that parsing finds '%' characher\nand is able to parse a raw reject number.\n\n@param reject the new segment reject", "Create a KnowledgeBuilderConfiguration on which properties can be set. Use\nthe given properties file and ClassLoader - either of which can be null.\n@return\nThe KnowledgeBuilderConfiguration.", "Gets the or create protocol header.\n\n@param message the message\n@return the message headers map", "Returns whether this address section represents a subnet block of addresses associated its prefix length.\n\nReturns false if it has no prefix length, if it is a single address with a prefix length (ie not a subnet), or if it is a range of addresses that does not include\nthe entire subnet block for its prefix length.\n\nIf {@link AddressNetwork#getPrefixConfiguration} is set to consider all prefixes as subnets, this returns true for any grouping with prefix length.\n\n@return" ]
@Override public final Boolean optBool(final String key, final Boolean defaultValue) { Boolean result = optBool(key); return result == null ? defaultValue : result; }
[ "Get a property as a boolean or default value.\n\n@param key the property name\n@param defaultValue the default" ]
[ "binds the objects primary key and locking values to the statement, BRJ", "All address strings are comparable. If two address strings are invalid, their strings are compared.\nOtherwise, address strings are compared according to which type or version of string, and then within each type or version\nthey are compared using the comparison rules for addresses.\n\n@param other\n@return", "Obtains a local date in Discordian calendar system from the\nera, year-of-era and day-of-year fields.\n\n@param era the Discordian era, not null\n@param yearOfEra the year-of-era\n@param dayOfYear the day-of-year\n@return the Discordian local date, not null\n@throws DateTimeException if unable to create the date\n@throws ClassCastException if the {@code era} is not a {@code DiscordianEra}", "Produces all tuples of size n chosen from a list of variable names\n\n@param variables the list of variable names to make tuples of\n@param nWise the size of the desired tuples\n@return all tuples of size nWise", "Export modules and check them in. Assumes the log stream already open.\n@return exit code of the commit-script.", "Get transformer to use.\n\n@return transformation to apply", "From three tagNames, if one is under sectorTag and one under rowTag, returns the remaining one, which is supposedly the a box label. Otherwise,\nreturns null.", "Return true only if the specified object responds to the named method\n@param object - the object to check\n@param methodName - the name of the method\n@return true if the object responds to the named method", "Check if all cluster objects in the list are congruent.\n\n@param clusterUrls of cluster objects\n@return" ]
public Where<T, ID> not() { /* * Special circumstance here when we have a needs future with a not. Something like and().not().like(...). In * this case we satisfy the and()'s future as the not() but the not() becomes the new needs-future. */ Not not = new Not(); addClause(not); addNeedsFuture(not); return this; }
[ "Used to NOT the next clause specified." ]
[ "Base64 encodes a byte array.\n\n@param bytes Bytes to encode.\n@return Encoded string.\n@throws IllegalArgumentException if {@code bytes} is null or exceeds 3/4ths of {@code\nInteger.MAX_VALUE}.", "Sets the specified short attribute to the specified value.\n\n@param name name of the attribute\n@param value value of the attribute\n@since 1.9.0", "Apply aliases to task and resource fields.\n\n@param aliases map of aliases", "Refresh's this connection's access token using its refresh token.\n@throws IllegalStateException if this connection's access token cannot be refreshed.", "This method is used by non-blocking code to determine if the give buffer\nrepresents a complete request. Because the non-blocking code can by\ndefinition not just block waiting for more data, it's possible to get\npartial reads, and this identifies that case.\n\n@param buffer Buffer to check; the buffer is reset to position 0 before\ncalling this method and the caller must reset it after the call\nreturns\n@return True if the buffer holds a complete request, false otherwise", "Process each regex group matched substring of the given CharSequence. If the closure\nparameter takes one argument, an array with all match groups is passed to it.\nIf the closure takes as many arguments as there are match groups, then each\nparameter will be one match group.\n\n@param self the source CharSequence\n@param regex a Regex CharSequence\n@param closure a closure with one parameter or as much parameters as groups\n@return the source CharSequence\n@see #eachMatch(String, String, groovy.lang.Closure)\n@since 1.8.2", "Use this API to fetch servicegroup_lbmonitor_binding resources of given name .", "Return the number of ignored or assumption-ignored tests.", "Output the SQL type for the default value for the type." ]
public static float[][] toFloat(int[][] array) { float[][] n = new float[array.length][array[0].length]; for (int i = 0; i < array.length; i++) { for (int j = 0; j < array[0].length; j++) { n[i][j] = (float) array[i][j]; } } return n; }
[ "2-D Integer array to float array.\n\n@param array Integer array.\n@return Float array." ]
[ "Gets an app client by its client app id if it has been initialized; throws if none can be\nfound.\n\n@param clientAppId the client app id of the app client to get.\n@return the app client associated with the client app id.", "Set the HomeAsUpIndicator that is visible when user navigate to a fragment child\n@param indicator the resource drawable to use as indicator", "Sets the distance from the origin to the near clipping plane for the\nwhole camera rig.\n\n@param near\nDistance to the near clipping plane.", "Utility function to zip the content of an entire folder, but not the folder itself.\n@param folder\n@param fileName optional\n@return success or not", "Pops the top of the stack of active elements if the current position in the call stack corresponds to the one\nthat pushed the active elements.\n\n<p>This method does not do any type checks, so take care to retrieve the elements with the same types used to push\nto them onto the stack.\n\n@param <T> the type of the elements\n\n@return the active elements or null if the current call stack did not push any active elements onto the stack", "Use this API to fetch wisite_farmname_binding resources of given name .", "Return the text content of the document. It does not containing trailing spaces and asterisks\nat the start of the line.", "Retrieve the default mapping between MPXJ task fields and Primavera task field names.\n\n@return mapping", "This method reads a byte array from the input stream.\n\n@param is the input stream\n@param size number of bytes to read\n@return byte array\n@throws IOException on file read error or EOF" ]
private static Map<String, Object> processConf(Map<String, ?> conf) { Map<String, Object> m = new HashMap<String, Object>(conf.size()); for (String s : conf.keySet()) { Object o = conf.get(s); if (s.startsWith("act.")) s = s.substring(4); m.put(s, o); m.put(Config.canonical(s), o); } return m; }
[ "trim \"act.\" from conf keys" ]
[ "Invoke an operation on an MBean by name.\nNote that only basic data types are supported for parameter values.\n@param operationName the operation name (can be URL-encoded).\n@param parameterMap the {@link Map} of parameter names and value arrays.\n@return the returned value from the operation.\n@throws JMException Java Management Exception\n@throws UnsupportedEncodingException if the encoding is not supported.", "Detaches or removes the value from this context.\n\n@param key the key to the attachment.\n@param <V> the value type of the attachment.\n\n@return the attachment if found otherwise {@code null}.", "Returns the data about all of the plugins that are set\n\n@param onlyValid True to get only valid plugins, False for all\n@return array of Plugins set", "Get MultiJoined ClassDescriptors\n@param cld", "Adds version information.", "Use this API to count sslcertkey_crldistribution_binding resources configued on NetScaler.", "Encodes the given URI scheme with the given encoding.\n@param scheme the scheme to be encoded\n@param encoding the character encoding to encode to\n@return the encoded scheme\n@throws UnsupportedEncodingException when the given encoding parameter is not supported", "Iterates through the given CharSequence line by line, splitting each line using\nthe given regex delimiter. The list of tokens for each line is then passed to\nthe given closure.\n\n@param self a CharSequence\n@param regex the delimiting regular expression\n@param closure a closure\n@return the last value returned by the closure\n@throws java.io.IOException if an error occurs\n@throws java.util.regex.PatternSyntaxException if the regular expression's syntax is invalid\n@see #splitEachLine(CharSequence, java.util.regex.Pattern, groovy.lang.Closure)\n@since 1.8.2", "Issue the database statements to drop the table associated with a table configuration.\n\n<p>\n<b>WARNING:</b> This is [obviously] very destructive and is unrecoverable.\n</p>\n\n@param connectionSource\nAssociated connection source.\n@param tableConfig\nHand or spring wired table configuration. If null then the class must have {@link DatabaseField}\nannotations.\n@param ignoreErrors\nIf set to true then try each statement regardless of {@link SQLException} thrown previously.\n@return The number of statements executed to do so." ]
synchronized void stop(Integer timeout) { final InternalState required = this.requiredState; if(required != InternalState.STOPPED) { this.requiredState = InternalState.STOPPED; ROOT_LOGGER.stoppingServer(serverName); // Only send the stop operation if the server is started if (internalState == InternalState.SERVER_STARTED) { internalSetState(new ServerStopTask(timeout), internalState, InternalState.PROCESS_STOPPING); } else { transition(false); } } }
[ "Stop a managed server." ]
[ "Internal method which performs the authenticated request by preparing the auth request with\nthe provided auth info and request.", "very big duct tape", "Read phases and activities from the Phoenix file to create the task hierarchy.\n\n@param phoenixProject all project data\n@param storepoint storepoint containing current project data", "If a custom CSS file has been specified, returns the path. Otherwise\nreturns null.\n@return A {@link File} pointing to the stylesheet, or null if no stylesheet\nis specified.", "Register child resources associated with this resource.\n\n@param resourceRegistration a {@link org.jboss.as.controller.registry.ManagementResourceRegistration} created from this definition", "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", "creates a shape list containing all child shapes and set it to the\ncurrent shape new shape get added to the shape array\n@param shapes\n@param modelJSON\n@param current\n@throws org.json.JSONException", "Prepares all files added for tus uploads.\n\n@param assemblyUrl the assembly url affiliated with the tus upload.\n@throws IOException when there's a failure with file retrieval.\n@throws ProtocolException when there's a failure with tus upload.", "Read the relationships for an individual GanttProject task.\n\n@param gpTask GanttProject task" ]
public void fire(StepStartedEvent event) { Step step = new Step(); event.process(step); stepStorage.put(step); notifier.fire(event); }
[ "Process StepStartedEvent. New step will be created and added to\nstepStorage.\n\n@param event to process" ]
[ "Undo changes for a single patch entry.\n\n@param entry the patch entry\n@param loader the content loader", "a specialized version of solve that avoid additional checks that are not needed.", "Adds new connections to the partition.\n@param connectionsToCreate number of connections to create\n@throws InterruptedException", "Flattens an option into its value or else null, which is not great but is usually more convenient in Java.\n@param option Optional value -- either Some(T) or None\n@param <T> Any type\n@return The value inside the option, or else null", "Register child resources associated with this resource.\n\n@param resourceRegistration a {@link org.jboss.as.controller.registry.ManagementResourceRegistration} created from this definition", "Get a collection of public photos for the specified user ID.\n\nThis method does not require authentication.\n\n@see com.flickr4java.flickr.photos.Extras\n@param userId\nThe User ID\n@param extras\nSet of extra-attributes to include (may be null)\n@param perPage\nThe number of photos per page\n@param page\nThe page offset\n@return The PhotoList collection\n@throws FlickrException", "We try to convert an Object to an Array and this is not easy in Java so we need a little bit of nasty magic.\n\n@param <T> Type of elements\n@param clazz Clazz of the Objct elements\n@param obj Object\n@return Array", "Build the crosstab. Throws LayoutException if anything is wrong\n@return", "Checks whether the specified event name is restricted. If it is,\nthen create a pending error, and abort.\n\n@param name The event name\n@return Boolean indication whether the event name is restricted" ]
private Map<String, String> readCustomInfo(long eventId) { List<Map<String, Object>> rows = getJdbcTemplate() .queryForList("select * from EVENTS_CUSTOMINFO where EVENT_ID=" + eventId); Map<String, String> customInfo = new HashMap<String, String>(rows.size()); for (Map<String, Object> row : rows) { customInfo.put((String)row.get("CUST_KEY"), (String)row.get("CUST_VALUE")); } return customInfo; }
[ "read CustomInfo list from table.\n\n@param eventId the event id\n@return the map" ]
[ "Add a LIKE clause so the column must mach the value using '%' patterns.", "Write the domain controller data to an S3 file.\n\n@param data the domain controller data\n@param domainName the name of the directory in the bucket to write the S3 file to\n@throws IOException", "Extracts the elements from the source matrix by their 1D index.\n\n@param src Source matrix. Not modified.\n@param indexes array of row indexes\n@param length maximum element in row array\n@param dst output matrix. Must be a vector of the correct length.", "Rethrows platform specific OperationCanceledExceptions and unwraps OperationCanceledErrors. Does nothing for any other type of Throwable.", "Extract the DatabaseTableConfig for a particular class by looking for class and field annotations. This is used\nby internal classes to configure a class.", "the absolute and relative calls are the trickiest parts. We have to\nmove across cursor boundaries potentially.\n\na + row value indexes from beginning of resultset\na - row value indexes from the end of th resulset.\n\nCalling absolute(1) is the same as calling first().\nCalling absolute(-1) is the same as calling last().", "Removes the given entity from the inverse associations it manages.", "Overrides the superclass implementation to allow the AttributeDefinition for each field in the\nobject to in turn resolve that field.\n\n{@inheritDoc}", "Convert an ObjectBank to corresponding collection of data features and\nlabels.\n\n@return A List of pairs, one for each document, where the first element is\nan int[][][] representing the data and the second element is an\nint[] representing the labels." ]
public Collection<Contact> getPublicList(String userId) throws FlickrException { List<Contact> contacts = new ArrayList<Contact>(); Map<String, Object> parameters = new HashMap<String, Object>(); parameters.put("method", METHOD_GET_PUBLIC_LIST); parameters.put("user_id", userId); Response response = transportAPI.get(transportAPI.getPath(), parameters, apiKey, sharedSecret); if (response.isError()) { throw new FlickrException(response.getErrorCode(), response.getErrorMessage()); } Element contactsElement = response.getPayload(); NodeList contactNodes = contactsElement.getElementsByTagName("contact"); for (int i = 0; i < contactNodes.getLength(); i++) { Element contactElement = (Element) contactNodes.item(i); Contact contact = new Contact(); contact.setId(contactElement.getAttribute("nsid")); contact.setUsername(contactElement.getAttribute("username")); contact.setIgnored("1".equals(contactElement.getAttribute("ignored"))); contact.setOnline(OnlineStatus.fromType(contactElement.getAttribute("online"))); contact.setIconFarm(contactElement.getAttribute("iconfarm")); contact.setIconServer(contactElement.getAttribute("iconserver")); if (contact.getOnline() == OnlineStatus.AWAY) { contactElement.normalize(); contact.setAwayMessage(XMLUtilities.getValue(contactElement)); } contacts.add(contact); } return contacts; }
[ "Get the collection of public contacts for the specified user ID.\n\nThis method does not require authentication.\n\n@param userId\nThe user ID\n@return The Collection of Contact objects\n@throws FlickrException" ]
[ "Retrieve timephased baseline work. Note that index 0 represents \"Baseline\",\nindex 1 represents \"Baseline1\" and so on.\n\n@param index baseline index\n@return timephased work, or null if no baseline is present", "Returns true if the lattice contains an entry at the specified location.\n\n@param maturityInMonths The maturity in months to check.\n@param tenorInMonths The tenor in months to check.\n@param moneynessBP The moneyness in bp to check.\n@return True iff there is an entry at the specified location.", "1-D Forward Discrete Cosine Transform.\n\n@param data Data.", "Map custom info.\n\n@param ciType the custom info type\n@return the map", "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", "Gets the metadata on this folder associated with a specified template.\n\n@param templateName the metadata template type name.\n@return the metadata returned from the server.", "This is generally only useful for extensions that delegate some of their functionality to other \"internal\"\nextensions of their own that they need to configure.\n\n@param configuration the configuration to be supplied with the returned analysis context.\n@return an analysis context that is a clone of this instance but its configuration is replaced with the provided\none.", "Select a List of values from a Matcher using a Collection\nto identify the indices to be selected.\n\n@param self a Matcher\n@param indices a Collection of indices\n@return a String of the values at the given indices\n@since 1.6.0", "try to find the first none null table name for the given class-descriptor.\nIf cld has extent classes, all of these cld's searched for the first none null\ntable name." ]
public void setPublishQueueShutdowntime(String publishQueueShutdowntime) { if (m_frozen) { throw new CmsRuntimeException(Messages.get().container(Messages.ERR_CONFIG_FROZEN_0)); } m_publishQueueShutdowntime = Integer.parseInt(publishQueueShutdowntime); }
[ "Sets the publish queue shutdown time.\n\n@param publishQueueShutdowntime the shutdown time to set, parsed as <code>int</code>" ]
[ "Convert a document List into arrays storing the data features and labels.\n\n@param document\nTraining documents\n@return A Pair, where the first element is an int[][][] representing the\ndata and the second element is an int[] representing the labels", "Pass the activity you use the drawer in ;)\nThis is required if you want to set any values by resource\n\n@param activity\n@return", "Get the items for the key.\n\n@param key\n@return the items for the given key", "Format a calendar instance that is parseable from JavaScript, according to ISO-8601.\n\n@param cal the calendar to format to a JSON string\n@return a formatted date in the form of a string", "Get the class name without the package\n\n@param c The class name with package\n@return the class name without the package", "Count the total number of queued resource requests for all queues. The\nresult is \"approximate\" in the face of concurrency since individual\nqueues can change size during the aggregate count.\n\n@return The (approximate) aggregate count of queued resource requests.", "Removes trailing and leading whitespace, and also reduces each\nsequence of internal whitespace to a single space.", "Utility function that copies a string array except for the first element\n\n@param arr Original array of strings\n@return Copied array of strings", "Use this API to fetch dnsnsecrec resource of given name ." ]
private void readLSD() { // Logical screen size. header.width = readShort(); header.height = readShort(); // Packed fields int packed = read(); // 1 : global color table flag. header.gctFlag = (packed & 0x80) != 0; // 2-4 : color resolution. // 5 : gct sort flag. // 6-8 : gct size. header.gctSize = 2 << (packed & 7); // Background color index. header.bgIndex = read(); // Pixel aspect ratio header.pixelAspect = read(); }
[ "Reads Logical Screen Descriptor." ]
[ "Get a state handler for a given patching artifact.\n\n@param artifact the patching artifact\n@param <P>\n@param <S>\n@return the state handler, {@code null} if there is no handler registered for the given artifact", "Log a byte array as a hex dump.\n\n@param data byte array", "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", "Use this API to update nstimeout.", "Check the given JWT\n\n@param jwtString the JSON Web Token\n@return the parsed and verified token or null if token is invalid\n@throws ParseException if the token cannot be parsed", "Retrieve configuration details for a given custom field.\n\n@param field required custom field\n@return configuration detail", "Load the view port execution.\n\n@param then callback when the view port is detected.\n@param fallback fallback when no view port detected or failure to detect the given\n{@link Boundary} (using {@link #propagateFallback(boolean)})", "Counts each property for which there is a statement in the given item\ndocument, ignoring the property thisPropertyIdValue to avoid properties\ncounting themselves.\n\n@param statementDocument\n@param usageRecord\n@param thisPropertyIdValue", "Process the timephased resource assignment data to work out the\nsplit structure of the task.\n\n@param task parent task\n@param timephasedComplete completed resource assignment work\n@param timephasedPlanned planned resource assignment work" ]
protected I_CmsSearchConfigurationFacetRange parseRangeFacet(String pathPrefix) { try { final String range = parseMandatoryStringValue(pathPrefix + XML_ELEMENT_RANGE_FACET_RANGE); final String name = parseOptionalStringValue(pathPrefix + XML_ELEMENT_FACET_NAME); final String label = parseOptionalStringValue(pathPrefix + XML_ELEMENT_FACET_LABEL); final Integer minCount = parseOptionalIntValue(pathPrefix + XML_ELEMENT_FACET_MINCOUNT); final String start = parseMandatoryStringValue(pathPrefix + XML_ELEMENT_RANGE_FACET_START); final String end = parseMandatoryStringValue(pathPrefix + XML_ELEMENT_RANGE_FACET_END); final String gap = parseMandatoryStringValue(pathPrefix + XML_ELEMENT_RANGE_FACET_GAP); final String sother = parseOptionalStringValue(pathPrefix + XML_ELEMENT_RANGE_FACET_OTHER); List<I_CmsSearchConfigurationFacetRange.Other> other = null; if (sother != null) { final List<String> sothers = Arrays.asList(sother.split(",")); other = new ArrayList<I_CmsSearchConfigurationFacetRange.Other>(sothers.size()); for (String so : sothers) { try { I_CmsSearchConfigurationFacetRange.Other o = I_CmsSearchConfigurationFacetRange.Other.valueOf( so); other.add(o); } catch (final Exception e) { LOG.error(Messages.get().getBundle().key(Messages.ERR_INVALID_OTHER_OPTION_1, so), e); } } } final Boolean hardEnd = parseOptionalBooleanValue(pathPrefix + XML_ELEMENT_RANGE_FACET_HARDEND); final Boolean isAndFacet = parseOptionalBooleanValue(pathPrefix + XML_ELEMENT_FACET_ISANDFACET); final List<String> preselection = parseOptionalStringValues(pathPrefix + XML_ELEMENT_FACET_PRESELECTION); final Boolean ignoreAllFacetFilters = parseOptionalBooleanValue( pathPrefix + XML_ELEMENT_FACET_IGNOREALLFACETFILTERS); return new CmsSearchConfigurationFacetRange( range, start, end, gap, other, hardEnd, name, minCount, label, isAndFacet, preselection, ignoreAllFacetFilters); } catch (final Exception e) { LOG.error( Messages.get().getBundle().key( Messages.ERR_RANGE_FACET_MANDATORY_KEY_MISSING_1, XML_ELEMENT_RANGE_FACET_RANGE + ", " + XML_ELEMENT_RANGE_FACET_START + ", " + XML_ELEMENT_RANGE_FACET_END + ", " + XML_ELEMENT_RANGE_FACET_GAP), e); return null; } }
[ "Reads the configuration of a range facet.\n@param pathPrefix The XML Path that leads to the range facet configuration, or <code>null</code> if the XML was not correctly structured.\n@return The read configuration, or <code>null</code> if the XML was not correctly structured." ]
[ "Returns the meta-data for the inverse side of the association represented by the given property on the given\npersister in case it represents the main side of a bi-directional one-to-many or many-to-many association.\n\n@param mainSidePersister persister of the entity hosting the property of interest\n@param propertyIndex index of the property of interest\n@return the meta-data of the inverse side of the specified association or {@code null} if no such meta-data\nexists", "Creates a random vector that is inside the specified span.\n\n@param span The span the random vector belongs in.\n@param rand RNG\n@return A random vector within the specified span.", "Generate a Jongo query with provided the parameter.\n\n@param key\n@param value\n@return String", "Converts the bytes that make up an internet address into the corresponding integer value to make\nit easier to perform bit-masking operations on them.\n\n@param address an address whose integer equivalent is desired\n\n@return the integer corresponding to that address", "Return the value from the field in the object that is defined by this FieldType.", "Try to unlink the declaration from the importerService referenced by the ServiceReference,.\nreturn true if they have been cleanly unlink, false otherwise.\n\n@param declaration The Declaration\n@param declarationBinderRef The ServiceReference of the ImporterService\n@return true if they have been cleanly unlink, false otherwise.", "Returns all visble sets and pools the photo belongs to.\n\nThis method does not require authentication.\n\n@param photoId\nThe photo to return information for.\n@return a list of {@link PhotoContext} objects\n@throws FlickrException", "Pseudo-Inverse of a matrix calculated in the least square sense.\n\n@param matrix The given matrix A.\n@return pseudoInverse The pseudo-inverse matrix P, such that A*P*A = A and P*A*P = P", "This method takes the textual version of a relation type\nand returns an appropriate class instance. Note that unrecognised\nvalues will cause this method to return null.\n\n@param locale target locale\n@param type text version of the relation type\n@return RelationType instance" ]
public static int cudnnSetTensor4dDescriptorEx( cudnnTensorDescriptor tensorDesc, int dataType, /** image data type */ int n, /** number of inputs (batch size) */ int c, /** number of input feature maps */ int h, /** height of input section */ int w, /** width of input section */ int nStride, int cStride, int hStride, int wStride) { return checkResult(cudnnSetTensor4dDescriptorExNative(tensorDesc, dataType, n, c, h, w, nStride, cStride, hStride, wStride)); }
[ "width of input section" ]
[ "Delete an artifact in the Grapes server\n\n@param gavc\n@throws GrapesCommunicationException\n@throws javax.naming.AuthenticationException", "Generate attachment extension from mime type\n\n@param type valid mime-type\n@return extension if it's known for specified mime-type, or empty string\notherwise", "Checks the foreignkeys of all collections in the model.\n\n@param modelDef The model\n@param checkLevel The current check level (this constraint is checked in basic and strict)\n@exception ConstraintException If the value for foreignkey is invalid", "Adds the file to the tar archive represented by output stream. It's caller's responsibility to close output stream\nproperly.\n\n@param out target archive.\n@param source file to be added.\n@param fileSize size of the file (which is known in most cases).\n@throws IOException in case of any issues with underlying store.", "Read filename from spec.", "Helper method to copy the contents of a stream to a file.\n@param outputDirectory The directory in which the new file is created.\n@param stream The stream to copy.\n@param targetFileName The file to write the stream contents to.\n@throws IOException If the stream cannot be copied.", "Returns the plugins classpath elements.", "Processes the template for all collection definitions of the current class definition.\n\n@param template The template\n@param attributes The attributes of the tag\n@exception XDocletException if an error occurs\[email protected] type=\"block\"", "Creates the given connection pool with the given configuration. Extracted here to make unit mocking easier.\n@param config configuration object.\n@return BoneCP connection pool handle." ]
protected final void setDerivedEndType() { m_endType = getPatternType().equals(PatternType.NONE) || getPatternType().equals(PatternType.INDIVIDUAL) ? EndType.SINGLE : null != getSeriesEndDate() ? EndType.DATE : EndType.TIMES; }
[ "Set the end type as derived from other values." ]
[ "return a new managed connection. This connection is wrapped around the real connection and delegates to it\nto get work done.\n@param subject\n@param info\n@return", "Returns whether the division range includes the block of values for its prefix length", "Deploys application reading resources from specified InputStream.\n\n@param inputStream where resources are read\n@throws IOException", "Print a day.\n\n@param day Day instance\n@return day value", "Use this API to fetch tmsessionpolicy_binding resource of given name .", "Get object by identity. First lookup among objects registered in the\ntransaction, then in persistent storage.\n@param id The identity\n@return The object\n@throws PersistenceBrokerException", "Set the occurrences. If the String is invalid, the occurrences will be set to \"-1\" to cause server-side validation to fail.\n@param occurrences the interval to set.", "Set the TableAlias for ClassDescriptor", "If this represents an ip address, returns that address.\nIf this represents a host, returns the resolved ip address of that host.\nOtherwise, returns null, but only for strings that are considered valid address strings but cannot be converted to address objects.\n\nThis method will throw exceptions for invalid formats and failures to resolve the address. The equivalent method {@link #getAddress()} will simply return null rather than throw those exceptions.\n\nIf you wish to get the represented address and avoid DNS resolution, use {@link #asAddress()} or {@link #asAddressString()}\n\n@return" ]
protected boolean isSingleConnection(DatabaseConnection conn1, DatabaseConnection conn2) throws SQLException { // initialize the connections auto-commit flags conn1.setAutoCommit(true); conn2.setAutoCommit(true); try { // change conn1's auto-commit to be false conn1.setAutoCommit(false); if (conn2.isAutoCommit()) { // if the 2nd connection's auto-commit is still true then we have multiple connections return false; } else { // if the 2nd connection's auto-commit is also false then we have a single connection return true; } } finally { // restore its auto-commit conn1.setAutoCommit(true); } }
[ "Return true if the two connections seem to one one connection under the covers." ]
[ "On complete.\nSave response headers when needed.\n\n@param response\nthe response\n@return the response on single request", "Reads a command \"tag\" from the request.", "Generic version of getting value by key from the JobContext of current thread\n@param key the key\n@param clz the val class\n@param <T> the val type\n@return the value", "This method retrieves the data at the given offset and returns\nit as a String, assuming the underlying data is composed of\nsingle byte characters.\n\n@param offset offset of required data\n@return string containing required data", "Creates the parents of nested XML elements if necessary.\n@param xmlContent the XML content that is edited.\n@param xmlPath the path of the (nested) element, for which the parents should be created\n@param l the locale for which the XML content is edited.", "Returns the primary message codewords for mode 2.\n\n@param postcode the postal code\n@param country the country code\n@param service the service code\n@return the primary message, as codewords", "Set the mbean server on the QueryExp and try and pass back any previously set one", "Populate a sorted list of custom fields to ensure that these fields\nare written to the file in a consistent order.", "Copy a patch element\n\n@param entry the patch entry\n@param patchId the patch id for the element\n@param modifications the element modifications\n@return the new patch element" ]
private static void listCalendars(ProjectFile file) { for (ProjectCalendar cal : file.getCalendars()) { System.out.println(cal.toString()); } }
[ "List details of all calendars in the file.\n\n@param file ProjectFile instance" ]
[ "used for upload progress", "Execute a partitioned query using an index and a query selector.\n\nOnly available in partitioned databases. To verify a database is partitioned call\n{@link Database#info()} and check that {@link DbInfo.Props#getPartitioned()} returns\n{@code true}.\n\n<p>Example usage:</p>\n<pre>\n{@code\n// Query database partition 'Coppola'.\nQueryResult<Movie> movies = db.query(\"Coppola\", new QueryBuilder(and(\ngt(\"Movie_year\", 1960),\neq(\"Person_name\", \"Al Pacino\"))).\nfields(\"Movie_name\", \"Movie_year\").\nbuild(), Movie.class);\n}\n</pre>\n\n@param partitionKey Database partition to query.\n@param query String representation of a JSON object describing criteria used to\nselect documents.\n@param classOfT The class of Java objects to be returned in the {@code docs} field of\nresult.\n@param <T> The type of the Java object to be returned in the {@code docs} field of\nresult.\n@return A {@link QueryResult} object, containing the documents matching the query\nin the {@code docs} field.\n@see com.cloudant.client.api.Database#query(String, Class)", "Use this API to fetch systemsession resources of given names .", "Takes a numeric string value and converts it to a integer between 0 and 100.\n\nreturns 0 if the string is not numeric.\n\n@param percentage - A numeric string value\n@return a integer between 0 and 100", "Creates the main component of the editor with all sub-components.\n@return the completely filled main component of the editor.\n@throws IOException thrown if setting the table's content data source fails.\n@throws CmsException thrown if setting the table's content data source fails.", "Deletes the given directory.\n\n@param directory The directory to delete.", "Returns true if this entity's primary key is not null, and for numeric\nfields, is non-zero.", "Returns with a view of all scopes known by this manager.", "Adds a foreignkey to this table.\n\n@param relationName The name of the relation represented by the foreignkey\n@param remoteTable The referenced table\n@param localColumns The local columns\n@param remoteColumns The remote columns" ]
public <T extends StatementDocument> void nullEdit(PropertyIdValue propertyId) throws IOException, MediaWikiApiErrorException { PropertyDocument currentDocument = (PropertyDocument) this.wikibaseDataFetcher .getEntityDocument(propertyId.getId()); nullEdit(currentDocument); }
[ "Performs a null edit on a property. This has some effects on Wikibase,\nsuch as refreshing the labels of the referred items in the UI.\n\n@param propertyId\nthe document to perform a null edit on\n@throws MediaWikiApiErrorException\nif the API returns errors\n@throws IOException\nif there are any IO errors, such as missing network connection" ]
[ "Gets the registration point that been associated with the registration for the longest period.\n\n@return the initial registration point, or {@code null} if there are no longer any registration points", "Called when a payload thread has ended. This also notifies the poller to poll once again.", "Creates a future that will send a request to the reporting host and call\nthe handler with the response\n\n@param path the path at the reporting host which the request will be made\n@param reportingHandler the handler to receive the response once executed\nand recieved\n@return a {@link java.util.concurrent.Future} for handing the request", "Adjusts the day in the provided month, that it fits the specified week day.\nIf there's no match for that provided month, the next possible month is checked.\n\n@param date the date to adjust, with the correct year and month already set.", "Given a binary expression corresponding to an assignment, will check that the type of the RHS matches one\nof the possible setters and if not, throw a type checking error.\n@param expression the assignment expression\n@param leftExpression left expression of the assignment\n@param rightExpression right expression of the assignment\n@param setterInfo possible setters\n@return true if type checking passed", "Update the underlying buffer using the short\n\n@param number number to be stored in checksum buffer", "Use this API to create sslfipskey.", "Create a new DirectByteBuffer from a given address and size.\nThe returned DirectByteBuffer does not release the memory by itself.\n\n@param addr\n@param size\n@param att object holding the underlying memory to attach to the buffer.\nThis will prevent the garbage collection of the memory area that's\nassociated with the new <code>DirectByteBuffer</code>\n@return", "Method to read our client's plain text\n\n@param file_name\n@return the filereader to translate client's plain text into our files\n@throws BeastException\nif any problem is found whit the file" ]
public int getTrailingBitCount(boolean network) { int count = getDivisionCount(); if(count == 0) { return 0; } long back = network ? 0 : getDivision(0).getMaxValue(); int bitLen = 0; for(int i = count - 1; i >= 0; i--) { IPAddressDivision seg = getDivision(i); long value = seg.getDivisionValue(); if(value != back) { return bitLen + seg.getTrailingBitCount(network); } bitLen += seg.getBitCount(); } return bitLen; }
[ "Returns the number of consecutive trailing one or zero bits.\nIf network is true, returns the number of consecutive trailing zero bits.\nOtherwise, returns the number of consecutive trailing one bits.\n\n@param network\n@return" ]
[ "Constructs a relative path between this path and a given path.\n\n<p> Relativization is the inverse of {@link #getAbsolutePath(Path) resolution}.\nThis method attempts to construct a {@link #isAbsolute relative} path\nthat when {@link #getAbsolutePath(Path) resolved} against this path, yields a\npath that locates the same file as the given path. For example, on UNIX,\nif this path is {@code \"/a/b\"} and the given path is {@code \"/a/b/c/d\"}\nthen the resulting relative path would be {@code \"c/d\"}.\nBoth paths must be absolute and and either this path or the given path must be a\n{@link #startsWith(Path) prefix} of the other.\n\n@param other\nthe path to relativize against this path\n\n@return the resulting relative path or null if neither of the given paths is a prefix of the other\n\n@throws IllegalArgumentException\nif this path and {@code other} are not both absolute or relative", "Remove the listener active in this session.\n\n@param listenerId the id of the listener to remove", "Generates an organization regarding the parameters.\n\n@param name String\n@return Organization", "Retrieves the time at which work starts on the given date, or returns\nnull if this is a non-working day.\n\n@param date Date instance\n@return start time, or null for non-working day", "Emit information about a single suite and all of its tests.", "Analyzes a failure thrown connecting to the master for causes that indicate\nsome problem not likely to be resolved by immediately retrying. If found,\nthrows an exception highlighting the underlying cause. If the cause is not\none of the ones understood by this method, the method returns normally.\n\n@throws org.jboss.as.domain.controller.SlaveRegistrationException if the remote HC rejected the request\n@throws IllegalStateException for other failures understood by this method", "Set the position of the given Matcher to the given index.\n\n@param matcher a Matcher\n@param idx the index number\n@since 1.0", "Return the regression basis functions.\n\n@param exerciseDate The date w.r.t. which the basis functions should be measurable.\n@param model The model.\n@return Array of random variables.\n@throws net.finmath.exception.CalculationException Thrown if the valuation fails, specific cause may be available via the <code>cause()</code> method.", "Created a fresh CancelIndicator" ]
public DockerContainerObjectBuilder<T> withEnrichers(Collection<TestEnricher> enrichers) { if (enrichers == null) { throw new IllegalArgumentException("enrichers cannot be null"); } this.enrichers = enrichers; return this; }
[ "Specifies the list of enrichers that will be used to enrich the container object.\n\n@param enrichers\nlist of enrichers that will be used to enrich the container object\n\n@return the current builder instance" ]
[ "Get a value from a date metadata field.\n@param path the key path in the metadata object. Must be prefixed with a \"/\".\n@return the metadata value as a Date.\n@throws ParseException when the value cannot be parsed as a valid date", "Add a resource assignment which has been populated elsewhere.\n\n@param assignment resource assignment", "Saves the favorites.\n\n@param favorites the list of favorites to save\n@throws CmsException if something goes wrong", "Deletes and publishes resources with ID conflicts.\n\n@param cms the CMS context to use\n@param module the module\n@param conflictingIds the conflicting ids\n@throws CmsException if something goes wrong\n@throws Exception if something goes wrong", "Runs a query that returns a single int.", "Checks the given field descriptor.\n\n@param fieldDef The field descriptor\n@param checkLevel The amount of checks to perform\n@exception ConstraintException If a constraint has been violated", "Use this API to update tmtrafficaction resources.", "Returns a Pair constructed from X and Y. Convenience method; the\ncompiler will disambiguate the classes used for you so that you\ndon't have to write out potentially long class names.", "lookup current maximum value for a single field in\ntable the given class descriptor was associated." ]
protected View postDeclineView() { return new TopLevelWindowRedirect() { @Override protected String getRedirectUrl(Map<String, ?> model) { return postDeclineUrl; } }; }
[ "View that redirects the top level window to the URL defined in postDeclineUrl property after user declines to authorize application.\nMay be overridden for custom views, particularly in the case where the post-decline view should be rendered in-canvas.\n@return a view to display after a user declines authoriation. Defaults as a redirect to postDeclineUrl" ]
[ "Add a single header key-value pair. If one with the name already exists,\nboth stay in the header map.\n\n@param name the name of the header.\n@param value the value of the header.\n@return the interceptor instance itself.", "Converts from partitionId to nodeId. The list of partition IDs,\npartitionIds, is expected to be a \"replicating partition list\", i.e., the\nmapping from partition ID to node ID should be one to one.\n\n@param partitionIds List of partition IDs for which to find the Node ID\nfor the Node that owns the partition.\n@return List of node ids, one for each partition ID in partitionIds\n@throws VoldemortException If multiple partition IDs in partitionIds map\nto the same Node ID.", "Initializes class data structures and parameters", "Retrieves a string value from the extended data.\n\n@param type Type identifier\n@return string value", "Whether the address is IPv4-compatible\n\n@see java.net.Inet6Address#isIPv4CompatibleAddress()", "This procedure sets permissions to the given file to not allow everybody to read it.\n\nOnly when underlying OS allows the change.\n\n@param file File to set permissions", "Use this API to add dospolicy resources.", "Returns the default jdbc type for the given java type.\n\n@param javaType The qualified java type\n@return The default jdbc type", "Use this API to disable snmpalarm of given name." ]
public static String replaceParameters(final InputStream stream) { String content = IOUtil.asStringPreservingNewLines(stream); return resolvePlaceholders(content); }
[ "Method that takes an inputstream, read it preserving the end lines, and subtitute using commons-lang-3 calls\nthe variables, first searching as system properties vars and then in environment var list.\nIn case of missing the property is replaced by white space.\n@param stream\n@return" ]
[ "Logs an error by sending an error event to all listeners.\n\nError events can be generated by any part of GearVRF,\nfrom any thread. They are always sent to the event receiver\nof the GVRContext.\n\n@param message error message\n@param sender object which had the error\n@see IErrorEvents", "123.2.3.4 is 4.3.2.123.in-addr.arpa.", "Print formatted string in the center of 80 chars line, left and right padded.\n\n@param format\nThe string format pattern\n@param args\nThe string format arguments", "Add image in the document.\n\n@param context\nPDF context\n@param imageResult\nimage\n@throws BadElementException\nPDF construction problem\n@throws IOException\nPDF construction problem", "Randomly shuffle partitions between nodes within every zone.\n\n@param nextCandidateCluster cluster object.\n@param randomSwapAttempts See RebalanceCLI.\n@param randomSwapSuccesses See RebalanceCLI.\n@param randomSwapZoneIds The set of zoneIds to consider. Each zone is done\nindependently.\n@param storeDefs List of store definitions\n@return updated cluster", "Use this API to delete gslbsite resources of given names.", "Make sure that the Identity objects of garbage collected cached\nobjects are removed too.", "Convert a request type string to value\n\n@param requestType String value of request type GET/POST/PUT/DELETE\n@return Matching REQUEST_TYPE. Defaults to ALL", "Adds the value to the Collection mapped to by the key." ]
@SuppressWarnings("unused") @XmlID @XmlAttribute(name = "id") private String getXmlID(){ return String.format("%s-%s", this.getClass().getSimpleName(), Long.valueOf(id)); }
[ "to do with XmlId value being strictly of type 'String'" ]
[ "Retrieves an object that has been attached to this context.\n\n@param key the key to the attachment.\n@param <V> the value type of the attachment.\n\n@return the attachment if found otherwise {@code null}.", "The Critical field indicates whether a task has any room in the schedule\nto slip, or if a task is on the critical path. The Critical field contains\nYes if the task is critical and No if the task is not critical.\n\n@return boolean", "Returns an entry with the given proposal and the prefix from the context, or null if the proposal is not valid.", "Load the view port execution.\n\n@param then callback when the view port is detected.\n@param fallback fallback when no view port detected or failure to detect the given\n{@link Boundary} (using {@link #propagateFallback(boolean)})", "Print the visibility adornment of element e prefixed by\nany stereotypes", "use this method to construct the ChainingIterator\niterator by iterator.", "Creates the save and exit button UI Component.\n@return the save and exit button.", "Get the service implementations for a given type name.\n\n@param serviceTypeName the type name\n@return the possibly empty list of services", "This filter adds rounded corners to the image using the specified color as the background.\n\n@param radiusInner amount of pixels to use as radius.\n@param radiusOuter specifies the second value for the ellipse used for the radius. Use 0 for\nno value.\n@param color fill color for clipped region." ]
public static void addOperation(final OperationContext context) { RbacSanityCheckOperation added = context.getAttachment(KEY); if (added == null) { // TODO support managed domain if (!context.isNormalServer()) return; context.addStep(createOperation(), INSTANCE, Stage.MODEL); context.attach(KEY, INSTANCE); } }
[ "Add the operation at the end of Stage MODEL if this operation has not already been registered.\n\nThis operation should be added if any of the following occur: -\n- The authorization configuration is removed from a security realm.\n- The rbac provider is changed to rbac.\n- A role is removed.\n- An include is removed from a role.\n- A management interface is removed.\n\nNote: This list only includes actions that could invalidate the configuration, actions that would not invalidate the\nconfiguration do not need this operation registering. e.g. Adding a role, if the configuration was already valid this\ncould not invalidate it.\n\n@param context - The OperationContext to use to register the step." ]
[ "Load resource content from given path into variable with\ntype specified by `spec`.\n\n@param resourcePath the resource path\n@param spec {@link BeanSpec} specifies the return value type\n@return the resource content in a specified type or `null` if resource not found\n@throws UnexpectedException if return value type not supported", "Set the value for a floating point vector of length 3.\n@param key name of uniform to set.\n@param x new X value\n@param y new Y value\n@param z new Z value\n@see #getVec3\n@see #getFloatVec(String)", "Extract schema of the key field", "Adding environment and system variables to build info.\n\n@param builder", "Reads the file version and configures the expected file format.\n\n@param token token containing the file version\n@throws MPXJException", "Reads a markdown link.\n\n@param out\nThe StringBuilder to write to.\n@param in\nInput String.\n@param start\nStarting position.\n@return The new position or -1 if this is no valid markdown link.", "Use this API to kill systemsession.", "Convenience method dispatches this object to the source appender, which\nwill result in the custom message being appended to the new file.\n\n@param message\nThe custom logging message to be appended.", "Use this API to expire cachecontentgroup resources." ]
public static final Number parseExtendedAttributeCurrency(String value) { Number result; if (value == null) { result = null; } else { result = NumberHelper.getDouble(Double.parseDouble(correctNumberFormat(value)) / 100); } return result; }
[ "Parse an extended attribute currency value.\n\n@param value string representation\n@return currency value" ]
[ "Calling this twice will not actually overwrite the gauge\n\n@param collectionSizeGauge", "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 children", "This method is called recursively to write a task and its child tasks\nto the JSON file.\n\n@param task task to write", "Create a KnowledgeBuilderConfiguration on which properties can be set. Use\nthe given properties file and ClassLoader - either of which can be null.\n@return\nThe KnowledgeBuilderConfiguration.", "Gets validation errors either as a JSON string, or null if there are no validation errors.\n\n@return the validation error JSON", "Use this API to fetch filtered set of appfwlearningsettings resources.\nset the filter parameter values in filtervalue object.", "send object to client and serialize it using JSON\n\n@param objectToSend the object to send\n@param cb the callback after sending the message", "Determines if the queue identified by the given key is a regular queue.\n\n@param jedis\nconnection to Redis\n@param key\nthe key that identifies a queue\n@return true if the key identifies a regular queue, false otherwise", "Return an instance of this class.\n\n@param container Solr CoreContainer container object in order to create a server object.\n\n@return instance of CmsSolrSpellchecker" ]
public static <K, V, T> Map<K, List<Versioned<V>>> getAll(Store<K, V, T> storageEngine, Iterable<K> keys, Map<K, T> transforms) { Map<K, List<Versioned<V>>> result = newEmptyHashMap(keys); for(K key: keys) { List<Versioned<V>> value = storageEngine.get(key, transforms != null ? transforms.get(key) : null); if(!value.isEmpty()) result.put(key, value); } return result; }
[ "Implements getAll by delegating to get." ]
[ "Use this API to fetch ipset_nsip_binding resources of given name .", "Sets the texture this render target will render to.\nIf no texture is provided, the render target will\nnot render anything.\n@param texture GVRRenderTexture to render to.", "Gets the type to use for the Vaadin table column corresponding to the c-th column in this result.\n\n@param c the column index\n@return the class to use for the c-th Vaadin table column", "Adds the specified list of users as followers to the project. Followers are a subset of members, therefore if\nthe users are not already members of the project they will also become members as a result of this operation.\nReturns the updated project record.\n\n@param project The project to add followers to.\n@return Request object", "Reads the bundle descriptor, sets m_desc and m_descContent.\n@throws CmsXmlException thrown when unmarshalling fails.\n@throws CmsException thrown when reading the resource fails or several bundle descriptors for the bundle exist.", "Deletes a product from the database\n\n@param name String", "scroll only once", "Validates for non-conflicting roles", "the applications main loop." ]
public void setNearClippingDistance(float near) { if(leftCamera instanceof GVRCameraClippingDistanceInterface && centerCamera instanceof GVRCameraClippingDistanceInterface && rightCamera instanceof GVRCameraClippingDistanceInterface) { ((GVRCameraClippingDistanceInterface)leftCamera).setNearClippingDistance(near); centerCamera.setNearClippingDistance(near); ((GVRCameraClippingDistanceInterface)rightCamera).setNearClippingDistance(near); } }
[ "Sets the distance from the origin to the near clipping plane for the\nwhole camera rig.\n\n@param near\nDistance to the near clipping plane." ]
[ "Start component timer for current instance\n@param type - of component", "Return the number of ignored or assumption-ignored tests.", "Use this API to fetch policydataset resource of given name .", "Creates a spin wrapper for a data input. The data format of the\ninput is assumed to be JSON.\n\n@param input the input to wrap\n@return the spin wrapper for the input\n\n@throws IllegalArgumentException in case an argument of illegal type is provided (such as 'null')", "Indicates if the type is a simple Web Bean\n\n@param clazz The type to inspect\n@return True if simple Web Bean, false otherwise", "Prepares a statement with parameters that should work with most RDBMS.\n\n@param con the connection to utilize\n@param sql the sql syntax to use when creating the statement.\n@param scrollable determines if the statement will be scrollable.\n@param createPreparedStatement if <code>true</code>, then a\n{@link PreparedStatement} will be created. If <code>false</code>, then\na {@link java.sql.CallableStatement} will be created.\n@param explicitFetchSizeHint will be used as fetchSize hint\n(if applicable) if > 0\n\n@return a statement that can be used to execute the syntax contained in\nthe <code>sql</code> argument.", "Restores a trashed folder to a new location with a new name.\n@param folderID the ID of the trashed folder.\n@param newName an optional new name to give the folder. This can be null to use the folder's original name.\n@param newParentID an optional new parent ID for the folder. This can be null to use the folder's original\nparent.\n@return info about the restored folder.", "Finish service initialization.\n\n@throws GeomajasException oops", "Clears the collection and uses the iterator to run through the dao and delete all of the items in the collection\nfrom the associated database table. This is different from removing all of the elements in the table since this\niterator is across just one item's foreign objects." ]
public static void doExtendTraits(final ClassNode cNode, final SourceUnit unit, final CompilationUnit cu) { if (cNode.isInterface()) return; boolean isItselfTrait = Traits.isTrait(cNode); SuperCallTraitTransformer superCallTransformer = new SuperCallTraitTransformer(unit); if (isItselfTrait) { checkTraitAllowed(cNode, unit); return; } if (!cNode.getNameWithoutPackage().endsWith(Traits.TRAIT_HELPER)) { List<ClassNode> traits = findTraits(cNode); for (ClassNode trait : traits) { TraitHelpersTuple helpers = Traits.findHelpers(trait); applyTrait(trait, cNode, helpers); superCallTransformer.visitClass(cNode); if (unit!=null) { ASTTransformationCollectorCodeVisitor collector = new ASTTransformationCollectorCodeVisitor(unit, cu.getTransformLoader()); collector.visitClass(cNode); } } } }
[ "Given a class node, if this class node implements a trait, then generate all the appropriate\ncode which delegates calls to the trait. It is safe to call this method on a class node which\ndoes not implement a trait.\n@param cNode a class node\n@param unit the source unit" ]
[ "Remove the S3 file that contains the domain controller data.\n\n@param directoryName the name of the directory that contains the S3 file", "Required to close the connection reading on the terminal, otherwise\nit can't be interrupted.\n\n@throws InterruptedException", "Runs the given xpath and returns a boolean result.", "Use this API to fetch all the sslparameter resources that are configured on netscaler.", "Adds a row for the given component at the end of the group.\n\n@param component the component to wrap in the row to be added", "convert selector used in an upsert statement into a document", "Returns the complete task record for a single task.\n\n@param task The task to get.\n@return Request object", "Get the type created by selecting only a subset of properties from this\ntype. The type must be a map for this to work\n\n@param properties The properties to select\n@return The new type definition", "Checks if the given argument is null and throws an exception with a\nmessage containing the argument name if that it true.\n\n@param argument the argument to check for null\n@param argumentName the name of the argument to check.\nThis is used in the exception message.\n@param <T> the type of the argument\n@return the argument itself\n@throws IllegalArgumentException in case argument is null" ]
private void readResources(Project ganttProject) { Resources resources = ganttProject.getResources(); readResourceCustomPropertyDefinitions(resources); readRoleDefinitions(ganttProject); for (net.sf.mpxj.ganttproject.schema.Resource gpResource : resources.getResource()) { readResource(gpResource); } }
[ "This method extracts resource data from a GanttProject file.\n\n@param ganttProject parent node for resources" ]
[ "Each string item rendering requires the border and a space on both sides.\n\n12 3 12 3 12 34\n+----- +-------- +------+\nabc venkat last\n\n@param colCount\n@param colMaxLenList\n@param data\n@return", "Convert this buffer to a java array.\n@return", "return a prepared Update Statement fitting to the given ClassDescriptor", "Read the table from the file and populate the supplied Table instance.\n\n@param file database file\n@param table Table instance", "static expansion helpers", "Verify the given job types are all valid.\n\n@param jobTypes the given job types\n@throws IllegalArgumentException if any of the job types are invalid\n@see #checkJobType(String, Class)", "Demonstrates how to add an override to an existing path", "With this impl, it only returns the same credentials once. Otherwise it's possible that a loop will occur.\nWhen server returns status code 401, the HTTP client provides the same credentials forever.\nSince we create a new HTTP client for every request, we can handle it this way.", "returns null if no device is found." ]
public String getAccuracyDescription(int numDigits) { NumberFormat nf = NumberFormat.getNumberInstance(); nf.setMaximumFractionDigits(numDigits); Triple<Double, Integer, Integer> accu = getAccuracyInfo(); return nf.format(accu.first()) + " (" + accu.second() + "/" + (accu.second() + accu.third()) + ")"; }
[ "Returns a String summarizing overall accuracy that will print nicely." ]
[ "Generates a Map of query parameters for Artifact regarding the filters\n\n@return Map<String, Object>", "Set the main attribute \"Bundle-RequiredExecutionEnvironment\" to the given\nvalue.\n\n@param bree The new value", "Returns the single abstract method of a class node, if it is a SAM type, or null otherwise.\n@param type a type for which to search for a single abstract method\n@return the method node if type is a SAM type, null otherwise", "Should be called after all rows have been created\n@param headerStyle\n@param totalStyle\n@param totalHeaderStyle\n@return", "Support the subscript operator for String.\n\n@param text a String\n@param index the index of the Character to get\n@return the Character at the given index\n@since 1.0", "Reads the XER file table and row structure ready for processing.\n\n@param is input stream\n@throws MPXJException", "A specific, existing task can be deleted by making a DELETE request on the\nURL for that task. Deleted tasks go into the \"trash\" of the user making\nthe delete request. Tasks can be recovered from the trash within a period\nof 30 days; afterward they are completely removed from the system.\n\nReturns an empty data record.\n\n@param task The task to delete.\n@return Request object", "Returns a BSON version document representing a new version with a new instance ID, and\nversion counter of zero.\n@return a BsonDocument representing a synchronization version", "Use this API to fetch the statistics of all vpath_stats resources that are configured on netscaler." ]
static boolean isOnClasspath(String className) { boolean isOnClassPath = true; try { Class.forName(className); } catch (ClassNotFoundException exception) { isOnClassPath = false; } return isOnClassPath; }
[ "Checks if class is on class path\n@param className of the class to check.\n@return true if class in on class path, false otherwise." ]
[ "Returns a correlation matrix which has rank &lt; n and for which the first n factors agree with the factors of correlationMatrix.\n\n@param correlationMatrix The given correlation matrix.\n@param numberOfFactors The requested number of factors (Eigenvectors).\n@return Factor reduced correlation matrix.", "Build and return a string version of the query. If you change the where or make other calls you will need to\nre-call this method to re-prepare the query for execution.", "Check if the print has not been asked to stop taking new jobs.\n\n@return true if it's OK to take new jobs.", "Creates the stats type.\n\n@param statsItems\nthe stats items\n@param sortType\nthe sort type\n@param functionParser\nthe function parser\n@return the string", "Counts one entity. Every once in a while, the current time is checked so\nas to print an intermediate report roughly every ten seconds.", "Use this API to update nsacl6 resources.", "Tests if this enumeration contains more elements.\n@return <code>true</code> if and only if this enumeration object\ncontains at least one more element to provide;\n<code>false</code> otherwise.", "Token Info\nReturns the Token Information\n@return ApiResponse&lt;TokenInfoSuccessResponse&gt;\n@throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body", "Use this API to fetch clusternodegroup_nslimitidentifier_binding resources of given name ." ]
public static int[] binaryToRgb(boolean[] binaryArray) { int[] rgbArray = new int[binaryArray.length]; for (int i = 0; i < binaryArray.length; i++) { if (binaryArray[i]) { rgbArray[i] = 0x00000000; } else { rgbArray[i] = 0x00FFFFFF; } } return rgbArray; }
[ "Converts a boolean array containing the pixel data in BINARY mode to an\ninteger array with the pixel data in RGB mode.\n\n@param binaryArray pixel binary data\n@return pixel integer data in RGB mode." ]
[ "This method is called to format a date. It will return the null text\nif a null value is supplied.\n\n@param value date value\n@return formatted date value", "Writes data to delegate stream if it has been set.\n\n@param data the data to write", "return a prepared DELETE Statement fitting for the given ClassDescriptor", "Reads and returns the mediator URN from the JSON content.\n\n@see #RegistrationConfig(String)", "Gets the task from in progress map.\n\n@param jobId\nthe job id\n@return the task from in progress map", "Checks that index is valid an throw an exception if not.\n\n@param type the type\n@param index the index to check", "Get an array of property ids.\n\nNot all property ids need be returned. Those properties\nwhose ids are not returned are considered non-enumerable.\n\n@return an array of Objects. Each entry in the array is either\na java.lang.String or a java.lang.Number", "Use this API to update spilloverpolicy.", "Check, if the current user has permissions on the document's resource.\n@param cms the context\n@param doc the solr document (from the search result)\n@param filter the resource filter to use for checking permissions\n@return <code>true</code> iff the resource mirrored by the search result can be read by the current user." ]
private void getMonthlyAbsoluteDates(Calendar calendar, int frequency, List<Date> dates) { int currentDayNumber = calendar.get(Calendar.DAY_OF_MONTH); calendar.set(Calendar.DAY_OF_MONTH, 1); int requiredDayNumber = NumberHelper.getInt(m_dayNumber); if (requiredDayNumber < currentDayNumber) { calendar.add(Calendar.MONTH, 1); } while (moreDates(calendar, dates)) { int useDayNumber = requiredDayNumber; int maxDayNumber = calendar.getActualMaximum(Calendar.DAY_OF_MONTH); if (useDayNumber > maxDayNumber) { useDayNumber = maxDayNumber; } calendar.set(Calendar.DAY_OF_MONTH, useDayNumber); dates.add(calendar.getTime()); calendar.set(Calendar.DAY_OF_MONTH, 1); calendar.add(Calendar.MONTH, frequency); } }
[ "Calculate start dates for a monthly absolute recurrence.\n\n@param calendar current date\n@param frequency frequency\n@param dates array of start dates" ]
[ "Returns the modules paths used on the command line.\n\n@return the paths separated by the {@link File#pathSeparator path separator}", "Replace bad xml charactes in given array by space\n\n@param cbuf buffer to replace in\n@param off Offset from which to start reading characters\n@param len Number of characters to be replaced", "Read an optional boolean value form a JSON Object.\n@param json the JSON object to read from.\n@param key the key for the boolean value in the provided JSON object.\n@return the boolean or null if reading the boolean fails.", "Private used static method for creation of a RemoteWebDriver. Taking care of the default\nCapabilities and using the HttpCommandExecutor.\n\n@param hubUrl the url of the hub to use.\n@return the RemoteWebDriver instance.", "Transforms an input file into HTML using the given Configuration.\n\n@param file\nThe File to process.\n@param configuration\nthe Configuration\n@return The processed String.\n@throws IOException\nif an IO error occurs\n@since 0.7\n@see Configuration", "Convert this path address to its model node representation.\n\n@return the model node list of properties", "Returns all the persistent id generators which potentially require the creation of an object in the schema.", "Creates a map between a work pattern ID and a list of time entry rows.\n\n@param rows time entry rows\n@return time entry map", "Validates given external observer method.\n\n@param observerMethod the given observer method\n@param beanManager\n@param originalObserverMethod observer method replaced by given observer method (this parameter is optional)" ]
private static String handleRichError(final Response response, final String body) { if (!response.getHeaders().containsKey(Headers.CONTENT_TYPE) || !response.getHeaders().get(Headers.CONTENT_TYPE).equals(ContentTypes.APPLICATION_JSON)) { return body; } final Document doc; try { doc = BsonUtils.parseValue(body, Document.class); } catch (Exception e) { return body; } if (!doc.containsKey(Fields.ERROR)) { return body; } final String errorMsg = doc.getString(Fields.ERROR); if (!doc.containsKey(Fields.ERROR_CODE)) { return errorMsg; } final String errorCode = doc.getString(Fields.ERROR_CODE); throw new StitchServiceException(errorMsg, StitchServiceErrorCode.fromCodeName(errorCode)); }
[ "Private helper method which decodes the Stitch error from the body of an HTTP `Response`\nobject. If the error is successfully decoded, this function will throw the error for the end\nuser to eventually consume. If the error cannot be decoded, this is likely not an error from\nthe Stitch server, and this function will return an error message that the calling function\nshould use as the message of a StitchServiceException with an unknown code." ]
[ "Set the named roles which may be defined.\n\n@param roles map with roles, keys are the values for {@link #rolesAttribute}, probably DN values\n@since 1.10.0", "Set the \"everyWorkingDay\" flag.\n@param isEveryWorkingDay flag, indicating if the event should take place every working day.", "Function to filter files based on defined rules.", "Validates a String to be a valid name to be used in MongoDB for a field name.\n\n@param fieldName", "Find the length of the block starting from 'start'.", "Use this API to add snmpmanager resources.", "needs to be resolved once extension beans are deployed", "Stops and clears all transitions", "Plots the MSD curve for trajectory t\n@param t Trajectory to calculate the msd curve\n@param lagMin Minimum timelag (e.g. 1,2,3..) lagMin*timelag = elapsed time in seconds\n@param lagMax Maximum timelag (e.g. 1,2,3..) lagMax*timelag = elapsed time in seconds\n@param msdeval Evaluates the mean squared displacment" ]