query
stringlengths
74
6.1k
positive
sequencelengths
1
1
negative
sequencelengths
9
9
private boolean isSplit(ProjectCalendar calendar, List<TimephasedWork> list) { boolean result = false; for (TimephasedWork assignment : list) { if (calendar != null && assignment.getTotalAmount().getDuration() == 0) { Duration calendarWork = calendar.getWork(assignment.getStart(), assignment.getFinish(), TimeUnit.MINUTES); if (calendarWork.getDuration() != 0) { result = true; break; } } } return result; }
[ "Test to determine if this is a split task.\n\n@param calendar current calendar\n@param list timephased resource assignment list\n@return boolean flag" ]
[ "If needed declares and sets up internal data structures.\n\n@param A Matrix being decomposed.", "cancels a running assembly.\n\n@param url full url of the Assembly.\n@return {@link AssemblyResponse}\n@throws RequestException if request to transloadit server fails.\n@throws LocalOperationException if something goes wrong while running non-http operations.", "Query zipcode from Yahoo to find associated WOEID", "compute Cosh using Taylor Series.\n\n@param x An angle, in radians.\n@param nTerms Number of terms.\n@return Result.", "Normalizes the name so it can be used as Maven artifactId or groupId.", "Process the next event in a given stream.\n@return the fully processed event\n@throws IOException if a stream is in the wrong state, IO errors can be thrown", "Creates a new broker instance.\n\n@param jcdAlias The jdbc connection descriptor name as defined in the repository\n@param user The user name to be used for connecting to the database\n@param password The password to be used for connecting to the database\n@return The persistence broker\n@see org.apache.ojb.broker.core.PersistenceBrokerFactoryIF#createPersistenceBroker(java.lang.String, java.lang.String, java.lang.String)", "Quick and dirty XML text escape.\n\n@param sb working string buffer\n@param text input text\n@return escaped text", "Configure a selector to choose documents that should be added to the index." ]
private void validateAttributesToCreateANewRendererViewHolder() { if (viewType == null) { throw new NullContentException( "RendererBuilder needs a view type to create a RendererViewHolder"); } if (layoutInflater == null) { throw new NullLayoutInflaterException( "RendererBuilder needs a LayoutInflater to create a RendererViewHolder"); } if (parent == null) { throw new NullParentException( "RendererBuilder needs a parent to create a RendererViewHolder"); } }
[ "Throws one RendererException if the viewType, layoutInflater or parent are null." ]
[ "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", "returns an Enumeration of PrimaryKey Objects for objects of class DataClass.\nThe Elements returned come from a SELECT ... WHERE Statement\nthat is defined by the fields and their coresponding values of listFields\nand listValues.\nUseful for EJB Finder Methods...\n@param primaryKeyClass the pk class for the searched objects\n@param query the query", "Process the timephased resource assignment data to work out the\nsplit structure of the task.\n\n@param task parent task\n@param timephasedComplete completed resource assignment work\n@param timephasedPlanned planned resource assignment work", "Formats a date or a time according to the local conventions.\n\nSince ReadablePartials don't support all fields, we fill in any blanks\nneeded for formatting by using the epoch (1970-01-01T00:00:00Z).\n\nSee {@link android.text.format.DateUtils#formatDateTime} for full docs.\n\n@param context the context is required only if the time is shown\n@param time a point in time\n@param flags a bit mask of formatting options\n@return a string containing the formatted date/time.", "Uncompresses the given textual content and writes it to the given file.\n\n@param file The file to write to\n@param compressedContent The content\n@throws IOException If an error occurred", "A helper - in Java 9, the extension CL was renamed to platform CL and hosts all the JDK classes. Before 9, it was useless and we used\nbootstrap CL instead.\n\n@return the base CL to use.", "Test for convergence by seeing if the element with the largest change\nis smaller than the tolerance. In some test cases it alternated between\nthe + and - values of the eigen vector. When this happens it seems to have \"converged\"\nto a non-dominant eigen vector. At least in the case I looked at. I haven't devoted\na lot of time into this issue...", "add trace information for received frame", "Retrieves the time at which work finishes on the given date, or returns\nnull if this is a non-working day.\n\n@param date Date instance\n@return finish time, or null for non-working day" ]
public static List<String> getStoreNames(List<StoreDefinition> list, boolean ignoreViews) { List<String> storeNameSet = new ArrayList<String>(); for(StoreDefinition def: list) if(!def.isView() || !ignoreViews) storeNameSet.add(def.getName()); return storeNameSet; }
[ "Get the list of store names from a list of store definitions\n\n@param list\n@param ignoreViews\n@return list of store names" ]
[ "Attempts to locate the activity type value extracted from an existing P6 schedule.\nIf necessary converts to the form which can be used in the PMXML file.\nReturns \"Resource Dependent\" as the default value.\n\n@param task parent task\n@return activity type", "Iterates through the range of prefixes in this range instance using the given prefix length.\n\n@param prefixLength\n@return", "Creates a new subtask and adds it to the parent task. Returns the full record\nfor the newly created subtask.\n\n@param task The task to add a subtask to.\n@return Request object", "New SOAP client uses new SOAP service.", "Converts a submatrix into an extract matrix operation.\n@param variableTarget The variable in which the submatrix is extracted from", "Set the pickers selection type.", "Add a '=' clause so the column must be equal to the value.", "Check given class modifiers. Plugin with resources plugin should not be private or abstract\nor interface.", "Use this API to fetch a vpnglobal_authenticationsamlpolicy_binding resources." ]
public static void printToFile(String filename, String message) { printToFile(new File(filename), message, false); }
[ "Prints to a file. If the file does not exist, rewrites the file;\ndoes not append." ]
[ "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.", "Get the features collection from a GeoJson inline string or URL.\n\n@param template the template\n@param features what to parse\n@return the feature collection\n@throws IOException", "Should the URI explicitly not be cached.\n\n@param requestUri request URI\n@return true when caching is prohibited", "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)", "Set session factory.\n\n@param sessionFactory session factory\n@throws HibernateLayerException could not get class metadata for data source", "Creates a list of placeholders for use in a PreparedStatement\n\n@param length number of placeholders\n@return String of placeholders, seperated by comma", "Stop the drag action.", "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", "Adds the newState and the edge between the currentState and the newState on the SFG.\n\n@param newState the new state.\n@param eventable the clickable causing the new state.\n@return the clone state iff newState is a clone, else returns null" ]
@Override public List<Integer> getReplicatingPartitionList(int index) { List<Node> preferenceNodesList = new ArrayList<Node>(getNumReplicas()); List<Integer> replicationPartitionsList = new ArrayList<Integer>(getNumReplicas()); // Copy Zone based Replication Factor HashMap<Integer, Integer> requiredRepFactor = new HashMap<Integer, Integer>(); requiredRepFactor.putAll(zoneReplicationFactor); // Cross-check if individual zone replication factor equals global int sum = 0; for(Integer zoneRepFactor: requiredRepFactor.values()) { sum += zoneRepFactor; } if(sum != getNumReplicas()) throw new IllegalArgumentException("Number of zone replicas is not equal to the total replication factor"); if(getPartitionToNode().length == 0) { return new ArrayList<Integer>(0); } for(int i = 0; i < getPartitionToNode().length; i++) { // add this one if we haven't already, and it can satisfy some zone // replicationFactor Node currentNode = getNodeByPartition(index); if(!preferenceNodesList.contains(currentNode)) { preferenceNodesList.add(currentNode); if(checkZoneRequirement(requiredRepFactor, currentNode.getZoneId())) replicationPartitionsList.add(index); } // if we have enough, go home if(replicationPartitionsList.size() >= getNumReplicas()) return replicationPartitionsList; // move to next clockwise slot on the ring index = (index + 1) % getPartitionToNode().length; } // we don't have enough, but that may be okay return replicationPartitionsList; }
[ "Get the replication partitions list for the given partition.\n\n@param index Partition id for which we are generating the preference list\n@return The List of partitionId where this partition is replicated." ]
[ "Handles the response of the SerialAPIGetCapabilities request.\n@param incomingMessage the response message to process.", "Call the named method\n\n@param obj The object to call the method on\n@param c The class of the object\n@param name The name of the method\n@param args The method arguments\n@return The result of the method", "Entry point for this example\nUses HDFS ToolRunner to wrap processing of\n\n@param args Command-line arguments for HDFS example", "Gets a first data set value.\n\n@param dataSet\nIIM record and dataset code (See constants in {@link IIM})\n@return data set value\n@throws SerializationException\nif value can't be deserialized from binary representation", "Gets all pending collaboration invites for the current user.\n\n@param api the API connection to use.\n@return a collection of pending collaboration infos.", "Add a cause to the backtrace.\n\n@param cause\nthe cause\n@param bTrace\nthe backtrace list", "Print all relations for a given's class's tag\n@param tagname the tag containing the given relation\n@param from the source class\n@param edgetype the dot edge specification", "Set the week day the events should occur.\n@param weekDay the week day to set.", "Use this API to update systemuser." ]
public static base_responses unset(nitro_service client, String trapname[], String args[]) throws Exception { base_responses result = null; if (trapname != null && trapname.length > 0) { snmpalarm unsetresources[] = new snmpalarm[trapname.length]; for (int i=0;i<trapname.length;i++){ unsetresources[i] = new snmpalarm(); unsetresources[i].trapname = trapname[i]; } result = unset_bulk_request(client, unsetresources,args); } return result; }
[ "Use this API to unset the properties of snmpalarm resources.\nProperties that need to be unset are specified in args array." ]
[ "Parses a record containing hours and add them to a container.\n\n@param ranges hours container\n@param hoursRecord hours record", "Deserializes a variable, checking whether the datatype is custom or not\n@param s\n@param variableType\n@param dataTypes\n@return", "Returns the list of colliders attached to scene objects that are\nvisible from the viewpoint of the camera.\n\n<p>\nThis method is thread safe because it guarantees that only\none thread at a time is picking against particular scene graph,\nand it extracts the hit data during within its synchronized block. You\ncan then examine the return list without worrying about another thread\ncorrupting your hit data.\n\nThe hit location returned is the world position of the scene object center.\n\n@param scene\nThe {@link GVRScene} with all the objects to be tested.\n\n@return A list of {@link org.gearvrf.GVRPicker.GVRPickedObject}, sorted by distance from the\ncamera rig. Each {@link org.gearvrf.GVRPicker.GVRPickedObject} contains the scene object\nwhich owns the {@link GVRCollider} along with the hit\nlocation and distance from the camera.\n\n@since 1.6.6", "Return the position of an element inside an array\n\n@param array the array where it looks for an element\n@param element the element to find in the array\n@param <T> the type of elements in the array\n@return the position of the element if it's found in the array, -1 otherwise", "An extremely simple method for identifying multimedia. This\ncould be improved, but it's good enough for this example.\n\n@param file which could be an image or a video\n@return true if the file can be previewed, false otherwise", "Fetch the outermost Hashmap as a TwoDHashMap.\n\n@param firstKey\nfirst key\n@return the the innermost hashmap", "Add statistics about a created map.\n\n@param mapContext the\n@param mapValues the", "If a policy already exists on a folder, this will apply that policy to all existing files and sub folders within\nthe target folder.\n\n@param conflictResolution the desired behavior for conflict-resolution. Set to either none or overwrite.", "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" ]
public static Class<?> resolvePrimitiveIfNecessary(Class<?> clazz) { Assert.notNull(clazz, "Class must not be null"); return (clazz.isPrimitive() && clazz != void.class? primitiveTypeToWrapperMap.get(clazz) : clazz); }
[ "Resolve the given class if it is a primitive class,\nreturning the corresponding primitive wrapper type instead.\n@param clazz the class to check\n@return the original class, or a primitive wrapper for the original primitive type" ]
[ "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}", "Sets the working directory.\n\n@param dir The directory\n@throws IOException If the directory does not exist or cannot be written/read", "Asynchronously put the work into the pending map so we can work on submitting it to the worker\nif we wanted. Could possibly cause duplicate work if we execute the work, then add to the map.\n@param task\n@return", "Executes a query. The query results will be added to the ExecutionResults using the\ngiven identifier.\n\n@param identifier\nThe identifier to be used for the results when added to the ExecutionResults\n@param name\nThe name of the query to execute\n@return", "Load the view port execution.\n\n@param then callback when the view port is detected.\n@param fallback fallback when no view port detected or failure to detect the given\n{@link Boundary} (using {@link #propagateFallback(boolean)})", "Searches for descriptions of integer sequences and array ranges that have a colon character in them\n\nExamples of integer sequences:\n1:6\n2:4:20\n:\n\nExamples of array range\n2:\n2:4:", "Returns the value of found in the model.\n\n@param model the model that contains the key and value.\n@param expressionResolver the expression resolver to use to resolve expressions\n\n@return the directory grouping found in the model.\n\n@throws IllegalArgumentException if the {@link org.jboss.as.controller.descriptions.ModelDescriptionConstants#DIRECTORY_GROUPING directory grouping}\nwas not found in the model.", "Expensive. Creates the plan for the specific settings.", "BuildInteractiveObjectFromAnchor is a special type of interactive object in that it does not get\nbuilt using ROUTE's.\n\n@param anchorSensor is the Sensor that describes the sensor set to an Anchor\n@param anchorDestination is either another Viewpoint, url to a web site or another x3d scene" ]
public AT_Row setPaddingRight(int paddingRight) { if(this.hasCells()){ for(AT_Cell cell : this.getCells()){ cell.getContext().setPaddingRight(paddingRight); } } return this; }
[ "Sets the right padding for all cells in the row.\n@param paddingRight new padding, ignored if smaller than 0\n@return this to allow chaining" ]
[ "Lookup Seam integration resource loader.\n@return the Seam integration resource loader\n@throws DeploymentUnitProcessingException for any error", "Converts a TimeUnit instance to an integer value suitable for\nwriting to an MPX file.\n\n@param recurrence RecurringTask instance\n@return integer value", "Get a property as a float or Default value.\n\n@param key the property name\n@param defaultValue default value", "Returns a Client object for a clientUUID and profileId\n\n@param clientUUID UUID or friendlyName of client\n@param profileId - can be null, safer if it is not null\n@return Client object or null\n@throws Exception exception", "Read a single duration field extended attribute.\n\n@param row field data", "Returns a String summarizing overall accuracy that will print nicely.", "Use this API to add sslaction.", "Old REST client uses new REST service", "1-D Forward Discrete Cosine Transform.\n\n@param data Data." ]
protected Map getParametersMap(ActionInvocation _invocation) { Map map = (Map) _invocation.getStack().findValue(this.parameters); if (map == null) map = new HashMap(); return map; }
[ "Returns the object pointed by the result-type parameter \"parameters\"\n@param _invocation\n@return" ]
[ "Use this API to fetch authorizationpolicylabel_binding resource of given name .", "This method lists all resources defined in the file.\n\n@param file MPX file", "Open the given url in default system browser.", "Rename an existing app.\n@param appName Existing app name. See {@link #listApps()} for names that can be used.\n@param newName New name to give the existing app.\n@return the new name of the object", "Creates new metadata template.\n@param api the API connection to be used.\n@param scope the scope of the object.\n@param templateKey a unique identifier for the template.\n@param displayName the display name of the field.\n@param hidden whether this template is hidden in the UI.\n@param fields the ordered set of fields for the template\n@return the metadata template returned from the server.", "note, this just logs an error and doesn't throw as its only used to remove old configuration files, and shouldn't stop boot", "Get log level depends on provided client parameters such as verbose and quiet.", "Creates a random Hermitian matrix with elements from min to max value.\n\n@param length Width and height of the matrix.\n@param min Minimum value an element can have.\n@param max Maximum value an element can have.\n@param rand Random number generator.\n@return A symmetric matrix.", "returns the XmlCapable id associated with the literal.\nOJB maintains a RepositoryTags table that provides\na mapping from xml-tags to XmlCapable ids.\n\n@param literal the literal to lookup\n@return the int value representing the XmlCapable\n\n@throws MetadataException if no literal was found in tags mapping" ]
public String addDependency(FunctionalTaskItem dependencyTaskItem) { IndexableTaskItem dependency = IndexableTaskItem.create(dependencyTaskItem); this.addDependency(dependency); return dependency.key(); }
[ "Mark root of this task task group depends on the given TaskItem.\nThis ensure this task group's root get picked for execution only after the completion\nof invocation of provided TaskItem.\n\n@param dependencyTaskItem the task item that this task group depends on\n@return the key of the dependency" ]
[ "Search for rectangles which have the same width and x position, and\nwhich join together vertically and merge them together to reduce the\nnumber of rectangles needed to describe a symbol.", "By default all bean archives see each other.", "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.", "Prepare a parallel HTTP POST 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", "Isn't there a method for this in GeoTools?\n\n@param crs\nCRS string in the form of 'EPSG:<srid>'.\n@return SRID as integer.", "Stops the HTTP service gracefully and release all resources.\n\n@param quietPeriod the quiet period as described in the documentation of {@link EventExecutorGroup}\n@param timeout the maximum amount of time to wait until the executor is\n{@linkplain EventExecutorGroup#shutdown()}\nregardless if a task was submitted during the quiet period\n@param unit the unit of {@code quietPeriod} and {@code timeout}\n@throws Exception if there is exception raised during shutdown.", "To get all the textual content in the dom\n\n@param document\n@param individualTokens : default True : when set to true, each text node from dom is used to build the\ntext content : when set to false, the text content of whole is obtained at once.\n@return", "Maps a single prefix, uri pair as namespace.\n\n@param prefix the prefix to use\n@param namespaceURI the URI to use\n@throws IllegalArgumentException if prefix or namespaceURI is null", "Remove all scene objects." ]
public static int cudnnLRNCrossChannelForward( cudnnHandle handle, cudnnLRNDescriptor normDesc, int lrnMode, Pointer alpha, cudnnTensorDescriptor xDesc, Pointer x, Pointer beta, cudnnTensorDescriptor yDesc, Pointer y) { return checkResult(cudnnLRNCrossChannelForwardNative(handle, normDesc, lrnMode, alpha, xDesc, x, beta, yDesc, y)); }
[ "LRN cross-channel forward computation. Double parameters cast to tensor data type" ]
[ "This method is called to format a units value.\n\n@param value numeric value\n@return currency value", "Read an element which contains only a single list attribute of a given\ntype.\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\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.", "Explode the deployment contents and attach a \"transformed\" slave operation to the operation context.\n\n@param context the operation context\n@param operation the original operation\n@param contentRepository the content repository\n@return the hash of the uploaded deployment content\n@throws IOException\n@throws OperationFailedException", "Use this API to fetch cachepolicylabel resource of given name .", "Launch Application Setting to grant permission.", "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", "Returns the metallic factor for PBR shading", "Adds a function to the end of the token list\n@param function Function which is to be added\n@return The new Token created around function", "Extracts the column from a matrix.\n@param a Input matrix\n@param column Which column is to be extracted\n@param out output. Storage for the extracted column. If null then a new vector will be returned.\n@return The extracted column." ]
private String listToCSV(List<String> list) { String csvStr = ""; for (String item : list) { csvStr += "," + item; } return csvStr.length() > 1 ? csvStr.substring(1) : csvStr; }
[ "Concat a List into a CSV String.\n@param list list to concat\n@return csv string" ]
[ "Utility method to retrieve the next working date start time, given\na date and time as a starting point.\n\n@param date date and time start point\n@return date and time of next work start", "Load a properties file from a file path\n\n@param gradlePropertiesFilePath The file path where the gradle.properties is located.\n@return The loaded properties.\n@throws IOException In case an error occurs while reading the properties file, this exception is thrown.", "Parses all child Shapes recursively and adds them to the correct JSON\nObject\n\n@param childShapes\n@throws org.json.JSONException", "Use this API to update autoscaleprofile resources.", "Merges this with the list of sections to produce the smallest array of sequential block subnets, going from smallest to largest\n\n@param sections the sections to merge with this\n@return", "Returns the project membership record.\n\n@param projectMembership Globally unique identifier for the project membership.\n@return Request object", "Decode the password from the given data. Will decode the data block as well.\n\n@param data encrypted data block\n@param encryptionCode encryption code\n\n@return password", "Iterates over all tokens in current member tag with the name tagName and evaluates the body for every token.\n\n@param template The body of the block tag\n@param attributes The attributes of the template tag\n@exception XDocletException If an error occurs\[email protected] type=\"block\"\[email protected] name=\"tagName\" optional=\"false\" description=\"The tag name.\"\[email protected] name=\"delimiter\" description=\"delimiter for the StringTokenizer. consult javadoc for\njava.util.StringTokenizer default is ','\"\[email protected] name=\"skip\" description=\"how many tokens to skip on start\"", "Utility to list indexes of a given type.\n\n@param type the type of index to list, null means all types\n@param modelType the class to deserialize the index into\n@param <T> the type of the index\n@return the list of indexes of the specified type" ]
private static EventEnumType convertEventType(org.talend.esb.sam.common.event.EventTypeEnum eventType) { if (eventType == null) { return null; } return EventEnumType.valueOf(eventType.name()); }
[ "Convert event type.\n\n@param eventType the event type\n@return the event enum type" ]
[ "Deletes the given directory.\n\n@param directory The directory to delete.", "Get a loader that lists the Files in the current path,\nand monitors changes.", "set proper expression text invoking the DJCRosstabMeasurePrecalculatedTotalProvider for the cell\n@param auxRows\n@param auxCols\n@param measureExp\n@param djmeasure\n@param crosstabColumn\n@param crosstabRow\n@param meausrePrefix", "generate a message for loglevel FATAL\n\n@param pObject the message Object", "Registers add operation\n\n@param registration resource on which to register\n@param handler operation handler to register\n@param flags with flags\n@deprecated use {@link #registerAddOperation(org.jboss.as.controller.registry.ManagementResourceRegistration, AbstractAddStepHandler, org.jboss.as.controller.registry.OperationEntry.Flag...)}", "Handle exceptions thrown by the storage. Exceptions specific to DELETE go\nhere. Pass other exceptions to the parent class.\n\nTODO REST-Server Add a new exception for this condition - server busy\nwith pending requests. queue is full", "Simple info message for status\n\n@param tag Message to print out at start of info message", "Calculates a checksum for the specified buffer.\n@param buffer the buffer to calculate.\n@return the checksum value.", "This method is called to format a relation list.\n\n@param value relation list instance\n@return formatted relation list" ]
public static boolean isConstructorCall(Expression expression, String classNamePattern) { return expression instanceof ConstructorCallExpression && expression.getType().getName().matches(classNamePattern); }
[ "Return true if the expression is a constructor call on a class that matches the supplied.\n@param expression - the expression\n@param classNamePattern - the possible List of class names\n@return as described" ]
[ "Adds a type to collection with inheriting base type properties.\n\n@param type the type definition to add\n\n@return true if the type definition was added", "Checks if a given number is in the range of a double.\n\n@param number\na number which should be in the range of a double (positive or negative)\n\n@see java.lang.Double#MIN_VALUE\n@see java.lang.Double#MAX_VALUE\n\n@return number as a double", "Open a new content stream.\n\n@param item the content item\n@return the content stream", "Create a new entry in the database from an object.", "Makes the object unpickable and removes the touch handler for it\n@param sceneObject\n@return true if the handler has been successfully removed", "Extract resource assignments for a task.\n\n@param task parent task\n@param assignments list of Synchro resource assignment data", "Assemble and send a packet that performs sync control, turning a device's sync mode on or off, or telling it\nto become the tempo master.\n\n@param target an update from the device whose sync state is to be set\n@param command the byte identifying the specific sync command to be sent\n\n@throws IOException if there is a problem sending the command to the device", "Converts an XML file to an object.\n\n@param fileName The filename where to save it to.\n@return The object.\n@throws FileNotFoundException On error.", "Open an OutputStream and execute the function using the OutputStream.\n\n@param function the function to execute\n@return the URI and the file size" ]
public static BufferedImage cloneImage( BufferedImage image ) { BufferedImage newImage = new BufferedImage( image.getWidth(), image.getHeight(), BufferedImage.TYPE_INT_ARGB ); Graphics2D g = newImage.createGraphics(); g.drawRenderedImage( image, null ); g.dispose(); return newImage; }
[ "Clones a BufferedImage.\n@param image the image to clone\n@return the cloned image" ]
[ "A package of the specified class will be scanned and found classes will be added to the set of bean classes for the synthetic bean archive.\n\n@param scanRecursively\n@param packageClass\n@return self", "Rename with retry.\n\n@param from\n@param to\n@return <tt>true</tt> if the file was successfully renamed.", "Returns the Map value of the field.\n\n@return the Map value of the field. It returns a reference of the value both for <code>MAP</code> and\n<code>LIST_MAP</code>.\n@throws IllegalArgumentException if the value cannot be converted to Map.", "copy all fields from the \"from\" object to the \"to\" object.\n\n@param from source object\n@param to from's clone\n@param fields fields to be populated\n@param accessible 'true' if all 'fields' have been made accessible during\ntraversal", "This method allows a pre-existing resource calendar to be attached to a\nresource.\n\n@param calendar resource calendar", "Inserts the specified array into the specified original array at the specified index.\n\n@param original the original array into which we want to insert another array\n@param index the index at which we want to insert the array\n@param inserted the array that we want to insert\n@return the combined array", "Creates an IBlur instance for the given algorithm enum\n\n@param algorithm\n@param contextWrapper\n@return", "Scans all Forge addons for classes accepted by given filter.\n\nTODO: Could be refactored - scan() is almost the same.", "Set an attribute of this node as Object. This method is backed by\na HashMap, so all rules of HashMap apply to this method.\nFires a PropertyChangeEvent." ]
public AT_Row setPadding(int padding){ if(this.hasCells()){ for(AT_Cell cell : this.getCells()){ cell.getContext().setPadding(padding); } } return this; }
[ "Sets all padding for all cells in the row to the same value.\n@param padding new padding for top, bottom, left, and right, ignored if smaller than 0\n@return this to allow chaining" ]
[ "Check if we still need more nodes from the given zone and reduce the\nzoneReplicationFactor count accordingly.\n\n@param requiredRepFactor\n@param zoneId\n@return", "Helper function to return the minimum size of the index space to be passed to the reduction given the input and\noutput tensors", "Generates timephased costs from the assignment's cost value. Used for Cost type Resources.\n\n@return timephased cost", "Use this API to fetch all the nssimpleacl resources that are configured on netscaler.", "Compares two fields given by their names.\n\n@param objA The name of the first field\n@param objB The name of the second field\n@return\n@see java.util.Comparator#compare(java.lang.Object, java.lang.Object)", "Use this API to unset the properties of nsacl6 resource.\nProperties that need to be unset are specified in args array.", "Use this API to fetch lbvserver_servicegroup_binding resources of given name .", "Hides the Loader component", "Find the next match of the pattern on the tree\n\n@return whether there is a match somewhere in the tree" ]
public <T> void setState(HttpConnectionInterceptor interceptor, String stateName, T stateObjectToStore) { Map<String, Object> state = interceptorStates.get(interceptor); if (state == null) { interceptorStates.put(interceptor, (state = new ConcurrentHashMap<String, Object>())); } state.put(stateName, stateObjectToStore); }
[ "Store some state on this request context associated with the specified interceptor instance.\nUsed where a single interceptor instance needs to associate state with each HTTP request.\n\n@param interceptor the interceptor instance\n@param stateName the key to store the state object under\n@param stateObjectToStore the state object to store\n@param <T> the type of the state object to store\n@see #getState(HttpConnectionInterceptor, String, Class)\n@since 2.6.0" ]
[ "Re-reads the given entity, refreshing any properties updated on the server-side during insert or update.", "Calculate the value of a digital caplet assuming the Black'76 model.\n\n@param forward The forward (spot).\n@param volatility The Black'76 volatility.\n@param periodLength The period length of the underlying forward rate.\n@param discountFactor The discount factor corresponding to the payment date (option maturity + period length).\n@param optionMaturity The option maturity\n@param optionStrike The option strike.\n@return Returns the price of a digital caplet under the Black'76 model", "Write throwable as attachment.\n\n@param throwable to write\n@param title title of attachment\n@return Created {@link ru.yandex.qatools.allure.model.Attachment}", "Extracts out a matrix from source given a sub matrix with arbitrary rows and columns specified in\ntwo array lists\n\n@param src Source matrix. Not modified.\n@param rows array of row indexes\n@param rowsSize maximum element in row array\n@param cols array of column indexes\n@param colsSize maximum element in column array\n@param dst output matrix. Must be correct shape.", "Specify the time out of the session established at the server. The\nsession is kept alive by requests sent by this client object. If the\nsession is idle for a period of time that would timeout the session, the\nclient will send a PING request to keep the session alive.\n\n@param timeout timeout in milliseconds, must be greater than zero and less\nthan 60000.", "Return true if the AST expression has not already been visited. If it is\nthe first visit, register the expression so that the next visit will return false.\n\n@param expression - the AST expression to check\n@return true if the AST expression has NOT already been visited", "Helper method to add cue list entries from a parsed ANLZ cue tag\n\n@param entries the list of entries being accumulated\n@param tag the tag whose entries are to be added", "Ensure that the given connection is established.\n\n@param jedis\na connection to Redis\n@return true if the supplied connection was already connected", "Write a relation list field to the JSON file.\n\n@param fieldName field name\n@param value field value" ]
public static CmsResourceTypeStatResultList init(CmsResourceTypeStatResultList resList) { if (resList == null) { return new CmsResourceTypeStatResultList(); } resList.deleteOld(); return resList; }
[ "Method to initialize the list.\n\n@param resList a given instance or null\n@return an instance" ]
[ "Serialize an object with Json\n@param obj Object\n@return String\n@throws IOException", "Use this API to fetch sslciphersuite resource of given name .", "Invoked by subclasses; performs actual file roll. Tests to see whether roll\nis necessary have already been performed, so just do it.", "Hides the original Java-style method name using an attribute\nwhich should be respected by Visual Studio, the creates a new\nwrapper method using a .Net style method name.\n\nNote that this does not work for VB as it is case insensitive. Even\nthough Visual Studio won't show you the Java-style method name,\nthe VB compiler sees both and thinks they are the same... which\ncauses it to fail.\n\n@param writer output stream\n@param aClass class being processed\n@param methodSet set of methods which have been processed.\n@throws XMLStreamException", "This method retrieves a double of the specified type,\nbelonging to the item with the specified unique ID.\n\n@param id unique ID of entity to which this data belongs\n@param type data type identifier\n@return required double data", "Processes the template for all class definitions.\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\"", "Maps a field index to a ResourceField instance.\n\n@param fields array of fields used as the basis for the mapping.\n@param index required field index\n@return ResourceField instance", "Initializes the external child resource collection.", "Return the class's name, possibly by stripping the leading path" ]
private void handleGetVersionResponse(SerialMessage incomingMessage) { this.ZWaveLibraryType = incomingMessage.getMessagePayloadByte(12); this.zWaveVersion = new String(ArrayUtils.subarray(incomingMessage.getMessagePayload(), 0, 11)); logger.debug(String.format("Got MessageGetVersion response. Version = %s, Library Type = 0x%02X", zWaveVersion, ZWaveLibraryType)); }
[ "Handles the response of the getVersion request.\n@param incomingMessage the response message to process." ]
[ "Use this API to fetch all the gslbrunningconfig resources that are configured on netscaler.", "Determines if this connection's access token has expired and needs to be refreshed.\n@return true if the access token needs to be refreshed; otherwise false.", "Look for the closing parenthesis corresponding to the one at position\nrepresented by the opening index.\n\n@param text input expression\n@param opening opening parenthesis index\n@return closing parenthesis index", "Create a JMX ObjectName\n\n@param domain The domain of the object\n@param type The type of the object\n@return An ObjectName representing the name", "Converts a batch indexing into the sample, to a batch indexing into the\noriginal function.\n\n@param batch The batch indexing into the sample.\n@return A new batch indexing into the original function, containing only\nthe indices from the sample.", "Copy bytes from an input stream to a file and log progress\n@param is the input stream to read\n@param destFile the file to write to\n@throws IOException if an I/O error occurs", "Use this API to fetch all the authenticationradiusaction resources that are configured on netscaler.", "Multiplied a transpose orthogonal matrix Q by the specified rotator. This is used\nto update the U and V matrices. Updating the transpose of the matrix is faster\nsince it only modifies the rows.\n\n\n@param Q Orthogonal matrix\n@param m Coordinate of rotator.\n@param n Coordinate of rotator.\n@param c cosine of rotator.\n@param s sine of rotator.", "Initialize elements of the panel displayed for the deactivated widget." ]
public static double J(int n, double x) { int j, m; double ax, bj, bjm, bjp, sum, tox, ans; boolean jsum; double ACC = 40.0; double BIGNO = 1.0e+10; double BIGNI = 1.0e-10; if (n == 0) return J0(x); if (n == 1) return J(x); ax = Math.abs(x); if (ax == 0.0) return 0.0; else if (ax > (double) n) { tox = 2.0 / ax; bjm = J0(ax); bj = J(ax); for (j = 1; j < n; j++) { bjp = j * tox * bj - bjm; bjm = bj; bj = bjp; } ans = bj; } else { tox = 2.0 / ax; m = 2 * ((n + (int) Math.sqrt(ACC * n)) / 2); jsum = false; bjp = ans = sum = 0.0; bj = 1.0; for (j = m; j > 0; j--) { bjm = j * tox * bj - bjp; bjp = bj; bj = bjm; if (Math.abs(bj) > BIGNO) { bj *= BIGNI; bjp *= BIGNI; ans *= BIGNI; sum *= BIGNI; } if (jsum) sum += bj; jsum = !jsum; if (j == n) ans = bjp; } sum = 2.0 * sum - bj; ans /= sum; } return x < 0.0 && n % 2 == 1 ? -ans : ans; }
[ "Bessel function of order n.\n\n@param n Order.\n@param x Value.\n@return J value." ]
[ "Returns the real key object.", "Use this API to fetch appfwsignatures resource of given name .", "Determine the target type for the generic return type of the given method,\nwhere formal type variables are declared on the given class.\n@param method the method to introspect\n@param clazz the class to resolve type variables against\n@return the corresponding generic parameter or return type\n@see #resolveReturnTypeForGenericMethod", "Use this API to fetch all the cmppolicylabel resources that are configured on netscaler.", "This method is used to automatically generate a value\nfor the Outline Number field of this task.\n\n@param parent Parent Task", "Returns the organization of a given module\n\n@return Organization", "Display web page, but no user interface - close", "AND operation which takes the previous clause and the next clause and AND's them together.", "Adds a file to your assembly but automatically generates the field name of the file.\n\n@param file {@link File} the file to be uploaded." ]
void update(JsonObject jsonObject) { for (JsonObject.Member member : jsonObject) { if (member.getValue().isNull()) { continue; } this.parseJSONMember(member); } this.clearPendingChanges(); }
[ "Updates this BoxJSONObject using the information in a JSON object.\n@param jsonObject the JSON object containing updated information." ]
[ "Sends the collected dependencies over to the master and record them.", "Invite a user to an enterprise.\n@param api the API connection to use for the request.\n@param userLogin the login of the user to invite.\n@param enterpriseID the ID of the enterprise to invite the user to.\n@return the invite info.", "if you want to convert some string to an object, you have an argument to parse", "List app dynos for an app\n\n@param appName See {@link #listApps} for a list of apps that can be used.", "Saves the loaded XML bundle as property bundle.\n@throws UnsupportedEncodingException thrown if localizations from the XML bundle could not be loaded correctly.\n@throws CmsException thrown if any of the interactions with the VFS fails.\n@throws IOException thrown if localizations from the XML bundle could not be loaded correctly.", "Sets the whole day flag.\n@param isWholeDay flag, indicating if the event lasts whole days.", "Builds the task hierarchy.\n\nNote that there are two distinct levels of organisation going on here. The first is the\nAsta \"summary\" organisation, where the user organises bars into summary groups. We are using this\nto create our hierarchy of tasks.\n\nThe second level displayed within a summary group (or at the project level if the user has not\ncreated summary groups) is the WBS. At the moment we are not including the WBS in the hierarchy.\n\n@param bars bar data\n@param expandedTasks expanded task data\n@param tasks task data\n@param milestones milestone data\n@return list containing the top level tasks", "Use this API to fetch all the appflowpolicylabel resources that are configured on netscaler.", "Use this API to unset the properties of systemuser resource.\nProperties that need to be unset are specified in args array." ]
public static void configureProtocolHandler() { final String pkgs = System.getProperty("java.protocol.handler.pkgs"); String newValue = "org.mapfish.print.url"; if (pkgs != null && !pkgs.contains(newValue)) { newValue = newValue + "|" + pkgs; } else if (pkgs != null) { newValue = pkgs; } System.setProperty("java.protocol.handler.pkgs", newValue); }
[ "Adds the parent package to the java.protocol.handler.pkgs system property." ]
[ "Execute a set of API calls as batch request.\n@param requests list of api requests that has to be executed in batch.\n@return list of BoxAPIResponses", "Return the regression basis functions.\n\n@param exerciseDate The date w.r.t. which the basis functions should be measurable.\n@param model The model.\n@return Array of random variables.\n@throws net.finmath.exception.CalculationException Thrown if the valuation fails, specific cause may be available via the <code>cause()</code> method.", "Get a View that displays the data at the specified\nposition in the data set.\n\n@param position Position of the item whose data we want\n@param convertView View to recycle, if not null\n@param parent ViewGroup containing the returned View", "Returns an array of non null elements from the source array.\n\n@param tArray the source array\n@return the array", "Changes to a new sub-view and stores a report to be displayed by that subview.<p<\n\n@param newState the new state\n@param thread the report thread which should be displayed in the sub view\n@param label the label to display for the report", "Prints some basic documentation about this program.", "Accesses a property from the DB configuration for the selected DB.\n\n@param name the name of the property\n@return the value of the property", "Log a trace message with a throwable.", "checking availability of ClassInfo.setFlags method is just workaround for JANDEX-37" ]
public void transferApp(String appName, String to) { connection.execute(new SharingTransfer(appName, to), apiKey); }
[ "Transfer the ownership of an application to another user.\n@param appName App name. See {@link #listApps} for a list of apps that can be used.\n@param to Username of the person to transfer the app to. This is usually in the form of \"[email protected]\"." ]
[ "Finishes the current box - empties the text line buffer and creates a DOM element from it.", "Read a four byte integer from the data.\n\n@param offset current offset into data block\n@param data data block\n@return int value", "Checks if a property's type is valid to be included in the report.\n@param _property the property.\n@return true if the property is is of a valid type.", "Adds a redirect URL to the specified profile ID\n\n@param model\n@param profileId\n@param srcUrl\n@param destUrl\n@param hostHeader\n@return\n@throws Exception", "Calculates the beginLine of a violation report.\n\n@param pmdViolation The violation for which the beginLine should be calculated.\n@return The beginLine is assumed to be the line with the smallest number. However, if the smallest number is\nout-of-range (non-positive), it takes the other number.", "Returns the list of user defined attribute names.\n\n@return the list of user defined attribute names, if there are none it returns an empty set.", "Gets the node list from string line seperate or space seperate.\n\n@param listStr\nthe list str\n@param removeDuplicate\nthe remove duplicate\n@return the node list from string line seperate or space seperate", "Finish service initialization.\n\n@throws GeomajasException oops", "Create a forward curve from forwards given by a LIBORMonteCarloModel.\n\n@param name name of the forward curve.\n@param model Monte Carlo model providing the forwards.\n@param startTime time at which the curve starts, i.e. zero time for the curve\n@return a forward curve from forwards given by a LIBORMonteCarloModel.\n@throws CalculationException Thrown if the model failed to provide the forward rates." ]
public boolean updateSelectedItemsList(int dataIndex, boolean select) { boolean done = false; boolean contains = isSelected(dataIndex); if (select) { if (!contains) { if (!mMultiSelectionSupported) { clearSelection(false); } Log.d(Log.SUBSYSTEM.LAYOUT, TAG, "updateSelectedItemsList add index = %d", dataIndex); mSelectedItemsList.add(dataIndex); done = true; } } else { if (contains) { Log.d(Log.SUBSYSTEM.LAYOUT, TAG, "updateSelectedItemsList remove index = %d", dataIndex); mSelectedItemsList.remove(dataIndex); done = true; } } return done; }
[ "Update the selection state of the item\n@param dataIndex data set index\n@param select if it is true the item is marked as selected, otherwise - unselected\n@return true if the selection state has been changed successfully, otherwise - false" ]
[ "Retrieve the calendar used internally for timephased baseline calculation.\n\n@return baseline calendar", "Add columns to the tree.\n\n@param parentNode parent tree node\n@param table columns container", "Use this API to unlink sslcertkey.", "Convenience method for first removing all enum style constants and then adding the single one.\n\n@see #removeEnumStyleNames(UIObject, Class)\n@see #addEnumStyleName(UIObject, Style.HasCssName)", "Read a single field alias from an extended attribute.\n\n@param attribute extended attribute", "Sets the specified short attribute to the specified value.\n\n@param name name of the attribute\n@param value value of the attribute\n@since 1.9.0", "Calculates ATM Bachelier implied volatilities.\n\n@see net.finmath.functions.AnalyticFormulas#bachelierOptionImpliedVolatility(double, double, double, double, double)\n\n@param optionValue RandomVarable representing the value of the option\n@param optionMaturity Time to maturity.\n@param swapAnnuity The swap annuity as seen on valuation time.\n@return The Bachelier implied volatility.", "Fetch the specified expression from the cache or create it if necessary.\n\n@param expressionString the expression string\n@return the expression\n@throws ParseException oops", "Remove all unnecessary comments from a lexer or parser file" ]
public void setBackgroundColor(float r, float g, float b, float a) { setBackgroundColorR(r); setBackgroundColorG(g); setBackgroundColorB(b); setBackgroundColorA(a); }
[ "Sets the background color of the scene rendered by this camera.\n\nIf you don't set the background color, the default is an opaque black.\nMeaningful parameter values are from 0 to 1, inclusive: values\n{@literal < 0} are clamped to 0; values {@literal > 1} are clamped to 1." ]
[ "Constructs the appropriate MenuDrawer based on the position.", "Extract the parent WBS from a WBS.\n\n@param wbs current WBS\n@return parent WBS", "Loads the asset referenced by the file name\nunder the owner of this component.\nIf this component was constructed to replace the scene with\nthe asset, the main scene of the current context\nwill contain only the owner of this\ncomponent upon return. Otherwise, the loaded asset is a\nchild of this component's owner.\n\nLoading the asset is performed in a separate thread.\nThis function returns before the asset has finished loading.\nIAssetEvents are emitted to the input event handler and\nto any event listener on the context.\n\n@param handler\nIAssetEvents handler to process asset loading events", "Adds search fields from elements on a container page to a container page's document.\n@param document The document for the container page\n@param cms The current CmsObject\n@param resource The resource of the container page\n@param systemFields The list of field names for fields where mappings to should be discarded, since these fields are used system internally.\n@return the manipulated document", "Build query string.\n@return Query string or null if query string contains no parameters at all.", "Pick arbitrary wrapping method. No generics should be set.\n@param builder", "get the converted object corresponding to sourceObject as converted to\ndestination type by converter\n\n@param converter\n@param sourceObject\n@param destinationType\n@return", "given is at the begining, of is at the end", "Locks the bundle file that contains the translation for the provided locale.\n@param l the locale for which the bundle file should be locked.\n@throws CmsException thrown if locking fails." ]
public static dnsnsecrec[] get(nitro_service service, String hostname[]) throws Exception{ if (hostname !=null && hostname.length>0) { dnsnsecrec response[] = new dnsnsecrec[hostname.length]; dnsnsecrec obj[] = new dnsnsecrec[hostname.length]; for (int i=0;i<hostname.length;i++) { obj[i] = new dnsnsecrec(); obj[i].set_hostname(hostname[i]); response[i] = (dnsnsecrec) obj[i].get_resource(service); } return response; } return null; }
[ "Use this API to fetch dnsnsecrec resources of given names ." ]
[ "running in App Engine", "Samples without replacement from a collection.\n\n@param c\nThe collection to be sampled from\n@param n\nThe number of samples to take\n@return a new collection with the sample", "Set the pattern scheme.\n@param isWeekDayBased flag, indicating if the week day based scheme should be set.", "Notifies that a content item is removed.\n\n@param position the position.", "Updates the information about this collaboration with any info fields that have been modified locally.\n\n@param info the updated info.", "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", "Convenience method to set the underlying bean instance for a proxy.\n\n@param proxy the proxy instance\n@param beanInstance the instance of the bean", "Read all of the fields information from the configuration file.", "Finish initializing the service." ]
private void writeResource(Resource mpxjResource, net.sf.mpxj.planner.schema.Resource plannerResource) { ProjectCalendar resourceCalendar = mpxjResource.getResourceCalendar(); if (resourceCalendar != null) { plannerResource.setCalendar(getIntegerString(resourceCalendar.getUniqueID())); } plannerResource.setEmail(mpxjResource.getEmailAddress()); plannerResource.setId(getIntegerString(mpxjResource.getUniqueID())); plannerResource.setName(getString(mpxjResource.getName())); plannerResource.setNote(mpxjResource.getNotes()); plannerResource.setShortName(mpxjResource.getInitials()); plannerResource.setType(mpxjResource.getType() == ResourceType.MATERIAL ? "2" : "1"); //plannerResource.setStdRate(); //plannerResource.setOvtRate(); plannerResource.setUnits("0"); //plannerResource.setProperties(); m_eventManager.fireResourceWrittenEvent(mpxjResource); }
[ "This method writes data for a single resource to a Planner file.\n\n@param mpxjResource MPXJ Resource instance\n@param plannerResource Planner Resource instance" ]
[ "Generates a comment regarding the parameters.\n\n@param entityId - id of the commented entity\n@param entityType - type of the entity\n@param action - the action performed by the user\n@param commentedText - comment text\n@param user - comment left by\n@param date - date comment was created\n@return - comment entity", "Return the raw source line corresponding to the specified AST node\n\n@param node - the Groovy AST node", "Returns a compact representation of all of the stories on the task.\n\n@param task The task containing the stories to get.\n@return Request object", "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", "Converts a string from ISO-8559-1 encoding to UTF-8.\n@param value ISO-8559-1 value\n@return UTF-8 value", "Extract day type definitions.\n\n@param types Synchro day type rows\n@return Map of day types by UUID", "Gets the favorite entries corresponding to the currently displayed favorite widgets.\n\n@return the list of favorite entries", "Adds a user defined field value to a task.\n\n@param fieldType field type\n@param container FieldContainer instance\n@param row UDF data", "When the descriptor was added while editing, but the change was not saved, it has to be removed\nwhen the editor is closed.\n@throws CmsException thrown when deleting the descriptor resource fails" ]
private void initDefaultScopeType(EnhancedAnnotation<T> annotatedAnnotation) { Set<Annotation> scopeTypes = new HashSet<Annotation>(); scopeTypes.addAll(annotatedAnnotation.getMetaAnnotations(Scope.class)); scopeTypes.addAll(annotatedAnnotation.getMetaAnnotations(NormalScope.class)); if (scopeTypes.size() > 1) { throw MetadataLogger.LOG.multipleScopes(annotatedAnnotation); } else if (scopeTypes.size() == 1) { this.defaultScopeType = scopeTypes.iterator().next(); } }
[ "Initializes the default scope type" ]
[ "Start with specifying the artifact version", "Write a new line and indent.", "Returns the counters with keys as the first key and count as the\ntotal count of the inner counter for that key\n\n@return counter of type K1", "Updates the image information.", "Use this API to fetch all the clusterinstance resources that are configured on netscaler.", "Remove all of the audio sources from the audio manager.\nThis will stop all sound from playing.", "Return the index associated to the Renderer.\n\n@param renderer used to search in the prototypes collection.\n@return the prototype index associated to the renderer passed as argument.", "Sets the time to wait when close connection watch threads are enabled. 0 = wait forever.\n@param closeConnectionWatchTimeout the watchTimeout to set\n@param timeUnit Time granularity", "Add the line to the content\n\n@param bufferedFileReader The file reader\n@param content The content of the file\n@param line The current read line\n@throws IOException" ]
protected void finishBox() { if (textLine.length() > 0) { String s; if (isReversed(Character.getDirectionality(textLine.charAt(0)))) s = textLine.reverse().toString(); else s = textLine.toString(); curstyle.setLeft(textMetrics.getX()); curstyle.setTop(textMetrics.getTop()); curstyle.setLineHeight(textMetrics.getHeight()); renderText(s, textMetrics); textLine = new StringBuilder(); textMetrics = null; } }
[ "Finishes the current box - empties the text line buffer and creates a DOM element from it." ]
[ "Waits for the current outstanding request retrying it with exponential backoff if it fails.\n\n@throws ClosedByInterruptException if request was interrupted\n@throws IOException In the event of FileNotFoundException, MalformedURLException\n@throws RetriesExhaustedException if exceeding the number of retries", "There is a race condition that is not handled properly by the DialogFragment class.\nIf we don't check that this onDismiss callback isn't for the old progress dialog from before\nthe device orientation change, then this will cause the newly created dialog after the\norientation change to be dismissed immediately.", "Gets container with alls groups of a certain user.\n\n@param cms cmsobject\n@param user to find groups for\n@param caption caption property\n@param iconProp property\n@param ou ou\n@param propStatus status property\n@param iconProvider the icon provider\n@return Indexed Container", "Use this API to change appfwsignatures.", "SuppressWarnings I really want to return HazeltaskTasks instead of Runnable", "Determines if the key replicates to the given node\n\n@param key\n@param nodeId\n@return true if the key belongs to the node as some replica", "Returns whether the division grouping range matches the block of values for its prefix length.\nIn other words, returns true if and only if it has a prefix length and it has just a single prefix.", "Read an individual GanttProject resource assignment.\n\n@param gpAllocation GanttProject resource assignment.", "Gets string content from InputStream\n\n@param is InputStream to read\n@return InputStream content" ]
public static void dumpStoreDefsToFile(String outputDirName, String fileName, List<StoreDefinition> storeDefs) { if(outputDirName != null) { File outputDir = new File(outputDirName); if(!outputDir.exists()) { Utils.mkdirs(outputDir); } try { FileUtils.writeStringToFile(new File(outputDirName, fileName), new StoreDefinitionsMapper().writeStoreList(storeDefs)); } catch(IOException e) { logger.error("IOException during dumpStoreDefsToFile: " + e); } } }
[ "Prints a stores xml to a file.\n\n@param outputDirName\n@param fileName\n@param list of storeDefs" ]
[ "Adds a single value to the data set and updates any\nstatistics that are calculated cumulatively.\n@param value The value to add.", "Get the schema for the Avro Record from the object container file", "Set the background color of the progress spinner disc.\n\n@param colorRes Resource id of the color.", "Starts the named animation.\n@see GVRAvatar#stop(String)\n@see GVRAnimationEngine#start(GVRAnimation)", "Detect numbers using comma as a decimal separator and replace with period.\n\n@param value original numeric value\n@return corrected numeric value", "Retrieve the number of minutes per year for this calendar.\n\n@return minutes per year", "at this point definition below is not really needed as it is the same as for 1.1, but it is here as place holder when subsystem parser evolves.", "Retrieves the text value for the baseline duration.\n\n@return baseline duration text", "Looks for sequences of integer lists and combine them into one big sequence" ]
public final void unregisterView(final View view) { mActivity.runOnUiThread(new Runnable() { @Override public void run() { if (null != mRenderableViewGroup && view.getParent() == mRenderableViewGroup) { mRenderableViewGroup.removeView(view); } } }); }
[ "Remove a child view of Android hierarchy view .\n\n@param view View to be removed." ]
[ "Plots a list of charts in matrix with 2 columns.\n@param charts", "Parses btch api response to create a list of BoxAPIResponse objects.\n@param batchResponse response of a batch api request\n@return list of BoxAPIResponses", "Parse a currency symbol position from a string representation.\n\n@param value String representation\n@return CurrencySymbolPosition instance", "Unzip a file or a folder\n@param zipFile\n@param unzippedFolder optional, if null the file/folder will be extracted in the same folder as zipFile\n@return", "Handles adding a key. Calls the registered listener and wraps it's method in some GUI adjustments.", "Starts given docker machine.\n\n@param cliPathExec\nlocation of docker-machine or null if it is on PATH.\n@param machineName\nto be started.", "Extract the generic return type from the given method.\n@param method the method to check the return type for\n@param source the source class/interface defining the generic parameter types\n@param typeIndex the index of the type (e.g. 0 for Collections,\n0 for Map keys, 1 for Map values)\n@param nestingLevel the nesting level of the target type\n@return the generic type, or {@code null} if none", "This is pretty ugly. We end up mimicking the request logic here, so this\nneeds to stay in sync with handleRequest.", "Send JSON representation of given data object to all connections of a user\n@param data the data object\n@param username the username" ]
private Month readOptionalMonth(JSONValue val) { String str = readOptionalString(val); if (null != str) { try { return Month.valueOf(str); } catch (@SuppressWarnings("unused") IllegalArgumentException e) { // Do nothing -return the default value } } return null; }
[ "Read an optional month value form a JSON value.\n@param val the JSON value that should represent the month.\n@return the month from the JSON or null if reading the month fails." ]
[ "Gets the UTF-8 sequence length of the code point.\n\n@throws InvalidCodePointException if code point is not within a valid range", "Unpause the server, allowing it to resume normal operations", "Creates the full sentence.\n\n@return the mtas CQL parser sentence condition\n@throws ParseException the parse exception", "Constraint that ensures that the field has a length if the jdbc type requires it.\n\n@param fieldDef The field descriptor\n@param checkLevel The current check level (this constraint is checked in all levels)", "Create a Deliverable inside the database that will track a file created by a JobInstance Must be called from inside a transaction\n\n@param path\nFilePath (relative to a root directory - cf. Node)\n@param originalFileName\nFileName\n@param fileFamily\nFile family (may be null). E.g.: \"daily report\"\n@param jobId\nJob Instance ID\n@param cnx\nthe DbConn to use.", "When the descriptor was added while editing, but the change was not saved, it has to be removed\nwhen the editor is closed.\n@throws CmsException thrown when deleting the descriptor resource fails", "Add a new column\n\n@param columnName the name of the column\n@param searchable whether the column is searchable or not\n@param orderable whether the column is orderable or not\n@param searchValue if any, the search value to apply", "Returns real unquoted value for a DisplayValue\n@param key\n@return", "Returns a string that should be used as a label for the given property.\n\n@param propertyIdValue\nthe property to label\n@return the label" ]
public static boolean matches(Map<String, Object> nodeProperties, String[] keyColumnNames, Object[] keyColumnValues) { for ( int i = 0; i < keyColumnNames.length; i++ ) { String property = keyColumnNames[i]; Object expectedValue = keyColumnValues[i]; boolean containsProperty = nodeProperties.containsKey( property ); if ( containsProperty ) { Object actualValue = nodeProperties.get( property ); if ( !sameValue( expectedValue, actualValue ) ) { return false; } } else if ( expectedValue != null ) { return false; } } return true; }
[ "Check if the node matches the column values\n\n@param nodeProperties the properties on the node\n@param keyColumnNames the name of the columns to check\n@param keyColumnValues the value of the columns to check\n@return true if the properties of the node match the column names and values" ]
[ "Don't use input, it's match values might have been reset in the\nloop that looks for the first possible match.\n\n@param pairIndex TODO\n@param result TODO\n@return TODO", "This method writes a single predecessor link to the MSPDI file.\n\n@param taskID The task UID\n@param type The predecessor type\n@param lag The lag duration\n@return A new link to be added to the MSPDI file", "Should be called after new data is inserted. Will be automatically called, when the view dimensions\nhas changed.\n\nCalculates the start- and end-angles for every PieSlice.", "Close it and ignore any exceptions.", "Parses command-line and verifies metadata versions on all the cluster\nnodes\n\n@param args Command-line input\n@param printHelp Tells whether to print help only or execute command\nactually\n@throws IOException", "Use this API to disable vserver of given name.", "In common shader cases, NaN makes little sense. Correspondingly, GVRF is\ngoing to use Float.NaN as illegal flag in many cases. Therefore, we need\na function to check if there is any setX that is using NaN as input.\n\n@param parameterName\nThe name of the user-supplied parameter that we are validating\nso that the user can easily find the error in their code.\n@param data\nA single float data.\n@throws IllegalArgumentException\nif the data includes NaN.", "Copies just the upper or lower triangular portion of a matrix.\n\n@param src Matrix being copied. Not modified.\n@param dst Where just a triangle from src is copied. If null a new one will be created. Modified.\n@param upper If the upper or lower triangle should be copied.\n@return The copied matrix.", "refresh the most recent history entries\n\n@param limit number of entries to populate\n@param offset number of most recent entries to skip\n@return populated history entries\n@throws Exception exception" ]
public static base_response change(nitro_service client, responderhtmlpage resource) throws Exception { responderhtmlpage updateresource = new responderhtmlpage(); updateresource.name = resource.name; return updateresource.perform_operation(client,"update"); }
[ "Use this API to change responderhtmlpage." ]
[ "Returns an English label for a given datatype.\n\n@param datatype\nthe datatype to label\n@return the label", "Return a stream of resources from a response\n\n@param response the response\n@param <R> the resource type\n@param <U> the response type\n@return a stream of resources from the response", "Sets the options contained in the DJCrosstab to the JRDesignCrosstab.\nAlso fits the correct width", "The Baseline Start field shows the planned beginning date for a task at\nthe time you saved a baseline. Information in this field becomes available\nwhen you set a baseline.\n\n@return Date", "Apply the necessary rotation to the transform so that it is in front of\nthe camera. The actual rotation is performed not using the yaw angle but\nusing equivalent quaternion values for better accuracy. But the yaw angle\nis still returned for backward compatibility.\n\n@param widget The transform to modify.\n@return The camera's yaw in degrees.", "Return as a string the stereotypes associated with c\nterminated by the escape character term", "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", "Remove the listener active in this session.\n\n@param listenerId the id of the listener to remove", "Add the set of partitions to the node provided\n\n@param node The node to which we'll add the partitions\n@param donatedPartitions The list of partitions to add\n@return The new node with the new partitions" ]
private void registerChildInternal(IgnoreDomainResourceTypeResource child) { child.setParent(this); children.put(child.getName(), child); }
[ "call with lock on 'children' held" ]
[ "private HttpServletResponse headers;", "get the underlying wrapped connection\n@return OTMConnection raw connection to the OTM.", "Compiles and performs the provided equation.\n\n@param equation String in simple equation format", "Utility function to zip the content of an entire folder, but not the folder itself.\n@param folder\n@param fileName optional\n@return success or not", "Returns list of files matches filters in specified directories\n\n@param directories which will using to find files\n@param fileFilter file filter\n@param dirFilter directory filter\n@return list of files matches filters in specified directories", "Use this API to fetch dnssuffix resource of given name .", "Creates the string mappings.\n\n@param mtasTokenIdFactory\nthe mtas token id factory\n@param level\nthe level\n@param stringValue\nthe string value\n@param offsetStart\nthe offset start\n@param offsetEnd\nthe offset end\n@param position\nthe position\n@throws IOException\nSignals that an I/O exception has occurred.", "Remove all controllers but leave input manager running.\n@return number of controllers removed", "Get the cached entry or null if no valid cached entry is found." ]
public static final Integer getInteger(Locale locale, String key) { ResourceBundle bundle = ResourceBundle.getBundle(LocaleData.class.getName(), locale); return ((Integer) bundle.getObject(key)); }
[ "Convenience method for retrieving an Integer resource.\n\n@param locale locale identifier\n@param key resource key\n@return resource value" ]
[ "Description accessor provided for JSON serialization only.", "Checks the id value.\n\n@param fieldDef The field descriptor\n@param checkLevel The current check level (this constraint is checked in basic and strict)\n@exception ConstraintException If the constraint has been violated", "Pops the top of the stack of active elements if the current position in the call stack corresponds to the one\nthat pushed the active elements.\n\n<p>This method does not do any type checks, so take care to retrieve the elements with the same types used to push\nto them onto the stack.\n\n@param <T> the type of the elements\n\n@return the active elements or null if the current call stack did not push any active elements onto the stack", "Construct new path by replacing file directory part. No\nfiles are actually modified.\n@param file path to move\n@param target new path directory", "Given a cluster and a node id checks if the node exists\n\n@param nodeId The node id to search for\n@return True if cluster contains the node id, else false", "Transforms a length according to the current transformation matrix.", "helper to calculate the navigationBar height\n\n@param context\n@return", "Set the serial end date.\n@param date the serial end date.", "Put a spatial object in the cache and index it.\n\n@param key key for object\n@param object object itself\n@param envelope envelope for object" ]
protected void updateLabelActiveStyle() { if (this.valueBoxBase.getText() != null && !this.valueBoxBase.getText().isEmpty()) { label.addStyleName(CssName.ACTIVE); } else { label.removeStyleName(CssName.ACTIVE); } }
[ "Updates the style of the field label according to the field value if the\nfield value is empty - null or \"\" - removes the label 'active' style else\nwill add the 'active' style to the field label." ]
[ "Sign in a connection to the registry by key.\n\nNote multiple connections can be attached to the same key\n\n@param key\nthe key\n@param connection\nthe websocket connection\n@see #register(String, WebSocketConnection)", "Resamples a trajectory\n@param t Trajectory to resample\n@param n Resample rate\n@return Returns a resampled trajectory which contains every n'th position of t", "Write a time units field to the JSON file.\n\n@param fieldName field name\n@param value field value", "Get the QNames of the port components to be declared\nin the namespaces\n\n@return collection of QNames", "Sign off a group of connections from the registry by key\n\n@param key\nthe key\n@param connections\na collection of websocket connections", "Select which view to display based on the state of the promotion. Will return the form if user selects to perform\npromotion. Progress will be returned if the promotion is currently in progress.", "Accessor method used to retrieve a Boolean object representing the\ncontents of an individual field. If the field does not exist in the\nrecord, null is returned.\n\n@param field the index number of the field to be retrieved\n@return the value of the required field", "Creates an appropriate HSGE for a domain-wide resource of a type that is mappable to server groups", "Create the service name for a channel\n\n@param channelName\nthe channel name\n@return the service name" ]
public String genId() { S.Buffer sb = S.newBuffer(); sb.a(longEncoder.longToStr(nodeIdProvider.nodeId())) .a(longEncoder.longToStr(startIdProvider.startId())) .a(longEncoder.longToStr(sequenceProvider.seqId())); return sb.toString(); }
[ "Generate a unique ID across the cluster\n@return generated ID" ]
[ "Performs MAC signing of the SMB. This is done as follows.\nThe signature field of the SMB is overwritted with the sequence number;\nThe MD5 digest of the MAC signing key + the entire SMB is taken;\nThe first 8 bytes of this are placed in the signature field.\n\n@param data The data.\n@param offset The starting offset at which the SMB header begins.\n@param length The length of the SMB data starting at offset.", "Use the jgrapht cycle checker to detect any cycles in the provided dependency graph.", "Returns an array of non-empty ids from the given list of ids or values.\n\n@param idsOrValues\nlist of ids and/or values\n@return array of non-empty ids", "Joins with another IPv4 segment to produce a IPv6 segment.\n\n@param creator\n@param low\n@return", "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", "Starts this EventStream and begins long polling the API.\n@throws IllegalStateException if the EventStream is already started.", "Get the Roman Numeral of the current value\n@return", "Check that the scope type is allowed by the stereotypes on the bean and\nthe bean type", "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" ]
public IOrientationState getOrientationStateFromParam(int orientation) { switch (orientation) { case Orientation.ORIENTATION_HORIZONTAL_BOTTOM: return new OrientationStateHorizontalBottom(); case Orientation.ORIENTATION_HORIZONTAL_TOP: return new OrientationStateHorizontalTop(); case Orientation.ORIENTATION_VERTICAL_LEFT: return new OrientationStateVerticalLeft(); case Orientation.ORIENTATION_VERTICAL_RIGHT: return new OrientationStateVerticalRight(); default: return new OrientationStateHorizontalBottom(); } }
[ "orientation state factory method" ]
[ "Stop announcing ourselves and listening for status updates.", "Create a ModelNode representing the operating system the instance is running on.\n\n@return a ModelNode representing the operating system the instance is running on.\n@throws OperationFailedException", "Creates an operations that targets the valiadating handler.\n\n@param operationToValidate the operation that this handler will validate\n@return the validation operation", "Wrap getOperationStatus to avoid throwing exception over JMX", "Checks to see if either the diagonal element or off diagonal element is zero. If one is\nthen it performs a split or pushes it off the matrix.\n\n@return True if there was a zero.", "Determines whether or not two axially aligned bounding boxes in\nthe same coordinate space intersect.\n@param bv1 first bounding volume to test.\n@param bv2 second bounding volume to test.\n@return true if the boxes intersect, false if not.", "This method retrieves a double value from a String instance.\nIt returns zero by default if a null value or an empty string is supplied.\n\n@param value string representation of a double\n@return double value", "Set the permission for who may view the geo data associated with a photo.\n\nThis method requires authentication with 'write' permission.\n\n@param photoId\nThe id of the photo to set permissions for.\n@param perms\nPermissions, who can see the geo data of this photo\n@throws FlickrException", "read CustomInfo list from table.\n\n@param eventId the event id\n@return the map" ]
private JSONArray datesToJson(Collection<Date> individualDates) { if (null != individualDates) { JSONArray result = new JSONArray(); for (Date d : individualDates) { result.put(dateToJson(d)); } return result; } return null; }
[ "Converts a list of dates to a Json array with the long representation of the dates as strings.\n@param individualDates the list to convert.\n@return Json array with long values of dates as string" ]
[ "Remove attachments matches pattern from step and all step substeps\n\n@param context from which attachments will be removed", "Get the minutes difference", "Entry point with no system exit", "Removes trailing and leading whitespace, and also reduces each\nsequence of internal whitespace to a single space.", "Retrieve row from a nested table.\n\n@param name column name\n@return nested table rows", "Mark root of this task task group depends on the given TaskItem.\nThis ensure this task group's root get picked for execution only after the completion\nof invocation of provided TaskItem.\n\n@param dependencyTaskItem the task item that this task group depends on\n@return the key of the dependency", "Abort the daemon\n\n@param error the error causing the abortion", "Get the layer ID out of the request URL.\n\n@param request servlet request\n@return layer id", "Use this API to fetch all the appflowpolicylabel resources that are configured on netscaler." ]
@Nullable @SuppressWarnings("unchecked") protected <T extends JavaElement> ActiveElements<T> popIfActive() { return (ActiveElements<T>) (!activations.isEmpty() && activations.peek().depth == depth ? activations.pop() : null); }
[ "Pops the top of the stack of active elements if the current position in the call stack corresponds to the one\nthat pushed the active elements.\n\n<p>This method does not do any type checks, so take care to retrieve the elements with the same types used to push\nto them onto the stack.\n\n@param <T> the type of the elements\n\n@return the active elements or null if the current call stack did not push any active elements onto the stack" ]
[ "Adds the specified list of users as members of the project. Returns the updated project record.\n\n@param project The project to add members to.\n@return Request object", "Sets the access token to use when authenticating a client.", "Select a List of characters from a CharSequence using a Collection\nto identify the indices to be selected.\n\n@param self a CharSequence\n@param indices a Collection of indices\n@return a String consisting of the characters at the given indices\n@since 1.0", "Returns true if the provided matrix is has a value of 1 along the diagonal\nelements and zero along all the other elements.\n\n@param a Matrix being inspected.\n@param tol How close to zero or one each element needs to be.\n@return If it is within tolerance to an identity matrix.", "Ask the specified player for the album art in the specified slot with the specified rekordbox ID,\nusing cached media instead if it is available, and possibly giving up if we are in passive mode.\n\n@param artReference uniquely identifies the desired album art\n@param trackType the kind of track that owns the art\n@param failIfPassive will prevent the request from taking place if we are in passive mode, so that automatic\nartwork updates will use available caches only\n\n@return the album art found, if any", "If there are any observer methods, they must be static or business\nmethods.", "Returns the counters with keys as the first key and count as the\ntotal count of the inner counter for that key\n\n@return counter of type K1", "Set the week of the month the events should occur.\n@param weekOfMonth the week of month to set (first to fifth, where fifth means last).", "Creates a real valued diagonal matrix of the specified type" ]
public <T> Method getSetMethod(final Object object, final String fieldName, final Class<?> argumentType) { if( object == null ) { throw new NullPointerException("object should not be null"); } else if( fieldName == null ) { throw new NullPointerException("fieldName should not be null"); } else if( argumentType == null ) { throw new NullPointerException("argumentType should not be null"); } Method method = setMethodsCache.get(object.getClass(), argumentType, fieldName); if( method == null ) { method = ReflectionUtils.findSetter(object, fieldName, argumentType); setMethodsCache.set(object.getClass(), argumentType, fieldName, method); } return method; }
[ "Returns the setter method for the field on an object.\n\n@param object\nthe object\n@param fieldName\nthe field name\n@param argumentType\nthe type to be passed to the setter\n@param <T>\nthe object type\n@return the setter method associated with the field on the object\n@throws NullPointerException\nif object, fieldName or fieldType is null\n@throws SuperCsvReflectionException\nif the setter doesn't exist or is not visible" ]
[ "Specify the output format of the image.\n\n@see ImageFormat", "Parse a list of Photos from given Element.\n\n@param photosElement\n@return PhotoList", "Extract task data.", "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", "This is the profiles page. this is the 'regular' page when the url is typed in", "Create a ModelNode representing the operating system the instance is running on.\n\n@return a ModelNode representing the operating system the instance is running on.\n@throws OperationFailedException", "Generates a column for the given field and adds it to the table.\n\n@param fieldDef The field\n@param tableDef The table\n@return The column def", "Use this API to fetch nsrpcnode resources of given names .", "This continuously tries to reconnect in a separate thread and will only stop if the connection was established\nsuccessfully or the server gets shutdown. If there is currently a reconnect task active the connection paramaters\nand callback will get updated.\n\n@param reconnectUri the updated connection uri\n@param authKey the updated authentication key\n@param callback the current callback" ]
private static String normalizeDirName(String name) { if(name == null) return null; return name.toLowerCase().replaceAll("[^a-zA-Z0-9]", "-"); }
[ "Normalizes the name so it can be used as Maven artifactId or groupId." ]
[ "Retrieve the version number", "Clones the given reference.\n\n@param refDef The reference descriptor\n@param prefix A prefix for the name\n@return The cloned reference", "returns null if no device is found.", "See convertToSQL92.\n\n@return SQL like sub-expression\n@throws IllegalArgumentException oops", "note that for read from file, this will just load all to memory. not fit\nif need to read a very large file. However for getting the host name.\nnormally it is fine.\n\nfor reading large file, should use iostream.\n\n@param sourcePath\nthe source path\n@param sourceType\nthe source type\n@return the content from path\n@throws IOException\nSignals that an I/O exception has occurred.", "Unpause the server, allowing it to resume normal operations", "Uploads a new large file.\n@param boxApi the API connection to be used by the upload session.\n@param folderId the id of the folder in which the file will be uploaded.\n@param stream the input stream that feeds the content of the file.\n@param url the upload session URL.\n@param fileName the name of the file to be created.\n@param fileSize the total size of the file.\n@return the created file instance.\n@throws InterruptedException when a thread gets interupted.\n@throws IOException when reading a stream throws exception.", "Converts a TimeUnit instance to an integer value suitable for\nwriting to an MPX file.\n\n@param recurrence RecurringTask instance\n@return integer value", "Create a Count-Query for QueryByCriteria" ]
public static int writeVint(byte[] dest, int offset, int i) { if (i >= -112 && i <= 127) { dest[offset++] = (byte) i; } else { int len = -112; if (i < 0) { i ^= -1L; // take one's complement' len = -120; } long tmp = i; while (tmp != 0) { tmp = tmp >> 8; len--; } dest[offset++] = (byte) len; len = (len < -120) ? -(len + 120) : -(len + 112); for (int idx = len; idx != 0; idx--) { int shiftbits = (idx - 1) * 8; long mask = 0xFFL << shiftbits; dest[offset++] = (byte) ((i & mask) >> shiftbits); } } return offset; }
[ "Writes a vInt directly to a byte array\n\n@param dest The destination array for the vInt to be written to\n@param offset The location where to write the vInt to\n@param i The Value being written into byte array\n@return Returns the new offset location" ]
[ "Used to determine if multiple cost rates apply to this assignment.\n\n@return true if multiple cost rates apply to this assignment", "This function returns the first external IP address encountered\n\n@return IP address or null\n@throws Exception", "Initialize the local plugins registry\n@param context the servlet context necessary to grab\nthe files inside the servlet.\n@return the set of local plugins organized by name", "Matches an array value if it contains all the elements of the argument array\n@param rhs The arguments\n@return PredicateExpression: $all rhs", "Apply the remote domain model to the local host controller.\n\n@param bootOperations the result of the remote read-domain-model op\n@return {@code true} if the model was applied successfully, {@code false} otherwise", "Use this API to unset the properties of nslimitselector resource.\nProperties that need to be unset are specified in args array.", "Suite end.", "Use this API to delete nssimpleacl.", "Cleans up the given group and adds it to the list of groups if still valid\n@param group\n@param groups" ]
protected void addFreeConnection(ConnectionHandle connectionHandle) throws SQLException{ connectionHandle.setOriginatingPartition(this); // assume success to avoid racing where we insert an item in a queue and having that item immediately // taken and closed off thus decrementing the created connection count. updateCreatedConnections(1); if (!this.disableTracking){ trackConnectionFinalizer(connectionHandle); } // the instant the following line is executed, consumers can start making use of this // connection. if (!this.freeConnections.offer(connectionHandle)){ // we failed. rollback. updateCreatedConnections(-1); // compensate our createdConnection count. if (!this.disableTracking){ this.pool.getFinalizableRefs().remove(connectionHandle.getInternalConnection()); } // terminate the internal handle. connectionHandle.internalClose(); } }
[ "Adds a free connection.\n\n@param connectionHandle\n@throws SQLException on error" ]
[ "Returns the full record for the given webhook.\n\n@param webhook The webhook to get.\n@return Request object", "Returns script view\n\n@param model\n@return\n@throws Exception", "For missing objects associated by one-to-one with another object in the\nresult set, register the fact that the object is missing with the\nsession.\n\ncopied form Loader#registerNonExists", "Use this API to add lbroute.", "Returns the local collection representing the given namespace.\n\n@param namespace the namespace referring to the local collection.\n@param resultClass the {@link Class} that represents documents in the collection.\n@param <T> the type documents in the collection.\n@return the local collection representing the given namespace.", "Bessel function of the second kind, of order 1.\n\n@param x Value.\n@return Y value.", "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", "Prepares a representation of the model that is easier accessible for our purposes.\n\n@param model The original model\n@return The model representation", "Release the connection back to the pool.\n\n@throws SQLException Never really thrown" ]
public Set<Class> entityClasses() { EntityMetaInfoRepo repo = app().entityMetaInfoRepo().forDb(id); return null == repo ? C.<Class>set() : repo.entityClasses(); }
[ "Returns all model classes registered on this datasource\n\n@return model classes talk to this datasource" ]
[ "Registers a new user with the given email and password.\n\n@param email the email to register with. This will be the username used during log in.\n@param password the password to associated with the email. The password must be between\n6 and 128 characters long.\n@return A {@link Task} that completes when registration completes/fails.", "Checks whether a user account can be locked because of inactivity.\n\n@param cms the CMS context\n@param user the user to check\n@return true if the user may be locked after being inactive for too long", "Return a long value from a prepared query.", "Sets the provided filters.\n@param filters a map \"column id -> filter\".", "Adds an HTTP header to this request.\n@param key the header key.\n@param value the header value.", "Creates a \"delta clone\" of this Map, where only the differences are\nrepresented.", "Append Join for SQL92 Syntax", "Creates a new ServerDetails object for resolver, this will take URL and name from the deployer ServerDetails as a default behaviour", "Use this API to fetch cacheselector resource of given name ." ]
public void propagateIfCancelException(final Throwable t) { final RuntimeException cancelException = this.getPlatformOperationCanceledException(t); if ((cancelException != null)) { throw cancelException; } }
[ "Rethrows platform specific OperationCanceledExceptions and unwraps OperationCanceledErrors. Does nothing for any other type of Throwable." ]
[ "Make a comparison where the operator is specified by the caller. It is up to the caller to specify an appropriate\noperator for the database and that it be formatted correctly.", "Add tasks to the tree.\n\n@param parentNode parent tree node\n@param parent parent task container", "Returns the complete tag record for a single tag.\n\n@param tag The tag to get.\n@return Request object", "Performs backward pass of Batch Normalization layer. Returns x gradient,\nbnScale gradient and bnBias gradient", "Publish the bundle resources directly.", "Blocking function which completes the migration of one store\n\n@param storeName The name of the store\n@param adminClient Admin client used to initiate the copying of data\n@param stealInfo The steal information\n@param isReadOnlyStore Boolean indicating that this is a read-only store", "Extract definition records from the table and divide into groups.", "Updates the value in HashMap and writeBack as Atomic step", "Gets a legend graphic with the specified metadata parameters. All parameters are passed as request parameters.\n\n@param layerId\nthe layer id\n@param styleName\nthe style name\n@param ruleIndex\nthe rule index\n@param format\nthe image format ('png','jpg','gif')\n@param width\nthe graphic's width\n@param height\nthe graphic's height\n@param scale\nthe scale denominator (not supported yet)\n@param allRules\nif true the image will contain all rules stacked vertically\n@param request\nthe servlet request object\n@return the model and view\n@throws GeomajasException\nwhen a style or rule does not exist or is not renderable" ]
public static double Y(double x) { if (x < 8.0) { double y = x * x; double ans1 = x * (-0.4900604943e13 + y * (0.1275274390e13 + y * (-0.5153438139e11 + y * (0.7349264551e9 + y * (-0.4237922726e7 + y * 0.8511937935e4))))); double ans2 = 0.2499580570e14 + y * (0.4244419664e12 + y * (0.3733650367e10 + y * (0.2245904002e8 + y * (0.1020426050e6 + y * (0.3549632885e3 + y))))); return (ans1 / ans2) + 0.636619772 * (J(x) * Math.log(x) - 1.0 / x); } else { double z = 8.0 / x; double y = z * z; double xx = x - 2.356194491; double ans1 = 1.0 + y * (0.183105e-2 + y * (-0.3516396496e-4 + y * (0.2457520174e-5 + y * (-0.240337019e-6)))); double ans2 = 0.04687499995 + y * (-0.2002690873e-3 + y * (0.8449199096e-5 + y * (-0.88228987e-6 + y * 0.105787412e-6))); return Math.sqrt(0.636619772 / x) * (Math.sin(xx) * ans1 + z * Math.cos(xx) * ans2); } }
[ "Bessel function of the second kind, of order 1.\n\n@param x Value.\n@return Y value." ]
[ "Old SOAP client uses new SOAP service", "Calculate a shift value that can be used to create a power-of-two value between\nthe specified maximum and minimum values.\n@param minimumValue the minimum value\n@param maximumValue the maximum value\n@return the calculated shift (use {@code 1 << shift} to obtain a value)", "Adds a listener to this collection.\n\n@param listener The listener to add", "Use this API to add inat.", "Initialize the container for the current application deployment\n\n@param deploymentManager\n@param deploymentServices", "Replaces sequences of whitespaces with tabs within a line.\n\n@param self A line to unexpand\n@param tabStop The number of spaces a tab represents\n@return an unexpanded String\n@since 1.8.2", "Whether the rows of the given association should be stored in a hash using the single row key column as key or\nnot.", "Set the order in which sets are returned for the user.\n\nThis method requires authentication with 'write' permission.\n\n@param photosetIds\nAn array of Ids\n@throws FlickrException", "Sets the time warp.\n\n@param l the new time warp" ]
public long findPosition(long nOccurrence) { updateCount(); if (nOccurrence <= 0) { return RankedBitVector.NOT_FOUND; } int findPos = (int) (nOccurrence / this.blockSize); if (findPos < this.positionArray.length) { long pos0 = this.positionArray[findPos]; long leftOccurrences = nOccurrence - (findPos * this.blockSize); if (leftOccurrences == 0) { return pos0; } for (long index = pos0 + 1; index < this.bitVector.size(); index++) { if (this.bitVector.getBit(index) == this.bit) { leftOccurrences--; } if (leftOccurrences == 0) { return index; } } } return RankedBitVector.NOT_FOUND; }
[ "Returns the position for a given number of occurrences or NOT_FOUND if\nthis value is not found.\n\n@param nOccurrence\nnumber of occurrences\n@return the position for a given number of occurrences or NOT_FOUND if\nthis value is not found" ]
[ "Runs the print.\n\n@param args the cli arguments\n@throws Exception", "Gets the JVM memory usage.\n\n@return the JVM memory usage", "Creates a new subtask and adds it to the parent task. Returns the full record\nfor the newly created subtask.\n\n@param task The task to add a subtask to.\n@return Request object", "The primary run loop of the kqueue event processor.", "Use this API to fetch all the cmppolicylabel resources that are configured on netscaler.", "Parses the input stream to read the header\n\n@param input data input to read from\n@return the parsed protocol header\n@throws IOException", "Scales the brightness of a pixel.", "Adds the offset.\n\n@param start the start\n@param end the end", "Copies a classworlds file to a temporary location either on the local filesystem or on a slave depending on the\nnode type.\n\n@return The path of the classworlds.conf file" ]
void buildControl(BinaryPackageControlFile packageControlFile, File[] controlFiles, List<String> conffiles, StringBuilder checksums, File output) throws IOException, ParseException { final File dir = output.getParentFile(); if (dir != null && (!dir.exists() || !dir.isDirectory())) { throw new IOException("Cannot write control file at '" + output.getAbsolutePath() + "'"); } final TarArchiveOutputStream outputStream = new TarArchiveOutputStream(new GZIPOutputStream(new FileOutputStream(output))); outputStream.setLongFileMode(TarArchiveOutputStream.LONGFILE_GNU); boolean foundConffiles = false; // create the final package control file out of the "control" file, copy all other files, ignore the directories for (File file : controlFiles) { if (file.isDirectory()) { // warn about the misplaced directory, except for directories ignored by default (.svn, cvs, etc) if (!isDefaultExcludes(file)) { console.warn("Found directory '" + file + "' in the control directory. Maybe you are pointing to wrong dir?"); } continue; } if ("conffiles".equals(file.getName())) { foundConffiles = true; } if (CONFIGURATION_FILENAMES.contains(file.getName()) || MAINTAINER_SCRIPTS.contains(file.getName())) { FilteredFile configurationFile = new FilteredFile(new FileInputStream(file), resolver); configurationFile.setOpenToken(openReplaceToken); configurationFile.setCloseToken(closeReplaceToken); addControlEntry(file.getName(), configurationFile.toString(), outputStream); } else if (!"control".equals(file.getName())) { // initialize the information stream to guess the type of the file InformationInputStream infoStream = new InformationInputStream(new FileInputStream(file)); Utils.copy(infoStream, NullOutputStream.NULL_OUTPUT_STREAM); infoStream.close(); // fix line endings for shell scripts InputStream in = new FileInputStream(file); if (infoStream.isShell() && !infoStream.hasUnixLineEndings()) { byte[] buf = Utils.toUnixLineEndings(in); in = new ByteArrayInputStream(buf); } addControlEntry(file.getName(), IOUtils.toString(in), outputStream); in.close(); } } if (foundConffiles) { console.info("Found file 'conffiles' in the control directory. Skipping conffiles generation."); } else if ((conffiles != null) && (conffiles.size() > 0)) { addControlEntry("conffiles", createPackageConffilesFile(conffiles), outputStream); } else { console.info("Skipping 'conffiles' generation. No entries defined in maven/pom or ant/build.xml."); } if (packageControlFile == null) { throw new FileNotFoundException("No 'control' file found in " + controlFiles.toString()); } addControlEntry("control", packageControlFile.toString(), outputStream); addControlEntry("md5sums", checksums.toString(), outputStream); outputStream.close(); }
[ "Build control archive of the deb\n\n@param packageControlFile the package control file\n@param controlFiles the other control information files (maintainer scripts, etc)\n@param dataSize the size of the installed package\n@param checksums the md5 checksums of the files in the data archive\n@param output\n@return\n@throws java.io.FileNotFoundException\n@throws java.io.IOException\n@throws java.text.ParseException" ]
[ "Return all objects for the given class.", "Shifts are performed based upon singular values computed previously. If it does not converge\nusing one of those singular values it uses a Wilkinson shift instead.", "Delete all backups asynchronously", "Gets the property and casts to the appropriate type\n\n@param <T>\n@param key The property name\n@param type The property type\n@return The value of the property", "Look up a shaper by a short String name.\n\n@param name Shaper name. Known names have patterns along the lines of:\ndan[12](bio)?(UseLC)?, jenny1(useLC)?, chris[1234](useLC)?.\n@return An integer constant for the shaper", "Used to create a new retention policy with optional parameters.\n@param api the API connection to be used by the created user.\n@param name the name of the retention policy.\n@param type the type of the retention policy. Can be \"finite\" or \"indefinite\".\n@param length the duration in days that the retention policy will be active for after being assigned to content.\n@param action the disposition action can be \"permanently_delete\" or \"remove_retention\".\n@param optionalParams the optional parameters.\n@return the created retention policy's info.", "Returns the input to parse including the whitespace left to the cursor position since\nit may be relevant to the list of proposals for whitespace sensitive languages.", "Returns the name from the inverse side if the given property de-notes a one-to-one association.", "Split a span into two by adding a knot in the middle.\n@param n the span index" ]
private void logColumn(FastTrackColumn column) { if (m_log != null) { m_log.println("TABLE: " + m_currentTable.getType()); m_log.println(column.toString()); m_log.flush(); } }
[ "Log column data.\n\n@param column column data" ]
[ "Create the function. Be sure to handle all possible input types and combinations correctly and provide\nmeaningful error messages. The output matrix should be resized to fit the inputs.", "Compute the CRC32 of the segment of the byte array given by the\nspecificed size and offset\n\n@param bytes The bytes to checksum\n@param offset the offset at which to begin checksumming\n@param size the number of bytes to checksum\n@return The CRC32", "Check if the the nodeId is present in the cluster managed by the metadata store\nor throw an exception.\n\n@param nodeId The nodeId to check existence of", "Extracts the nullity of a matrix using a preexisting decomposition.\n\n@see #singularThreshold(SingularValueDecomposition_F64)\n\n@param svd A precomputed decomposition. Not modified.\n@param threshold Tolerance used to determine of a singular value is singular.\n@return The nullity of the decomposed matrix.", "Check whether error handling works. If it works, you should see an\nok, otherwise, you might see the actual error message and then\nthe program exits.", "returns a sorted array of enum constants", "Returns the count of all inbox messages for the user\n@return int - count of all inbox messages", "Loads a CRF classifier from a filepath, and returns it.\n\n@param file\nFile to load classifier from\n@return The CRF classifier\n\n@throws IOException\nIf there are problems accessing the input stream\n@throws ClassCastException\nIf there are problems interpreting the serialized data\n@throws ClassNotFoundException\nIf there are problems interpreting the serialized data", "Record the duration of a put operation, along with the size of the values\nreturned." ]
public static final void setBounds(UIObject o, Rect bounds) { setPosition(o, bounds); setSize(o, bounds); }
[ "Sets the bounds of a UIObject, moving and sizing to match the\nbounds specified. Currently used for the itemhover and useful\nfor other absolutely positioned elements." ]
[ "Adds an artifact to the module.\n\n<P>\nINFO: If the module is promoted, all added artifacts will be promoted.\n\n@param artifact Artifact", "Alternative entry point allowing an MPP file to be read from\na user-supplied POI file stream.\n\n@param fs POI file stream\n@return ProjectFile instance\n@throws MPXJException", "Parser for actual conditions\n\n@param feed\n@return", "Create a KnowledgeBuilderConfiguration on which properties can be set. Use\nthe given properties file and ClassLoader - either of which can be null.\n@return\nThe KnowledgeBuilderConfiguration.", "Calculates the radius to a given boundedness value\n@param D Diffusion coefficient\n@param N Number of steps\n@param timelag Timelag\n@param B Boundedeness\n@return Confinement radius", "Bessel function of the first kind, of order n.\n\n@param n Order.\n@param x Value.\n@return I value.", "Warning emitter. Uses whatever alternative non-event communication channel is.", "Handles Multi Channel Encapsulation message. Decapsulates\nan Application Command message and handles it using the right\nendpoint.\n@param serialMessage the serial message to process.\n@param offset the offset at which to start procesing.", "Determine the enum value corresponding to the first play state found in the packet.\n\n@return the proper value" ]
public synchronized void stop () { if (isRunning()) { MetadataFinder.getInstance().removeTrackMetadataListener(metadataListener); WaveformFinder.getInstance().removeWaveformListener(waveformListener); BeatGridFinder.getInstance().removeBeatGridListener(beatGridListener); running.set(false); pendingUpdates.clear(); queueHandler.interrupt(); queueHandler = null; // Report the loss of our signatures, on the proper thread, outside our lock final Set<Integer> dyingSignatures = new HashSet<Integer>(signatures.keySet()); signatures.clear(); SwingUtilities.invokeLater(new Runnable() { @Override public void run() { for (Integer player : dyingSignatures) { deliverSignatureUpdate(player, null); } } }); } deliverLifecycleAnnouncement(logger, false); }
[ "Stop finding signatures for all active players." ]
[ "Adds all rows from the file specified, using the provided parser.\n\n@param file File to read the data from.\n@param fileParser Parser to be used to parse the file.\n@return {@code this}", "Convert an Object of type Class to an Object.", "Use this API to clear gslbldnsentries.", "Perform the given work with a Jedis connection from the given pool.\n\n@param pool the resource pool\n@param work the work to perform\n@param <V> the result type\n@return the result of the given work\n@throws Exception if something went wrong", "Gets an item that was shared with a password-protected shared link.\n@param api the API connection to be used by the shared item.\n@param sharedLink the shared link to the item.\n@param password the password for the shared link.\n@return info about the shared item.", "Build the crosstab. Throws LayoutException if anything is wrong\n@return", "The keywords to include in the PDF metadata.\n\n@param keywords the keywords of the PDF.", "Checks if the specified latitude is correct.\n\n@param name the name of the latitude field\n@param latitude the value of the latitude field\n@return the latitude", "Read a block of data from the FastTrack file and determine if\nit contains a table definition, or columns.\n\n@param blockIndex index of the current block\n@param startIndex start index of the block in the file\n@param blockLength block length" ]
public int getCurrentPage() { int currentPage = 1; int count = mScrollable.getScrollingItemsCount(); if (mSupportScrollByPage && mCurrentItemIndex >= 0 && mCurrentItemIndex < count) { currentPage = (Math.min(mCurrentItemIndex + mPageSize - 1, count - 1)/mPageSize); } return currentPage; }
[ "Gets the current page\n@return" ]
[ "This method retrieves a double value from a String instance.\nIt returns zero by default if a null value or an empty string is supplied.\n\n@param value string representation of a double\n@return double value", "Logout the current session. After calling this method,\nthe session will be cleared", "Updates the font table by adding new fonts used at the current page.", "returns the values of the orientation tag", "Create a new entry in the database from an object.", "End a \"track;\" that is, return to logging at one level shallower.\n@param title A title that should match the beginning of this track.", "Get the auth URL, this is step two of authorization.\n\n@param oAuthRequestToken\nthe token from a {@link AuthInterface#getRequestToken} call.", "Loads the data from the database. Override this method if the objects\nshall be loaded in a specific way.\n\n@return The loaded data", "Retrieves the time at which work finishes on the given date, or returns\nnull if this is a non-working day.\n\n@param date Date instance\n@return finish time, or null for non-working day" ]
protected void beforeLoading() { if (_listeners != null) { CollectionProxyListener listener; if (_perThreadDescriptorsEnabled) { loadProfileIfNeeded(); } for (int idx = _listeners.size() - 1; idx >= 0; idx--) { listener = (CollectionProxyListener)_listeners.get(idx); listener.beforeLoading(this); } } }
[ "Notifies all listeners that the data is about to be loaded." ]
[ "If task completed success or failure from response.\n\n@param myResponse\nthe my response\n@return true, if successful", "Invoke an HTTP GET request on a remote host. You must close the InputStream after you are done with.\n\n@param path The request path\n@param parameters The parameters (collection of Parameter objects)\n@return The Response", "Use this API to add dbdbprofile resources.", "Calls the stored procedure stored procedure throws an\nerror if it doesn't exist.\n@param broker\n@param cld\n@param sequenceName\n@return\n@throws LookupException\n@throws SQLException", "Add an appliable dependency for this task item.\n\n@param appliable the appliable dependency.\n@return the key to be used as parameter to taskResult(string) method to retrieve updated dependency", "get the real data without message header\n@return message data(without header)", "Find out the scrollable child view from a ViewGroup.\n\n@param viewGroup", "Check if the print has not been asked to stop taking new jobs.\n\n@return true if it's OK to take new jobs.", "Called when a previously created loader has finished its load.\n\n@param loader The Loader that has finished.\n@param data The data generated by the Loader." ]
public static <T> List<List<T>> getNGrams(List<T> items, int minSize, int maxSize) { List<List<T>> ngrams = new ArrayList<List<T>>(); int listSize = items.size(); for (int i = 0; i < listSize; ++i) { for (int ngramSize = minSize; ngramSize <= maxSize; ++ngramSize) { if (i + ngramSize <= listSize) { List<T> ngram = new ArrayList<T>(); for (int j = i; j < i + ngramSize; ++j) { ngram.add(items.get(j)); } ngrams.add(ngram); } } } return ngrams; }
[ "Get all sub-lists of the given list of the given sizes.\n\nFor example:\n\n<pre>\nList&lt;String&gt; items = Arrays.asList(&quot;a&quot;, &quot;b&quot;, &quot;c&quot;, &quot;d&quot;);\nSystem.out.println(CollectionUtils.getNGrams(items, 1, 2));\n</pre>\n\nwould print out:\n\n<pre>\n[[a], [a, b], [b], [b, c], [c], [c, d], [d]]\n</pre>\n\n@param <T>\nThe type of items contained in the list.\n@param items\nThe list of items.\n@param minSize\nThe minimum size of an ngram.\n@param maxSize\nThe maximum size of an ngram.\n@return All sub-lists of the given sizes." ]
[ "Remove a key for all language versions. If a descriptor is present, the key is only removed in the descriptor.\n\n@param key the key to remove.\n@return <code>true</code> if removing was successful, <code>false</code> otherwise.", "Start the StatsD reporter, if configured.\n\n@throws URISyntaxException", "Retrieve the next page and store the continuation token, the new data, and any IOException that may occur.\n\nNote that it is safe to pass null values to {@link CollectionRequest#query(String, Object)}. Method\n{@link com.asana.Client#request(com.asana.requests.Request)} will not include such options.", "Calculate the highlight color. Saturate at 0xff to make sure that high values\ndon't result in aliasing.\n\n@param _Slice The Slice which will be highlighted.", "Use this API to fetch all the appfwlearningsettings resources that are configured on netscaler.", "Initialization that parses the String to a JSON object.\n@param configString The JSON as string.\n@param baseConfig The optional basic search configuration to overwrite (partly) by the JSON configuration.\n@throws JSONException thrown if parsing fails.", "returns the total count of objects in the GeneralizedCounter.", "Lift a Java Func2 to a Scala Function2\n\n@param f the function to lift\n\n@returns the Scala function", "End building the script, adding a return value statement\n@param config the configuration for the script to build\n@param value the value to return\n@return the new {@link LuaScript} instance" ]
public static <K, V> void operator_remove(Map<K, V> map, Iterable<? super K> keysToRemove) { for (final Object key : keysToRemove) { map.remove(key); } }
[ "Remove pairs with the given keys from the map.\n\n@param <K> type of the map keys.\n@param <V> type of the map values.\n@param map the map to update.\n@param keysToRemove the keys of the pairs to remove.\n@since 2.15" ]
[ "Sets the position of a UIObject", "This method is used to change the credentials of CleverTap account Id, token and region programmatically\n@param accountID CleverTap Account Id\n@param token CleverTap Account Token\n@param region Clever Tap Account Region", "Resolve Java control character sequences to the actual character value.\nOptionally handle unicode escape sequences, too.", "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", "generate a message for loglevel ERROR\n\n@param pObject the message Object", "Use this API to fetch a responderglobal_responderpolicy_binding resources.", "Return the releaseId\n\n@return releaseId", "Add a new download. The download will start automatically once the download manager is\nready to execute it and connectivity is available.\n\n@param request the parameters specifying this download\n@return an ID for the download, unique across the application. This ID is used to make future\ncalls related to this download.\n@throws IllegalArgumentException", "Mark the given TaskItem depends on this taskGroup.\n\n@param dependentTaskItem the task item that depends on this task group\n@return key to be used as parameter to taskResult(string) method to retrieve result of\ninvocation of given task item." ]
public static void executeCommand(String[] args) throws IOException { OptionParser parser = getParser(); String url = null; Boolean confirm = false; // parse command-line input OptionSet options = parser.parse(args); if(options.has(AdminParserUtils.OPT_HELP)) { printHelp(System.out); return; } AdminParserUtils.checkRequired(options, AdminParserUtils.OPT_URL); url = (String) options.valueOf(AdminParserUtils.OPT_URL); if(options.has(AdminParserUtils.OPT_CONFIRM)) { confirm = true; } // print summary System.out.println("Synchronize metadata versions across all nodes"); System.out.println("Location:"); System.out.println(" bootstrap url = " + url); System.out.println(" node = all nodes"); AdminClient adminClient = AdminToolUtils.getAdminClient(url); AdminToolUtils.assertServerNotInRebalancingState(adminClient); Versioned<Properties> versionedProps = mergeAllVersions(adminClient); printVersions(versionedProps); // execute command if(!AdminToolUtils.askConfirm(confirm, "do you want to synchronize metadata versions to all node")) return; adminClient.metadataMgmtOps.setMetadataVersion(versionedProps); }
[ "Parses command-line and synchronizes metadata versions across all\nnodes.\n\n@param args Command-line input\n@param printHelp Tells whether to print help only or execute command\nactually\n@throws IOException" ]
[ "Stop finding waveforms for all active players.", "Use this API to fetch appfwprofile_csrftag_binding resources of given name .", "Sets the scale value in pixel per map unit.\n\n@param pixelPerUnit\nthe scale value (pix/map unit)", "Returns with a view of all scopes known by this manager.", "Constructs a string representing this address according to the given parameters\n\n@param keepMixed if this address was constructed from a string with mixed representation (a:b:c:d:e:f:1.2.3.4), whether to keep it that way (ignored if makeMixed is true in the params argument)\n@param params the parameters for the address string", "Method to build Integration flow for IMAP Idle configuration.\n@param urlName Mail source URL.\n@return Integration Flow object IMAP IDLE.", "Saves messages to a propertyvfsbundle file.\n\n@throws CmsException thrown if writing to the file fails.", "Provides an object that can build SQL clauses to match this string representation.\n\nThis method can be overridden for other IP address types to match in their own ways.\n\n@param isEntireAddress\n@param translator\n@return", "Execute push docker image on agent\n\n@param launcher\n@param log\n@param imageTag\n@param username\n@param password\n@param host @return\n@throws IOException\n@throws InterruptedException" ]
public boolean shouldIncrementVersionBasedOnResources(CmsObject cms) throws CmsException { if (m_checkpointTime == 0) { return true; } // adjust the site root, if necessary CmsObject cmsClone = adjustSiteRootIfNecessary(cms, this); // calculate the module resources List<CmsResource> moduleResources = calculateModuleResources(cmsClone, this); for (CmsResource resource : moduleResources) { try { List<CmsResource> resourcesToCheck = Lists.newArrayList(); resourcesToCheck.add(resource); if (resource.isFolder()) { resourcesToCheck.addAll(cms.readResources(resource, CmsResourceFilter.IGNORE_EXPIRATION, true)); } for (CmsResource resourceToCheck : resourcesToCheck) { if (resourceToCheck.getDateLastModified() > m_checkpointTime) { return true; } } } catch (CmsException e) { LOG.warn(e.getLocalizedMessage(), e); continue; } } return false; }
[ "Determines if the version should be incremented based on the module resources' modification dates.\n\n@param cms the CMS context\n@return true if the version number should be incremented\n\n@throws CmsException if something goes wrong" ]
[ "Special multiplication that takes in account the zeros and one in Y, which\nis the matrix that stores the householder vectors.", "Loads the SPI backing bean.\n\n@return the instance of MonetaryFormatsSingletonSpi to be used by this singleton.", "Record a prepare operation timeout.\n\n@param failedOperation the prepared operation", "Returns an input stream that applies the required decompression to the\ngiven input stream.\n\n@param inputStream\nthe input stream with the (possibly compressed) data\n@param compressionType\nthe kind of compression\n@return an input stream with decompressed data\n@throws IOException\nif there was a problem creating the decompression streams", "Create a Build retention object out of the build\n\n@param build The build to create the build retention out of\n@param discardOldArtifacts Flag whether to discard artifacts of those builds that are to be discarded.\n@return a new Build retention", "In case we cannot delete a directory create a marker to recheck whether we can garbage collect some not\nreferenced directories and files.\n\n@param file the directory", "Converts the search results from CmsSearchResource to CmsSearchResourceBean.\n@param searchResults The collection of search results to transform.", "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.", "Return the set of synchronized document _ids in a namespace\nthat have been paused due to an irrecoverable error.\n\n@param namespace the namespace to get paused document _ids for.\n@return the set of paused document _ids in a namespace" ]
public String buildRadio(String propName) throws CmsException { String propVal = readProperty(propName); StringBuffer result = new StringBuffer("<table border=\"0\"><tr>"); result.append("<td><input type=\"radio\" value=\"true\" onClick=\"checkNoIntern()\" name=\"").append( propName).append("\" ").append(Boolean.valueOf(propVal).booleanValue() ? "checked=\"checked\"" : "").append( "/></td><td id=\"tablelabel\">").append(key(Messages.GUI_LABEL_TRUE_0)).append("</td>"); result.append("<td><input type=\"radio\" value=\"false\" onClick=\"checkNoIntern()\" name=\"").append( propName).append("\" ").append(Boolean.valueOf(propVal).booleanValue() ? "" : "checked=\"checked\"").append( "/></td><td id=\"tablelabel\">").append(key(Messages.GUI_LABEL_FALSE_0)).append("</td>"); result.append("<td><input type=\"radio\" value=\"\" onClick=\"checkNoIntern()\" name=\"").append( propName).append("\" ").append(CmsStringUtil.isEmpty(propVal) ? "checked=\"checked\"" : "").append( "/></td><td id=\"tablelabel\">").append(getPropertyInheritanceInfo(propName)).append( "</td></tr></table>"); return result.toString(); }
[ "Builds the radio input to set the export and secure property.\n\n@param propName the name of the property to build the radio input for\n\n@return html for the radio input\n\n@throws CmsException if the reading of a property fails" ]
[ "Determines whether the given array only contains unbounded type variables or Object.class.\n\n@param types the given array of types\n@return true if and only if the given array only contains unbounded type variables or Object.class", "Scan a network interface to find if it has an address space which matches the device we are trying to reach.\nIf so, return the address specification.\n\n@param aDevice the DJ Link device we are trying to communicate with\n@param networkInterface the network interface we are testing\n@return the address which can be used to communicate with the device on the interface, or null", "Choose from three numbers based on version.", "Create a JsonParser for a given json node.\n@param jsonNode the json node\n@return the json parser\n@throws IOException", "Calculate start dates for a daily recurrence.\n\n@param calendar current date\n@param frequency frequency\n@param dates array of start dates", "Unregister the mgmt channel.\n\n@param old the proxy controller to unregister\n@param shuttingDown whether the server inventory is shutting down\n@return whether the registration can be removed from the domain-controller", "Render a zero Double as null.\n\n@param value double value\n@return null if the double value is zero", "Fetch flag resource by Country\n\n@param country Country\n@return int of resource | 0 value if not exists", "radi otsu da dobije spojena crna slova i ra\n\n@param input\n@return the processed image" ]
private void updateScheduleSource(ProjectProperties properties) { // Rudimentary identification of schedule source if (properties.getCompany() != null && properties.getCompany().equals("Synchro Software Ltd")) { properties.setFileApplication("Synchro"); } else { if (properties.getAuthor() != null && properties.getAuthor().equals("SG Project")) { properties.setFileApplication("Simple Genius"); } else { properties.setFileApplication("Microsoft"); } } properties.setFileType("MSPDI"); }
[ "Populate the properties indicating the source of this schedule.\n\n@param properties project properties" ]
[ "Adds another scene object to pick against.\nEach frame all the colliders in the scene will be compared\nagainst the bounding volumes of all the collidables associated\nwith this picker.\n@param sceneObj new collidable\n@return index of collidable added, this is the CursorID in the GVRPickedObject", "Creates a new row with content with given cell context and a normal row style.\n@param content the content for the row, each member of the array represents the content for a cell in the row, must not be null but can contain null members\n@return a new row with content\n@throws {@link NullPointerException} if content was null", "Set the current playback position. This method can only be used in situations where the component is\ntied to a single player, and therefore always has a single playback position.\n\nWill cause part of the component to be redrawn if the position has\nchanged. This will be quickly overruled if a player is being monitored, but\ncan be used in other contexts.\n\n@param milliseconds how far into the track has been played\n\n@see #setPlaybackState", "Returns the comma separated list of available scopes\n\n@return String", "Add an executable \"post-run\" dependent for this model.\n\n@param executable the executable \"post-run\" dependent\n@return the key to be used as parameter to taskResult(string) method to retrieve result of executing\nthe executable \"post-run\" dependent", "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", "convolution data type", "Produces an IPv4 address from any sequence of 4 bytes in this IPv6 address.\n\n@param byteIndex the byte index to start\n@throws IndexOutOfBoundsException if the index is less than zero or bigger than 7\n@return", "Bean types of a session bean." ]
public void flush() throws IOException { if (unflushed.get() == 0) return; synchronized (lock) { if (logger.isTraceEnabled()) { logger.debug("Flushing log '" + name + "' last flushed: " + getLastFlushedTime() + " current time: " + System .currentTimeMillis()); } segments.getLastView().getMessageSet().flush(); unflushed.set(0); lastflushedTime.set(System.currentTimeMillis()); } }
[ "Flush this log file to the physical disk\n\n@throws IOException file read error" ]
[ "The period of time to ban a node that gives an error on an operation.\n\n@param nodeBannagePeriod The period of time to ban the node\n@param unit The time unit of the given value\n\n@deprecated Use {@link #setFailureDetectorBannagePeriod(long)} instead", "Returns the specified element, or null.", "Use this API to update nsip6.", "Puts as many of the given bytes as possible into this buffer.\n\n@return number of bytes actually put into this buffer (0 if the buffer is full)", "If UPDATE, INSERT or DELETE, return BatchPreparedStatement,\notherwise return null.", "Convert the Primavera string representation of a UUID into a Java UUID instance.\n\n@param value Primavera UUID\n@return Java UUID instance", "Use this API to fetch all the appflowpolicylabel resources that are configured on netscaler.", "Returns a list of files in given addon passing given filter.", "Returns the configured fields of the current field configuration.\n\n@return the configured fields of the current field configuration" ]
public VideoCollection generate(final int videoCount) { List<Video> videos = new LinkedList<Video>(); for (int i = 0; i < videoCount; i++) { Video video = generateRandomVideo(); videos.add(video); } return new VideoCollection(videos); }
[ "Generate a VideoCollection with random data obtained form VIDEO_INFO map. You don't need o\ncreate your own AdapteeCollections. Review ListAdapteeCollection if needed.\n\n@param videoCount size of the collection.\n@return VideoCollection generated." ]
[ "Compute singular values and U and V at the same time", "We add typeRefs without Nodes on the fly, so we should remove them before relinking.", "Creates a new CRFDatum from the preprocessed allData format, given the\ndocument number, position number, and a List of Object labels.\n\n@return A new CRFDatum", "Get the DMR path for this node. For leaves, the DMR path is the path of its parent.\n@return The DMR path for this node.", "Builds IMAP envelope String from pre-parsed data.", "Returns a color for a given absolute number that is to be shown on the\nmap.\n\n@param value\n@return", "Returns the complete property list of a class\n@param c the class\n@return the property list of the class", "Checks that excess arguments match the vararg signature parameter.\n@param params\n@param args\n@return -1 if no match, 0 if all arguments matches the vararg type and >0 if one or more vararg argument is\nassignable to the vararg type, but still not an exact match", "Unmarshals the descriptor content.\n\n@throws CmsXmlException thrown if the XML structure of the descriptor is wrong.\n@throws CmsException thrown if reading the descriptor file fails." ]
private Iterable<Key> getSplitKey(List<Key> keys, int numSplits) { // If the number of keys is less than the number of splits, we are limited in the number of // splits we can make. if (keys.size() < numSplits - 1) { return keys; } // Calculate the number of keys per split. This should be KEYS_PER_SPLIT, but may // be less if there are not KEYS_PER_SPLIT * (numSplits - 1) scatter entities. // // Consider the following dataset, where - represents an entity and * represents an entity // that is returned as a scatter entity: // ||---*-----*----*-----*-----*------*----*----|| // If we want 4 splits in this data, the optimal split would look like: // ||---*-----*----*-----*-----*------*----*----|| // | | | // The scatter keys in the last region are not useful to us, so we never request them: // ||---*-----*----*-----*-----*------*---------|| // | | | // With 6 scatter keys we want to set scatter points at indexes: 1, 3, 5. // // We keep this as a double so that any "fractional" keys per split get distributed throughout // the splits and don't make the last split significantly larger than the rest. double numKeysPerSplit = Math.max(1.0, ((double) keys.size()) / (numSplits - 1)); List<Key> keysList = new ArrayList<Key>(numSplits - 1); // Grab the last sample for each split, otherwise the first split will be too small. for (int i = 1; i < numSplits; i++) { int splitIndex = (int) Math.round(i * numKeysPerSplit) - 1; keysList.add(keys.get(splitIndex)); } return keysList; }
[ "Given a list of keys and a number of splits find the keys to split on.\n\n@param keys the list of keys.\n@param numSplits the number of splits." ]
[ "Processes a stencilset template file\n@throws IOException", "Use this API to update ntpserver.", "Wrap Statement with a proxy.\n@param target statement handle\n@param connectionHandle originating bonecp connection\n@return Proxy to a statement.", "Replace known tags in the current data values with actual values as appropriate\n\n@param cr a reference to DataPipe from which to read the current map", "This method writes a resource's availability table.\n\n@param xml MSPDI resource\n@param mpx MPXJ resource", "Check if there is an attribute which tells us which concrete class is to be instantiated.", "Parse an extended attribute currency value.\n\n@param value string representation\n@return currency value", "Uploads a new large file.\n@param boxApi the API connection to be used by the upload session.\n@param folderId the id of the folder in which the file will be uploaded.\n@param stream the input stream that feeds the content of the file.\n@param url the upload session URL.\n@param fileName the name of the file to be created.\n@param fileSize the total size of the file.\n@return the created file instance.\n@throws InterruptedException when a thread gets interupted.\n@throws IOException when reading a stream throws exception.", "Start with specifying the groupId" ]
public static double Sinh(double x, int nTerms) { if (nTerms < 2) return x; if (nTerms == 2) { return x + (x * x * x) / 6D; } else { double mult = x * x * x; double fact = 6; int factS = 5; double result = x + mult / fact; for (int i = 3; i <= nTerms; i++) { mult *= x * x; fact *= factS * (factS - 1); factS += 2; result += mult / fact; } return result; } }
[ "compute Sinh using Taylor Series.\n\n@param x An angle, in radians.\n@param nTerms Number of terms.\n@return Result." ]
[ "Extracts the nullity of a matrix using a preexisting decomposition.\n\n@see #singularThreshold(SingularValueDecomposition_F64)\n\n@param svd A precomputed decomposition. Not modified.\n@param threshold Tolerance used to determine of a singular value is singular.\n@return The nullity of the decomposed matrix.", "Sets the alias using a userAlias object.\n@param userAlias The alias to set", "Start a server.\n\n@return the http server\n@throws Exception the exception", "Populate the container from outline code data.\n\n@param field field type\n@param items pairs of values and descriptions", "Isn't there a method for this in GeoTools?\n\n@param crs\nCRS string in the form of 'EPSG:<srid>'.\n@return SRID as integer.", "Prepare a batch api request using list of individual reuests.\n@param requests list of api requests that has to be executed in batch.", "Execute the operation.\n\n@param listener the transactional operation listener\n@param client the transactional protocol client\n@param identity the server identity\n@param operation the operation\n@param transformer the operation result transformer\n@return whether the operation was executed", "Adds multiple observers using unique integer prefixes for each.\n\n@deprecated since 1.1.0. Replaced by {@link #setObserverProvider(String)} and\n{@link #getObserverProvider()}", "Adds a slash to a path if it doesn't end with a slash.\n\n@param folderName The path to append a possible slash.\n@return The new, correct path." ]
public int getCostRateTableIndex() { Integer value = (Integer) getCachedValue(AssignmentField.COST_RATE_TABLE); return value == null ? 0 : value.intValue(); }
[ "Returns the cost rate table index for this assignment.\n\n@return cost rate table index" ]
[ "Extract resource data.", "Returns the key of the entity targeted by the represented association, retrieved from the given tuple.\n\n@param tuple the tuple from which to retrieve the referenced entity key\n@return the key of the entity targeted by the represented association", "Bessel function of order n.\n\n@param n Order.\n@param x Value.\n@return J value.", "Starts the loading process and creates a timer that sets of the callback after a given tiime if it hasn't already been triggered.\n\n@param timeout number of milliseconds after which the callback should be called if it hasn't already been", "Set the InputStream of request body data, of known length, to be sent to the server.\n\n@param input InputStream of request body data to be sent to the server\n@param inputLength Length of request body data to be sent to the server, in bytes\n@return an {@link HttpConnection} for method chaining\n@deprecated Use {@link #setRequestBody(InputStreamGenerator, long)}", "Produces an IPv4 address from any sequence of 4 bytes in this IPv6 address.\n\n@param byteIndex the byte index to start\n@throws IndexOutOfBoundsException if the index is less than zero or bigger than 7\n@return", "Creates a non-binary media type with the given type, subtype, and UTF-8 encoding\n@throws com.tngtech.jgiven.exception.JGivenWrongUsageException if any of the given arguments is {@code null}", "Appends the given string encoding special HTML characters.\n\n@param out\nThe StringBuilder to write to.\n@param in\nInput String.\n@param start\nInput String starting position.\n@param end\nInput String end position.", "Returns an iterable containing all the enterprise users that matches the filter and specifies which child fields\nto retrieve from the API.\n@param api the API connection to be used when retrieving the users.\n@param filterTerm used to filter the results to only users starting with this string in either the name or the\nlogin. Can be null to not filter the results.\n@param fields the fields to retrieve. Leave this out for the standard fields.\n@return an iterable containing all the enterprise users that matches the filter." ]
public static void start(final GVRContext context, final String appId, final ResultListener listener) { if (null == listener) { throw new IllegalArgumentException("listener cannot be null"); } final Activity activity = context.getActivity(); final long result = create(activity, appId); if (0 != result) { throw new IllegalStateException("Could not initialize the platform sdk; error code: " + result); } context.registerDrawFrameListener(new GVRDrawFrameListener() { @Override public void onDrawFrame(float frameTime) { final int result = processEntitlementCheckResponse(); if (0 != result) { context.unregisterDrawFrameListener(this); final Runnable runnable; if (-1 == result) { runnable = new Runnable() { @Override public void run() { listener.onFailure(); } }; } else { runnable = new Runnable() { @Override public void run() { listener.onSuccess(); } }; } activity.runOnUiThread(runnable); } } }); }
[ "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" ]
[ "Add a module.\n\n@param moduleName the module name\n@param slot the module slot\n@param newHash the new hash of the added content\n@return the builder", "Returns width and height that allow the given source width, height to fit inside the target width, height\nwithout losing aspect ratio", "Check if information model entity referenced by archetype\nhas right name or type", "Send an ERROR 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 msg The message you would like logged.\n@return", "Inserts the specified array into the specified original array at the specified index.\n\n@param original the original array into which we want to insert another array\n@param index the index at which we want to insert the array\n@param inserted the array that we want to insert\n@return the combined array", "Write a list of custom field attributes.", "Obtains a local date in Accounting calendar system from the\nproleptic-year, month-of-year and day-of-month fields.\n\n@param prolepticYear the proleptic-year\n@param month the month-of-year\n@param dayOfMonth the day-of-month\n@return the Accounting local date, not null\n@throws DateTimeException if unable to create the date", "Retrieve the default mapping between MPXJ task fields and Primavera wbs field names.\n\n@return mapping", "Use this API to add sslcipher resources." ]
public static Object invoke(Object object, String methodName, Object[] parameters) { try { Class[] classTypes = new Class[parameters.length]; for (int i = 0; i < classTypes.length; i++) { classTypes[i] = parameters[i].getClass(); } Method method = object.getClass().getMethod(methodName, classTypes); return method.invoke(object, parameters); } catch (Throwable t) { return InvokerHelper.invokeMethod(object, methodName, parameters); } }
[ "Invoke a method through reflection.\nFalls through to using the Invoker to call the method in case the reflection call fails..\n\n@param object the object on which to invoke a method\n@param methodName the name of the method to invoke\n@param parameters the parameters of the method call\n@return the result of the method call" ]
[ "Get the relative path of an application\n\n@param root the root to relativize against\n@param path the path to relativize\n@return the relative path", "Make a WMS getLayer request and return the image read from the server.\n\n@param wmsLayerParam the wms request parameters\n@param commonURI the uri to use for the requests (excepting parameters of course.)\n@param imageSize the size of the image to request\n@param dpi the dpi of the image to request\n@param angle the angle of the image to request\n@param bounds the area and projection of the request on the world.", "Update artifact download url of an artifact\n\n@param gavc String\n@param downLoadUrl String", "Process the hours and exceptions for an individual calendar.\n\n@param calendar project calendar\n@param calendarData hours and exception rows for this calendar", "Use this API to fetch the statistics of all rnatip_stats resources that are configured on netscaler.", "Extract task data.", "dataType in weight descriptors and input descriptors is used to describe storage", "Populate the model with the object's properties.\n\n@param object object whose properties we're displaying\n@param excludedMethods method names to exclude", "generate a message for loglevel DEBUG\n\n@param pObject the message Object" ]
public Slice newSlice(long address, int size, Object reference) { if (address <= 0) { throw new IllegalArgumentException("Invalid address: " + address); } if (reference == null) { throw new NullPointerException("Object reference is null"); } if (size == 0) { return Slices.EMPTY_SLICE; } return new Slice(null, address, size, size, reference); }
[ "Creates a slice for directly a raw memory address. This is\ninherently unsafe as it may be used to access arbitrary memory.\nThe slice will hold the specified object reference to prevent the\ngarbage collector from freeing it while it is in use by the slice.\n\n@param address the raw memory address base\n@param size the size of the slice\n@param reference the object reference\n@return the unsafe slice" ]
[ "Process class properties.\n\n@param writer output stream\n@param methodSet set of methods processed\n@param aClass class being processed\n@throws IntrospectionException\n@throws XMLStreamException", "Remove a variable in the top variables layer.", "Returns a list of all the eigenvalues", "Use this API to fetch ipset resource of given name .", "Copy the settings from another calendar to this calendar.\n\n@param cal calendar data source", "Write calendar exceptions.\n\n@param records list of ProjectCalendars\n@throws IOException", "Write an unsigned short to the byte array starting at the given offset\n\n@param bytes The byte array\n@param value The short to write\n@param offset The offset to begin writing at", "Checks whether the compilation has been canceled and reports the given work increment to the compiler progress.", "Parse a map of objects from a JsonParser.\n\n@param jsonParser The JsonParser, preconfigured to be at the START_ARRAY token." ]
public int nullity() { if( is64 ) { return SingularOps_DDRM.nullity((SingularValueDecomposition_F64)svd, 10.0 * UtilEjml.EPS); } else { return SingularOps_FDRM.nullity((SingularValueDecomposition_F32)svd, 5.0f * UtilEjml.F_EPS); } }
[ "The nullity of the decomposed matrix.\n\n@see SingularOps_DDRM#nullity(SingularValueDecomposition_F64, double)\n\n@return The matrix's nullity" ]
[ "Get the domain controller data from the given byte buffer.\n\n@param buffer the byte buffer\n@return the domain controller data\n@throws Exception", "helper method to set the TranslucentStatusFlag\n\n@param on", "Returns the duration of the measured tasks in ms", "Bessel function of the second kind, of order n.\n\n@param n Order.\n@param x Value.\n@return Y value.", "The amount of time to keep an idle client thread alive\n\n@param threadIdleTime", "Validates the inputed color value.\n@param colorvalue the value of the color\n@return true if the inputed color value is valid", "The document field must not exist in the list provided\n@param rhs The argument - one or more values\n@return PredicateExpression: $nin rhs", "This method lists task predecessor and successor relationships.\n\n@param file project file", "calculate and set position to menu items" ]
public DescriptorRepository readDescriptorRepository(String fileName) { try { RepositoryPersistor persistor = new RepositoryPersistor(); return persistor.readDescriptorRepository(fileName); } catch (Exception e) { throw new MetadataException("Can not read repository " + fileName, e); } }
[ "Read ClassDescriptors from the given repository file.\n@see #mergeDescriptorRepository" ]
[ "This method populates the task model from data read from an MPX file.\n\n@param record data read from an MPX file\n@param isText flag indicating whether the textual or numeric data is being supplied", "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", "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", "Assembles the exception message when the value received by a CellProcessor isn't of the correct type.\n\n@param expectedType\nthe expected type\n@param actualValue\nthe value received by the CellProcessor\n@return the message\n@throws NullPointerException\nif expectedType is null", "Compute the key to use.\n\n@param ref The reference number.\n@param filename The filename.\n@param extension The file extension.", "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", "Use this API to fetch vpnsessionaction resource of given name .", "Parses int value and returns the provided default if the value can't be parsed.\n@param value the int to parse.\n@param defaultValue the default value.\n@return the parsed int, or the default value if parsing fails.", "Packages of the specified classes will be scanned and found classes will be added to the set of bean classes for the synthetic bean archive.\n\n@param scanRecursively\n@param packageClasses\n@return self" ]
public static boolean changeHost(String hostName, boolean enable, boolean disable, boolean remove, boolean isEnabled, boolean exists) throws Exception { // Open the file that is the first // command line parameter File hostsFile = new File("/etc/hosts"); FileInputStream fstream = new FileInputStream("/etc/hosts"); File outFile = null; BufferedWriter bw = null; // only do file output for destructive operations if (!exists && !isEnabled) { outFile = File.createTempFile("HostsEdit", ".tmp"); bw = new BufferedWriter(new FileWriter(outFile)); System.out.println("File name: " + outFile.getPath()); } // Get the object of DataInputStream DataInputStream in = new DataInputStream(fstream); BufferedReader br = new BufferedReader(new InputStreamReader(in)); String strLine; boolean foundHost = false; boolean hostEnabled = false; /* * Group 1 - possible commented out host entry * Group 2 - destination address * Group 3 - host name * Group 4 - everything else */ Pattern pattern = Pattern.compile("\\s*(#?)\\s*([^\\s]+)\\s*([^\\s]+)(.*)"); while ((strLine = br.readLine()) != null) { Matcher matcher = pattern.matcher(strLine); // if there is a match to the pattern and the host name is the same as the one we want to set if (matcher.find() && matcher.group(3).toLowerCase().compareTo(hostName.toLowerCase()) == 0) { foundHost = true; if (remove) { // skip this line altogether continue; } else if (enable) { // we will disregard group 2 and just set it to 127.0.0.1 if (!exists && !isEnabled) bw.write("127.0.0.1 " + matcher.group(3) + matcher.group(4)); } else if (disable) { if (!exists && !isEnabled) bw.write("# " + matcher.group(2) + " " + matcher.group(3) + matcher.group(4)); } else if (isEnabled && matcher.group(1).compareTo("") == 0) { // host exists and there is no # before it hostEnabled = true; } } else { // just write the line back out if (!exists && !isEnabled) bw.write(strLine); } if (!exists && !isEnabled) bw.write('\n'); } // if we didn't find the host in the file but need to enable it if (!foundHost && enable) { // write a new host entry if (!exists && !isEnabled) bw.write("127.0.0.1 " + hostName + '\n'); } // Close the input stream in.close(); if (!exists && !isEnabled) { bw.close(); outFile.renameTo(hostsFile); } // return false if the host wasn't found if (exists && !foundHost) return false; // return false if the host wasn't enabled if (isEnabled && !hostEnabled) return false; return true; }
[ "Only one boolean param should be true at a time for this function to return the proper results\n\n@param hostName\n@param enable\n@param disable\n@param remove\n@param isEnabled\n@param exists\n@return\n@throws Exception" ]
[ "Get the default providers list to be used.\n\n@return the default provider list and ordering, not null.", "Convert a query parameter to the correct object type based on the first letter of the name.\n\n@param name parameter name\n@param value parameter value\n@return parameter object as\n@throws ParseException value could not be parsed\n@throws NumberFormatException value could not be parsed", "Converts the passed list of inners to unmodifiable map of impls.\n@param innerList list of the inners.\n@return map of the impls", "Check if a position is within a circle\n\n@param x x position\n@param y y position\n@param centerX center x of circle\n@param centerY center y of circle\n@return true if within circle, false otherwise", "Computes the MD5 value of the input stream\n\n@param input\n@return\n@throws IOException\n@throws IllegalStateException", "Return the factor loading for a given time and a given component.\n\nThe factor loading is the vector <i>f<sub>i</sub></i> such that the scalar product <br>\n<i>f<sub>j</sub>f<sub>k</sub> = f<sub>j,1</sub>f<sub>k,1</sub> + ... + f<sub>j,m</sub>f<sub>k,m</sub></i> <br>\nis the instantaneous covariance of the component <i>j</i> and <i>k</i>.\n\nWith respect to simulation time <i>t</i>, this method uses a piece wise constant interpolation, i.e.,\nit calculates <i>t_<sub>i</sub></i> such that <i>t_<sub>i</sub></i> is the largest point in <code>getTimeDiscretization</code>\nsuch that <i>t_<sub>i</sub> &le; t </i>.\n\nThe component here, it given via a double <i>T</i> which may be associated with the LIBOR fixing date.\nWith respect to component time <i>T</i>, this method uses a piece wise constant interpolation, i.e.,\nit calculates <i>T_<sub>j</sub></i> such that <i>T_<sub>j</sub></i> is the largest point in <code>getTimeDiscretization</code>\nsuch that <i>T_<sub>j</sub> &le; T </i>.\n\n@param time The time <i>t</i> at which factor loading is requested.\n@param component The component time (as a double associated with the fixing of the forward rate) <i>T<sub>i</sub></i>.\n@param realizationAtTimeIndex The realization of the stochastic process (may be used to implement local volatility/covariance/correlation models).\n@return The factor loading <i>f<sub>i</sub>(t)</i>.", "Returns the index of a key in the set.\n\n@param key The key to search for.\n@return Returns the index of the key if it exists, else a negative integer.", "This method extracts predecessor data from an MSPDI file.\n\n@param task Task data", "This method extracts data for a single calendar from an MSPDI file.\n\n@param calendar Calendar data\n@param map Map of calendar UIDs to names\n@param baseCalendars list of base calendars" ]
public static base_responses unset(nitro_service client, String sitename[], String args[]) throws Exception { base_responses result = null; if (sitename != null && sitename.length > 0) { gslbsite unsetresources[] = new gslbsite[sitename.length]; for (int i=0;i<sitename.length;i++){ unsetresources[i] = new gslbsite(); unsetresources[i].sitename = sitename[i]; } result = unset_bulk_request(client, unsetresources,args); } return result; }
[ "Use this API to unset the properties of gslbsite resources.\nProperties that need to be unset are specified in args array." ]
[ "Retrieves the time at which work starts on the given date, or returns\nnull if this is a non-working day.\n\n@param date Date instance\n@return start time, or null for non-working day", "Finds all the resource names contained in this file system folder.\n\n@param classPathRootOnDisk The location of the classpath root on disk, with a trailing slash.\n@param scanRootLocation The root location of the scan on the classpath, without leading or trailing slashes.\n@param folder The folder to look for resources under on disk.\n@return The resource names;", "Returns the ReportModel with given name.", "Returns a non-validating XML parser. The parser ignores both DTDs and XSDs.\n\n@return An XML parser in the form of a DocumentBuilder", "Gets the end.\n\n@return the end", "We have obtained metadata for a device, so store it and alert any listeners.\n\n@param update the update which caused us to retrieve this metadata\n@param data the metadata which we received", "Gets any assignments for this task.\n@return a list of assignments for this task.", "Returns an identity matrix", "Use this API to fetch a vpnglobal_intranetip_binding resources." ]
public Map<String, ImplT> convertToUnmodifiableMap(List<InnerT> innerList) { Map<String, ImplT> result = new HashMap<>(); for (InnerT inner : innerList) { result.put(name(inner), impl(inner)); } return Collections.unmodifiableMap(result); }
[ "Converts the passed list of inners to unmodifiable map of impls.\n@param innerList list of the inners.\n@return map of the impls" ]
[ "The service name to be removed. Can be overridden for unusual service naming patterns\n@param name The name of the resource being removed\n@return The service name to remove. May return {@code null} if only removal based on {@code unavailableCapabilities}\npassed to the constructor are to be performed", "Get the group URL for the specified group ID\n\n@param groupId\nThe group ID\n@return The group URL\n@throws FlickrException", "Check, if the resource should be exported with minimal meta-data.\nThis holds for resources that are not part of the export, but must be\nexported as super-folders.\n\n@param path export-site relative path of the resource to check.\n\n@return flag, indicating if the resource should be exported with minimal meta data.", "Gets the time warp.\n\n@return the time warp", "Converts a row major block matrix into a row major matrix.\n\n@param src Original DMatrixRBlock.. Not modified.\n@param dst Equivalent DMatrixRMaj. Modified.", "Sets the initial MoificationState of the wrapped object myObj. The initial state will be StateNewDirty if myObj\nis not persisten already. The state will be set to StateOldClean if the object is already persistent.", "Use this API to unset the properties of vridparam resource.\nProperties that need to be unset are specified in args array.", "Return the count of all objects found\nfor given class, using the PB-api within\nODMG - this may change in further versions.", "Reads a UUID from a JSON object.\n\nReturns null if the JSON value for the given key is not present or not a valid UUID\n\n@param obj the JSON object\n@param key the JSON key\n\n@return the UUID" ]
public static String[] allUpperCase(String... strings){ String[] tmp = new String[strings.length]; for(int idx=0;idx<strings.length;idx++){ if(strings[idx] != null){ tmp[idx] = strings[idx].toUpperCase(); } } return tmp; }
[ "Make all elements of a String array upper case.\n@param strings string array, may contain null item but can't be null\n@return array containing all provided elements upper case" ]
[ "Return the number of arguments associated with the specified option.\nThe return value includes the actual option.\nWill return 0 if the option is not supported.", "Output method that sends a subscription confirmation for the subscriber to avoid DoS attacks, or false subscription.\n\n@param sr\n@return True case the subscription was confirmed, or False otherwise\n@throws org.ow2.chameleon.fuchsia.push.base.hub.exception.SubscriptionOriginVerificationException", "Sets the alias. Empty String is regarded as null.\n@param alias The alias to set", "Sets the value of the given variable\n\n@param name the name of the variable to set\n@param value the new value for the given variable", "Provides a nicely formatted string of the method definition. For simplicity, generic types on some of the elements\nare not displayed.\n@return\nstring form of node with some generic elements suppressed", "Used internally to find the solution to a single column vector.", "Returns the configured extra parameters that should be given to Solr, or the empty string if no parameters are configured.\n@return The configured extra parameters that should be given to Solr, or the empty string if no parameters are configured.", "Get the signatures that have been computed for all tracks currently loaded in any player for which we have\nbeen able to obtain all necessary metadata.\n\n@return the signatures that uniquely identify the tracks loaded in each player\n\n@throws IllegalStateException if the SignatureFinder is not running", "Gets the index to use in the search.\n\n@return the index to use in the search" ]
public String astring(ImapRequestLineReader request) throws ProtocolException { char next = request.nextWordChar(); switch (next) { case '"': return consumeQuoted(request); case '{': return consumeLiteral(request); default: return atom(request); } }
[ "Reads an argument of type \"astring\" from the request." ]
[ "Set the view frustum to pick against from the given projection matrix.\n\nIf the projection matrix is null, the picker will revert to picking\nobjects that are visible from the viewpoint of the scene's current camera.\nIf a matrix is given, the picker will pick objects that are visible\nfrom the viewpoint of it's owner the given projection matrix.\n\n@param projMatrix 4x4 projection matrix or null\n@see GVRScene#setPickVisible(boolean)", "Builds the Join for columns if they are not found among the existingColumns.\n@param columns the list of columns represented by Criteria.Field to ensure\n@param existingColumns the list of column names (String) that are already appended", "Read an exception day for a calendar.\n\n@param mpxjCalendar ProjectCalendar instance\n@param day ConceptDraw PROJECT exception day", "dispatch to gravity state", "Generate a unique ID across the cluster\n@return generated ID", "Use this API to update spilloverpolicy.", "Use this API to fetch all the nsrpcnode resources that are configured on netscaler.", "Get a list of referrers from a given domain to a photoset.\n\n@param date\n(Required) Stats will be returned for this date. A day according to Flickr Stats starts at midnight GMT for all 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 photosetId\n(Optional) The id of the photoset to get stats for. If not provided, stats for all sets 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.getPhotosetReferrers.html\"", "Read custom property definitions for tasks.\n\n@param gpTasks GanttProject tasks" ]
public static int convertBytesToInt(byte[] bytes, int offset) { return (BITWISE_BYTE_TO_INT & bytes[offset + 3]) | ((BITWISE_BYTE_TO_INT & bytes[offset + 2]) << 8) | ((BITWISE_BYTE_TO_INT & bytes[offset + 1]) << 16) | ((BITWISE_BYTE_TO_INT & bytes[offset]) << 24); }
[ "Take four bytes from the specified position in the specified\nblock and convert them into a 32-bit int, using the big-endian\nconvention.\n@param bytes The data to read from.\n@param offset The position to start reading the 4-byte int from.\n@return The 32-bit integer represented by the four bytes." ]
[ "Use this API to unset the properties of aaaparameter resource.\nProperties that need to be unset are specified in args array.", "Load all string recognize.", "Returns a sampling of the source at the specified line and column,\nof null if it is unavailable.", "Creates a tar file entry with defaults parameters.\n@param fileName the entry name\n@return file entry with reasonable defaults", "Creates or returns the instance of the helper class.\n\n@param inputSpecification the input specification.\n@param formFillMode if random data should be used on the input fields.\n@return The singleton instance.", "Set text parameters from properties\n@param context Valid Android {@link Context}\n@param properties JSON text properties", "Checks to see if either the diagonal element or off diagonal element is zero. If one is\nthen it performs a split or pushes it off the matrix.\n\n@return True if there was a zero.", "Adds an additional interface that the proxy should implement. The default\nimplementation will be to forward invocations to the bean instance.\n\n@param newInterface an interface", "Convert an Object to a DateTime." ]
public String getKeySchema() throws IOException { Schema schema = getInputPathAvroSchema(); String keySchema = schema.getField(keyFieldName).schema().toString(); return keySchema; }
[ "Extract schema of the key field" ]
[ "Use this API to fetch nstrafficdomain_bridgegroup_binding resources of given name .", "Use this API to Import application.", "Restore the recorded state from the rollback xml.\n\n@param target the patchable target\n@param rollbackPatchId the rollback patch id\n@param patchType the the current patch type\n@param history the recorded history\n@throws PatchingException", "Gets information about a trashed folder that's limited to a list of specified fields.\n@param folderID the ID of the trashed folder.\n@param fields the fields to retrieve.\n@return info about the trashed folder containing only the specified fields.", "set the specified object at index\n\n@param object The object to add at the end of the array.", "Generates a set of excluded method names.\n\n@param methodNames method names\n@return set of method names", "This method extracts calendar data from a GanttProject file.\n\n@param ganttProject Root node of the GanttProject file", "Determine the length of a nul terminated UTF16LE string in bytes.\n\n@param data string data\n@param offset offset into string data\n@return length in bytes", "Logs to Info if the debug level is greater than or equal to 1." ]
public Object get(Object key) { purge(); Entry entry = getEntry(key); if (entry == null) return null; return entry.getValue(); }
[ "Returns the value associated with the given key, if any.\n\n@return the value associated with the given key, or <Code>null</Code>\nif the key maps to no value" ]
[ "Commit the contents of the given temp file to either the main file, or, if we are not persisting\nto the main file, to the .last file in the configuration history\n@param temp temp file containing the latest configuration. Will not be {@code null}\n@throws ConfigurationPersistenceException", "Updates the gatewayDirection attributes of all gateways.\n@param def", "Create the index file that sets up the frameset.\n@param outputDirectory The target directory for the generated file(s).", "Each element of the second array is added to each element of the first.", "Extracts the elements from the source matrix by their 1D index.\n\n@param src Source matrix. Not modified.\n@param indexes array of row indexes\n@param length maximum element in row array\n@param dst output matrix. Must be a vector of the correct length.", "Handle a completed request producing an optional response", "Launch Navigation Service residing in the navigation module", "Use this API to fetch all the responderpolicy resources that are configured on netscaler.", "We have identified that we have a SQLite file. This could be a Primavera Project database\nor an Asta database. Open the database and use the table names present to determine\nwhich type this is.\n\n@param stream schedule data\n@return ProjectFile instance" ]
protected void markStatementsForInsertion( StatementDocument currentDocument, List<Statement> addStatements) { for (Statement statement : addStatements) { addStatement(statement, true); } for (StatementGroup sg : currentDocument.getStatementGroups()) { if (this.toKeep.containsKey(sg.getProperty())) { for (Statement statement : sg) { if (!this.toDelete.contains(statement.getStatementId())) { addStatement(statement, false); } } } } }
[ "Marks a given list of statements for insertion into the current document.\nInserted statements can have an id if they should update an existing\nstatement, or use an empty string as id if they should be added. The\nmethod removes duplicates and avoids unnecessary modifications by\nchecking the current content of the given document before marking\nstatements for being written.\n\n@param currentDocument\nthe document with the current statements\n@param addStatements\nthe list of new statements to be added" ]
[ "Generate a string with all selected checkboxes separated with ','.\n\n@return a string with all selected checkboxes", "Zeros an inner rectangle inside the matrix.\n\n@param A Matrix that is to be modified.\n@param row0 Start row.\n@param row1 Stop row+1.\n@param col0 Start column.\n@param col1 Stop column+1.", "Get the names of the paths that would apply to the request\n\n@param requestUrl URL of the request\n@param requestType Type of the request: GET, POST, PUT, or DELETE as integer\n@return JSONArray of path names\n@throws Exception", "Convert a query parameter to the correct object type based on the first letter of the name.\n\n@param name parameter name\n@param value parameter value\n@return parameter object as\n@throws ParseException value could not be parsed\n@throws NumberFormatException value could not be parsed", "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 log if exists or return null\n\n@param topic topic name\n@param partition partition index\n@return a log for the topic or null if not exist", "Returns an Array with an Objects PK VALUES if convertToSql is true, any\nassociated java-to-sql conversions are applied. If the Object is a Proxy\nor a VirtualProxy NO conversion is necessary.\n\n@param objectOrProxy\n@param convertToSql\n@return Object[]\n@throws PersistenceBrokerException", "Returns iban's country code and check digit.\n\n@param iban String\n@return countryCodeAndCheckDigit String", "Use this API to update filterhtmlinjectionparameter." ]
public static String join(Collection<String> s, String delimiter) { return join(s, delimiter, false); }
[ "Join the Collection of Strings using the specified delimiter.\n\n@param s\nThe String collection\n@param delimiter\nThe delimiter String\n@return The joined String" ]
[ "we have only one implementation on classpath.", "why isn't this functionality in enum?", "Gets the health memory.\n\n@return the health memory", "Used internally to find the solution to a single column vector.", "caching is not supported for this method", "Adds the specified list of users as followers to the project. Followers are a subset of members, therefore if\nthe users are not already members of the project they will also become members as a result of this operation.\nReturns the updated project record.\n\n@param project The project to add followers to.\n@return Request object", "Find all the node representing the entity.\n\n@param executionEngine the {@link GraphDatabaseService} used to run the query\n@return an iterator over the nodes representing an entity", "Obtain the profile name associated with a profile ID\n\n@param id ID of profile\n@return Name of corresponding profile", "Add groups for given group parent item.\n\n@param type the tree type\n@param ouItem group parent item" ]
public static base_response Import(nitro_service client, sslfipskey resource) throws Exception { sslfipskey Importresource = new sslfipskey(); Importresource.fipskeyname = resource.fipskeyname; Importresource.key = resource.key; Importresource.inform = resource.inform; Importresource.wrapkeyname = resource.wrapkeyname; Importresource.iv = resource.iv; Importresource.exponent = resource.exponent; return Importresource.perform_operation(client,"Import"); }
[ "Use this API to Import sslfipskey." ]
[ "Try to get a system property for obsolete keys. The value is automatically converted - a runtime exception may be thrown during conversion.\n\n@return all the properties whose system property keys were different in previous versions", "Add a plugin path\n\n@param model\n@param add\n@return\n@throws Exception", "Write the patch.xml\n\n@param rollbackPatch the patch\n@param file the target file\n@throws IOException", "Use this API to expire cacheobject.", "Somewhat ad-hoc list of only greek letters that bio people use, partly\nto avoid false positives on short ones.\n@param s String to check for Greek\n@return true iff there is a greek lette embedded somewhere in the String", "lookup a ClassDescriptor in the internal Hashtable\n@param strClassName a fully qualified class name as it is returned by Class.getName().", "Adds OPT_D | OPT_DIR 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", "Fills in the element with the InputValues for input\n\n@param element the node element\n@param input the input data", "Return the TransactionManager of the external app" ]
public static Cluster balanceContiguousPartitionsPerZone(final Cluster nextCandidateCluster, final int maxContiguousPartitionsPerZone) { System.out.println("Balance number of contiguous partitions within a zone."); System.out.println("numPartitionsPerZone"); for(int zoneId: nextCandidateCluster.getZoneIds()) { System.out.println(zoneId + " : " + nextCandidateCluster.getNumberOfPartitionsInZone(zoneId)); } System.out.println("numNodesPerZone"); for(int zoneId: nextCandidateCluster.getZoneIds()) { System.out.println(zoneId + " : " + nextCandidateCluster.getNumberOfNodesInZone(zoneId)); } // Break up contiguous partitions within each zone HashMap<Integer, List<Integer>> partitionsToRemoveFromZone = Maps.newHashMap(); System.out.println("Contiguous partitions"); for(Integer zoneId: nextCandidateCluster.getZoneIds()) { System.out.println("\tZone: " + zoneId); Map<Integer, Integer> partitionToRunLength = PartitionBalanceUtils.getMapOfContiguousPartitions(nextCandidateCluster, zoneId); List<Integer> partitionsToRemoveFromThisZone = new ArrayList<Integer>(); for(Map.Entry<Integer, Integer> entry: partitionToRunLength.entrySet()) { if(entry.getValue() > maxContiguousPartitionsPerZone) { List<Integer> contiguousPartitions = new ArrayList<Integer>(entry.getValue()); for(int partitionId = entry.getKey(); partitionId < entry.getKey() + entry.getValue(); partitionId++) { contiguousPartitions.add(partitionId % nextCandidateCluster.getNumberOfPartitions()); } System.out.println("Contiguous partitions: " + contiguousPartitions); partitionsToRemoveFromThisZone.addAll(Utils.removeItemsToSplitListEvenly(contiguousPartitions, maxContiguousPartitionsPerZone)); } } partitionsToRemoveFromZone.put(zoneId, partitionsToRemoveFromThisZone); System.out.println("\t\tPartitions to remove: " + partitionsToRemoveFromThisZone); } Cluster returnCluster = Cluster.cloneCluster(nextCandidateCluster); Random r = new Random(); for(int zoneId: returnCluster.getZoneIds()) { for(int partitionId: partitionsToRemoveFromZone.get(zoneId)) { // Pick a random other zone Id List<Integer> otherZoneIds = new ArrayList<Integer>(); for(int otherZoneId: returnCluster.getZoneIds()) { if(otherZoneId != zoneId) { otherZoneIds.add(otherZoneId); } } int whichOtherZoneId = otherZoneIds.get(r.nextInt(otherZoneIds.size())); // Pick a random node from other zone ID int whichNodeOffset = r.nextInt(returnCluster.getNumberOfNodesInZone(whichOtherZoneId)); int whichNodeId = new ArrayList<Integer>(returnCluster.getNodeIdsInZone(whichOtherZoneId)).get(whichNodeOffset); // Steal partition from one zone to another! returnCluster = UpdateClusterUtils.createUpdatedCluster(returnCluster, whichNodeId, Lists.newArrayList(partitionId)); } } return returnCluster; }
[ "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." ]
[ "Get a collection of public groups for the user.\n\nThe groups will contain only the members nsid, name, admin and eighteenplus. If you want the whole group-information, you have to call\n{@link com.flickr4java.flickr.groups.GroupsInterface#getInfo(String)}.\n\nThis method does not require authentication.\n\n@param userId\nThe user ID\n@return The public groups\n@throws FlickrException", "Build filter for the request.\n\n@param layerFilter layer filter\n@param featureIds features to include in report (null for all)\n@return filter\n@throws GeomajasException filter could not be parsed/created", "Overridden to do only the clean-part of the linking but not\nthe actual linking. This is deferred until someone wants to access\nthe content of the resource.", "dst is just for log information", "Demonstrates how to add an override to an existing path", "Processes the template for the comma-separated value pairs in an attribute of the current object on the specified level.\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=\"true\" description=\"The name of the attribute containg attributes (defaults to 'attributes')\"\[email protected] name=\"default-right\" optional=\"true\" description=\"The default right value if none is given (defaults to empty value)\"", "Process hours in a working day.\n\n@param calendar project calendar\n@param dayRecord working day data", "Pass the activity you use the drawer in ;)\nThis is required if you want to set any values by resource\n\n@param activity\n@return", "Send message to all connections labeled with tag specified\nwith self connection excluded\n\n@param message the message to be sent\n@param tag the string that tag the connections to be sent\n@return this context" ]
public static vpnglobal_binding get(nitro_service service) throws Exception{ vpnglobal_binding obj = new vpnglobal_binding(); vpnglobal_binding response = (vpnglobal_binding) obj.get_resource(service); return response; }
[ "Use this API to fetch a vpnglobal_binding resource ." ]
[ "List all the environment variables for an app.\n@param appName App name. See {@link #listApps} for a list of apps that can be used.\n@return map of config vars", "Use this API to update lbsipparameters.", "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", "Updates this BoxJSONObject using the information in a JSON object.\n@param jsonObject the JSON object containing updated information.", "By default all bean archives see each other.", "Creates a spin wrapper for a data input. The data format of the\ninput is assumed to be JSON.\n\n@param input the input to wrap\n@return the spin wrapper for the input\n\n@throws IllegalArgumentException in case an argument of illegal type is provided (such as 'null')", "Performs a HTTP PUT request, saves an attachment.\n\n@return {@link Response}", "Log the data for a single column.\n\n@param startIndex offset into buffer\n@param length length", "Determines storage overhead and returns pretty printed summary.\n\n@param finalNodeToOverhead Map of node IDs from final cluster to number\nof partition-stores to be moved to the node.\n@return pretty printed string summary of storage overhead." ]
public void process(AvailabilityTable table, byte[] data) { if (data != null) { Calendar cal = DateHelper.popCalendar(); int items = MPPUtility.getShort(data, 0); int offset = 12; for (int loop = 0; loop < items; loop++) { double unitsValue = MPPUtility.getDouble(data, offset + 4); if (unitsValue != 0) { Date startDate = MPPUtility.getTimestampFromTenths(data, offset); Date endDate = MPPUtility.getTimestampFromTenths(data, offset + 20); cal.setTime(endDate); cal.add(Calendar.MINUTE, -1); endDate = cal.getTime(); Double units = NumberHelper.getDouble(unitsValue / 100); Availability item = new Availability(startDate, endDate, units); table.add(item); } offset += 20; } DateHelper.pushCalendar(cal); Collections.sort(table); } }
[ "Populates a resource availability table.\n\n@param table resource availability table\n@param data file data" ]
[ "Remove any overrides for an endpoint\n\n@param pathValue path (endpoint) value\n@param requestType path request type. \"GET\", \"POST\", etc\n@return true if success, false otherwise", "Use this API to disable snmpalarm of given name.", "Writes the timephased data for a resource assignment.\n\n@param mpx MPXJ assignment\n@param xml MSDPI assignment", "Removes all elems in the given Collection that aren't accepted by the given Filter.", "May have to be changed to let multiple touch", "Call the constructor for the given class, inferring the correct types for\nthe arguments. This could be confusing if there are multiple constructors\nwith the same number of arguments and the values themselves don't\ndisambiguate.\n\n@param klass The class to construct\n@param args The arguments\n@return The constructed value", "For every String key, it registers the object as a parameter to make it available\nin the report.\n\n@param jd\n@param _parameters", "Generates a usable test specification for a given test definition\nUses the first bucket as the fallback value\n\n@param testDefinition a {@link TestDefinition}\n@return a {@link TestSpecification} which corresponding to given test definition.", "Returns the number of days from the given weekday to the next weekday the event should occur.\n@param weekDay the current weekday.\n@return the number of days to the next weekday an event could occur." ]
public PreparedStatement getDeleteStatement(ClassDescriptor cld) throws PersistenceBrokerSQLException, PersistenceBrokerException { try { return cld.getStatementsForClass(m_conMan).getDeleteStmt(m_conMan.getConnection()); } catch (SQLException e) { throw new PersistenceBrokerSQLException("Could not build statement ask for", e); } catch (LookupException e) { throw new PersistenceBrokerException("Used ConnectionManager instance could not obtain a connection", e); } }
[ "return a prepared DELETE Statement fitting for the given ClassDescriptor" ]
[ "Add a dependency task item for this model.\n\n@param dependency the dependency task item.\n@return key to be used as parameter to taskResult(string) method to retrieve result the task item", "set the Modification state to a new value. Used during state transitions.\n@param newModificationState org.apache.ojb.server.states.ModificationState", "Returns the list view of corporate groupIds of an organization\n\n@param organizationId String\n@return ListView", "Adds main report query.\n\n@param text\n@param language use constants from {@link DJConstants}\n@return", "Make sure we don't attempt to recover inline; if the parser\nsuccessfully recovers, it won't throw an exception.", "The token was previously determined as potentially to-be-splitted thus we\nemit additional indentation or dedenting tokens.", "Adds a file with the provided description.", "Use this API to fetch onlinkipv6prefix resources of given names .", "Use this API to fetch the statistics of all service_stats resources that are configured on netscaler." ]
public String calculateCacheKey(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability){ StringBuilder tmp = calculateCacheKeyInternal(sql, resultSetType, resultSetConcurrency); tmp.append(", H:"); tmp.append(resultSetHoldability); return tmp.toString(); }
[ "Simply appends the given parameters and returns it to obtain a cache key\n@param sql\n@param resultSetConcurrency\n@param resultSetHoldability\n@param resultSetType\n@return cache key to use" ]
[ "Adds a set of tests based on pattern matching.", "Use this API to delete route6.", "Checks if the provided artifactQuery is valid\n\n@param artifactQuery ArtifactQuery\n@throws WebApplicationException if the data is corrupted", "Returns a flag, indicating if the current event is a multi-day event.\nThe method is only called if the single event has an explicitely set end date\nor an explicitely changed whole day option.\n\n@return a flag, indicating if the current event takes lasts over more than one day.", "This is a convenience method used to add a default set of calendar\nhours to a calendar.\n\n@param day Day for which to add default hours for", "Use this API to flush cacheobject.", "Issue the database statements to drop the table associated with a dao.\n\n@param dao\nAssociated dao.\n@return The number of statements executed to do so.", "generate a select-Statement according to query\n\n@param query the Query\n@param cld the ClassDescriptor", "Determines a histogram of contiguous runs of partitions within a zone.\nI.e., for each run length of contiguous partitions, how many such runs\nare there.\n\nDoes not correctly address \"wrap around\" of partition IDs (i.e., the fact\nthat partition ID 0 is \"next\" to partition ID 'max')\n\n@param cluster\n@param zoneId\n@return map of length of contiguous run of partitions to count of number\nof such runs." ]
public static int longestCommonContiguousSubstring(String s, String t) { if (s.length() == 0 || t.length() == 0) { return 0; } int M = s.length(); int N = t.length(); int[][] d = new int[M + 1][N + 1]; for (int j = 0; j <= N; j++) { d[0][j] = 0; } for (int i = 0; i <= M; i++) { d[i][0] = 0; } int max = 0; for (int i = 1; i <= M; i++) { for (int j = 1; j <= N; j++) { if (s.charAt(i - 1) == t.charAt(j - 1)) { d[i][j] = d[i - 1][j - 1] + 1; } else { d[i][j] = 0; } if (d[i][j] > max) { max = d[i][j]; } } } // System.err.println("LCCS(" + s + "," + t + ") = " + max); return max; }
[ "Computes the longest common contiguous substring of s and t.\nThe LCCS is the longest run of characters that appear consecutively in\nboth s and t. For instance, the LCCS of \"color\" and \"colour\" is 4, because\nof \"colo\"." ]
[ "Retuns the Windows UNC style path with backslashs intead of forward slashes.\n\n@return The UNC path.", "Use this API to fetch all the sslaction resources that are configured on netscaler.", "Extract the subscription ID from a resource ID string.\n@param id the resource ID string\n@return the subscription ID", "Obtain the IDs of profile and path as Identifiers\n\n@param profileIdentifier actual ID or friendly name of profile\n@param pathIdentifier actual ID or friendly name of path\n@return\n@throws Exception", "Sets the left padding for all cells in the table.\n@param paddingLeft new padding, ignored if smaller than 0\n@return this to allow chaining", "Notifies that a content item is changed.\n\n@param position the position.", "Whether or not points are within some threshold.\n@param point1 Point 1\n@param point2 Point 2\n@return True or false", "Called by subclasses that initialize collections\n\n@param session the session\n@param id the collection identifier\n@param type collection type\n@throws HibernateException if an error occurs", "Returns a new AWT BufferedImage from this image.\n\n@param type the type of buffered image to create, if not specified then defaults to the current image type\n@return a new, non-shared, BufferedImage with the same data as this Image." ]
private boolean isSingleMultiDay() { long duration = getEnd().getTime() - getStart().getTime(); if (duration > I_CmsSerialDateValue.DAY_IN_MILLIS) { return true; } if (isWholeDay() && (duration <= I_CmsSerialDateValue.DAY_IN_MILLIS)) { return false; } Calendar start = new GregorianCalendar(); start.setTime(getStart()); Calendar end = new GregorianCalendar(); end.setTime(getEnd()); if (start.get(Calendar.DAY_OF_MONTH) == end.get(Calendar.DAY_OF_MONTH)) { return false; } return true; }
[ "Returns a flag, indicating if the current event is a multi-day event.\nThe method is only called if the single event has an explicitely set end date\nor an explicitely changed whole day option.\n\n@return a flag, indicating if the current event takes lasts over more than one day." ]
[ "Use this API to add responderpolicy.", "Set the rate types.\n\n@param rateTypes the rate types, not null and not empty.\n@return this, for chaining.\n@throws IllegalArgumentException when not at least one {@link RateType} is provided.", "Called when the layout is applied to the data\n@param container WidgetContainer to access the org.gearvrf.org.gearvrf.widgetlib in the layout\n@param viewPortSize View port for data set", "Required to close the connection reading on the terminal, otherwise\nit can't be interrupted.\n\n@throws InterruptedException", "Returns a string that represents a valid Solr query range.\n\n@param from Lower bound of the query range.\n@param to Upper bound of the query range.\n@return String that represents a Solr query range.", "Converts an image to a RGBA direct color model using a workaround via buffered image directly calling the\nColorConvert operation fails for unknown reasons ?!\n\n@param img image to convert\n@return converted image", "Triggers collapse of the parent.", "Use this API to add clusterinstance resources.", "Iterates over the elements of an iterable collection of items, starting\nfrom a specified startIndex, and returns the index of the last item that\nmatches the condition specified in the closure.\n\n@param self the iteration object over which to iterate\n@param startIndex start matching from this index\n@param closure the filter to perform a match on the collection\n@return an integer that is the index of the last matched object or -1 if no match was found\n@since 1.5.2" ]
public ItemRequest<Task> removeDependents(String task) { String path = String.format("/tasks/%s/removeDependents", task); return new ItemRequest<Task>(this, Task.class, path, "POST"); }
[ "Unlinks a set of dependents from this task.\n\n@param task The task to remove dependents from.\n@return Request object" ]
[ "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", "A safe wrapper to destroy the given resource request.", "Read predecessors from a Gantt Designer file.\n\n@param gantt Gantt Designer file", "Give an embedded association, creates all the nodes and relationships required to represent it.\nIt assumes that the entity node containing the association already exists in the db.\n\n@param executionEngine the {@link GraphDatabaseService} to run the query\n@param associationKey the {@link AssociationKey} identifying the association\n@param embeddedKey the {@link EntityKey} identifying the embedded component\n@return the created {@link Relationship} that represents the association", "Close the open stream.\n\nClose the stream if it was opened before", "This method is used to launch mock agents. First it creates them, with\nthe generic df_service_name \\\"mock_agent\\\", and then the method sends to\nthe agent a message with the new df_service_name and its behaviour.\n\n@param agent_name\nThe name of the mock agent\n@param agent_path\nThe path of the agent, described in\nmocks/jadex/common/Definitions file\n@param configuration\nWhere the new df_service_name and the agents behaviour is\nsaved\n@param scenario\nThe Scenario of the Test", "Get the contents from the request URL.\n\n@param url URL to get the response from\n@param layer the raster layer\n@return {@link InputStream} with the content\n@throws IOException cannot get content", "Return the basis functions for the regression suitable for this product.\n\n@param fixingDate The condition time.\n@param model The model\n@return The basis functions for the regression suitable for this product.\n@throws net.finmath.exception.CalculationException Thrown if the valuation fails, specific cause may be available via the <code>cause()</code> method.", "Process normal calendar working and non-working days.\n\n@param calendar parent calendar" ]
public TimephasedCostContainer getBaselineCost(ProjectCalendar calendar, TimephasedCostNormaliser normaliser, byte[] data, boolean raw) { TimephasedCostContainer result = null; if (data != null && data.length > 0) { LinkedList<TimephasedCost> list = null; //System.out.println(ByteArrayHelper.hexdump(data, false)); int index = 16; // 16 byte header int blockSize = 20; double previousTotalCost = 0; Date blockStartDate = MPPUtility.getTimestampFromTenths(data, index + 16); index += blockSize; while (index + blockSize <= data.length) { Date blockEndDate = MPPUtility.getTimestampFromTenths(data, index + 16); double currentTotalCost = (double) ((long) MPPUtility.getDouble(data, index + 8)) / 100; if (!costEquals(previousTotalCost, currentTotalCost)) { TimephasedCost cost = new TimephasedCost(); cost.setStart(blockStartDate); cost.setFinish(blockEndDate); cost.setTotalAmount(Double.valueOf(currentTotalCost - previousTotalCost)); if (list == null) { list = new LinkedList<TimephasedCost>(); } list.add(cost); //System.out.println(cost); previousTotalCost = currentTotalCost; } blockStartDate = blockEndDate; index += blockSize; } if (list != null) { result = new DefaultTimephasedCostContainer(calendar, normaliser, list, raw); } } return result; }
[ "Extracts baseline cost from the MPP file for a specific baseline.\nReturns null if no baseline cost is present, otherwise returns\na list of timephased work items.\n\n@param calendar baseline calendar\n@param normaliser normaliser associated with this data\n@param data timephased baseline work data block\n@param raw flag indicating if this data is to be treated as raw\n@return timephased work" ]
[ "Set new point coordinates somewhere on screen and apply new direction\n\n@param position the point position to apply new values to", "Print the visibility adornment of element e prefixed by\nany stereotypes", "returns position of xpath element which match the expression xpath in the String dom.\n\n@param dom the Document to search in\n@param xpath the xpath query\n@return position of xpath element, if fails returns -1", "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.", "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", "Check if zone count policy is satisfied\n\n@return whether zone is satisfied", "Returns the complete definition of a custom field's metadata.\n\n@param customField Globally unique identifier for the custom field.\n@return Request object", "Generates a usable test specification for a given test definition\nUses the first bucket as the fallback value\n\n@param testDefinition a {@link TestDefinition}\n@return a {@link TestSpecification} which corresponding to given test definition.", "Create the ResourceIgnoredTransformationRegistry when fetching missing content, only including relevant pieces\nto a server-config.\n\n@param rc the resolution context\n@param delegate the delegate ignored resource transformation registry for manually ignored resources\n@return" ]
public static List<Integer> getAllNodeIds(AdminClient adminClient) { List<Integer> nodeIds = Lists.newArrayList(); for(Integer nodeId: adminClient.getAdminClientCluster().getNodeIds()) { nodeIds.add(nodeId); } return nodeIds; }
[ "Utility function that fetches node ids.\n\n@param adminClient An instance of AdminClient points to given cluster\n@return Node ids in cluster" ]
[ "Set the color for each total for the column\n@param column the number of the column (starting from 1)\n@param color", "Renames this file.\n\n@param newName the new name of the file.", "Returns the Java executable command.\n\n@param javaHome the java home directory or {@code null} to use the default\n\n@return the java command to use", "Set the values using the specified Properties object\n\n@param properties Properties object containing specific property values\nfor the Coordinator config", "Changes the vertex buffer associated with this mesh.\n@param vbuf new vertex buffer to use\n@see #setVertices(float[])\n@see #getVertexBuffer()\n@see #getVertices()", "Retrieve a single value property.\n\n@param method method definition\n@param object target object\n@param map parameter values", "Parameter validity check.", "Returns the complete definition of a custom field's metadata.\n\n@param customField Globally unique identifier for the custom field.\n@return Request object", "Print a time value.\n\n@param value time value\n@return time value" ]
public static DMatrixSparseCSC convert(DMatrixSparseTriplet src , DMatrixSparseCSC dst , int hist[] ) { if( dst == null ) dst = new DMatrixSparseCSC(src.numRows, src.numCols , src.nz_length); else dst.reshape(src.numRows, src.numCols, src.nz_length); if( hist == null ) hist = new int[ src.numCols ]; else if( hist.length >= src.numCols ) Arrays.fill(hist,0,src.numCols, 0); else throw new IllegalArgumentException("Length of hist must be at least numCols"); // compute the number of elements in each columns for (int i = 0; i < src.nz_length; i++) { hist[src.nz_rowcol.data[i*2+1]]++; } // define col_idx dst.histogramToStructure(hist); System.arraycopy(dst.col_idx,0,hist,0,dst.numCols); // now write the row indexes and the values for (int i = 0; i < src.nz_length; i++) { int row = src.nz_rowcol.data[i*2]; int col = src.nz_rowcol.data[i*2+1]; double value = src.nz_value.data[i]; int index = hist[col]++; dst.nz_rows[index] = row; dst.nz_values[index] = value; } dst.indicesSorted = false; return dst; }
[ "Converts SMatrixTriplet_64 into a SMatrixCC_64.\n\n@param src Original matrix which is to be copied. Not modified.\n@param dst Destination. Will be a copy. Modified.\n@param hist Workspace. Should be at least as long as the number of columns. Can be null." ]
[ "Get the property of the given object.\n\n@param object which to be got\n@return the property of the given object\n@throws RuntimeException if the property could not be evaluated", "Use this API to update snmpuser.", "Returns the list of the configured sort options, or the empty list if no sort options are configured.\n@return The list of the configured sort options, or the empty list if no sort options are configured.", "Wraps a StatisticsMatrix around 'm'. Does NOT create a copy of 'm' but saves a reference\nto it.", "Specify the address of the SOCKS proxy the connection should\nuse.\n\n<p>Read the <a href=\"http://java.sun.com/javase/6/docs/technotes/guides/net/proxies.html\">\nJava Networking and Proxies</a> guide to understand the\nproxies complexity.\n\n<p>Be aware that this method only handles SOCKS proxies, not\nHTTPS proxies. Use {@link #withProxy(Proxy)} instead.\n\n@param host the hostname of the SOCKS proxy\n@param port the port of the SOCKS proxy server\n@return this", "Overrides the superclass implementation to allow the AttributeDefinition for each field in the\nobject to in turn resolve that field.\n\n{@inheritDoc}", "Use this API to update nspbr6 resources.", "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 allows a subsection of a byte array to be copied.\n\n@param data source data\n@param offset offset into the source data\n@param size length of the source data to copy\n@return new byte array containing copied data" ]
public void localCommit() { if (log.isDebugEnabled()) log.debug("commit was called"); if (!this.isInLocalTransaction) { throw new TransactionNotInProgressException("Not in transaction, call begin() before commit()"); } try { if(!broker.isManaged()) { if (batchCon != null) { batchCon.commit(); } else if (con != null) { con.commit(); } } else { if(log.isDebugEnabled()) log.debug( "Found managed environment setting in PB, will skip Connection.commit() call"); } } catch (SQLException e) { log.error("Commit on underlying connection failed, try to rollback connection", e); this.localRollback(); throw new TransactionAbortedException("Commit on connection failed", e); } finally { this.isInLocalTransaction = false; restoreAutoCommitState(); this.releaseConnection(); } }
[ "Call commit on the underlying connection." ]
[ "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", "Throws an IllegalStateException when the given value is not false.", "Return the text content of the document. It does not containing trailing spaces and asterisks\nat the start of the line.", "map a property id. Property id can only be an Integer or String", "Use this API to fetch policydataset_value_binding resources of given name .", "Formats event output by key, usually equal to the method name.\n\n@param key the event key\n@param defaultPattern the default pattern to return if a custom pattern\nis not found\n@param args the args used to format output\n@return A formatted event output", "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.", "Rotate list of String. Used for randomize selection of received endpoints\n\n@param strings\nlist of Strings\n@return the same list in random order", "Answer a List of InCriteria based on values, each InCriteria\ncontains only inLimit values\n@param attribute\n@param values\n@param negative\n@param inLimit the maximum number of values for IN (-1 for no limit)\n@return List of InCriteria" ]
void addSubsystem(final OperationTransformerRegistry registry, final String name, final ModelVersion version) { final OperationTransformerRegistry profile = registry.getChild(PathAddress.pathAddress(PROFILE)); final OperationTransformerRegistry server = registry.getChild(PathAddress.pathAddress(HOST, SERVER)); final PathAddress address = PathAddress.pathAddress(PathElement.pathElement(ModelDescriptionConstants.SUBSYSTEM, name)); subsystem.mergeSubtree(profile, Collections.singletonMap(address, version)); if(server != null) { subsystem.mergeSubtree(server, Collections.singletonMap(address, version)); } }
[ "Add a new subsystem to a given registry.\n\n@param registry the registry\n@param name the subsystem name\n@param version the version" ]
[ "Returns an array of non-empty ids from the given list of ids or values.\n\n@param idsOrValues\nlist of ids and/or values\n@return array of non-empty ids", "perform rollback on all tx-states", "Parses operations where the input comes from variables to its left and right\n\n@param ops List of operations which should be parsed\n@param tokens List of all the tokens\n@param sequence List of operation sequence", "Create a request for elevations for samples along a path.\n\n@param req\n@param callback", "Sets the search scope.\n\n@param cms The current CmsObject object.", "calculate distance of two points\n\n@param a\n@param b\n@return", "Returns the z-coordinate of a vertex position.\n\n@param vertex the vertex index\n@return the z coordinate", "Set the default size of the texture buffers. You can call this to reduce the buffer size\nof views with anti-aliasing issue.\n\nThe max value to the buffer size should be the Math.max(width, height) of attached view.\n\n@param size buffer size. Value > 0 and <= Math.max(width, height).", "Get image Id from imageTag using DockerBuildInfoHelper client.\n\n@param imageTag\n@param host\n@return" ]
protected boolean hasKey() { boolean result = false; String requestURI = this.request.getUri(); parseKeys(requestURI); if(this.parsedKeys != null) { result = true; } else { logger.error("Error when validating request. No key specified."); RestErrorHandler.writeErrorResponse(this.messageEvent, HttpResponseStatus.BAD_REQUEST, "Error: No key specified !"); } return result; }
[ "Retrieve and validate the key from the REST request.\n\n@return true if present, false if missing" ]
[ "If a text contains double quotes, escape them.\n\n@param text the text to escape\n@return Escaped text or {@code null} if the text is null", "Determines the number bytes required to store a variable length\n\n@param i length of Bytes\n@return number of bytes needed", "Return a capitalized version of the specified property name.\n\n@param s\nThe property name", "Determines the field via reflection look-up.\n\n@param clazz The java class to search in\n@param fieldName The field's name\n@return The field object or <code>null</code> if no matching field was found", "The context returned by this method may be later reused for other interception types.\n\n@param interceptionModel\n@param ctx\n@param manager\n@param type\n@return the interception context to be used for the AroundConstruct chain", "Write resource assignment workgroup.\n\n@param record resource assignment workgroup instance\n@throws IOException", "Write the domain controller's data to an output stream.\n\n@param outstream the output stream\n@throws Exception", "Determine which math transform to use when creating the coordinate of the label.\n\n@param mapCrs the crs of the map, used if the {@link #labelProjection} is not defined.", "Places the real component of the input matrix into the output matrix.\n\n@param input Complex matrix. Not modified.\n@param output real matrix. Modified." ]
public static double normP2( DMatrixRMaj A ) { if( MatrixFeatures_DDRM.isVector(A)) { return normF(A); } else { return inducedP2(A); } }
[ "Computes the p=2 norm. If A is a matrix then the induced norm is computed.\n\n@param A Matrix or vector.\n@return The norm." ]
[ "Tells you if the expression is a null safe dereference.\n@param expression\nexpression\n@return\ntrue if is null safe dereference.", "Reads, stems, and prints the trees in the file.\n\n@param args Usage: WordStemmer file", "Changes to a new sub-view and stores a report to be displayed by that subview.<p<\n\n@param newState the new state\n@param thread the report thread which should be displayed in the sub view\n@param label the label to display for the report", "Commit the contents of the given temp file to either the main file, or, if we are not persisting\nto the main file, to the .last file in the configuration history\n@param temp temp file containing the latest configuration. Will not be {@code null}\n@throws ConfigurationPersistenceException", "Start offering shared dbserver sessions.\n\n@throws SocketException if there is a problem opening connections", "returns a sorted array of methods", "The service name to be removed. Can be overridden for unusual service naming patterns\n@param name The name of the resource being removed\n@return The service name to remove. May return {@code null} if only removal based on {@code unavailableCapabilities}\npassed to the constructor are to be performed", "Appends the key and value to the address and sets the address on the operation.\n\n@param operation the operation to set the address on\n@param base the base address\n@param key the key for the new address\n@param value the value for the new address", "Write the domain controller data to an S3 file.\n\n@param data the domain controller data\n@param domainName the name of the directory in the bucket to write the S3 file to\n@throws IOException" ]
private void loadResourceFile(URL configurationResourceUrl, Properties hotRodConfiguration) { if ( configurationResourceUrl != null ) { try ( InputStream openStream = configurationResourceUrl.openStream() ) { hotRodConfiguration.load( openStream ); } catch (IOException e) { throw log.failedLoadingHotRodConfigurationProperties( e ); } } }
[ "Load the properties from the resource file if one is specified" ]
[ "Reports that a node is resolved hence other nodes depends on it can consume it.\n\n@param completed the node ready to be consumed", "flush all messages to disk\n\n@param force flush anyway(ignore flush interval)", "We need to make sure the terms are of the right type, otherwise they will not be serialized correctly.", "Write the text to the File, using the specified encoding.\n\n@param file a File\n@param text the text to write to the File\n@param charset the charset used\n@throws IOException if an IOException occurs.\n@since 1.0", "note, this just logs an error and doesn't throw as its only used to remove old configuration files, and shouldn't stop boot", "Calculate the actual bit length of the proposed binary string.", "Determine the relevant pieces of configuration which need to be included when processing the domain model.\n\n@param root the resource root\n@param requiredConfigurationHolder the resolution context\n@param serverConfig the server config\n@param extensionRegistry the extension registry", "Parses a string that contains single fat client config string in avro\nformat\n\n@param configAvro Input string of avro format, that contains config for\nmultiple stores\n@return Properties of single fat client config", "Exception handler if we are unable to parse a json value into a java representation\n\n@param expectedType Name of the expected Type\n@param type Type of the json node\n@return SpinJsonDataFormatException" ]
public static long randomLongBetween(long min, long max) { Random rand = new Random(); return min + (long) (rand.nextDouble() * (max - min)); }
[ "Returns a long between interval\n@param min Minimum value\n@param max Maximum value\n@return long number" ]
[ "Creates a Bytes object by copying the data of a subsequence of the given byte array\n\n@param data Byte data\n@param offset Starting offset in byte array (inclusive)\n@param length Number of bytes to include", "Set the given column name to the given value.\n\n@param name The column name to set.\n@param value the value to set.\n@return {@code this}\n@throws IllegalArgumentException if a column name does not exist in the table.", "This method dumps the entire contents of a file to an output\nprint writer as ascii data.\n\n@param is Input Stream\n@param pw Output PrintWriter\n@return number of bytes read\n@throws Exception Thrown on file read errors", "Sets the value of a UDF.\n\n@param udf user defined field\n@param dataType MPXJ data type\n@param value field value", "determine the what state a transaction is in by inspecting the primary column", "By default uses InputStream as the type of the image\n@param title\n@param property\n@param width\n@param fixedWidth\n@param imageScaleMode\n@param style\n@return\n@throws ColumnBuilderException\n@throws ClassNotFoundException", "returns a sorted array of properties", "Rename a key for all languages.\n@param oldKey the key to rename\n@param newKey the new key name\n@return <code>true</code> if renaming was successful, <code>false</code> otherwise.", "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" ]
public static csvserver_cmppolicy_binding[] get(nitro_service service, String name) throws Exception{ csvserver_cmppolicy_binding obj = new csvserver_cmppolicy_binding(); obj.set_name(name); csvserver_cmppolicy_binding response[] = (csvserver_cmppolicy_binding[]) obj.get_resources(service); return response; }
[ "Use this API to fetch csvserver_cmppolicy_binding resources of given name ." ]
[ "Compares two avro strings which contains multiple store configs\n\n@param configAvro1\n@param configAvro2\n@return true if two config avro strings have same content", "Creates the .story file necessary for every Beast Test Case.\n\n@param scenarioName\n- The name of the scenario, with spaces\n@param srcTestRootFolder\n- The test root folder\n@param packagePath\n- The package of the BeastTestCase\n@param scenarioDescription\n- the scenario name\n@param givenDescription\n- The given description\n@param whenDescription\n- The when description\n@param thenDescription\n- The then description\n@throws BeastException", "Use this API to fetch policydataset_value_binding resources of given name .", "Destroys dependent instance\n\n@param instance\n@return true if the instance was destroyed, false otherwise", "Builds the HTML code for a select widget given a bean containing the select options\n\n@param htmlAttributes html attributes for the select widget\n@param options the bean containing the select options\n\n@return the HTML for the select box", "Performs a standard QR decomposition on the specified submatrix that is one block wide.\n\n@param blockLength\n@param Y\n@param gamma", "Retrieves a list of Terms of Service that belong to your Enterprise as an Iterable.\n@param api api the API connection to be used by the resource.\n@param termsOfServiceType the type of terms of service to be retrieved. Can be set to \"managed\" or \"external\"\n@return the Iterable of Terms of Service in an Enterprise that match the filter parameters.", "Use this API to count sslcipher_individualcipher_binding resources configued on NetScaler.", "returns a sorted array of methods" ]