query
stringlengths
74
6.1k
positive
sequencelengths
1
1
negative
sequencelengths
9
9
private Bpmn2Resource unmarshall(JsonParser parser, String preProcessingData) throws IOException { try { parser.nextToken(); // open the object ResourceSet rSet = new ResourceSetImpl(); rSet.getResourceFactoryRegistry().getExtensionToFactoryMap().put("bpmn2", new JBPMBpmn2ResourceFactoryImpl()); Bpmn2Resource bpmn2 = (Bpmn2Resource) rSet.createResource(URI.createURI("virtual.bpmn2")); rSet.getResources().add(bpmn2); _currentResource = bpmn2; if (preProcessingData == null || preProcessingData.length() < 1) { preProcessingData = "ReadOnlyService"; } // do the unmarshalling now: Definitions def = (Definitions) unmarshallItem(parser, preProcessingData); def.setExporter(exporterName); def.setExporterVersion(exporterVersion); revisitUserTasks(def); revisitServiceTasks(def); revisitMessages(def); revisitCatchEvents(def); revisitThrowEvents(def); revisitLanes(def); revisitSubProcessItemDefs(def); revisitArtifacts(def); revisitGroups(def); revisitTaskAssociations(def); revisitTaskIoSpecification(def); revisitSendReceiveTasks(def); reconnectFlows(); revisitGateways(def); revisitCatchEventsConvertToBoundary(def); revisitBoundaryEventsPositions(def); createDiagram(def); updateIDs(def); revisitDataObjects(def); revisitAssociationsIoSpec(def); revisitWsdlImports(def); revisitMultiInstanceTasks(def); addSimulation(def); revisitItemDefinitions(def); revisitProcessDoc(def); revisitDI(def); revisitSignalRef(def); orderDiagramElements(def); // return def; _currentResource.getContents().add(def); return _currentResource; } catch (Exception e) { _logger.error(e.getMessage()); return _currentResource; } finally { parser.close(); _objMap.clear(); _idMap.clear(); _outgoingFlows.clear(); _sequenceFlowTargets.clear(); _bounds.clear(); _currentResource = null; } }
[ "Start unmarshalling using the parser.\n@param parser\n@param preProcessingData\n@return the root element of a bpmn2 document.\n@throws java.io.IOException" ]
[ "Get a string property, or, if no such property is defined, return\nthe given default value\n\n@param props the properties\n@param name the key in the properties\n@param defaultValue the default value if the key not exists\n@return value in the props or defaultValue while name not exist", "Returns a description String based on the defined command and options.\nUseful when printing \"help\" info etc.", "Creates the adapter for the target database.", "When it is time to actually close a client, do so, and clean up the related data structures.\n\n@param client the client which has been idle for long enough to be closed", "Notifies that an existing footer item is moved to another position.\n\n@param fromPosition the original position.\n@param toPosition the new position.", "Returns the count of total number of unread inbox messages for the user\n@return int - count of all unread messages", "Helper method to add a Java integer value to a message digest.\n\n@param digest the message digest being built\n@param value the integer whose bytes should be included in the digest", "Attaches meta info about the current state of the device to an event.\nTypically, this meta is added only to the ping event.", "Print a duration value.\n\n@param value Duration instance\n@return string representation of a duration" ]
private void addClasses(XMLStreamWriter writer, File jarFile, boolean mapClassMethods) throws IOException, ClassNotFoundException, XMLStreamException, IntrospectionException { ClassLoader currentThreadClassLoader = Thread.currentThread().getContextClassLoader(); URLClassLoader loader = new URLClassLoader(new URL[] { jarFile.toURI().toURL() }, currentThreadClassLoader); JarFile jar = new JarFile(jarFile); Enumeration<JarEntry> enumeration = jar.entries(); while (enumeration.hasMoreElements()) { JarEntry jarEntry = enumeration.nextElement(); if (!jarEntry.isDirectory() && jarEntry.getName().endsWith(".class")) { addClass(loader, jarEntry, writer, mapClassMethods); } } jar.close(); }
[ "Add classes to the map file.\n\n@param writer XML stream writer\n@param jarFile jar file\n@param mapClassMethods true if we want to produce .Net style class method names\n@throws IOException\n@throws ClassNotFoundException\n@throws XMLStreamException\n@throws IntrospectionException" ]
[ "Emit a string event with parameters and force all listeners to be called asynchronously.\n\n@param event\nthe target event\n@param args\nthe arguments passed in\n@see #emit(String, Object...)", "Determine the enum value corresponding to the track source slot found in the packet.\n\n@return the proper value", "Starts the Okapi Barcode UI.\n\n@param args the command line arguments", "Use this API to update onlinkipv6prefix.", "Creates an operation to list the deployments.\n\n@return the operation", "Append the html-code to finish a html mail message to the given buffer.\n\n@param buffer The StringBuffer to add the html code to.", "Creates the style definition used for a rectangle element based on the given properties of the rectangle\n@param x The X coordinate of the rectangle.\n@param y The Y coordinate of the rectangle.\n@param width The width of the rectangle.\n@param height The height of the rectangle.\n@param stroke Should there be a stroke around?\n@param fill Should the rectangle be filled?\n@return The resulting element style definition.", "Multiple of gradient windwos per masc relation of x y\n\n@return int[]", "Write a set of fields from a field container to a JSON file.\n@param objectName name of the object, or null if no name required\n@param container field container\n@param fields fields to write" ]
public MembersList<Member> getList(String groupId, Set<String> memberTypes, int perPage, int page) throws FlickrException { MembersList<Member> members = new MembersList<Member>(); Map<String, Object> parameters = new HashMap<String, Object>(); parameters.put("method", METHOD_GET_LIST); parameters.put("group_id", groupId); if (perPage > 0) { parameters.put("per_page", "" + perPage); } if (page > 0) { parameters.put("page", "" + page); } if (memberTypes != null) { parameters.put("membertypes", StringUtilities.join(memberTypes, ",")); } Response response = transportAPI.get(transportAPI.getPath(), parameters, apiKey, sharedSecret); if (response.isError()) { throw new FlickrException(response.getErrorCode(), response.getErrorMessage()); } Element mElement = response.getPayload(); members.setPage(mElement.getAttribute("page")); members.setPages(mElement.getAttribute("pages")); members.setPerPage(mElement.getAttribute("perpage")); members.setTotal(mElement.getAttribute("total")); NodeList mNodes = mElement.getElementsByTagName("member"); for (int i = 0; i < mNodes.getLength(); i++) { Element element = (Element) mNodes.item(i); members.add(parseMember(element)); } return members; }
[ "Get a list of the members of a group. The call must be signed on behalf of a Flickr member, and the ability to see the group membership will be\ndetermined by the Flickr member's group privileges.\n\n@param groupId\nReturn a list of members for this group. The group must be viewable by the Flickr member on whose behalf the API call is made.\n@param memberTypes\nA set of Membertypes as available as constants in {@link Member}.\n@param perPage\nNumber of records per page.\n@param page\nResult-section.\n@return A members-list\n@throws FlickrException\n@see <a href=\"http://www.flickr.com/services/api/flickr.groups.members.getList.html\">API Documentation</a>" ]
[ "Readable yyyyMMdd representation of a day, which is also sortable.", "Sort and order steps to avoid unwanted generation", "Get the content-type, including the optional \";base64\".", "Adds a procedure definition to this class descriptor.\n\n@param procDef The procedure definition", "Get the names of the currently registered format providers.\n\n@return the provider names, never null.", "Loads a CRF classifier from an InputStream, and returns it. This method\ndoes not buffer the InputStream, so you should have buffered it before\ncalling this method.\n\n@param in\nInputStream 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", "Use this API to fetch authenticationvserver_authenticationnegotiatepolicy_binding resources of given name .", "Use this API to unset the properties of nslimitselector resources.\nProperties that need to be unset are specified in args array.", "Poll for the next N waiting jobs in line.\n\n@param size maximum amount of jobs to poll for\n@return up to \"size\" jobs" ]
public static SortedMap<String, Object> asMap() { SortedMap<String, Object> metrics = Maps.newTreeMap(); METRICS_SOURCE.applyMetrics(metrics); return metrics; }
[ "Gets the metrics as a map whose keys are the metric name and whose values are the metric values.\n\n@return map" ]
[ "Exceptions specific to each operation is handled in the corresponding\nsubclass. At this point we don't know the reason behind this exception.\n\n@param exception", "Returns a reference definition of the given name if it exists.\n\n@param name The name of the reference\n@return The reference def or <code>null</code> if there is no such reference", "Merges information from the resource root into this resource root\n\n@param additionalResourceRoot The root to merge", "Adds a string reference, a class reference, a method type, a module\nor a package to the constant pool of the class being build.\nDoes nothing if the constant pool already contains a similar item.\n\n@param type\na type among STR, CLASS, MTYPE, MODULE or PACKAGE\n@param value\nstring value of the reference.\n@return a new or already existing reference item.", "Executes the API action \"wbsearchentity\" for the given parameters.\nSearches for entities using labels and aliases. Returns a label and\ndescription for the entity in the user language if possible. Returns\ndetails of the matched term. The matched term text is also present in the\naliases key if different from the display label.\n\n<p>\nSee the <a href=\n\"https://www.wikidata.org/w/api.php?action=help&modules=wbsearchentity\"\n>online API documentation</a> for further information.\n<p>\n\n@param search\n(required) search for this text\n@param language\n(required) search in this language\n@param strictLanguage\n(optional) whether to disable language fallback\n@param type\n(optional) search for this type of entity\nOne of the following values: item, property\nDefault: item\n@param limit\n(optional) maximal number of results\nno more than 50 (500 for bots) allowed\nDefault: 7\n@param offset\n(optional) offset where to continue a search\nDefault: 0\nthis parameter is called \"continue\" in the API (which is a Java keyword)\n\n@return list of matching entities retrieved via the API URL\n@throws MediaWikiApiErrorException\nif the API returns an error\n@throws IllegalArgumentException\nif the given combination of parameters does not make sense", "Returns true if a pixel with the given color exists\n\n@param color the pixel colour to look for.\n@return true if there exists at least one pixel that has the given pixels color", "combines all the lists in a collection to a single list", "Cut all characters from maxLength and replace it with \"...\"", "Create a deep copy.\n\n@param bindAddress overwrites bind address when creating deep copy.\n@return a copy of the server setup configuration." ]
public static void registerMbean(Object mbean, ObjectName name) { registerMbean(ManagementFactory.getPlatformMBeanServer(), JmxUtils.createModelMBean(mbean), name); }
[ "Register the given mbean with the platform mbean server\n\n@param mbean The mbean to register\n@param name The name to register under" ]
[ "That is, of size 6, which become 8, since HashMaps are powers of 2. Still, it's half the size", "Reads primary key information from current RS row and generates a\n\ncorresponding Identity, and returns a proxy from the Identity.\n\n@throws PersistenceBrokerException\nif there was an error creating the proxy class", "Check if the given color string can be parsed.\n\n@param colorString The color to parse.", "Estimate excluded volume fraction by monte carlo method\n@return excluded volume fraction", "Converts a collection of dates to a JSON array with the long representation of the dates as strings.\n@param dates the list to convert.\n@return JSON array with long values of dates as string", "Shutdown the socket server", "This method is called to alert project listeners to the fact that\na resource assignment has been read from a project file.\n\n@param resourceAssignment resourceAssignment instance", "multi-field string", "Returns the title according to the given locale.\n@param locale the locale for which the title should be read.\n@return the title according to the given locale" ]
protected I_CmsSearchConfigurationFacetField parseFieldFacet(JSONObject fieldFacetObject) { try { String field = fieldFacetObject.getString(JSON_KEY_FACET_FIELD); String name = parseOptionalStringValue(fieldFacetObject, JSON_KEY_FACET_NAME); String label = parseOptionalStringValue(fieldFacetObject, JSON_KEY_FACET_LABEL); Integer minCount = parseOptionalIntValue(fieldFacetObject, JSON_KEY_FACET_MINCOUNT); Integer limit = parseOptionalIntValue(fieldFacetObject, JSON_KEY_FACET_LIMIT); String prefix = parseOptionalStringValue(fieldFacetObject, JSON_KEY_FACET_PREFIX); String sorder = parseOptionalStringValue(fieldFacetObject, JSON_KEY_FACET_ORDER); I_CmsSearchConfigurationFacet.SortOrder order; try { order = I_CmsSearchConfigurationFacet.SortOrder.valueOf(sorder); } catch (Exception e) { order = null; } String filterQueryModifier = parseOptionalStringValue(fieldFacetObject, JSON_KEY_FACET_FILTERQUERYMODIFIER); Boolean isAndFacet = parseOptionalBooleanValue(fieldFacetObject, JSON_KEY_FACET_ISANDFACET); List<String> preselection = parseOptionalStringValues(fieldFacetObject, JSON_KEY_FACET_PRESELECTION); Boolean ignoreFilterAllFacetFilters = parseOptionalBooleanValue( fieldFacetObject, JSON_KEY_FACET_IGNOREALLFACETFILTERS); return new CmsSearchConfigurationFacetField( field, name, minCount, limit, prefix, label, order, filterQueryModifier, isAndFacet, preselection, ignoreFilterAllFacetFilters); } catch (JSONException e) { LOG.error( Messages.get().getBundle().key(Messages.ERR_FIELD_FACET_MANDATORY_KEY_MISSING_1, JSON_KEY_FACET_FIELD), e); return null; } }
[ "Parses the field facet configurations.\n@param fieldFacetObject The JSON sub-node with the field facet configurations.\n@return The field facet configurations." ]
[ "Assign float value to inputOutput SFFloat field named speed.\nNote that our implementation with ExoPlayer that pitch and speed will be set to the same value.\n@param newValue", "Run a task once, after a delay.\n\n@param task\nTask to run.\n@param delay\nUnit is seconds.\n@return An interface that lets you query the status; cancel; or\nreschedule the event.", "Provisions a new user in an enterprise.\n@param api the API connection to be used by the created user.\n@param login the email address the user will use to login.\n@param name the name of the user.\n@return the created user's info.", "Create a Date instance representing a specific time.\n\n@param hour hour 0-23\n@param minutes minutes 0-59\n@return new Date instance", "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", "Sets the matrix 'inv' equal to the inverse of the matrix that was decomposed.\n\n@param inv Where the value of the inverse will be stored. Modified.", "directive dynamic xxx,yy\n@param node\n@return", "Returns true if the given item document lacks a label for at least one of\nthe languages covered.\n\n@param itemDocument\n@return true if some label is missing", "Read custom fields for a GanttProject resource.\n\n@param gpResource GanttProject resource\n@param mpxjResource MPXJ Resource instance" ]
private void addCriteria(List<GenericCriteria> list, byte[] block) { byte[] leftBlock = getChildBlock(block); byte[] rightBlock1 = getListNextBlock(leftBlock); byte[] rightBlock2 = getListNextBlock(rightBlock1); TestOperator operator = TestOperator.getInstance(MPPUtility.getShort(block, 0) - 0x3E7); FieldType leftValue = getFieldType(leftBlock); Object rightValue1 = getValue(leftValue, rightBlock1); Object rightValue2 = rightBlock2 == null ? null : getValue(leftValue, rightBlock2); GenericCriteria criteria = new GenericCriteria(m_properties); criteria.setLeftValue(leftValue); criteria.setOperator(operator); criteria.setRightValue(0, rightValue1); criteria.setRightValue(1, rightValue2); list.add(criteria); if (m_criteriaType != null) { m_criteriaType[0] = leftValue.getFieldTypeClass() == FieldTypeClass.TASK; m_criteriaType[1] = !m_criteriaType[0]; } if (m_fields != null) { m_fields.add(leftValue); } processBlock(list, getListNextBlock(block)); }
[ "Adds a basic LHS OPERATOR RHS block.\n\n@param list parent criteria list\n@param block current block" ]
[ "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", "Puts a single byte if the buffer is not yet full.\n\n@return true if the byte was put, or false if the buffer is full", "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.", "Checks the component type of the given array against the expected component type.\n\n@param array\nthe array to be checked. May not be <code>null</code>.\n@param expectedComponentType\nthe expected component type of the array. May not be <code>null</code>.\n@return the unchanged array.\n@throws ArrayStoreException\nif the expected runtime {@code componentType} does not match the actual runtime component type.", "Read a Synchro time from an input stream.\n\n@param is input stream\n@return Date instance", "Registers an image to be captured by the build-info proxy.\n\n@param imageTag\n@param host\n@param targetRepo\n@param buildInfoId\n@throws IOException\n@throws InterruptedException", "Ensure that the nodeList is either null or empty.\n\n@param nodeList the nodeList to ensure to be either null or empty\n@param expression the expression was used to fine the nodeList\n@throws SpinXPathException if the nodeList is either null or empty", "Indicates if a set of types are all proxyable\n\n@param types The types to test\n@return True if proxyable, false otherwise", "Get bean for given name in the \"thread\" scope.\n\n@param name name of bean\n@param factory factory for new instances\n@return bean for this scope" ]
public double getDouble(Integer id, Integer type) { double result = Double.longBitsToDouble(getLong(id, type)); if (Double.isNaN(result)) { result = 0; } return result; }
[ "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" ]
[ "Obtains a Coptic zoned date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the Coptic zoned date-time, not null\n@throws DateTimeException if unable to create the date-time", "If the burst mode is on, emit the particles only once.\n\n@param particlePositions\n@param particleVelocities\n@param particleTimeStamps", "Propagate onEnter events to listeners\n@param hit collision object", "Parses a record containing hours and add them to a container.\n\n@param ranges hours container\n@param hoursRecord hours record", "Resolves an idl jar for the artifact.\n@return Returns idl artifact\n@throws MojoExecutionException is idl jar is not present for the artifact.", "Use this API to fetch vpnvserver_auditnslogpolicy_binding resources of given name .", "Replaces the model used to depict the controller in the scene.\n\n@param controllerModel root of hierarchy to use for controller model\n@see #getControllerModel()\n@see #showControllerModel(boolean)", "Remove the group and all references to it\n\n@param groupId ID of group", "Await a state.\n\n@param expected the expected state\n@return {@code true} if the state was reached, {@code false} otherwise" ]
public <Ex extends Throwable> Try<R,Ex> execute(T input,Class<Ex> classes){ return Try.withCatch( ()->transactionTemplate.execute(status-> transaction.apply(input)),classes); }
[ "Execute the transactional flow - catch only specified exceptions\n\n@param input Initial data input\n@param classes Exception types to catch\n@return Try that represents either success (with result) or failure (with errors)" ]
[ "Stops the background data synchronization thread and releases the local client.", "Set the draw mode for this mesh. Default is GL_TRIANGLES.\n\n@param drawMode", "Append the Parameter\nAdd the place holder ? or the SubQuery\n@param value the value of the criteria", "Get the script for a given ID\n\n@param id ID of script\n@return Script if found, otherwise null", "Use this API to update autoscaleaction.", "Internal utility to dump relationship lists in a structured format\nthat can easily be compared with the tabular data in MS Project.\n\n@param relations relation list", "Returns the currently scheduled job description identified by the given id.\n\n@param id the job id\n\n@return a job or <code>null</code> if not found", "set custom response for the default profile's default client\n\n@param pathName friendly name of path\n@param customData custom response/request data\n@return true if success, false otherwise", "Retrieves state and metrics information for individual client connection.\n\n@param name connection name\n@return connection information" ]
public static ExtensibleConfigurationPersister createTransientDomainXmlConfigurationPersister(ExecutorService executorService, ExtensionRegistry extensionRegistry) { DomainXml domainXml = new DomainXml(Module.getBootModuleLoader(), executorService, extensionRegistry); ExtensibleConfigurationPersister persister = new NullConfigurationPersister(domainXml); extensionRegistry.setWriterRegistry(persister); return persister; }
[ "slave=true" ]
[ "Handles DMR strings in the configuration\n\n@param node the node to create.\n@param name the name for the node.\n@param value the value for the node.", "Returns the collection definition of the given name if it exists.\n\n@param name The name of the collection\n@return The collection definition or <code>null</code> if there is no such collection", "Removes all documents from the collection that match the given query filter. If no documents\nmatch, the collection is not modified.\n\n@param filter the query filter to apply the the delete operation\n@return the result of the remove many operation", "Creates a random diagonal matrix where the diagonal elements are selected from a uniform\ndistribution that goes from min to max.\n\n@param N Dimension of the matrix.\n@param min Minimum value of a diagonal element.\n@param max Maximum value of a diagonal element.\n@param rand Random number generator.\n@return A random diagonal matrix.", "Returns the squared of the Euclidean distance between this vector and\nvector v.\n\n@return squared distance between this vector and v", "page breaks should be near the bottom of the band, this method used while adding subreports\nwhich has the \"start on new page\" option.\n@param band", "Gets the Taneja divergence.\n\n@param p P vector.\n@param q Q vector.\n@return The Taneja divergence between p and q.", "Gets the task from in progress map.\n\n@param jobId\nthe job id\n@return the task from in progress map", "Adjust submatrices and helper data structures for the input matrix. Must be called\nbefore the decomposition can be computed.\n\n@param orig" ]
public static int getProfileIdFromPathID(int path_id) throws Exception { return (Integer) SQLService.getInstance().getFromTable(Constants.GENERIC_PROFILE_ID, Constants.GENERIC_ID, path_id, Constants.DB_TABLE_PATH); }
[ "Return the profileId for a path\n\n@param path_id ID of path\n@return ID of profile\n@throws Exception exception" ]
[ "Returns the real value object.", "The transaction will be executed. While it is running, any semantic state change\nin the given resource will be ignored and the cache will not be cleared.", "Use this API to unset the properties of snmpalarm resources.\nProperties that need to be unset are specified in args array.", "Initialize the service with a context\n@param context the servlet context to initialize the profile.", "JSObject will return the String \"undefined\" at certain times, so we\nneed to make sure we're not getting a value that looks valid, but isn't.\n\n@param val The value from Javascript to be checked.\n@return Either null or the value passed in.", "Sets the right padding for all cells in the table.\n@param paddingRight new padding, ignored if smaller than 0\n@return this to allow chaining", "List app dynos for an app\n\n@param appName See {@link #listApps} for a list of apps that can be used.", "Perform the work of processing the various OperationContext.Stage queues, and then the DONE stage.", "Adds a port that serves the HTTP requests. If unspecified, cleartext HTTP on port 36462 is used.\n\n@param localAddress the TCP/IP load address to bind\n@param protocol {@link SessionProtocol#HTTP} or {@link SessionProtocol#HTTPS}" ]
private void persistDisabledVersion(long version) throws PersistenceFailureException { File disabledMarker = getDisabledMarkerFile(version); try { disabledMarker.createNewFile(); } catch (IOException e) { throw new PersistenceFailureException("Failed to create the disabled marker at path: " + disabledMarker.getAbsolutePath() + "\nThe store/version " + "will remain disabled only until the next restart.", e); } }
[ "Places a disabled marker file in the directory of the specified version.\n\n@param version to disable\n@throws PersistenceFailureException if the marker file could not be created (can happen if\nthe storage system has become read-only or is otherwise\ninaccessible)." ]
[ "Use this API to fetch all the callhome resources that are configured on netscaler.", "Transposes an individual block inside a block matrix.", "Returns a button component. On click, it triggers adding a bundle descriptor.\n@return a button for adding a descriptor to a bundle.", "Generic version of getting value by key from the JobContext of current thread\n@param key the key\n@param clz the val class\n@param <T> the val type\n@return the value", "Execute a server task.\n\n@param listener the transactional server listener\n@param task the server task\n@return time to wait in ms for a response from the server, or {@code -1} if the task execution failed locally", "Begin writing a named list attribute.\n\n@param name attribute name", "Create the label for a grid line.\n\n@param value the value of the line\n@param unit the unit that the value is in", "Returns the full workspace record for a single workspace.\n\n@param workspace Globally unique identifier for the workspace or organization.\n@return Request object", "Render json.\n\n@param o\nthe o\n@return the string" ]
@VisibleForTesting protected static double getNearestNiceValue( final double value, final DistanceUnit scaleUnit, final boolean lockUnits) { DistanceUnit bestUnit = bestUnit(scaleUnit, value, lockUnits); double factor = scaleUnit.convertTo(1.0, bestUnit); // nearest power of 10 lower than value int digits = (int) Math.floor((Math.log(value * factor) / Math.log(10))); double pow10 = Math.pow(10, digits); // ok, find first character double firstChar = value * factor / pow10; // right, put it into the correct bracket int barLen; if (firstChar >= 10.0) { barLen = 10; } else if (firstChar >= 5.0) { barLen = 5; } else if (firstChar >= 2.0) { barLen = 2; } else { barLen = 1; } // scale it up the correct power of 10 return barLen * pow10 / factor; }
[ "Reduce the given value to the nearest smaller 1 significant digit number starting with 1, 2 or 5.\n\n@param value the value to find a nice number for.\n@param scaleUnit the unit of the value.\n@param lockUnits if set, the values are not scaled to a \"nicer\" unit." ]
[ "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", "Returns the item at the specified position.\n\n@param position index of the item to return\n@return the item at the specified position or {@code null} when not found", "Extracts the version id from a string\n\n@param versionDir The string\n@return Returns the version id of the directory, else -1", "Loads treebank data from first argument and prints it.\n\n@param args Array of command-line arguments: specifies a filename", "Button onClick listener.\n\n@param v", "given is at the begining, of is at the end", "returns whether masking with the given mask results in a valid contiguous range for this segment,\nand if it does, if it matches the range obtained when masking the given values with the same mask.\n\n@param lowerValue\n@param upperValue\n@param mask\n@return", "Create the actual patchable target.\n\n@param name the layer name\n@param layer the layer path config\n@param metadata the metadata location for this target\n@param image the installed image\n@return the patchable target\n@throws IOException", "Count the number of non-zero elements in V" ]
protected List<String> arguments() { List<String> args = new ArgumentsBuilder() .flag("-v", verbose) .flag("--package-dir", packageDir) .param("-d", outputDirectory.getPath()) .param("-p", packageName) .map("--package:", packageNameMap()) .param("--class-prefix", classPrefix) .param("--param-prefix", parameterPrefix) .param("--chunk-size", chunkSize) .flag("--no-dispatch-client", !generateDispatchClient) .flag("--dispatch-as", generateDispatchAs) .param("--dispatch-version", dispatchVersion) .flag("--no-runtime", !generateRuntime) .intersperse("--wrap-contents", wrapContents) .param("--protocol-file", protocolFile) .param("--protocol-package", protocolPackage) .param("--attribute-prefix", attributePrefix) .flag("--prepend-family", prependFamily) .flag("--blocking", !async) .flag("--lax-any", laxAny) .flag("--no-varargs", !varArgs) .flag("--ignore-unknown", ignoreUnknown) .flag("--autopackages", autoPackages) .flag("--mutable", mutable) .flag("--visitor", visitor) .getArguments(); return unmodifiableList(args); }
[ "Returns the command line options to be used for scalaxb, excluding the\ninput file names." ]
[ "Executed read-resource-description and returns access-control info.\nReturns null in case there was any kind of problem.\n\n@param client\n@param address\n@return", "Checks anonymous fields.\n\n@param fieldDef The field descriptor\n@param checkLevel The current check level (this constraint is checked in basic and strict)\n@exception ConstraintException If the constraint has been violated", "Returns an unmodifiable view of the specified multi-value map.\n\n@param map the map for which an unmodifiable view is to be returned.\n@return an unmodifiable view of the specified multi-value map.", "Called on mouse down in the caption area, begins the dragging loop by\nturning on event capture.\n\n@see DOM#setCapture\n@see #continueDragging\n@param event the mouse down event that triggered dragging", "That is, of size 6, which become 8, since HashMaps are powers of 2. Still, it's half the size", "Use this API to fetch statistics of spilloverpolicy_stats resource of given name .", "Populates date time settings.\n\n@param record MPX record\n@param properties project properties", "Writes all auxiliary triples that have been buffered recently. This\nincludes OWL property restrictions but it also includes any auxiliary\ntriples required by complex values that were used in snaks.\n\n@throws RDFHandlerException\nif there was a problem writing the RDF triples", "To be called at node startup - it purges all job instances associated to this node.\n\n@param cnx\n@param node" ]
public static List<CmsJspResourceWrapper> convertResourceList(CmsObject cms, List<CmsResource> list) { List<CmsJspResourceWrapper> result = new ArrayList<CmsJspResourceWrapper>(list.size()); for (CmsResource res : list) { result.add(CmsJspResourceWrapper.wrap(cms, res)); } return result; }
[ "Returns a list of resource wrappers created from the input list of resources.\n\n@param cms the current OpenCms user context\n@param list the list to create the resource wrapper list from\n\n@return the list of wrapped resources." ]
[ "Gets the filename from a path or URL.\n@param path or url.\n@return the file name.", "Return list of all files in the directory.\n\n@param directory target directory on file system\n@return list of files in the directory or empty list if directory is empty.", "Constructs a list of items with given separators.\n\n@param sql\nStringBuilder to which the constructed string will be\nappended.\n@param list\nList of objects (usually strings) to join.\n@param init\nString to be added to the start of the list, before any of the\nitems.\n@param sep\nSeparator string to be added between items in the list.", "Returns the compact representations of all of the dependents of a task.\n\n@param task The task to get dependents on.\n@return Request object", "Get a list of referrers from a given domain to a photo.\n\n@param date\n(Required) Stats will be returned for this date. A day according to Flickr Stats starts at midnight GMT for all users, and timestamps will\nautomatically be rounded down to the start of the day.\n@param domain\n(Required) The domain to return referrers for. This should be a hostname (eg: \"flickr.com\") with no protocol or pathname.\n@param photoId\n(Optional) The id of the photo to get stats for. If not provided, stats for all photos will be returned.\n@param perPage\n(Optional) Number of domains to return per page. If this argument is omitted, it defaults to 25. The maximum allowed value is 100.\n@param page\n(Optional) The page of results to return. If this argument is omitted, it defaults to 1.\n@see \"http://www.flickr.com/services/api/flickr.stats.getPhotoReferrers.html\"", "Calling EventProducerInterceptor in case of logging faults.\n\n@param exchange\nthe message exchange\n@param reqFid\nthe FlowId\n\n@throws Fault\nthe fault", "See also JLS8, 4.12.5 Initial Values of Variables.\n\n@param type\n@return the default value for the given type as defined by JLS", "Use this API to fetch authenticationvserver_authenticationtacacspolicy_binding resources of given name .", "Serializes descriptor instance to XML\n@param descriptor descriptor to be serialized\n@return xml representation of descriptor as string" ]
public DbOrganization getOrganization(final String organizationId) { final DbOrganization dbOrganization = repositoryHandler.getOrganization(organizationId); if(dbOrganization == null){ throw new WebApplicationException(Response.status(Response.Status.NOT_FOUND) .entity("Organization " + organizationId + " does not exist.").build()); } return dbOrganization; }
[ "Returns an Organization\n\n@param organizationId String\n@return DbOrganization" ]
[ "Determine which daughter of the current parse tree is the head.\n\n@param t The parse tree to examine the daughters of.\nIf this is a leaf, <code>null</code> is returned\n@param parent The parent of t\n@return The daughter parse tree that is the head of <code>t</code>.\nReturns null for leaf nodes.\n@see Tree#percolateHeads(HeadFinder)\nfor a routine to call this and spread heads throughout a tree", "Determines whether the given list contains a descriptor with the same name.\n\n@param defs The list to search\n@param obj The object that is searched for\n@return <code>true</code> if the list contains a descriptor with the same name", "Print a resource UID.\n\n@param value resource UID value\n@return resource UID string", "Process the host info and determine which configuration elements are required on the slave host.\n\n@param hostInfo the host info\n@param root the model root\n@param extensionRegistry the extension registry\n@return", "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.", "if you want to parse an argument, you need a converter from String to Object\n\n@param commandLineOption specification of the command line options\n@param converter how to convert your String value to a castable Object", "Helper function to create JsonArray from collection.\n\n@param values collection of values to convert to JsonArray\n@return JsonArray with collection values", "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)})", "Called from the native side\n@param eye" ]
public int[] sampleBatchWithoutReplacement() { int[] batch = new int[batchSize]; for (int i=0; i<batch.length; i++) { if (cur == indices.length) { cur = 0; } if (cur == 0) { IntArrays.shuffle(indices); } batch[i] = indices[cur++]; } return batch; }
[ "Samples a batch of indices in the range [0, numExamples) without replacement." ]
[ "Update the currency format.\n\n@param properties project properties\n@param decimalSeparator decimal separator\n@param thousandsSeparator thousands separator", "Adds a handler for a mouse type event on the map.\n\n@param obj The object that the event should be registered on.\n@param type Type of the event to register against.\n@param h Handler that will be called when the event occurs.", "Internal used method which start the real store work.", "Request a database sends a list of UUIDs.\n\n@param count The count of UUIDs.", "Reports a given exception as a RuntimeException, since the interface does\nnot allow us to throw checked exceptions directly.\n\n@param e\nthe exception to report\n@throws RuntimeException\nin all cases", "Returns the class hierarchy of the given type, from bottom to top, starting with the given class itself.\nInterfaces are not included.\n\n@param clazz the class of interest\n@return the class hierarchy of the given class", "Call this method to initialize the Fluo connection props\n\n@param conf Job configuration\n@param props Use {@link org.apache.fluo.api.config.FluoConfiguration} to set props\nprogrammatically", "Detects if the current browser is a BlackBerry device AND\nhas a more capable recent browser. Excludes the Playbook.\nExamples, Storm, Bold, Tour, Curve2\nExcludes the new BlackBerry OS 6 and 7 browser!!\n@return detection of a Blackberry device with a better browser", "Calculate the units percent complete.\n\n@param row task data\n@return percent complete" ]
public void notifyHeaderItemMoved(int fromPosition, int toPosition) { if (fromPosition < 0 || toPosition < 0 || fromPosition >= headerItemCount || toPosition >= headerItemCount) { throw new IndexOutOfBoundsException("The given fromPosition " + fromPosition + " or toPosition " + toPosition + " is not within the position bounds for header items [0 - " + (headerItemCount - 1) + "]."); } notifyItemMoved(fromPosition, toPosition); }
[ "Notifies that an existing header item is moved to another position.\n\n@param fromPosition the original position.\n@param toPosition the new position." ]
[ "Executes the given supplier within the context of a read lock.\n\n@param <E> The result type.\n@param sup The supplier.\n@return The result of {@link Supplier#get()}.", "Get the content-type, including the optional \";base64\".", "This implementation checks whether a File can be opened,\nfalling back to whether an InputStream can be opened.\nThis will cover both directories and content resources.", "Create an ephemeral node with the given path and data. Create parents if necessary.\n@param zkClient client of zookeeper\n@param path node path of zookeeper\n@param data node data", "Read all task relationships from a ConceptDraw PROJECT file.\n\n@param cdp ConceptDraw PROJECT file", "Checks whether given class descriptor has a primary key.\n\n@param classDef The class descriptor\n@param checkLevel The current check level (this constraint is only checked in strict)\n@exception ConstraintException If the constraint has been violated", "Retrieve the next available field.\n\n@return FieldType instance for the next available field", "Use this API to export appfwlearningdata resources.", "Creates a favorite widget for a favorite entry.\n\n@param entry the favorite entry\n@return the favorite widget\n\n@throws CmsException if something goes wrong" ]
private static void checkSorted(int[] sorted) { for (int i = 0; i < sorted.length-1; i++) { if (sorted[i] > sorted[i+1]) { throw new RuntimeException("input must be sorted!"); } } }
[ "Parameter validity check." ]
[ "After obtaining a connection, perform additional tasks.\n@param handle\n@param statsObtainTime", "Adds a data source to the configuration. If in deduplication mode\ngroupno == 0, otherwise it gives the number of the group to which\nthe data source belongs.", "Returns the field with the specified value properly formatted. Multiline\nvalues are automatically indented, and dots are added on the empty lines.\n\n<pre>\nField-Name: value\n</pre>", "Start and configure GreenMail using given properties.\n\n@param properties the properties such as System.getProperties()", "Retrieves the value of the given accessible field of the given receiver.\n\n@param receiver the container of the field, not <code>null</code>\n@param fieldName the field's name, not <code>null</code>\n@return the value of the field\n\n@throws NoSuchFieldException see {@link Class#getField(String)}\n@throws SecurityException see {@link Class#getField(String)}\n@throws IllegalAccessException see {@link Field#get(Object)}\n@throws IllegalArgumentException see {@link Field#get(Object)}", "Get the list of build numbers that are to be kept forever.", "Remove an write lock.", "If the \"org.talend.esb.sam.agent.log.messageContent\" property value is \"true\" then log the message content\nIf it is \"false\" then skip the message content logging\nElse fall back to global property \"log.messageContent\"\n\n@param message\n@param logMessageContent\n@param logMessageContentOverride\n@return", "Given the lambda value perform an implicit QR step on the matrix.\n\nB^T*B-lambda*I\n\n@param lambda Stepping factor." ]
private Map<Integer, Integer> getNodeIdToZonePrimaryCount(Cluster cluster, StoreRoutingPlan storeRoutingPlan) { Map<Integer, Integer> nodeIdToZonePrimaryCount = Maps.newHashMap(); for(Integer nodeId: cluster.getNodeIds()) { nodeIdToZonePrimaryCount.put(nodeId, storeRoutingPlan.getZonePrimaryPartitionIds(nodeId).size()); } return nodeIdToZonePrimaryCount; }
[ "Go through all partition IDs and determine which node is \"first\" in the\nreplicating node list for every zone. This determines the number of\n\"zone primaries\" each node hosts.\n\n@return map of nodeId to number of zone-primaries hosted on node." ]
[ "Makes an RPC call using the client. Logs how long it took and any exceptions.\n\nNOTE: The request could be an InputStream too, but the http client will need to\nfind its length, which will require buffering it anyways.\n\n@throws DatastoreException if the RPC fails.", "Converts an absolute rectangle to a relative one wrt to the current coordinate system.\n\n@param rect absolute rectangle\n@return relative rectangle", "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", "Common mechanism to convert Synchro commentary recorss into notes.\n\n@param rows commentary table rows\n@return note text", "Process a single criteria block.\n\n@param list parent criteria list\n@param block current block", "Use this API to save cacheobject.", "Performs the conversion from standard XPath to xpath with parameterization support.", "Gets a SerialMessage with the MULTI INSTANCE GET command.\nReturns the number of instances for this command class.\n@param the command class to return the number of instances for.\n@return the serial message.", "Facade method facilitating the creation of subshell.\nSubshell is created and run inside Command method and shares the same IO and naming strtategy.\n\nRun the obtained Shell with commandLoop().\n\n@param pathElement sub-prompt\n@param parent Shell to be subshell'd\n@param appName The app name string\n@param mainHandler Command handler\n@return subshell" ]
public static RelationType getInstance(Locale locale, String type) { int index = -1; String[] relationTypes = LocaleData.getStringArray(locale, LocaleData.RELATION_TYPES); for (int loop = 0; loop < relationTypes.length; loop++) { if (relationTypes[loop].equalsIgnoreCase(type) == true) { index = loop; break; } } RelationType result = null; if (index != -1) { result = RelationType.getInstance(index); } return (result); }
[ "This method takes the textual version of a relation type\nand returns an appropriate class instance. Note that unrecognised\nvalues will cause this method to return null.\n\n@param locale target locale\n@param type text version of the relation type\n@return RelationType instance" ]
[ "Access all of the elements of the collection that evaluate to true for the\nprovided query predicate.\n@param\tpredicate\tAn OQL boolean query predicate.\n@return\tAn iterator used to iterate over the elements that evaluated true for the predicate.\n@exception\torg.odmg.QueryInvalidException\tThe query predicate is invalid.", "Use this API to fetch all the lbsipparameters resources that are configured on netscaler.", "Infer app name from entry class\n\n@param entryClass\nthe entry class\n@return\napp name inferred from the entry class", "Add component processing time to given map\n@param mapComponentTimes\n@param component", "Set the DPI value for GeoServer if there are already FORMAT_OPTIONS.", "Loads the tag definitions from the files with a \".tags.xml\" suffix from the addons.", "Get a property as a float or Default value.\n\n@param key the property name\n@param defaultValue default value", "Scans the given file looking for a complete zip file format end of central directory record.\n\n@param file the file\n\n@return true if a complete end of central directory record could be found\n\n@throws IOException", "Inserts a new instance but references via the outIdentifier, which is returned as part of the ExecutionResults\n\n@param object\n@param outIdentifier\n@return" ]
private void clearQueues(final Context context) { synchronized (eventLock) { DBAdapter adapter = loadDBAdapter(context); DBAdapter.Table tableName = DBAdapter.Table.EVENTS; adapter.removeEvents(tableName); tableName = DBAdapter.Table.PROFILE_EVENTS; adapter.removeEvents(tableName); clearUserContext(context); } }
[ "Only call async" ]
[ "Calculate the child size along the axis and measure the offset inside the\nlayout container\n@param dataIndex of child in Container\n@return true item fits the container, false - otherwise", "Retrieves a vertex attribute as an integer buffer.\nThe attribute name must be one of the\nattributes named in the descriptor passed to the constructor.\n@param attributeName name of the attribute to update\n@throws IllegalArgumentException if attribute name not in descriptor vertex attribute is not <i>int</i>\n@see #setIntArray(String, int[])\n@see #getIntVec(String)", "Use this API to fetch vpnvserver_vpnnexthopserver_binding resources of given name .", "Creates a new ServerDetails object for deployer, this will take URL and name from the oldDeployer ServerDetails", "Checks whether the folder exists for fileName, and creates it if necessary.\n\n@param fileName folder name.\n@throws IOException an IO exception.", "Use this API to delete dnspolicylabel of given name.", "Converts the node to JSON\n@return JSON object", "Returns a map from a category path to the wrapper of all the sub-categories of the category with the path given as key.\n\n@return a map from a category path to all sub-categories of the path's category.", "Starts this EventStream and begins long polling the API.\n@throws IllegalStateException if the EventStream is already started." ]
@Override public void onKeyDown(KeyDownEvent event) { char c = MiscUtils.getCharCode(event.getNativeEvent()); onKeyCodeEvent(event, box.getValue()+c); }
[ "On key down we assume the key will go at the end. It's the most\ncommon case and not that distracting if that's not true." ]
[ "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", "Backup the current version of the configuration to the versioned configuration history", "Removes the given entity from the inverse associations it manages.", "Retrieves the registar linked to the bus.\nCreates a new registar is not present.\n\n@param bus\n@return", "Loads the columns for this table into the alChildren list.", "Sets the currency code, or the regular expression to select codes.\n\n@param codes the currency codes or code expressions, not null.\n@return the query for chaining.", "Reads a stringtemplate group from a stream.\n\nThis will always return a group (empty if necessary), even if reading it from the stream fails.\n\n@param stream the stream to read from\n@return the string template group", "Renders a time period in human readable form\n\n@param time the time in milliseconds\n@return the time in human readable form", "This filter permit to return an image sized exactly as requested wherever is its ratio by\nfilling with chosen color the missing parts. Usually used with \"fit-in\" or \"adaptive-fit-in\"\n\n@param color integer representation of color." ]
public static base_response update(nitro_service client, ntpserver resource) throws Exception { ntpserver updateresource = new ntpserver(); updateresource.serverip = resource.serverip; updateresource.servername = resource.servername; updateresource.minpoll = resource.minpoll; updateresource.maxpoll = resource.maxpoll; updateresource.preferredntpserver = resource.preferredntpserver; updateresource.autokey = resource.autokey; updateresource.key = resource.key; return updateresource.update_resource(client); }
[ "Use this API to update ntpserver." ]
[ "Use this API to add tmtrafficaction.", "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.", "Plots the MSD curve for trajectory t\n@param t Trajectory to calculate the msd curve\n@param lagMin Minimum timelag (e.g. 1,2,3..) lagMin*timelag = elapsed time in seconds\n@param lagMax Maximum timelag (e.g. 1,2,3..) lagMax*timelag = elapsed time in seconds\n@param msdeval Evaluates the mean squared displacment", "Returns the query string of a URL from a parameter list.\n\n@param params\nMap with parameters\n@return query string", "Close a transaction and do all the cleanup associated with it.", "Triggers the building process, builds, creates and starts the docker container associated with the requested\ncontainer object, creates the container object and returns it\n\n@return the created container object\n\n@throws IllegalAccessException\nif there is an error accessing the container object fields\n@throws IOException\nif there is an I/O error while preparing the docker build\n@throws InvocationTargetException\nif there is an error while calling the DockerFile archive creation", "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", "Return the score of the specified element of the sorted set at key.\n@param member\n@return The score value or <code>null</code> if the element does not exist in the set.", "Invoked by subclasses; performs actual file roll. Tests to see whether roll\nis necessary have already been performed, so just do it." ]
public static double TruncatedPower(double value, double degree) { double x = Math.pow(value, degree); return (x > 0) ? x : 0.0; }
[ "Truncated power function.\n\n@param value Value.\n@param degree Degree.\n@return Result." ]
[ "Whether the address has the well-known prefix for IPv4 translatable addresses as in rfc 6052 and 6144\n@return", "Enter information into the hidden input field.\n\n@param input The input to enter into the hidden field.", "Informs this sequence model that the value of the whole sequence is initialized to sequence", "Use this API to add dnspolicylabel resources.", "Function to perform backward pooling", "Use this API to add onlinkipv6prefix resources.", "Computes either the vector p-norm or the induced matrix p-norm depending on A\nbeing a vector or a matrix respectively.\n\n@param A Vector or matrix whose norm is to be computed.\n@param p The p value of the p-norm.\n@return The computed norm.", "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", "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" ]
public static ManagerFunctions.InputN createMultTransA() { return (inputs, manager) -> { if( inputs.size() != 2 ) throw new RuntimeException("Two inputs required"); final Variable varA = inputs.get(0); final Variable varB = inputs.get(1); Operation.Info ret = new Operation.Info(); if( varA instanceof VariableMatrix && varB instanceof VariableMatrix ) { // The output matrix or scalar variable must be created with the provided manager final VariableMatrix output = manager.createMatrix(); ret.output = output; ret.op = new Operation("multTransA-mm") { @Override public void process() { DMatrixRMaj mA = ((VariableMatrix)varA).matrix; DMatrixRMaj mB = ((VariableMatrix)varB).matrix; CommonOps_DDRM.multTransA(mA,mB,output.matrix); } }; } else { throw new IllegalArgumentException("Expected both inputs to be a matrix"); } return ret; }; }
[ "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." ]
[ "Returns true if the request should continue.\n\n@return", "Clear tmpData in subtree rooted in this node.", "Uninstall current location collection client.\n\n@return true if uninstall was successful", "Get string value of flow context for current instance\n@return string value of flow context", "Use this API to fetch clusternodegroup_binding resource of given name .", "Retrieve table data, return an empty result set if no table data is present.\n\n@param name table name\n@return table data", "Create a local target.\n\n@param jbossHome the jboss home\n@param moduleRoots the module roots\n@param bundlesRoots the bundle roots\n@return the local target\n@throws IOException", "Returns all categories that are direct children of the current main category.\n\n@return all categories that are direct children of the current main category.", "Use this API to fetch all the vpnsessionaction resources that are configured on netscaler." ]
public void getElevationForLocations(LocationElevationRequest req, ElevationServiceCallback callback) { this.callback = callback; JSObject doc = (JSObject) getJSObject().eval("document"); doc.setMember(getVariableName(), this); StringBuilder r = new StringBuilder(getVariableName()) .append(".") .append("getElevationForLocations(") .append(req.getVariableName()) .append(", ") .append("function(results, status) {alert('rec:'+status);\ndocument.") .append(getVariableName()) .append(".processResponse(results, status);});"); LOG.trace("ElevationService direct call: " + r.toString()); getJSObject().eval(r.toString()); }
[ "Create a request for elevations for multiple locations.\n\n@param req\n@param callback" ]
[ "dispatch to gravity state", "Use this API to fetch appfwprofile_cookieconsistency_binding resources of given name .", "Sets the offset for the animation.\n\n@param startOffset animation will start at the specified offset value\n\n@return {@code this}, so you can chain setProperty() calls.\n@throws IllegalArgumentException\nIf {@code startOffset} is either negative or greater than\nthe animation duration", "Constructs the path from FQCN, validates writability, and creates a writer.", "Returns the comma separated list of available scopes\n\n@return String", "This may cost twice what it would in the original Map because we have to find\nthe original value for this key.\n\n@param key key with which the specified value is to be associated.\n@param value value to be associated with the specified key.\n@return previous value associated with specified key, or <tt>null</tt>\nif there was no mapping for key. A <tt>null</tt> return can\nalso indicate that the map previously associated <tt>null</tt>\nwith the specified key, if the implementation supports\n<tt>null</tt> values.", "Finish configuration.", "Use this API to update inat resources.", "Gets the data handler from event.\n\n@param event the event\n@return the data handler" ]
public List<Artifact> getArtifacts(final Boolean hasLicense) throws GrapesCommunicationException { final Client client = getClient(); final WebResource resource = client.resource(serverURL).path(RequestUtils.getArtifactsPath()); final ClientResponse response = resource.queryParam(ServerAPI.HAS_LICENSE_PARAM, hasLicense.toString()) .accept(MediaType.APPLICATION_JSON).get(ClientResponse.class); client.destroy(); if(ClientResponse.Status.OK.getStatusCode() != response.getStatus()){ final String message = "Failed to get artifacts"; if(LOG.isErrorEnabled()) { LOG.error(String.format(HTTP_STATUS_TEMPLATE_MSG, message, response.getStatus())); } throw new GrapesCommunicationException(message, response.getStatus()); } return response.getEntity(ArtifactList.class); }
[ "Send a get artifacts request\n\n@param hasLicense\n@return list of artifact\n@throws GrapesCommunicationException" ]
[ "object -> xml\n\n@param object\n@param childClass", "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", "Returns the later of two dates, handling null values. A non-null Date\nis always considered to be later than a null Date.\n\n@param d1 Date instance\n@param d2 Date instance\n@return Date latest date", "Creates a list of all permutations for a set with N elements.\n\n@param N Number of elements in the list being permuted.\n@return A list containing all the permutations.", "Delivers the correct JSON Object for the target\n\n@param target\n@throws org.json.JSONException", "returns the bytesize of the give bitmap", "Do some magic to turn request parameters into a context object", "Old REST client uses new REST service", "Starts all streams." ]
public ReferrerList getPhotosetReferrers(Date date, String domain, String photosetId, int perPage, int page) throws FlickrException { return getReferrers(METHOD_GET_PHOTOSET_REFERRERS, domain, "photoset_id", photosetId, date, perPage, page); }
[ "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\"" ]
[ "Use this API to update ntpserver resources.", "Retrieve the correct index for the supplied Table instance.\n\n@param table Table instance\n@return index", "Create a SVG graphic with the give dimensions.\n\n@param size The size of the SVG graphic.", "Determine if a CharSequence can be parsed as a BigInteger.\n\n@param self a CharSequence\n@return true if the CharSequence can be parsed\n@see #isBigInteger(String)\n@since 1.8.2", "Request the artwork with a particular artwork ID, given a connection to a player that has already been set up.\n\n@param artworkId identifies the album art to retrieve\n@param slot the slot identifier from which the associated track was loaded\n@param trackType the kind of track that owns the artwork\n@param client the dbserver client that is communicating with the appropriate player\n\n@return the track's artwork, or null if none is available\n\n@throws IOException if there is a problem communicating with the player", "Starts this EventStream and begins long polling the API.\n@throws IllegalStateException if the EventStream is already started.", "Optionally specify the variable name to use for the output of this condition", "Groups all of the metadata cache files that are candidates for auto-attachment to player slots into lists\nthat are keyed by the playlist ID used to create the cache file. Files that cache all tracks have a playlist\nID of 0.\n\n@return a map from playlist ID to the caches holding tracks from that playlist", "Removes a metadata provider so it will no longer be consulted to provide metadata for tracks loaded from any\nmedia.\n\n@param provider the metadata provider to remove." ]
public static int compare(double a, double b, double delta) { if (equals(a, b, delta)) { return 0; } return Double.compare(a, b); }
[ "Compares two double values up to some delta.\n\n@param a\n@param b\n@param delta\n@return The value 0 if a equals b, a value greater than 0 if if a > b, and a value less than 0 if a < b." ]
[ "Set the inner angle of the spotlight cone in degrees.\n\nBeyond the outer cone angle there is no illumination.\nThe underlying uniform \"outer_cone_angle\" is the cosine\nof this input angle. If the inner cone angle is larger than the outer cone angle\nthere will be unexpected results.\n@see #setInnerConeAngle(float)\n@see #getOuterConeAngle()", "Add the given query parameters.\n@param params the params\n@return this UriComponentsBuilder", "Indicates if a bean's scope type is passivating\n\n@param bean The bean to inspect\n@return True if the scope is passivating, false otherwise", "Return true if the DeclarationExpression represents a 'final' variable declaration.\n\nNOTE: THIS IS A WORKAROUND.\n\nThere does not seem to be an easy way to determine whether the 'final' modifier has been\nspecified for a variable declaration. Return true if the 'final' is present before the variable name.", "Template-and-Hook method for generating the url required by the jdbc driver\nto allow for modifying an existing database.", "Pretty print a progress update after each batch complete.\n\n@param batchCount current batch\n@param numBatches total number of batches\n@param partitionStoreCount partition stores migrated\n@param numPartitionStores total number of partition stores to migrate\n@param totalTimeMs total time, in milliseconds, of execution thus far.", "Convert a url to a file object. No checks are made to see if file exists but there are some hacks that\nare needed to convert uris to files across platforms.\n\n@param fileURI the uri to convert", "Initializes the queue that tracks the next set of nodes with no dependencies or\nwhose dependencies are resolved.", "Scans all Forge addons for classes accepted by given filter.\n\nTODO: Could be refactored - scan() is almost the same." ]
public float rotateToFaceCamera(final Widget widget) { final float yaw = getMainCameraRigYaw(); GVRTransform t = getMainCameraRig().getHeadTransform(); widget.rotateWithPivot(t.getRotationW(), 0, t.getRotationY(), 0, 0, 0, 0); return yaw; }
[ "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 a replica of this instance with its quality value removed.\n@return the same instance if the media type doesn't contain a quality value, or a new one otherwise", "Build data model for serialization.", "Get the bean if it exists in the contexts.\n\n@return An instance of the bean\n@throws ContextNotActiveException if the context is not active\n@see javax.enterprise.context.spi.Context#get(BaseBean, boolean)", "Check that the parameter array has at least as many elements as it\nshould.\n\n@param parameterName\nThe name of the user-supplied parameter that we are validating\nso that the user can easily find the error in their code.\n@param actualLength\nThe actual array length\n@param minimumLength\nThe minimum array length", "Update the state of the picker. If it has an owner, the picker\nwill use that object to derive its position and orientation.\nThe \"active\" state of this controller is used to indicate touch.\nThe cursor position is updated after picking.", "Returns the ReportModel with given name.", "Retrieve the recurrence type.\n\n@param value integer value\n@return RecurrenceType instance", "Use this API to enable snmpalarm resources of given names.", "set the specified object at index\n\n@param object The object to add at the end of the array." ]
private BigInteger getTaskCalendarID(Task mpx) { BigInteger result = null; ProjectCalendar cal = mpx.getCalendar(); if (cal != null) { result = NumberHelper.getBigInteger(cal.getUniqueID()); } else { result = NULL_CALENDAR_ID; } return (result); }
[ "This method retrieves the UID for a calendar associated with a task.\n\n@param mpx MPX Task instance\n@return calendar UID" ]
[ "Add the collection of elements to this collection. This will also them to the associated database table.\n\n@return Returns true if any of the items did not already exist in the collection otherwise false.", "Accessor method used to retrieve an Rate 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\n@throws MPXJException normally thrown when parsing fails", "Adds an extent relation to the current class definition.\n\n@param attributes The attributes of the tag\n@return An empty string\n@exception XDocletException If an error occurs\[email protected] type=\"content\"\[email protected] name=\"name\" optional=\"false\" description=\"The fully qualified name of the extending\nclass\"", "Use this API to fetch a vpnglobal_vpnnexthopserver_binding resources.", "The number of bytes required to hold the given number\n\n@param number The number being checked.\n@return The required number of bytes (must be 8 or less)", "This method prints goal information of an agent through its external\naccess. It can be used to check the correct behaviour of the agent.\n\n@param agent_name\nThe name of the agent\n@param connector\nThe connector to get the external access\n@return goals the IGoal[] with all the information, so the tester can\nlook for information", "Go through all node IDs and determine which node\n\n@param cluster\n@param storeRoutingPlan\n@return", "Detects if the current browser is a BlackBerry device AND\nhas a more capable recent browser. Excludes the Playbook.\nExamples, Storm, Bold, Tour, Curve2\nExcludes the new BlackBerry OS 6 and 7 browser!!\n@return detection of a Blackberry device with a better browser", "Use this API to add sslaction resources." ]
public Number getMinutesPerYear() { return Integer.valueOf(NumberHelper.getInt(getMinutesPerDay()) * NumberHelper.getInt(getDaysPerMonth()) * 12); }
[ "Retrieve the default number of minutes per year.\n\n@return minutes per year" ]
[ "Compute 2-dimensional Perlin noise.\n@param x the x coordinate\n@param y the y coordinate\n@return noise value at (x,y)", "Shuffle an array.\n\n@param array Array.\n@param seed Random seed.", "Computes the null space using SVD. Slowest bust most stable way to find the solution\n\n@param A (Input) Matrix\n@param totalSingular Number of singular values\n@return Null space", "Replaces an existing metadata value.\n@param path the path that designates the key. Must be prefixed with a \"/\".\n@param value the value.\n@return this metadata object.", "Computes the d and H parameters.\n\nd = J'*(f(x)-y) <--- that's also the gradient\nH = J'*J", "Sets the ProjectCalendar instance from which this calendar is derived.\n\n@param calendar base calendar instance", "Assigns the element in the Matrix to the specified value. Performs a bounds check to make sure\nthe requested element is part of the matrix.\n\n@param row The row of the element.\n@param col The column of the element.\n@param value The element's new value.", "Wrap an existing setter.", "Add new control at the control bar with specified touch listener, resource and position.\nSize of control bar is updated based on new number of controls.\n@param name name of the control to remove\n@param resId the control face\n@param listener touch listener\n@param position control position in the bar" ]
public static base_response export(nitro_service client, application resource) throws Exception { application exportresource = new application(); exportresource.appname = resource.appname; exportresource.apptemplatefilename = resource.apptemplatefilename; exportresource.deploymentfilename = resource.deploymentfilename; return exportresource.perform_operation(client,"export"); }
[ "Use this API to export application." ]
[ "Use this API to fetch a tmglobal_binding resource .", "Write a duration field to the JSON file.\n\n@param fieldName field name\n@param value field value", "Synchronize the geotools transaction with the platform transaction, if such a transaction is active.\n\n@param featureStore\n@param dataSource", "Set cached value for the attribute. Used for dynamically loaded values in the Acacia content editor.\n\n@param attribute the attribute for which the value should be cached\n@param value the value to cache", "Request the artwork with a particular artwork ID, given a connection to a player that has already been set up.\n\n@param artworkId identifies the album art to retrieve\n@param slot the slot identifier from which the associated track was loaded\n@param trackType the kind of track that owns the artwork\n@param client the dbserver client that is communicating with the appropriate player\n\n@return the track's artwork, or null if none is available\n\n@throws IOException if there is a problem communicating with the player", "Prints a suggestion to stderr for the argument based on the levenshtein distance metric\n\n@param arg the argument which could not be assigned to a flag\n@param co the {@link ConfigOption} List where every flag is stored", "Processes text as a FreeMarker template. Usually used to process an inner body of a tag.\n\n@param text text of a template.\n@param params map with parameters for processing.\n@param writer writer to write output to.", "Gets the value of the given header field.\n@param fieldName name of the header field.\n@return value of the header.", "Returns the path in the RFS where the Solr spellcheck files reside.\n@return String representation of Solrs spellcheck RFS path." ]
public void fire(TestCaseFinishedEvent event) { TestCaseResult testCase = testCaseStorage.get(); event.process(testCase); Step root = stepStorage.pollLast(); if (Status.PASSED.equals(testCase.getStatus())) { new RemoveAttachmentsEvent(AllureConfig.newInstance().getRemoveAttachments()).process(root); } testCase.getSteps().addAll(root.getSteps()); testCase.getAttachments().addAll(root.getAttachments()); stepStorage.remove(); testCaseStorage.remove(); notifier.fire(event); }
[ "Process TestCaseFinishedEvent. Add steps and attachments from\ntop step from stepStorage to current testCase, then remove testCase\nand step from stores. Also remove attachments matches removeAttachments\nconfig.\n\n@param event to process" ]
[ "This method extracts assignment data from a Planner file.\n\n@param plannerProject Root node of the Planner file", "Look for a style in the named styles provided in the configuration.\n\n@param styleName the name of the style to look for.", "Builds a configuration object based on given properties.\n\n@param properties the properties.\n@return a configuration and never null.", "Load the windows resize handler with initial view port detection.", "This method is very similar to addMainHandler, except ShellFactory\nwill pass all handlers registered with this method to all this shell's subshells.\n\n@see org.gearvrf.debug.cli.Shell#addMainHandler(java.lang.Object, java.lang.String)\n\n@param handler Object which should be registered as handler.\n@param prefix Prefix that should be prepended to all handler's command names.", "Use this API to unset the properties of nsacl6 resources.\nProperties that need to be unset are specified in args array.", "Determines the encoding block groups for the specified data.", "Try to extract a numeric version from a collection of strings.\n\n@param versionStrings Collection of string properties.\n@return The version string if exists in the collection.", "Returns whether this address contains the non-zero host addresses in other.\n@param other\n@return" ]
double getThreshold(String x, String y, double p) { return 2 * Math.max(x.length(), y.length()) * (1 - p); }
[ "Calculate a threshold.\n\n@param x first string.\n@param y second string.\n@param p the threshold coefficient.\n@return 2 maxLength(x, y) (1-p)" ]
[ "Print a date.\n\n@param value Date instance\n@return string representation of a date", "Returns the x-coordinate of a vertex position.\n\n@param vertex the vertex index\n@return the x coordinate", "Adds custom header to request\n\n@param key\n@param value", "Serialize this `AppDescriptor` and output byte array\n\n@return\nserialize this `AppDescriptor` into byte array", "Validate ipv4 address with regular expression\n\n@param ip\naddress for validation\n\n@return true valid ip address, false invalid ip address", "marks the message as read", "Save page to log\n\n@return address of this page after save", "Read an element which contains only a single boolean attribute.\n@param reader the reader\n@param attributeName the attribute name, usually \"value\"\n@return the boolean value\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.", "This static method calculated the vega of a call option under a Black-Scholes model\n\n@param initialStockValue The initial value of the underlying, i.e., the spot.\n@param riskFreeRate The risk free rate of the bank account numerarie.\n@param volatility The Black-Scholes volatility.\n@param optionMaturity The option maturity T.\n@param optionStrike The option strike.\n@return The vega of the option" ]
@SuppressWarnings("unchecked") private static Object resolveConflictWithResolver( final ConflictHandler conflictResolver, final BsonValue documentId, final ChangeEvent localEvent, final ChangeEvent remoteEvent ) { return conflictResolver.resolveConflict( documentId, localEvent, remoteEvent); }
[ "Returns the resolution of resolving the conflict between a local and remote event using\nthe given conflict resolver.\n\n@param conflictResolver the conflict resolver to use.\n@param documentId the document id related to the conflicted events.\n@param localEvent the conflicted local event.\n@param remoteEvent the conflicted remote event.\n@return the resolution to the conflict." ]
[ "Get the class name without the package\n\n@param c The class name with package\n@return the class name without the package", "Get an image using the specified URL suffix.\n\n@deprecated\n@param suffix\nThe URL suffix, including the .extension\n@return The BufferedImage object\n@throws IOException", "Append a Handler to every parent of the given class\n@param parent The class of the parents to add the child to\n@param child The Handler to add.", "Runs the example program.\n\n@param args\n@throws IOException\nif there was a problem in writing the output file", "Return the lines of a CharSequence as a List of String.\n\n@param self a CharSequence object\n@return a list of lines\n@throws java.io.IOException if an error occurs\n@since 1.8.2", "Get the inactive history directories.\n\n@return the inactive history", "In this method perform the actual override in runtime.\n\n@see org.apache.log4j.spi.HierarchyEventListener#addAppenderEvent(org.apache.log4j.Category, org.apache.log4j.Appender)", "Adds an option to the JVM arguments to enable JMX connection\n\n@param jvmArgs the JVM args\n@return a new list of JVM args", "used for encoding queries or form data" ]
public List<TerminalString> getOptionLongNamesWithDash() { List<ProcessedOption> opts = getOptions(); List<TerminalString> names = new ArrayList<>(opts.size()); for (ProcessedOption o : opts) { if(o.getValues().size() == 0 && o.activator().isActivated(new ParsedCommand(this))) names.add(o.getRenderedNameWithDashes()); } return names; }
[ "Return all option names that not already have a value\nand is enabled" ]
[ "Convert an Integer value into a String.\n\n@param value Integer value\n@return String value", "Creates a future that will send a request to the reporting host and call\nthe handler with the response\n\n@param path the path at the reporting host which the request will be made\n@param reportingHandler the handler to receive the response once executed\nand recieved\n@return a {@link java.util.concurrent.Future} for handing the request", "Create an `AppDescriptor` with appName and package name specified\n\nIf `appName` is `null` or blank, it will try the following\napproach to get app name:\n\n1. check the {@link Version#getArtifactId() artifact id} and use it unless\n2. if artifact id is null or empty, then infer app name using {@link AppNameInferer}\n\n@param appName\nthe app name\n@param packageName\nthe package name of the app\n@return\nan `AppDescriptor` instance", "Bessel function of the second kind, of order 0.\n\n@param x Value.\n@return Y0 value.", "Gets the metrics as a map whose keys are the metric name and whose values are the metric values.\n\n@return map", "Removes all items from the list box.", "Determine the height of the preview given an index into it.\n\n@param segment the index of the waveform preview segment to examine\n@param front if {@code true} the height of the front (brighter) segment of a color waveform preview is returned,\notherwise the height of the back (dimmer) segment is returned. Has no effect for blue previews.\n\n@return a value from 0 to 31 representing the height of the waveform at that segment, which may be an average\nof a number of values starting there, determined by the scale", "Delete the given file in a separate thread\n\n@param file The file to delete", "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." ]
private List<String> getCommandLines(File file) { List<String> lines = new ArrayList<>(); try (BufferedReader reader = new BufferedReader(new FileReader(file))) { String line = reader.readLine(); while (line != null) { lines.add(line); line = reader.readLine(); } } catch (Throwable e) { throw new IllegalStateException("Failed to process file " + file.getAbsolutePath(), e); } return lines; }
[ "read the file as a list of text lines" ]
[ "Add a shutdown listener, which gets called when all requests completed on shutdown.\n\n@param listener the shutdown listener", "Returns iban's country code and check digit.\n\n@param iban String\n@return countryCodeAndCheckDigit String", "Processes the template for all column definitions of the current table.\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\"", "Read task relationships.", "Deletes a chain of vertices from this list.", "Close all HTTP clients created by this factory\n@throws IOException if an I/O error occurs", "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", "Show or hide the options column dependent on the provided edit mode.\n@param oldMode the old edit mode\n@param newMode the edit mode for which the options column's visibility should be adjusted.", "Decides what the Map Web provider should be used and generates a builder for it.\n\n@return The AirMapViewBuilder for the selected Map Web provider." ]
private void getMonthlyDates(Calendar calendar, int frequency, List<Date> dates) { if (m_relative) { getMonthlyRelativeDates(calendar, frequency, dates); } else { getMonthlyAbsoluteDates(calendar, frequency, dates); } }
[ "Calculate start dates for a monthly recurrence.\n\n@param calendar current date\n@param frequency frequency\n@param dates array of start dates" ]
[ "Use this API to delete sslcipher of given name.", "Performs an efficient update of each columns' norm", "Returns a SimpleConfiguration clientConfig with properties set from this configuration\n\n@return SimpleConfiguration", "Adds an additional label to the constructed document.\n\n@param text\nthe text of the label\n@param languageCode\nthe language code of the label\n@return builder object to continue construction", "Returns all categories that are direct children of the current main category.\n\n@return all categories that are direct children of the current main category.", "Determines the constraints relating to a task.\n\n@param row row data\n@param task Task instance", "Attach a metadata cache file to a particular player media slot, so the cache will be used instead of querying\nthe player for metadata. This supports operation with metadata during shows where DJs are using all four player\nnumbers and heavily cross-linking between them.\n\nIf the media is ejected from that player slot, the cache will be detached.\n\n@param slot the media slot to which a meta data cache is to be attached\n@param file the metadata cache to be attached\n\n@throws IOException if there is a problem reading the cache file\n@throws IllegalArgumentException if an invalid player number or slot is supplied\n@throws IllegalStateException if the metadata finder is not running", "Convenience method to convert a CSV string list to a set. Note that this\nwill suppress duplicates.\n\n@param str the input String\n@return a Set of String entries in the list", "If the Authtoken was already created in a separate program but not saved to file.\n\n@param authToken\n@param tokenSecret\n@param username\n@return\n@throws IOException" ]
public ImageSource apply(ImageSource input) { ImageSource originalImage = input; int width = originalImage.getWidth(); int height = originalImage.getHeight(); boolean[][] matrix = new boolean[width][height]; // black n white boolean matrix; true = blck, false = white // Copy ImageSource filteredImage = new MatrixSource(input); int[] histogram = OtsuBinarize.imageHistogram(originalImage); int totalNumberOfpixels = height * width; int threshold = OtsuBinarize.threshold(histogram, totalNumberOfpixels); int black = 0; int white = 255; int gray; int alpha; int newColor; for (int i = 0; i < width; i++) { for (int j = 0; j < height; j++) { gray = originalImage.getGray(i, j); if (gray > threshold) { matrix[i][j] = false; } else { matrix[i][j] = true; } } } int blackTreshold = letterThreshold(originalImage, matrix); for (int i = 0; i < width; i++) { for (int j = 0; j < height; j++) { gray = originalImage.getGray(i, j); alpha = originalImage.getA(i, j); if (gray > blackTreshold) { newColor = white; } else { newColor = black; } newColor = ColorHelper.getARGB(newColor, newColor, newColor, alpha); filteredImage.setRGB(i, j, newColor); } } return filteredImage; }
[ "radi otsu da dobije spojena crna slova i ra\n\n@param input\n@return the processed image" ]
[ "Store the data of a print job in the registry.\n\n@param printJobStatus the print job status", "Processes a procedure tag.\n\n@param template The template\n@param attributes The attributes of the tag\n@exception XDocletException If an error occurs\[email protected] type=\"content\"\[email protected] name=\"arguments\" optional=\"true\" description=\"The arguments of the procedure as a comma-separated\nlist of names of procedure attribute tags\"\[email protected] name=\"attributes\" optional=\"true\" description=\"Attributes of the procedure as name-value pairs 'name=value',\nseparated by commas\"\[email protected] name=\"documentation\" optional=\"true\" description=\"Documentation on the procedure\"\[email protected] name=\"include-all-fields\" optional=\"true\" description=\"For insert/update: whether all fields of the current\nclass shall be included (arguments is ignored then)\" values=\"true,false\"\[email protected] name=\"include-pk-only\" optional=\"true\" description=\"For delete: whether all primary key fields\nshall be included (arguments is ignored then)\" values=\"true,false\"\[email protected] name=\"name\" optional=\"false\" description=\"The name of the procedure\"\[email protected] name=\"return-field-ref\" optional=\"true\" description=\"Identifies the field that receives the return value\"\[email protected] name=\"type\" optional=\"false\" description=\"The type of the procedure\" values=\"delete,insert,update\"", "Modifier method to set the unique ID of this calendar.\n\n@param uniqueID unique identifier", "Switches from a dense to sparse matrix", "Returns the next power of 2 after the input value x.\n\n@param x Input value x.\n@return Returns the next power of 2 after the input value x.", "Create the close button UI Component.\n@return the close button.", "Sets the model that the handling works on.\n\n@param databaseModel The database model\n@param objModel The object model", "Returns the overtime cost of this resource assignment.\n\n@return cost", "Find all the values of the requested type.\n\n@param valueTypeToFind the type of the value to return.\n@param <T> the type of the value to find.\n@return the key, value pairs found." ]
public void loadPhysics(String filename, GVRScene scene) throws IOException { GVRPhysicsLoader.loadPhysicsFile(getGVRContext(), filename, true, scene); }
[ "Load physics information for the current avatar\n@param filename name of physics file\n@param scene scene the avatar is part of\n@throws IOException if physics file cannot be parsed" ]
[ "Creates a field map for assignments.\n\n@param props props data", "Create a polygon that represents in world space the exact area that will be visible on the printed\nmap.\n\n@param context map context", "Last caller of this method will unregister the Mbean. All callers\ndecrement the counter.", "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", "Get a list of referring domains for a collection.\n\n@param date\n(Required) Stats will be returned for this date. A day according to Flickr Stats starts at midnight GMT for all users, and timestamps will\nautomatically be rounded down to the start of the day.\n@param collectionId\n(Optional) The id of the collection to get stats for. If not provided, stats for all collections will be returned.\n@param perPage\n(Optional) Number of domains to return per page. If this argument is omitted, it defaults to 25. The maximum allowed value is 100.\n@param page\n(Optional) The page of results to return. If this argument is omitted, it defaults to 1.\n@see \"http://www.flickr.com/services/api/flickr.stats.getCollectionDomains.html\"", "Returns the red color component of a color from a vertex color set.\n\n@param vertex the vertex index\n@param colorset the color set\n@return the red color component", "Method to initialize the list.\n\n@param resList a given instance or null\n@return an instance", "Returns a count of in-window events.\n\n@return the the count of in-window events.", "Visit all child nodes but not this one.\n\n@param visitor The visitor to use." ]
private void processWorkPattern(ProjectCalendarWeek week, Integer workPatternID, Map<Integer, Row> workPatternMap, Map<Integer, List<Row>> timeEntryMap, Map<Integer, DayType> exceptionTypeMap) { Row workPatternRow = workPatternMap.get(workPatternID); if (workPatternRow != null) { week.setName(workPatternRow.getString("NAMN")); List<Row> timeEntryRows = timeEntryMap.get(workPatternID); if (timeEntryRows != null) { long lastEndTime = Long.MIN_VALUE; Day currentDay = Day.SUNDAY; ProjectCalendarHours hours = week.addCalendarHours(currentDay); Arrays.fill(week.getDays(), DayType.NON_WORKING); for (Row row : timeEntryRows) { Date startTime = row.getDate("START_TIME"); Date endTime = row.getDate("END_TIME"); if (startTime == null) { startTime = DateHelper.getDayStartDate(new Date(0)); } if (endTime == null) { endTime = DateHelper.getDayEndDate(new Date(0)); } if (startTime.getTime() > endTime.getTime()) { endTime = DateHelper.addDays(endTime, 1); } if (startTime.getTime() < lastEndTime) { currentDay = currentDay.getNextDay(); hours = week.addCalendarHours(currentDay); } DayType type = exceptionTypeMap.get(row.getInteger("EXCEPTIOP")); if (type == DayType.WORKING) { hours.addRange(new DateRange(startTime, endTime)); week.setWorkingDay(currentDay, DayType.WORKING); } lastEndTime = endTime.getTime(); } } } }
[ "Populates a ProjectCalendarWeek instance from Asta work pattern data.\n\n@param week target ProjectCalendarWeek instance\n@param workPatternID target work pattern ID\n@param workPatternMap work pattern data\n@param timeEntryMap time entry map\n@param exceptionTypeMap exception type map" ]
[ "Convert a name into initials.\n\n@param name source name\n@return initials", "commit all envelopes against the current broker", "Copied from original SeleniumProxyHandler\nChanged SslRelay to SslListener and getSslRelayOrCreateNew to getSslRelayOrCreateNewOdo\nNo other changes to the function\n\n@param pathInContext\n@param pathParams\n@param request\n@param response\n@throws HttpException\n@throws IOException", "Create a string from bytes using the given encoding\n\n@param bytes The bytes to create a string from\n@param encoding The encoding of the string\n@return The created string", "Create a new remote proxy controller.\n\n@param client the transactional protocol client\n@param pathAddress the path address\n@param addressTranslator the address translator\n@param targetKernelVersion the {@link ModelVersion} of the kernel management API exposed by the proxied process\n@return the proxy controller", "Gets a tokenizer from a reader.", "Remove the listener active in this session.\n\n@param listenerId the id of the listener to remove", "Remove a key from the given 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 key the key to remove.\n@return the removed value, or <code>null</code> if the key was not\npresent in the map.\n@since 2.15", "Returns an Organization that suits the Module or null if there is none\n\n@param dbModule DbModule\n@return DbOrganization" ]
public boolean shouldCompress(String requestUri) { String uri = requestUri.toLowerCase(); return checkSuffixes(uri, zipSuffixes); }
[ "Should this request URI be compressed?\n\n@param requestUri request URI\n@return true when should be compressed" ]
[ "Get replication document state for a given replication document ID.\n\n@param docId The replication document ID\n@return Replication document for {@code docId}", "Creates custom Http Client connection pool to be used by Http Client\n\n@return {@link PoolingHttpClientConnectionManager}", "Stores template parameters for OpenShiftAssistantTemplate.\n\n@param name template parameter name\n@param value template parameter value", "Used to load a classifier stored as a resource inside a jar file. THIS\nFUNCTION WILL ONLY WORK IF THE CODE WAS LOADED FROM A JAR FILE WHICH HAS A\nSERIALIZED CLASSIFIER STORED INSIDE IT.\n\n@param resourceName\nName of clasifier resource inside the jar file.\n@return A CRFClassifier stored in the jar file", "This method prints plan information of an agent through its external\naccess. It can be used to check the correct behaviour of the agent.\n\n@param agent_name\nThe name of the agent\n@param connector\nThe connector to get the external access\n@return plans the IPlan[] with all the information, so the tester can\nlook for information", "Called when the scene object gets a new parent.\n\n@param parent New parent of this scene object.", "Cause the container to be cleaned up, including all registered bean\nmanagers, and all deployment services", "Process an individual UDF.\n\n@param udf UDF definition", "When all the elements in a sorted set are inserted with the same score, in order to force lexicographical\nordering, this command returns the number of elements in the sorted set with a value in the given range.\n@param lexRange\n@return the number of elements in the specified range." ]
public List<String> invoke(File f, VirtualChannel channel) throws IOException, InterruptedException { MavenProject mavenProject = getMavenProject(f.getAbsolutePath()); return mavenProject.getModel().getModules(); }
[ "This is needed when running on slaves." ]
[ "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.", "Has to be called when the scenario is finished in order to execute after methods.", "Converts from a Fluo RowColumn to a Accumulo Key\n\n@param rc RowColumn\n@return Key", "Requests the cue list for a specific track ID, given a dbserver connection to a player that has already\nbeen set up.\n\n@param rekordboxId the track of interest\n@param slot identifies the media slot we are querying\n@param client the dbserver client that is communicating with the appropriate player\n\n@return the retrieved cue list, or {@code null} if none was available\n@throws IOException if there is a communication problem", "Sets the distance from the origin to the near clipping plane for the\nwhole camera rig.\n\n@param near\nDistance to the near clipping plane.", "Convert the MSPDI representation of a UUID into a Java UUID instance.\n\n@param value MSPDI UUID\n@return Java UUID instance", "Use this API to update snmpmanager resources.", "Returns all resources that belong to the bundle\nThis includes the descriptor if one exists.\n\n@return List of the bundle resources, including the descriptor.", "Add a custom Log Record Handler to the root of the tree\n@param handler The handler to add\n@return this" ]
public Dataset<String, String> getDataset(Dataset<String, String> oldData, Index<String> goodFeatures) { //public Dataset getDataset(List data, Collection goodFeatures) { //makeAnswerArraysAndTagIndex(data); int[][] oldDataArray = oldData.getDataArray(); int[] oldLabelArray = oldData.getLabelsArray(); Index<String> oldFeatureIndex = oldData.featureIndex; int[] oldToNewFeatureMap = new int[oldFeatureIndex.size()]; int[][] newDataArray = new int[oldDataArray.length][]; System.err.print("Building reduced dataset..."); int size = oldFeatureIndex.size(); int max = 0; for (int i = 0; i < size; i++) { oldToNewFeatureMap[i] = goodFeatures.indexOf(oldFeatureIndex.get(i)); if (oldToNewFeatureMap[i] > max) { max = oldToNewFeatureMap[i]; } } for (int i = 0; i < oldDataArray.length; i++) { int[] data = oldDataArray[i]; size = 0; for (int j = 0; j < data.length; j++) { if (oldToNewFeatureMap[data[j]] > 0) { size++; } } int[] newData = new int[size]; int index = 0; for (int j = 0; j < data.length; j++) { int f = oldToNewFeatureMap[data[j]]; if (f > 0) { newData[index++] = f; } } newDataArray[i] = newData; } Dataset<String, String> train = new Dataset<String, String>(oldData.labelIndex, oldLabelArray, goodFeatures, newDataArray, newDataArray.length); System.err.println("done."); if (flags.featThreshFile != null) { System.err.println("applying thresholds..."); List<Pair<Pattern,Integer>> thresh = getThresholds(flags.featThreshFile); train.applyFeatureCountThreshold(thresh); } else if (flags.featureThreshold > 1) { System.err.println("Removing Features with counts < " + flags.featureThreshold); train.applyFeatureCountThreshold(flags.featureThreshold); } train.summaryStatistics(); return train; }
[ "Build a Dataset from some data.\n\n@param oldData This {@link Dataset} represents data for which we which to\nsome features, specifically those features not in the {@link edu.stanford.nlp.util.Index}\ngoodFeatures.\n@param goodFeatures An {@link edu.stanford.nlp.util.Index} of features we wish to retain.\n@return A new {@link Dataset} wheres each datapoint contains only features\nwhich were in goodFeatures." ]
[ "Transforms user name and icon size into the image path.\n\n@param name the user name\n@param size IconSize to get icon for\n\n@return the path", "Returns if a MongoDB document is a todo item.", "Go through all nodes and determine how many partition Ids each node\nhosts.\n\n@param cluster\n@return map of nodeId to number of primary partitions hosted on node.", "Return the numeraire at a given time.\nThe numeraire is provided for interpolated points. If requested on points which are not\npart of the tenor discretization, the numeraire uses a linear interpolation of the reciprocal\nvalue. See ISBN 0470047224 for details.\n\n@param time Time time <i>t</i> for which the numeraire should be returned <i>N(t)</i>.\n@return The numeraire at the specified time as <code>RandomVariableFromDoubleArray</code>\n@throws net.finmath.exception.CalculationException Thrown if the valuation fails, specific cause may be available via the <code>cause()</code> method.", "Use this API to fetch inat resource of given name .", "Inserts the LokenList immediately following the 'before' token", "Reads data from the SP file.\n\n@return Project File instance", "Creates a window visually showing the matrix's state. Block means an element is zero.\nRed positive and blue negative. More intense the color larger the element's absolute value\nis.\n\n@param A A matrix.\n@param title Name of the window.", "Returns the names of the bundles configured as workplace bundles in any module configuration.\n@return the names of the bundles configured as workplace bundles in any module configuration." ]
public static String defaultString(final String str, final String fallback) { return isNullOrEmpty(str) ? fallback : str; }
[ "Return fallback if first string is null or empty" ]
[ "Converts from a Fluo RowColumn to a Accumulo Key\n\n@param rc RowColumn\n@return Key", "Read configuration from zookeeper", "Adds an item to the list box, specifying an initial value for the item.\n\n@param value the item's value, to be submitted if it is part of a\n{@link FormPanel}; cannot be <code>null</code>\n@param text the text of the item to be added\n@param reload perform a 'material select' reload to update the DOM.", "Sets the last operation response.\n\n@param response the last operation response.", "Helper to read an optional String value list.\n@param path The XML path of the element to read.\n@return The String list stored in the XML, or <code>null</code> if the value could not be read.", "Notifies that a content item is removed.\n\n@param position the position.", "Binds a script bundle to a scene.\n@param scriptBundle\nThe {@code GVRScriptBundle} object containing script binding information.\n@param scene\nThe scene to bind to.\n@throws IOException if script bundle file cannot be read.\n@throws GVRScriptException if script processing error occurs.", "Gets a method based on data in the override_db table\n\n@param overrideId ID of override\n@return Method found", "Prepares the CmsObject for jumping to this favorite location, and returns the appropriate URL.\n\n@param cms the CmsObject to initialize for jumping to the favorite\n@return the link for the favorite location\n\n@throws CmsException if something goes wrong" ]
private void makeSingularPositive() { numSingular = qralg.getNumberOfSingularValues(); singularValues = qralg.getSingularValues(); for( int i = 0; i < numSingular; i++ ) { double val = qralg.getSingularValue(i); if( val < 0 ) { singularValues[i] = 0.0 - val; if( computeU ) { // compute the results of multiplying it by an element of -1 at this location in // a diagonal matrix. int start = i* Ut.numCols; int stop = start+ Ut.numCols; for( int j = start; j < stop; j++ ) { Ut.set(j, 0.0 - Ut.get(j)); } } } else { singularValues[i] = val; } } }
[ "With the QR algorithm it is possible for the found singular values to be negative. This\nmakes them all positive by multiplying it by a diagonal matrix that has" ]
[ "Creates the project used to import module resources and sets it on the CmsObject.\n\n@param cms the CmsObject to set the project on\n@param module the module\n@return the created project\n@throws CmsException if something goes wrong", "Creates a map of work pattern rows indexed by the primary key.\n\n@param rows work pattern rows\n@return work pattern map", "Called every frame if the picker is enabled\nto generate pick events.\n@param frameTime starting time of the current frame", "Calculates the column width according to its type.\n@param _property the property.\n@return the column width.", "replace region length", "Sets a file whose contents will be prepended to the JAR file's data.\n\n@param file the prefix file, or {@code null} for none.\n@return {@code this}", "Unpause the server, allowing it to resume normal operations", "Add custom fields to the tree.\n\n@param parentNode parent tree node\n@param file custom fields container", "Create an object of the given type using a constructor that matches the\nsupplied arguments.\n\n@param <T> the object type\n@param clazz\nthe type to create\n@param args\nthe arguments to the constructor\n@return a new object of the given type, initialized with the given\narguments\n@throws NoSuchConstructorException\nif there is not a constructor that matches the given\narguments\n@throws AmbiguousConstructorException\nif there is more than one constructor that matches the given\narguments\n@throws ReflectiveOperationException\nif any of the reflective operations throw an exception" ]
public void addIn(Object attribute, Query subQuery) { // PAW // addSelectionCriteria(ValueCriteria.buildInCriteria(attribute, subQuery, getAlias())); addSelectionCriteria(ValueCriteria.buildInCriteria(attribute, subQuery, getUserAlias(attribute))); }
[ "IN Criteria with SubQuery\n@param attribute The field name to be used\n@param subQuery The subQuery" ]
[ "Checks if this child holds the current active state.\nIf the child is or contains the active state it is applied.", "Set the \"everyWorkingDay\" flag.\n@param isEveryWorkingDay flag, indicating if the event should take place every working day.", "Construct a new simple attachment key.\n\n@param valueClass the value class\n@param <T> the attachment type\n@return the new instance", "Use this API to fetch all the nslimitselector resources that are configured on netscaler.", "generate a prepared INSERT-Statement for the Class\ndescribed by cld.\n\n@param cld the ClassDescriptor", "Returns the compact representations of all of the dependents of a task.\n\n@param task The task to get dependents on.\n@return Request object", "Set brightness to eg. darken the resulting image for use as background\n\n@param brightness default is 0, pos values increase brightness, neg. values decrease brightness\n.-100 is black, positive goes up to 1000+", "Read an optional JSON array.\n@param json the JSON Object that has the array as element\n@param key the key for the array in the provided JSON object\n@return the array or null if reading the array fails.", "Checks whether the given set of properties is available.\n\n@param keys the keys to check\n@return true if all properties are available, false otherwise" ]
public Relationship createRelationshipForEmbeddedAssociation(GraphDatabaseService executionEngine, AssociationKey associationKey, EntityKey embeddedKey) { String query = initCreateEmbeddedAssociationQuery( associationKey, embeddedKey ); Object[] queryValues = createRelationshipForEmbeddedQueryValues( associationKey, embeddedKey ); return executeQuery( executionEngine, query, queryValues ); }
[ "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" ]
[ "Use this API to update systemuser.", "Get the GroupDiscussInterface.\n\n@return The GroupDiscussInterface", "Answer the SQL-Clause for a FieldCriteria\n\n@param c FieldCriteria\n@param cld ClassDescriptor", "Get the object responsible for printing to the correct output format.\n\n@param specJson the request json from the client", "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", "Adds a handler for a mouse type event on the map.\n\n@param obj The object that the event should be registered on.\n@param type Type of the event to register against.\n@param h Handler that will be called when the event occurs.", "Creates a rectangular matrix which is zero except along the diagonals.\n\n@param numRows Number of rows in the matrix.\n@param numCols NUmber of columns in the matrix.\n@return A matrix with diagonal elements equal to one.", "Use this API to fetch all the sslciphersuite resources that are configured on netscaler.", "Try to get an attribute value from two elements.\n\n@param firstElement\n@param secondElement\n@return attribute value" ]
public void bindMappers() { JacksonXmlModule xmlModule = new JacksonXmlModule(); xmlModule.setDefaultUseWrapper(false); XmlMapper xmlMapper = new XmlMapper(xmlModule); xmlMapper.enable(ToXmlGenerator.Feature.WRITE_XML_DECLARATION); this.bind(XmlMapper.class).toInstance(xmlMapper); ObjectMapper objectMapper = new ObjectMapper(); objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); objectMapper.configure(DeserializationFeature.ACCEPT_EMPTY_ARRAY_AS_NULL_OBJECT, true); objectMapper.configure(DeserializationFeature.ACCEPT_EMPTY_STRING_AS_NULL_OBJECT, true); objectMapper.configure(DeserializationFeature.EAGER_DESERIALIZER_FETCH, true); objectMapper.configure(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY, true); objectMapper.configure(DeserializationFeature.USE_BIG_DECIMAL_FOR_FLOATS, true); objectMapper.registerModule(new AfterburnerModule()); objectMapper.registerModule(new Jdk8Module()); this.bind(ObjectMapper.class).toInstance(objectMapper); this.requestStaticInjection(Extractors.class); this.requestStaticInjection(ServerResponse.class); }
[ "Override for customizing XmlMapper and ObjectMapper" ]
[ "Use this API to fetch vpnvserver_aaapreauthenticationpolicy_binding resources of given name .", "Returns the complete tag record for a single tag.\n\n@param tag The tag to get.\n@return Request object", "Runs the example program.\n\n@param args\n@throws IOException\nif there was a problem in writing the output file", "Display web page, but no user interface - close", "Add a property.", "Used to populate Map with given annotations\n\n@param annotations initial value for annotations", "Cleans the object key.\n\n@param name Name of the object key\n@return The {@link ValidationResult} object containing the object,\nand the error code(if any)", "Resizes an image to the specified height, changing width in the same proportion\n@param originalImage Image in memory\n@param heightOut The height to resize\n@return New Image in memory", "Returns the index of the eigenvalue which has the largest magnitude.\n\n@return index of the largest magnitude eigen value." ]
private static Iterable<String> splitAndOmitEmpty(final String str, final char splitChar) { return new Iterable<String>() { @Override public Iterator<String> iterator() { return new Iterator<String>() { int startIdx = 0; String next = null; @Override public boolean hasNext() { while (next == null && startIdx < str.length()) { int idx = str.indexOf(splitChar, startIdx); if (idx == startIdx) { // Omit empty string startIdx++; continue; } if (idx >= 0) { // Found the next part next = str.substring(startIdx, idx); startIdx = idx; } else { // The last part if (startIdx < str.length()) { next = str.substring(startIdx); startIdx = str.length(); } break; } } return next != null; } @Override public String next() { if (hasNext()) { String next = this.next; this.next = null; return next; } throw new NoSuchElementException("No more element"); } @Override public void remove() { throw new UnsupportedOperationException("Remove not supported"); } }; } }; }
[ "Helper method to split a string by a given character, with empty parts omitted." ]
[ "Setter for \"addContentInfo\", indicating if content information should be added.\n@param doAddInfo The value of the \"addContentInfo\" attribute of the tag", "Sets the file-pointer offset, measured from the beginning of this file,\nat which the next read or write occurs.", "Returns a new List containing the given objects.", "Add a column to be set to a value for UPDATE statements. This will generate something like 'columnName =\nexpression' where the expression is built by the caller.\n\n<p>\nThe expression should have any strings escaped using the {@link #escapeValue(String)} or\n{@link #escapeValue(StringBuilder, String)} methods and should have any column names escaped using the\n{@link #escapeColumnName(String)} or {@link #escapeColumnName(StringBuilder, String)} methods.\n</p>", "Get the short exception message using the requested locale. This does not include the cause exception message.\n\n@param locale locale for message\n@return (short) exception message", "This method is called when double quotes are found as part of\na value. The quotes are escaped by adding a second quote character\nand the entire value is quoted.\n\n@param value text containing quote characters\n@return escaped and quoted text", "Apply a filter to the list of all resources, and show the results.\n\n@param project project file\n@param filter filter", "determinates if this triangle contains the point p.\n@param p the query point\n@return true iff p is not null and is inside this triangle (Note: on boundary is considered inside!!).", "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" ]
public void fillRectangle(Rectangle rect, Color color) { template.saveState(); setFill(color); template.rectangle(origX + rect.getLeft(), origY + rect.getBottom(), rect.getWidth(), rect.getHeight()); template.fill(); template.restoreState(); }
[ "Draw a rectangle's interior with this color.\n\n@param rect rectangle\n@param color colour" ]
[ "interceptors, decorators and observers go first", "Skips variable length blocks up to and including next zero length block.", "Returns true if the given candidate is a group that is filtered due to rule parameters in the current call graph.", "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", "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)", "Calculates Sine value of the complex number.\n\n@param z1 A Complex Number instance.\n@return Returns new ComplexNumber instance containing the Sine value of the specified complex number.", "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", "read a producer request from buffer\n\n@param buffer data buffer\n@return parsed producer request", "Retrieves a ProjectWriter instance which can write a file of the\ntype specified by the supplied file name.\n\n@param name file name\n@return ProjectWriter instance" ]
public ClassDescriptor getSuperClassDescriptor() { if (!m_superCldSet) { if(getBaseClass() != null) { m_superCld = getRepository().getDescriptorFor(getBaseClass()); if(m_superCld.isAbstract() || m_superCld.isInterface()) { throw new MetadataException("Super class mapping only work for real class, but declared super class" + " is an interface or is abstract. Declared class: " + m_superCld.getClassNameOfObject()); } } m_superCldSet = true; } return m_superCld; }
[ "Answers the ClassDescriptor referenced by 'super' ReferenceDescriptor.\n@return ClassDescriptor or null" ]
[ "Sets in-place the right child with the same first byte.\n\n@param b next byte of child suffix.\n@param child child node.", "determine the what state a transaction is in by inspecting the primary column", "Use this API to fetch the statistics of all tunnelip_stats resources that are configured on netscaler.", "Use this API to export application.", "Get the target entry for a given patch element.\n\n@param element the patch element\n@return the patch entry\n@throws PatchingException", "Gets a static resource from a plugin\n\n@param pluginName - Name of the plugin(defined in the plugin manifest)\n@param fileName - Filename to fetch\n@return byte array of the resource\n@throws Exception exception", "Specifies the container object class to be instantiated\n\n@param containerObjectClass\ncontainer object class to be instantiated\n\n@return the current builder instance", "Updates the Q matrix to take inaccount the row that was removed by only multiplying e\nlements that need to be. There is still some room for improvement here...\n@param rowIndex", "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" ]
public static clusterinstance[] get(nitro_service service, Long clid[]) throws Exception{ if (clid !=null && clid.length>0) { clusterinstance response[] = new clusterinstance[clid.length]; clusterinstance obj[] = new clusterinstance[clid.length]; for (int i=0;i<clid.length;i++) { obj[i] = new clusterinstance(); obj[i].set_clid(clid[i]); response[i] = (clusterinstance) obj[i].get_resource(service); } return response; } return null; }
[ "Use this API to fetch clusterinstance resources of given names ." ]
[ "Use this API to fetch servicegroupbindings resource of given name .", "Saves the messages for all languages that were opened in the editor.\n\n@throws CmsException thrown if saving fails.", "Returns the RPC service for serial dates.\n@return the RPC service for serial dates.", "Load model from file\n\n@param gvrContext Valid {@link GVRContext} instance\n@param modelFile Path to the model's file, relative to the {@code assets} directory\n@return root object The root {@link GVRSceneObject} of the model\n@throws IOException If reading the model file fails", "Adds to this set all of the elements in the specified members array\n@param members the members to add\n@return the number of members actually added", "Get the ordinal value for the last of a particular override on a path\n\n@param overrideId Id of the override to check\n@param pathId Path the override is on\n@param clientUUID UUID of the client\n@param filters If supplied, only endpoints ending with values in filters are returned\n@return The integer ordinal\n@throws Exception", "Get the scale at the given index.\n\n@param index the index of the zoom level to access.\n@param unit the unit.", "Remove specified override id from enabled overrides for path\n\n@param overrideId ID of override to remove\n@param pathId ID of path containing override\n@param ordinal index to the instance of the enabled override\n@param clientUUID UUID of client", "Obtains a local date in Ethiopic calendar system from the\nera, year-of-era and day-of-year fields.\n\n@param era the Ethiopic era, not null\n@param yearOfEra the year-of-era\n@param dayOfYear the day-of-year\n@return the Ethiopic local date, not null\n@throws DateTimeException if unable to create the date\n@throws ClassCastException if the {@code era} is not a {@code EthiopicEra}" ]
public static Map<String, String> getContentMap(File file, String separator) throws IOException { List<String> content = getContentLines(file); Map<String, String> map = new LinkedHashMap<String, String>(); for (String line : content) { String[] spl = line.split(separator); if (line.trim().length() > 0) { map.put(spl[0], (spl.length > 1 ? spl[1] : "")); } } return map; }
[ "Get content of a file as a Map&lt;String, String&gt;, using separator to split values\n@param file File to get content\n@param separator The separator\n@return The map with the values\n@throws IOException I/O Error" ]
[ "Parses the given XML doc to extract the properties and return them into a java.util.Properties.\n@param doc to parse\n@param sectionName which section to extract\n@return Properties map", "Manual check because introducing a capability can't be done without a full refactoring.\nThis has to go as soon as the management interfaces are redesigned.\n@param context the OperationContext\n@param otherManagementEndpoint : the address to check that may provide an exposed jboss-remoting endpoint.\n@throws OperationFailedException in case we can't remove the management resource.", "Gets the node meta data.\n\n@param key - the meta data key\n@return the node meta data value for this key", "Internal method used to retrieve a integer from an\nembedded data block.\n\n@param blocks list of data blocks\n@return int value", "Return the equivalence class of the argument. If the argument is not contained in\nand equivalence class, then an empty string is returned.\n\n@param punc\n@return The class name if found. Otherwise, an empty string.", "Use this API to fetch csvserver_appflowpolicy_binding resources of given name .", "Returns a handle to the pool. Useful to obtain a handle to the\nstatistics for example.\n@return pool", "Returns the field definition with the specified name.\n\n@param name The name of the desired field\n@return The field definition or <code>null</code> if there is no such field", "Use this API to fetch lbvserver_scpolicy_binding resources of given name ." ]
protected void populateTasksByStealer(List<StealerBasedRebalanceTask> sbTaskList) { // Setup mapping of stealers to work for this run. for(StealerBasedRebalanceTask task: sbTaskList) { if(task.getStealInfos().size() != 1) { throw new VoldemortException("StealerBasedRebalanceTasks should have a list of RebalancePartitionsInfo of length 1."); } RebalanceTaskInfo stealInfo = task.getStealInfos().get(0); int stealerId = stealInfo.getStealerId(); if(!this.tasksByStealer.containsKey(stealerId)) { this.tasksByStealer.put(stealerId, new ArrayList<StealerBasedRebalanceTask>()); } this.tasksByStealer.get(stealerId).add(task); } if(tasksByStealer.isEmpty()) { return; } // Shuffle order of each stealer's work list. This randomization // helps to get rid of any "patterns" in how rebalancing tasks were // added to the task list passed in. for(List<StealerBasedRebalanceTask> taskList: tasksByStealer.values()) { Collections.shuffle(taskList); } }
[ "Go over the task list and create a map of stealerId -> Tasks\n\n@param sbTaskList List of all stealer-based rebalancing tasks to be\nscheduled." ]
[ "Write a new line and indent.", "Creates a new deployment for the path. If the path is a directory the content will be deployed exploded using\nthe file system location.\n\n@param content the path containing the content\n\n@return the deployment", "Retrieve the next available field.\n\n@return FieldType instance for the next available field", "Initialize the version properties map from the gradle.properties file, and the additional properties from the\ngradle.properties file.", "Creates builder for passed path element\n\n@param elementName name of xml element that is used as decorator\n@return PersistentResourceXMLBuilder\n@deprecated decorator element support is currently considered as preview\n@since 4.0", "Build a Count-Query based on aQuery\n@param aQuery\n@return The count query", "Detects if the current browser is a Sony Mylo device.\n@return detection of a Sony Mylo device", "Check that an array only contains null elements.\n@param values, can't be null\n@return", "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." ]
private void updatePreview(TrackMetadataUpdate update, WaveformPreview preview) { previewHotCache.put(DeckReference.getDeckReference(update.player, 0), preview); // Main deck if (update.metadata.getCueList() != null) { // Update the cache with any hot cues in this track as well for (CueList.Entry entry : update.metadata.getCueList().entries) { if (entry.hotCueNumber != 0) { previewHotCache.put(DeckReference.getDeckReference(update.player, entry.hotCueNumber), preview); } } } deliverWaveformPreviewUpdate(update.player, preview); }
[ "We have obtained a waveform preview for a device, so store it and alert any listeners.\n\n@param update the update which caused us to retrieve this waveform preview\n@param preview the waveform preview which we retrieved" ]
[ "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", "Use this API to fetch gslbsite resource of given name .", "Given a particular id, return the correct contextual. For contextuals\nwhich aren't passivation capable, the contextual can't be found in another\ncontainer, and null will be returned.\n\n@param id An identifier for the contextual\n@return the contextual", "Gets the index of a ExpandableWrapper within the helper item list based on\nthe index of the ExpandableWrapper.\n\n@param parentPosition The index of the parent in the list of parents\n@return The index of the parent in the merged list of children and parents", "Decides what the Map Web provider should be used and generates a builder for it.\n\n@return The AirMapViewBuilder for the selected Map Web provider.", "Runs a Story with the given configuration and steps, applying the given\nmeta filter, and staring from given state.\n\n@param configuration the Configuration used to run story\n@param candidateSteps the List of CandidateSteps containing the candidate\nsteps methods\n@param story the Story to run\n@param filter the Filter to apply to the story Meta\n@param beforeStories the State before running any of the stories, if not\n<code>null</code>\n@throws Throwable if failures occurred and FailureStrategy dictates it to\nbe re-thrown.", "Get all parameter keys.\n@return a set of parameter keys", "Returns the plugins classpath elements.", "Handles an initial response from a PUT or PATCH operation response by polling the status of the operation\nasynchronously, once the operation finishes emits the final response.\n\n@param observable the initial observable from the PUT or PATCH operation.\n@param resourceType the java.lang.reflect.Type of the resource.\n@param <T> the return type of the caller.\n@return the observable of which a subscription will lead to a final response." ]
public static void addToString( SourceBuilder code, Datatype datatype, Map<Property, PropertyCodeGenerator> generatorsByProperty, boolean forPartial) { String typename = (forPartial ? "partial " : "") + datatype.getType().getSimpleName(); Predicate<PropertyCodeGenerator> isOptional = generator -> { Initially initially = generator.initialState(); return (initially == Initially.OPTIONAL || (initially == Initially.REQUIRED && forPartial)); }; boolean anyOptional = generatorsByProperty.values().stream().anyMatch(isOptional); boolean allOptional = generatorsByProperty.values().stream().allMatch(isOptional) && !generatorsByProperty.isEmpty(); code.addLine("") .addLine("@%s", Override.class) .addLine("public %s toString() {", String.class); if (allOptional) { bodyWithBuilderAndSeparator(code, datatype, generatorsByProperty, typename); } else if (anyOptional) { bodyWithBuilder(code, datatype, generatorsByProperty, typename, isOptional); } else { bodyWithConcatenation(code, generatorsByProperty, typename); } code.addLine("}"); }
[ "Generates a toString method using concatenation or a StringBuilder." ]
[ "Create and return a new Violation for this rule and the specified values\n@param lineNumber - the line number for the violation; may be null\n@param sourceLine - the source line for the violation; may be null\n@param message - the message for the violation; may be null\n@return a new Violation object", "This method extracts data for a single predecessor from an MSPDI file.\n\n@param currTask Current task object\n@param link Predecessor data", "Convert an object to another object given a parameterized type signature\n\n@param context\n@param destinationType\nthe destination type\n@param source\nthe source object\n\n@return the converted object\n@throws ConverterException\nif conversion failed", "Deserializes a variable, checking whether the datatype is custom or not\n@param s\n@param variableType\n@param dataTypes\n@return", "Use this API to fetch hanode_routemonitor_binding resources of given name .", "Type-safe wrapper around setVariable which sets only one framed vertex.", "Add the string representation of the given object to this sequence at the given index. The given indentation will\nbe prepended to each line except the first one if the object has a multi-line string representation.\n\n@param object\nthe to-be-appended object.\n@param indentation\nthe indentation string that should be prepended. May not be <code>null</code>.\n@param index\nthe index in the list of segments.", "Creates a curator built using Fluo's zookeeper connection string. Root path will start at Fluo\nchroot.", "Deploys application reading resources from specified InputStream.\n\n@param inputStream where resources are read\n@throws IOException" ]
private static void throwFault(String code, String message, Throwable t) throws PutEventsFault { if (LOG.isLoggable(Level.SEVERE)) { LOG.log(Level.SEVERE, "Throw Fault " + code + " " + message, t); } FaultType faultType = new FaultType(); faultType.setFaultCode(code); faultType.setFaultMessage(message); StringWriter stringWriter = new StringWriter(); PrintWriter printWriter = new PrintWriter(stringWriter); t.printStackTrace(printWriter); faultType.setStackTrace(stringWriter.toString()); throw new PutEventsFault(message, faultType, t); }
[ "Throw fault.\n\n@param code the fault code\n@param message the message\n@param t the throwable type\n@throws PutEventsFault" ]
[ "Runs the example program.\n\n@param args\n@throws IOException\nif there was a problem in writing the output file", "generate a message for loglevel INFO\n\n@param pObject the message Object", "Searches the variables layers, top to bottom, for given name, and returns if found; null otherwise.\n\nIf maxDepth is set to {@link Variables#SEARCH_ALL_LAYERS}, then search all layers.", "Returns all keys in no particular order.", "this class loader interface can be used by other plugins to lookup\nresources from the bundles. A temporary class loader interface is set\nduring other configuration loading as well\n\n@return ClassLoaderInterface (BundleClassLoaderInterface)", "We have an OLE compound document... but is it an MPP file?\n\n@param stream file input stream\n@return ProjectFile instance", "Returns the value of an optional property, if the property is\nset. If it is not set defval is returned.", "Sets the baseline start text value.\n\n@param baselineNumber baseline number\n@param value baseline start text value", "Exports a single queue to an XML file." ]
protected void generateRoutes() { try { // Optional<io.sinistral.proteus.annotations.Chain> typeLevelWrapAnnotation = Optional.ofNullable(controllerClass.getAnnotation(io.sinistral.proteus.annotations.Chain.class)); // // typeLevelWrapAnnotation.ifPresent( a -> { // // io.sinistral.proteus.annotations.Chain w = typeLevelWrapAnnotation.get(); // // Class<? extends HandlerWrapper> wrapperClasses[] = w.value(); // // for (int i = 0; i < wrapperClasses.length; i++) // { // Class<? extends HandlerWrapper> wrapperClass = wrapperClasses[i]; // // String wrapperName = generateFieldName(wrapperClass.getCanonicalName()); // // handlerWrapperMap.put(wrapperClass, wrapperName); // } // // }); // // for(Method m : this.controllerClass.getDeclaredMethods()) // { // // Optional<io.sinistral.proteus.annotations.Chain> methodLevelWrapAnnotation = Optional.ofNullable(m.getAnnotation(io.sinistral.proteus.annotations.Chain.class)); // // methodLevelWrapAnnotation.ifPresent( a -> { // // io.sinistral.proteus.annotations.Chain w = methodLevelWrapAnnotation.get(); // // Class<? extends HandlerWrapper> wrapperClasses[] = w.value(); // // for (int i = 0; i < wrapperClasses.length; i++) // { // Class<? extends HandlerWrapper> wrapperClass = wrapperClasses[i]; // // String wrapperName = generateFieldName(wrapperClass.getCanonicalName()); // // handlerWrapperMap.put(wrapperClass, wrapperName); // } // // }); // // } // // log.info("handlerWrapperMap: " + handlerWrapperMap); TypeSpec.Builder typeBuilder = TypeSpec.classBuilder(className).addModifiers(Modifier.PUBLIC) .addSuperinterface(ParameterizedTypeName.get(Supplier.class, RoutingHandler.class)); ClassName extractorClass = ClassName.get("io.sinistral.proteus.server", "Extractors"); ClassName injectClass = ClassName.get("com.google.inject", "Inject"); MethodSpec.Builder constructor = MethodSpec.constructorBuilder().addModifiers(Modifier.PUBLIC).addAnnotation(injectClass); String className = this.controllerClass.getSimpleName().toLowerCase() + "Controller"; typeBuilder.addField(this.controllerClass, className, Modifier.PROTECTED, Modifier.FINAL); ClassName wrapperClass = ClassName.get("io.undertow.server", "HandlerWrapper"); ClassName stringClass = ClassName.get("java.lang", "String"); ClassName mapClass = ClassName.get("java.util", "Map"); TypeName mapOfWrappers = ParameterizedTypeName.get(mapClass, stringClass, wrapperClass); TypeName annotatedMapOfWrappers = mapOfWrappers .annotated(AnnotationSpec.builder(com.google.inject.name.Named.class).addMember("value", "$S", "registeredHandlerWrappers").build()); typeBuilder.addField(mapOfWrappers, "registeredHandlerWrappers", Modifier.PROTECTED, Modifier.FINAL); constructor.addParameter(this.controllerClass, className); constructor.addParameter(annotatedMapOfWrappers, "registeredHandlerWrappers"); constructor.addStatement("this.$N = $N", className, className); constructor.addStatement("this.$N = $N", "registeredHandlerWrappers", "registeredHandlerWrappers"); addClassMethodHandlers(typeBuilder, this.controllerClass); typeBuilder.addMethod(constructor.build()); JavaFile javaFile = JavaFile.builder(packageName, typeBuilder.build()).addStaticImport(extractorClass, "*").build(); StringBuilder sb = new StringBuilder(); javaFile.writeTo(sb); this.sourceString = sb.toString(); } catch (Exception e) { log.error(e.getMessage(), e); } }
[ "Generates the routing Java source code" ]
[ "Returns the JRDesignGroup for the DJGroup passed\n@param jd\n@param layoutManager\n@param group\n@return", "Retrieve the ordinal text for a given integer.\n\n@param value integer value\n@return ordinal text", "Organises the data from Asta into a hierarchy and converts this into tasks.\n\n@param bars bar data\n@param expandedTasks expanded task data\n@param tasks task data\n@param milestones milestone data", "Vend a SessionVar with the default value", "Write the text to the Path, using the specified encoding.\n\n@param self a Path\n@param text the text to write to the Path\n@param charset the charset used\n@throws java.io.IOException if an IOException occurs.\n@since 2.3.0", "Configures the player whose current track waveforms and status will automatically be reflected. Whenever a new\ntrack is loaded on that player, the waveform and metadata will be updated, and the current playback position and\nstate of the player will be reflected by the component.\n\n@param player the player number to monitor, or zero if monitoring should stop", "Returns the data sources belonging to a particular group of data\nsources. Data sources are grouped in record linkage mode, but not\nin deduplication mode, so only use this method in record linkage\nmode.", "Operations to do after all subthreads finished their work on index\n\n@param backend", "Set up arguments for each FieldDescriptor in an array." ]
static BsonDocument getFreshVersionDocument() { final BsonDocument versionDoc = new BsonDocument(); versionDoc.append(Fields.SYNC_PROTOCOL_VERSION_FIELD, new BsonInt32(1)); versionDoc.append(Fields.INSTANCE_ID_FIELD, new BsonString(UUID.randomUUID().toString())); versionDoc.append(Fields.VERSION_COUNTER_FIELD, new BsonInt64(0L)); return versionDoc; }
[ "Returns a BSON version document representing a new version with a new instance ID, and\nversion counter of zero.\n@return a BsonDocument representing a synchronization version" ]
[ "Generate query parameters for a forward page with the specified start key.\n\n@param initialQueryParameters page 1 query parameters\n@param startkey the startkey for the forward page\n@param startkey_docid the doc id for the startkey (in case of duplicate keys)\n@param <K> the view key type\n@param <V> the view value type\n@return the query parameters for the forward page", "Get the names of the currently registered format providers.\n\n@return the provider names, never null.", "Use this API to fetch ipset_nsip_binding resources of given name .", "Close all HTTP clients created by this factory\n@throws IOException if an I/O error occurs", "This method can be used by child classes to apply the configuration that is stored in config.", "Writes batch of data to the source\n@param batch\n@throws InterruptedException", "Returns a matrix full of ones", "Formats an IPTC string for this reference using information obtained from\nSubject Reference System.\n\n@param srs\nreference subject reference system\n@return IPTC formatted reference", "List the indexes in the database. The returned object allows for listing indexes by type.\n\n@return indexes object with methods for getting indexes of a particular type" ]
public static List<ClassReference> analyze(WildcardImportResolver importResolver, Set<String> libraryPaths, Set<String> sourcePaths, Path sourceFile) { ASTParser parser = ASTParser.newParser(AST.JLS11); parser.setEnvironment(libraryPaths.toArray(new String[libraryPaths.size()]), sourcePaths.toArray(new String[sourcePaths.size()]), null, true); parser.setBindingsRecovery(false); parser.setResolveBindings(true); Map options = JavaCore.getOptions(); JavaCore.setComplianceOptions(JavaCore.VERSION_1_8, options); parser.setCompilerOptions(options); String fileName = sourceFile.getFileName().toString(); parser.setUnitName(fileName); try { parser.setSource(FileUtils.readFileToString(sourceFile.toFile()).toCharArray()); } catch (IOException e) { throw new ASTException("Failed to get source for file: " + sourceFile.toString() + " due to: " + e.getMessage(), e); } parser.setKind(ASTParser.K_COMPILATION_UNIT); CompilationUnit cu = (CompilationUnit) parser.createAST(null); ReferenceResolvingVisitor visitor = new ReferenceResolvingVisitor(importResolver, cu, sourceFile.toString()); cu.accept(visitor); return visitor.getJavaClassReferences(); }
[ "Parses the provided file, using the given libraryPaths and sourcePaths as context. The libraries may be either\njar files or references to directories containing class files.\n\nThe sourcePaths must be a reference to the top level directory for sources (eg, for a file\nsrc/main/java/org/example/Foo.java, the source path would be src/main/java).\n\nThe wildcard resolver provides a fallback for processing wildcard imports that the underlying parser was unable\nto resolve." ]
[ "Adds a logical operator block.\n\n@param list parent criteria list\n@param block current block\n@param operator logical operator represented by this block", "Adds the specified type to this frame, and returns a new object that implements this type.", "Flattens an option into its value or else null, which is not great but is usually more convenient in Java.\n@param option Optional value -- either Some(T) or None\n@param <T> Any type\n@return The value inside the option, or else null", "Get a prefix for the log message to help identify which request is which and which responses\nbelong to which requests.", "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", "Adds a set of tests based on pattern matching.", "Compute 1-dimensional Perlin noise.\n@param x the x value\n@return noise value at x in the range -1..1", "In the 2.0 xsd the vault is in an external file, which has no namespace, using the output of the vault tool.\n\n@param f the file containing the external vault configuration as generated by the vault tool\n@return the vault config", "A convenience method for creating an immutable sorted set.\n\n@param self a SortedSet\n@return an immutable SortedSet\n@see java.util.Collections#unmodifiableSortedSet(java.util.SortedSet)\n@since 1.0" ]
private double CosineInterpolate(double x1, double x2, double a) { double f = (1 - Math.cos(a * Math.PI)) * 0.5; return x1 * (1 - f) + x2 * f; }
[ "Cosine interpolation.\n\n@param x1 X1 Value.\n@param x2 X2 Value.\n@param a Value.\n@return Value." ]
[ "Processes the template for all table definitions in the torque model.\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\"", "Use this API to delete gslbsite resources of given names.", "Command line method to walk the directories provided on the command line\nand print out their contents\n\n@param args Directory names", "Add the list with given bundles to the \"Export-Package\" main attribute.\n\n@param exportedPackages The list of all packages to add.", "Determines whether the given type is an array type.\n\n@param type the given type\n@return true if the given type is a subclass of java.lang.Class or implements GenericArrayType", "Use this API to update inat resources.", "and class as property", "Cleans a multi-value property key.\n\n@param name Name of the property key\n@return The {@link ValidationResult} object containing the key,\nand the error code(if any)\n<p/>\nFirst calls cleanObjectKey\nKnown property keys are reserved for multi-value properties, subsequent validation is done for those", "Get the minutes difference" ]
public static final Path resolveSecurely(Path rootPath, String path) { Path resolvedPath; if(path == null || path.isEmpty()) { resolvedPath = rootPath.normalize(); } else { String relativePath = removeSuperflousSlashes(path); resolvedPath = rootPath.resolve(relativePath).normalize(); } if(!resolvedPath.startsWith(rootPath)) { throw DeploymentRepositoryLogger.ROOT_LOGGER.forbiddenPath(path); } return resolvedPath; }
[ "Resolve a path from the rootPath checking that it doesn't go out of the rootPath.\n@param rootPath the starting point for resolution.\n@param path the path we want to resolve.\n@return the resolved path.\n@throws IllegalArgumentException if the resolved path is out of the rootPath or if the resolution failed." ]
[ "Use this API to disable nsfeature.", "Returns a String summarizing overall accuracy that will print nicely.", "Get the bone index for the given scene object.\n\n@param bone GVRSceneObject bone to search for\n@return bone index or -1 for root bone.\n@see #getParentBoneIndex", "Generate attachment extension from mime type\n\n@param type valid mime-type\n@return extension if it's known for specified mime-type, or empty string\notherwise", "Parses the resource String id and get back the int res id\n@param context\n@param id String resource id\n@return int resource id", "Use this API to fetch spilloverpolicy resource of given name .", "Adds a collection of listeners to the current project.\n\n@param listeners collection of listeners", "This takes into account scrolling and will be in absolute\ncoordinates where the top left corner of the page is 0,0 but\nthe viewport may be scrolled to something else.", "Processes the template for all procedures of the current class definition.\n\n@param template The template\n@param attributes The attributes of the tag\n@exception XDocletException if an error occurs\[email protected] type=\"block\"" ]
public static base_response update(nitro_service client, snmpmanager resource) throws Exception { snmpmanager updateresource = new snmpmanager(); updateresource.ipaddress = resource.ipaddress; updateresource.netmask = resource.netmask; updateresource.domainresolveretry = resource.domainresolveretry; return updateresource.update_resource(client); }
[ "Use this API to update snmpmanager." ]
[ "Indicates if a set of types are all proxyable\n\n@param types The types to test\n@return True if proxyable, false otherwise", "Add an element assigned with its score\n@param member the member to add\n@param score the score to assign\n@return <code>true</code> if the set has been changed", "Does the headset the device is docked into have a dedicated home key\n@return", "Processes the template for all procedure arguments of the current procedure.\n\n@param template The template\n@param attributes The attributes of the tag\n@exception XDocletException if an error occurs\[email protected] type=\"block\"", "Gets all checked widget indexes in the group. The indexes are counted from 0 to size -1,\nwhere size is the number of Checkable widgets in the group. It does not take into account\nany non-Checkable widgets added to the group widget.\n\n@return list of checked widget indexes", "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", "This method uses the configured git credentials and repo, to test its validity.\nIn addition, in case the user requested creation of a new tag, it checks that\nanother tag with the same name doesn't exist", "Adds an array of groupby fieldNames for ReportQueries.\n@param fieldNames The groupby to set\n@deprecated use QueryByCriteria#addGroupBy", "Processes an anonymous field definition specified at the class level.\n\n@param attributes The attributes of the tag\n@exception XDocletException if an error occurs\[email protected] type=\"content\"\[email protected] name=\"attributes\" optional=\"true\" description=\"Attributes of the field as name-value pairs 'name=value',\nseparated by commas\"\[email protected] name=\"autoincrement\" optional=\"true\" description=\"Whether the field is\nauto-incremented\" values=\"true,false\"\[email protected] name=\"column\" optional=\"true\" description=\"The column for the field\"\[email protected] name=\"conversion\" optional=\"true\" description=\"The fully qualified name of the\nconversion for the field\"\[email protected] name=\"default-fetch\" optional=\"true\" description=\"The default-fetch setting\"\nvalues=\"true,false\"\[email protected] name=\"documentation\" optional=\"true\" description=\"Documentation on the field\"\[email protected] name=\"id\" optional=\"true\" description=\"The position of the field in the class\ndescriptor\"\[email protected] name=\"indexed\" optional=\"true\" description=\"Whether the field is indexed\"\nvalues=\"true,false\"\[email protected] name=\"jdbc-type\" optional=\"true\" description=\"The jdbc type of the column\"\[email protected] name=\"length\" optional=\"true\" description=\"The length of the column\"\[email protected] name=\"locking\" optional=\"true\" description=\"Whether the field supports locking\"\nvalues=\"true,false\"\[email protected] name=\"name\" optional=\"false\" description=\"The name of the field\"\[email protected] name=\"nullable\" optional=\"true\" description=\"Whether the field is nullable\"\nvalues=\"true,false\"\[email protected] name=\"precision\" optional=\"true\" description=\"The precision of the column\"\[email protected] name=\"primarykey\" optional=\"true\" description=\"Whether the field is a primarykey\"\nvalues=\"true,false\"\[email protected] name=\"scale\" optional=\"true\" description=\"The scale of the column\"\[email protected] name=\"sequence-name\" optional=\"true\" description=\"The name of the sequence for\nincrementing the field\"\[email protected] name=\"table\" optional=\"true\" description=\"The table of the field (not implemented\nyet)\"\[email protected] name=\"update-lock\" optional=\"true\" description=\"Can be set to false if the persistent attribute is\nused for optimistic locking AND the dbms should update the lock column itself (default is true). Can only be set for\nTIMESTAMP and INTEGER columns\" values=\"true,false\"" ]
private String getResponseString(boolean async, UploaderResponse response) { return async ? response.getTicketId() : response.getPhotoId(); }
[ "Get the photo or ticket id from the response.\n\n@param async\n@param response\n@return" ]
[ "Extracts the data for a single file from the input stream and writes\nit to a target directory.\n\n@param stream input stream\n@param dir target directory", "Create a REST call to artifactory with a generic request\n\n@param artifactoryRequest that should be sent to artifactory\n@return {@link ArtifactoryResponse} artifactory response as per to the request sent", "Sets a custom response on an endpoint using default profile and client\n\n@param pathValue path (endpoint) value\n@param requestType path request type. \"GET\", \"POST\", etc\n@param customData custom response data\n@return true if success, false otherwise", "those could be incorporated with above, but that would blurry everything.", "Use this API to update nsip6 resources.", "Splits up value into multiple versioned values\n\n@param value\n@return\n@throws IOException", "Get the currently selected opacity.\n\n@return The int value of the currently selected opacity.", "Convert JsonString to Object of Clazz\n\n@param json\n@param clazz\n@return Object of Clazz", "Check the version to assure it is allowed.\n\n@param pluginName plugin name which needs the dependency\n@param dependency dependency which needs to be verified\n@param requestedVersion requested/minimum version\n@param availableVersion available version\n@return version check problem or empty string when all is fine" ]
public void addAttribute(String attributeName, String attributeValue) { if (attributeName != null && attributeName.startsWith(JDBC_PROPERTY_NAME_PREFIX)) { final String jdbcPropertyName = attributeName.substring(JDBC_PROPERTY_NAME_LENGTH); jdbcProperties.setProperty(jdbcPropertyName, attributeValue); } else if (attributeName != null && attributeName.startsWith(DBCP_PROPERTY_NAME_PREFIX)) { final String dbcpPropertyName = attributeName.substring(DBCP_PROPERTY_NAME_LENGTH); dbcpProperties.setProperty(dbcpPropertyName, attributeValue); } else { super.addAttribute(attributeName, attributeValue); } }
[ "Sets a custom configuration attribute.\n@param attributeName the attribute name. Names starting with\n{@link #JDBC_PROPERTY_NAME_PREFIX} will be used (without the prefix) by the\nConnectionFactory when creating connections from DriverManager\n(not used for external DataSource connections). Names starting with\n{@link #DBCP_PROPERTY_NAME_PREFIX} to Commons DBCP (if used, also without prefix).\n@param attributeValue the attribute value" ]
[ "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", "First close the connection. Then reply.\n\n@param response\nthe response\n@param error\nthe error\n@param errorMessage\nthe error message\n@param stackTrace\nthe stack trace\n@param statusCode\nthe status code\n@param statusCodeInt\nthe status code int", "This method retrieves a byte array containing the data at the\ngiven index in the block. If no data is found at the given index\nthis method returns null.\n\n@param index index of the data item to be retrieved\n@return byte array containing the requested data", "Use this API to add ntpserver resources.", "Examines the list of variables for any unknown variables and throws an exception if one is found", "Adds a measure to the crosstab. A crosstab can have many measures. DJ will lay out one measure above\nthe other.\n\nA measure is what is shown on each intersection of a column and a row. A calculation is performed to\nall occurrences in the datasource where the column and row values matches (between elements)\n\nThe only difference between the prior methods is that this method sets \"visible\" to false\n\n@param property\n@param className\n@param title\n@return", "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.", "Returns all keys in no particular order.", "This method writes extended attribute data for an assignment.\n\n@param xml MSPDI assignment\n@param mpx MPXJ assignment" ]
public static appfwhtmlerrorpage get(nitro_service service, String name) throws Exception{ appfwhtmlerrorpage obj = new appfwhtmlerrorpage(); obj.set_name(name); appfwhtmlerrorpage response = (appfwhtmlerrorpage) obj.get_resource(service); return response; }
[ "Use this API to fetch appfwhtmlerrorpage resource of given name ." ]
[ "Check if there is an attribute which tells us which concrete class is to be instantiated.", "Only call async", "Returns the 'Up' - vector of the camera coordinate system.\n\nThe returned vector is relative to the coordinate space defined by the\ncorresponding node.<p>\n\nThe 'right' vector of the camera coordinate system is the cross product\nof the up and lookAt vectors. The default value is 0|1|0. The vector\nmay be normalized, but it needn't.<p>\n\nThis method is part of the wrapped API (see {@link AiWrapperProvider}\nfor details on wrappers).<p>\n\nThe built-in behavior is to return a {@link AiVector}.\n\n@param wrapperProvider the wrapper provider (used for type inference)\n@return the 'Up' vector", "Use this API to delete nsacl6 resources of given names.", "Returns the full path of the resource file with extension.\n\n@return path of the GVRAndroidResource. May return null if the\nresource is not associated with any file", "Tokenize the the string as a package hierarchy\n\n@param str\n@return", "Returns the value for a given key from the database properties.\n\n@param key the property key\n\n@return the string value for a given key", "Gets a collection of all the email aliases for this user.\n\n<p>Note that the user's primary login email is not included in the collection of email aliases.</p>\n\n@return a collection of all the email aliases for this user.", "If a given x is into an interval of the partition, this method returns the reference point of the corresponding interval.\nIf the given x is not contained in any interval of the partition, this method returns x.\n\n@param x The point of interest.\n@return The discretized value." ]
public long removeAll(final String... members) { return doWithJedis(new JedisCallable<Long>() { @Override public Long call(Jedis jedis) { return jedis.srem(getKey(), members); } }); }
[ "Removes from this set all of its elements that are contained in the specified members array\n@param members the members to remove\n@return the number of members actually removed" ]
[ "Cancel request and worker on host.\n\n@param targetHosts\nthe target hosts", "We have reason to believe we might have enough information to calculate a signature for the track loaded on a\nplayer. Verify that, and if so, perform the computation and record and report the new signature.", "Returns a list with argument words that are not equal in all cases", "Test for equality.\n@param obj1 the first object\n@param obj2 the second object\n@return true if both are null or the two objects are equal", "Does the given class has bidirectional assiciation\nwith some other class?", "Links the given widget to InstantSearch according to the interfaces it implements.\n\n@param widget a widget implementing ({@link AlgoliaResultsListener} || {@link AlgoliaErrorListener} || {@link AlgoliaSearcherListener}).", "not start with another option name", "Use this API to fetch sslcipher_individualcipher_binding resources of given name .", "replace region length" ]
protected void clearStatementCaches(boolean internalClose) { if (this.statementCachingEnabled){ // safety if (internalClose){ this.callableStatementCache.clear(); this.preparedStatementCache.clear(); } else { if (this.pool.closeConnectionWatch){ // debugging enabled? this.callableStatementCache.checkForProperClosure(); this.preparedStatementCache.checkForProperClosure(); } } } }
[ "Clears out the statement handles.\n@param internalClose if true, close the inner statement handle too." ]
[ "Use this API to update ntpserver.", "Used to get PB, when no tx is running.", "Notifies that multiple header items are changed.\n\n@param positionStart the position.\n@param itemCount the item count.", "Sets the specified date 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", "Validates the binding types", "Extracts the column of A and copies it into u while computing the magnitude of the\nlargest element and returning it.\n\n<pre>\nu[ (offsetU+row0+i)*2 ] = A.getReal(row0+i,col)\nu[ (offsetU+row0+i)*2 + 1] = A.getImag(row0+i,col)\n</pre>\n\n@param A Complex matrix\n@param row0 First row in A to be copied\n@param row1 Last row in A + 1 to be copied\n@param col Column in A\n@param u Output array storage\n@param offsetU first index in U\n@return magnitude of largest element", "Count the statements and property uses of an item or property document.\n\n@param usageStatistics\nstatistics object to store counters in\n@param statementDocument\ndocument to count the statements of", "Helper to generate the common configuration part for client-side and server-side widget.\n@return the common configuration options as map", "Creates the container for a bundle descriptor.\n@return the container for a bundle descriptor." ]
public static final String printWorkGroup(WorkGroup value) { return (Integer.toString(value == null ? WorkGroup.DEFAULT.getValue() : value.getValue())); }
[ "Print a work group.\n\n@param value WorkGroup instance\n@return work group value" ]
[ "Unmarshals the XML content and adds the file to the bundle files.\n@throws CmsException thrown if reading the file or unmarshaling fails.", "Add the currentSceneObject to an active Level-of-Detail", "Add a management request handler factory to this context.\n\n@param factory the request handler to add", "Shows error dialog, manually supplying details instead of getting them from an exception stack trace.\n\n@param message the error message\n@param details the details", "Adds a materialization listener.\n\n@param listener\nThe listener to add", "returns &gt; 0 when o1 is more specific than o2,\n\nreturns == 0 when o1 and o2 are equal or unrelated,\n\nreturns &lt; 0 when o2 is more specific than o1,", "Iterates over all the documents, adding each to the given target.\n\n@param target the collection to insert into\n@param <A> the collection type\n@return the target", "Returns a query filter for the given document _id and version. The version is allowed to be\nnull. The query will match only if there is either no version on the document in the database\nin question if we have no reference of the version or if the version matches the database's\nversion.\n\n@param documentId the _id of the document.\n@param version the expected version of the document, if any.\n@return a query filter for the given document _id and version for a remote operation.", "Calculate the value of a CMS strike using the Black-Scholes model for the swap rate together with\nthe Hunt-Kennedy convexity adjustment.\n\n@param forwardSwaprate The forward swap rate\n@param volatility Volatility of the log of the swap rate\n@param swapAnnuity The swap annuity\n@param optionMaturity The option maturity\n@param swapMaturity The swap maturity\n@param payoffUnit The payoff unit, e.g., the discount factor corresponding to the payment date\n@param optionStrike The option strike\n@return Value of the CMS strike" ]
public final Object getValue(final String id, final String property) { final CriteriaBuilder builder = getSession().getCriteriaBuilder(); final CriteriaQuery<Object> criteria = builder.createQuery(Object.class); final Root<PrintJobStatusExtImpl> root = criteria.from(PrintJobStatusExtImpl.class); criteria.select(root.get(property)); criteria.where(builder.equal(root.get("referenceId"), id)); return getSession().createQuery(criteria).uniqueResult(); }
[ "get specific property value of job.\n\n@param id the id\n@param property the property name/path\n@return the property value" ]
[ "Rotate root widget to make it facing to the front of the scene", "Called when the end type is changed.", "This will check to see if certain configuration values exist from the ConfigurationService\nIf not then it redirects to the configuration screen", "Transform the given bytes into an object.\n\n@param bytes The bytes to construct the object from\n@return The object constructed", "The full path of a jrxml file, or the path in the classpath of a jrxml\nresource.\n\n@param path\n@return", "Initializes the service.\n\nStores the <code>Service.Context</code> in instance variables and calls the {@link #init()} method.\n\n@param context Service context.\n@return The list of configuration issues found during initialization, an empty list if none.", "Get a lower-scoped token restricted to a resource for the list of scopes that are passed.\n@param scopes the list of scopes to which the new token should be restricted for\n@param resource the resource for which the new token has to be obtained\n@return scopedToken which has access token and other details", "Returns an iterator over the items in this collection.\n@return an iterator over the items in this collection.", "Accessor method to retrieve a Boolean instance.\n\n@param field the index number of the field to be retrieved\n@param falseText locale specific text representing false\n@return the value of the required field" ]
public static csvserver_appflowpolicy_binding[] get(nitro_service service, String name) throws Exception{ csvserver_appflowpolicy_binding obj = new csvserver_appflowpolicy_binding(); obj.set_name(name); csvserver_appflowpolicy_binding response[] = (csvserver_appflowpolicy_binding[]) obj.get_resources(service); return response; }
[ "Use this API to fetch csvserver_appflowpolicy_binding resources of given name ." ]
[ "Writes data to delegate stream if it has been set.\n\n@param data the data to write", "Finds the column with the largest normal and makes that the first column\n\n@param j Current column being inspected", "Create a deep copy.\n\n@param bindAddress overwrites bind address when creating deep copy.\n@return a copy of the server setup configuration.", "This method is called to format a relation list.\n\n@param value relation list instance\n@return formatted relation list", "Saves the state of this connection to a string so that it can be persisted and restored at a later time.\n\n<p>Note that proxy settings aren't automatically saved or restored. This is mainly due to security concerns\naround persisting proxy authentication details to the state string. If your connection uses a proxy, you will\nhave to manually configure it again after restoring the connection.</p>\n\n@see #restore\n@return the state of this connection.", "Creates a ServiceFuture from an Completable object and a callback.\n\n@param completable the completable to create from\n@param callback the callback to call when event happen\n@return the created ServiceFuture", "Sends the JSON-formatted spellchecking results to the client.\n\n@param res The HttpServletResponse object.\n@param request The spellchecking request object.\n\n@throws IOException in case writing the response fails", "Use this API to fetch statistics of servicegroup_stats resource of given name .", "Log a byte array as a hex dump.\n\n@param data byte array" ]
public static byte[] concat(Bytes... listOfBytes) { int offset = 0; int size = 0; for (Bytes b : listOfBytes) { size += b.length() + checkVlen(b.length()); } byte[] data = new byte[size]; for (Bytes b : listOfBytes) { offset = writeVint(data, offset, b.length()); b.copyTo(0, b.length(), data, offset); offset += b.length(); } return data; }
[ "Concatenates of list of Bytes objects to create a byte array\n\n@param listOfBytes Bytes objects to concatenate\n@return Bytes" ]
[ "EAP 7.1", "Makes an ancestor filter.", "Calculate the arc length by angle and radius\n@param angle\n@return arc length", "Processes the template for all column pairs of the current foreignkey.\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\"", "Puts value at given column\n\n@param value Will be encoded using UTF-8", "Subtracts v1 from this vector and places the result in this vector.\n\n@param v1\nright-hand vector", "Invokes the given configurator, obtaining the correct global context type via the datastore configuration type of\nthe current datastore provider.\n\n@param configurator the configurator to invoke\n@return a context object containing the options set via the given configurator", "This method writes task data to a JSON file.\nNote that we write the task hierarchy in order to make rebuilding the hierarchy easier.", "Add BoxMetaDataFilter to the JsonArray boxMetadataFilterRequestArray.\n@param @param bmf accepts a filter that has templateKey, scope, and filters populated.\n@return JsonArray that is formated Json request" ]
@SuppressWarnings("WeakerAccess") public boolean isPlaying() { if (packetBytes.length >= 212) { return (packetBytes[STATUS_FLAGS] & PLAYING_FLAG) > 0; } else { final PlayState1 state = getPlayState1(); return state == PlayState1.PLAYING || state == PlayState1.LOOPING || (state == PlayState1.SEARCHING && getPlayState2() == PlayState2.MOVING); } }
[ "Was the CDJ playing a track when this update was sent?\n\n@return true if the play flag was set, or, if this seems to be a non-nexus player, if <em>P<sub>1</sub></em>\nhas a value corresponding to a playing state." ]
[ "This solution is based on an absolute path", "Drops a driver from the DriverManager's list.", "compares two AST nodes", "Returns an iterable containing the items in this folder sorted by name and direction.\n@param sort the field to sort by, can be set as `name`, `id`, and `date`.\n@param direction the direction to display the item results.\n@param fields the fields to retrieve.\n@return an iterable containing the items in this folder.", "Returns an entry of kind snippet with the given proposal and label and the prefix from the context, or null if the proposal is not valid.\n@since 2.16", "Multiply two complex numbers.\n\n@param z1 Complex Number.\n@param z2 Complex Number.\n@return Returns new ComplexNumber instance containing the multiply of specified complex numbers.", "Use this API to delete sslfipskey resources of given names.", "Converts a string from ISO-8559-1 encoding to UTF-8.\n@param value ISO-8559-1 value\n@return UTF-8 value", "Create an executable jar to generate the report. Created jar contains only\nallure configuration file." ]
private void bumpScores(Map<Long, Score> candidates, List<Bucket> buckets, int ix) { for (; ix < buckets.size(); ix++) { Bucket b = buckets.get(ix); if (b.nextfree > CUTOFF_FACTOR_2 * candidates.size()) return; double score = b.getScore(); for (Score s : candidates.values()) if (b.contains(s.id)) s.score += score; } }
[ "Goes through the buckets from ix and out, checking for each\ncandidate if it's in one of the buckets, and if so, increasing\nits score accordingly. No new candidates are added." ]
[ "Sets object for statement at specific index, adhering to platform- and null-rules.\n@param stmt the statement\n@param index the current parameter index\n@param value the value to set\n@param sqlType the JDBC SQL-type of the value\n@throws SQLException on platform error", "Filters all exceptions from the provided dates.\n@param dates the dates to filter.\n@return the provided dates, except the ones that match some exception.", "Deselects all child items of the provided item.\n@param item the item for which all childs should be deselected.d", "Returns an entry with the given proposal and the prefix from the context, or null if the proposal is not valid.\nIf it is valid, the initializer function is applied to it.", "This method takes the textual version of a constraint name\nand returns an appropriate class instance. Note that unrecognised\nvalues are treated as \"As Soon As Possible\" constraints.\n\n@param locale target locale\n@param type text version of the constraint type\n@return ConstraintType instance", "This method is currently in use only by the SvnCoordinator", "This method allows a predecessor relationship to be removed from this\ntask instance. It will only delete relationships that exactly match the\ngiven targetTask, type and lag time.\n\n@param targetTask the predecessor task\n@param type relation type\n@param lag relation lag\n@return returns true if the relation is found and removed", "Creates a code location URL from a file path\n\n@param filePath the file path\n@return A URL created from File\n@throws InvalidCodeLocation if URL creation fails", "Add properties to 'properties' map on transaction start\n@param type - of transaction" ]
public static boolean isTrue(Expression expression) { if (expression == null) { return false; } if (expression instanceof PropertyExpression && classNodeImplementsType(((PropertyExpression) expression).getObjectExpression().getType(), Boolean.class)) { if (((PropertyExpression) expression).getProperty() instanceof ConstantExpression && "TRUE".equals(((ConstantExpression) ((PropertyExpression) expression).getProperty()).getValue())) { return true; } } return ((expression instanceof ConstantExpression) && ((ConstantExpression) expression).isTrueExpression()) || "Boolean.TRUE".equals(expression.getText()); }
[ "Tells you if the expression is true, which can be true or Boolean.TRUE.\n@param expression\nexpression\n@return\nas described" ]
[ "Runs through the log removing segments older than a certain age\n\n@throws IOException", "Use this API to add autoscaleprofile.", "Inserts a single document locally and being to synchronize it based on its _id. Inserting\na document with the same _id twice will result in a duplicate key exception.\n\n@param namespace the namespace to put the document in.\n@param document the document to insert.", "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", "Reads basic summary details from the project properties.\n\n@param file MPX file", "Should be called after all columns have been created\n@param headerStyle\n@param totalStyle\n@param totalHeaderStyle\n@return", "Checks if the categoryfolder setting needs to be updated.\n\n@return true if the categoryfolder setting needs to be updated", "Runs the shell script for committing and optionally pushing the changes in the module.\n@return exit code of the script.", "Adds a parameter to the argument list if the given integer is non-null.\nIf the value is null, then the argument list remains unchanged." ]
public ResourcePoolConfig setTimeout(long timeout, TimeUnit unit) { if(timeout < 0) throw new IllegalArgumentException("The timeout must be a non-negative number."); this.timeoutNs = TimeUnit.NANOSECONDS.convert(timeout, unit); return this; }
[ "The timeout which we block for when a resource is not available\n\n@param timeout The timeout\n@param unit The units of the timeout" ]
[ "Manage the artifact add to the Module AbstractGraph\n\n@param graph\n@param depth", "Retrieve timephased baseline cost. Note that index 0 represents \"Baseline\",\nindex 1 represents \"Baseline1\" and so on.\n\n@param index baseline index\n@return timephased work, or null if no baseline is present", "Performs a null edit on a property. This has some effects on Wikibase,\nsuch as refreshing the labels of the referred items in the UI.\n\n@param propertyId\nthe document to perform a null edit on\n@throws MediaWikiApiErrorException\nif the API returns errors\n@throws IOException\nif there are any IO errors, such as missing network connection", "Use this API to fetch lbvserver_filterpolicy_binding resources of given name .", "Factory for 'and' and 'or' predicates.", "Convert an integer to a RelationType instance.\n\n@param type integer value\n@return RelationType instance", "Get the aggregated result human readable string for easy display.\n\n\n@param aggregateResultMap the aggregate result map\n@return the aggregated result human", "Imports a file via assimp without post processing.\n\n@param filename the file to import\n@return the loaded scene\n@throws IOException if an error occurs", "Returns the name of the directory where the dumpfile of the given type\nand date should be stored.\n\n@param dumpContentType\nthe type of the dump\n@param dateStamp\nthe date of the dump in format YYYYMMDD\n@return the local directory name for the dumpfile" ]
public byte[] getPacketBytes() { byte[] result = new byte[packetBytes.length]; System.arraycopy(packetBytes, 0, result, 0, packetBytes.length); return result; }
[ "Get the raw data bytes of the device update packet.\n\n@return the data sent by the device to update its status" ]
[ "Closes all the producers in the pool", "Obtain host header value for a hostname\n\n@param hostName\n@return", "Use this API to kill systemsession resources.", "to do with XmlId value being strictly of type 'String'", "From three tagNames, if one is under sectorTag and one under rowTag, returns the remaining one, which is supposedly the a box label. Otherwise,\nreturns null.", "Creates a color item that represents a color field found for a track based on a dbserver message.\n\n@param menuItem the rendered menu item containing the color metadata field\n\n@return the color metadata field", "Get's the user's current upload limits, User object only contains user_id\n\n@return Media Limits", "Creates a new RDF serializer based on the current configuration of this\nobject.\n\n@return the newly created RDF serializer\n@throws IOException\nif there were problems opening the output files", "Is the transport secured by a policy" ]
protected TableFontStyle getColumnFontStyle(byte[] data, int offset, Map<Integer, FontBase> fontBases) { int uniqueID = MPPUtility.getInt(data, offset); FieldType fieldType = MPPTaskField.getInstance(MPPUtility.getShort(data, offset + 4)); Integer index = Integer.valueOf(MPPUtility.getByte(data, offset + 8)); int style = MPPUtility.getByte(data, offset + 9); ColorType color = ColorType.getInstance(MPPUtility.getByte(data, offset + 10)); int change = MPPUtility.getByte(data, offset + 12); FontBase fontBase = fontBases.get(index); boolean bold = ((style & 0x01) != 0); boolean italic = ((style & 0x02) != 0); boolean underline = ((style & 0x04) != 0); boolean boldChanged = ((change & 0x01) != 0); boolean underlineChanged = ((change & 0x02) != 0); boolean italicChanged = ((change & 0x04) != 0); boolean colorChanged = ((change & 0x08) != 0); boolean fontChanged = ((change & 0x10) != 0); boolean backgroundColorChanged = (uniqueID == -1); boolean backgroundPatternChanged = (uniqueID == -1); return (new TableFontStyle(uniqueID, fieldType, fontBase, italic, bold, underline, false, color.getColor(), Color.BLACK, BackgroundPattern.TRANSPARENT, italicChanged, boldChanged, underlineChanged, false, colorChanged, fontChanged, backgroundColorChanged, backgroundPatternChanged)); }
[ "Retrieve column font details from a block of property data.\n\n@param data property data\n@param offset offset into property data\n@param fontBases map of font bases\n@return ColumnFontStyle instance" ]
[ "Use this API to sync gslbconfig.", "Parse an extended attribute boolean value.\n\n@param value string representation\n@return boolean value", "ends the request and clears the cache. This can be called before the request is over,\nin which case the cache will be unavailable for the rest of the request.", "Sends all events to the web service. Events will be transformed with mapper before sending.\n\n@param events the events", "Check type.\n\n@param type the type\n@return the boolean", "Add roles for given role parent item.\n\n@param ouItem group parent item", "Extract predecessor data.", "Inserts a String array value into the mapping of the underlying Bundle, replacing any existing\nvalue for the given key. Either key or value may be null.\n\n@param key a String, or null\n@param value a String array object, or null\n@return this bundler instance to chain method calls", "In the 2.0 xsd the vault is in an external file, which has no namespace, using the output of the vault tool.\n\n@param f the file containing the external vault configuration as generated by the vault tool\n@return the vault config" ]
public int expect(String pattern) throws MalformedPatternException, Exception { logger.trace("Searching for '" + pattern + "' in the reader stream"); return expect(pattern, null); }
[ "Attempts to detect the provided pattern as an exact match.\n@param pattern the pattern to find in the reader stream\n@return the number of times the pattern is found,\nor an error code\n@throws MalformedPatternException if the pattern is invalid\n@throws Exception if a generic error is encountered" ]
[ "Create a canonical represenation of the data type value. Defaults to the value converter.\n\n@since 2.9", "Method will be executed asynchronously.", "add a single Object to the Collection. This method is used during reading Collection elements\nfrom the database. Thus it is is save to cast anObject to the underlying element type of the\ncollection.", "Returns the compact task records for all tasks within the given project,\nordered by their priority within the project.\n\n@param projectId The project in which to search for tasks.\n@return Request object", "Wraps a linear solver of any type with a safe solver the ensures inputs are not modified", "Separate from other findNonProgressingOp variant to allow unit testing without needing a mock OperationContext", "Set the pattern scheme.\n@param isWeekDayBased flag, indicating if the week day based scheme should be set.", "Set the value for a custom request\n\n@param pathId ID of path\n@param customRequest value of custom request\n@param clientUUID UUID of client", "Adds the allowed values. Override for attributes who should not use the allowed values.\n\n@param result the node to add the allowed values to\n@param validator the validator to get the allowed values from" ]
public static void parse(Reader src, StatementHandler handler) throws IOException { new NTriplesParser(src, handler).parse(); }
[ "Reads the NTriples file from the reader, pushing statements into\nthe handler." ]
[ "Return whether or not the data object has a default value passed for this field of this type.", "Parses the provided file, using the given libraryPaths and sourcePaths as context. The libraries may be either\njar files or references to directories containing class files.\n\nThe sourcePaths must be a reference to the top level directory for sources (eg, for a file\nsrc/main/java/org/example/Foo.java, the source path would be src/main/java).\n\nThe wildcard resolver provides a fallback for processing wildcard imports that the underlying parser was unable\nto resolve.", "Encrypt a string with HMAC-SHA1 using the specified key.\n\n@param message Input string.\n@param key Encryption key.\n@return Encrypted output.", "Builds a batch-fetch capable loader based on the given persister, lock-options, etc.\n\n@param persister The entity persister\n@param batchSize The maximum number of ids to batch-fetch at once\n@param lockOptions The lock options\n@param factory The SessionFactory\n@param influencers Any influencers that should affect the built query\n@param innerEntityLoaderBuilder Builder of the entity loader receiving the subset of batches\n\n@return The loader.", "Retrieves the GC timestamp, set by the Oracle, from zookeeper\n\n@param zookeepers Zookeeper connection string\n@return Oldest active timestamp or oldest possible ts (-1) if not found", "Performs spellchecking using Solr and returns the spellchecking results using JSON.\n\n@param res The HttpServletResponse object.\n@param servletRequest The ServletRequest object.\n@param cms The CmsObject object.\n\n@throws CmsPermissionViolationException in case of the anonymous guest user\n@throws IOException if writing the response fails", "Download a file asynchronously.\n@param url the URL pointing to the file\n@param retrofit the retrofit client\n@return an Observable pointing to the content of the file", "Add classes to the map file.\n\n@param writer XML stream writer\n@param jarFile jar file\n@param mapClassMethods true if we want to produce .Net style class method names\n@throws IOException\n@throws ClassNotFoundException\n@throws XMLStreamException\n@throws IntrospectionException", "Return the class's name, possibly by stripping the leading path" ]
protected LayoutManager getLayOutManagerObj(ActionInvocation _invocation) { if (layoutManager == null || "".equals(layoutManager)){ LOG.warn("No valid LayoutManager, using ClassicLayoutManager"); return new ClassicLayoutManager(); } Object los = conditionalParse(layoutManager, _invocation); if (los instanceof LayoutManager){ return (LayoutManager) los; } LayoutManager lo = null; if (los instanceof String){ if (LAYOUT_CLASSIC.equalsIgnoreCase((String) los)) lo = new ClassicLayoutManager(); else if (LAYOUT_LIST.equalsIgnoreCase((String) los)) lo = new ListLayoutManager(); else { try { lo = (LayoutManager) Class.forName((String) los).newInstance(); } catch (Exception e) { LOG.warn("No valid LayoutManager: " + e.getMessage(),e); } } } return lo; }
[ "Returns the export format indicated in the result-type parameter \"layoutManager\"\n@param _invocation\n@return" ]
[ "Adds a new Pie Slice to the PieChart. After inserting and calculation of the highlighting color\na complete recalculation is initiated.\n\n@param _Slice The newly added PieSlice.", "LRN cross-channel forward computation. Double parameters cast to tensor data type", "Logs the current user out.\n\n@throws IOException", "Get a list of referrers from a given domain to a user's photostream.\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 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.getPhotostreamReferrers.html\"", "Polls from the provided URL and updates the polling state with the\npolling response.\n\n@param pollingState the polling state for the current operation.\n@param url the url to poll from\n@param <T> the return type of the caller.", "Creates an appropriate HSGE for resources in the host tree, excluding the server and server-config subtrees", "Print an extended attribute currency value.\n\n@param value currency value\n@return string representation", "Make log segment file name from offset bytes. All this does is pad out the offset number\nwith zeros so that ls sorts the files numerically\n@param offset offset value (padding with zero)\n@return filename with offset", "Adds a boolean refinement for the next queries.\n\n@param attribute the attribute to refine on.\n@param value the value to refine with.\n@return this {@link Searcher} for chaining." ]
public static cmpparameter get(nitro_service service) throws Exception{ cmpparameter obj = new cmpparameter(); cmpparameter[] response = (cmpparameter[])obj.get_resources(service); return response[0]; }
[ "Use this API to fetch all the cmpparameter resources that are configured on netscaler." ]
[ "Add a simple property to the map file.\n\n@param writer xml stream writer\n@param name property name\n@param propertyType property type\n@param readMethod read method name\n@param writeMethod write method name\n@throws XMLStreamException", "Use this API to unset the properties of Interface resource.\nProperties that need to be unset are specified in args array.", "Sets the default pattern values dependent on the provided start date.\n@param startDate the date, the default values are determined with.", "Returns a copy of this year-week with the new year and week, checking\nto see if a new object is in fact required.\n\n@param newYear the year to represent, validated from MIN_YEAR to MAX_YEAR\n@param newWeek the week to represent, validated from 1 to 53\n@return the year-week, not null", "Serialize the object JSON. When an error occures return a string with the given error.", "Use this API to fetch all the sslservice resources that are configured on netscaler.", "Retrieve the default number of minutes per year.\n\n@return minutes per year", "Return the authorization URL which is used to perform the authorization_code based OAuth2 flow.\n@param clientID the client ID to use with the connection.\n@param redirectUri the URL to which Box redirects the browser when authentication completes.\n@param state the text string that you choose.\nBox sends the same string to your redirect URL when authentication is complete.\n@param scopes this optional parameter identifies the Box scopes available\nto the application once it's authenticated.\n@return the authorization URL", "Store an Object.\n@see org.apache.ojb.broker.PersistenceBroker#store(Object)" ]
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" ]
[ "Handler for month changes.\n@param event change event.", "Returns a builder that is initialized with the given path.\n@param path the path to initialize with\n@return the new {@code UriComponentsBuilder}", "Returns the current version info for a provided remote document.\n@param remoteDocument the remote BSON document from which to extract version info\n@return a DocumentVersionInfo", "Print duration in thousandths of minutes.\n\n@param duration Duration instance\n@return duration in thousandths of minutes", "Allocate a timestamp", "Use this API to add vpath resources.", "Handles subscription verification callback from Facebook.\n@param subscription The subscription name.\n@param challenge A challenge that Facebook expects to be returned.\n@param verifyToken A verification token that must match with the subscription's token given when the controller was created.\n@return The challenge if the verification token matches; blank string otherwise.", "An internal method, public only so that GVRContext can make cross-package\ncalls.\n\nA synchronous (blocking) wrapper around\n{@link android.graphics.BitmapFactory#decodeStream(InputStream)\nBitmapFactory.decodeStream} that uses an\n{@link android.graphics.BitmapFactory.Options} <code>inTempStorage</code>\ndecode buffer. On low memory, returns half (quarter, eighth, ...) size\nimages.\n<p>\nIf {@code stream} is a {@link FileInputStream} and is at offset 0 (zero),\nuses\n{@link android.graphics.BitmapFactory#decodeFileDescriptor(FileDescriptor)\nBitmapFactory.decodeFileDescriptor()} instead of\n{@link android.graphics.BitmapFactory#decodeStream(InputStream)\nBitmapFactory.decodeStream()}.\n\n@param stream\nBitmap stream\n@param closeStream\nIf {@code true}, closes {@code stream}\n@return Bitmap, or null if cannot be decoded into a bitmap", "Create the image elements for the banners tha goes into the\ntitle and header bands depending on the case" ]
public static ResourceKey key(Enum<?> value) { return new ResourceKey(value.getClass().getName(), value.name()); }
[ "Creates a resource key for given enumeration value. By convention,\nresource bundle for enumerations has the name of enumeration class\nand value identifier is the same as enumeration value name.\n@param value the enumeration value\n@return the resource key" ]
[ "Find the channel in the animation that animates the named bone.\n@param boneName name of bone to animate.", "Sets the drawable used as the drawer indicator.\n\n@param drawable The drawable used as the drawer indicator.", "Use this API to delete sslfipskey resources of given names.", "Put a value if and only if the map has not changed since the given snapshot was taken. If the put fails,\nit is the caller's responsibility to retry.\n\n@param instance the instance with the map field\n@param key the key\n@param value the value\n@param snapshot the map snapshot\n@return {@code false} if the snapshot is out of date and we could not update, {@code true} if the put succeeded", "Returns an entry with the given proposal and the prefix from the context, or null if the proposal is not valid.", "Returns a resource wrapper created from the input.\n\nThe wrapped result of {@link #convertRawResource(CmsObject, Object)} is returned.\n\n@param cms the current OpenCms user context\n@param input the input to create a resource from\n\n@return a resource wrapper created from the given Object\n\n@throws CmsException in case of errors accessing the OpenCms VFS for reading the resource", "Calculates the static drift. Static means, that the drift does not change direction or intensity over time.\n\n@param tracks Tracks which seems to exhibit a local drift\n@return The static drift over all trajectories", "Use this API to fetch sslaction resource of given name .", "Creates a new GridLines instance.\n\n@param data data block\n@param offset offset into data block\n@return new GridLines instance" ]
public Map<InetSocketAddress, ServerPort> activePorts() { final Server server = this.server; if (server != null) { return server.activePorts(); } else { return Collections.emptyMap(); } }
[ "Returns the ports of the server.\n\n@return the {@link Map} which contains the pairs of local {@link InetSocketAddress} and\n{@link ServerPort} is the server is started. {@link Optional#empty()} otherwise." ]
[ "Override this method to supply a custom splash screen image.\n\n@param gvrContext\nThe new {@link GVRContext}\n@return Texture to display\n\n@since 1.6.4", "Extract the generic type from the given Class object.\n@param clazz the Class to check\n@param source the expected raw source type (can be {@code null})\n@param typeIndex the index of the actual type argument\n@param nestingLevel the nesting level of the target type\n@param currentLevel the current nested level\n@return the generic type as Class, or {@code null} if none", "Create a REST call to artifactory with a generic request\n\n@param artifactoryRequest that should be sent to artifactory\n@return {@link ArtifactoryResponse} artifactory response as per to the request sent", "Adds an edge between the current and new state.\n\n@return true if the new state is not found in the state machine.", "Use this API to fetch all the vrid6 resources that are configured on netscaler.", "Print a resource type.\n\n@param value ResourceType instance\n@return resource type value", "Copies information between specified streams and then closes\nboth of the streams.\n@throws java.io.IOException", "Reads input data from a JSON file in the output directory.", "Generates required number of placeholders as string.\n\nExample: {@code numberOfPlaceholders == 1, result == \"?\"},\n{@code numberOfPlaceholders == 2, result == \"?,?\"}.\n\n@param numberOfPlaceholders required amount of placeholders, should be {@code > 0}.\n@return string with placeholders." ]
private FieldType addUserDefinedField(FieldTypeClass fieldType, UserFieldDataType dataType, String name) { FieldType field = null; try { switch (fieldType) { case TASK: { do { field = m_taskUdfCounters.nextField(TaskField.class, dataType); } while (RESERVED_TASK_FIELDS.contains(field)); m_projectFile.getCustomFields().getCustomField(field).setAlias(name); break; } case RESOURCE: { field = m_resourceUdfCounters.nextField(ResourceField.class, dataType); m_projectFile.getCustomFields().getCustomField(field).setAlias(name); break; } case ASSIGNMENT: { field = m_assignmentUdfCounters.nextField(AssignmentField.class, dataType); m_projectFile.getCustomFields().getCustomField(field).setAlias(name); break; } default: { break; } } } catch (Exception ex) { // // SF#227: If we get an exception thrown here... it's likely that // we've run out of user defined fields, for example // there are only 30 TEXT fields. We'll ignore this: the user // defined field won't be mapped to an alias, so we'll // ignore it when we read in the values. // } return field; }
[ "Map the Primavera UDF to a custom field.\n\n@param fieldType parent object type\n@param dataType UDF data type\n@param name UDF name\n@return FieldType instance" ]
[ "Internal method for recursivly searching for a class descriptor that avoids\nclass loading when we already have a class object.\n\n@param clazz The class whose descriptor we need to find\n@return ClassDescriptor for <code>clazz</code> or <code>null</code>\nif no ClassDescriptor could be located.", "Returns the ViewGroup used as a parent for the content view.\n\n@return The content view's parent.", "This adds to the feature name the name of classes that are other than\nthe current class that are involved in the clique. In the CMM, these\nother classes become part of the conditioning feature, and only the\nclass of the current position is being predicted.\n\n@return A collection of features with extra class information put\ninto the feature name.", "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.", "Reads input data from a JSON file in the output directory.", "Computes the null space using QRP decomposition. This is faster than using SVD but slower than QR.\nMuch more stable than QR though.\n@param A (Input) Matrix\n@param totalSingular Number of singular values\n@return Null space", "Rent a car available in the last serach result\n@param intp - the command interpreter instance", "test, how many times the group was present in the list of groups.", "Replaces new line delimiters in the input stream with the Unix line feed.\n\n@param input" ]
public static String getFlowContext() { TransactionLogger instance = getInstance(); if (instance == null) { return null; } return instance.flowContext; }
[ "Get string value of flow context for current instance\n@return string value of flow context" ]
[ "Determine which unit to use when creating grid labels.\n\n@param mapCrs the crs of the map, used if the {@link #labelProjection} is not defined.", "Use this API to login into Netscaler.\n@param username Username\n@param password Password for the Netscaler.\n@param timeout timeout for netscaler session.Default is 1800secs\n@return status of the operation performed.\n@throws Exception nitro exception is thrown.", "Disables all the overrides for a specific profile\n\n@param model\n@param profileID\n@param clientUUID\n@return", "Processes an anonymous reference definition.\n\n@param attributes The attributes of the tag\n@exception XDocletException If an error occurs\[email protected] type=\"content\"\[email protected] name=\"attributes\" optional=\"true\" description=\"Attributes of the reference as name-value pairs 'name=value',\nseparated by commas\"\[email protected] name=\"auto-delete\" optional=\"true\" description=\"Whether to automatically delete the\nreferenced object on object deletion\"\[email protected] name=\"auto-retrieve\" optional=\"true\" description=\"Whether to automatically retrieve\nthe referenced object\"\[email protected] name=\"auto-update\" optional=\"true\" description=\"Whether to automatically update the\nreferenced object\"\[email protected] name=\"class-ref\" optional=\"false\" description=\"The fully qualified name of the class\nowning the referenced field\"\[email protected] name=\"documentation\" optional=\"true\" description=\"Documentation on the reference\"\[email protected] name=\"foreignkey\" optional=\"true\" description=\"The fields in the current type used for\nimplementing the reference\"\[email protected] name=\"otm-dependent\" optional=\"true\" description=\"Whether the reference is dependent on otm\"\[email protected] name=\"proxy\" optional=\"true\" description=\"Whether to use a proxy for the reference\"\[email protected] name=\"proxy-prefetching-limit\" optional=\"true\" description=\"Specifies the amount of objects to prefetch\"\[email protected] name=\"refresh\" optional=\"true\" description=\"Whether to automatically refresh the\nreference\"\[email protected] name=\"remote-foreignkey\" optional=\"true\" description=\"The fields in the referenced type\ncorresponding to the local fields (is only used for the table definition)\"", "This method extracts resource data from a Phoenix file.\n\n@param phoenixProject parent node for resources", "Get an exception reporting an unexpected end tag for an XML element.\n@param reader the stream reader\n@return the exception", "Checks the hour, minute and second are equal.", "Send a packet to the target player telling it to load the specified track from the specified source player.\n\n@param targetPlayer the device number of the player that you want to have load a track\n@param rekordboxId the identifier of a track within the source player's rekordbox database\n@param sourcePlayer the device number of the player from which the track should be loaded\n@param sourceSlot the media slot from which the track should be loaded\n@param sourceType the type of track to be loaded\n\n@throws IOException if there is a problem sending the command\n@throws IllegalStateException if the {@code VirtualCdj} is not active or the target device cannot be found", "Declares the internal data structures so that it can process matrices up to the specified size.\n\n@param maxRows\n@param maxCols" ]
@Override public IPAddress toAddress() throws UnknownHostException, HostNameException { IPAddress addr = resolvedAddress; if(addr == null && !resolvedIsNull) { //note that validation handles empty address resolution validate(); synchronized(this) { addr = resolvedAddress; if(addr == null && !resolvedIsNull) { if(parsedHost.isAddressString()) { addr = parsedHost.asAddress(); resolvedIsNull = (addr == null); //note there is no need to apply prefix or mask here, it would have been applied to the address already } else { String strHost = parsedHost.getHost(); if(strHost.length() == 0 && !validationOptions.emptyIsLoopback) { addr = null; resolvedIsNull = true; } else { //Note we do not set resolvedIsNull, so we will attempt to resolve again if the previous attempt threw an exception InetAddress inetAddress = InetAddress.getByName(strHost); byte bytes[] = inetAddress.getAddress(); Integer networkPrefixLength = parsedHost.getNetworkPrefixLength(); if(networkPrefixLength == null) { IPAddress mask = parsedHost.getMask(); if(mask != null) { byte maskBytes[] = mask.getBytes(); if(maskBytes.length != bytes.length) { throw new HostNameException(host, "ipaddress.error.ipMismatch"); } for(int i = 0; i < bytes.length; i++) { bytes[i] &= maskBytes[i]; } networkPrefixLength = mask.getBlockMaskPrefixLength(true); } } IPAddressStringParameters addressParams = validationOptions.addressOptions; if(bytes.length == IPv6Address.BYTE_COUNT) { IPv6AddressCreator creator = addressParams.getIPv6Parameters().getNetwork().getAddressCreator(); addr = creator.createAddressInternal(bytes, networkPrefixLength, null, this); /* address creation */ } else { IPv4AddressCreator creator = addressParams.getIPv4Parameters().getNetwork().getAddressCreator(); addr = creator.createAddressInternal(bytes, networkPrefixLength, this); /* address creation */ } } } resolvedAddress = addr; } } } return addr; }
[ "If this represents an ip address, returns that address.\nIf this represents a host, returns the resolved ip address of that host.\nOtherwise, returns null, but only for strings that are considered valid address strings but cannot be converted to address objects.\n\nThis method will throw exceptions for invalid formats and failures to resolve the address. The equivalent method {@link #getAddress()} will simply return null rather than throw those exceptions.\n\nIf you wish to get the represented address and avoid DNS resolution, use {@link #asAddress()} or {@link #asAddressString()}\n\n@return" ]
[ "This private method allows the caller to determine if a given date is a\nworking day. This method takes account of calendar exceptions. It assumes\nthat the caller has already calculated the day of the week on which\nthe given day falls.\n\n@param date Date to be tested\n@param day Day of the week for the date under test\n@return boolean flag", "Use this API to update ntpserver.", "Look at the comments on cluster variable to see why this is problematic", "Append the given char as a decimal HTML entity.\n\n@param out\nThe StringBuilder to write to.\n@param value\nThe character.", "Use this API to fetch all the Interface resources that are configured on netscaler.", "Retrieve an instance of the ConstraintField class based on the data read from an\nMS Project file.\n\n@param value value from an MS Project file\n@return ConstraintField instance", "Schedule at most one task.\n\nThe scheduled task *must* invoke 'doneTask()' upon\ncompletion/termination.\n\n@param executeService flag to control execution of the service, some tests pass\nin value 'false'\n@return The task scheduled or null if not possible to schedule a task at\nthis time.", "Changes the index buffer associated with this mesh.\n@param ibuf new index buffer to use\n@see #setIndices(int[])\n@see #getIndexBuffer()\n@see #getIntIndices()", "Provides a normalized string which is lowercase for host strings, and which is a normalized string for addresses.\n@return" ]
protected void removeEmptyDirectories(File outputDirectory) { if (outputDirectory.exists()) { for (File file : outputDirectory.listFiles(new EmptyDirectoryFilter())) { file.delete(); } } }
[ "Deletes any empty directories under the output directory. These\ndirectories are created by TestNG for its own reports regardless\nof whether those reports are generated. If you are using the\ndefault TestNG reports as well as ReportNG, these directories will\nnot be empty and will be retained. Otherwise they will be removed.\n@param outputDirectory The directory to search for empty directories." ]
[ "Log the data for a single column.\n\n@param startIndex offset into buffer\n@param length length", "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", "Handles subscription verification callback from Facebook.\n@param subscription The subscription name.\n@param challenge A challenge that Facebook expects to be returned.\n@param verifyToken A verification token that must match with the subscription's token given when the controller was created.\n@return The challenge if the verification token matches; blank string otherwise.", "Writes data to delegate stream if it has been set.\n\n@param data the data to write", "Returns iterable with all assignments of given type of this retention policy.\n@param type the type of the retention policy assignment to retrieve. Can either be \"folder\" or \"enterprise\".\n@param limit the limit of entries per response. The default value is 100.\n@param fields the fields to retrieve.\n@return an iterable containing all assignments of given type.", "Processes the template for all column pairs of the current foreignkey.\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\"", "Checks to see if the submatrix has its boundaries along inner blocks.\n\n@param blockLength Size of an inner block.\n@param A Submatrix.\n@return If it is block aligned or not.", "Updates event definitions for all throwing events.\n@param def Definitions", "Method to send Request messages to a specific df_service\n\n@param df_service\nThe name of the df_service\n@param msgContent\nThe content of the message to be sent\n@return Message sent to + the name of the df_service" ]
public void validateUniqueIDsForMicrosoftProject() { if (!isEmpty()) { for (T entity : this) { if (NumberHelper.getInt(entity.getUniqueID()) > MS_PROJECT_MAX_UNIQUE_ID) { renumberUniqueIDs(); break; } } } }
[ "Validate that the Unique IDs for the entities in this container are valid for MS Project.\nIf they are not valid, i.e one or more of them are too large, renumber them." ]
[ "Adds the allowed values. Override for attributes who should not use the allowed values.\n\n@param result the node to add the allowed values to\n@param validator the validator to get the allowed values from", "Looks up and returns the value of the given key in the properties file of\nthe currently-selected theme.\n\n@param code Key to look up in the theme properties file.\n@return The value of the code in the current theme properties file, or an\nempty string if the code could not be resolved.", "Starts this EventStream and begins long polling the API.\n@throws IllegalStateException if the EventStream is already started.", "Use this API to fetch a aaaglobal_binding resource .", "Use this API to fetch all the nsconfig resources that are configured on netscaler.", "Returns all accessible projects of the given organizational unit.\n\nThat is all projects which are owned by the current user or which are\naccessible for the group of the user.<p>\n\n@param cms the opencms context\n@param ouFqn the fully qualified name of the organizational unit to get projects for\n@param includeSubOus if all projects of sub-organizational units should be retrieved too\n\n@return all <code>{@link org.opencms.file.CmsProject}</code> objects in the organizational unit\n\n@throws CmsException if operation was not successful", "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", "Use this API to fetch all the vrid6 resources that are configured on netscaler.", "Mbeans for SLOP_UPDATE" ]
private void addModuleToGraph(final DbModule module, final AbstractGraph graph, final int depth) { if (graph.isTreated(graph.getId(module))) { return; } final String moduleElementId = graph.getId(module); graph.addElement(moduleElementId, module.getVersion(), depth == 0); if (filters.getDepthHandler().shouldGoDeeper(depth)) { for (final DbDependency dep : DataUtils.getAllDbDependencies(module)) { if(filters.shouldBeInReport(dep)){ addDependencyToGraph(dep, graph, depth + 1, moduleElementId); } } } }
[ "Manage the artifact add to the Module AbstractGraph\n\n@param graph\n@param depth" ]
[ "2-D Complex Gabor function.\n\n@param x X axis coordinate.\n@param y Y axis coordinate.\n@param wavelength Wavelength.\n@param orientation Orientation.\n@param phaseOffset Phase offset.\n@param gaussVariance Gaussian variance.\n@param aspectRatio Aspect ratio.\n@return Gabor response.", "Assigns the element in the Matrix to the specified value. Performs a bounds check to make sure\nthe requested element is part of the matrix.\n\n@param row The row of the element.\n@param col The column of the element.\n@param value The element's new value.", "Entry point for recursive resolution of an expression and all of its\nnested expressions.\n\n@todo Ensure unresolvable expressions don't trigger infinite recursion.", "Obtains a local date in International Fixed calendar system from the\nera, year-of-era and day-of-year fields.\n\n@param era the International Fixed era, not null\n@param yearOfEra the year-of-era\n@param dayOfYear the day-of-year\n@return the International Fixed local date, not null\n@throws DateTimeException if unable to create the date\n@throws ClassCastException if the {@code era} is not a {@code InternationalFixedEra}", "Use this API to fetch autoscaleaction resource of given name .", "Returns redirect information for the given ID\n\n@param id ID of redirect\n@return ServerRedirect\n@throws Exception exception", "Put new sequence object for given sequence name.\n@param sequenceName Name of the sequence.\n@param seq The sequence object to add.", "Attaches a pre-existing set of hours to the correct\nday within the calendar.\n\n@param hours calendar hours instance", "Use this API to update vpnclientlessaccesspolicy." ]
private void writeMapFile(String mapFileName, File jarFile, boolean mapClassMethods) throws IOException, XMLStreamException, ClassNotFoundException, IntrospectionException { FileWriter fw = new FileWriter(mapFileName); XMLOutputFactory xof = XMLOutputFactory.newInstance(); XMLStreamWriter writer = xof.createXMLStreamWriter(fw); //XMLStreamWriter writer = new IndentingXMLStreamWriter(xof.createXMLStreamWriter(fw)); writer.writeStartDocument(); writer.writeStartElement("root"); writer.writeStartElement("assembly"); addClasses(writer, jarFile, mapClassMethods); writer.writeEndElement(); writer.writeEndElement(); writer.writeEndDocument(); writer.flush(); writer.close(); fw.flush(); fw.close(); }
[ "Generate an IKVM map file.\n\n@param mapFileName map file name\n@param jarFile jar file containing code to be mapped\n@param mapClassMethods true if we want to produce .Net style class method names\n@throws IOException\n@throws XMLStreamException\n@throws ClassNotFoundException\n@throws IntrospectionException" ]
[ "Access the customInfo of a message using this accessor. The CustomInfo\nmap will be automatically created and stored in the event if it is not yet present\n\n@param message\n@return", "Adds the worker thread pool attributes to the subysystem add method", "Receive some bytes from the player we are requesting metadata from.\n\n@param is the input stream associated with the player metadata socket.\n@return the bytes read.\n\n@throws IOException if there is a problem reading the response", "Produces a string in which the lower 4 bytes are expressed as an IPv4 address and the remaining upper bytes are expressed in IPv6 format.\n\nThis the mixed IPv6/IPv4 format described in RFC 1884 https://tools.ietf.org/html/rfc1884\n\n@return", "Writes a number to the specified byte array field, breaking it into its component bytes in big-endian order.\nIf the number is too large to fit in the specified number of bytes, only the low-order bytes are written.\n\n@param number the number to be written to the array\n@param buffer the buffer to which the number should be written\n@param start where the high-order byte should be written\n@param length how many bytes of the number should be written", "Returns the text value of all of the elements in the collection.\n\n@return the text value of all the elements in the collection or null", "Part of the endOfRun process that needs the database. May be deferred if the database is not available.", "Inserts the specified objects at the specified index in the array.\n\n@param items The objects to insert into the array.\n@param index The index at which the object must be inserted.", "Returns the value of the element with the largest value\n@param A (Input) Matrix. Not modified.\n@return scalar" ]
public static List<File> listFilesByRegex(String regex, File... directories) { return listFiles(directories, new RegexFileFilter(regex), CanReadFileFilter.CAN_READ); }
[ "Returns list of files matches specified regex in specified directories\n\n@param regex to match file names\n@param directories to find\n@return list of files matches specified regex in specified directories" ]
[ "Remove write.lock file in the data directory to ensure the index is unlocked.\n@param dataDir the data directory of the Solr index that should be unlocked.", "Safe write error response.\n\n@param channel the channel\n@param header the request header\n@param error the exception", "In the 2.0 xsd the vault is in an external file, which has no namespace, using the output of the vault tool.\n\n@param f the file containing the external vault configuration as generated by the vault tool\n@return the vault config", "Performs a remote service method invocation. This method is called by\ngenerated proxy classes.\n\n@param <T> return type for the AsyncCallback\n@param responseReader instance used to read the return value of the\ninvocation\n@param requestData payload that encodes the addressing and arguments of the\nRPC call\n@param callback callback handler\n\n@return a {@link Request} object that can be used to track the request", "The digits were stored as a hex value, thix switches them to an octal value.\n\n@param currentHexValue\n@param digitCount\n@return", "Creates a pattern choice radio button and adds it where necessary.\n@param pattern the pattern that should be chosen by the button.\n@param messageKey the message key for the button's label.", "Sets the name of the base calendar associated with this task.\nNote that this attribute appears in MPP9 and MSPDI files.\n\n@param calendar calendar instance", "Establish a new tempo master, and if it is a change from the existing one, report it to the listeners.\n\n@param newMaster the packet which caused the change of masters, or {@code null} if there is now no master.", "Update artifact provider\n\n@param gavc String\n@param provider String" ]
private void setTableAliasForClassDescriptor(ClassDescriptor aCld, TableAlias anAlias) { if (m_cldToAlias.get(aCld) == null) { m_cldToAlias.put(aCld, anAlias); } }
[ "Set the TableAlias for ClassDescriptor" ]
[ "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.", "Use this API to update Interface.", "appends a HAVING-clause to the Statement\n@param having\n@param crit\n@param stmt", "Split a module Id to get the module name\n@param moduleId\n@return String", "given is at the begining, of is at the end", "Creates a new section in a project.\n\nReturns the full record of the newly created section.\n\n@param project The project to create the section in\n@return Request object", "Use this API to unset the properties of nsip6 resource.\nProperties that need to be unset are specified in args array.", "generate a message for loglevel FATAL\n\n@param pObject the message Object", "Sets the value for the API's \"languages\" parameter based on the current\nsettings.\n\n@param properties\ncurrent setting of parameters" ]
public static void main(final String[] args) { if (System.getProperty("db.name") == null) { System.out.println("Not running in multi-instance mode: no DB to connect to"); System.exit(1); } while (true) { try { Class.forName("org.postgresql.Driver"); DriverManager.getConnection("jdbc:postgresql://" + System.getProperty("db.host") + ":5432/" + System.getProperty("db.name"), System.getProperty("db.username"), System.getProperty("db.password")); System.out.println("Opened database successfully. Running in multi-instance mode"); System.exit(0); return; } catch (Exception e) { System.out.println("Failed to connect to the DB: " + e.toString()); try { Thread.sleep(1000); } catch (InterruptedException e1) { //ignored } } } }
[ "A comment.\n\n@param args the parameters" ]
[ "Exchange an auth token from the old Authentication API, to an OAuth access token.\n\nCalling this method will delete the auth token used to make the request.\n\n@param authToken\n@throws FlickrException\n@see \"http://www.flickr.com/services/api/flickr.auth.oauth.getAccessToken.html\"", "Performs a get all operation with the specified composite request object\n\n@param requestWrapper Composite request object containing a reference to\nthe Iterable keys\n\n@return Map of the keys to the corresponding versioned values", "calculate arc angle between point a and point b\n\n@param center\n@param a\n@param b\n@param area\n@param radius\n@return", "Wait for the template resources to come up after the test container has\nbeen started. This allows the test container and the template resources\nto come up in parallel.", "Obtain newline-delimited headers from method\n\n@param method HttpMethod to scan\n@return newline-delimited headers", "convolution data type", "Apply all attributes on the given context, hereby existing entries are preserved.\n\n@param context the context to be applied, not null.\n@return this Builder, for chaining\n@see #importContext(AbstractContext, boolean)", "To use main report datasource. There should be nothing else in the detail band\n@param preSorted\n@return", "Gets information about the device pin.\n@param fields the fields to retrieve.\n@return info about the device pin." ]
public final boolean hasReturnValues() { if (this.hasReturnValue()) { return true; } else { // TODO: We may be able to 'pre-calculate' the results // of this loop by just checking arguments as they are added // The only problem is that the 'isReturnedbyProcedure' property // can be modified once the argument is added to this procedure. // If that occurs, then 'pre-calculated' results will be inacccurate. Iterator iter = this.getArguments().iterator(); while (iter.hasNext()) { ArgumentDescriptor arg = (ArgumentDescriptor) iter.next(); if (arg.getIsReturnedByProcedure()) { return true; } } } return false; }
[ "Does this procedure return any values to the 'caller'?\n\n@return <code>true</code> if the procedure returns at least 1\nvalue that is returned to the caller." ]
[ "Set the buttons size.", "Helper method for getting the current parameter values from a list of annotated parameters.\n\n@param parameters The list of annotated parameter to look up\n@param manager The Bean manager\n@return The object array of looked up values", "This looks at the servlet attributes to get the list of response headers to remove while the response object gets created by the servlet", "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.", "Process the graphical indicator data.", "Checks if this has the passed prefix\n\n@param prefix is a Bytes object to compare to this\n@return true or false\n@since 1.1.0", "Determines whether there is an element of the collection that evaluates to true\nfor the predicate.\n@param\tpredicate\tAn OQL boolean query predicate.\n@return\tTrue if there is an element of the collection that evaluates to true\nfor the predicate, otherwise false.\n@exception\torg.odmg.QueryInvalidException\tThe query predicate is invalid.", "Runs intermediate check on the Assembly status until it is finished executing,\nthen returns it as a response.\n\n@return {@link AssemblyResponse}\n@throws LocalOperationException if something goes wrong while running non-http operations.\n@throws RequestException if request to Transloadit server fails.", "Adds each required substring, checking that it's not null.\n\n@param requiredSubStrings\nthe required substrings\n@throws NullPointerException\nif a required substring is null" ]
public static base_response add(nitro_service client, sslaction resource) throws Exception { sslaction addresource = new sslaction(); addresource.name = resource.name; addresource.clientauth = resource.clientauth; addresource.clientcert = resource.clientcert; addresource.certheader = resource.certheader; addresource.clientcertserialnumber = resource.clientcertserialnumber; addresource.certserialheader = resource.certserialheader; addresource.clientcertsubject = resource.clientcertsubject; addresource.certsubjectheader = resource.certsubjectheader; addresource.clientcerthash = resource.clientcerthash; addresource.certhashheader = resource.certhashheader; addresource.clientcertissuer = resource.clientcertissuer; addresource.certissuerheader = resource.certissuerheader; addresource.sessionid = resource.sessionid; addresource.sessionidheader = resource.sessionidheader; addresource.cipher = resource.cipher; addresource.cipherheader = resource.cipherheader; addresource.clientcertnotbefore = resource.clientcertnotbefore; addresource.certnotbeforeheader = resource.certnotbeforeheader; addresource.clientcertnotafter = resource.clientcertnotafter; addresource.certnotafterheader = resource.certnotafterheader; addresource.owasupport = resource.owasupport; return addresource.add_resource(client); }
[ "Use this API to add sslaction." ]
[ "Merges individual days together into time spans where the\nsame work is undertaken each day.\n\n@param list assignment data", "Get the MVT type mapping for the provided JTS Geometry.\n\n@param geometry JTS Geometry to get MVT type for\n@return MVT type for the given JTS Geometry, may return\n{@link com.wdtinc.mapbox_vector_tile.VectorTile.Tile.GeomType#UNKNOWN}", "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", "Checks if a key already exists.\n@param newKey the key to check for.\n@return <code>true</code> if the key already exists, <code>false</code> otherwise.", "Check if this is a redeployment triggered after the removal of a link.\n@param operation the current operation.\n@return true if this is a redeploy after the removal of a link.\n@see org.jboss.as.server.deploymentoverlay.DeploymentOverlayDeploymentRemoveHandler", "Obtain newline-delimited headers from method\n\n@param method HttpMethod to scan\n@return newline-delimited headers", "Returns the full record for a single story.\n\n@param story Globally unique identifier for the story.\n@return Request object", "Returns the compact representations of all of the dependents of a task.\n\n@param task The task to get dependents on.\n@return Request object", "Reads numBytes bytes, and returns the corresponding string" ]