query
stringlengths
74
6.1k
positive
sequencelengths
1
1
negative
sequencelengths
9
9
public static double SquaredEuclidean(double[] x, double[] y) { double d = 0.0, u; for (int i = 0; i < x.length; i++) { u = x[i] - y[i]; d += u * u; } return d; }
[ "Gets the Square Euclidean distance between two points.\n\n@param x A point in space.\n@param y A point in space.\n@return The Square Euclidean distance between x and y." ]
[ "set custom response for profile's default client\n\n@param profileName profileName to modify\n@param pathName friendly name of path\n@param customData custom request data\n@return true if success, false otherwise", "Verifies that the given query can be properly scattered.\n\n@param query the query to verify\n@throws IllegalArgumentException if the query is invalid.", "Function to perform the forward pass for batch convolution", "Returns the command to run by the shell to normally run the checkin script.\n@return the command to run by the shell to normally run the checkin script.", "Called when a ParentViewHolder has triggered an expansion for it's parent\n\n@param flatParentPosition the position of the parent that is calling to be expanded", "Returns the connection count by key specified in this registry\n\nNote it might count connections that are closed but not removed from registry yet\n\n@param key\nthe key\n@return connection count by key", "Creates a scatter query from the given user query\n\n@param query the user's query.\n@param numSplits the number of splits to create.", "Determine whether the user has followed bean-like naming convention or not.", "Determine whether we should use the normal repaint process, or delegate that to another component that is\nhosting us in a soft-loaded manner to save memory.\n\n@param x the left edge of the region that we want to have redrawn\n@param y the top edge of the region that we want to have redrawn\n@param width the width of the region that we want to have redrawn\n@param height the height of the region that we want to have redrawn" ]
public <T> InternalEjbDescriptor<T> get(String beanName) { return cast(ejbByName.get(beanName)); }
[ "Gets an iterator to the EJB descriptors for an EJB implementation class\n\n@param beanClass The EJB class\n@return An iterator" ]
[ "Utility function that fetches system store definitions\n\n@return The map container that maps store names to store definitions", "Try to get the line number associated with the given member.\n\nThe reflection API does not expose such an info and so we need to analyse the bytecode. Unfortunately, it seems there is no way to get this kind of\ninformation for fields. Moreover, the <code>LineNumberTable</code> attribute is just optional, i.e. the compiler is not required to store this\ninformation at all. See also <a href=\"http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html#jvms-4.1\">Java Virtual Machine Specification</a>\n\nImplementation note: it wouldn't be appropriate to add a bytecode scanning dependency just for this functionality, therefore Apache BCEL included in\nOracle JDK 1.5+ and OpenJDK 1.6+ is used. Other JVMs should not crash as we only use it if it's on the classpath and by means of reflection calls.\n\n@param member\n@param resourceLoader\n@return the line number or 0 if it's not possible to find it", "Seeks forward or backwards to a particular holiday based on the current date\n\n@param holidayString The holiday to seek to\n@param direction The direction to seek\n@param seekAmount The number of years to seek", "Use this API to disable nsacl6 resources of given names.", "once animation is setup, start the animation record the beginning and\nending time for the animation", "Returns the u component of a coordinate from a texture coordinate set.\n\n@param vertex the vertex index\n@param coords the texture coordinate set\n@return the u component", "Copy the contents of this buffer begginning from the srcOffset to a destination byte array\n@param srcOffset\n@param destArray\n@param destOffset\n@param size", "Adds service locator properties to an endpoint reference.\n@param epr\n@param props", "Retrieve the value of a single-valued parameter.\n\n@param key\n@param defaultValue\n@param cnx" ]
public void setWorkingDay(Day day, boolean working) { setWorkingDay(day, (working ? DayType.WORKING : DayType.NON_WORKING)); }
[ "convenience method for setting working or non-working days.\n\n@param day required day\n@param working flag indicating if the day is a working day" ]
[ "This method is used to calculate the duration of work between two fixed\ndates according to the work schedule defined in the named calendar.\nThe name of the calendar to be used is passed as an argument.\n\n@param calendarName name of the calendar to use\n@param startDate start of the period\n@param endDate end of the period\n@return new Duration object\n@throws MPXJException normally when no Standard calendar is available\n@deprecated use calendar.getDuration(startDate, endDate)", "Sends a normal HTTP response containing the serialization information in\na XML format", "Configure if you want this collapsible container to\naccordion its child elements or use expandable.", "The metadata cache can become huge over time. This simply flushes it periodically.", "Closes the transactor node by removing its node in Zookeeper", "Get the remote address.\n\n@return the remote address, {@code null} if not available", "Read calendar data.", "Ensures that the start and end dates for ranges fit within the\nworking times for a given day.\n\n@param calendar current calendar\n@param list assignment data", "Send a beat grid update announcement to all registered listeners.\n\n@param player the player whose beat grid information has changed\n@param beatGrid the new beat grid associated with that player, if any" ]
private void validateArguments() throws BuildException { Path tempDir = getTempDir(); if (tempDir == null) { throw new BuildException("Temporary directory cannot be null."); } if (Files.exists(tempDir)) { if (!Files.isDirectory(tempDir)) { throw new BuildException("Temporary directory is not a folder: " + tempDir.toAbsolutePath()); } } else { try { Files.createDirectories(tempDir); } catch (IOException e) { throw new BuildException("Failed to create temporary folder: " + tempDir, e); } } }
[ "Validate arguments." ]
[ "Returns a new Set containing all the objects in the specified array.", "Set up server for report directory.", "Create a new path\n\n@param pathName friendly name of path\n@param pathValue path value or regex\n@param requestType path request type. \"GET\", \"POST\", etc", "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", "Method to be implemented by the RendererBuilder subtypes. In this method the library user will\ndefine the mapping between content and renderer class.\n\n@param content used to map object to Renderers.\n@return the class associated to the renderer.", "Returns the configured body or the default value.", "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>", "Translate the each ByteArray in an iterable into a hexadecimal string\n\n@param arrays The array of bytes to translate\n@return An iterable of converted strings", "Send an error to the client with an exception.\n\n@param httpServletResponse the http response to send the error to\n@param e the error that occurred" ]
public JaCoCoReportReader readJacocoReport(IExecutionDataVisitor executionDataVisitor, ISessionInfoVisitor sessionInfoStore) { if (jacocoExecutionData == null) { return this; } JaCoCoExtensions.logger().info("Analysing {}", jacocoExecutionData); try (InputStream inputStream = new BufferedInputStream(new FileInputStream(jacocoExecutionData))) { if (useCurrentBinaryFormat) { ExecutionDataReader reader = new ExecutionDataReader(inputStream); reader.setSessionInfoVisitor(sessionInfoStore); reader.setExecutionDataVisitor(executionDataVisitor); reader.read(); } else { org.jacoco.previous.core.data.ExecutionDataReader reader = new org.jacoco.previous.core.data.ExecutionDataReader(inputStream); reader.setSessionInfoVisitor(sessionInfoStore); reader.setExecutionDataVisitor(executionDataVisitor); reader.read(); } } catch (IOException e) { throw new IllegalArgumentException(String.format("Unable to read %s", jacocoExecutionData.getAbsolutePath()), e); } return this; }
[ "Read JaCoCo report determining the format to be used.\n@param executionDataVisitor visitor to store execution data.\n@param sessionInfoStore visitor to store info session.\n@return true if binary format is the latest one.\n@throws IOException in case of error or binary format not supported." ]
[ "Remove a server mapping from current profile by ID\n\n@param serverMappingId server mapping ID\n@return Collection of updated ServerRedirects", "create a path structure representing the object graph", "This method calculates the absolute number of days between two dates.\nNote that where two date objects are provided that fall on the same\nday, this method will return one not zero. Note also that this method\nassumes that the dates are passed in the correct order, i.e.\nstartDate < endDate.\n\n@param startDate Start date\n@param endDate End date\n@return number of days in the date range", "2-D Gaussian kernel.\n\n@param size Kernel size (should be odd), [3, 101].\n@return Returns 2-D Gaussian kernel of specified size.", "apply the base fields to other views if configured to do so.", "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", "Convert a Java date into a Planner date.\n\n20070222\n\n@param value Java Date instance\n@return Planner date", "Refresh the layout element.", "Checks that native primarykey fields have readonly access, and warns if not.\n\n@param fieldDef The field descriptor\n@param checkLevel The current check level (this constraint is checked in basic and strict)" ]
public JSONObject getJsonFormatted(Map<String, String> dataMap) { JSONObject oneRowJson = new JSONObject(); for (int i = 0; i < outTemplate.length; i++) { oneRowJson.put(outTemplate[i], dataMap.get(outTemplate[i])); } return oneRowJson; }
[ "Given an array of variable names, returns a JsonObject\nof values.\n\n@param dataMap an map containing variable names and their corresponding values\nnames.\n@return a json object of values" ]
[ "Creates a db handling object.\n\n@return The db handling object\n@throws BuildException If the handling is invalid", "Initializes custom prefix for all junit4 properties. This must be consistent\nacross all junit4 invocations if done from the same classpath. Use only when REALLY needed.", "Run a task periodically, for a set number of times.\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@param repetitions\nRepeat count\n@return {@code null} if {@code repetitions < 1}; otherwise, an interface\nthat lets you query the status; cancel; or reschedule the event.", "Creates a cube with each face as a separate mesh using a different texture.\nThe meshes will share a common vertex array but will have separate index buffers.\n@param gvrContext context to use for creating cube\n@param facingOut true for outward normals, false for inward normals\n@param vertexDesc string describing which vertex components are desired\n@param textureList list of 6 textures, one for each face", "For test purposes only.", "Writes long strings to output stream as several chunks.\n\n@param stream stream to write to.\n@param str string to be written.\n@throws IOException if something went wrong", "Converts an object to an object, with squiggly filters applied.\n\n@param mapper the object mapper\n@param source the source to convert\n@return target instance\n@see SquigglyUtils#objectify(ObjectMapper, Object, Class)", "Convert an MPXJ Duration instance into an integer duration in minutes\nready to be written to an MPX file.\n\n@param properties project properties, used for duration units conversion\n@param duration Duration instance\n@return integer duration in minutes", "Converts a List to a Map using the elements of the nameMapping array as the keys of the Map.\n\n@param destinationMap\nthe destination Map (which is cleared before it's populated)\n@param nameMapping\nthe keys of the Map (corresponding with the elements in the sourceList). Cannot contain duplicates.\n@param sourceList\nthe List to convert\n@param <T>\nthe type of the values in the map\n@throws NullPointerException\nif destinationMap, nameMapping or sourceList are null\n@throws SuperCsvException\nif nameMapping and sourceList are not the same size" ]
public void addModuleToExport(final String moduleName) { if (m_modulesToExport == null) { m_modulesToExport = new HashSet<String>(); } m_modulesToExport.add(moduleName); }
[ "Adds a module to the modules that should be exported.\nIf called at least once, the explicitly added modules will be exported\ninstead of the default modules.\n\n@param moduleName the name of the module to export." ]
[ "Convert an Object to a Time, without an Exception", "Generate and return the list of statements to drop a database table.", "Not exposed directly - the Query object passed as parameter actually contains results...", "Handles incoming Application Command Request.\n@param incomingMessage the request message to process.", "Reads a string of two byte characters from the input array.\nThis method assumes that the string finishes either at the\nend of the array, or when char zero is encountered.\nThe value starts at the position specified by the offset\nparameter.\n\n@param data byte array of data\n@param offset start point of unicode string\n@return string value", "Returns true of the specified matrix element is valid element inside this matrix.\n\n@param row Row index.\n@param col Column index.\n@return true if it is a valid element in the matrix.", "A specific, existing tag can be deleted by making a DELETE request\non the URL for that tag.\n\nReturns an empty data record.\n\n@param tag The tag to delete.\n@return Request object", "Attempt to send the specified field to the dbserver.\nThis low-level function is available only to the package itself for use in setting up the connection. It was\npreviously also used for sending parts of larger-scale messages, but because that sometimes led to them being\nfragmented into multiple network packets, and Windows rekordbox cannot handle that, full message sending no\nlonger uses this method.\n\n@param field the field to be sent\n\n@throws IOException if the field cannot be sent", "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" ]
protected Declaration createDeclaration(String property, Term<?> term) { Declaration d = CSSFactory.getRuleFactory().createDeclaration(); d.unlock(); d.setProperty(property); d.add(term); return d; }
[ "Creates a single property declaration.\n@param property Property name.\n@param term Property value.\n@return The resulting declaration." ]
[ "Creates a metadata cache archive file of all tracks in the specified slot on the specified player. Any\nprevious contents of the specified file will be replaced.\n\n@param slot the slot in which the media to be cached can be found\n@param playlistId the id of playlist to be cached, or 0 of all tracks should be cached\n@param cache the file into which the metadata cache should be written\n\n@throws Exception if there is a problem communicating with the player or writing the cache file.", "Lift a Java Callable to a Scala Function0\n\n@param f the function to lift\n\n@returns the Scala function", "Signals that the processor to finish and waits until it finishes.", "Returns a byte array containing a copy of the bytes", "Parses command line arguments.\n\n@param args\nArray of arguments, like the ones provided by\n{@code void main(String[] args)}\n@param objs\nOne or more objects with annotated public fields.\n@return A {@code List} containing all unparsed arguments (i.e. arguments\nthat are no switches)\n@throws IOException\nif a parsing error occurred.\n@see CmdArgument", "Turn given source String array into sorted array.\n\n@param array the source array\n@return the sorted array (never <code>null</code>)", "Replies to this comment with another message.\n@param message the message for the reply.\n@return info about the newly created reply comment.", "Process calendar hours.\n\n@param calendar parent calendar\n@param row calendar hours data\n@param dayIndex day index", "Gets the first row for a query\n\n@param query query to execute\n@return result or NULL" ]
public static Chart getMSDLineWithPowerModelChart(Trajectory t, int lagMin, int lagMax, double timelag, double a, double D) { double[] xData = new double[lagMax - lagMin + 1]; double[] yData = new double[lagMax - lagMin + 1]; double[] modelData = new double[lagMax - lagMin + 1]; MeanSquaredDisplacmentFeature msdeval = new MeanSquaredDisplacmentFeature( t, lagMin); msdeval.setTrajectory(t); msdeval.setTimelag(lagMin); for (int i = lagMin; i < lagMax + 1; i++) { msdeval.setTimelag(i); double msdhelp = msdeval.evaluate()[0]; xData[i - lagMin] = i; yData[i - lagMin] = msdhelp; modelData[i - lagMin] = 4 * D * Math.pow(i * timelag, a); } // Create Chart Chart chart = QuickChart.getChart("MSD Line", "LAG", "MSD", "MSD", xData, yData); chart.addSeries("y=4*D*t^alpha", xData, modelData); // Show it //new SwingWrapper(chart).displayChart(); return chart; }
[ "Plots the MSD curve with the trajectory t and adds the fitted model for anomalous diffusion above.\n@param t\n@param lagMin Minimum timelag (e.g. 1,2,3..) lagMin*timelag = elapsed time in seconds\n@param lagMax lagMax Maximum timelag (e.g. 1,2,3..) lagMax*timelag = elapsed time in seconds\n@param timelag Elapsed time between two frames.\n@param a Exponent alpha of power law function\n@param D Diffusion coeffcient" ]
[ "Adjusts the site root and returns a cloned CmsObject, iff the module has set an import site that differs\nfrom the site root of the CmsObject provided as argument. Otherwise returns the provided CmsObject unchanged.\n@param cms The original CmsObject.\n@param module The module where the import site is read from.\n@return The original CmsObject, or, if necessary, a clone with adjusted site root\n@throws CmsException see {@link OpenCms#initCmsObject(CmsObject)}", "Loads the configuration XML from the given string.\n@since 1.3", "Compute a Catmull-Rom spline for RGB values, but with variable knot spacing.\n@param x the input parameter\n@param numKnots the number of knots in the spline\n@param xknots the array of knot x values\n@param yknots the array of knot y values\n@return the spline value", "Use this API to fetch vpnclientlessaccesspolicy_binding resource of given name .", "Return a string that ensures that no line is longer then 512 characters\nand lines are broken according to manifest specification.\n\n@param input The buffer containing the content that should be made safe\n@param newline The string to use to create newlines (usually \"\\n\" or\n\"\\r\\n\")\n@return The string with no longer lines then 512, ready to be read again\nby {@link MergeableManifest2}.", "Splits timephased work segments in line with cost rates. Note that this is\nan approximation - where a rate changes during a working day, the second\nrate is used for the whole day.\n\n@param table cost rate table\n@param calendar calendar used by this assignment\n@param work timephased work segment\n@param rateIndex rate applicable at the start of the timephased work segment\n@return list of segments which replace the one supplied by the caller", "Harvest any values that may have been returned during the execution\nof a procedure.\n\n@param proc the procedure descriptor that provides info about the procedure\nthat was invoked.\n@param obj the object that was persisted\n@param stmt the statement that was used to persist the object.\n\n@throws PersistenceBrokerSQLException if a problem occurs.", "Return a list of unique namespaces, optionally limited by a given predicate, in alphabetical order.\n\nThis method does not require authentication.\n\n@param predicate\n@param perPage\n@param page\n@return NamespacesList\n@throws FlickrException", "Merges two lists of references, eliminating duplicates in the process.\n\n@param references1\n@param references2\n@return merged list" ]
public final SimpleFeatureCollection treatStringAsURL(final Template template, final String geoJsonUrl) throws IOException { URL url; try { url = FileUtils.testForLegalFileUrl(template.getConfiguration(), new URL(geoJsonUrl)); } catch (MalformedURLException e) { return null; } final String geojsonString; if (url.getProtocol().equalsIgnoreCase("file")) { geojsonString = IOUtils.toString(url, Constants.DEFAULT_CHARSET.name()); } else { geojsonString = URIUtils.toString(this.httpRequestFactory, url); } return treatStringAsGeoJson(geojsonString); }
[ "Get the features collection from a GeoJson URL.\n\n@param template the template\n@param geoJsonUrl what to parse\n@return the feature collection" ]
[ "Returns the probability that the records v1 and v2 came from\nrepresent the same entity, based on high and low probability\nsettings etc.", "Adds a file with the provided description.", "Converts any string into a string that is safe to use as a file name.\nThe result will only include ascii characters and numbers, and the \"-\",\"_\", and \".\" characters.", "Write the summary file, if requested.", "Log a message line to the output.", "Upload a photo from a byte-array.\n\n@param data\nThe photo data as a byte array\n@param metaData\nThe meta data\n@return photoId or ticketId\n@throws FlickrException", "Subtracts v1 from this vector and places the result in this vector.\n\n@param v1\nright-hand vector", "Starts asynchronous check. Result will be delivered to the listener on the main thread.\n\n@param context\n@param appId application id from the oculus dashboard\n@param listener listener to invoke when the result is available\n@throws IllegalStateException in case the platform sdk cannot be initialized\n@throws IllegalArgumentException if listener is null", "Use this API to fetch lbvserver_cachepolicy_binding resources of given name ." ]
public <T> T convert(Object source, TypeReference<T> typeReference) throws ConverterException { return (T) convert(new ConversionContext(), source, typeReference); }
[ "Convert an object to another object with given type\n\n@param <T>\n@param source\nobject to convert\n@param typeReference\nreference to {@link java.lang.reflect.Type}\n@return the converted object if conversion failed\n@throws ConverterException" ]
[ "Adds OPT_U | OPT_URL option to OptionParser, with one argument.\n\n@param parser OptionParser to be modified\n@param required Tells if this option is required or optional", "Use this API to update vserver.", "Read all task relationships from a ConceptDraw PROJECT file.\n\n@param cdp ConceptDraw PROJECT file", "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", "Use this API to add nslimitselector.", "Add an accessory to be handled and advertised by this root. Any existing Homekit connections\nwill be terminated to allow the clients to reconnect and see the updated accessory list. When\nusing this for a bridge, the ID of the accessory must be greater than 1, as that ID is reserved\nfor the Bridge itself.\n\n@param accessory to advertise and handle.", "Bessel function of order 0.\n\n@param x Value.\n@return J0 value.", "Use this API to fetch csvserver_cachepolicy_binding resources of given name .", "Return the BundleCapability of a bundle exporting the package packageName.\n\n@param context The BundleContext\n@param packageName The package name\n@return the BundleCapability of a bundle exporting the package packageName" ]
private static Class<?> getRawClass(Type type) { if (type instanceof Class) { return (Class<?>) type; } if (type instanceof ParameterizedType) { return getRawClass(((ParameterizedType) type).getRawType()); } // For TypeVariable and WildcardType, returns the first upper bound. if (type instanceof TypeVariable) { return getRawClass(((TypeVariable) type).getBounds()[0]); } if (type instanceof WildcardType) { return getRawClass(((WildcardType) type).getUpperBounds()[0]); } if (type instanceof GenericArrayType) { Class<?> componentClass = getRawClass(((GenericArrayType) type).getGenericComponentType()); return Array.newInstance(componentClass, 0).getClass(); } // This shouldn't happen as we captured all implementations of Type above (as or Java 8) throw new IllegalArgumentException("Unsupported type " + type + " of type class " + type.getClass()); }
[ "Returns the raw class of the given type." ]
[ "Parse currency.\n\n@param value currency value\n@return currency value", "Read flow id from message.\n\n@param message the message\n@return the FlowId as string", "Accessor method used to retrieve a Boolean object representing the\ncontents of an individual field. If the field does not exist in the\nrecord, null is returned.\n\n@param field the index number of the field to be retrieved\n@return the value of the required field", "Write calendar hours.\n\n@param parentCalendar parent calendar instance\n@param record calendar hours instance\n@throws IOException", "Write a message to the console.\n\n@param pattern\nA {@link String#format(String, Object...)} pattern\n@param parameters\nOptional parameters to plug into the pattern", "Creates an empty block style definition.\n@return", "converts Map of data to json string\n\n@param data map data to converted to json\n@return {@link String}", "Update the given resource in the persistent configuration model based on the values in the given operation.\n\n@param operation the operation\n@param resource the resource that corresponds to the address of {@code operation}\n\n@throws OperationFailedException if {@code operation} is invalid or populating the model otherwise fails", "Use this API to update snmpalarm." ]
public static HikariConfig createHikariConfig(CmsParameterConfiguration config, String key) { Map<String, String> poolMap = Maps.newHashMap(); for (Map.Entry<String, String> entry : config.entrySet()) { String suffix = getPropertyRelativeSuffix(KEY_DATABASE_POOL + "." + key, entry.getKey()); if ((suffix != null) && !CmsStringUtil.isEmptyOrWhitespaceOnly(entry.getValue())) { String value = entry.getValue().trim(); poolMap.put(suffix, value); } } // these are for backwards compatibility , all other properties not of the form db.pool.poolname.v11..... are ignored String jdbcUrl = poolMap.get(KEY_JDBC_URL); String params = poolMap.get(KEY_JDBC_URL_PARAMS); String driver = poolMap.get(KEY_JDBC_DRIVER); String user = poolMap.get(KEY_USERNAME); String password = poolMap.get(KEY_PASSWORD); String poolName = OPENCMS_URL_PREFIX + key; if ((params != null) && (jdbcUrl != null)) { jdbcUrl += params; } Properties hikariProps = new Properties(); if (jdbcUrl != null) { hikariProps.put("jdbcUrl", jdbcUrl); } if (driver != null) { hikariProps.put("driverClassName", driver); } if (user != null) { user = OpenCms.getCredentialsResolver().resolveCredential(I_CmsCredentialsResolver.DB_USER, user); hikariProps.put("username", user); } if (password != null) { password = OpenCms.getCredentialsResolver().resolveCredential( I_CmsCredentialsResolver.DB_PASSWORD, password); hikariProps.put("password", password); } hikariProps.put("maximumPoolSize", "30"); // Properties of the form db.pool.poolname.v11.<foo> are directly passed to HikariCP as <foo> for (Map.Entry<String, String> entry : poolMap.entrySet()) { String suffix = getPropertyRelativeSuffix("v11", entry.getKey()); if (suffix != null) { hikariProps.put(suffix, entry.getValue()); } } String configuredTestQuery = (String)(hikariProps.get("connectionTestQuery")); String testQueryForDriver = testQueries.get(driver); if ((testQueryForDriver != null) && CmsStringUtil.isEmptyOrWhitespaceOnly(configuredTestQuery)) { hikariProps.put("connectionTestQuery", testQueryForDriver); } hikariProps.put("registerMbeans", "true"); HikariConfig result = new HikariConfig(hikariProps); result.setPoolName(poolName.replace(":", "_")); return result; }
[ "Creates the HikariCP configuration based on the configuration of a pool defined in opencms.properties.\n\n@param config the configuration object with the properties\n@param key the pool name (without the opencms prefix)\n\n@return the HikariCP configuration for the pool" ]
[ "Calculates directory size as total size of all its files, recursively.\n\n@param self a file object\n@return directory size (length)\n@since 2.1\n\n@throws IOException if File object specified does not exist\n@throws IllegalArgumentException if the provided File object does not represent a directory", "Control whether the Virtual CDJ sends status packets to the other players. Most uses of Beat Link will not\nrequire this level of activity. However, if you want to be able to take over the tempo master role, and control\nthe tempo and beat alignment of other players, you will need to turn on this feature, which also requires that\nyou are using one of the standard player numbers, 1-4.\n\n@param send if {@code true} we will send status packets, and can participate in (and control) tempo and beat sync\n\n@throws IllegalStateException if the virtual CDJ is not running, or if it is not using a device number in the\nrange 1 through 4\n@throws IOException if there is a problem starting the {@link BeatFinder}", "Adds a new row after the given one.\n\n@param row the row after which a new one should be added", "Compute the A matrix from the Q and R matrices.\n\n@return The A matrix.", "Checks whether the given set of properties is available.\n\n@param keys the keys to check\n@return true if all properties are available, false otherwise", "Returns a string array of the methods loaded for a class\n\n@param pluginClass name of class\n@return string array of the methods loaded for the class\n@throws Exception exception", "Create a Renderer getting a copy from the prototypes collection.\n\n@param content to render.\n@param parent used to inflate the view.\n@return a new renderer.", "Deletes the metadata on this folder associated with a specified template.\n\n@param templateName the metadata template type name.", "Produces an IPv4 address section from any sequence of bytes in this IPv6 address section\n\n@param startIndex the byte index in this section to start from\n@param endIndex the byte index in this section to end at\n@throws IndexOutOfBoundsException\n@return\n\n@see #getEmbeddedIPv4AddressSection()\n@see #getMixedAddressSection()" ]
public ParallelTaskBuilder prepareHttpPut(String url) { reinitIfClosed(); ParallelTaskBuilder cb = new ParallelTaskBuilder(); cb.getHttpMeta().setHttpMethod(HttpMethod.PUT); cb.getHttpMeta().setRequestUrlPostfix(url); return cb; }
[ "Prepare a parallel HTTP PUT Task.\n\n@param url\nthe UrlPostfix: e.g. in http://localhost:8080/index.html.,the url is \"/index.html\"\n@return the parallel task builder" ]
[ "Given a status update from a CDJ, find the metadata for the track that it has loaded, if any. If there is\nan appropriate metadata cache, will use that, otherwise makes a query to the players dbserver.\n\n@param status the CDJ status update that will be used to determine the loaded track and ask the appropriate\nplayer for metadata about it\n\n@return the metadata that was obtained, if any", "Show only the following channels.\n@param channels The names of the channels to show.\n@return this", "Updates the position and direction of this light from the transform of\nscene object that owns it.", "Creates a polling state.\n\n@param response the response from Retrofit REST call that initiate the long running operation.\n@param lroOptions long running operation options.\n@param defaultRetryTimeout the long running operation retry timeout.\n@param resourceType the type of the resource the long running operation returns\n@param serializerAdapter the adapter for the Jackson object mapper\n@param <T> the result type\n@return the polling state\n@throws IOException thrown by deserialization", "note this string is used by hashCode", "Remove an existing Corporate GroupId from an organization.\n\n@return Response", "Size of a queue.\n\n@param jedis\n@param queueName\n@return", "Reads the table data from an input stream and breaks\nit down into rows.\n\n@param is input stream", "Set the value of one or more fields based on the contents of a database row.\n\n@param map column to field map\n@param row database row\n@param container field container" ]
@Override public void validate() throws HostNameException { if(parsedHost != null) { return; } if(validationException != null) { throw validationException; } synchronized(this) { if(parsedHost != null) { return; } if(validationException != null) { throw validationException; } try { parsedHost = getValidator().validateHost(this); } catch(HostNameException e) { validationException = e; throw e; } } }
[ "Validates that this string is a valid host name or IP address, and if not, throws an exception with a descriptive message indicating why it is not.\n@throws HostNameException" ]
[ "Main method to run the bot.\n\n@param args\n@throws LoginFailedException\n@throws IOException\n@throws MediaWikiApiErrorException", "Use this API to fetch lbvserver_scpolicy_binding resources of given name .", "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.", "Adds a data source to the configuration. If in deduplication mode\ngroupno == 0, otherwise it gives the number of the group to which\nthe data source belongs.", "Utility function that fetches partitions.\n\n@param adminClient An instance of AdminClient points to given cluster\n@return all partitions on cluster", "Validate some of the properties of this layer.", "Set a status message in the JTextComponent passed to this\nmodel.\n@param message The message that should be displayed.", "Checks that arguments and parameter types match.\n@param params method parameters\n@param args type arguments\n@return -1 if arguments do not match, 0 if arguments are of the exact type and >0 when one or more argument is\nnot of the exact type but still match", "Set value for given object field.\n\n@param object object to be updated\n@param field field name\n@param value field value\n\n@throws NoSuchMethodException if property writer is not available\n@throws InvocationTargetException if property writer throws an exception\n@throws IllegalAccessException if property writer is inaccessible" ]
public static double computeTauAndDivide(final int j, final int numRows , final double[] u , final double max) { double tau = 0; // double div_max = 1.0/max; // if( Double.isInfinite(div_max)) { for( int i = j; i < numRows; i++ ) { double d = u[i] /= max; tau += d*d; } // } else { // for( int i = j; i < numRows; i++ ) { // double d = u[i] *= div_max; // tau += d*d; // } // } tau = Math.sqrt(tau); if( u[j] < 0 ) tau = -tau; return tau; }
[ "Normalizes elements in 'u' by dividing by max and computes the norm2 of the normalized\narray u. Adjust the sign of the returned value depending on the size of the first\nelement in 'u'. Normalization is done to avoid overflow.\n\n<pre>\nfor i=j:numRows\nu[i] = u[i] / max\ntau = tau + u[i]*u[i]\nend\ntau = sqrt(tau)\nif( u[j] &lt; 0 )\ntau = -tau;\n</pre>\n\n@param j Element in 'u' that it starts at.\n@param numRows Element in 'u' that it stops at.\n@param u Array\n@param max Max value in 'u' that is used to normalize it.\n@return norm2 of 'u'" ]
[ "Use this API to fetch all the locationfile resources that are configured on netscaler.", "Returns an interval representing the addition of the\ngiven interval with this one.\n@param other interval to add to this one\n@return interval sum", "1-D Perlin noise function.\n\n@param x X Value.\n@return Returns function's value at point x.", "Specify the class represented by this `ClassNode` implements\nan interface specified by the given name\n\n@param name the name of the interface class\n@return this `ClassNode` instance", "Get the cached entry or null if no valid cached entry is found.", "Get the property name of a method name. For example the property name of\nsetSomeValue would be someValue. Names not beginning with set or get are\nnot changed.\n\n@param name The name to process\n@return The property name", "A specific, existing project can be deleted by making a DELETE request\non the URL for that project.\n\nReturns an empty data record.\n\n@param project The project to delete.\n@return Request object", "Returns a map of all variables in scope.\n@return map of all variables in scope.", "Adds a listener to this collection.\n\n@param listener The listener to add" ]
private boolean isInInnerCircle(float x, float y) { return GearWearableUtility.isInCircle(x, y, CENTER_X, CENTER_Y, INNER_RADIUS); }
[ "Check if position is in inner circle\n\n@param x x position\n@param y y position\n@return true if in inner circle, false otherwise" ]
[ "Reads the availability table from the file.\n\n@param resource MPXJ resource instance\n@param periods MSPDI availability periods", "Returns the compact task records for all tasks within the given project,\nordered by their priority within the project.\n\n@param projectId The project in which to search for tasks.\n@return Request object", "Get informations about a place.\n\n<p>\nThis method does not require authentication.\n</p>\n\n@param placeId\nA Flickr Places ID. Optional, can be null. (While optional, you must pass either a valid Places ID or a WOE ID.)\n@param woeId\nA Where On Earth (WOE) ID. Optional, can be null. (While optional, you must pass either a valid Places ID or a WOE ID.)\n@return A Location\n@throws FlickrException", "Calculates the length of the next block of RTF data.\n\n@param text RTF data\n@param offset current offset into this data\n@return block length", "Initializes the Stitch SDK so that app clients can be created.\n\n@param context An Android context value.", "dst is just for log information", "Converts the results to CSV data.\n\n@return the CSV data", "Get the names of all current registered providers.\n\n@return the names of all current registered providers, never null.", "Get the text value for the specified element. If the element is null, or the element's body is empty then this method will return null.\n\n@param element\nThe Element\n@return The value String or null" ]
public PhotoContext getContext(String photoId, String groupId) throws FlickrException { Map<String, Object> parameters = new HashMap<String, Object>(); parameters.put("method", METHOD_GET_CONTEXT); parameters.put("photo_id", photoId); parameters.put("group_id", groupId); Response response = transport.get(transport.getPath(), parameters, apiKey, sharedSecret); if (response.isError()) { throw new FlickrException(response.getErrorCode(), response.getErrorMessage()); } Collection<Element> payload = response.getPayloadCollection(); PhotoContext photoContext = new PhotoContext(); for (Element element : payload) { String elementName = element.getTagName(); if (elementName.equals("prevphoto")) { Photo photo = new Photo(); photo.setId(element.getAttribute("id")); photoContext.setPreviousPhoto(photo); } else if (elementName.equals("nextphoto")) { Photo photo = new Photo(); photo.setId(element.getAttribute("id")); photoContext.setNextPhoto(photo); } else if (!elementName.equals("count")) { _log.warn("unsupported element name: " + elementName); } } return photoContext; }
[ "Get the context for a photo in the group pool.\n\nThis method does not require authentication.\n\n@param photoId\nThe photo ID\n@param groupId\nThe group ID\n@return The PhotoContext\n@throws FlickrException" ]
[ "Adds and returns a document with a new version to the given document.\n\n@param document the document to attach a new version to.\n@param newVersion the version to attach to the document\n@return a document with a new version to the given document.", "create a HashMap form the json properties and add it to the shape\n@param modelJSON\n@param current\n@throws org.json.JSONException", "Call commit on the underlying connection.", "Creates a new DMatrixRMaj around the provided data. The data must encode\na row-major matrix. Any modification to the returned matrix will modify the\nprovided data.\n\n@param numRows Number of rows in the matrix.\n@param numCols Number of columns in the matrix.\n@param data Data that is being wrapped. Referenced Saved.\n@return A matrix which references the provided data internally.", "running in App Engine", "Load the given class using the default constructor\n\n@param className The name of the class\n@return The class object", "Get a property as a boolean or default value.\n\n@param key the property name\n@param defaultValue the default", "This main method provides an easy command line tool to compare two\nschemas.", "Remove a previously registered requirement for a capability.\n\n@param requirementRegistration the requirement. Cannot be {@code null}\n@see #registerAdditionalCapabilityRequirement(org.jboss.as.controller.capability.registry.RuntimeRequirementRegistration)" ]
public static Boolean areCoordinatesWithinThreshold(Tuple2<Double, Double> point1, Tuple2<Double, Double> point2) { return getDistanceBetweenCoordinates(point1, point2) < COORDINATE_THRESHOLD; }
[ "Whether or not points are within some threshold.\n@param point1 Point 1\n@param point2 Point 2\n@return True or false" ]
[ "Updates this BoxJSONObject using the information in a JSON object.\n@param jsonObject the JSON object containing updated information.", "Get the class name without the qualified package name.\n@param className the className to get the short name for\n@return the class name of the class without the package name\n@throws IllegalArgumentException if the className is empty", "Use this API to fetch lbmonitor_binding resources of given names .", "Utility method to clear cached calendar data.", "Compute 2-dimensional Perlin noise.\n@param x the x coordinate\n@param y the y coordinate\n@return noise value at (x,y)", "Count the number of queued resource requests for a specific pool.\n\n@param key The key\n@return The count of queued resource requests. Returns 0 if no queue\nexists for given key.", "Get minimum gray value in the image.\n\n@param fastBitmap Image to be processed.\n@param startX Initial X axis coordinate.\n@param startY Initial Y axis coordinate.\n@param width Width.\n@param height Height.\n@return Minimum gray.", "Resizes an image to the specified height, changing width in the same proportion\n@param originalImage Image in memory\n@param heightOut The height to resize\n@return New Image in memory", "Extract and return the table name for a class." ]
public static double findMax( double[] u, int startU , int length ) { double max = -1; int index = startU*2; int stopIndex = (startU + length)*2; for( ; index < stopIndex;) { double real = u[index++]; double img = u[index++]; double val = real*real + img*img; if( val > max ) { max = val; } } return Math.sqrt(max); }
[ "Returns the maximum magnitude of the complex numbers\n@param u Array of complex numbers\n@param startU first index to consider in u\n@param length Number of complex numebrs to consider\n@return magnitude" ]
[ "Parse a parameterized object from an InputStream.\n\n@param is The InputStream, most likely from your networking library.\n@param jsonObjectType The ParameterizedType describing the object. Ex: LoganSquare.parse(is, new ParameterizedType&lt;MyModel&lt;OtherModel&gt;&gt;() { });", "Removes any child object that has the given name by performing\ncase-sensitive search.\n\n@param name name of scene object to be removed.\n\n@return number of removed objects, 0 if none was found.", "Set the duration option.\n@param value the duration option to set ({@link EndType} as string).", "Move the animation frame counter forward.\n\n@return boolean specifying if animation should continue or if loopCount has been fulfilled.", "Returns with a view of all scopes known by this manager.", "Use this API to fetch auditsyslogpolicy_aaauser_binding resources of given name .", "Loads the localization for the current locale from a bundle of type xmlvfsbundle.\nIt assumes, the content has already been unmarshalled before.\n@param locale the locale for which the localization should be loaded", "Use this API to update autoscaleaction.", "Parse a version String and add the components to a properties object.\n\n@param version the version to parse" ]
private void processChildTasks(Task parentTask) throws SQLException { List<Row> rows = getRows("select * from zscheduleitem where zparentactivity_=? and z_ent=? order by zorderinparentactivity", parentTask.getUniqueID(), m_entityMap.get("Activity")); for (Row row : rows) { Task task = parentTask.addTask(); populateTask(row, task); processChildTasks(task); } }
[ "Read all child tasks for a given parent.\n\n@param parentTask parent task" ]
[ "Read relation data.", "Extracts value from map if given value is null.\n@param value current value\n@param props properties to extract value from\n@param key property name to extract\n@return initial value or value extracted from map", "Generate a path select string\n\n@return Select query string", "Convert an object to a list.\n\n@param mapper the object mapper\n@param source the source object\n@param targetElementType the target list element type\n@return list", "gets the first non annotation line number of a node, taking into account annotations.", "Walks from the most outer embeddable to the most inner one\nlook for all columns contained in these embeddables\nand exclude the embeddables that have a non null column\nbecause of caching, the algorithm is only run once per column parameter", "Returns the name 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\"", "Add the specified files in reverse order.", "Return collection of path Ids in priority order\n\n@param profileId ID of profile\n@return collection of path Ids in priority order" ]
public void removeHoursFromDay(ProjectCalendarHours hours) { if (hours.getParentCalendar() != this) { throw new IllegalArgumentException(); } m_hours[hours.getDay().getValue() - 1] = null; }
[ "Removes a set of calendar hours from the day to which they\nare currently attached.\n\n@param hours calendar hours instance" ]
[ "Apply the necessary rotation to the transform so that it is in front of\nthe camera.\n\n@param transform The transform to modify.", "Use this API to count sslcipher_individualcipher_binding resources configued on NetScaler.", "Registers the Columngroup Buckets and creates the header cell for the columns", "Use this API to update nsip6 resources.", "Write the table configuration to a buffered writer.", "Returns the u component of a coordinate from a texture coordinate set.\n\n@param vertex the vertex index\n@param coords the texture coordinate set\n@return the u component", "Removes the value from the Collection mapped to by this key, leaving the\nrest of the collection intact.\n\n@param key\nthe key to the Collection to remove the value from\n@param value\nthe value to remove", "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}", "Use this API to unset the properties of filterhtmlinjectionparameter resource.\nProperties that need to be unset are specified in args array." ]
private float[] generateParticleTimeStamps(float totalTime) { float timeStamps[] = new float[mEmitRate * 2]; for ( int i = 0; i < mEmitRate * 2; i +=2 ) { timeStamps[i] = totalTime + mRandom.nextFloat(); timeStamps[i + 1] = 0; } return timeStamps; }
[ "Generate random time stamps from the current time upto the next one second.\nPassed as texture coordinates to the vertex shader, an unused field is present\nwith every pair passed.\n\n@param totalTime\n@return" ]
[ "Use this API to fetch vpnsessionpolicy_aaauser_binding resources of given name .", "Sets the HTML entity translator for all cells in the row.\nIt will also remove any other translator set.\nNothing will happen if the argument is null.\n@param htmlElementTranslator translator\n@return this to allow chaining", "Ends interception context if it was previously stated. This is indicated by a local variable with index 0.", "Given OGC PropertyIsLike Filter information, construct an SQL-compatible 'like' pattern.\n\nSQL % --> match any number of characters _ --> match a single character\n\nNOTE; the SQL command is 'string LIKE pattern [ESCAPE escape-character]' We could re-define the escape character,\nbut I'm not doing to do that in this code since some databases will not handle this case.\n\nMethod: 1.\n\nExamples: ( escape ='!', multi='*', single='.' ) broadway* -> 'broadway%' broad_ay -> 'broad_ay' broadway ->\n'broadway'\n\nbroadway!* -> 'broadway*' (* has no significance and is escaped) can't -> 'can''t' ( ' escaped for SQL\ncompliance)\n\n\nNOTE: we also handle \"'\" characters as special because they are end-of-string characters. SQL will convert ' to\n'' (double single quote).\n\nNOTE: we don't handle \"'\" as a 'special' character because it would be too confusing to have a special char as\nanother special char. Using this will throw an error (IllegalArgumentException).\n\n@param escape escape character\n@param multi ?????\n@param single ?????\n@param pattern pattern to match\n@return SQL like sub-expression\n@throws IllegalArgumentException oops", "The number of bytes required to hold the given number\n\n@param number The number being checked.\n@return The required number of bytes (must be 8 or less)", "Method indicating whether a day is a working or non-working day.\n\n@param day required day\n@return true if this is a working day", "Move this rectangle to the specified bottom-left point.\n\n@param rect rectangle to move\n@param x new x origin\n@param y new y origin", "Fills a rectangle in the image.\n\n@param x rect�s start position in x-axis\n@param y rect�s start positioj in y-axis\n@param w rect�s width\n@param h rect�s height\n@param c rect�s color", "Creates a general purpose solver. Use this if you are not sure what you need.\n\n@param numRows The number of rows that the decomposition is optimized for.\n@param numCols The number of columns that the decomposition is optimized for." ]
private void calculateValueTextHeight() { Rect valueRect = new Rect(); Rect legendRect = new Rect(); String str = Utils.getFloatString(mFocusedPoint.getValue(), mShowDecimal) + (!mIndicatorTextUnit.isEmpty() ? " " + mIndicatorTextUnit : ""); // calculate the boundaries for both texts mIndicatorPaint.getTextBounds(str, 0, str.length(), valueRect); mLegendPaint.getTextBounds(mFocusedPoint.getLegendLabel(), 0, mFocusedPoint.getLegendLabel().length(), legendRect); // calculate string positions in overlay mValueTextHeight = valueRect.height(); mValueLabelY = (int) (mValueTextHeight + mIndicatorTopPadding); mLegendLabelY = (int) (mValueTextHeight + mIndicatorTopPadding + legendRect.height() + Utils.dpToPx(7.f)); int chosenWidth = valueRect.width() > legendRect.width() ? valueRect.width() : legendRect.width(); // check if text reaches over screen if (mFocusedPoint.getCoordinates().getX() + chosenWidth + mIndicatorLeftPadding > -Utils.getTranslationX(mDrawMatrixValues) + mGraphWidth) { mValueLabelX = (int) (mFocusedPoint.getCoordinates().getX() - (valueRect.width() + mIndicatorLeftPadding)); mLegendLabelX = (int) (mFocusedPoint.getCoordinates().getX() - (legendRect.width() + mIndicatorLeftPadding)); } else { mValueLabelX = mLegendLabelX = (int) (mFocusedPoint.getCoordinates().getX() + mIndicatorLeftPadding); } }
[ "Calculates the text height for the indicator value and sets its x-coordinate." ]
[ "Registers a new site for specific data collection. If null is used as a\nsite key, then all data is collected.\n\n@param siteKey\nthe site to collect geo data for", "Read properties from the active profiles.\n\nGoes through all active profiles (in the order the\nprofiles are defined in settings.xml) and extracts\nthe desired properties (if present). The prefix is\nused when looking up properties in the profile but\nnot in the returned map.\n\n@param prefix The prefix to use or null if no prefix should be used\n@param properties The properties to read\n\n@return A map containing the values for the properties that were found", "Use this API to update gslbservice resources.", "Replace a single value at the appropriate location in the existing value array.\n@param index - location in the array list\n@param newValue - the new String", "Additional objects to include with the requested group.\nNote that all the optional includes depend on \"assignments\" also being included.\n@param includes List of included objects to return\n@return this object to continue building options", "Create a SVG graphic with the give dimensions.\n\n@param size The size of the SVG graphic.", "Builds sql clause to load data into a database.\n\n@param config Load configuration.\n@param prefix Prefix for temporary resources.\n@return the load DDL", "Check whether we have diverged from what we would predict from the last update that was sent to a particular\ntrack position listener.\n\n@param lastUpdate the last update that was sent to the listener\n@param currentUpdate the latest update available for the same player\n\n@return {@code true }if the listener will have diverged by more than our permitted amount of slack, and so\nshould be updated", "Obtains the collection of server groups defined for a profile\n\n@param model\n@param profileId\n@return\n@throws Exception" ]
private static void updateJar(final File file, final byte[] searchPattern, final int[] badSkipBytes, final int newSig, final int endSig) throws IOException { final RandomAccessFile raf = new RandomAccessFile(file, "rw"); try { final FileChannel channel = raf.getChannel(); try { long pos = channel.size() - ENDLEN; final ScanContext context; if (newSig == CRIPPLED_ENDSIG) { context = new ScanContext(GOOD_ENDSIG_PATTERN, CRIPPLED_ENDSIG_PATTERN); } else if (newSig == GOOD_ENDSIG) { context = new ScanContext(CRIPPLED_ENDSIG_PATTERN, GOOD_ENDSIG_PATTERN); } else { context = null; } if (!validateEndRecord(file, channel, pos, endSig)) { pos = scanForEndSig(file, channel, context); } if (pos == -1) { if (context.state == State.NOT_FOUND) { // Don't fail patching if we cannot validate a valid zip PatchLogger.ROOT_LOGGER.cannotInvalidateZip(file.getAbsolutePath()); } return; } // Update the central directory record channel.position(pos); final ByteBuffer buffer = ByteBuffer.allocate(4); buffer.order(ByteOrder.LITTLE_ENDIAN); buffer.putInt(newSig); buffer.flip(); while (buffer.hasRemaining()) { channel.write(buffer); } } finally { safeClose(channel); } } finally { safeClose(raf); } }
[ "Update the central directory signature of a .jar.\n\n@param file the file to process\n@param searchPattern the search patter to use\n@param badSkipBytes the bad bytes skip table\n@param newSig the new signature\n@param endSig the expected signature\n@throws IOException" ]
[ "create an instance from the className\n@param <E> class of object\n@param className full class name\n@return an object or null if className is null", "Given a filesystem and path to a node, gets all the files which belong to\na partition and replica type\n\nWorks only for {@link ReadOnlyStorageFormat.READONLY_V2}\n\n@param fs Underlying filesystem\n@param path The node directory path\n@param partitionId The partition id for which we get the files\n@param replicaType The replica type\n@return Returns list of files of this partition, replicaType\n@throws IOException", "Checks whether the compilation has been canceled and reports the given work increment to the compiler progress.", "Start check of execution time\n@param extra", "Updates a metadata classification on the specified file.\n\n@param classificationType the metadata classification type.\n@return the new metadata classification type updated on the file.", "To populate the dropdown list from the jelly", "Checks if there's exactly one option that exists among all possible opts.\n\n@param options OptionSet to checked\n@param opt1 Possible required option to check\n@param opt2 Possible required option to check\n@throws VoldemortException", "Returns an array of all declared fields in the given class and all\nsuper-classes.", "Send a device update to all registered update listeners.\n\n@param update the device update that has just arrived" ]
public <Ex extends Throwable> Try<R,Ex> execute(T input,Class<Ex> classes){ return Try.withCatch( ()->transactionTemplate.execute(status-> transaction.apply(input)),classes); }
[ "Execute the transactional flow - catch only specified exceptions\n\n@param input Initial data input\n@param classes Exception types to catch\n@return Try that represents either success (with result) or failure (with errors)" ]
[ "In the case where the prefix sits at a segment boundary, and the prefix sequence is null - null - 0, this changes to prefix sequence of null - x - 0, where x is segment bit length.\n\nNote: We allow both [null, null, 0] and [null, x, 0] where x is segment length. However, to avoid inconsistencies when doing segment replacements,\nand when getting subsections, in the calling constructor we normalize [null, null, 0] to become [null, x, 0].\nWe need to support [null, x, 0] so that we can create subsections and full addresses ending with [null, x] where x is bit length.\nSo we defer to that when constructing addresses and sections.\nAlso note that in our append/appendNetowrk/insert/replace we have special handling for cases like inserting [null] into [null, 8, 0] at index 2.\nThe straight replace would give [null, 8, null, 0] which is wrong.\nIn that code we end up with [null, null, 8, 0] by doing a special trick:\nWe remove the end of [null, 8, 0] and do an append [null, 0] and we'd remove prefix from [null, 8] to get [null, null] and then we'd do another append to get [null, null, null, 0]\nThe final step is this normalization here that gives [null, null, 8, 0]\n\nHowever, when users construct AddressDivisionGrouping or IPAddressDivisionGrouping, either one is allowed: [null, null, 0] and [null, x, 0].\nSince those objects cannot be further subdivided with getSection/getNetworkSection/getHostSection or grown with appended/inserted/replaced,\nthere are no inconsistencies introduced, we are simply more user-friendly.\nAlso note that normalization of AddressDivisionGrouping or IPAddressDivisionGrouping is really not possible without the address creator objects we use for addresses and sections,\nthat allow us to recreate new segments of the correct type.\n\n@param sectionPrefixBits\n@param segments\n@param segmentBitCount\n@param segmentByteCount\n@param segProducer", "Function to delete the specified store from Metadata store. This involves\n\n1. Remove entry from the ConfigurationStorageEngine for STORES.\n\n2. Update the metadata cache.\n\n3. Re-create the 'stores.xml' key\n\n@param storeName specifies name of the store to be deleted.", "Read the values from the output object and write them to the values object.\n\n@param output the output object from a processor\n@param processor the processor the output if from\n@param values the object for sharing values between processors", "Converts a JSON patch path to a JSON property name.\nCurrently the metadata API only supports flat maps.\n@param path the path that designates the key. Must be prefixed with a \"/\".\n@return the JSON property name.", "Bilinear interpolation of ARGB values.\n@param x the X interpolation parameter 0..1\n@param y the y interpolation parameter 0..1\n@param rgb array of four ARGB values in the order NW, NE, SW, SE\n@return the interpolated value", "Returns an array of all the singular values in A sorted in ascending order\n\n@param A Matrix. Not modified.\n@return singular values", "Delete the first n items from the list\n\n@param newStart the logsegment who's index smaller than newStart will be deleted.\n@return the deleted segment", "host.xml", "Parses the result and returns the failure description.\n\n@param result the result of executing an operation\n\n@return the failure description if defined, otherwise a new undefined model node\n\n@throws IllegalArgumentException if the outcome of the operation was successful" ]
public boolean containsIteratorForTable(String aTable) { boolean result = false; if (m_rsIterators != null) { for (int i = 0; i < m_rsIterators.size(); i++) { OJBIterator it = (OJBIterator) m_rsIterators.get(i); if (it instanceof RsIterator) { if (((RsIterator) it).getClassDescriptor().getFullTableName().equals(aTable)) { result = true; break; } } else if (it instanceof ChainingIterator) { result = ((ChainingIterator) it).containsIteratorForTable(aTable); } } } return result; }
[ "Answer true if an Iterator for a Table is already available\n@param aTable\n@return" ]
[ "Find and unmarshal all test suite files in given directories.\n\n@throws IOException if any occurs.\n@see #unmarshal(File)", "Gets the final transform of the bone.\n\n@return the 4x4 matrix representing the final transform of the\nbone during animation, which comprises bind pose and skeletal\ntransform at the current time of the animation.", "Get a list of collaborators that are allowed access to an app.\n@param appName App name. See {@link #listApps} for a list of apps that can be used.\n@return list of collaborators", "Returns the service id with the propertype.\n\n@param serviceReference\n@return long value for the service id", "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", "private multi-value handlers and helpers", "Use this API to enable clusterinstance of given name.", "Reads OAuth 2.0 with JWT app configurations from the reader. The file should be in JSON format.\n\n@param reader a reader object which points to a JSON formatted configuration file\n@return a new Instance of BoxConfig\n@throws IOException when unable to access the mapping file's content of the reader", "Use this API to add tmtrafficaction resources." ]
public Response remove(String id, String rev) { assertNotEmpty(id, "id"); assertNotEmpty(id, "rev"); return db.remove(ensureDesignPrefix(id), rev); }
[ "Removes a design document using the id and rev from the database.\n\n@param id the document id (optionally prefixed with \"_design/\")\n@param rev the document revision\n@return {@link DesignDocument}" ]
[ "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.", "Start a process using the given parameters.\n\n@param processId\n@param parameters\n@return", "Resolves the package type from the maven project.\n\n@param project the maven project\n\n@return the package type", "Update the plane based on arcore best knowledge of the world\n\n@param scale", "Generates a JSON patch for transforming the source node into the target node.\n\n@param source the node to be patched\n@param target the expected result after applying the patch\n@param replaceMode the replace mode to be used\n@return the patch as a {@link JsonPatch}", "Start the actual migration. Take the version of the database, get all required migrations and execute them or do\nnothing if the DB is already up to date.\n\nAt the end the underlying database instance is closed.\n\n@throws MigrationException if a migration fails", "Creates a new immutable set that consists of given elements.\n\n@param elements the given elements\n@return a new immutable set that consists of given elements", "Use this API to fetch all the dnsnsecrec resources that are configured on netscaler.", "LRN cross-channel forward computation. Double parameters cast to tensor data type" ]
public SelectStatement getPreparedSelectStatement(Query query, ClassDescriptor cld) { SelectStatement sql = new SqlSelectStatement(m_platform, cld, query, logger); if (logger.isDebugEnabled()) { logger.debug("SQL:" + sql.getStatement()); } return sql; }
[ "generate a select-Statement according to query\n\n@param query the Query\n@param cld the ClassDescriptor" ]
[ "Retrieve the document with the specified ID from the database and deserialize to an\ninstance of the POJO of type T.\n\n@param <T> object type\n@param classType the class of type T\n@param id the document id\n@return an object of type T\n@throws NoDocumentException if the document is not found in the database\n@see #find(Class, String, String)\n@see <a\nhref=\"https://console.bluemix.net/docs/services/Cloudant/api/document.html#read\"\ntarget=\"_blank\">Documents - read</a>", "Returns if a MongoDB document is a todo item.", "Add a listener to be invoked when the checked button changes in this group.\n@param listener\n@param <T>\n@return", "Returns the compact records for all users that are members of the team.\n\n@param team Globally unique identifier for the team.\n@return Request object", "Use this API to add appfwjsoncontenttype resources.", "Selects the single element of the collection for which the provided OQL query\npredicate is true.\n@param\tpredicate\tAn OQL boolean query predicate.\n@return The element that evaluates to true for the predicate. If no element\nevaluates to true, null is returned.\n@exception\torg.odmg.QueryInvalidException\tThe query predicate is invalid.", "Create a new Violation for the AST node.\n@param sourceCode - the SourceCode\n@param node - the Groovy AST Node\n@param message - the message for the violation; defaults to null", "This will set the last nestingLevel elements in the dotPositions to the values present in the dollarPositions.\nThe rest will be set to -1.\n\n<p>In another words the dotPositions array will contain the rightmost dollar positions.\n\n@param dollarPositions the positions of the $ in the binary class name\n@param dotPositions the positions of the dots to initialize from the dollarPositions\n@param nestingLevel the number of dots (i.e. how deep is the nesting of the classes)", "Adds listeners and reads from a file.\n\n@param reader reader for file type\n@param file schedule data\n@return ProjectFile instance" ]
private static void parseStencilSet(JSONObject modelJSON, Diagram current) throws JSONException { // get stencil type if (modelJSON.has("stencilset")) { JSONObject object = modelJSON.getJSONObject("stencilset"); String url = null; String namespace = null; if (object.has("url")) { url = object.getString("url"); } if (object.has("namespace")) { namespace = object.getString("namespace"); } current.setStencilset(new StencilSet(url, namespace)); } }
[ "crates a StencilSet object and add it to the current diagram\n@param modelJSON\n@param current\n@throws org.json.JSONException" ]
[ "Use this API to unset the properties of inatparam resource.\nProperties that need to be unset are specified in args array.", "Use this API to fetch statistics of nslimitidentifier_stats resource of given name .", "Add custom fields to the tree.\n\n@param parentNode parent tree node\n@param file custom fields container", "Extracts the bindingId from a Server.\n@param server\n@return", "Resolves the path relative to the parent and normalizes it.\n\n@param parent the parent path\n@param path the path\n\n@return the normalized path", "Iterates through the given InputStream line by line using the specified\nencoding, splitting each line using the given separator. The list of tokens\nfor each line is then passed to the given closure. Finally, the stream\nis closed.\n\n@param stream an InputStream\n@param regex the delimiting regular expression\n@param charset opens the stream with a specified charset\n@param closure a closure\n@return the last value returned by the closure\n@throws IOException if an IOException occurs.\n@throws java.util.regex.PatternSyntaxException\nif the regular expression's syntax is invalid\n@see #splitEachLine(java.io.Reader, java.lang.String, groovy.lang.Closure)\n@since 1.5.5", "Determines if entry is accepted. For normal usage, this means confirming that the key is\nneeded. For orphan usage, this simply means confirming the key belongs to the node.\n\n@param key\n@return true iff entry is accepted.", "Adds a listener to this collection.\n\n@param listener The listener to add", "Harvest a single value that was returned by a callable statement.\n\n@param obj the object that will receive the value that is harvested.\n@param callable the CallableStatement that contains the value to harvest\n@param fmd the FieldDescriptor that identifies the field where the\nharvested value will be stord.\n@param index the parameter index.\n\n@throws PersistenceBrokerSQLException if a problem occurs." ]
protected void addAllowedValuesToDescription(ModelNode result, ParameterValidator validator) { if (allowedValues != null) { for (ModelNode allowedValue : allowedValues) { result.get(ModelDescriptionConstants.ALLOWED).add(allowedValue); } } else if (validator instanceof AllowedValuesValidator) { AllowedValuesValidator avv = (AllowedValuesValidator) validator; List<ModelNode> allowed = avv.getAllowedValues(); if (allowed != null) { for (ModelNode ok : allowed) { result.get(ModelDescriptionConstants.ALLOWED).add(ok); } } } }
[ "Adds the allowed values. Override for attributes who should not use the allowed values.\n\n@param result the node to add the allowed values to\n@param validator the validator to get the allowed values from" ]
[ "Retrieve the result produced by a task with the given id in the group.\n\nThis method can be used to retrieve the result of invocation of both dependency\nand \"post-run\" dependent tasks. If task with the given id does not exists then\nIllegalArgumentException exception will be thrown.\n\n@param taskId the task item id\n@return the task result, null will be returned if task has not yet been invoked", "Generate random velocities for every particle. The direction is obtained by assuming\nthe position of a particle as a vector. This normalised vector is scaled by\nthe speed range.\n\n@return", "Binds a script bundle to a scene.\n@param scriptBundle\nThe {@code GVRScriptBundle} object containing script binding information.\n@param scene\nThe scene to bind to.\n@throws IOException if script bundle file cannot be read.\n@throws GVRScriptException if script processing error occurs.", "Removes any configured observers.\n\n@deprecated since 1.1.0. Replaced by {@link #setObserverProvider(String)} and\n{@link #getObserverProvider()}", "set the specified object at index\n\n@param object The object to add at the end of the array.", "Sets the elements of this vector to uniformly distributed random values\nin a specified range, using a supplied random number generator.\n\n@param lower\nlower random value (inclusive)\n@param upper\nupper random value (exclusive)\n@param generator\nrandom number generator", "Checks whether a built of the indices is necessary.\n@param cms The appropriate CmsObject instance.\n@return true, if the spellcheck indices have to be rebuilt, otherwise false", "Add component processing time to given map\n@param mapComponentTimes\n@param component", "Handling out request.\n\n@param message\nthe message\n@throws Fault\nthe fault" ]
public static void main(String[] args) throws LoginFailedException, IOException, MediaWikiApiErrorException { ExampleHelpers.configureLogging(); printDocumentation(); SetLabelsForNumbersBot bot = new SetLabelsForNumbersBot(); ExampleHelpers.processEntitiesFromWikidataDump(bot); bot.finish(); System.out.println("*** Done."); }
[ "Main method to run the bot.\n\n@param args\n@throws LoginFailedException\n@throws IOException\n@throws MediaWikiApiErrorException" ]
[ "Checks if the method being invoked should be wrapped by a service.\nIt looks the method name up in the methodList. If its in the list, then\nthe method should be wrapped. If the list is null, then all methods\nare wrapped.\n\n@param methodName The method being called\n\n@return boolean", "Call rollback on the underlying connection.", "Downloads this version of the file to a given OutputStream while reporting the progress to a ProgressListener.\n@param output the stream to where the file will be written.\n@param listener a listener for monitoring the download's progress.", "Clones a BufferedImage.\n@param image the image to clone\n@return the cloned image", "Run the configured crawl. This method blocks until the crawl is done.\n\n@return the CrawlSession once the crawl is done.", "Use this API to add dbdbprofile.", "Sets the bottom padding character for all cells in the row.\n@param paddingBottomChar new padding character, ignored if null\n@return this to allow chaining", "Gets type from super class's type parameter.", "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" ]
public static List<RebalanceTaskInfo> filterTaskPlanWithStores(List<RebalanceTaskInfo> existingPlanList, List<StoreDefinition> storeDefs) { List<RebalanceTaskInfo> plans = Lists.newArrayList(); List<String> storeNames = StoreDefinitionUtils.getStoreNames(storeDefs); for(RebalanceTaskInfo existingPlan: existingPlanList) { RebalanceTaskInfo info = RebalanceTaskInfo.create(existingPlan.toJsonString()); // Filter the plans only for stores given HashMap<String, List<Integer>> storeToPartitions = info.getStoreToPartitionIds(); HashMap<String, List<Integer>> newStoreToPartitions = Maps.newHashMap(); for(String storeName: storeNames) { if(storeToPartitions.containsKey(storeName)) newStoreToPartitions.put(storeName, storeToPartitions.get(storeName)); } info.setStoreToPartitionList(newStoreToPartitions); plans.add(info); } return plans; }
[ "Given a list of partition plans and a set of stores, copies the store\nnames to every individual plan and creates a new list\n\n@param existingPlanList Existing partition plan list\n@param storeDefs List of store names we are rebalancing\n@return List of updated partition plan" ]
[ "When all the elements in a sorted set are inserted with the same score, in order to force lexicographical\nordering, this command returns all the elements in the sorted set with a value in the given range.\n@param lexRange\n@return the range of elements", "Create a new server group\n\n@param groupName name of server group\n@return Created ServerGroup", "Returns the JSON datatype for the property datatype as represented by\nthe given WDTK datatype IRI string.\n\n@param datatypeIri\nthe WDTK datatype IRI string; case-sensitive\n@throws IllegalArgumentException\nif the given datatype string is not known", "get the default profile\n\n@return representation of default profile\n@throws Exception exception", "Use this API to fetch vpnvserver_responderpolicy_binding resources of given name .", "Print rate.\n\n@param rate Rate instance\n@return rate value", "Use this API to clear gslbldnsentries.", "Use this API to restore appfwprofile.", "Input method, called by a Subscriber indicating its intent into receive notification about a given topic.\n\n@param sr DTO containing the info given by the protocol" ]
protected void setProperty(String propertyName, JavascriptEnum propertyValue) { jsObject.setMember(propertyName, propertyValue.getEnumValue()); }
[ "Sets a property on this Javascript object for which the value is a\nJavascriptEnum\n\nThe value is set to what is returned by the getEnumValue() method on the JavascriptEnum\n\n@param propertyName The name of the property.\n@param propertyValue The value of the property." ]
[ "Term prefix.\n\n@param term\nthe term\n@return the string", "Ensure the current throughput levels for the tracked operation does not\nexceed set quota limits. Throws an exception if exceeded quota.\n\n@param quotaKey\n@param trackedOp", "This method extracts assignment data from an MSPDI file.\n\n@param project Root node of the MSPDI file", "Use this API to fetch aaagroup_vpntrafficpolicy_binding resources of given name .", "Check, if all values used for calculating the series for a specific pattern are valid.\n@return <code>null</code> if the pattern is valid, a suitable error message otherwise.", "Searches for a declared method with a given name. If the class declares multiple methods with the given name,\nthere is no guarantee as of which methods is returned. Null is returned if the class does not declare a method\nwith the given name.\n@param clazz the given class\n@param methodName the given method name\n@return method method with the given name declared by the given class or null if no such method exists", "A static method that provides an easy way to create a list of a\ncertain parametric type.\nThis static constructor works better with generics.\n\n@param list The list to pad\n@param padding The padding element (may be null)\n@return The padded list", "Return the List of VariableExpression objects referenced by the specified DeclarationExpression.\n@param declarationExpression - the DeclarationExpression\n@return the List of VariableExpression objects", "Appends to the statement table and all tables joined to it.\n@param alias the table alias\n@param where append conditions for WHERE clause here" ]
public void printInterceptorChain(InterceptorChain chain) { Iterator<Interceptor<? extends Message>> it = chain.iterator(); String phase = ""; StringBuilder builder = null; while (it.hasNext()) { Interceptor<? extends Message> interceptor = it.next(); if (interceptor instanceof DemoInterceptor) { continue; } if (interceptor instanceof PhaseInterceptor) { PhaseInterceptor pi = (PhaseInterceptor)interceptor; if (!phase.equals(pi.getPhase())) { if (builder != null) { System.out.println(builder.toString()); } else { builder = new StringBuilder(100); } builder.setLength(0); builder.append(" "); builder.append(pi.getPhase()); builder.append(": "); phase = pi.getPhase(); } String id = pi.getId(); int idx = id.lastIndexOf('.'); if (idx != -1) { id = id.substring(idx + 1); } builder.append(id); builder.append(' '); } } }
[ "Prints out the interceptor chain in a format that is easy to read. It\nalso filters out instances of the DemoInterceptor so you can see what the\nchain would look like in a normal invokation.\n\n@param chain" ]
[ "Removes top of thread-local shell stack.", "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.", "Read, validate, and discard a single message, returning the next valid offset, and the\nmessage being validated\n\n@throws IOException any exception", "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", "Seeks forward or backwards to a particular season based on the current date\n\n@param seasonString The season to seek to\n@param direction The direction to seek\n@param seekAmount The number of years to seek", "Get a TokenizerFactory that does Penn Treebank tokenization.\nThis is now the recommended factory method to use.\n\n@param factory A TokenFactory that determines what form of token is returned by the Tokenizer\n@param options A String specifying options (see the class javadoc for details)\n@param <T> The type of the tokens built by the LexedTokenFactory\n@return A TokenizerFactory that does Penn Treebank tokenization", "Searches the variables layers, top to bottom, for the iterable having all of it's items of the given type. Return\nnull if not found.", "Applies this patch to a JSON value.\n\n@param node the value to apply the patch to\n@return the patched JSON value\n@throws JsonPatchException failed to apply patch\n@throws NullPointerException input is null", "Adds a module to the modules that should be exported.\nIf called at least once, the explicitly added modules will be exported\ninstead of the default modules.\n\n@param moduleName the name of the module to export." ]
private void writeClassData() { try (PrintStream out = new PrintStream(openResultFileOuputStream( resultDirectory, "classes.json"))) { out.println("{"); // Add direct subclass information: for (Entry<Integer, ClassRecord> classEntry : this.classRecords .entrySet()) { if (classEntry.getValue().subclassCount == 0 && classEntry.getValue().itemCount == 0) { continue; } for (Integer superClass : classEntry.getValue().directSuperClasses) { this.classRecords.get(superClass).nonemptyDirectSubclasses .add(classEntry.getKey().toString()); } } int count = 0; int countNoLabel = 0; for (Entry<Integer, ClassRecord> classEntry : this.classRecords .entrySet()) { if (classEntry.getValue().subclassCount == 0 && classEntry.getValue().itemCount == 0) { continue; } if (classEntry.getValue().label == null) { countNoLabel++; } if (count > 0) { out.println(","); } out.print("\"" + classEntry.getKey() + "\":"); mapper.writeValue(out, classEntry.getValue()); count++; } out.println("\n}"); System.out.println(" Serialized information for " + count + " class items."); System.out.println(" -- class items with missing label: " + countNoLabel); } catch (IOException e) { e.printStackTrace(); } }
[ "Writes all data that was collected about classes to a json file." ]
[ "Get global hotkey provider for current platform\n\n@param useSwingEventQueue whether the provider should be using Swing Event queue or a regular thread\n@return new instance of Provider, or null if platform is not supported\n@see X11Provider\n@see WindowsProvider\n@see CarbonProvider", "Sort and order steps to avoid unwanted generation", "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", "Construct a Libor index for a given curve and schedule.\n\n@param forwardCurveName\n@param schedule\n@return The Libor index or null, if forwardCurveName is null.", "Computes the eigenvalue of the 2 by 2 matrix.", "Classify the tokens in a String. Each sentence becomes a separate document.\nDoesn't override default readerAndWriter.\n\n@param str\nA String with tokens in one or more sentences of text to be\nclassified.\n@return {@link List} of classified sentences (each a List of something that\nextends {@link CoreMap}).", "This implementation returns whether the underlying asset exists.", "This method is used to associate a child task with the current\ntask instance. It has been designed to\nallow the hierarchical outline structure of tasks in an MPX\nfile to be updated once all of the task data has been read.\n\n@param child child task", "Add groups for given group parent item.\n\n@param type the tree type\n@param ouItem group parent item" ]
public static base_response create(nitro_service client, sslfipskey resource) throws Exception { sslfipskey createresource = new sslfipskey(); createresource.fipskeyname = resource.fipskeyname; createresource.modulus = resource.modulus; createresource.exponent = resource.exponent; return createresource.perform_operation(client,"create"); }
[ "Use this API to create sslfipskey." ]
[ "Returns true if the predicate is true for all pixels in the image.\n\n@param predicate a predicate function that accepts 3 parameters - the x,y coordinate and the pixel at that coordinate\n@return true if f holds for at least one pixel", "Get a loader that lists the files in the current path,\nand monitors changes.", "Creates a Sink Processor\n\n@param dataSink the data sink itself\n@param parallelism the parallelism of this processor\n@param description the description for this processor\n@param taskConf the configuration for this processor\n@param system actor system\n@return the new created sink processor", "Gets the site label for the entry.\n\n@param cms the current CMS context\n@param entry the entry\n@return the site label for the entry", "Remove a connection from all keys.\n\n@param connection\nthe connection", "Called when remote end send a message to this connection\n@param receivedMessage the message received\n@return this context", "helper to calculate the actionBar height\n\n@param context\n@return", "Calculate conversion map.\n\n@param inRange Input range.\n@param outRange Output range.\n@param map Conversion map.", "Compares two double values up to some delta.\n\n@param a\n@param b\n@param delta\n@return The value 0 if a equals b, a value greater than 0 if if a > b, and a value less than 0 if a < b." ]
private void applyProperties(AssociationKey associationKey, Tuple associationRow, Relationship relationship) { String[] indexColumns = associationKey.getMetadata().getRowKeyIndexColumnNames(); for ( int i = 0; i < indexColumns.length; i++ ) { String propertyName = indexColumns[i]; Object propertyValue = associationRow.get( propertyName ); relationship.setProperty( propertyName, propertyValue ); } }
[ "The only properties added to a relationship are the columns representing the index of the association." ]
[ "Gets information about this user.\n@param fields the optional fields to retrieve.\n@return info about this user.", "Return the number of rows affected.", "Mark root of this task task group depends on the given task group's root.\nThis ensure this task group's root get picked for execution only after the completion\nof all tasks in the given group.\n\n@param dependencyTaskGroup the task group that this task group depends on", "Log a byte array as a hex dump.\n\n@param data byte array", "Calculate Median value.\n@param values Values.\n@return Median.", "Adds an ORDER BY item with a direction indicator.\n\n@param name\nName of the column by which to sort.\n@param ascending\nIf true, specifies the direction \"asc\", otherwise, specifies\nthe direction \"desc\".", "Calls the httpHandler method.", "Determines if a token stream contains only numeric tokens\n@param stream\n@return true if all tokens in the given stream can be parsed as an integer", "Delete rows that match the prepared statement." ]
public void sub(Vector3d v1, Vector3d v2) { x = v1.x - v2.x; y = v1.y - v2.y; z = v1.z - v2.z; }
[ "Subtracts vector v1 from v2 and places the result in this vector.\n\n@param v1\nleft-hand vector\n@param v2\nright-hand vector" ]
[ "Define the set of extensions.\n\n@param extensions\n@return self", "main class entry point.", "Extract site path, base name and locale from the resource opened with the editor.", "Add a dependency to the graph\n\n@param dependency\n@param graph\n@param depth\n@param parentId", "Processes the template if the property value of the current object on the specified level equals the given value.\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\"\[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=\"value\" optional=\"false\" description=\"The value to check for\"\[email protected] name=\"default\" optional=\"true\" description=\"A default value to use if the property\nis not defined\"", "Complete both operations and commands.", "Use this API to fetch statistics of gslbservice_stats resource of given name .", "Retrieve a finish date.\n\n@param data byte array\n@param offset offset into byte array\n@return finish date", "Read, validate, and discard a single message, returning the next valid offset, and the\nmessage being validated\n\n@throws IOException any exception" ]
private void writePredecessors(Task task) { List<Relation> relations = task.getPredecessors(); for (Relation mpxj : relations) { RelationshipType xml = m_factory.createRelationshipType(); m_project.getRelationship().add(xml); xml.setLag(getDuration(mpxj.getLag())); xml.setObjectId(Integer.valueOf(++m_relationshipObjectID)); xml.setPredecessorActivityObjectId(mpxj.getTargetTask().getUniqueID()); xml.setSuccessorActivityObjectId(mpxj.getSourceTask().getUniqueID()); xml.setPredecessorProjectObjectId(PROJECT_OBJECT_ID); xml.setSuccessorProjectObjectId(PROJECT_OBJECT_ID); xml.setType(RELATION_TYPE_MAP.get(mpxj.getType())); } }
[ "Writes task predecessor links to a PM XML file.\n\n@param task MPXJ Task instance" ]
[ "Writes a DTD that can be used for data XML files matching the current model to the given writer.\n\n@param output The writer to write the DTD to", "Acquire the shared lock allowing the acquisition to be interrupted.\n@param permit - the permit Integer for this operation. May not be {@code null}.\n@throws InterruptedException - if the acquiring thread is interrupted.\n@throws IllegalArgumentException if {@code permit} is null.", "Replaces the model used to depict the controller in the scene.\n\n@param controllerModel root of hierarchy to use for controller model\n@see #getControllerModel()\n@see #showControllerModel(boolean)", "Use this API to unset the properties of Interface resource.\nProperties that need to be unset are specified in args array.", "Writes the torque schemata to files in the given directory and returns\na comma-separated list of the filenames.\n\n@param dir The directory to write the files to\n@return The list of filenames\n@throws IOException If an error occurred", "used to signal to the server that the client is going to drop the connection, and waits up to\none second for the server to acknowledge the receipt of this message", "Accessor method to retrieve an accrue type instance.\n\n@param field the index number of the field to be retrieved\n@return the value of the required field", "Returns the project membership record.\n\n@param projectMembership Globally unique identifier for the project membership.\n@return Request object", "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" ]
@Override public Configuration configuration() { return new MostUsefulConfiguration() // where to find the stories .useStoryLoader(new LoadFromClasspath(this.getClass())) // CONSOLE and TXT reporting .useStoryReporterBuilder(new StoryReporterBuilder().withDefaultFormats().withFormats(Format.CONSOLE, Format.TXT)); }
[ "Here we specify the configuration, starting from default MostUsefulConfiguration, and changing only what is needed" ]
[ "Creates a new Product in Grapes database\n\n@param dbProduct DbProduct", "Get a writer implementation to push data into Canvas.\n@param type Interface type you wish to get an implementation for\n@param oauthToken An OAuth token to use for authentication when making API calls\n@param <T> A writer implementation\n@return A writer implementation class", "Returns the item at the specified position.\n\n@param position index of the item to return\n@return the item at the specified position or {@code null} when not found", "Use this API to fetch dnstxtrec resources of given names .", "Fetch the outermost Hashmap as a TwoDHashMap.\n\n@param firstKey\nfirst key\n@return the the innermost hashmap", "Makes http DELETE request\n@param url url to makes request to\n@param params data to add to params field\n@return {@link okhttp3.Response}\n@throws RequestException\n@throws LocalOperationException", "Extract a list of exception assignments.\n\n@param exceptionData string representation of exception assignments\n@return list of exception assignment rows", "Purges the JSP repository.<p<\n\n@param afterPurgeAction the action to execute after purging", "Add a marker so we can recognize this as a metadata archive. I would use the ZipFile comment, but\nthat is not available until Java 7, and Beat Link is supposed to be backwards compatible with Java 6.\nSince we are doing this anyway, we can also provide information about the nature of the cache, and\nhow many metadata entries it contains, which is useful for auto-attachment.\n\n@param trackListEntries the tracks contained in the cache, so we can record the number\n@param playlistId the playlist contained in the cache, or 0 if it is all tracks from the media\n@param zos the stream to which the ZipFile is being written\n\n@throws IOException if there is a problem creating the format entry" ]
public synchronized void start() throws Exception { if (state == State.RUNNING) { LOG.debug("Ignore start() call on HTTP service {} since it has already been started.", serviceName); return; } if (state != State.NOT_STARTED) { if (state == State.STOPPED) { throw new IllegalStateException("Cannot start the HTTP service " + serviceName + " again since it has been stopped"); } throw new IllegalStateException("Cannot start the HTTP service " + serviceName + " because it was failed earlier"); } try { LOG.info("Starting HTTP Service {} at address {}", serviceName, bindAddress); channelGroup = new DefaultChannelGroup(ImmediateEventExecutor.INSTANCE); resourceHandler.init(handlerContext); eventExecutorGroup = createEventExecutorGroup(execThreadPoolSize); bootstrap = createBootstrap(channelGroup); Channel serverChannel = bootstrap.bind(bindAddress).sync().channel(); channelGroup.add(serverChannel); bindAddress = (InetSocketAddress) serverChannel.localAddress(); LOG.debug("Started HTTP Service {} at address {}", serviceName, bindAddress); state = State.RUNNING; } catch (Throwable t) { // Release resources if there is any failure channelGroup.close().awaitUninterruptibly(); try { if (bootstrap != null) { shutdownExecutorGroups(0, 5, TimeUnit.SECONDS, bootstrap.config().group(), bootstrap.config().childGroup(), eventExecutorGroup); } else { shutdownExecutorGroups(0, 5, TimeUnit.SECONDS, eventExecutorGroup); } } catch (Throwable t2) { t.addSuppressed(t2); } state = State.FAILED; throw t; } }
[ "Starts the HTTP service.\n\n@throws Exception if the service failed to started" ]
[ "Calculate start dates for a yearly recurrence.\n\n@param calendar current date\n@param dates array of start dates", "Overridden to add transform.", "Builds a instance of the class for a map containing the values\n\n@param clazz Class to build\n@param values Values map\n@param differenceHandler The difference handler\n@return The created instance\n@throws InstantiationException Error instantiating\n@throws IllegalAccessException Access error\n@throws IntrospectionException Introspection error\n@throws IllegalArgumentException Argument invalid\n@throws InvocationTargetException Invalid target", "Return the array of field objects pulled from the data object.", "Read the given source byte array, then overwrite this buffer's contents\n\n@param src source byte array\n@param srcOffset offset in source byte array to read from\n@param destOffset offset in this buffer to read to\n@param length max number of bytes to read\n@return the number of bytes read", "Calculates the Black-Scholes option value of an atm call option.\n\n@param volatility The Black-Scholes volatility.\n@param optionMaturity The option maturity T.\n@param forward The forward, i.e., the expectation of the index under the measure associated with payoff unit.\n@param payoffUnit The payoff unit, i.e., the discount factor or the anuity associated with the payoff.\n@return Returns the value of a European at-the-money call option under the Black-Scholes model", "Read ClassDescriptors from the given repository file.\n@see #mergeDescriptorRepository", "Add a channel to the animation to animate the named bone.\n@param boneName name of bone to animate.\n@param channel The animation channel.", "These exact lines are shared between three different tools, so\nthey have been moved here to reduce code duplication.\n@return The parsed command-line, with options removed." ]
public void onCreate(T content, LayoutInflater layoutInflater, ViewGroup parent) { this.content = content; this.rootView = inflate(layoutInflater, parent); if (rootView == null) { throw new NotInflateViewException( "Renderer instances have to return a not null view in inflateView method"); } this.rootView.setTag(this); setUpView(rootView); hookListeners(rootView); }
[ "Method called when the renderer is going to be created. This method has the responsibility of\ninflate the xml layout using the layoutInflater and the parent ViewGroup, set itself to the\ntag and call setUpView and hookListeners methods.\n\n@param content to render. If you are using Renderers with RecyclerView widget the content will\nbe null in this method.\n@param layoutInflater used to inflate the view.\n@param parent used to inflate the view." ]
[ "Creates a simple, annotation defined Enterprise Web Bean using the annotations specified on type\n\n@param <T> The type\n@param beanManager the current manager\n@param type the AnnotatedType to use\n@return An Enterprise Web Bean", "Look-up the results data for a particular test class.", "Initializes custom prefix for all junit4 properties. This must be consistent\nacross all junit4 invocations if done from the same classpath. Use only when REALLY needed.", "Turn map into string\n\n@param propMap Map to be converted\n@return", "Changes the given filenames suffix from the current suffix to the provided suffix.\n\n<b>Directly exposed for JSP EL</b>, not through {@link org.opencms.jsp.util.CmsJspElFunctions}.<p>\n\n@param filename the filename to be changed\n@param suffix the new suffix of the file\n\n@return the filename with the replaced suffix", "Initialize elements from the duration panel.", "This method extracts a portion of a byte array and writes it into\nanother byte array.\n\n@param data Source data\n@param offset Offset into source data\n@param size Required size to be extracted from the source data\n@param buffer Destination buffer\n@param bufferOffset Offset into destination buffer", "Returns the adapter position of the Parent associated with this ParentViewHolder\n\n@return The adapter position of the Parent if it still exists in the adapter.\nRecyclerView.NO_POSITION if item has been removed from the adapter,\nRecyclerView.Adapter.notifyDataSetChanged() has been called after the last\nlayout pass or the ViewHolder has already been recycled.", "Use this API to unset the properties of protocolhttpband resource.\nProperties that need to be unset are specified in args array." ]
public static void sendEvent(Context context, Parcelable event) { Intent intent = new Intent(EventManager.ACTION_ACCESSORY_EVENT); intent.putExtra(EventManager.EXTRA_EVENT, event); context.sendBroadcast(intent); }
[ "Send an event to other applications\n\n@param context context in which to send the broadcast\n@param event event to send" ]
[ "Compress a directory into a zip file\n\n@param dir Directory\n@param zipFile ZIP file to create\n@throws IOException I/O Error", "If any of the given list of properties are not found, returns the\nname of that property. Otherwise, returns null.", "Use this API to fetch filtered set of vpnclientlessaccesspolicy resources.\nset the filter parameter values in filtervalue object.", "Create a new Date. To the last day.", "Get the hours difference", "Concatenates of list of Bytes objects to create a byte array\n\n@param listOfBytes Bytes objects to concatenate\n@return Bytes", "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", "Sets top and bottom padding for all cells in the row.\n@param padding new padding for top and bottom, ignored if smaller than 0\n@return this to allow chaining", "Parse a duration in minutes form a number of hours.\n\n@param value String representation\n@return Integer instance" ]
private static String quoteSort(Sort[] sort) { LinkedList<String> sorts = new LinkedList<String>(); for (Sort pair : sort) { sorts.add(String.format("{%s: %s}", Helpers.quote(pair.getName()), Helpers.quote(pair.getOrder().toString()))); } return sorts.toString(); }
[ "sorts are a bit more awkward and need a helper..." ]
[ "Performs the actual spell check query using Solr.\n\n@param request the spell check request\n\n@return Results of the Solr spell check of type SpellCheckResponse or null if something goes wrong.", "Read a field from the supplied stream, starting with the tag that identifies the type, and reading enough\nto collect the corresponding value.\n\n@param is the stream on which a type tag is expected to be the next byte, followed by the field value.\n\n@return the field that was found on the stream.\n\n@throws IOException if there is a problem reading the field.", "Sets divider padding for axis. If axis does not match the orientation, it has no effect.\n@param padding\n@param axis {@link Axis}", "Return the knot at a given position.\n@param x the position\n@return the knot number, or 1 if no knot found", "Update the value of an embedded node property.\n\n@param executionEngine the {@link GraphDatabaseService} used to run the query\n@param keyValues the columns representing the identifier in the entity owning the embedded\n@param embeddedColumn the column on the embedded node (dot-separated properties)\n@param value the new value for the property", "Initializes the mode switcher.\n@param current the current edit mode", "Adds a new assignment to this task.\n@param assignTo the user to assign the assignment to.\n@return information about the newly added task assignment.", "Add a LIKE clause so the column must mach the value using '%' patterns.", "Get the section list\n\nN.B. The section list contains the bottom sections\n@return the list of sections setted" ]
private void doBatchWork(BatchBackend backend) throws InterruptedException { ExecutorService executor = Executors.newFixedThreadPool( typesToIndexInParallel, "BatchIndexingWorkspace" ); for ( IndexedTypeIdentifier indexedTypeIdentifier : rootIndexedTypes ) { executor.execute( new BatchIndexingWorkspace( gridDialect, searchFactoryImplementor, sessionFactory, indexedTypeIdentifier, cacheMode, endAllSignal, monitor, backend, tenantId ) ); } executor.shutdown(); endAllSignal.await(); // waits for the executor to finish }
[ "Will spawn a thread for each type in rootEntities, they will all re-join\non endAllSignal when finished.\n\n@param backend\n\n@throws InterruptedException\nif interrupted while waiting for endAllSignal." ]
[ "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", "Extracts a set of interceptor bindings from a collection of annotations.\n@param beanManager\n@param annotations\n@return", "This method returns the existing folder, and if it does not exist, the\nmethod generates it.\n\n@param path\n@param dest_dir\n@return the folder\n@throws BeastException", "Open the log file for writing.", "Locates a task within a child task container which matches the supplied UUID.\n\n@param parent child task container\n@param uuid required UUID\n@return Task instance or null if the task is not found", "Get the best guess we have for the current track position on the specified player.\n\n@param player the player number whose position is desired\n\n@return the milliseconds into the track that we believe playback has reached, or -1 if we don't know\n\n@throws IllegalStateException if the TimeFinder is not running", "Configures the given annotation as a tag.\n\nThis is useful if you want to treat annotations as tags in JGiven that you cannot or want not\nto be annotated with the {@link com.tngtech.jgiven.annotation.IsTag} annotation.\n\n@param tagAnnotation the tag to be configured\n@return a configuration builder for configuring the tag", "Lookup a PortComponentMetaData by wsdl-port local part\n\n@param name - the wsdl-port local part\n@return PortComponentMetaData if found, null otherwise", "Stops and clears all transitions" ]
public static final int getInt(byte[] data, int offset) { int result = 0; int i = offset; for (int shiftBy = 0; shiftBy < 32; shiftBy += 8) { result |= ((data[i] & 0xff)) << shiftBy; ++i; } return result; }
[ "Read a four byte integer.\n\n@param data byte array\n@param offset offset into array\n@return integer value" ]
[ "Return a set of all DeclarationBinder matching the DeclarationBinderFilter of the Linker.\n\n@return a Set of all DeclarationBinder matching the DeclarationBinderFilter of the Linker.", "Special multiplication that takes in account the zeros and one in Y, which\nis the matrix that stores the householder vectors.", "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", "Refactor the method into public CXF utility and reuse it from CXF instead copy&paste", "Mapping originator.\n\n@param originator the originator\n@return the originator type", "Loads the leap second rules from a URL, often in a jar file.\n\n@param url the jar file to load, not null\n@throws Exception if an error occurs", "Process the start of this element.\n\n@param attributes The attribute list for this element\n@param namespace the namespace URI of the matching element, or an empty string if the parser is not namespace\naware or the element has no namespace\n@param name the local name if the parser is namespace aware, or just the element name otherwise\n@throws Exception if something goes wrong", "Tell a device to turn sync on or off.\n\n@param deviceNumber the device whose sync state is to be set\n@param synced {@code} true if sync should be turned on, else it will be turned off\n\n@throws IOException if there is a problem sending the command to the device\n@throws IllegalStateException if the {@code VirtualCdj} is not active\n@throws IllegalArgumentException if {@code deviceNumber} is not found on the network", "Use this API to fetch cacheselector resource of given name ." ]
public boolean isRunning(final ProcessorGraphNode processorGraphNode) { this.processorLock.lock(); try { return this.runningProcessors.containsKey(processorGraphNode.getProcessor()); } finally { this.processorLock.unlock(); } }
[ "Return true if the processor of the node is currently being executed.\n\n@param processorGraphNode the node to test." ]
[ "Read all task relationships from a GanttProject.\n\n@param gpProject GanttProject project", "Parses the date or returns null if it fails to do so.", "Chooses the ECI mode most suitable for the content of this symbol.", "Set the background color of the progress spinner disc.\n\n@param colorRes Resource id of the color.", "Decode '%HH'.", "Generate a unique ID across the cluster\n@return generated ID", "Excludes Vertices that are of the provided type.", "Load the given class using a specific class loader.\n\n@param className The name of the class\n@param cl The Class Loader to be used for finding the class.\n@return The class object", "Upcasts a Builder instance to the generated superclass, to allow access to private fields.\n\n<p>Reuses an existing upcast instance if one was already declared in this scope.\n\n@param code the {@link SourceBuilder} to add the declaration to\n@param datatype metadata about the user type the builder is being generated for\n@param builder the Builder instance to upcast\n@returns a variable holding the upcasted instance" ]
public static void main(String args[]) throws Exception { final StringBuffer buffer = new StringBuffer("The lazy fox"); Thread t1 = new Thread() { public void run() { synchronized(buffer) { buffer.delete(0,4); buffer.append(" in the middle"); System.err.println("Middle"); try { Thread.sleep(4000); } catch(Exception e) {} buffer.append(" of fall"); System.err.println("Fall"); } } }; Thread t2 = new Thread() { public void run() { try { Thread.sleep(1000); } catch(Exception e) {} buffer.append(" jump over the fence"); System.err.println("Fence"); } }; t1.start(); t2.start(); t1.join(); t2.join(); System.err.println(buffer); }
[ "We have more input since wait started" ]
[ "Uniformly random numbers", "Set the name of the schema containing the schedule tables.\n\n@param schema schema name.", "Exact conversion of displaced lognormal ATM volatiltiy to normal ATM volatility.\n\n@param forward The forward\n@param displacement The displacement (considering a displaced lognormal model, otherwise 0.\n@param maturity The maturity\n@param lognormalVolatiltiy The (implied) lognormal volatility.\n@return The (implied) normal volatility.\n@see <a href=\"http://papers.ssrn.com/sol3/papers.cfm?abstract_id=2687742\">Dimitroff, Fries, Lichtner and Rodi: Lognormal vs Normal Volatilities and Sensitivities in Practice</a>", "Returns the ARGB components for all pixels in this image\n\n@return an array containing an array for each ARGB components in that order.", "Convert given value to given target\n\n@param fromValue\nthe value to convert\n@param toType\ntarget target\n@param <T>\ntarget of the result\n@return the value converted to given target\n@throws TypeCastException\nif conversion was not possible", "helper to calculate the navigationBar height\n\n@param context\n@return", "Returns the compact records for all users that are members of the team.\n\n@param team Globally unique identifier for the team.\n@return Request object", "Replace default values will null, allowing them to be ignored.\n\n@param value value to test\n@return filtered value", "Gets all rows.\n\n@return the list of all rows" ]
public double distanceToPlane(Point3d p) { return normal.x * p.x + normal.y * p.y + normal.z * p.z - planeOffset; }
[ "Computes the distance from a point p to the plane of this face.\n\n@param p\nthe point\n@return distance from the point to the plane" ]
[ "Sends out the SQL as defined in the config upon first init of the connection.\n@param connection\n@param initSQL\n@throws SQLException", "Used to retrieve all metadata associated with the item.\n@param item item to get metadata for.\n@param fields the optional fields to retrieve.\n@return An iterable of metadata instances associated with the item.", "Determines run length for each 'initial' partition ID. Note that a\ncontiguous run may \"wrap around\" the end of the ring.\n\n@param cluster\n@param zoneId\n@return map of initial partition Id to length of contiguous run of\npartition IDs within the same zone..", "Use this API to fetch all the tunneltrafficpolicy resources that are configured on netscaler.", "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", "Returns all model classes registered on this datasource\n\n@return model classes talk to this datasource", "Notifies that a header item is changed.\n\n@param position the position.", "Set the draw mode for this mesh. Default is GL_TRIANGLES.\n\n@param drawMode", "Detects if the current device is a Nintendo game device.\n@return detection of Nintendo" ]
static void onActivityCreated(Activity activity) { // make sure we have at least the default instance created here. if (instances == null) { CleverTapAPI.createInstanceIfAvailable(activity, null); } if (instances == null) { Logger.v("Instances is null in onActivityCreated!"); return; } boolean alreadyProcessedByCleverTap = false; Bundle notification = null; Uri deepLink = null; String _accountId = null; // check for launch deep link try { Intent intent = activity.getIntent(); deepLink = intent.getData(); if (deepLink != null) { Bundle queryArgs = UriHelper.getAllKeyValuePairs(deepLink.toString(), true); _accountId = queryArgs.getString(Constants.WZRK_ACCT_ID_KEY); } } catch (Throwable t) { // Ignore } // check for launch via notification click try { notification = activity.getIntent().getExtras(); if (notification != null && !notification.isEmpty()) { try { alreadyProcessedByCleverTap = (notification.containsKey(Constants.WZRK_FROM_KEY) && Constants.WZRK_FROM.equals(notification.get(Constants.WZRK_FROM_KEY))); if (alreadyProcessedByCleverTap){ Logger.v("ActivityLifecycleCallback: Notification Clicked already processed for "+ notification.toString() +", dropping duplicate."); } if (notification.containsKey(Constants.WZRK_ACCT_ID_KEY)) { _accountId = (String) notification.get(Constants.WZRK_ACCT_ID_KEY); } } catch (Throwable t) { // no-op } } } catch (Throwable t) { // Ignore } if (alreadyProcessedByCleverTap && deepLink == null) return; for (String accountId: CleverTapAPI.instances.keySet()) { CleverTapAPI instance = CleverTapAPI.instances.get(accountId); boolean shouldProcess = false; if (instance != null) { shouldProcess = (_accountId == null && instance.config.isDefaultInstance()) || instance.getAccountId().equals(_accountId); } if (shouldProcess) { if (notification != null && !notification.isEmpty() && notification.containsKey(Constants.NOTIFICATION_TAG)) { instance.pushNotificationClickedEvent(notification); } if (deepLink != null) { try { instance.pushDeepLink(deepLink); } catch (Throwable t) { // no-op } } break; } } }
[ "static lifecycle callbacks" ]
[ "Updates the styling and content of the internal text area based on the real value, the ghost value, and whether\nit has focus.", "Reads all text up to next XML tag and returns it as a String.\n\n@return the String of the text read, which may be empty.", "Use this API to convert sslpkcs12.", "Release transaction that was acquired in a thread with specified permits.", "Call the Yahoo! PlaceFinder service for a result.\n\n@param q\nsearch string\n@param maxRows\nmax number of rows in result, or 0 for all\n@param locale\nlocale for strings\n@return list of found results\n@throws Exception\noops\n@see <a\nhref=\"http://developer.yahoo.com/boss/geo/docs/free_YQL.html#table_pf\">Yahoo!\nBoss Geo PlaceFinder</a>", "Returns the bounding box of the vertices.\n@param corners destination array to get corners of bounding box.\nThe first three entries are the minimum X,Y,Z values\nand the next three are the maximum X,Y,Z.\n@return true if bounds are not empty, false if empty (no vertices)", "Set work connection.\n\n@param db the db setup bean", "Get string value of flow context for current instance\n@return string value of flow context", "Checks if is file exist.\n\n@param filePath\nthe file path\n@return true, if is file exist" ]
private Integer getKeyPartitionId(byte[] key) { Integer keyPartitionId = storeInstance.getNodesPartitionIdForKey(nodeId, key); Utils.notNull(keyPartitionId); return keyPartitionId; }
[ "Given the key, figures out which partition on the local node hosts the key.\n\n@param key\n@return" ]
[ "Returns the index of the segment containing the first byte outside the network prefix.\nWhen networkPrefixLength is null, or it matches or exceeds the bit length, returns the segment count.\n\n@param networkPrefixLength\n@param byteLength\n@return", "Pool configuration.\n@param props\n@throws HibernateException", "Modies the matrix to make sure that at least one element in each column has a value", "Adds steps types from given injector and recursively its parent\n\n@param injector the current Inject\n@param types the List of steps types", "Scale all widgets in Main Scene hierarchy\n@param scale", "Creates a new file.\n\n@param inputStream the stream instance that contains the data.\n@param fileName the name of the file to be created.\n@param fileSize the size of the file that will be uploaded.\n@return the created file instance.\n@throws InterruptedException when a thread execution is interrupted.\n@throws IOException when reading a stream throws exception.", "Resolves line alpha based on distance comparing to max distance.\nWhere alpha is close to 0 for maxDistance, and close to 1 to 0 distance.\n\n@param distance line length\n@param maxDistance max line length\n@return line alpha", "Start and configure GreenMail using given properties.\n\n@param properties the properties such as System.getProperties()", "Creates the request.\n\n@return the bound request builder\n@throws HttpRequestCreateException\nthe http request create exception" ]
public final Object copy(final Object toCopy, PersistenceBroker broker) { return clone(toCopy, IdentityMapFactory.getIdentityMap(), new HashMap()); }
[ "makes a deep clone of the object, using reflection.\n@param toCopy the object you want to copy\n@return" ]
[ "Optionally specify the variable name to use for the output of this condition", "Process an MPP file to make it anonymous.\n\n@param input input file name\n@param output output file name\n@throws Exception", "Transforms the category path of a category to the category.\n@return a map from root or site path to category.", "Register the given common classes with the ClassUtils cache.", "Sets the permissions associated with this shared link.\n@param permissions the new permissions for this shared link.", "Returns true if this entity's primary key is not null, and for numeric\nfields, is non-zero.", "Use this API to fetch all the snmpoption resources that are configured on netscaler.", "Inflate the main layout used to render videos in the list view.\n\n@param inflater LayoutInflater service to inflate.\n@param parent ViewGroup used to inflate xml.\n@return view inflated.", "Helper method to abstract out the common logic from the various users methods.\n\n@param api the API connection to be used when retrieving the users.\n@param filterTerm The filter term to lookup users by (login for external, login or name for managed)\n@param userType The type of users we want to search with this request.\nValid values are 'managed' (enterprise users), 'external' or 'all'\n@param externalAppUserId the external app user id that has been set for an app user\n@param fields the fields to retrieve. Leave this out for the standard fields.\n@return An iterator over the selected users." ]
public static String convertToSQL92(char escape, char multi, char single, String pattern) throws IllegalArgumentException { if ((escape == '\'') || (multi == '\'') || (single == '\'')) { throw new IllegalArgumentException("do not use single quote (') as special char!"); } StringBuilder result = new StringBuilder(pattern.length() + 5); int i = 0; while (i < pattern.length()) { char chr = pattern.charAt(i); if (chr == escape) { // emit the next char and skip it if (i != (pattern.length() - 1)) { result.append(pattern.charAt(i + 1)); } i++; // skip next char } else if (chr == single) { result.append('_'); } else if (chr == multi) { result.append('%'); } else if (chr == '\'') { result.append('\''); result.append('\''); } else { result.append(chr); } i++; } return result.toString(); }
[ "Given OGC PropertyIsLike Filter information, construct an SQL-compatible 'like' pattern.\n\nSQL % --> match any number of characters _ --> match a single character\n\nNOTE; the SQL command is 'string LIKE pattern [ESCAPE escape-character]' We could re-define the escape character,\nbut I'm not doing to do that in this code since some databases will not handle this case.\n\nMethod: 1.\n\nExamples: ( escape ='!', multi='*', single='.' ) broadway* -> 'broadway%' broad_ay -> 'broad_ay' broadway ->\n'broadway'\n\nbroadway!* -> 'broadway*' (* has no significance and is escaped) can't -> 'can''t' ( ' escaped for SQL\ncompliance)\n\n\nNOTE: we also handle \"'\" characters as special because they are end-of-string characters. SQL will convert ' to\n'' (double single quote).\n\nNOTE: we don't handle \"'\" as a 'special' character because it would be too confusing to have a special char as\nanother special char. Using this will throw an error (IllegalArgumentException).\n\n@param escape escape character\n@param multi ?????\n@param single ?????\n@param pattern pattern to match\n@return SQL like sub-expression\n@throws IllegalArgumentException oops" ]
[ "Sets the resource to which this calendar is linked. Note that this\nmethod updates the calendar's name to be the same as the resource name.\nIf the resource does not yet have a name, then the calendar is given\na default name.\n\n@param resource resource instance", "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", "Validations specific to PUT", "Check invariant.\n\n@param browser The browser.\n@return Whether the condition is satisfied or <code>false</code> when it it isn't or a\n{@link CrawljaxException} occurs.", "Return the List of Arguments for the specified MethodCallExpression or a ConstructorCallExpression.\nThe returned List contains either ConstantExpression or MapEntryExpression objects.\n@param methodCall - the AST MethodCallExpression or ConstructorCalLExpression\n@return the List of argument objects", "Request a scoped transactional token for a particular resource.\n@param accessToken application access token.\n@param scope scope of transactional token.\n@param resource resource transactional token has access to.\n@return a BoxAPIConnection which can be used to perform transactional requests.", "Get PhoneNumber object\n\n@return PhonenUmber | null on error", "Gets an enhanced protection domain for a proxy based on the given protection domain.\n@param domain the given protection domain\n@return protection domain enhanced with \"accessDeclaredMembers\" runtime permission", "Should be called after all columns have been created\n@param headerStyle\n@param totalStyle\n@param totalHeaderStyle\n@return" ]
public Configuration getConfiguration(String name) { Configuration[] values = getConfigurations(name); if (values == null) { return null; } return values[0]; }
[ "Get the value for a particular configuration property\n\n@param name - name of the property\n@return The first value encountered or null" ]
[ "Parses a single query item for the query facet.\n@param item JSON object of the query item.\n@return the parsed query item, or <code>null</code> if parsing failed.", "Reads a single schema file.\n\n@param reader The schema reader\n@param schemaFile The schema file\n@return The model", "Wrapped version of standard jdbc executeUpdate Pays attention to DB\nlocked exception and waits up to 1s\n\n@param query SQL query to execute\n@throws Exception - will throw an exception if we can never get a lock", "Map content.\n\n@param dh the data handler\n@return the string", "Reinitializes the shader texture used to fill in\nthe Circle upon drawing.", "Increases the internal array's length by the specified amount. Previous values are preserved.\nThe length value is not modified since this does not change the 'meaning' of the array, just\nincreases the amount of data which can be stored in it.\n\nthis.data = new data_type[ data.length + amount ]\n\n\n@param amount Number of elements added to the internal array's length", "If the file is compressed, handle this so that the stream is ready to read.\n\n@param stream input stream\n@return uncompressed input stream", "For recovery from the latest consistent snapshot, we should clean up the\nold files from the previous backup set, else we will fill the disk with\nuseless log files\n\n@param backupDir", "Returns the JMX connector address of a child process.\n\n@param p the process to which to connect\n@param startAgent whether to installed the JMX agent in the target process if not already in place\n@return a {@link JMXServiceURL} to the process's MBean server" ]
public static boolean compareAnnotatedTypes(AnnotatedType<?> t1, AnnotatedType<?> t2) { if (!t1.getJavaClass().equals(t2.getJavaClass())) { return false; } if (!compareAnnotated(t1, t2)) { return false; } if (t1.getFields().size() != t2.getFields().size()) { return false; } Map<Field, AnnotatedField<?>> fields = new HashMap<Field, AnnotatedField<?>>(); for (AnnotatedField<?> f : t2.getFields()) { fields.put(f.getJavaMember(), f); } for (AnnotatedField<?> f : t1.getFields()) { if (fields.containsKey(f.getJavaMember())) { if (!compareAnnotatedField(f, fields.get(f.getJavaMember()))) { return false; } } else { return false; } } if (t1.getMethods().size() != t2.getMethods().size()) { return false; } Map<Method, AnnotatedMethod<?>> methods = new HashMap<Method, AnnotatedMethod<?>>(); for (AnnotatedMethod<?> f : t2.getMethods()) { methods.put(f.getJavaMember(), f); } for (AnnotatedMethod<?> f : t1.getMethods()) { if (methods.containsKey(f.getJavaMember())) { if (!compareAnnotatedCallable(f, methods.get(f.getJavaMember()))) { return false; } } else { return false; } } if (t1.getConstructors().size() != t2.getConstructors().size()) { return false; } Map<Constructor<?>, AnnotatedConstructor<?>> constructors = new HashMap<Constructor<?>, AnnotatedConstructor<?>>(); for (AnnotatedConstructor<?> f : t2.getConstructors()) { constructors.put(f.getJavaMember(), f); } for (AnnotatedConstructor<?> f : t1.getConstructors()) { if (constructors.containsKey(f.getJavaMember())) { if (!compareAnnotatedCallable(f, constructors.get(f.getJavaMember()))) { return false; } } else { return false; } } return true; }
[ "Compares two annotated types and returns true if they are the same" ]
[ "Closes the output. Should be called after the JSON serialization was\nfinished.\n\n@throws IOException\nif there was a problem closing the output", "Return true only if the MethodCallExpression represents a method call for the specified method name\n@param methodCall - the AST MethodCallExpression\n@param methodNamePattern - the expected name of the method being called\n@param numArguments - The number of expected arguments\n@return true only if the method call name matches", "Convert element to another object given a parameterized type signature\n\n@param context\n@param destinationType\nthe destination type\n@param source\nthe source object\n\n@return the converted object\n@throws ConverterException\nif conversion failed", "Plots a list of charts in matrix with 2 columns.\n@param charts", "Geta the specified metadata template by its ID.\n@param api the API connection to be used.\n@param templateID the ID of the template to get.\n@return the metadata template object.", "Use this API to fetch sslcipher resources of given names .", "Set the list of supported resolutions. Each resolution is specified in map units per pixel.\n\n@param resolutions\nresolutions\n@deprecated use {@link #setZoomLevels()}", "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", "Creates a new deployment for the path. If the path is a directory the content will be deployed exploded using\nthe file system location.\n\n@param content the path containing the content\n\n@return the deployment" ]
public static int secondsDiff(Date earlierDate, Date laterDate) { if (earlierDate == null || laterDate == null) { return 0; } return (int) ((laterDate.getTime() / SECOND_MILLIS) - (earlierDate.getTime() / SECOND_MILLIS)); }
[ "Get the seconds difference" ]
[ "Get a property as a float or Default value.\n\n@param key the property name\n@param defaultValue default value", "Move the animation frame counter forward.\n\n@return boolean specifying if animation should continue or if loopCount has been fulfilled.", "Update max.\n\n@param n the n\n@param c the c", "performs a SQL UPDTE, INSERT or DELETE statement against RDBMS.\n@param sqlStatement the query string.\n@param cld ClassDescriptor providing meta-information.\n@return int returncode", "Extracts assignment baseline data.\n\n@param assignment xml assignment\n@param mpx mpxj assignment", "Resize the key data area.\nThis function will truncate the keys if the\ninitial setting was too large.\n\n@oaran numKeys the desired number of keys", "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.", "Find out the scrollable child view from a ViewGroup.\n\n@param viewGroup", "Change the color of the center which indicates the new color.\n\n@param color int of the color." ]
public int[] executeBatch(PreparedStatement stmt) throws PlatformException { // Check for Oracle batching support final Method methodSendBatch = (Method) m_batchStatementsInProgress.remove(stmt); final boolean statementBatchingSupported = methodSendBatch != null; int[] retval = null; if (statementBatchingSupported) { try { // sendBatch() returns total row count as an Integer methodSendBatch.invoke(stmt, null); } catch (Exception e) { throw new PlatformException(e.getLocalizedMessage(), e); } } else { retval = super.executeBatch(stmt); } return retval; }
[ "Try Oracle update batching and call sendBatch or revert to\nJDBC update batching.\n@param stmt the batched prepared statement about to be executed\n@return always <code>null</code> if Oracle update batching is used,\nsince it is impossible to dissolve total row count into distinct\nstatement counts. If JDBC update batching is used, an int array is\nreturned containing number of updated rows for each batched statement.\n@throws PlatformException upon JDBC failure" ]
[ "An efficient method for exchanging data between two bit strings. Both bit strings must\nbe long enough that they contain the full length of the specified substring.\n@param other The bitstring with which this bitstring should swap bits.\n@param start The start position for the substrings to be exchanged. All bit\nindices are big-endian, which means position 0 is the rightmost bit.\n@param length The number of contiguous bits to swap.", "A convenience method for creating an immutable sorted map.\n\n@param self a SortedMap\n@return an immutable SortedMap\n@see java.util.Collections#unmodifiableSortedMap(java.util.SortedMap)\n@since 1.0", "Uses current variable assignments and info in an NWiseActionTag to expand on an n wise combinatorial set\n\n@param action an NWiseAction Action\n@param possibleStateList a current list of possible states produced so far from expanding a model state\n@return every input possible state expanded on an n wise combinatorial set defined by that input possible state", "Starting with the given column index, will return the first column index\nwhich contains a colour that does not match the given color.", "Read a nested table whose contents we don't understand.\n\n@param rowSize fixed row size\n@param rowMagicNumber row magic number\n@return table rows", "A specific, existing project can be updated by making a PUT request on the\nURL for that project. Only the fields provided in the `data` block will be\nupdated; any unspecified fields will remain unchanged.\n\nWhen using this method, it is best to specify only those fields you wish\nto change, or else you may overwrite changes made by another user since\nyou last retrieved the task.\n\nReturns the complete updated project record.\n\n@param project The project to update.\n@return Request object", "Returns the most likely class for the word at the given position.", "Sort and order steps to avoid unwanted generation", "Cancel old waiting jobs.\n\n@param starttimeThreshold threshold for start time\n@param checkTimeThreshold threshold for last check time\n@param message the error message" ]
public Response remove(DesignDocument designDocument) { assertNotEmpty(designDocument, "DesignDocument"); ensureDesignPrefixObject(designDocument); return db.remove(designDocument); }
[ "Removes a design document using DesignDocument object from the database.\n\n@param designDocument the design document object to be removed\n@return {@link DesignDocument}" ]
[ "Apply a filter to the list of all tasks, and show the results.\n\n@param project project file\n@param filter filter", "Option check, forwards options to the standard doclet, if that one refuses them,\nthey are sent to UmlGraph", "Retrieves all Metadata Cascade Policies on a folder.\n\n@param fields optional fields to retrieve for cascade policies.\n@return the Iterable of Box Metadata Cascade Policies in your enterprise.", "Returns the text content to any HTML.\n\n@param html the HTML\n\n@return the text content", "Retrieve the default mapping between MPXJ assignment fields and Primavera assignment field names.\n\n@return mapping", "Indicates whether or not an event ID is a duplicate.\n\n<p>This method can be overridden by a subclass in order to provide custom de-duping logic.</p>\n\n@param eventID the event ID.\n@return true if the event is a duplicate; otherwise false.", "Returns the x-coordinate of a vertex normal.\n\n@param vertex the vertex index\n@return the x coordinate", "Determines if a point is inside a box.", "Initializes the counters for a property to zero if not done yet.\n\n@param usageStatistics\nstatistics object to initialize\n@param property\nthe property to count" ]
public int updateId(DatabaseConnection databaseConnection, T data, ID newId, ObjectCache objectCache) throws SQLException { if (mappedUpdateId == null) { mappedUpdateId = MappedUpdateId.build(dao, tableInfo); } int result = mappedUpdateId.execute(databaseConnection, data, newId, objectCache); if (dao != null && !localIsInBatchMode.get()) { dao.notifyChanges(); } return result; }
[ "Update an object in the database to change its id to the newId parameter." ]
[ "Leave a group.\n\n@see <a href=\"http://www.flickr.com/services/api/flickr.groups.leave.html\">lickr.groups.leave</a> for a description of the various behaviors possible\nwhen a user leaves a group.\n\n@param groupId\n- the id of the group to leave\n@param deletePhotos\n- delete photos by this user from group", "Obtain parameters from query\n\n@param query query to scan\n@return Map of parameters", "Return the List of VariableExpression objects referenced by the specified DeclarationExpression.\n@param declarationExpression - the DeclarationExpression\n@return the List of VariableExpression objects", "Use this API to fetch appfwpolicylabel_binding resource of given name .", "Calculate the first argument raised to the power of the second.\nThis method only supports non-negative powers.\n@param value The number to be raised.\n@param power The exponent (must be positive).\n@return {@code value} raised to {@code power}.", "Build a request URL.\n\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\n@deprecated use {@link #buildSecureUrl(java.lang.String, int, java.lang.String, java.util.Map) }", "once we're on ORM 5", "Set work connection.\n\n@param db the db setup bean", "Add a column to be set to a value for UPDATE statements. This will generate something like columnName = 'value'\nwith the value escaped if necessary." ]
public static ProjectReader getProjectReader(String name) throws MPXJException { int index = name.lastIndexOf('.'); if (index == -1) { throw new IllegalArgumentException("Filename has no extension: " + name); } String extension = name.substring(index + 1).toUpperCase(); Class<? extends ProjectReader> fileClass = READER_MAP.get(extension); if (fileClass == null) { throw new IllegalArgumentException("Cannot read files of type: " + extension); } try { ProjectReader file = fileClass.newInstance(); return (file); } catch (Exception ex) { throw new MPXJException("Failed to load project reader", ex); } }
[ "Retrieves a ProjectReader instance which can read a file of the\ntype specified by the supplied file name.\n\n@param name file name\n@return ProjectReader instance" ]
[ "Main method to run the bot.\n\n@param args\n@throws LoginFailedException\n@throws IOException\n@throws MediaWikiApiErrorException", "Records the result of updating a server.\n\n@param server the id of the server. Cannot be <code>null</code>\n@param response the result of the updates", "Writes the value key to the serialized characteristic\n\n@param builder The JSON builder to add the value to\n@param value The value to add", "Clean obsolete contents from the content repository. It will first mark contents as obsolete then after some time\nif these contents are still obsolete they will be removed.\n\n@return a map containing the list of marked contents and the list of deleted contents.", "Extracts the list of columns from the given field list.\n\n@param fields The fields\n@return The corresponding columns", "Create and serialize a WorkerStatus.\n\n@param queue the queue the Job came from\n@param job the Job currently being processed\n@return the JSON representation of a new WorkerStatus\n@throws IOException if there was an error serializing the WorkerStatus", "Convenience method to determine if a character is special to the regex system.\n\n@param chr\nthe character to test\n\n@return is the character a special character.", "Adds a tag to the resource.\n@param key the key for the tag\n@param value the value for the tag\n@return the next stage of the definition/update", "Remove the group and all references to it\n\n@param groupId ID of group" ]
private String hibcProcess(String source) { // HIBC 2.6 allows up to 110 characters, not including the "+" prefix or the check digit if (source.length() > 110) { throw new OkapiException("Data too long for HIBC LIC"); } source = source.toUpperCase(); if (!source.matches("[A-Z0-9-\\. \\$/+\\%]+?")) { throw new OkapiException("Invalid characters in input"); } int counter = 41; for (int i = 0; i < source.length(); i++) { counter += positionOf(source.charAt(i), HIBC_CHAR_TABLE); } counter = counter % 43; char checkDigit = HIBC_CHAR_TABLE[counter]; encodeInfo += "HIBC Check Digit Counter: " + counter + "\n"; encodeInfo += "HIBC Check Digit: " + checkDigit + "\n"; return "+" + source + checkDigit; }
[ "Adds the HIBC prefix and check digit to the specified data, returning the resultant data string.\n\n@see <a href=\"https://sourceforge.net/p/zint/code/ci/master/tree/backend/library.c\">Corresponding Zint code</a>" ]
[ "Get the element at the index as a float.\n\n@param i the index of the element to access", "Obtain the realm used for authentication.\n\nThis realm name applies to both the user and the groups.\n\n@return The name of the realm used for authentication.", "Merge the given maps.\n\n<p>\nThe replied map is a view on the given two maps.\nIf a key exists in the two maps, the replied value is the value of the right operand.\n</p>\n\n<p>\nEven if the key of the right operand exists in the left operand, the value in the right operand is preferred.\n</p>\n\n<p>\nThe replied map is unmodifiable.\n</p>\n\n@param <K> type of the map keys.\n@param <V> type of the map values.\n@param left the left map.\n@param right the right map.\n@return a map with the merged contents from the two maps.\n@since 2.15", "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", "Are we running in Jetty with JMX enabled?", "Use this API to update gslbsite resources.", "Create an index of base font numbers and their associated base\nfont instances.\n@param data property data", "Use this API to fetch all the ntpserver resources that are configured on netscaler.", "TestNG returns a compound thread ID that includes the thread name and its numeric ID,\nseparated by an 'at' sign. We only want to use the thread name as the ID is mostly\nunimportant and it takes up too much space in the generated report.\n@param threadId The compound thread ID.\n@return The thread name." ]
public static Key toKey(RowColumn rc) { if ((rc == null) || (rc.getRow().equals(Bytes.EMPTY))) { return null; } Text row = ByteUtil.toText(rc.getRow()); if ((rc.getColumn().equals(Column.EMPTY)) || !rc.getColumn().isFamilySet()) { return new Key(row); } Text cf = ByteUtil.toText(rc.getColumn().getFamily()); if (!rc.getColumn().isQualifierSet()) { return new Key(row, cf); } Text cq = ByteUtil.toText(rc.getColumn().getQualifier()); if (!rc.getColumn().isVisibilitySet()) { return new Key(row, cf, cq); } Text cv = ByteUtil.toText(rc.getColumn().getVisibility()); return new Key(row, cf, cq, cv); }
[ "Converts from a Fluo RowColumn to a Accumulo Key\n\n@param rc RowColumn\n@return Key" ]
[ "Converts any string into a string that is safe to use as a file name.\nThe result will only include ascii characters and numbers, and the \"-\",\"_\", and \".\" characters.", "Sets a configuration option to the specified value.", "Returns an array of all the singular values", "Maps all views that don't start with \"android\" namespace.\n\n@param names All shared element names.\n@return The obsolete shared element names.", "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", "Creates a new access control entry and stores it for later write out.\n\n@param res the resource\n@param id the id of the principal\n@param allowed the allowed permissions\n@param denied the denied permissions\n@param flags the flags\n\n@return the created ACE", "Starts off a new thread to monitor this connection attempt.\n@param connectionHandle to monitor", "Set a Background Drawable using the appropriate Android version api call\n\n@param view\n@param drawable", "Compares two vectors and determines if they are numeric equals,\nindependent of its type.\n\n@param vector1\nthe first vector\n@param vector2\nthe second vector\n@return true if the vectors are numeric equals" ]
protected void initValid(EnhancedAnnotation<T> annotatedAnnotation) { this.valid = false; for (Class<? extends Annotation> annotationType : getMetaAnnotationTypes()) { if (annotatedAnnotation.isAnnotationPresent(annotationType)) { this.valid = true; } } }
[ "Validates the data for correct annotation" ]
[ "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.", "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", "Use this API to unset the properties of callhome resource.\nProperties that need to be unset are specified in args array.", "This is a convenience method which reads the first project\nfrom the named MPD file using the JDBC-ODBC bridge driver.\n\n@param accessDatabaseFileName access database file name\n@return ProjectFile instance\n@throws MPXJException", "Unmarshal test suite from given file.", "Retrieves all Metadata Cascade Policies on a folder.\n\n@param fields optional fields to retrieve for cascade policies.\n@return the Iterable of Box Metadata Cascade Policies in your enterprise.", "Start a process using the given parameters.\n\n@param processId\n@param parameters\n@return", "Gets the pathClasses.\nA Map containing hints about what Class to be used for what path segment\nIf local instance not set, try parent Criteria's instance. If this is\nthe top-level Criteria, try the m_query's instance\n@return Returns a Map", "Use this API to fetch nsacl6 resource of given name ." ]
public CollectionRequest<Task> subtasks(String task) { String path = String.format("/tasks/%s/subtasks", task); return new CollectionRequest<Task>(this, Task.class, path, "GET"); }
[ "Returns a compact representation of all of the subtasks of a task.\n\n@param task The task to get the subtasks of.\n@return Request object" ]
[ "Adds a submodule to the module.\n\n<P>\nINFO: If the module is promoted, all added submodule will be promoted.\n\n@param submodule Module", "Makes a DocumentReaderAndWriter based on\nflags.plainTextReaderAndWriter. Useful for reading in\nuntokenized text documents or reading plain text from the command\nline. An example of a way to use this would be to return a\nedu.stanford.nlp.wordseg.Sighan2005DocumentReaderAndWriter for\nthe Chinese Segmenter.", "Recursively inspects the given objects and returns a node representing their differences. Both objects\nhave be have the same type.\n\n@param working This object will be treated as the successor of the `base` object.\n@param base This object will be treated as the predecessor of the <code>working</code> object.\n@return A node representing the differences between the given objects.", "Allocates a database connection.\n\n@throws SQLException", "Inserts a Serializable value into the mapping of the underlying Bundle, replacing any existing\nvalue for the given key. Either key or value may be null.\n\n@param key a String, or null\n@param value a Serializable object, or null\n@return this bundler instance to chain method calls", "Returns a new instance of the class with the given qualified name using the default or\nor a no-arg constructor.\n\n@param className The qualified name of the class to instantiate", "replace the counter for K1-index o by new counter c", "Set the week days the events should occur.\n@param weekDays the week days to set.", "Use this API to fetch statistics of servicegroup_stats resource of given name ." ]
private IntegrationFlowBuilder getIdleImapFlow(URLName urlName) { return IntegrationFlows.from(Mail.imapIdleAdapter(urlName.toString()) .shouldDeleteMessages(this.properties.isDelete()) .javaMailProperties(getJavaMailProperties(urlName)) .selectorExpression(this.properties.getExpression()) .shouldMarkMessagesAsRead(this.properties.isMarkAsRead())); }
[ "Method to build Integration flow for IMAP Idle configuration.\n@param urlName Mail source URL.\n@return Integration Flow object IMAP IDLE." ]
[ "Facade method facilitating the creation of subshell.\nSubshell is created and run inside Command method and shares the same IO and naming strtategy.\n\nRun the obtained Shell with commandLoop().\n\n@param pathElement sub-prompt\n@param parent Shell to be subshell'd\n@param appName The app name string\n@param mainHandler Command handler\n@return subshell", "Use this API to fetch the statistics of all rnatip_stats resources that are configured on netscaler.", "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", "Convert a method name into a property name.\n\n@param method target method\n@return property name", "Insert a new value prior to the index location in the existing value array,\nincreasing the field length accordingly.\n@param index - where the new values in an SFVec2f object will be placed in the array list\n@param newValue - the new x, y value for the array list", "Returns the adapter position of the Child associated with this ChildViewHolder\n\n@return The adapter position of the Child if it still exists in the adapter.\nRecyclerView.NO_POSITION if item has been removed from the adapter,\nRecyclerView.Adapter.notifyDataSetChanged() has been called after the last\nlayout pass or the ViewHolder has already been recycled.", "Update the given resource in the persistent configuration model based on the values in the given operation.\n\n@param operation the operation\n@param resource the resource that corresponds to the address of {@code operation}\n\n@throws OperationFailedException if {@code operation} is invalid or populating the model otherwise fails", "Use this API to fetch dnsnsecrec resources of given names .", "Returns an interval representing the addition of the\ngiven interval with this one.\n@param other interval to add to this one\n@return interval sum" ]
public static appfwhtmlerrorpage get(nitro_service service, String name) throws Exception{ appfwhtmlerrorpage obj = new appfwhtmlerrorpage(); obj.set_name(name); appfwhtmlerrorpage response = (appfwhtmlerrorpage) obj.get_resource(service); return response; }
[ "Use this API to fetch appfwhtmlerrorpage resource of given name ." ]
[ "Will auto format the given string to provide support for pickadate.js formats.", "Acquire the shared lock, with a max wait timeout to acquire.\n@param permit - the permit Integer for this operation. May not be {@code null}.\n@param timeout - the timeout scalar quantity.\n@param unit - see {@code TimeUnit} for quantities.\n@return {@code boolean} true on successful acquire.\n@throws InterruptedException - if the acquiring thread was interrupted.\n@throws IllegalArgumentException if {@code permit} is null.", "Creates a map between a calendar ID and a list of\nwork pattern assignment rows.\n\n@param rows work pattern assignment rows\n@return work pattern assignment map", "Transforms a config file with an XSLT transform.\n\n@param name file name of the config file\n@param transform file name of the XSLT file\n\n@throws Exception if something goes wrong", "Extracts a house holder vector from the rows of A and stores it in u\n@param A Complex matrix with householder vectors stored in the upper right triangle\n@param row Row in A\n@param col0 first row in A (implicitly assumed to be r + i0)\n@param col1 last row +1 in A\n@param u Output array storage\n@param offsetU first index in U", "Rent a car available in the last serach result\n@param intp - the command interpreter instance", "Used to set the complex value of a matrix element.\n@param row The row of the element.\n@param col The column of the element.\n@param real Real component of assigned value\n@param imaginary Imaginary component of assigned value", "Use this API to add nspbr6.", "Return true only if the node has the named annotation\n@param node - the AST Node to check\n@param name - the name of the annotation\n@return true only if the node has the named annotation" ]
@Override public void begin(String namespace, String name, Attributes attributes) throws Exception { // not now: 6.0.0 // digester.setLogger(CmsLog.getLog(digester.getClass())); // Push an array to capture the parameter values if necessary if (m_paramCount > 0) { Object[] parameters = new Object[m_paramCount]; for (int i = 0; i < parameters.length; i++) { parameters[i] = null; } getDigester().pushParams(parameters); } }
[ "Process the start of this element.\n\n@param attributes The attribute list for this element\n@param namespace the namespace URI of the matching element, or an empty string if the parser is not namespace\naware or the element has no namespace\n@param name the local name if the parser is namespace aware, or just the element name otherwise\n@throws Exception if something goes wrong" ]
[ "Get the server redirects belonging to a server group\n\n@param profileId ID of profile\n@param serverGroupId ID of server group\n@return Collection of ServerRedirect for a server group", "Provides a message which describes the expected format and arguments\nfor this command. This is used to provide user feedback when a command\nrequest is malformed.\n\n@return A message describing the command protocol format.", "Adds a new role to the list of defined roles.\n\n@param roleName - The name of the role being added.", "Sets the transformations to be applied to the shape before indexing it.\n\n@param transformations the sequence of transformations\n@return this with the specified sequence of transformations", "Fired whenever a browser event is received.\n@param event Event to process", "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", "Read an individual remark type from a Gantt Designer file.\n\n@param remark remark type", "This method is called to format a currency value.\n\n@param value numeric value\n@return currency value", "Obtains a Pax local date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the Pax local date-time, not null\n@throws DateTimeException if unable to create the date-time" ]
public boolean isEUI64(boolean partial) { int segmentCount = getSegmentCount(); int endIndex = addressSegmentIndex + segmentCount; if(addressSegmentIndex <= 5) { if(endIndex > 6) { int index3 = 5 - addressSegmentIndex; IPv6AddressSegment seg3 = getSegment(index3); IPv6AddressSegment seg4 = getSegment(index3 + 1); return seg4.matchesWithMask(0xfe00, 0xff00) && seg3.matchesWithMask(0xff, 0xff); } else if(partial && endIndex == 6) { IPv6AddressSegment seg3 = getSegment(5 - addressSegmentIndex); return seg3.matchesWithMask(0xff, 0xff); } } else if(partial && addressSegmentIndex == 6 && endIndex > 6) { IPv6AddressSegment seg4 = getSegment(6 - addressSegmentIndex); return seg4.matchesWithMask(0xfe00, 0xff00); } return partial; }
[ "Whether this section is consistent with an EUI64 section,\nwhich means it came from an extended 8 byte address,\nand the corresponding segments in the middle match 0xff and 0xfe\n\n@param partial whether missing segments are considered a match\n@return" ]
[ "Answers the ClassDescriptor referenced by 'super' ReferenceDescriptor.\n@return ClassDescriptor or null", "Requests Change notifications of feed type normal.\n\n@return {@link ChangesResult} encapsulating the normal feed changes", "Return a list of unique namespace and predicate pairs, optionally limited by predicate or namespace, in alphabetical order.\n\nThis method does not require authentication.\n\n@param namespace\noptional, can be null\n@param predicate\noptional, can be null\n@param perPage\nThe number of photos to show per page\n@param page\nThe page offset\n@return NamespacesList containing Pair-objects\n@throws FlickrException", "Retrieves a ProjectReader instance which can read a file of the\ntype specified by the supplied file name.\n\n@param name file name\n@return ProjectReader instance", "Gets the current page\n@return", "Derive a calendar for a resource.\n\n@param parentCalendarID calendar from which resource calendar is derived\n@return new calendar for a resource", "Helper method for formatting connection termination messages.\n\n@param connectionName\nThe name of the connection\n@param host\nThe remote host\n@param connectionReason\nThe reason for establishing the connection\n@param terminationReason\nThe reason for terminating the connection\n@return A formatted message in the format:\n\"[&lt;connectionName&gt;] remote host[&lt;host&gt;] &lt;connectionReason&gt; - &lt;terminationReason&gt;\"\n<br/>\ne.g. [con1] remote host[123.123.123.123] connection to ECMG -\nterminated by remote host.", "Retrieves all Metadata Cascade Policies on a folder.\n\n@param fields optional fields to retrieve for cascade policies.\n@return the Iterable of Box Metadata Cascade Policies in your enterprise.", "Generate a schedule for the given start and end date.\n\n@param referenceDate The reference date (corresponds to \\( t = 0 \\).\n@param startDate The start date.\n@param endDate The end date.\n@return The schedule" ]
@SuppressWarnings("WeakerAccess") public Color segmentColor(final int segment, final boolean front) { final ByteBuffer bytes = getData(); if (isColor) { final int base = segment * 6; final int backHeight = segmentHeight(segment, false); if (backHeight == 0) { return Color.BLACK; } final int maxLevel = front? 255 : 191; final int red = Util.unsign(bytes.get(base + 3)) * maxLevel / backHeight; final int green = Util.unsign(bytes.get(base + 4)) * maxLevel / backHeight; final int blue = Util.unsign(bytes.get(base + 5)) * maxLevel / backHeight; return new Color(red, green, blue); } else { final int intensity = getData().get(segment * 2 + 1) & 0x07; return (intensity >= 5) ? INTENSE_COLOR : NORMAL_COLOR; } }
[ "Determine the color of the waveform given an index into it.\n\n@param segment the index of the first waveform byte to examine\n@param front if {@code true} the front (brighter) segment of a color waveform preview is returned,\notherwise the back (dimmer) segment is returned. Has no effect for blue previews.\n\n@return the color of the waveform at that segment, which may be based on an average\nof a number of values starting there, determined by the scale" ]
[ "Adds each required length, ensuring it isn't negative.\n\n@param requiredLengths\none or more required lengths\n@throws IllegalArgumentException\nif a supplied length is negative", "Return the path to the parent directory. Should return the root if\nfrom is root.\n\n@param from either a file or directory\n@return the parent directory", "Delete all enabled overrides for a client\n\n@param profileId profile ID of teh client\n@param client_uuid UUID of teh client", "appends a WHERE-clause to the Statement\n@param where\n@param crit\n@param stmt", "Get an interpolated value for a given argument x.\n\n@param x The abscissa at which the interpolation should be performed.\n@return The interpolated value (ordinate).", "Constructs a new ClientBuilder for building a CloudantClient instance to connect to the\nCloudant server with the specified account.\n\n@param account the Cloudant account name to connect to e.g. \"example\" is the account name\nfor the \"example.cloudant.com\" endpoint\n@return a new ClientBuilder for the account\n@throws IllegalArgumentException if the specified account name forms an invalid endpoint URL", "Creates a new Product in Grapes database\n\n@param dbProduct DbProduct", "Deserialize a javascript design document file to a DesignDocument object.\n\n@param file the design document javascript file (UTF-8 encoded)\n@return {@link DesignDocument}\n@throws FileNotFoundException if the file does not exist or cannot be read", "Get a list of referrers from a given domain to a collection.\n\n@param date\n(Required) Stats will be returned for this date. A day according to Flickr Stats starts at midnight GMT for all users, and timestamps will\nautomatically be rounded down to the start of the day.\n@param domain\n(Required) The domain to return referrers for. This should be a hostname (eg: \"flickr.com\") with no protocol or pathname.\n@param collectionId\n(Optional) The id of the collection to get stats for. If not provided, stats for all collections will be returned.\n@param perPage\n(Optional) Number of domains to return per page. If this argument is omitted, it defaults to 25. The maximum allowed value is 100.\n@param page\n(Optional) The page of results to return. If this argument is omitted, it defaults to 1.\n@see \"http://www.flickr.com/services/api/flickr.stats.getCollectionReferrers.html\"" ]
private void processPredecessors() { for (Map.Entry<Task, List<MapRow>> entry : m_predecessorMap.entrySet()) { Task task = entry.getKey(); List<MapRow> predecessors = entry.getValue(); for (MapRow predecessor : predecessors) { processPredecessor(task, predecessor); } } }
[ "Extract predecessor data." ]
[ "Updates the path_order column in the table, loops though the pathOrder array, and changes the value to the loop\nindex+1 for the specified pathId\n\n@param profileId ID of profile\n@param pathOrder array containing new order of paths", "Deserialize a javascript design document file to a DesignDocument object.\n\n@param file the design document javascript file (UTF-8 encoded)\n@return {@link DesignDocument}\n@throws FileNotFoundException if the file does not exist or cannot be read", "Reads next frame image.", "Returns the shared prefix of these columns. Null otherwise.\n\n@param associationKeyColumns the columns sharing a prefix\n@return the shared prefix of these columns. {@code null} otherwise.", "Get the current stack trace element, skipping anything from known logging classes.\n@return The current stack trace for this thread", "Remember execution time for all executed suites.", "We are adding a redeploy operation step for each specified deployment runtime name.\n\n@param context\n@param deploymentsRootAddress\n@param deploymentNames\n@throws OperationFailedException", "This method extracts data for a single predecessor from an MSPDI file.\n\n@param currTask Current task object\n@param link Predecessor data", "Cosine interpolation.\n\n@param x1 X1 Value.\n@param x2 X2 Value.\n@param a Value.\n@return Value." ]
private void logBlock(int blockIndex, int startIndex, int blockLength) { if (m_log != null) { m_log.println("Block Index: " + blockIndex); m_log.println("Length: " + blockLength + " (" + Integer.toHexString(blockLength) + ")"); m_log.println(); m_log.println(FastTrackUtility.hexdump(m_buffer, startIndex, blockLength, true, 16, "")); m_log.flush(); } }
[ "Log block data.\n\n@param blockIndex current block index\n@param startIndex start index\n@param blockLength length" ]
[ "Create an MD5 hash of a string.\n\n@param input Input string.\n@return Hash of input.\n@throws IllegalArgumentException if {@code input} is blank.", "Add this service to the given service target.\n@param serviceTarget the service target\n@param configuration the bootstrap configuration", "Parses the list of query items for the query facet.\n@param queryFacetObject JSON object representing the node with the query facet.\n@return list of query options\n@throws JSONException if the list cannot be parsed.", "Set the background color.\n\nIf you don't set the background color, the default is an opaque black:\n{@link Color#BLACK}, 0xff000000.\n\n@param color\nAn Android 32-bit (ARGB) {@link Color}, such as you get from\n{@link Resources#getColor(int)}", "Returns the result of a stored procedure executed on the backend.\n\n@param embeddedCacheManager embedded cache manager\n@param storedProcedureName name of stored procedure\n@param queryParameters parameters passed for this query\n@param classLoaderService the class loader service\n\n@return a {@link ClosableIterator} with the result of the query", "Empirical data from 3.x, actual =40", "Build the context name.\n\n@param objs the objects\n@return the global context name", "Create a new photoset.\n\n@param title\nThe photoset title\n@param description\nThe photoset description\n@param primaryPhotoId\nThe primary photo id\n@return The new Photset\n@throws FlickrException", "Add an individual class to the map file.\n\n@param loader jar file class loader\n@param jarEntry jar file entry\n@param writer XML stream writer\n@param mapClassMethods true if we want to produce .Net style class method names\n@throws ClassNotFoundException\n@throws XMLStreamException\n@throws IntrospectionException" ]
public @Nullable ChangeEvent<BsonDocument> getUnprocessedEventForDocumentId( final MongoNamespace namespace, final BsonValue documentId ) { this.instanceLock.readLock().lock(); final NamespaceChangeStreamListener streamer; try { streamer = nsStreamers.get(namespace); } finally { this.instanceLock.readLock().unlock(); } if (streamer == null) { return null; } return streamer.getUnprocessedEventForDocumentId(documentId); }
[ "If there is an unprocessed change event for a particular document ID, fetch it from the\nappropriate namespace change stream listener, and remove it. By reading the event here, we are\nassuming it will be processed by the consumer.\n\n@return the latest unprocessed change event for the given document ID and namespace, or null\nif none exists." ]
[ "Sort MapRows based on a named attribute.\n\n@param rows map rows to sort\n@param attribute attribute to sort on\n@return list argument (allows method chaining)", "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", "Send a device lost announcement to all registered listeners.\n\n@param announcement the last message received from the vanished device", "This method extracts assignment data from an MSPDI file.\n\n@param project Root node of the MSPDI file", "Produce an iterator over the input values in sorted order. Sorting will\noccur in the fixed space configured in the constructor, data will be\ndumped to disk as necessary.\n\n@param input An iterator over the input values\n@return An iterator over the values", "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", "Reports that a node is faulted.\n\n@param faulted the node faulted\n@param throwable the reason for fault", "Gets the element at the given index.\n\n@param index the index\n@return the element\n\n@throws IndexOutOfBoundsException if the index is out of range (<tt>index &lt; 0 || index &gt;= size()</tt>)", "Return a long value which is the number of rows in the table." ]
public void ifHasMemberWithTag(String template, Properties attributes) throws XDocletException { ArrayList allMemberNames = new ArrayList(); HashMap allMembers = new HashMap(); boolean hasTag = false; addMembers(allMemberNames, allMembers, getCurrentClass(), null, null, null); for (Iterator it = allMemberNames.iterator(); it.hasNext(); ) { XMember member = (XMember) allMembers.get(it.next()); if (member instanceof XField) { setCurrentField((XField)member); if (hasTag(attributes, FOR_FIELD)) { hasTag = true; } setCurrentField(null); } else if (member instanceof XMethod) { setCurrentMethod((XMethod)member); if (hasTag(attributes, FOR_METHOD)) { hasTag = true; } setCurrentMethod(null); } if (hasTag) { generate(template); break; } } }
[ "Evaluates the body if the current class has at least one member with at least one tag with the specified name.\n\n@param template The body of the block tag\n@param attributes The attributes of the template tag\n@exception XDocletException Description of Exception\[email protected] type=\"block\"\[email protected] name=\"tagName\" optional=\"false\" description=\"The tag name.\"\[email protected] name=\"paramName\" description=\"The parameter name. If not specified, then the raw\ncontent of the tag is returned.\"\[email protected] name=\"error\" description=\"Show this error message if no tag found.\"" ]
[ "It should be called when the picker is hidden", "Prints a currency symbol position value.\n\n@param value CurrencySymbolPosition instance\n@return currency symbol position", "Use this API to save cachecontentgroup resources.", "A static method that provides an easy way to create a list of a\ncertain parametric type.\nThis static constructor works better with generics.\n\n@param list The list to pad\n@param padding The padding element (may be null)\n@return The padded list", "returns an Array with an Objects PK VALUES, with any java-to-sql\nFieldConversion applied. If the Object is a Proxy or a VirtualProxy NO\nconversion is necessary.\n\n@param objectOrProxy\n@return Object[]\n@throws PersistenceBrokerException", "Used to add working hours to the calendar. Note that the MPX file\ndefinition allows a maximum of 7 calendar hours records to be added to\na single calendar.\n\n@param day day number\n@return new ProjectCalendarHours instance", "Load a table configuration in from a text-file reader.\n\n@return A config if any of the fields were set otherwise null if we reach EOF.", "Determines if the queue identified by the given key is a delayed queue.\n\n@param jedis\nconnection to Redis\n@param key\nthe key that identifies a queue\n@return true if the key identifies a delayed queue, false otherwise", "The main method called from the command line.\n\n@param args the command line arguments" ]
public void processAnonymousReference(Properties attributes) throws XDocletException { ReferenceDescriptorDef refDef = _curClassDef.getReference("super"); String attrName; if (refDef == null) { refDef = new ReferenceDescriptorDef("super"); _curClassDef.addReference(refDef); } refDef.setAnonymous(); LogHelper.debug(false, OjbTagsHandler.class, "processAnonymousReference", " Processing anonymous reference"); for (Enumeration attrNames = attributes.propertyNames(); attrNames.hasMoreElements(); ) { attrName = (String)attrNames.nextElement(); refDef.setProperty(attrName, attributes.getProperty(attrName)); } }
[ "Processes an anonymous reference definition.\n\n@param attributes The attributes of the tag\n@exception XDocletException If an error occurs\[email protected] type=\"content\"\[email protected] name=\"attributes\" optional=\"true\" description=\"Attributes of the reference as name-value pairs 'name=value',\nseparated by commas\"\[email protected] name=\"auto-delete\" optional=\"true\" description=\"Whether to automatically delete the\nreferenced object on object deletion\"\[email protected] name=\"auto-retrieve\" optional=\"true\" description=\"Whether to automatically retrieve\nthe referenced object\"\[email protected] name=\"auto-update\" optional=\"true\" description=\"Whether to automatically update the\nreferenced object\"\[email protected] name=\"class-ref\" optional=\"false\" description=\"The fully qualified name of the class\nowning the referenced field\"\[email protected] name=\"documentation\" optional=\"true\" description=\"Documentation on the reference\"\[email protected] name=\"foreignkey\" optional=\"true\" description=\"The fields in the current type used for\nimplementing the reference\"\[email protected] name=\"otm-dependent\" optional=\"true\" description=\"Whether the reference is dependent on otm\"\[email protected] name=\"proxy\" optional=\"true\" description=\"Whether to use a proxy for the reference\"\[email protected] name=\"proxy-prefetching-limit\" optional=\"true\" description=\"Specifies the amount of objects to prefetch\"\[email protected] name=\"refresh\" optional=\"true\" description=\"Whether to automatically refresh the\nreference\"\[email protected] name=\"remote-foreignkey\" optional=\"true\" description=\"The fields in the referenced type\ncorresponding to the local fields (is only used for the table definition)\"" ]
[ "Returns the shared prefix of these columns. Null otherwise.\n\n@param associationKeyColumns the columns sharing a prefix\n@return the shared prefix of these columns. {@code null} otherwise.", "Converts the List to PagedList.\n@param list list to be converted in to paged list\n@param <InnerT> the wrapper inner type\n@return the Paged list for the inner type.", "Inserts 'token' after 'where'. if where is null then it is inserted to the beginning of the list.\n@param where Where 'token' should be inserted after. if null the put at it at the beginning\n@param token The token that is to be inserted", "Sets test status.", "Set HTTP headers to allow caching for the given number of seconds.\n\n@param response where to set the caching settings\n@param seconds number of seconds into the future that the response should be cacheable for", "Use this API to fetch responderhtmlpage resource of given name .", "Obtains a British Cutover local date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the British Cutover local date-time, not null\n@throws DateTimeException if unable to create the date-time", "Gets the appropriate cache dir\n\n@param ctx\n@return", "Watches specified IDs in a collection.\n@param ids the ids to watch.\n@return the stream of change events." ]
public static void validateClusterZonesSame(final Cluster lhs, final Cluster rhs) { Set<Zone> lhsSet = new HashSet<Zone>(lhs.getZones()); Set<Zone> rhsSet = new HashSet<Zone>(rhs.getZones()); if(!lhsSet.equals(rhsSet)) throw new VoldemortException("Zones are not the same [ lhs cluster zones (" + lhs.getZones() + ") not equal to rhs cluster zones (" + rhs.getZones() + ") ]"); }
[ "Confirms that both clusters have the same set of zones defined.\n\n@param lhs\n@param rhs" ]
[ "Harvest a single value that was returned by a callable statement.\n\n@param obj the object that will receive the value that is harvested.\n@param callable the CallableStatement that contains the value to harvest\n@param fmd the FieldDescriptor that identifies the field where the\nharvested value will be stord.\n@param index the parameter index.\n\n@throws PersistenceBrokerSQLException if a problem occurs.", "Use this API to unset the properties of csparameter resource.\nProperties that need to be unset are specified in args array.", "This method writes predecessor data to a Planner file.\nWe have to deal with a slight anomaly in this method that is introduced\nby the MPX file format. It would be possible for someone to create an\nMPX file with both the predecessor list and the unique ID predecessor\nlist populated... which means that we must process both and avoid adding\nduplicate predecessors. Also interesting to note is that MSP98 populates\nthe predecessor list, not the unique ID predecessor list, as you might\nexpect.\n\n@param mpxjTask MPXJ task instance\n@param plannerTask planner task instance", "Returns a resource wrapper created from the input.\n\nThe wrapped result of {@link #convertRawResource(CmsObject, Object)} is returned.\n\n@param cms the current OpenCms user context\n@param input the input to create a resource from\n\n@return a resource wrapper created from the given Object\n\n@throws CmsException in case of errors accessing the OpenCms VFS for reading the resource", "Retrieve all addresses of a host by it's address. NetBIOS hosts can\nhave many names for a given IP address. The name and IP address make the\nNetBIOS address. This provides a way to retrieve the other names for a\nhost with the same IP address.\n\n@param addr the address to query\n@throws UnknownHostException if address cannot be resolved", "Map a single ResultSet row to a T instance.\n\n@throws SQLException", "Appends the String representation of the given operand to this CharSequence.\n\n@param left a CharSequence\n@param value any Object\n@return the original toString() of the CharSequence with the object appended\n@since 1.8.2", "This loads plugin file information into a hash for lazy loading later on\n\n@param pluginDirectory path of plugin\n@throws Exception exception", "Given a list of store definitions return a list of store names\n\n@param storeDefList The list of store definitions\n@return Returns a list of store names" ]
public TileMap getCapabilities(TmsLayer layer) throws TmsLayerException { try { // Create a JaxB unmarshaller: JAXBContext context = JAXBContext.newInstance(TileMap.class); Unmarshaller um = context.createUnmarshaller(); // Find out where to retrieve the capabilities and unmarshall: if (layer.getBaseTmsUrl().startsWith(CLASSPATH)) { String location = layer.getBaseTmsUrl().substring(CLASSPATH.length()); if (location.length() > 0 && location.charAt(0) == '/') { // classpath resources should not start with a slash, but they often do location = location.substring(1); } ClassLoader cl = Thread.currentThread().getContextClassLoader(); if (null == cl) { cl = getClass().getClassLoader(); // NOSONAR fallback from proper behaviour for some environments } InputStream is = cl.getResourceAsStream(location); if (null != is) { try { return (TileMap) um.unmarshal(is); } finally { try { is.close(); } catch (IOException ioe) { // ignore, just closing the stream } } } throw new TmsLayerException(TmsLayerException.COULD_NOT_FIND_FILE, layer.getBaseTmsUrl()); } // Normal case, find the URL and unmarshal: return (TileMap) um.unmarshal(httpService.getStream(layer.getBaseTmsUrl(), layer)); } catch (JAXBException e) { throw new TmsLayerException(e, TmsLayerException.COULD_NOT_READ_FILE, layer.getBaseTmsUrl()); } catch (IOException e) { throw new TmsLayerException(e, TmsLayerException.COULD_NOT_READ_FILE, layer.getBaseTmsUrl()); } }
[ "Get the configuration for a TMS layer by retrieving and parsing it's XML description file. The parsing is done\nusing JaxB.\n@param layer the tms layer to get capabilities for.\n@return Returns the description as a Java configuration object.\n@throws TmsLayerException\nIn case something went wrong trying to find or parse the XML description file." ]
[ "Answer true if an Iterator for a Table is already available\n@param aTable\n@return", "Write a long attribute.\n\n@param name attribute name\n@param value attribute value", "Convert the MSPDI representation of a UUID into a Java UUID instance.\n\n@param value MSPDI UUID\n@return Java UUID instance", "Retrieves state and metrics information for all channels on individual connection.\n@param connectionName the connection name to retrieve channels\n@return list of channels on the connection", "Prepare a parallel HTTP HEAD Task.\n\n@param url\nthe UrlPostfix: e.g. in http://localhost:8080/index.html.,the url is \"/index.html\"\n@return the parallel task builder", "Returns the collection definition of the given name if it exists.\n\n@param name The name of the collection\n@return The collection definition or <code>null</code> if there is no such collection", "Tokenize the the string as a package hierarchy\n\n@param str\n@return", "Determines run length for each 'initial' partition ID. Note that a\ncontiguous run may \"wrap around\" the end of the ring.\n\n@param cluster\n@param zoneId\n@return map of initial partition Id to length of contiguous run of\npartition IDs within the same zone..", "Gets all checked widget indexes in the group. The indexes are counted from 0 to size -1,\nwhere size is the number of Checkable widgets in the group. It does not take into account\nany non-Checkable widgets added to the group widget.\n\n@return list of checked widget indexes" ]
public static boolean isClosureDeclaration(ASTNode expression) { if (expression instanceof DeclarationExpression) { if (((DeclarationExpression) expression).getRightExpression() instanceof ClosureExpression) { return true; } } if (expression instanceof FieldNode) { ClassNode type = ((FieldNode) expression).getType(); if (AstUtil.classNodeImplementsType(type, Closure.class)) { return true; } else if (((FieldNode) expression).getInitialValueExpression() instanceof ClosureExpression) { return true; } } return false; }
[ "Returns true if the ASTNode is a declaration of a closure, either as a declaration\nor a field.\n@param expression\nthe target expression\n@return\nas described" ]
[ "Facade method for operating the Shell.\n\nRun the obtained Shell with commandLoop().\n\n@see org.gearvrf.debug.cli.Shell#Shell(org.gearvrf.debug.cli.Shell.Settings, org.gearvrf.debug.cli.CommandTable, java.util.List)\n\n@param prompt Prompt to be displayed\n@param appName The app name string\n@param mainHandler Command handler\n@return Shell that can be either further customized or run directly by calling commandLoop().", "This method writes resource data to a Planner file.", "Parses a single query facet item with query and label.\n@param prefix path to the query facet item (with trailing '/').\n@return the query facet item.", "Use this API to delete nsip6.", "This method writes project extended attribute data into an MSPDI file.\n\n@param project Root node of the MSPDI file", "Formats a vertex using it's properties. Debugging purposes.", "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", "Cancel all task with this tag and returns the canceled task count\n\n@param tagToCancel\n@return", "Convert the server side feature to a DTO feature that can be sent to the client.\n\n@param feature\nThe server-side feature representation.\n@param featureIncludes\nIndicate which aspects of the should be included see {@link VectorLayerService}\n@return Returns the DTO feature." ]
private boolean isDepOfIdlArtifact(Artifact artifact, Map<String, Artifact> depsMap) { List<String> depTrail = artifact.getDependencyTrail(); // depTrail can be null sometimes, which seems like a maven bug if (depTrail != null) { for (String name : depTrail) { Artifact dep = depsMap.get(name); if (dep != null && isIdlCalssifier(dep, classifier)) { return true; } } } return false; }
[ "Checks if the artifact is dependency of an dependent idl artifact\n@returns true if the artifact was a dependency of idl artifact" ]
[ "Parses and removes embedded gallery configuration strings.\n\n@param configuration the configuration string to parse\n\n@return a map containing both the string resulting from removing the embedded configurations, and the embedded configurations as a a map", "Sets the path of the edited file in the corresponding display.\n@param editedFilePath path of the edited file to set.", "Return true if the processor of the node is currently being executed.\n\n@param processorGraphNode the node to test.", "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>", "Set the position of the pick ray.\nThis function is used internally to update the\npick ray with the new controller position.\n@param x the x value of the position.\n@param y the y value of the position.\n@param z the z value of the position.", "Creates and returns a matrix which is idential to this one.\n\n@return A new identical matrix.", "Performs a standard QR decomposition on the specified submatrix that is one block wide.\n\n@param blockLength\n@param Y\n@param gamma", "Computes the mean or average of all the elements.\n\n@return mean", "Digest format to layer file name.\n\n@param digest\n@return" ]
PollingState<T> withResponse(Response<ResponseBody> response) { this.response = response; withPollingUrlFromResponse(response); withPollingRetryTimeoutFromResponse(response); return this; }
[ "Sets the last operation response.\n\n@param response the last operation response." ]
[ "Configures the given annotation as a tag.\n\nThis is useful if you want to treat annotations as tags in JGiven that you cannot or want not\nto be annotated with the {@link com.tngtech.jgiven.annotation.IsTag} annotation.\n\n@param tagAnnotation the tag to be configured\n@return a configuration builder for configuring the tag", "Returns the artifact available versions\n\n@param gavc String\n@return List<String>", "Generate the specified output file by merging the specified\nVelocity template with the supplied context.", "Function to perform forward activation", "Checks the given collection descriptor.\n\n@param collDef The collection descriptor\n@param checkLevel The amount of checks to perform\n@exception ConstraintException If a constraint has been violated", "This method uses the configured git credentials and repo, to test its validity.\nIn addition, in case the user requested creation of a new tag, it checks that\nanother tag with the same name doesn't exist", "Print the parameters of the parameterized type t", "Send a channels on-air update to all registered listeners.\n\n@param audibleChannels holds the device numbers of all channels that can currently be heard in the mixer output", "Gets the current page\n@return" ]
void setParent(ProjectCalendarWeek parent) { m_parent = parent; for (int loop = 0; loop < m_days.length; loop++) { if (m_days[loop] == null) { m_days[loop] = DayType.DEFAULT; } } }
[ "Set the parent from which this week is derived.\n\n@param parent parent week" ]
[ "Builds IMAP envelope String from pre-parsed data.", "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", "Converts a DTO attribute into a generic attribute object.\n\n@param attribute\nThe DTO attribute.\n@return The server side attribute representation. As we don't know at this point what kind of object the\nattribute is (that's a problem for the <code>FeatureModel</code>), we return an <code>Object</code>.", "Returns the command line options to be used for scalaxb, excluding the\ninput file names.", "Sets the alias. Empty String is regarded as null.\n@param alias The alias to set", "Use this API to fetch all the cachecontentgroup resources that are configured on netscaler.", "Use this API to fetch authenticationvserver_authenticationnegotiatepolicy_binding resources of given name .", "Apply any applicable header overrides to request\n\n@param httpMethodProxyRequest\n@throws Exception", "Ensures that no more than maxContiguousPartitionsPerZone partitions are\ncontiguous within a single zone.\n\nMoves the necessary partitions to break up contiguous runs from each zone\nto some other random zone/node. There is some chance that such random\nmoves could result in contiguous partitions in other zones.\n\n@param nextCandidateCluster cluster metadata\n@param maxContiguousPartitionsPerZone See RebalanceCLI.\n@return Return updated cluster metadata." ]
public static CharSequence getAt(CharSequence text, Range range) { RangeInfo info = subListBorders(text.length(), range); CharSequence sequence = text.subSequence(info.from, info.to); return info.reverse ? reverse(sequence) : sequence; }
[ "Support the range subscript operator for CharSequence\n\n@param text a CharSequence\n@param range a Range\n@return the subsequence CharSequence\n@since 1.0" ]
[ "poll the response queue for response\n\n@param timeout timeout amount\n@param timeUnit timeUnit of timeout\n@return same result of BlockQueue.poll(long, TimeUnit)\n@throws InterruptedException", "Handles reports by consumers\n\n@param name the name of the reporting consumer\n@param report the number of lines the consumer has written since last report\n@return \"exit\" if maxScenarios has been reached, \"ok\" otherwise", "Obtain the class of a given className\n\n@param className\n@return\n@throws Exception", "Permanently close the ClientRequestExecutor pool. Resources subsequently\nchecked in will be destroyed.", "Retrieve list of assignment extended attributes.\n\n@return list of extended attributes", "This method extracts data for a single predecessor from an MSPDI file.\n\n@param currTask Current task object\n@param link Predecessor data", "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.", "Returns the position of the specified value in the specified array.\n\n@param value the value to search for\n@param array the array to search in\n@return the position of the specified value in the specified array", "Parses links for XMLContents etc.\n\n@param cms the CMS context to use\n@throws CmsException if something goes wrong" ]
public void setStatusBarColor(int statusBarColor) { if (mBuilder.mScrimInsetsLayout != null) { mBuilder.mScrimInsetsLayout.setInsetForeground(statusBarColor); mBuilder.mScrimInsetsLayout.getView().invalidate(); } }
[ "Set the color for the statusBar\n\n@param statusBarColor" ]
[ "Use this API to add tmtrafficaction resources.", "Get new vector clock based on this clock but incremented on index nodeId\n\n@param nodeId The id of the node to increment\n@return A vector clock equal on each element execept that indexed by\nnodeId", "Returns the value of the indicated property of the current object on the specified level.\n\n@param level The level\n@param name The name of the property\n@return The property value", "Read activity code types and values.\n\n@param types activity code type data\n@param typeValues activity code value data\n@param assignments activity code task assignments", "Used by TracedParallelBatch where its used to wrap a TraceContext and puts it in the\nregistry for the forked execution. This is marked deprecated as we prefer not to\nexpose details of the RatpackCurrentTraceContext implementation.\n\n@param traceContext a trace context.\n@return a holder for the trace context, which can be put into the registry.", "Will prompt a user the \"Add to Homescreen\" feature\n\n@param callback A callback function after the method has been executed.", "This configuration requires that all your tasks you submit to the system implement\nthe Groupable interface. By default, it will round robin tasks from each group\n\nTasks will be tracked internally in the system by randomly generated UUIDs\n\n@return", "Read all top level tasks.", "Check that the parameter array has at least as many elements as it\nshould.\n\n@param parameterName\nThe name of the user-supplied parameter that we are validating\nso that the user can easily find the error in their code.\n@param actualLength\nThe actual array length\n@param minimumLength\nThe minimum array length" ]
private boolean isToIgnore(CtElement element) { if (element instanceof CtStatementList && !(element instanceof CtCase)) { if (element.getRoleInParent() == CtRole.ELSE || element.getRoleInParent() == CtRole.THEN) { return false; } return true; } return element.isImplicit() || element instanceof CtReference; }
[ "Ignore some element from the AST\n\n@param element\n@return" ]
[ "Use this API to fetch all the nd6ravariables resources that are configured on netscaler.", "Read data for a single table and store it.\n\n@param is input stream\n@param table table header", "Binds the Identities Primary key values to the statement.", "We will always try to gather as many results as possible and never throw an exception.\n\nTODO: Make MemberResponse hold an exception that we can populate if something bad happens so we always\nget to return something for a member in order to indicate a failure. Getting the result when there\nis an error should throw an exception.\n\n@param execSvc\n@param members\n@param callable\n@param maxWaitTime - a value of 0 indicates forever\n@param unit\n@return", "Just collapses digits to 9 characters.\nDoes lazy copying of String.\n\n@param s String to find word shape of\n@return The same string except digits are equivalence classed to 9.", "Create a random permutation of the numbers 0, ..., size - 1.\n\nsee Algorithm P, D.E. Knuth: The Art of Computer Programming, Vol. 2, p. 145", "Removes the specified list of users from following the project, this will not affect project membership status.\nReturns the updated project record.\n\n@param project The project to remove followers from.\n@return Request object", "Returns the connection count by key specified in this registry\n\nNote it might count connections that are closed but not removed from registry yet\n\n@param key\nthe key\n@return connection count by key", "Computes either the vector p-norm or the induced matrix p-norm depending on A\nbeing a vector or a matrix respectively.\n\n@param A Vector or matrix whose norm is to be computed.\n@param p The p value of the p-norm.\n@return The computed norm." ]
public static <T> T[] concat(T firstElement, T... array) { @SuppressWarnings("unchecked") T[] result = (T[]) Array.newInstance( firstElement.getClass(), 1 + array.length ); result[0] = firstElement; System.arraycopy( array, 0, result, 1, array.length ); return result; }
[ "Concats an element and an array.\n\n@param firstElement the first element\n@param array the array\n@param <T> the type of the element in the array\n@return a new array created adding the element in the second array after the first element" ]
[ "Adds version information.", "Configure file logging and stop console logging.\n\n@param filename\nLog to this file.", "Process an operand value used in the definition of the graphical\nindicator criteria.\n\n@param index position in operand list\n@param type field type\n@param criteria indicator criteria", "Persists the current set of versions buffered for the current key into\nstorage, using the multiVersionPut api\n\nNOTE: Now, it could be that the stream broke off and has more pending\nversions. For now, we simply commit what we have to disk. A better design\nwould rely on in-stream markers to do the flushing to storage.", "Send a DEBUG log message with specified subsystem. If subsystem is not enabled the message\nwill not be logged\n@param subsystem logging subsystem\n@param tag Used to identify the source of a log message. It usually identifies the class or\nactivity where the log call occurs.\n@param pattern The message pattern\n@return", "Creates a server setup based on provided properties.\n\n@param properties the properties.\n@return the server setup, or an empty array.", "Initial setup of the service worker registration.", "Used to locate the first timephased resource assignment block which\nintersects with the target date range.\n\n@param <T> payload type\n@param range target date range\n@param assignments timephased resource assignments\n@param startIndex index at which to start the search\n@return index of timephased resource assignment which intersects with the target date range", "Create the index and associate it with all project models in the Application" ]
public static final Date parseDateTime(String value) { Date result = null; try { if (value != null && !value.isEmpty()) { result = DATE_TIME_FORMAT.get().parse(value); } } catch (ParseException ex) { // Ignore } return result; }
[ "Parse a date time value.\n\n@param value String representation\n@return Date instance" ]
[ "Use this API to update appfwlearningsettings resources.", "lookup current maximum value for a single field in\ntable the given class descriptor was associated.", "The metadata cache can become huge over time. This simply flushes it periodically.", "Counts the coordinates stored in a single statement for the relevant\nproperty, if they are actually given and valid.\n\n@param statement\n@param itemDocument", "Use this API to fetch dnsview_binding resource of given name .", "Extract data for a single calendar.\n\n@param row calendar data", "Checks the hour, minute and second are equal.", "Find the current active layout.\n\n@param phoenixProject phoenix project data\n@return current active layout", "Get a property as a boolean or null.\n\n@param key the property name" ]
final public void setRealOffset(Integer start, Integer end) { if ((start == null) || (end == null)) { // do nothing } else if (start > end) { throw new IllegalArgumentException( "Start real offset after end real offset"); } else { tokenRealOffset = new MtasOffset(start, end); } }
[ "Sets the real offset.\n\n@param start the start\n@param end the end" ]
[ "Guess whether given file is binary. Just checks for anything under 0x09.", "Merges the two classes into a single class. The smaller class is\nremoved, while the largest class is kept.", "Use this API to fetch appfwprofile resource of given name .", "Get a default style. If null a simple black line style will be returned.\n\n@param geometryType the name of the geometry type (point, line, polygon)", "Return the key if there is one else return -1", "Get the names of the currently registered format providers.\n\n@return the provider names, never null.", "Use this API to fetch cmppolicylabel_cmppolicy_binding resources of given name .", "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.", "Assigns retention policy with givenID to the folder.\n@param api the API connection to be used by the created assignment.\n@param policyID id of the assigned retention policy.\n@param folderID id of the folder to assign policy to.\n@return info about created assignment." ]
public synchronized int getPartitionStoreCount() { int count = 0; for (String store : storeToPartitionIds.keySet()) { count += storeToPartitionIds.get(store).size(); } return count; }
[ "Returns the total count of partitions across all stores.\n\n@return returns the total count of partitions across all stores." ]
[ "Use this API to fetch all the appfwlearningsettings resources that are configured on netscaler.", "Sets the top padding character for all cells in the table.\n@param paddingTopChar new padding character, ignored if null\n@return this to allow chaining", "check max size of each message\n@param maxMessageSize the max size for each message", "Use this API to fetch sslcertkey_crldistribution_binding resources of given name .", "Calculate start dates for a yearly absolute recurrence.\n\n@param calendar current date\n@param dates array of start dates", "Use this API to fetch vlan_nsip_binding resources of given name .", "Checks the given class descriptor for correct row-reader 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", "Gets a JSON string containing any pending changes to this object that can be sent back to the Box API.\n@return a JSON string containing the pending changes.", "Retrieve a UUID in the form required by Primavera PMXML.\n\n@param guid UUID instance\n@return formatted UUID" ]
public int scrollToNextPage() { Log.d(Log.SUBSYSTEM.LAYOUT, TAG, "scrollToNextPage getCurrentPage() = %d currentIndex = %d", getCurrentPage(), mCurrentItemIndex); if (mSupportScrollByPage) { scrollToPage(getCurrentPage() + 1); } else { Log.w(TAG, "Pagination is not enabled!"); } return mCurrentItemIndex; }
[ "Scroll to the next page. To process the scrolling by pages LayoutScroller must be constructed\nwith a pageSize greater than zero.\n@return the new current item after the scrolling processed." ]
[ "Helper method that encapsulates the minimum logic for adding a job to a\nqueue.\n\n@param jedis\nthe connection to Redis\n@param namespace\nthe Resque namespace\n@param queue\nthe Resque queue name\n@param jobJson\nthe job serialized as JSON", "once we're on ORM 5", "Adds a child to this node and sets this node as its parent node.\n\n@param node The node to add.", "Send a fader start command to all registered listeners.\n\n@param playersToStart contains the device numbers of all players that should start playing\n@param playersToStop contains the device numbers of all players that should stop playing", "Each element of the second array is added to each element of the first.", "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", "Utility method used to convert an integer time representation into a\nDuration instance.\n\n@param totalTime integer time representation\n@param format required time format\n@return new Duration instance", "Look-up the results data for a particular test class.", "Loads the Configuration from the properties file.\n\nLoads the properties file, or uses defaults on failure.\n\n@see org.apache.ojb.broker.util.configuration.impl.ConfigurationAbstractImpl#setFilename(java.lang.String)" ]
private void recordTime(Tracked op, long timeNS, long numEmptyResponses, long valueSize, long keySize, long getAllAggregateRequests) { counters.get(op).addRequest(timeNS, numEmptyResponses, valueSize, keySize, getAllAggregateRequests); if (logger.isTraceEnabled() && !storeName.contains("aggregate") && !storeName.contains("voldsys$")) logger.trace("Store '" + storeName + "' logged a " + op.toString() + " request taking " + ((double) timeNS / voldemort.utils.Time.NS_PER_MS) + " ms"); }
[ "Method to service public recording APIs\n\n@param op Operation being tracked\n@param timeNS Duration of operation\n@param numEmptyResponses Number of empty responses being sent back,\ni.e.: requested keys for which there were no values (GET and GET_ALL only)\n@param valueSize Size in bytes of the value\n@param keySize Size in bytes of the key\n@param getAllAggregateRequests Total of amount of keys requested in the operation (GET_ALL only)" ]
[ "Use this API to update spilloverpolicy.", "Retrieve all addresses of a host by it's address. NetBIOS hosts can\nhave many names for a given IP address. The name and IP address make the\nNetBIOS address. This provides a way to retrieve the other names for a\nhost with the same IP address.\n\n@param addr the address to query\n@throws UnknownHostException if address cannot be resolved", "Curries a function that takes two 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 one argument. Never <code>null</code>.", "Set the model used by the left table.\n\n@param model table model", "Sets the underlying read timeout in milliseconds.\nA value of 0 specifies an infinite timeout.\n@see okhttp3.OkHttpClient.Builder#readTimeout(long, TimeUnit)", "Writes the torque schemata to files in the given directory and returns\na comma-separated list of the filenames.\n\n@param dir The directory to write the files to\n@return The list of filenames\n@throws IOException If an error occurred", "Returns a Span that covers all rows beginning with a prefix.", "The user can be referenced by their globally unique user ID or their email address.\nReturns the full user record for the invited user.\n\n@param workspace The workspace or organization to invite the user to.\n@return Request object", "Generate a report about the targeted module dependencies\n\n@param moduleId String\n@param filters FiltersHolder\n@return DependencyReport" ]
public static String[] allLowerCase(String... strings){ String[] tmp = new String[strings.length]; for(int idx=0;idx<strings.length;idx++){ if(strings[idx] != null){ tmp[idx] = strings[idx].toLowerCase(); } } return tmp; }
[ "Make all elements of a String array lower case.\n@param strings string array, may contain null item but can't be null\n@return array containing all provided elements lower case" ]
[ "Checks whether a property can be added to a Properties.\n\n@param typeManager\n@param properties the properties object\n@param typeId the type id\n@param filter the property filter\n@param id the property id\n\n@return true if the property should be added", "Remove the S3 file that contains the domain controller data.\n\n@param directoryName the name of the directory that contains the S3 file", "This method is used to process an MPP8 file. This is the file format\nused by Project 98.\n\n@param reader parent file reader\n@param file Parent MPX file\n@param root Root of the POI file system.\n@throws MPXJException\n@throws IOException", "Configure a new user defined field.\n\n@param fieldType field type\n@param dataType field data type\n@param name field name", "Use this API to fetch all the dbdbprofile resources that are configured on netscaler.", "Cancel the pause operation", "Returns a list of all parts that have been uploaded to an upload session.\n@param offset paging marker for the list of parts.\n@param limit maximum number of parts to return.\n@return the list of parts.", "Process the requestJsonAttributes using the attributes and the MapfishParser and add all resulting\nvalues to this values object.\n\n@param template the template of the current request.\n@param attributes the attributes that will be used to add values to this values object\n@param requestJsonAttributes the json data for populating the attribute values", "Read ClassDescriptors from the given repository file.\n@see #mergeDescriptorRepository" ]
@Override protected void registerRequest(RestRequestValidator requestValidator, ChannelHandlerContext ctx, MessageEvent messageEvent) { // At this point we know the request is valid and we have a // error handler. So we construct the composite Voldemort // request object. CompositeVoldemortRequest<ByteArray, byte[]> requestObject = requestValidator.constructCompositeVoldemortRequestObject(); if(requestObject != null) { DynamicTimeoutStoreClient<ByteArray, byte[]> storeClient = null; if(!requestValidator.getStoreName().equalsIgnoreCase(RestMessageHeaders.SCHEMATA_STORE)) { storeClient = this.fatClientMap.get(requestValidator.getStoreName()); if(storeClient == null) { logger.error("Error when getting store. Non Existing store client."); RestErrorHandler.writeErrorResponse(messageEvent, HttpResponseStatus.BAD_REQUEST, "Non Existing store client. Critical error."); return; } } else { requestObject.setOperationType(VoldemortOpCode.GET_METADATA_OP_CODE); } CoordinatorStoreClientRequest coordinatorRequest = new CoordinatorStoreClientRequest(requestObject, storeClient); Channels.fireMessageReceived(ctx, coordinatorRequest); } }
[ "Constructs a valid request and passes it on to the next handler. It also\ncreates the 'StoreClient' object corresponding to the store name\nspecified in the REST request.\n\n@param requestValidator The Validator object used to construct the\nrequest object\n@param ctx Context of the Netty channel\n@param messageEvent Message Event used to write the response / exception" ]
[ "Load the windows resize handler with initial view port detection.", "Called when app's singleton registry has been initialized", "Retrieve the FeatureSource object from the data store.\n\n@return An OpenGIS FeatureSource object;\n@throws LayerException\noops", "Process calendar hours.\n\n@param calendar parent calendar\n@param row calendar hours data\n@param dayIndex day index", "Use this API to add systemuser.", "Sets a custom response on an endpoint\n\n@param pathValue path (endpoint) value\n@param requestType path request type. \"GET\", \"POST\", etc\n@param customData custom response data\n@return true if success, false otherwise", "Scan all the class path and look for all classes that have the Format\nAnnotations.", "Generates the specified number of random resource names with the same prefix.\n@param prefix the prefix to be used if possible\n@param maxLen the maximum length for the random generated name\n@param count the number of names to generate\n@return random names", "get the ClassTypeSignature corresponding to given parameterized type\n\n@param parameterizedType\n@return" ]
private CoreLabel makeCoreLabel(String line) { CoreLabel wi = new CoreLabel(); // wi.line = line; String[] bits = line.split("\\s+"); switch (bits.length) { case 0: case 1: wi.setWord(BOUNDARY); wi.set(AnswerAnnotation.class, OTHER); break; case 2: wi.setWord(bits[0]); wi.set(AnswerAnnotation.class, bits[1]); break; case 3: wi.setWord(bits[0]); wi.setTag(bits[1]); wi.set(AnswerAnnotation.class, bits[2]); break; case 4: wi.setWord(bits[0]); wi.setTag(bits[1]); wi.set(ChunkAnnotation.class, bits[2]); wi.set(AnswerAnnotation.class, bits[3]); break; case 5: if (flags.useLemmaAsWord) { wi.setWord(bits[1]); } else { wi.setWord(bits[0]); } wi.set(LemmaAnnotation.class, bits[1]); wi.setTag(bits[2]); wi.set(ChunkAnnotation.class, bits[3]); wi.set(AnswerAnnotation.class, bits[4]); break; default: throw new RuntimeIOException("Unexpected input (many fields): " + line); } wi.set(OriginalAnswerAnnotation.class, wi.get(AnswerAnnotation.class)); return wi; }
[ "This deals with the CoNLL files for different languages which have\nbetween 2 and 5 columns on non-blank lines.\n\n@param line A line of CoNLL input\n@return The constructed token" ]
[ "Log error information", "Convert Collection to Set\n@param collection Collection\n@return Set", "Sets that there are some pending writes that occurred at a time for an associated\nlocally emitted change event. This variant maintains the last version set.\n\n@param atTime the time at which the write occurred.\n@param changeEvent the description of the write/change.", "Adds the deploy operation as a step to the composite operation.\n\n@param builder the builder to add the step to\n@param deployment the deployment to deploy", "Handles newlines by removing them and add new rows instead", "Determines if we need to calculate more dates.\nIf we do not have a finish date, this method falls back on using the\noccurrences attribute. If we have a finish date, we'll use that instead.\nWe're assuming that the recurring data has one or other of those values.\n\n@param calendar current date\n@param dates dates generated so far\n@return true if we should calculate another date", "Bessel function of order n.\n\n@param n Order.\n@param x Value.\n@return J value.", "Returns the parameter key of the facet with the given name.\n@param facet the facet's name.\n@return the parameter key for the facet.", "Return a Halton number, sequence starting at index = 0, base &gt; 1.\n\n@param index The index of the sequence.\n@param base The base of the sequence. Has to be greater than one (this is not checked).\n@return The Halton number." ]
public ThreadInfo[] getThreadDump() { ThreadMXBean threadMxBean = ManagementFactory.getThreadMXBean(); return threadMxBean.dumpAllThreads(true, true); }
[ "Gets the thread dump.\n\n@return the thread dump" ]
[ "Add network interceptor to httpClient to track download progress for\nasync requests.", "Adds a new gender item and an initial name.\n\n@param entityIdValue\nthe item representing the gender\n@param name\nthe label to use for representing the gender", "Returns a resource description resolver that uses common descriptions for some attributes.\n\n@param keyPrefix the prefix to be appended to the {@link LoggingExtension#SUBSYSTEM_NAME}\n\n@return the resolver", "The document field must not exist in the list provided\n@param rhs The argument - one or more values\n@return PredicateExpression: $nin rhs", "Use this API to create sslfipskey resources.", "Check if the current node is part of routing request based on cluster.xml\nor throw an exception.\n\n@param key The key we are checking\n@param routingStrategy The routing strategy\n@param currentNode Current node", "Invalidate the item in layout\n@param dataIndex data index", "Retrieves and validates the content length from the REST request.\n\n@return true if has content length", "This method calculates the total amount of working time in a single\nday, which intersects with the supplied time range.\n\n@param hours collection of working hours in a day\n@param startDate time range start\n@param endDate time range end\n@return length of time in milliseconds" ]
public Versioned<E> getVersionedById(int id) { Versioned<VListNode<E>> listNode = getListNode(id); if(listNode == null) throw new IndexOutOfBoundsException(); return new Versioned<E>(listNode.getValue().getValue(), listNode.getVersion()); }
[ "Get the ver\n\n@param id\n@return" ]
[ "Process encoded payload.\n\n@throws IOException Signals that an I/O exception has occurred.", "Load model from file\n\n@param gvrContext Valid {@link GVRContext} instance\n@param modelFile Path to the model's file, relative to the {@code assets} directory\n@return root object The root {@link GVRSceneObject} of the model\n@throws IOException If reading the model file fails", "Test whether the operation has a defined criteria attribute.\n\n@param operation the operation\n@return", "Calculate the screen size of a tile. Normally the screen size is expressed in pixels and should therefore be\nintegers, but for the sake of accuracy we try to keep a double value as long as possible.\n\n@param worldSize\nThe width and height of a tile in the layer's world coordinate system.\n@param scale\nThe current client side scale.\n@return Returns an array of double values where the first value is the tile screen width and the second value is\nthe tile screen height.", "Find and read the cache format entry in a metadata cache file.\n\n@return the content of the format entry, or {@code null} if none was found\n\n@throws IOException if there is a problem reading the file", "Writes the timephased data for a resource assignment.\n\n@param mpx MPXJ assignment\n@param xml MSDPI assignment", "Get result report.\n\n@param reportURI the URI of the report\n@return the result report.", "Retrieves the formatted parent WBS value.\n\n@return formatted parent WBS value", "Receives a PropertyColumn and returns a JRDesignField" ]
public static String getPropertyName(String name) { if(name != null && (name.startsWith("get") || name.startsWith("set"))) { StringBuilder b = new StringBuilder(name); b.delete(0, 3); b.setCharAt(0, Character.toLowerCase(b.charAt(0))); return b.toString(); } else { return name; } }
[ "Get the property name of a method name. For example the property name of\nsetSomeValue would be someValue. Names not beginning with set or get are\nnot changed.\n\n@param name The name to process\n@return The property name" ]
[ "Creates the container for a bundle with descriptor.\n@return the container for a bundle with descriptor.\n@throws IOException thrown if reading the bundle fails.\n@throws CmsException thrown if reading the bundle fails.", "build the Join-Information for Subclasses having a super reference to this class\n\n@param left\n@param cld\n@param name", "Here we start a intern odmg-Transaction to hide transaction demarcation\nThis method could be invoked several times within a transaction, but only\nthe first call begin a intern odmg transaction", "Notifies that a footer item is changed.\n\n@param position the position.", "Use this API to delete gslbsite of given name.", "Read relationship data from a PEP file.", "Sets the ojbQuery, needed only as long we\ndon't support the soda constraint stuff.\n@param ojbQuery The ojbQuery to set", "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", "Call the onQueryExecuteTimeLimitExceeded hook if necessary\n@param sql sql statement that took too long\n@param queryStartTime time when query was started." ]
public static boolean isAvailable() throws Exception { try { Registry myRegistry = LocateRegistry.getRegistry("127.0.0.1", port); com.groupon.odo.proxylib.hostsedit.rmi.Message impl = (com.groupon.odo.proxylib.hostsedit.rmi.Message) myRegistry.lookup(SERVICE_NAME); return true; } catch (Exception e) { return false; } }
[ "Returns whether or not the host editor service is available\n\n@return\n@throws Exception" ]
[ "Deserialize a directory of javascript design documents to a List of DesignDocument objects.\n\n@param directory the directory containing javascript files\n@return {@link DesignDocument}\n@throws FileNotFoundException if the file does not exist or cannot be read", "Configure high fps settings in the camera for VR mode\n\n@param fpsMode integer indicating the desired fps: 0 means 30 fps, 1 means 60\nfps, and 2 means 120 fps. Any other value is invalid.\n@return A boolean indicating the status of the method call. It may be false due\nto multiple reasons including: 1) supplying invalid fpsMode as the input\nparameter, 2) VR mode not supported.", "Creates a Bytes object by copying the value of the given String", "Use this API to fetch cachepolicylabel_policybinding_binding resources of given name .", "Find the latest task finish date. We treat this as the\nfinish date for the project.\n\n@return finish date", "Looks up the EJB in the container and executes the method on it\n\n@param self the proxy instance.\n@param method the overridden method declared in the super class or\ninterface.\n@param proceed the forwarder method for invoking the overridden method. It\nis null if the overridden method is abstract or declared in the\ninterface.\n@param args an array of objects containing the values of the arguments\npassed in the method invocation on the proxy instance. If a\nparameter type is a primitive type, the type of the array\nelement is a wrapper class.\n@return the resulting value of the method invocation.\n@throws Throwable if the method invocation fails.", "Encode a long into a byte array at an offset\n\n@param ba Byte array\n@param offset Offset\n@param v Long value\n@return byte array given in input", "Sets the bean store\n\n@param beanStore The bean store", "Set the pattern scheme.\n@param isWeekDayBased flag, indicating if the week day based scheme should be set." ]
static TarArchiveEntry defaultDirEntryWithName( final String dirName ) { TarArchiveEntry entry = new TarArchiveEntry(dirName, true); entry.setUserId(ROOT_UID); entry.setUserName(ROOT_NAME); entry.setGroupId(ROOT_UID); entry.setGroupName(ROOT_NAME); entry.setMode(TarArchiveEntry.DEFAULT_DIR_MODE); return entry; }
[ "Creates a tar directory entry with defaults parameters.\n@param dirName the directory name\n@return dir entry with reasonable defaults" ]
[ "adds a value to the list\n\n@param value the value", "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", "Gets a color formatted as an integer with ARGB ordering.\n\n@param json {@link JSONObject} to get the color from\n@param elementName Name of the color element\n@return An ARGB formatted integer\n@throws JSONException", "Checks to see if matrix 'a' is the same as this matrix within the specified\ntolerance.\n\n@param a The matrix it is being compared against.\n@param tol How similar they must be to be equals.\n@return If they are equal within tolerance of each other.", "Use this API to clear bridgetable resources.", "Sets a quota for a users.\n\n@param user the user.\n@param quota the quota.", "Determines if still WRITING or COMPLETE.\n\n@param itemTag mad libs style string to insert into progress message.\n@return state of stream request handler", "Logs all properties", "Legacy conversion.\n@param map\n@return Properties" ]
private void bumpScores(Map<Long, Score> candidates, List<Bucket> buckets, int ix) { for (; ix < buckets.size(); ix++) { Bucket b = buckets.get(ix); if (b.nextfree > CUTOFF_FACTOR_2 * candidates.size()) return; double score = b.getScore(); for (Score s : candidates.values()) if (b.contains(s.id)) s.score += score; } }
[ "Goes through the buckets from ix and out, checking for each\ncandidate if it's in one of the buckets, and if so, increasing\nits score accordingly. No new candidates are added." ]
[ "Method signature without \"public void\" prefix\n\n@return The method signature in String format", "Creates an IBlur instance for the given algorithm enum\n\n@param algorithm\n@param contextWrapper\n@return", "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", "Use this API to enable clusterinstance resources of given names.", "Determines if still WRITING or COMPLETE.\n\n@param itemTag mad libs style string to insert into progress message.\n@return state of stream request handler", "Use this API to change sslcertkey.", "Apply modifications to a content task definition.\n\n@param patchId the patch id\n@param modifications the modifications\n@param definitions the task definitions\n@param filter the content item filter", "Opens file for editing.\n\n@param currentChangeListId The current change list id to open the file for editing at\n@param filePath The filePath which contains the file we need to edit\n@throws IOException Thrown in case of perforce communication errors\n@throws InterruptedException", "Switch to a new DataSource using the given configuration.\n@param newConfig BoneCP DataSource to use.\n@throws SQLException" ]
public static int count(CharSequence self, CharSequence text) { int answer = 0; for (int idx = 0; true; idx++) { idx = self.toString().indexOf(text.toString(), idx); // break once idx goes to -1 or for case of empty string once // we get to the end to avoid JDK library bug (see GROOVY-5858) if (idx < answer) break; ++answer; } return answer; }
[ "Count the number of occurrences of a sub CharSequence.\n\n@param self a CharSequence\n@param text a sub CharSequence\n@return the number of occurrences of the given CharSequence inside this CharSequence\n@see #count(String, String)\n@since 1.8.2" ]
[ "Get the max extent as a envelop object.", "Generate a Jongo query with provided the parameter.\n\n@param key\n@param value\n@return String", "Convert an object to a list.\n\n@param mapper the object mapper\n@param source the source object\n@param targetElementType the target list element type\n@return list", "Updates the gatewayDirection attributes of all gateways.\n@param def", "Gets the publisher of the specified type, if it is wrapped by the \"Flexible Publish\" publisher in a project.\nNull is returned if no such publisher is found.\n@param project The project\n@param type The type of the publisher", "This produces a shorter string for the address that uses the canonical representation but not using leading zeroes.\n\nEach address has a unique compressed string.", "Process field aliases.", "Was the CDJ playing a track when this update was sent?\n\n@return true if the play flag was set, or, if this seems to be a non-nexus player, if <em>P<sub>1</sub></em>\nhas a value corresponding to a playing state.", "Removes the specified objects.\n\n@param collection The collection to remove." ]